@xmachines/docs 5.0.2 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (572) hide show
  1. package/README.md +9 -5
  2. package/api/@xmachines/core/README.md +209 -0
  3. package/api/@xmachines/core/cache/README.md +17 -0
  4. package/api/@xmachines/core/cache/functions/createLruCache.md +52 -0
  5. package/api/@xmachines/core/cache/interfaces/KeyValueCache.md +61 -0
  6. package/api/@xmachines/core/errors/README.md +11 -0
  7. package/api/@xmachines/core/errors/classes/BaseError.md +226 -0
  8. package/api/@xmachines/core/errors/classes/DisposeConflictError.md +177 -0
  9. package/api/@xmachines/core/utils/README.md +33 -0
  10. package/api/@xmachines/core/utils/functions/asDisposable.md +139 -0
  11. package/api/@xmachines/core/utils/functions/createNullRecord.md +39 -0
  12. package/api/@xmachines/core/utils/functions/createWarnOnce.md +39 -0
  13. package/api/@xmachines/core/utils/functions/describeValue.md +39 -0
  14. package/api/@xmachines/core/utils/functions/isError.md +46 -0
  15. package/api/@xmachines/core/utils/functions/isThenable.md +43 -0
  16. package/api/@xmachines/core/utils/functions/releaseQuietly.md +37 -0
  17. package/api/@xmachines/core/utils/functions/rethrowLater.md +43 -0
  18. package/api/@xmachines/core/utils/functions/safeString.md +36 -0
  19. package/api/@xmachines/core/utils/functions/shallowEqualExcept.md +42 -0
  20. package/api/@xmachines/core/utils/type-aliases/DisposeKey.md +28 -0
  21. package/api/@xmachines/core/utils/type-aliases/DisposeMember.md +14 -0
  22. package/api/@xmachines/{play-router/index → core/utils}/variables/DISPOSE.md +9 -9
  23. package/api/@xmachines/play/README.md +18 -69
  24. package/api/@xmachines/play/errors/classes/NonNullableError.md +4 -4
  25. package/api/@xmachines/play/errors/classes/PlayError.md +31 -34
  26. package/api/@xmachines/play/index/README.md +0 -8
  27. package/api/@xmachines/play/index/functions/assertNonNullable.md +1 -1
  28. package/api/@xmachines/play/index/type-aliases/PlayEvent.md +2 -2
  29. package/api/@xmachines/play-actor/README.md +1 -1
  30. package/api/@xmachines/play-actor/interfaces/ActorEvent.md +2 -2
  31. package/api/@xmachines/play-actor/interfaces/PlayActor.md +3 -3
  32. package/api/@xmachines/play-atom/README.md +35 -26
  33. package/api/@xmachines/play-atom/functions/watchAtom.md +8 -8
  34. package/api/@xmachines/play-atom/interfaces/AsyncAtomOptions.md +4 -4
  35. package/api/@xmachines/play-atom/interfaces/Atom.md +6 -6
  36. package/api/@xmachines/play-atom/interfaces/AtomObserver.md +6 -6
  37. package/api/@xmachines/play-atom/interfaces/AtomOptions.md +4 -4
  38. package/api/@xmachines/play-atom/interfaces/AtomSubscription.md +2 -2
  39. package/api/@xmachines/play-atom/interfaces/BaseAtom.md +4 -4
  40. package/api/@xmachines/play-atom/interfaces/CreateAtom.md +3 -3
  41. package/api/@xmachines/play-atom/interfaces/Readable.md +4 -4
  42. package/api/@xmachines/play-atom/interfaces/ReadonlyAtom.md +4 -4
  43. package/api/@xmachines/play-atom/type-aliases/AnyAtom.md +1 -1
  44. package/api/@xmachines/play-atom/type-aliases/AsyncAtomState.md +1 -1
  45. package/api/@xmachines/play-atom/variables/createAsyncAtom.md +1 -1
  46. package/api/@xmachines/play-atom/variables/createAtom.md +1 -1
  47. package/api/@xmachines/play-atom/variables/createWritableAtom.md +1 -1
  48. package/api/@xmachines/play-dom/README.md +40 -47
  49. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  50. package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
  51. package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
  52. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +11 -11
  53. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -2
  54. package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
  55. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -14
  56. package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -17
  57. package/api/@xmachines/play-dom-router/README.md +28 -45
  58. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +13 -13
  59. package/api/@xmachines/play-dom-router/classes/RouteMap.md +5 -6
  60. package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
  61. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +5 -3
  62. package/api/@xmachines/play-dom-router/functions/createRouter.md +5 -3
  63. package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +3 -3
  64. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +21 -67
  65. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  66. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +10 -10
  67. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +7 -7
  68. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
  69. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  70. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +6 -6
  71. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
  72. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +5 -5
  73. package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +12 -31
  74. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +12 -27
  75. package/api/@xmachines/play-pattern/README.md +10 -6
  76. package/api/@xmachines/play-pattern/functions/buildPath.md +1 -1
  77. package/api/@xmachines/play-pattern/functions/{createPatternCache.md → createLruCache.md} +19 -14
  78. package/api/@xmachines/play-pattern/functions/getIndexKey.md +1 -1
  79. package/api/@xmachines/play-pattern/functions/isDotSegment.md +1 -1
  80. package/api/@xmachines/play-pattern/functions/parsePattern.md +1 -1
  81. package/api/@xmachines/play-pattern/interfaces/GroupPart.md +6 -6
  82. package/api/@xmachines/play-pattern/interfaces/KeyValueCache.md +61 -0
  83. package/api/@xmachines/play-pattern/interfaces/LiteralPart.md +5 -5
  84. package/api/@xmachines/play-pattern/interfaces/ParamPart.md +9 -9
  85. package/api/@xmachines/play-pattern/interfaces/ParseOptions.md +4 -4
  86. package/api/@xmachines/play-pattern/interfaces/ParsedPattern.md +14 -14
  87. package/api/@xmachines/play-pattern/interfaces/PatternParam.md +6 -6
  88. package/api/@xmachines/play-pattern/type-aliases/PathBuildResult.md +1 -1
  89. package/api/@xmachines/play-pattern/type-aliases/PathParams.md +1 -1
  90. package/api/@xmachines/play-pattern/type-aliases/PatternModifier.md +1 -1
  91. package/api/@xmachines/play-pattern/type-aliases/PatternPart.md +1 -1
  92. package/api/@xmachines/play-react/README.md +4 -4
  93. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +6 -6
  94. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  95. package/api/@xmachines/play-react/functions/useAtomEffect.md +1 -1
  96. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  97. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
  98. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +6 -6
  99. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
  100. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
  101. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
  102. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
  103. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  104. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  105. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  106. package/api/@xmachines/play-react-router/README.md +4 -2
  107. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +7 -7
  108. package/api/@xmachines/play-react-router/classes/RouteMap.md +5 -6
  109. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
  110. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  111. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +7 -7
  112. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  113. package/api/@xmachines/play-react-router/interfaces/RoutableActor.md +4 -4
  114. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +6 -6
  115. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  116. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +5 -5
  117. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  118. package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
  119. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
  120. package/api/@xmachines/play-router/README.md +20 -20
  121. package/api/@xmachines/play-router/errors/classes/DuplicateBridgeError.md +4 -4
  122. package/api/@xmachines/play-router/errors/classes/DuplicateRoutePathError.md +5 -5
  123. package/api/@xmachines/play-router/errors/classes/EmptyRoutePathError.md +5 -5
  124. package/api/@xmachines/play-router/errors/classes/InvalidBasePathError.md +5 -5
  125. package/api/@xmachines/play-router/errors/classes/InvalidRoutePatternError.md +5 -5
  126. package/api/@xmachines/play-router/errors/classes/InvalidStateIdError.md +5 -5
  127. package/api/@xmachines/play-router/errors/classes/MissingBasePathParamError.md +6 -6
  128. package/api/@xmachines/play-router/errors/classes/RouterSyncError.md +4 -4
  129. package/api/@xmachines/play-router/errors/classes/UnknownStateTypeError.md +6 -6
  130. package/api/@xmachines/play-router/index/README.md +2 -3
  131. package/api/@xmachines/play-router/index/classes/RouteMap.md +5 -6
  132. package/api/@xmachines/play-router/index/classes/RouterBridgeBase.md +7 -7
  133. package/api/@xmachines/play-router/index/functions/buildPlayRouteEvent.md +1 -1
  134. package/api/@xmachines/play-router/index/functions/buildRouteTree.md +1 -1
  135. package/api/@xmachines/play-router/index/functions/cleanFrameworkParams.md +1 -1
  136. package/api/@xmachines/play-router/index/functions/{createPatternCache.md → createLruCache.md} +19 -14
  137. package/api/@xmachines/play-router/index/functions/createRouteMapFromTree.md +1 -1
  138. package/api/@xmachines/play-router/index/functions/createRouterConnection.md +1 -1
  139. package/api/@xmachines/play-router/index/functions/detectDuplicateRoutes.md +1 -1
  140. package/api/@xmachines/play-router/index/functions/extractQuery.md +1 -1
  141. package/api/@xmachines/play-router/index/functions/extractRouteParams.md +1 -1
  142. package/api/@xmachines/play-router/index/functions/findRouteById.md +1 -1
  143. package/api/@xmachines/play-router/index/functions/findRouteByPath.md +3 -3
  144. package/api/@xmachines/play-router/index/functions/isMountableBridge.md +1 -1
  145. package/api/@xmachines/play-router/index/functions/joinBasePath.md +1 -1
  146. package/api/@xmachines/play-router/index/functions/mountKey.md +1 -1
  147. package/api/@xmachines/play-router/index/functions/normalizeBasePath.md +1 -1
  148. package/api/@xmachines/play-router/index/functions/openProviderBridge.md +3 -3
  149. package/api/@xmachines/play-router/index/functions/parsePattern.md +1 -1
  150. package/api/@xmachines/play-router/index/functions/pickOwnParams.md +1 -1
  151. package/api/@xmachines/play-router/index/functions/repointProviderBridge.md +1 -1
  152. package/api/@xmachines/play-router/index/functions/resolveBasePath.md +1 -1
  153. package/api/@xmachines/play-router/index/functions/resolveFrameworkParams.md +1 -1
  154. package/api/@xmachines/play-router/index/functions/sanitizePathname.md +1 -1
  155. package/api/@xmachines/play-router/index/functions/splitLocation.md +1 -1
  156. package/api/@xmachines/play-router/index/functions/stripBasePath.md +1 -1
  157. package/api/@xmachines/play-router/index/functions/validateRouteFormat.md +1 -1
  158. package/api/@xmachines/play-router/index/functions/validateStateExists.md +1 -1
  159. package/api/@xmachines/play-router/index/interfaces/BasePathOptions.md +3 -3
  160. package/api/@xmachines/play-router/index/interfaces/BuildPlayRouteEventOptions.md +4 -4
  161. package/api/@xmachines/play-router/index/interfaces/CompileOptions.md +5 -5
  162. package/api/@xmachines/play-router/index/interfaces/FrameworkParamsSource.md +9 -9
  163. package/api/@xmachines/play-router/index/interfaces/KeyValueCache.md +61 -0
  164. package/api/@xmachines/play-router/index/interfaces/LocationLike.md +3 -3
  165. package/api/@xmachines/play-router/index/interfaces/MountableRouterBridge.md +6 -6
  166. package/api/@xmachines/play-router/index/interfaces/OpenProviderBridgeArgs.md +10 -10
  167. package/api/@xmachines/play-router/index/interfaces/ParseOptions.md +4 -4
  168. package/api/@xmachines/play-router/index/interfaces/ParsedPattern.md +12 -12
  169. package/api/@xmachines/play-router/index/interfaces/PlayRouteEvent.md +7 -7
  170. package/api/@xmachines/play-router/index/interfaces/PlayRouterProviderBaseProps.md +11 -11
  171. package/api/@xmachines/play-router/index/interfaces/ResolvedBasePath.md +3 -3
  172. package/api/@xmachines/play-router/index/interfaces/ResolvedRoutePath.md +3 -3
  173. package/api/@xmachines/play-router/index/interfaces/Routable.md +3 -3
  174. package/api/@xmachines/play-router/index/interfaces/RoutableActor.md +4 -4
  175. package/api/@xmachines/play-router/index/interfaces/RouteInfo.md +8 -8
  176. package/api/@xmachines/play-router/index/interfaces/RouteMapOptions.md +6 -6
  177. package/api/@xmachines/play-router/index/interfaces/RouteMapping.md +3 -3
  178. package/api/@xmachines/play-router/index/interfaces/RouteMatch.md +3 -3
  179. package/api/@xmachines/play-router/index/interfaces/RouteNode.md +10 -10
  180. package/api/@xmachines/play-router/index/interfaces/RouteObject.md +12 -15
  181. package/api/@xmachines/play-router/index/interfaces/RouteTree.md +5 -5
  182. package/api/@xmachines/play-router/index/interfaces/RouteWatcherHandle.md +3 -3
  183. package/api/@xmachines/play-router/index/interfaces/RouterBridge.md +5 -5
  184. package/api/@xmachines/play-router/index/interfaces/RouterBridgeOptions.md +7 -7
  185. package/api/@xmachines/play-router/index/interfaces/RouterConnection.md +12 -31
  186. package/api/@xmachines/play-router/index/interfaces/SplitLocation.md +5 -5
  187. package/api/@xmachines/play-router/index/interfaces/WindowLike.md +3 -3
  188. package/api/@xmachines/play-router/index/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  189. package/api/@xmachines/play-router/index/type-aliases/RouteData.md +1 -1
  190. package/api/@xmachines/play-router/index/type-aliases/RouteDataResolver.md +1 -1
  191. package/api/@xmachines/play-router/index/type-aliases/RouteMetadata.md +1 -1
  192. package/api/@xmachines/play-router/index/type-aliases/URLPatternLike.md +3 -3
  193. package/api/@xmachines/play-router/index/variables/NO_BASE_PATH.md +1 -1
  194. package/api/@xmachines/play-router/index/variables/ROOT_NODE_ID.md +1 -1
  195. package/api/@xmachines/play-router/xstate/functions/createRouteMap.md +1 -1
  196. package/api/@xmachines/play-router/xstate/functions/extractMachineRoutes.md +1 -1
  197. package/api/@xmachines/play-router/xstate/functions/getNavigableRoutes.md +1 -1
  198. package/api/@xmachines/play-router/xstate/functions/getRoutableRoutes.md +1 -1
  199. package/api/@xmachines/play-router/xstate/functions/getRouteMappings.md +1 -1
  200. package/api/@xmachines/play-router/xstate/functions/getTransitionReachableRoutes.md +1 -1
  201. package/api/@xmachines/play-router/xstate/functions/isRouteReachable.md +1 -1
  202. package/api/@xmachines/play-router/xstate/functions/machineToGraph.md +1 -1
  203. package/api/@xmachines/play-router/xstate/functions/routeExists.md +1 -1
  204. package/api/@xmachines/play-router/xstate/interfaces/MachineEdgeData.md +3 -3
  205. package/api/@xmachines/play-router/xstate/interfaces/MachineNodeData.md +5 -5
  206. package/api/@xmachines/play-router/xstate/type-aliases/MachineGraph.md +1 -1
  207. package/api/@xmachines/play-solid/README.md +2 -5
  208. package/api/@xmachines/play-solid/functions/defineRegistry.md +5 -5
  209. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  210. package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
  211. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
  212. package/api/@xmachines/play-solid/interfaces/ComponentContext.md +9 -8
  213. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
  214. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
  215. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
  216. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  217. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  218. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  219. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  220. package/api/@xmachines/play-solid/variables/schema.md +35 -54
  221. package/api/@xmachines/play-solid-router/README.md +5 -3
  222. package/api/@xmachines/play-solid-router/classes/RouteMap.md +5 -6
  223. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +8 -8
  224. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
  225. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +3 -3
  226. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +7 -7
  227. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  228. package/api/@xmachines/play-solid-router/interfaces/RoutableActor.md +4 -4
  229. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +6 -6
  230. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  231. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +5 -5
  232. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  233. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
  234. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  235. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +1 -1
  236. package/api/@xmachines/play-svelte/README.md +3 -3
  237. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  238. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  239. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
  240. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  241. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
  242. package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +10 -8
  243. package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +10 -8
  244. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
  245. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
  246. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
  247. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
  248. package/api/@xmachines/play-svelte-spa-router/README.md +4 -2
  249. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +5 -6
  250. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +7 -7
  251. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
  252. package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +3 -3
  253. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +10 -10
  254. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +7 -7
  255. package/api/@xmachines/play-svelte-spa-router/interfaces/RoutableActor.md +4 -4
  256. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +6 -6
  257. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
  258. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +5 -5
  259. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +12 -31
  260. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  261. package/api/@xmachines/play-sveltekit-router/README.md +4 -2
  262. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +5 -6
  263. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +7 -7
  264. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
  265. package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +3 -3
  266. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +10 -10
  267. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
  268. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +7 -7
  269. package/api/@xmachines/play-sveltekit-router/interfaces/RoutableActor.md +4 -4
  270. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +6 -6
  271. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
  272. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +5 -5
  273. package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +12 -31
  274. package/api/@xmachines/play-tanstack-react-router/README.md +4 -2
  275. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +5 -6
  276. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +7 -7
  277. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
  278. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  279. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +7 -7
  280. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  281. package/api/@xmachines/play-tanstack-react-router/interfaces/RoutableActor.md +4 -4
  282. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +6 -6
  283. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  284. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +5 -5
  285. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  286. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
  287. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  288. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
  289. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
  290. package/api/@xmachines/play-tanstack-router/README.md +11 -1
  291. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +7 -7
  292. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
  293. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
  294. package/api/@xmachines/play-tanstack-solid-router/README.md +4 -2
  295. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +5 -6
  296. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +7 -7
  297. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
  298. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +7 -7
  299. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  300. package/api/@xmachines/play-tanstack-solid-router/interfaces/RoutableActor.md +4 -4
  301. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +6 -6
  302. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  303. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +5 -5
  304. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  305. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
  306. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  307. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +5 -5
  308. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
  309. package/api/@xmachines/play-url/README.md +3 -3
  310. package/api/@xmachines/play-url/errors/classes/InvalidBasePathError.md +5 -5
  311. package/api/@xmachines/play-url/errors/classes/InvalidRoutePatternError.md +5 -5
  312. package/api/@xmachines/play-url/errors/classes/MissingBasePathParamError.md +6 -6
  313. package/api/@xmachines/play-url/index/README.md +2 -2
  314. package/api/@xmachines/play-url/index/functions/buildPath.md +1 -1
  315. package/api/@xmachines/play-url/index/functions/cleanFrameworkParams.md +1 -1
  316. package/api/@xmachines/play-url/index/functions/{createPatternCache.md → createLruCache.md} +19 -14
  317. package/api/@xmachines/play-url/index/functions/getCandidates.md +1 -1
  318. package/api/@xmachines/play-url/index/functions/getCompiledPattern.md +1 -1
  319. package/api/@xmachines/play-url/index/functions/getIndexKey.md +1 -1
  320. package/api/@xmachines/play-url/index/functions/holdsUnsubstitutedParam.md +1 -1
  321. package/api/@xmachines/play-url/index/functions/isDotSegment.md +1 -1
  322. package/api/@xmachines/play-url/index/functions/joinBasePath.md +1 -1
  323. package/api/@xmachines/play-url/index/functions/normalizeBasePath.md +1 -1
  324. package/api/@xmachines/play-url/index/functions/parsePattern.md +1 -1
  325. package/api/@xmachines/play-url/index/functions/pickOwnParams.md +1 -1
  326. package/api/@xmachines/play-url/index/functions/resolveBasePath.md +1 -1
  327. package/api/@xmachines/play-url/index/functions/resolveFrameworkParams.md +1 -1
  328. package/api/@xmachines/play-url/index/functions/sanitizePathname.md +1 -1
  329. package/api/@xmachines/play-url/index/functions/splitLocation.md +1 -1
  330. package/api/@xmachines/play-url/index/functions/stripBasePath.md +1 -1
  331. package/api/@xmachines/play-url/index/interfaces/BasePathOptions.md +3 -3
  332. package/api/@xmachines/play-url/index/interfaces/CompileOptions.md +5 -5
  333. package/api/@xmachines/play-url/index/interfaces/FrameworkParamsSource.md +9 -9
  334. package/api/@xmachines/play-url/index/interfaces/GroupPart.md +4 -4
  335. package/api/@xmachines/play-url/index/interfaces/KeyValueCache.md +61 -0
  336. package/api/@xmachines/play-url/index/interfaces/LiteralPart.md +3 -3
  337. package/api/@xmachines/play-url/index/interfaces/ParamPart.md +7 -7
  338. package/api/@xmachines/play-url/index/interfaces/ParseOptions.md +4 -4
  339. package/api/@xmachines/play-url/index/interfaces/ParsedPattern.md +12 -12
  340. package/api/@xmachines/play-url/index/interfaces/PatternParam.md +4 -4
  341. package/api/@xmachines/play-url/index/interfaces/ResolvedBasePath.md +3 -3
  342. package/api/@xmachines/play-url/index/interfaces/SplitLocation.md +5 -5
  343. package/api/@xmachines/play-url/index/type-aliases/PathBuildResult.md +1 -1
  344. package/api/@xmachines/play-url/index/type-aliases/PathParams.md +1 -1
  345. package/api/@xmachines/play-url/index/type-aliases/PatternModifier.md +1 -1
  346. package/api/@xmachines/play-url/index/type-aliases/PatternPart.md +1 -1
  347. package/api/@xmachines/play-url/index/type-aliases/URLPatternCtor.md +1 -1
  348. package/api/@xmachines/play-url/index/type-aliases/URLPatternLike.md +3 -3
  349. package/api/@xmachines/play-url/index/variables/NO_BASE_PATH.md +1 -1
  350. package/api/@xmachines/play-url/index/variables/URLPattern.md +1 -1
  351. package/api/@xmachines/play-view/README.md +56 -24
  352. package/api/@xmachines/play-view/errors/README.md +2 -1
  353. package/api/@xmachines/play-view/errors/classes/InvalidViewOutletError.md +204 -0
  354. package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +5 -5
  355. package/api/@xmachines/play-view/index/README.md +6 -0
  356. package/api/@xmachines/play-view/index/functions/attachRenderErrorHandler.md +1 -1
  357. package/api/@xmachines/play-view/index/functions/composePlayState.md +1 -1
  358. package/api/@xmachines/play-view/index/functions/composeViews.md +35 -0
  359. package/api/@xmachines/play-view/index/functions/createFailureLatch.md +1 -1
  360. package/api/@xmachines/play-view/index/functions/createReportGuard.md +1 -1
  361. package/api/@xmachines/play-view/index/functions/createViewStoreLifecycle.md +1 -1
  362. package/api/@xmachines/play-view/index/functions/guardContextWrites.md +1 -1
  363. package/api/@xmachines/play-view/index/functions/refreshContextSubtree.md +1 -1
  364. package/api/@xmachines/play-view/index/functions/reuseComposedState.md +2 -2
  365. package/api/@xmachines/play-view/index/functions/sameViewInputs.md +1 -1
  366. package/api/@xmachines/play-view/index/functions/toAtomState.md +1 -1
  367. package/api/@xmachines/play-view/index/functions/typedSpec.md +11 -11
  368. package/api/@xmachines/play-view/index/interfaces/BaseActorProviderProps.md +5 -5
  369. package/api/@xmachines/play-view/index/interfaces/BaseViewContextValue.md +5 -5
  370. package/api/@xmachines/play-view/index/interfaces/ComposedView.md +16 -0
  371. package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +3 -3
  372. package/api/@xmachines/play-view/index/interfaces/PlaySpec.md +12 -8
  373. package/api/@xmachines/play-view/index/interfaces/ReportGuard.md +5 -5
  374. package/api/@xmachines/play-view/index/interfaces/ReportGuardMessages.md +5 -5
  375. package/api/@xmachines/play-view/index/interfaces/ResolveViewStoreOptions.md +2 -2
  376. package/api/@xmachines/play-view/index/interfaces/ViewInputs.md +4 -4
  377. package/api/@xmachines/play-view/index/interfaces/ViewMeta.md +25 -0
  378. package/api/@xmachines/play-view/index/interfaces/ViewOutlet.md +23 -0
  379. package/api/@xmachines/play-view/index/interfaces/ViewStoreLifecycle.md +3 -3
  380. package/api/@xmachines/play-view/index/interfaces/ViewStoreResolution.md +4 -4
  381. package/api/@xmachines/play-view/index/interfaces/ViewTree.md +15 -0
  382. package/api/@xmachines/play-view/index/interfaces/ViewTreeChild.md +14 -0
  383. package/api/@xmachines/play-view/index/interfaces/Viewable.md +4 -4
  384. package/api/@xmachines/play-view/index/type-aliases/ViewActor.md +1 -1
  385. package/api/@xmachines/play-view/index/variables/CONTEXT_STATE_KEY.md +1 -1
  386. package/api/@xmachines/play-vue/README.md +4 -6
  387. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  388. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  389. package/api/@xmachines/play-vue/functions/usePlayView.md +1 -1
  390. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +8 -8
  391. package/api/@xmachines/play-vue/interfaces/ComponentContext.md +1 -0
  392. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +11 -11
  393. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
  394. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
  395. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  396. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  397. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  398. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  399. package/api/@xmachines/play-vue/variables/schema.md +35 -54
  400. package/api/@xmachines/play-vue-router/README.md +4 -2
  401. package/api/@xmachines/play-vue-router/errors/classes/VueRouterNavigationError.md +4 -4
  402. package/api/@xmachines/play-vue-router/errors/classes/VueRouterSendError.md +4 -4
  403. package/api/@xmachines/play-vue-router/index/classes/RouteMap.md +5 -6
  404. package/api/@xmachines/play-vue-router/index/classes/VueRouterBridge.md +7 -7
  405. package/api/@xmachines/play-vue-router/index/interfaces/PlayRouteEvent.md +7 -7
  406. package/api/@xmachines/play-vue-router/index/interfaces/RoutableActor.md +4 -4
  407. package/api/@xmachines/play-vue-router/index/interfaces/RouteMapOptions.md +6 -6
  408. package/api/@xmachines/play-vue-router/index/interfaces/RouteMapping.md +3 -3
  409. package/api/@xmachines/play-vue-router/index/interfaces/RouterBridge.md +5 -5
  410. package/api/@xmachines/play-vue-router/index/variables/PlayRouterProvider.md +7 -7
  411. package/api/@xmachines/play-xstate/README.md +42 -24
  412. package/api/@xmachines/play-xstate/errors/classes/ActorThrewNonErrorError.md +4 -4
  413. package/api/@xmachines/play-xstate/errors/classes/InvalidEventError.md +5 -5
  414. package/api/@xmachines/play-xstate/errors/classes/InvalidMachineError.md +4 -4
  415. package/api/@xmachines/play-xstate/errors/classes/InvalidRouteHandlerError.md +5 -5
  416. package/api/@xmachines/play-xstate/errors/classes/InvalidRouteMetadataError.md +5 -5
  417. package/api/@xmachines/play-xstate/errors/classes/InvalidRouteParamError.md +14 -14
  418. package/api/@xmachines/play-xstate/errors/classes/MissingRouteParamError.md +6 -6
  419. package/api/@xmachines/play-xstate/errors/classes/MissingStateIdError.md +6 -6
  420. package/api/@xmachines/play-xstate/index/README.md +0 -4
  421. package/api/@xmachines/play-xstate/index/classes/PlayerActor.md +10 -45
  422. package/api/@xmachines/play-xstate/index/functions/compose.md +4 -4
  423. package/api/@xmachines/play-xstate/index/functions/definePlayer.md +2 -2
  424. package/api/@xmachines/play-xstate/index/interfaces/PlayerConfig.md +4 -4
  425. package/api/@xmachines/play-xstate/index/interfaces/PlayerFactoryResumeOptions.md +2 -2
  426. package/api/@xmachines/play-xstate/index/interfaces/PlayerOptions.md +7 -7
  427. package/api/@xmachines/play-xstate/index/type-aliases/Capability.md +1 -1
  428. package/api/@xmachines/play-xstate/index/type-aliases/PlayerConstructor.md +1 -1
  429. package/api/@xmachines/play-xstate/index/type-aliases/PlayerFactory.md +1 -1
  430. package/api/@xmachines/play-xstate/with-routing/functions/buildRouteUrl.md +1 -1
  431. package/api/@xmachines/play-xstate/with-routing/functions/deriveRoute.md +1 -1
  432. package/api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md +1 -1
  433. package/api/@xmachines/play-xstate/with-routing/functions/isAbsoluteRoute.md +1 -1
  434. package/api/@xmachines/play-xstate/with-routing/functions/withRouting.md +1 -1
  435. package/api/@xmachines/play-xstate/with-routing/interfaces/RouteContext.md +5 -5
  436. package/api/@xmachines/play-xstate/with-routing/interfaces/RouteObject.md +12 -15
  437. package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteData.md +1 -1
  438. package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteDataResolver.md +1 -1
  439. package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMachineConfig.md +4 -4
  440. package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMetadata.md +1 -1
  441. package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteStateNode.md +5 -5
  442. package/api/@xmachines/play-xstate/with-view/functions/withView.md +2 -4
  443. package/api/@xmachines/shared/vite-aliases/README.md +7 -0
  444. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +11 -5
  445. package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutput.md +37 -0
  446. package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutputFile.md +28 -0
  447. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  448. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  449. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  450. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  451. package/api/@xmachines/shared/vite-aliases/functions/xmTestTarget.md +26 -0
  452. package/api/@xmachines/shared/vite-aliases/type-aliases/XmTestTarget.md +15 -0
  453. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  454. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +5 -1
  455. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  456. package/api/README.md +1 -0
  457. package/api/llms.txt +9 -4
  458. package/contributing/architecture.md +54 -29
  459. package/contributing/configuration.md +44 -9
  460. package/contributing/development.md +28 -28
  461. package/contributing/migrating-to-play-atom.md +2 -1
  462. package/contributing/testing.md +33 -4
  463. package/examples/@xmachines/play-dom-demo/functions/createAuthActionHandlers.md +9 -9
  464. package/examples/@xmachines/play-dom-demo/functions/createConfirmDialog.md +1 -1
  465. package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
  466. package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
  467. package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
  468. package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
  469. package/examples/@xmachines/play-dom-demo/variables/Button.md +1 -1
  470. package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
  471. package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
  472. package/examples/@xmachines/play-dom-demo/variables/Field.md +1 -1
  473. package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
  474. package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
  475. package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
  476. package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
  477. package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
  478. package/examples/@xmachines/play-dom-demo/variables/Panel.md +1 -1
  479. package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
  480. package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
  481. package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
  482. package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
  483. package/examples/@xmachines/play-dom-demo/variables/demoComponents.md +15 -15
  484. package/examples/@xmachines/play-react-demo/functions/createAuthActionHandlers.md +9 -9
  485. package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
  486. package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
  487. package/examples/@xmachines/play-react-demo/variables/Button.md +1 -1
  488. package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
  489. package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
  490. package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
  491. package/examples/@xmachines/play-react-demo/variables/Field.md +1 -1
  492. package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
  493. package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
  494. package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
  495. package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
  496. package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
  497. package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
  498. package/examples/@xmachines/play-react-demo/variables/Panel.md +1 -1
  499. package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
  500. package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
  501. package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
  502. package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
  503. package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
  504. package/examples/@xmachines/play-react-demo/variables/demoComponents.md +15 -15
  505. package/examples/@xmachines/play-solid-demo/functions/createAuthActionHandlers.md +9 -9
  506. package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
  507. package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
  508. package/examples/@xmachines/play-solid-demo/variables/Button.md +1 -1
  509. package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
  510. package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
  511. package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
  512. package/examples/@xmachines/play-solid-demo/variables/Field.md +1 -1
  513. package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
  514. package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
  515. package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
  516. package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
  517. package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
  518. package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
  519. package/examples/@xmachines/play-solid-demo/variables/Panel.md +1 -1
  520. package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
  521. package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
  522. package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
  523. package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
  524. package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +190 -277
  525. package/examples/@xmachines/play-solid-demo/variables/demoComponents.md +17 -17
  526. package/examples/@xmachines/play-svelte-demo/functions/createAuthActionHandlers.md +9 -9
  527. package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
  528. package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +190 -277
  529. package/examples/@xmachines/play-svelte-demo/variables/demoComponents.md +15 -15
  530. package/examples/@xmachines/play-vue-demo/functions/createAuthActionHandlers.md +9 -9
  531. package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
  532. package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
  533. package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +190 -277
  534. package/examples/@xmachines/play-vue-demo/variables/demoComponents.md +1 -1
  535. package/examples/README.md +2 -2
  536. package/examples/multi-router-integration.md +1 -1
  537. package/examples/routing-patterns.md +1 -1
  538. package/examples/traffic-light.md +1 -1
  539. package/guides/README.md +5 -4
  540. package/guides/actor-model.md +4 -4
  541. package/guides/atoms.md +28 -16
  542. package/guides/getting-started.md +14 -16
  543. package/guides/inspector.md +1 -1
  544. package/guides/routing.md +41 -45
  545. package/guides/state-machines.md +69 -4
  546. package/guides/views.md +347 -0
  547. package/package.json +1 -1
  548. package/rfc/broker.md +4 -0
  549. package/rfc/browser.md +4 -0
  550. package/rfc/cli.md +4 -0
  551. package/rfc/git.md +4 -0
  552. package/rfc/mcp.md +4 -0
  553. package/rfc/node.md +4 -0
  554. package/rfc/play.md +25 -9
  555. package/rfc/rest.md +4 -0
  556. package/rfc/run.md +4 -0
  557. package/rfc/streams.md +4 -0
  558. package/api/@xmachines/play/index/functions/asCleanup.md +0 -77
  559. package/api/@xmachines/play/index/functions/shallowEqualExcept.md +0 -29
  560. package/api/@xmachines/play/index/type-aliases/Cleanup.md +0 -38
  561. package/api/@xmachines/play/index/type-aliases/DisposeKey.md +0 -32
  562. package/api/@xmachines/play/index/variables/DISPOSE.md +0 -34
  563. package/api/@xmachines/play-atom/type-aliases/Cleanup.md +0 -38
  564. package/api/@xmachines/play-dom/functions/asCleanup.md +0 -77
  565. package/api/@xmachines/play-dom/type-aliases/Cleanup.md +0 -38
  566. package/api/@xmachines/play-dom-router/functions/asCleanup.md +0 -77
  567. package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +0 -38
  568. package/api/@xmachines/play-dom-router/variables/DISPOSE.md +0 -34
  569. package/api/@xmachines/play-pattern/interfaces/PatternCache.md +0 -65
  570. package/api/@xmachines/play-router/index/interfaces/PatternCache.md +0 -65
  571. package/api/@xmachines/play-url/index/interfaces/PatternCache.md +0 -65
  572. package/api/@xmachines/play-xstate/index/variables/DISPOSE.md +0 -34
