@xmachines/docs 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +11 -13
  2. package/api/@xmachines/play/README.md +58 -63
  3. package/api/@xmachines/play/classes/NonNullableError.md +7 -7
  4. package/api/@xmachines/play/classes/PlayError.md +25 -27
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
  7. package/api/@xmachines/play-actor/README.md +72 -63
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
  18. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
  19. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
  20. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
  27. package/api/@xmachines/play-dom/README.md +119 -85
  28. package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
  29. package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
  30. package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
  31. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
  32. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  33. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
  34. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  35. package/api/@xmachines/play-dom-router/README.md +66 -49
  36. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  37. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  38. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  39. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  40. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  41. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  42. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
  43. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  44. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
  45. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  46. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  47. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  48. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  49. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  50. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  51. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  52. package/api/@xmachines/play-react/README.md +63 -54
  53. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  54. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  55. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  56. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  57. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  58. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  59. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
  60. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  61. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  62. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  63. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  64. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  65. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  66. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  67. package/api/@xmachines/play-react-router/README.md +37 -28
  68. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  69. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  70. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  71. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  72. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  73. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  74. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
  75. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  76. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  77. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  78. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  79. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  80. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  81. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  82. package/api/@xmachines/play-router/README.md +94 -82
  83. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  84. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  85. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  86. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  87. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  88. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  89. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  90. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  91. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  92. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  93. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  94. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  95. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  96. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  97. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  98. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  99. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  100. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  101. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  102. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  103. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  104. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  105. package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
  106. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
  107. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  108. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  109. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
  110. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  111. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  112. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  113. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  114. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  115. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  116. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  117. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  118. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  119. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  120. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  121. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  122. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  123. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  124. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  125. package/api/@xmachines/play-signals/README.md +38 -36
  126. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  127. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  128. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  129. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  130. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  131. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  132. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  133. package/api/@xmachines/play-solid/README.md +46 -42
  134. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  135. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  136. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  137. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  138. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  139. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  140. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  141. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  142. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  143. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  144. package/api/@xmachines/play-solid-router/README.md +34 -29
  145. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  146. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  147. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  148. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  149. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
  150. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  151. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
  152. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  153. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  154. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  155. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  156. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  157. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  158. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  159. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  160. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  161. package/api/@xmachines/play-svelte/README.md +40 -31
  162. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  163. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  164. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  165. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  166. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  167. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  168. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  169. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  170. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  171. package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
  172. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  173. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  174. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  175. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  176. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  177. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
  178. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  179. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  180. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  181. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  182. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  183. package/api/@xmachines/play-sveltekit-router/README.md +38 -34
  184. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  186. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  189. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
  190. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
  191. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  192. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  193. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  194. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
  196. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  198. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  199. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  201. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  202. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  203. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
  204. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  205. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  206. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  207. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  208. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  209. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  210. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  211. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  212. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  213. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  214. package/api/@xmachines/play-tanstack-router/README.md +37 -17
  215. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  216. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  217. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  218. package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
  219. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  220. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  221. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  222. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  223. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  224. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
  225. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  226. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  227. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  228. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  229. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  230. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  231. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  232. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  233. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  235. package/api/@xmachines/play-vue/README.md +37 -35
  236. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  237. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  238. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  239. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  240. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  241. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  242. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  243. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  244. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  245. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  246. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  247. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  248. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  249. package/api/@xmachines/play-vue-router/README.md +65 -56
  250. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  251. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  252. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  253. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  254. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
  255. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  256. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  257. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  258. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  259. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  260. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  261. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  262. package/api/@xmachines/play-xstate/README.md +72 -70
  263. package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
  264. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
  265. package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
  266. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
  267. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
  268. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  269. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  270. package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
  271. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
  272. package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
  273. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  274. package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
  275. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  276. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  277. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
  278. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  279. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  280. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
  281. package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
  282. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
  283. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
  284. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
  285. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  286. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
  287. package/api/@xmachines/shared/README.md +11 -13
  288. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  289. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  290. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  291. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  292. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  293. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  294. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  295. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  296. package/contributing/development.md +28 -0
  297. package/guides/inspector.md +1 -1
  298. package/package.json +1 -1
  299. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