package/guides/atoms.md CHANGED
@@ -1,4 +1,4 @@
1
- # Understanding Atoms in XMachines
1
+ # Atoms in XMachines
2
2
 
3
3
  Atoms are the reactive substrate connecting actors to the outside world in XMachines. This page explains what they are, why XMachines uses them instead of observables or callbacks, and how the atom primitives map to distinct roles in the architecture.
4
4
 
@@ -121,6 +121,16 @@ const subscription = actor.currentRoute.subscribe((route) => {
121
121
  subscription.unsubscribe();
122
122
  ```
123
123
 
124
+ The subscription is a plain object. To hold it with `using`, publish it with `asDisposable` of [`@xmachines/core/utils`](../api/@xmachines/core/README.md), and name `unsubscribe` as the release:
125
+
126
+ ```typescript
127
+ {
128
+ const plain = actor.currentRoute.subscribe((route) => render(route));
129
+ using subscription = asDisposable(plain, () => plain.unsubscribe());
130
+ render(actor.currentRoute.get());
131
+ }
132
+ ```
133
+
124
134
  Two consequences follow from the synchronous delivery, and both matter:
125
135
 
126
136
  - Several writes in one tick call the observer several times. Nothing coalesces them.
@@ -157,9 +167,8 @@ Use [`watchAtom()`](../api/@xmachines/play-atom/functions/watchAtom.md) in frame
157
167
 
158
168
  ## The release, and `using`
159
169
 
160
- `watchAtom()` returns a `Cleanup` from [`@xmachines/play`](../api/@xmachines/play/README.md): a
161
- function, and a `Disposable`. One value therefore serves two forms, and the same holds for
162
- the mount of [`@xmachines/play-dom`](../api/@xmachines/play-dom/README.md) and for `history.subscribe()` of
170
+ `watchAtom()` returns a plain function. The same holds for the mount of
171
+ [`@xmachines/play-dom`](../api/@xmachines/play-dom/README.md) and for `history.subscribe()` of
163
172
  [`@xmachines/play-dom-router`](../api/@xmachines/play-dom-router/README.md).
164
173
 
165
174
  Keep the explicit call where the release outlives the scope that made it — a field that a
@@ -170,12 +179,15 @@ const stop = watchAtom(actor.currentRoute, render);
170
179
  onUnmount(() => stop());
171
180
  ```
172
181
 
173
- Write `using` where the release belongs to one scope. The scope releases it, an exception
174
- releases it too, and the code carries no teardown:
182
+ Where the release belongs to one scope, publish it with `asDisposable` of
183
+ [`@xmachines/core/utils`](../api/@xmachines/core/README.md), and write `using`. The scope releases
184
+ it, an exception releases it too, and the code carries no teardown:
175
185
 
176
186
  ```typescript
187
+ import { asDisposable } from "@xmachines/core/utils";
188
+
177
189
  {
178
- using stop = watchAtom(actor.currentRoute, render);
190
+ using stop = asDisposable(watchAtom(actor.currentRoute, render));
179
191
  render(actor.currentRoute.get());
180
192
  // stop() runs here, and it runs even when render() throws
181
193
  }
@@ -184,17 +196,17 @@ releases it too, and the code carries no teardown:
184
196
  A scope releases from the last declaration to the first, so a release that depends on an
185
197
  earlier one is safe.
186
198
 
187
- Every release here is synchronous, so `Cleanup` is a `Disposable` and not an
199
+ Every release here is synchronous, so `asDisposable` makes a `Disposable` and not an
188
200
  `AsyncDisposable`. That is the permissive choice: a `Disposable` serves `using` AND
189
201
  `await using`, while an `AsyncDisposable` raises a TypeError under a plain `using` and
190
- forces every holder into an async function. `asCleanup` therefore refuses a release that
191
- returns a value, and a promise above all — a promise handed to it would go on the floor,
192
- released and unawaitable.
202
+ forces every holder into an async function. `asDisposable` therefore refuses a release that
203
+ returns a value, a promise above all: the scope would ignore the promise, and nothing could
204
+ await the work.
193
205
 
194
206
  `using` needs Node 24 or a browser with Explicit Resource Management. The publishable
195
207
  packages build at `target: "esnext"` and pass the syntax through untouched, so your bundler
196
- decides how to emit it. The `Cleanup` VALUE needs neither: a runtime without
197
- `Symbol.dispose` still calls it as a plain function.
208
+ decides how to emit it. A caller that does not write `using` needs neither, and it needs no
209
+ [`@xmachines/core/utils`](../api/@xmachines/core/README.md).
198
210
 
199
211
  ---
200
212
 
@@ -202,7 +214,7 @@ decides how to emit it. The `Cleanup` VALUE needs neither: a runtime without
202
214
 
203
215
  `@xstate/store` holds the active subscriber in a variable of its own module. Two copies in one application build two separate graphs: a computed atom of the first copy and a subscription of the second copy never meet, the subscriber stays silent, and no error reports the fault. Every propagation of state in this architecture goes through an atom, so the second copy stops the whole reactivity of an application.
204
216
 
205
- [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) therefore declares `@xstate/store` as a **peer** dependency. A renderer declares it no more, because it reads the atom through [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) and names the engine in no import. Install one copy, and install it yourself. `tests/singleton-peers.test.ts` holds the rule true inside this workspace.
217
+ [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) therefore declares `@xstate/store` as a **peer** dependency. A renderer does not declare it, because it reads the atom through [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) and names the engine in no import. Install one copy, and install it yourself. `tests/singleton-peers.test.ts` holds the rule true inside this workspace.
206
218
 
207
219
  ---
208
220
 
@@ -256,8 +268,8 @@ Failing to clean up subscriptions causes memory leaks and stale callbacks firing
256
268
 
257
269
  ## See also
258
270
 
259
- - [Understanding the Actor Model](actor-model.md) — why the actor owns all atom writes
260
- - [Understanding State Machines](state-machines.md) — how state nodes produce the metadata that atoms derive
271
+ - [The Actor Model](actor-model.md) — why the actor owns all atom writes
272
+ - [State Machines](state-machines.md) — how state nodes produce the metadata that atoms derive
261
273
  - [Getting Started](getting-started.md) — hands-on walkthrough using atoms to observe an actor
262
274
  - [@xmachines/play-atom](../api/@xmachines/play-atom/README.md) — API reference
263
275
  - [Play RFC](../rfc/play.md) — architectural specification
@@ -151,19 +151,21 @@ All packages are ES modules (`"type": "module"`). Use `.js` extensions in all Ty
151
151
 
152
152
  #### Step 1: Install the core packages
153
153
 
154
- Every XMachines application needs these four packages plus XState:
154
+ Every XMachines application needs these six packages plus XState:
155
155
 
156
156
  ```bash
157
- pnpm add xstate @xmachines/play-xstate @xmachines/play-actor @xmachines/play-atom @xmachines/json-render-core
157
+ pnpm add xstate @xmachines/play-xstate @xmachines/play-actor @xmachines/play-atom @xmachines/play @xmachines/core @xmachines/json-render-core
158
158
  ```
159
159
 
160
- | Package | Role |
161
- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
162
- | `xstate` | XState v5 state machine engine (peer dependency) |
163
- | [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) | [`definePlayer()`](../api/@xmachines/play-xstate/index/functions/definePlayer.md), [`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md), routing helpers |
164
- | [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md) | The actor contract: `PlayActor`, which names no state machine library |
165
- | [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) | The atom primitives (`createAtom`, [`watchAtom`](../api/@xmachines/play-atom/functions/watchAtom.md)) |
166
- | `@xmachines/json-render-core` | Spec and store types the actor layer builds on — a peer of [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md), and of every renderer package |
160
+ | Package | Role |
161
+ | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
162
+ | `xstate` | XState v5 state machine engine (peer dependency) |
163
+ | [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) | [`definePlayer()`](../api/@xmachines/play-xstate/index/functions/definePlayer.md), [`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md), routing helpers |
164
+ | [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md) | The actor contract: `PlayActor`, which names no state machine library |
165
+ | [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) | The atom primitives (`createAtom`, [`watchAtom`](../api/@xmachines/play-atom/functions/watchAtom.md)) |
166
+ | [`@xmachines/play`](../api/@xmachines/play/README.md) | The protocol: `PlayEvent`, and `PlayError` on its `errors` subpath — a peer of every package that reads it |
167
+ | [`@xmachines/core`](../api/@xmachines/core/README.md) | `BaseError`, the release protocol, and the cache — a peer of [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md), [`@xmachines/play-view`](../api/@xmachines/play-view/README.md), and [`@xmachines/play-router`](../api/@xmachines/play-router/README.md) |
168
+ | `@xmachines/json-render-core` | The spec type that `PlaySpec` extends — a peer of [`@xmachines/play-view`](../api/@xmachines/play-view/README.md), and of every renderer package |
167
169
 
168
170
  #### Step 2: Install a router adapter (pick one)
169
171
 
@@ -277,7 +279,7 @@ const stop = watchAtom(actor.state, (snapshot) => {
277
279
 
278
280
  actor.send({ type: "toggle" }); // the callback runs from a microtask
279
281
 
280
- stop(); // release it, or write `using stop = watchAtom(...)`
282
+ stop(); // release it, or write `using stop = asDisposable(watchAtom(...))`
281
283
  ```
282
284
 
283
285
  Three rules cover every use of them:
@@ -294,7 +296,7 @@ A renderer needs none of this: [`@xmachines/play-react`](../api/@xmachines/play-
294
296
  and the other renderers observe `currentView` for you. Reach for `watchAtom` when you
295
297
  write infrastructure, or a debug panel beside the UI.
296
298
 
297
- [Understanding Atoms](atoms.md) states the whole model.
299
+ [Atoms](atoms.md) states the whole model.
298
300
 
299
301
  ---
300
302
 
@@ -667,11 +669,6 @@ on: {
667
669
  }
668
670
  ```
669
671
 
670
- (Older releases threw `MissingQueryContextError` at construction for a
671
- routing-aware context without a `query` field. That class is gone: the generated
672
- `play.route` transitions assign `query` on every navigation, so the loss it
673
- guarded against cannot happen.)
674
-
675
672
  #### Missing `id` on routable states
676
673
 
677
674
  **Error:** `MissingStateIdError: State "home" has meta.route "/" but no id`.
@@ -749,6 +746,7 @@ node --version
749
746
 
750
747
  ## Next Steps
751
748
 
749
+ - **[Views](views.md)** — Which state supplies the view, the `/context` projection, and when a renderer keeps the UI
752
750
  - **[Inspecting a Running Actor](inspector.md)** — Attaching the Stately inspector to see the machine, its transitions, and its context live
753
751
  - **[Architecture](../contributing/architecture.md)** — System design, layers, invariants, and data flow
754
752
  - **[Play RFC](../rfc/play.md)** — Complete architectural specification
@@ -192,6 +192,6 @@ const createPlayer = definePlayer({ machine: appMachine, options });
192
192
 
193
193
  - **[`PlayerOptions`](../api/@xmachines/play-xstate/index/interfaces/PlayerOptions.md)** — the full options bag, `inspect` included
194
194
  - **[`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md)** — the actor an inspector observes
195
- - **[Understanding the Actor Model](actor-model.md)** — why the actor is the actor, and what that buys
195
+ - **[The Actor Model](actor-model.md)** — why the actor is the actor, and what that buys
196
196
  - **[Getting Started](getting-started.md)** — installing packages and creating your first actor
197
197
  - **[Stately inspect docs](https://stately.ai/docs/inspector)** — the inspector itself, its transports and options
package/guides/routing.md CHANGED
@@ -1,8 +1,8 @@
1
- # Understanding Routing in XMachines
1
+ # Routing in XMachines
2
2
 
3
3
  A route of XMachines is a fact about a STATE, and not a fact about a component tree. A state node declares `meta.route`, and the library carries that declaration in both directions: a URL becomes a state, and a state becomes a URL.
4
4
 
5
- This guide states the pattern language one time, and it names the three rules that every one of the nine router adapters follows.
5
+ This guide states the pattern language one time, it tells when a navigation re-enters a state, and it names the three rules that every one of the nine router adapters follows.
6
6
 
7
7
  After you read it, you know which patterns a route can declare, which side resolves a location, and why a bridge comes in a `connect()` and `disconnect()` pair.
8
8
 
@@ -19,13 +19,13 @@ The first direction needs a matcher, and every router writes its own. Express us
19
19
 
20
20
  `URLPattern` is the WHATWG standard for this, its syntax comes from `path-to-regexp`, and it is a superset of it. XMachines takes it as the pattern language, and it reads the whole of it.
21
21
 
22
- This is the same decision that [`@xmachines/play-atom`](atoms.md) makes for reactivity: one primitive, isolated behind one module, present on every runtime. There is no `AtomsUnavailableError`, because one package holds the reactive primitive and every consumer reads it from there, and there is no URLPattern availability error for the same reason.
22
+ [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) makes the same decision for reactivity: one primitive, isolated behind one module, present on every runtime. The [Atoms](atoms.md) guide describes it.
23
23
 
24
24
  ### The API is always present
25
25
 
26
- [`@xmachines/play-router`](../api/@xmachines/play-router/README.md) carries [`urlpattern-polyfill`](https://github.com/kenchris/urlpattern-polyfill) as an ordinary dependency. It uses the native `URLPattern` when the runtime has one, and the polyfill when it does not. **Install nothing, and load nothing.**
26
+ [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) carries [`urlpattern-polyfill`](https://github.com/kenchris/urlpattern-polyfill) as an ordinary dependency. It uses the native `URLPattern` when the runtime has one, and the polyfill when it does not. **Install nothing, and load nothing.**
27
27
 
28
- The native API arrived in Chrome 95, in Firefox 142 and in Safari 26. The browser floor of this workspace is Chrome 110, Firefox 115 and Safari 16.4. Chrome carries the API at that floor, and Firefox and Safari carry it far above it, so a Firefox or a Safari at the floor runs the polyfill. `test/url-pattern-parity.test.ts` measures the two implementations against each other, form by form. They agree on every form of the grammar, and they disagree about one shape that no bridge can produce — see the prefix rule below.
28
+ The native API arrived in Chrome 95, in Firefox 142 and in Safari 26. The browser floor of XMachines is Chrome 110, Firefox 115 and Safari 16.4. Chrome carries the API at that floor, and Firefox and Safari carry it far above it, so a Firefox or a Safari at the floor runs the polyfill. The test suite of [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) measures the two implementations against each other, form by form. They agree on every form of the grammar, and they disagree about one shape that no bridge can produce — see the prefix rule below.
29
29
 
30
30
  The cost is 18 kB, minified and with no dependency of its own, and a consumer whose runtime has the native API pays it too. A conditional load would save those bytes and it would make the module asynchronous: `RouteMap` compiles in its constructor, and a navigation matches inside an event handler. Neither can await.
31
31
 
@@ -116,12 +116,6 @@ The build resolves every escape, so the derived path carries the character and n
116
116
  backslash that protects it. `/tags/c\+\+` derives `/tags/c++`, which is the path that the
117
117
  route matches.
118
118
 
119
- **An escaped `:` is the one escape that stops at the bridge.** The build derives
120
- `/time/10:30` for `/time/10\:30`, and the route matches that path — but a bridge refuses
121
- to push a path that holds a `:`, because a `:` in a CONCRETE path marks a param that
122
- nothing substituted. `resolveNavigationPath` therefore answers `null`, and the address bar
123
- follows that state never. Write `%3A` instead, as the section below prescribes.
124
-
125
119
  ### A literal that the grammar would read
126
120
 
127
121
  `:`, `+`, `?`, `(` and `{` are characters of the grammar, so a route that writes one of them raw does not mean the literal. The two halves fail differently.
@@ -148,25 +142,7 @@ This rule is about the PATTERN that a state declares. A param VALUE needs no esc
148
142
 
149
143
  `encodeURIComponent` leaves `*` as it stands, and that is the one exception. A bridge refuses a path that still holds a `:` or a `*`, because such a character marks a param that nothing substituted. A value of `a*b` therefore stops the push, and the URL stays where it is.
150
144
 
151
- **This is a change of behaviour, and a route of yours can hold one of these characters today.** An earlier release read a route as a pattern only when the route held a `:` or a `*`. `/tags/c++`, `/docs/rfc(2119)` and `/i18n/{en}` therefore went to the exact-match map, and each one matched the path that its author wrote. The route map reads the whole grammar now. `/tags/c++` throws `InvalidRoutePatternError` in the constructor of `RouteMap`, and the other two compile and match another path in silence. Add the escape to each route that writes one of these characters raw.
152
-
153
- A route that carries a QUERY STRING is the same case, and it is the form a machine writes most often. `meta: { route: "/dates?trip=one-way" }` reached the exact-match map before, and the bridge pushed it to the address bar with its query. The grammar reads that `?` as a modifier that follows no part, so `RouteMap` throws `InvalidRoutePatternError` in its constructor now and the application starts never. A route declares a PATHNAME: put the default in `context.query`, which the generated `play.route` transition assigns and `buildRouteUrl` writes to the URL.
154
-
155
- ### Upgrading from 3.x: the `reenter` default changed
156
-
157
- An earlier release wrote `reenter: true` on every transition that `formatPlayRouteTransitions` generated, so every routed state re-entered its own domain on each navigation and ran its `entry` actions again. The flag now comes from `meta.route`, and the default is `false`, which is the default of XState.
158
-
159
- **Nothing throws, and the `entry` action simply stops running.** A state that needs it declares the flag for itself:
160
-
161
- ```ts
162
- states: {
163
- dashboard: { meta: { route: { path: "/dashboard", reenter: true } } },
164
- },
165
- ```
166
-
167
- `reenter` spares the DOMAIN of the transition and not every ancestor that stays active. Under the default `handler: "root"` the domain is the root of the machine, so `false` spares the root alone and each ancestor between the root and the target still runs its `exit` and `entry` actions. `handler: "local"` and `handler: "both"` move the domain down to the parent, which is the field that spares those intermediate ancestors.
168
-
169
- CAUTION: `"local"` also SCOPES the route. The generated transition then sits on the parent alone, so a `play.route` event that arrives while the parent is inactive matches nothing and the actor does not move — a deep link or a press on BACK therefore leaves the URL and the actor divergent. Choose `"local"` where that scope is the intent, such as a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere.
145
+ A route that carries a QUERY STRING is the same case as a raw `?`, and it is the form a machine writes most often. The grammar reads the `?` of `meta: { route: "/dates?trip=one-way" }` as a modifier that follows no part, so `RouteMap` throws `InvalidRoutePatternError` in its constructor and the application starts never. A route declares a PATHNAME: put the default in `context.query`, which the generated `play.route` transition assigns and `buildRouteUrl` writes to the URL.
170
146
 
171
147
  ### The prefix rule
172
148
 
@@ -196,6 +172,28 @@ The cost is that you cannot write URLPattern's own reading of `:cat-id`. Use `:c
196
172
 
197
173
  ---
198
174
 
175
+ ## Re-entry on a navigation
176
+
177
+ `formatPlayRouteTransitions` reads the `reenter` flag of each transition from `meta.route`. The default is `false`, which is the default of XState.
178
+
179
+ The flag decides one thing: whether the DOMAIN of the transition runs its `exit` and `entry` actions again. Under the default `handler: "root"` the domain is the root of the machine. `"local"` and `"both"` put a transition on the parent, and while the parent is active that transition answers the event, so the domain is the parent.
180
+
181
+ Each state below the domain on the path to the target runs its `exit` and `entry` actions on each navigation, whatever the flag says. The target itself is one of them, unless the route targets the root of the machine: the root is then the domain, and the flag decides. Under `"root"`, `false` therefore spares the root alone, and each ancestor between the root and the target runs its actions again. `handler` is the field that spares those intermediate ancestors.
182
+
183
+ CAUTION: a parallel state loses the position of its other regions when it is the domain or a state below the domain. XState exits each active state below the domain, and not only the states on the path to the target. Each other region therefore enters its `initial` state again. A parallel root under `handler: "root"` is such a domain. With `reenter: true`, a `"local"` or `"both"` transition also exits the parent. Where the parent is a region of a parallel state, the other regions of that state enter their `initial` state again too.
184
+
185
+ A state whose navigation must re-enter the domain too declares the flag for itself. Here the root runs its `exit` and `entry` actions on each navigation to `dashboard`:
186
+
187
+ ```ts
188
+ states: {
189
+ dashboard: { meta: { route: { path: "/dashboard", reenter: true } } },
190
+ },
191
+ ```
192
+
193
+ CAUTION: `"local"` also SCOPES the route. The generated transition then sits on the parent alone, so a `play.route` event that arrives while the parent is inactive matches nothing and the actor does not move — a deep link or a press on BACK therefore leaves the URL and the actor divergent. Choose `"local"` where that scope is the intent, such as a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere.
194
+
195
+ ---
196
+
199
197
  ## The routing invariants
200
198
 
201
199
  ### 1. XMachines resolves the state id. The router never does
@@ -234,31 +232,29 @@ A bridge installs an atom subscription on the actor and a subscription on the ro
234
232
 
235
233
  ---
236
234
 
237
- ## Why not a matcher of our own
238
-
239
- The 2.2.0 review asked whether a hand-written segment matcher could drop the `URLPattern` requirement. The answer is no, and the reason is not the size of the code.
235
+ ## Why not a smaller matcher
240
236
 
241
- A pattern language has to carry the largest set of features that the nine target routers can express, and not the subset that this repository happens to use today. A count of the patterns HERE — 85 of 88 are a literal plus `:name` — measures our own habits, and it is the wrong basis for the decision. `URLPattern` is the most expressive engine available, and a matcher of our own would carry less.
237
+ A matcher that reads only a literal and `:name` covers most routes. It carries fewer features than the routers that XMachines supports, which is the problem that [the first section](#what-problem-urlpattern-solves) describes.
242
238
 
243
- Two matchers that disagree is also a worse failure than one dependency. The match and the extraction of the params would then read the same pattern differently, and a route would resolve while its params came back empty.
239
+ One engine also keeps the match and the params in agreement. With two matchers, a route could resolve while its params came back empty.
244
240
 
245
241
  ---
246
242
 
247
243
  ## Summary
248
244
 
249
- | Question | Answer |
250
- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
251
- | What is the pattern language? | The `URLPattern` pathname grammar, plus hyphenated param names |
252
- | Do I install a polyfill? | No. [`@xmachines/play-router`](../api/@xmachines/play-router/README.md) carries one |
253
- | Which side turns a URL into a state? | XMachines, in every adapter |
254
- | Which side turns a state into a URL? | XMachines, with no URLPattern at all |
255
- | When does the framework parse the params? | Vue Router and SolidJS Router, when the parse covers every name |
256
- | Who releases the bridge? | You, through `disconnect()` in the teardown of your component |
245
+ | Question | Answer |
246
+ | ----------------------------------------- | ----------------------------------------------------------------------------- |
247
+ | What is the pattern language? | The `URLPattern` pathname grammar, plus hyphenated param names |
248
+ | Do I install a polyfill? | No. [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) carries one |
249
+ | Which side turns a URL into a state? | XMachines, in every adapter |
250
+ | Which side turns a state into a URL? | XMachines, with no URLPattern at all |
251
+ | When does the framework parse the params? | Vue Router and SolidJS Router, when the parse covers every name |
252
+ | Who releases the bridge? | You, through `disconnect()` in the teardown of your component |
257
253
 
258
254
  ## See also
259
255
 
260
- - [Understanding State Machines](state-machines.md) — how `meta.route` reaches the route map
261
- - [Understanding Atoms](atoms.md) — the same decision, made for reactivity
256
+ - [State Machines](state-machines.md) — how `meta.route` reaches the route map
257
+ - [Atoms](atoms.md) — the same decision, made for reactivity
262
258
  - [Multi-router integration](../examples/multi-router-integration.md) — the provider pattern and `basePath`, end to end
263
259
  - [Routing patterns](../examples/routing-patterns.md) — worked route maps
264
260
  - [@xmachines/play-router](../api/@xmachines/play-router/README.md) — API reference
@@ -1,4 +1,4 @@
1
- # Understanding State Machines in XMachines
1
+ # State Machines in XMachines
2
2
 
3
3
  XMachines uses XState v5 as its state machine engine. This page explains what finite state machines are, how XMachines extends them with routing and view metadata, and why this design eliminates an entire category of bugs common in traditional frontend architecture.
4
4
 
@@ -122,12 +122,76 @@ const appMachine = setup({/* ... */}).createMachine({
122
122
 
123
123
  `meta.route` is a string path. When the machine enters a state, `actor.currentRoute` (a `ReadonlyAtom`) derives this path and emits it. The router bridge reads it and updates the URL.
124
124
 
125
- `meta.view` is a [`PlaySpec`](../api/@xmachines/play-view/index/interfaces/PlaySpec.md) — a `@xmachines/json-render-core` spec object describing what to render. Use `typedSpec(...)` from [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md) to type-check the spec literal at the definition site (XState's `meta` is untyped). When the machine enters a state, `actor.currentView` is updated with the derived spec. The renderer reads it and projects it through framework components.
125
+ `meta.view` is a [`ViewMeta`](../api/@xmachines/play-view/index/interfaces/ViewMeta.md) — a `@xmachines/json-render-core` spec object describing what to render. The actor derives a [`PlaySpec`](../api/@xmachines/play-view/index/interfaces/PlaySpec.md) from it, and that derived spec is what a renderer receives. Use `typedSpec(...)` from [`@xmachines/play-view`](../api/@xmachines/play-view/README.md) to type-check the spec literal at the definition site (XState's `meta` is untyped). When the machine enters a state, `actor.currentView` is updated with the derived spec. The renderer reads it and projects it through framework components.
126
126
 
127
127
  The machine's whole context is available to every view through the **`/context` projection**: the derived spec's `state` carries `context: <machine context>`. Specs read it with ordinary state expressions — `{ $state: "/context/username" }` in props, `visible` conditions, or `repeat.statePath`. The subtree is **read-only**: context changes only through machine events, and a `$bindState`/`setState` write under `/context` throws. URL data lives at its own paths (`/context/params/…`, `/context/query/…`, written into context by `formatPlayRouteTransitions`), so a URL param can never shadow a machine-owned field. When validating specs with tools like `validateSpec`, validate the **derived** view (`actor.currentView.get()`) — its `state` honestly describes the store contents — not the raw `meta.view`. A context change re-emits the view with the same `viewKey`; providers respond by refreshing `/context` in the live store, not by remounting the UI.
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
+ ### A layout and its pages: `outlets`
132
+
133
+ Without outlets, the deepest active state that declares a view wins, and a view on a parent state stays off the screen. Declare `outlets` in the view of the parent to show the parent view AND the view of its active child. Each outlet names an element of the parent view, and the view of the child goes into that element:
134
+
135
+ ```typescript
136
+ const shell = typedSpec({
137
+ root: "shell",
138
+ state: { collapsed: false },
139
+ elements: {
140
+ shell: { type: "Shell", props: {}, children: ["title"], slots: { sidebar: [] } },
141
+ title: { type: "Heading", props: { text: "App" }, children: [] },
142
+ },
143
+ outlets: {
144
+ menu: { element: "shell", slot: "sidebar" }, // the region "menu"
145
+ "*": { element: "shell" }, // every other child
146
+ },
147
+ });
148
+
149
+ const appMachine = setup({/* ... */}).createMachine({
150
+ id: "app",
151
+ type: "parallel",
152
+ meta: { view: shell },
153
+ states: {
154
+ menu: { initial: "open", states: { open: { meta: { view: menuView } } } },
155
+ page: {
156
+ initial: "home",
157
+ states: {
158
+ home: { meta: { route: "/", view: homeView } },
159
+ search: { meta: { route: "/search", view: searchView } },
160
+ },
161
+ },
162
+ },
163
+ });
164
+ ```
165
+
166
+ - **The key of an outlet** is the key of a child state in `states`, or `"*"` for each active child that has no outlet of its own. A child with neither stays off the screen.
167
+ - **A compound state** fills one outlet with its active child. **A parallel state** fills one outlet for each region, in the order of `states`.
168
+ - **`slot`** names a named slot of the element. Omit it to append the child view to the `children` of the element. The component of the element renders the slot, as the renderer of your framework describes.
169
+ - **The view of a child** is the deepest view in its active subtree, and a child view can declare `outlets` of its own for a nested layout. A parallel state without outlets shows the region of the URL when that region has a view, and its first region that has a view otherwise.
170
+
171
+ The derived spec holds the elements of every composed view. The keys of the outer view stay as you wrote them, and each key of a child view gets the id of its state as a prefix, for example `app.page.search/root`, so two views never collide.
172
+
173
+ The `viewKey` of a composed view is the id of the outermost state that declares `outlets`. A change of the page therefore keeps the store of the layout: the `collapsed` value in the example above does not change. The first time that a page shows, the provider writes the keys of its authored `state` that the store does not hold. A page that comes back finds the values that it left. All the pages of one layout share one store, so two pages that declare the same key share one value: give each page its own keys. When two composed views declare the same state key, the outer view wins, and the library writes a warning.
174
+
175
+ An outlet that names an element that its view does not hold throws `InvalidViewOutletError`. The actor reports it through its `onError` option, and it keeps the last good view.
176
+
177
+ **`handler` decides whether the layout survives a navigation.** Under the default `handler: "root"`, a navigation exits and enters every active state below the root, and a parallel state then puts its other regions back in their `initial` state. Declare `handler: "local"` or `"both"` on a routed state inside a region, as [Re-entry on a navigation](routing.md#re-entry-on-a-navigation) describes.
178
+
179
+ **The URL comes from the routed region.** In a parallel machine, the URL comes from the first region whose active states declare a `meta.route`, so the `menu` region can come before the `page` region. Keep the routes of one layout in one region. The URL shows the route of the first routed region only, so a navigation to a route of a second routed region never shows in the address bar.
180
+
181
+ CAUTION: a second routed region moves without its URL. Take a `page` region with `/` and `/search`, and a `drawer` region after it with `/drawer` and `/drawer/settings`:
182
+
183
+ | Step | `page` | `drawer` | URL |
184
+ | --------------------------- | -------- | ---------- | --------- |
185
+ | start | `home` | `closed` | `/` |
186
+ | a navigation to `#settings` | `home` | `settings` | `/` |
187
+ | a navigation to `#search` | `search` | `closed` | `/search` |
188
+
189
+ - The navigation to `#settings` moves the drawer, and the URL stays `/`. The browser adds no history entry, BACK does not close the drawer, and a reload or a shared link loses the drawer.
190
+ - A deep link to `/drawer/settings` moves the drawer too, but the actor derives the URL `/` from the `page` region, so the address bar does not keep the path of the drawer.
191
+ - The navigation to `#search` puts the drawer back to `closed`, because the default `handler: "root"` exits and enters every region. `handler: "local"` keeps it.
192
+
193
+ A URL path has one hierarchy, and it cannot hold the branches of two regions. Keep the other regions unrouted. When the position of such a region must survive a reload or a shared link, write it as a query value of the routed region, for example `/search?drawer=settings`. The generated `play.route` transition assigns the query to `context.query`, the URL carries `context.query`, and your machine moves the region to match the value.
194
+
131
195
  ---
132
196
 
133
197
  ## [`formatPlayRouteTransitions`](../api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md) — automatic route event wiring
@@ -276,9 +340,10 @@ actor.start();
276
340
 
277
341
  ## See also
278
342
 
279
- - [Understanding the Actor Model](actor-model.md) — how the machine definition becomes a live actor
280
- - [Understanding Atoms](atoms.md) — how the actor's state is observed by infrastructure
343
+ - [The Actor Model](actor-model.md) — how the machine definition becomes a live actor
344
+ - [Atoms](atoms.md) — how the actor's state is observed by infrastructure
281
345
  - [Getting Started](getting-started.md) — step-by-step walkthrough building your first machine and actor
346
+ - [Views](views.md) — which state supplies the view, how a layout holds its pages, and when a renderer keeps the UI
282
347
  - [Routing Patterns](../examples/routing-patterns.md) — worked examples of `meta.route` and guards
283
348
  - [@xmachines/play-xstate](../api/@xmachines/play-xstate/README.md) — full API reference for [`definePlayer`](../api/@xmachines/play-xstate/index/functions/definePlayer.md), [`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md), and the routing utilities
284
349
  - [XState v5 documentation](https://stately.ai/docs/xstate) — upstream state machine library documentation