@@ -2,11 +2,9 @@
2
2
 
3
3
  # @xmachines/play-signals
4
4
 
5
- TC39 Signals polyfill for XMachines fine-grained reactive state primitives that enable glitch-free, subscription-free state propagation in the Play Architecture.
5
+ TC39 Signals polyfill for XMachines. It gives the Play Architecture fine-grained reactive state primitives. The primitives propagate state without a glitch and without a subscription.
6
6
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-signals)
8
-
9
- Part of the [xmachines-js monorepo](../../README.md).
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.1.0-blue)](https://www.npmjs.com/package/@xmachines/play-signals)
10
8
 
11
9
  ## Installation
12
10
 
@@ -16,9 +14,9 @@ pnpm add @xmachines/play-signals
16
14
 
17
15
  ## Overview
18
16
 
19
- This package wraps the [`signal-polyfill`](https://github.com/nicolo-ribaudo/tc39-proposal-signals-polyfill) reference implementation of the [TC39 Signals proposal](https://github.com/tc39/proposal-signals) (Stage 1). It re-exports the full `Signal` namespace and adds a memory-safe `watchSignal` utility, isolating the rest of the codebase from potential Stage 1 API churn.
17
+ This package wraps the [`signal-polyfill`](https://github.com/nicolo-ribaudo/tc39-proposal-signals-polyfill) reference implementation of the [TC39 Signals proposal](https://github.com/tc39/proposal-signals) (Stage 1). It re-exports the complete `Signal` namespace, and it adds the memory-safe `watchSignal` utility. The wrapper keeps the rest of the code away from a Stage 1 API that can still change.
20
18
 
21
- **All signal imports in the XMachines ecosystem should come from this package**, not directly from `signal-polyfill`, so that polyfill version bumps or API adaptations can be made in one place.
19
+ **Import every signal in the XMachines ecosystem from this package**, not from `signal-polyfill`. One import point keeps each polyfill update and each API change in one place.
22
20
 
23
21
  ## Usage
24
22
 
@@ -48,11 +46,11 @@ console.log(doubled.get()); // 10 (recomputed because dependency changed)
48
46
  console.log(doubled.get()); // 10 (memoized — no recomputation)
49
47
  ```
50
48
 
51
- Computations automatically track every signal accessed inside them. Dynamic branching is fully supported only signals read in the _current_ execution path are tracked as dependencies.
49
+ A computation tracks each signal that it reads. A dynamic branch is safe: the computation keeps only the signals of the _current_ execution path as its dependencies.
52
50
 
53
51
  ### `watchSignal` — memory-safe one-shot effect
54
52
 
55
- Use `watchSignal` to subscribe to a `Signal.State` or `Signal.Computed` and receive its value after each change. Updates are coalesced into a single microtask per synchronous batch.
53
+ Use `watchSignal` to subscribe to a `Signal.State` or to a `Signal.Computed`. The callback receives the value after each change. `watchSignal` groups the updates of one synchronous batch into a single microtask.
56
54
 
57
55
  ```typescript
58
56
  import { Signal, watchSignal } from "@xmachines/play-signals";
@@ -71,11 +69,11 @@ count.set(3); // → logs "count changed: 3" once
71
69
  cleanup();
72
70
  ```
73
71
 
74
- The returned cleanup function is idempotent calling it multiple times is safe and will not throw.
72
+ The cleanup function is idempotent. A second call is safe, and it does not throw.
75
73
 
76
74
  ### `Signal.subtle.Watcher` — low-level multi-signal observation
77
75
 
78
- For advanced use cases such as framework integrations, the full `Signal.subtle.Watcher` API is available:
76
+ Advanced code, such as a framework integration, can use the complete `Signal.subtle.Watcher` API:
79
77
 
80
78
  ```typescript
81
79
  import { Signal } from "@xmachines/play-signals";
@@ -99,7 +97,7 @@ count.set(5); // schedules microtask notification
99
97
 
100
98
  ### Custom equality
101
99
 
102
- Both `Signal.State` and `Signal.Computed` accept an `equals` option to control when dependents are notified:
100
+ Both `Signal.State` and `Signal.Computed` accept an `equals` option. The option controls when a signal notifies its dependents:
103
101
 
104
102
  ```typescript
105
103
  import { Signal } from "@xmachines/play-signals";
@@ -110,7 +108,7 @@ const options: SignalOptions<{ name: string; age: number }> = {
110
108
  };
111
109
 
112
110
  const person = new Signal.State({ name: "Alice", age: 30 }, options);
113
- // Setting structurally identical value will not notify dependents
111
+ // A structurally identical value does not notify the dependents
114
112
  person.set({ name: "Alice", age: 30 });
115
113
  ```
116
114
 
@@ -119,13 +117,13 @@ person.set({ name: "Alice", age: 30 });
119
117
  | Export | Kind | Description |
120
118
  | ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------ |
121
119
  | `Signal` | namespace | Full TC39 Signals namespace (`State`, `Computed`, `subtle.Watcher`) re-exported from `signal-polyfill` |
122
- | `watchSignal(signal, onValue)` | function | Memory-safe subscription helper; returns a cleanup function |
120
+ | `watchSignal(signal, onValue)` | function | The memory-safe subscription helper. It returns a cleanup function |
123
121
  | `SignalState<T>` | interface | Shape of `Signal.State<T>` (`.get()`, `.set()`) |
124
122
  | `SignalComputed<T>` | interface | Shape of `Signal.Computed<T>` (`.get()`) |
125
123
  | `SignalWatcher` | interface | Shape of `Signal.subtle.Watcher` (`.watch()`, `.unwatch()`, `.getPending()`) |
126
- | `SignalOptions<T>` | interface | Options bag for `Signal.State` constructor (`equals?`) |
127
- | `ComputedOptions<T>` | interface | Options bag for `Signal.Computed` constructor (`equals?`) |
128
- | `WatcherNotify` | type | Callback signature for `Signal.subtle.Watcher` notify function |
124
+ | `SignalOptions<T>` | interface | The options object for the `Signal.State` constructor (`equals?`) |
125
+ | `ComputedOptions<T>` | interface | The options object for the `Signal.Computed` constructor (`equals?`) |
126
+ | `WatcherNotify` | type | The callback signature of the `Signal.subtle.Watcher` notify function |
129
127
 
130
128
  ## Testing
131
129
 
@@ -152,36 +150,38 @@ pnpm run test:coverage
152
150
  ## Requirements
153
151
 
154
152
  - **Node.js** `>= 22.0.0`
155
- - **TypeScript** `5.7+` (for consumers using TypeScript)
153
+ - **TypeScript** `5.7+` (for a consumer that uses TypeScript)
156
154
 
157
155
  ## License
158
156
 
159
157
  MIT — see [LICENSE](LICENSE).
160
158
 
161
- TC39 Signals Polyfill for XMachines Play Architecture
159
+ The TC39 Signals polyfill of the XMachines Play Architecture
162
160
 
163
- Provides fine-grained reactive state primitives based on the TC39 Signals proposal (Stage 1).
164
- This package isolates the TC39 polyfill to protect the codebase from Stage 1 API changes.
161
+ This package gives you the fine-grained reactive state primitives of the TC39
162
+ Signals proposal (Stage 1). It keeps the TC39 polyfill in one place, and it
163
+ therefore protects the code from a change of the Stage 1 API.
165
164
 
166
- **Architectural Context:** Implements **Signal-Only Reactivity (INV-05)** by providing
167
- the reactive primitives that enable Actor-to-Infrastructure communication without
168
- subscriptions or event emitters. All state propagation in Play Architecture uses
169
- TC39 Signals for automatic dependency tracking and glitch-free updates.
165
+ **Architectural context:** the package implements **Signal-Only Reactivity
166
+ (INV-05)**. It gives the reactive primitives that carry the communication from
167
+ the Actor to the infrastructure, without a subscription and without an event
168
+ emitter. Every propagation of state in the Play Architecture uses a TC39 Signal,
169
+ which tracks each dependency and updates without a glitch.
170
170
 
171
171
  ## Example
172
172
 
173
- Basic Signal usage
173
+ The basic use of a signal
174
174
 
175
175
  ```typescript
176
176
  import { Signal } from "@xmachines/play-signals";
177
177
 
178
- // Create state signal
178
+ // Create a state signal
179
179
  const count = new Signal.State(0);
180
180
 
181
- // Create computed signal
181
+ // Create a computed signal
182
182
  const doubled = new Signal.Computed(() => count.get() * 2);
183
183
 
184
- // Observe changes
184
+ // Observe the changes
185
185
  const watcher = new Signal.subtle.Watcher(() => {
186
186
  console.log("Count:", count.get(), "Doubled:", doubled.get());
187
187
  });
@@ -192,19 +192,21 @@ count.set(5); // Logs: Count: 5 Doubled: 10
192
192
 
193
193
  ## See
194
194
 
195
- - [Play RFC](../../../rfc/play.md) - Invariant INV-05
195
+ - [Play RFC](../../../rfc/play.md) - invariant INV-05
196
196
  - [TC39 Signals Proposal](https://github.com/tc39/proposal-signals)
197
197
 
198
198
  ## Remarks
199
199
 
200
- **Stage 1 Status:** TC39 Signals is currently Stage 1 in the TC39 process. This package
201
- uses the official `signal-polyfill` reference implementation to isolate the codebase
202
- from potential API changes as the proposal evolves. All signal imports should go through
203
- this package to maintain isolation.
200
+ **Stage 1 status:** TC39 Signals is at Stage 1 in the TC39 process now. This
201
+ package uses the official `signal-polyfill` reference implementation. The code
202
+ therefore stays separate from an API that can change while the proposal
203
+ develops. Import every signal through this package, and the separation stays
204
+ complete.
204
205
 
205
- **Why Isolation:** By re-exporting the polyfill through this dedicated package, we can
206
- update the polyfill version or adapt to API changes in one place without touching
207
- consuming packages. This architectural decision protects against Stage 1 API churn.
206
+ **The reason for the separation:** this dedicated package re-exports the
207
+ polyfill. Therefore one place holds each new polyfill version and each change of
208
+ the API, and no consuming package changes. This architectural decision protects
209
+ the code from a change of the Stage 1 API.
208
210
 
209
211
  ## Namespaces
210
212
 
@@ -6,21 +6,21 @@
6
6
  function watchSignal<T>(signal, onValue): () => void;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-signals/src/watch-signal.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/watch-signal.ts#L21)
9
+ Defined in: [packages/play-signals/src/watch-signal.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/watch-signal.ts#L21)
10
10
 
11
- Subscribe to a single signal using the canonical one-shot watcher lifecycle.
11
+ Subscribes to one signal, with the canonical one-shot watcher lifecycle.
12
12
 
13
- The callback runs from a queued microtask after pending notifications are
14
- drained, then the watcher re-arms itself so future updates are not missed.
15
- The returned cleanup keeps teardown idempotent by tolerating already-detached
16
- watchers.
13
+ The callback runs from a microtask in the queue, after the watcher drains the
14
+ notifications that wait. The watcher then arms itself again, so that it misses no
15
+ later update. The cleanup function is idempotent, because it accepts a watcher
16
+ that is detached already.
17
17
 
18
18
  **Memory safety (Phase 29):**
19
19
 
20
- - `disposed` flag prevents post-cleanup callback execution: if cleanup is
21
- called before a pending microtask fires, the microtask returns early.
22
- - `needsEnqueue` guard dedups rapid synchronous signal changes: only one
23
- microtask is ever queued per batch of synchronous mutations.
20
+ - The `disposed` flag stops a callback after the cleanup: the microtask returns at
21
+ once when the cleanup runs before the microtask fires.
22
+ - The `needsEnqueue` guard removes the duplicates of rapid synchronous signal
23
+ changes: one batch of synchronous changes queues one microtask only.
24
24
 
25
25
  ## Type Parameters
26
26
 
@@ -30,13 +30,13 @@ watchers.
30
30
 
31
31
  ## Parameters
32
32
 
33
- | Parameter | Type | Description |
34
- | --------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
35
- | `signal` | \| [`State`](../namespaces/Signal/classes/State.md)\<`T`\> \| [`Computed`](../namespaces/Signal/classes/Computed.md)\<`T`\> | A `Signal.State` or `Signal.Computed` to subscribe to. |
36
- | `onValue` | (`value`) => `void` | Called with the current signal value after each change. |
33
+ | Parameter | Type | Description |
34
+ | --------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
35
+ | `signal` | \| [`State`](../namespaces/Signal/classes/State.md)\<`T`\> \| [`Computed`](../namespaces/Signal/classes/Computed.md)\<`T`\> | The `Signal.State` or `Signal.Computed` to subscribe to. |
36
+ | `onValue` | (`value`) => `void` | The watcher calls it with the current signal value after each change. |
37
37
 
38
38
  ## Returns
39
39
 
40
- A cleanup function that unregisters the watcher.
40
+ The cleanup function. It removes the watcher.
41
41
 
42
42
  () => `void`
@@ -2,15 +2,15 @@
2
2
 
3
3
  # Interface: ComputedOptions\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L84)
5
+ Defined in: [packages/play-signals/src/types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L85)
6
6
 
7
- Options for creating Signal.Computed
7
+ The options of a Signal.Computed
8
8
 
9
9
  ## Param
10
10
 
11
11
  **equals**
12
12
 
13
- Optional custom equality function for memoization
13
+ The optional equality function of your own, for the memoization
14
14
 
15
15
  ## Example
16
16
 
@@ -31,6 +31,6 @@ const options: ComputedOptions<string> = {
31
31
 
32
32
  ## Properties
33
33
 
34
- | Property | Type | Description | Defined in |
35
- | -------------------------------------- | ----------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
36
- | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L88) |
34
+ | Property | Type | Description | Defined in |
35
+ | -------------------------------------- | ----------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
36
+ | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | The equality function of your own, for the memoization | [packages/play-signals/src/types.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L89) |
@@ -2,13 +2,13 @@
2
2
 
3
3
  # Interface: SignalComputed\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L111)
5
+ Defined in: [packages/play-signals/src/types.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L112)
6
6
 
7
- Lazily-evaluated, memoized computed signal
7
+ The computed signal. It evaluates late, and it memoizes the result
8
8
 
9
- Signal.Computed automatically tracks dependencies when its callback is executed.
10
- The computation is memoized and only re-runs when dependencies change. This enables
11
- automatic dependency tracking without manual subscription management.
9
+ Signal.Computed tracks each dependency when it runs its callback. It memoizes the
10
+ result, and it runs the callback again only after a dependency changes. It
11
+ therefore tracks each dependency for you, and you manage no subscription.
12
12
 
13
13
  ## Example
14
14
 
@@ -20,8 +20,8 @@ const doubled = new Signal.Computed(() => count.get() * 2);
20
20
 
21
21
  console.log(doubled.get()); // 0
22
22
  count.set(5);
23
- console.log(doubled.get()); // 10 (recomputed)
24
- console.log(doubled.get()); // 10 (memoized, not recomputed)
23
+ console.log(doubled.get()); // 10 (the signal computed it again)
24
+ console.log(doubled.get()); // 10 (from the memory, with no new computation)
25
25
  ```
26
26
 
27
27
  ## Type Parameters
@@ -38,12 +38,12 @@ console.log(doubled.get()); // 10 (memoized, not recomputed)
38
38
  get(): T;
39
39
  ```
40
40
 
41
- Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L117)
41
+ Defined in: [packages/play-signals/src/types.ts:118](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L118)
42
42
 
43
- Read computed value (recalculates only if dependencies changed)
43
+ Reads the computed value. It computes the value again only after a dependency changed
44
44
 
45
45
  #### Returns
46
46
 
47
47
  `T`
48
48
 
49
- Computed value based on current dependencies
49
+ The value from the current dependencies
@@ -2,15 +2,15 @@
2
2
 
3
3
  # Interface: SignalOptions\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L26)
5
+ Defined in: [packages/play-signals/src/types.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L27)
6
6
 
7
- Options for creating Signal.State
7
+ The options of a Signal.State
8
8
 
9
9
  ## Param
10
10
 
11
11
  **equals**
12
12
 
13
- Optional custom equality function for determining if value changed
13
+ The optional equality function of your own. It decides if the value changed
14
14
 
15
15
  ## Example
16
16
 
@@ -32,6 +32,6 @@ const count = new Signal.State(0, options);
32
32
 
33
33
  ## Properties
34
34
 
35
- | Property | Type | Description | Defined in |
36
- | -------------------------------------- | ----------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
37
- | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L33) |
35
+ | Property | Type | Description | Defined in |
36
+ | -------------------------------------- | ----------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
37
+ | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | The equality function of your own. It decides if the value changed | [packages/play-signals/src/types.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L34) |
@@ -2,13 +2,13 @@
2
2
 
3
3
  # Interface: SignalState\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L53)
5
+ Defined in: [packages/play-signals/src/types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L54)
6
6
 
7
- Writable state signal holding a single reactive value
7
+ The writable state signal. It holds one reactive value
8
8
 
9
- Signal.State is the fundamental primitive for reactive state. Calling `get()` within
10
- a computed signal or watcher automatically tracks the state as a dependency. Calling
11
- `set()` notifies all dependent computations and watchers.
9
+ Signal.State is the base primitive of a reactive state. A `get()` call inside a
10
+ computed signal or inside a watcher tracks the state as a dependency. A `set()`
11
+ call notifies every computation and every watcher that depends on the state.
12
12
 
13
13
  ## Example
14
14
 
@@ -35,15 +35,15 @@ console.log(name.get()); // 'Bob'
35
35
  get(): T;
36
36
  ```
37
37
 
38
- Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L59)
38
+ Defined in: [packages/play-signals/src/types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L60)
39
39
 
40
- Read current value and track as dependency
40
+ Reads the current value, and tracks the signal as a dependency
41
41
 
42
42
  #### Returns
43
43
 
44
44
  `T`
45
45
 
46
- Current value of the signal
46
+ The current value of the signal
47
47
 
48
48
  ---
49
49
 
@@ -53,15 +53,15 @@ Current value of the signal
53
53
  set(value): void;
54
54
  ```
55
55
 
56
- Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L66)
56
+ Defined in: [packages/play-signals/src/types.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L67)
57
57
 
58
- Write new value and notify watchers if changed
58
+ Writes a new value, and notifies the watchers when the value changed
59
59
 
60
60
  #### Parameters
61
61
 
62
- | Parameter | Type | Description |
63
- | --------- | ---- | ---------------- |
64
- | `value` | `T` | New value to set |
62
+ | Parameter | Type | Description |
63
+ | --------- | ---- | ------------- |
64
+ | `value` | `T` | The new value |
65
65
 
66
66
  #### Returns
67
67
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: SignalWatcher
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L167)
5
+ Defined in: [packages/play-signals/src/types.ts:169](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L169)
6
6
 
7
- Watcher for observing signal changes and scheduling effects
7
+ The watcher. It observes each signal change and schedules an effect
8
8
 
9
- Signal.subtle.Watcher enables observing multiple signals and batching updates.
10
- This is the low-level primitive used by frameworks to implement reactive effects.
9
+ Signal.subtle.Watcher observes more than one signal, and it groups the updates.
10
+ It is the low-level primitive, and a framework uses it to make a reactive effect.
11
11
 
12
12
  ## Example
13
13
 
@@ -27,7 +27,7 @@ const watcher = new Signal.subtle.Watcher(() => {
27
27
  watcher.watch(count);
28
28
  watcher.watch(doubled);
29
29
 
30
- count.set(5); // Notification scheduled via microtask
30
+ count.set(5); // The watcher schedules the notification in a microtask
31
31
  ```
32
32
 
33
33
  ## Methods
@@ -40,9 +40,9 @@ getPending(): (
40
40
  | SignalComputed<unknown>)[];
41
41
  ```
42
42
 
43
- Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L187)
43
+ Defined in: [packages/play-signals/src/types.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L189)
44
44
 
45
- Get signals that changed since last check
45
+ Returns the signals that changed after the last check
46
46
 
47
47
  #### Returns
48
48
 
@@ -50,7 +50,7 @@ Get signals that changed since last check
50
50
  \| [`SignalState`](SignalState.md)\<`unknown`\>
51
51
  \| [`SignalComputed`](SignalComputed.md)\<`unknown`\>)[]
52
52
 
53
- Array of signals that have pending updates
53
+ The array of the signals with an update that waits
54
54
 
55
55
  ---
56
56
 
@@ -60,15 +60,15 @@ Array of signals that have pending updates
60
60
  unwatch(signal): void;
61
61
  ```
62
62
 
63
- Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L180)
63
+ Defined in: [packages/play-signals/src/types.ts:182](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L182)
64
64
 
65
- Stop watching a signal
65
+ Stops the watch of one signal
66
66
 
67
67
  #### Parameters
68
68
 
69
- | Parameter | Type | Description |
70
- | --------- | ----------------------------------------------------------------------------------------------------- | ------------------------ |
71
- | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | Signal to stop observing |
69
+ | Parameter | Type | Description |
70
+ | --------- | ----------------------------------------------------------------------------------------------------- | ------------------- |
71
+ | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | The signal to leave |
72
72
 
73
73
  #### Returns
74
74
 
@@ -82,15 +82,15 @@ Stop watching a signal
82
82
  watch(signal): void;
83
83
  ```
84
84
 
85
- Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L173)
85
+ Defined in: [packages/play-signals/src/types.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L175)
86
86
 
87
- Start watching a signal for changes
87
+ Starts the watch of one signal
88
88
 
89
89
  #### Parameters
90
90
 
91
- | Parameter | Type | Description |
92
- | --------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------- |
93
- | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | Signal to observe (State or Computed) |
91
+ | Parameter | Type | Description |
92
+ | --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------- |
93
+ | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | The signal to observe: a State or a Computed |
94
94
 
95
95
  #### Returns
96
96
 
@@ -6,12 +6,13 @@
6
6
  type WatcherNotify = () => void;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-signals/src/types.ts#L139)
9
+ Defined in: [packages/play-signals/src/types.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L141)
10
10
 
11
- Notification callback for Signal.subtle.Watcher
11
+ The notification callback of a Signal.subtle.Watcher
12
12
 
13
- Invoked when watched signals change. Use microtask batching pattern to coalesce
14
- rapid updates (see signal-polyfill README for best practices).
13
+ The watcher calls it after a signal that it watches changes. Use the microtask
14
+ batching pattern to group rapid updates. The README of signal-polyfill gives the
15
+ best practice.
15
16
 
16
17
  ## Returns
17
18
 
@@ -25,7 +26,7 @@ import { Signal } from "@xmachines/play-signals";
25
26
  const notify: WatcherNotify = () => {
26
27
  queueMicrotask(() => {
27
28
  const pending = watcher.getPending();
28
- // Process pending signal changes
29
+ // Process the signal changes that wait
29
30
  });
30
31
  };
31
32
  const watcher = new Signal.subtle.Watcher(notify);