@xmachines/docs 1.0.0-beta.25 → 1.0.0-beta.27
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.
- package/api/@xmachines/play/classes/PlayError.md +10 -4
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +4 -0
- package/api/@xmachines/play-actor/classes/AbstractActor.md +49 -92
- package/api/@xmachines/play-actor/functions/typedSpec.md +57 -0
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +9 -18
- package/api/@xmachines/play-actor/interfaces/Routable.md +5 -21
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
- package/api/@xmachines/play-actor/interfaces/Viewable.md +5 -6
- package/api/@xmachines/play-dom/README.md +24 -8
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +61 -0
- package/api/@xmachines/play-dom/functions/renderSpec.md +29 -12
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +62 -0
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +9 -9
- package/api/@xmachines/play-dom/interfaces/DefineRegistryOptions.md +25 -0
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +18 -0
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +13 -10
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +29 -0
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +53 -0
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +21 -0
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +16 -3
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +5 -2
- package/api/@xmachines/play-dom-router/README.md +10 -0
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +18 -46
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +38 -0
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +114 -0
- package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +50 -0
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +27 -0
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +9 -0
- package/api/@xmachines/play-dom-router-demo/README.md +46 -51
- package/api/@xmachines/play-react/README.md +4 -4
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +31 -5
- package/api/@xmachines/play-react/functions/defineRegistry.md +2 -0
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useBoundProp.md +2 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/functions/useStateBinding.md +2 -0
- package/api/@xmachines/play-react/interfaces/ComponentContext.md +2 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -7
- package/api/@xmachines/play-react/type-aliases/ComponentFn.md +2 -0
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react-router/README.md +5 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +102 -25
- package/api/@xmachines/play-react-router/classes/RouteMap.md +17 -33
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +8 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +21 -11
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +18 -8
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +42 -5
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +12 -19
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +100 -25
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +38 -0
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +45 -0
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/functions/extractRouteParams.md +46 -0
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +27 -0
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/{BaseRouteMapping.md → RouteMapping.md} +5 -5
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +65 -0
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +6 -0
- package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +8 -0
- package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +10 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +2 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +2 -0
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +4 -4
- package/api/@xmachines/play-solid/functions/defineRegistry.md +2 -0
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateBinding.md +2 -0
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +2 -0
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -7
- package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +2 -0
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +2 -2
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +13 -26
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +121 -46
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +15 -9
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +47 -92
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +19 -6
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +21 -18
- package/api/@xmachines/play-solid-router-demo/README.md +25 -28
- package/api/@xmachines/play-svelte/README.md +28 -0
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +2 -0
- package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +2 -0
- package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +2 -0
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +9 -9
- package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +2 -0
- package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +2 -0
- package/api/@xmachines/play-svelte/variables/PlayRenderer.md +2 -0
- package/api/@xmachines/play-svelte-spa-router/README.md +1 -0
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +13 -26
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +14 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +23 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +10 -10
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +20 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +65 -0
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router-demo/README.md +119 -12
- package/api/@xmachines/play-sveltekit-router/README.md +2 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +46 -24
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +14 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +23 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +27 -0
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +10 -10
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +20 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router-demo/README.md +120 -12
- package/api/@xmachines/play-tanstack-react-router/README.md +5 -3
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +17 -33
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +93 -25
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +21 -11
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +18 -8
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +13 -19
- package/api/@xmachines/play-tanstack-react-router-demo/README.md +23 -29
- package/api/@xmachines/play-tanstack-solid-router/README.md +8 -8
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +13 -26
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +101 -36
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +15 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +13 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +23 -24
- package/api/@xmachines/play-tanstack-solid-router-demo/README.md +25 -26
- package/api/@xmachines/play-vue/README.md +4 -4
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/useStateBinding.md +2 -0
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +2 -0
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +2 -0
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +4 -3
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +2 -2
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +18 -108
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +44 -104
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +127 -62
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +19 -7
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-vue-router-demo/README.md +47 -40
- package/api/@xmachines/play-xstate/README.md +15 -15
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +46 -30
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +20 -15
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +2 -2
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +14 -12
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +3 -7
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/README.md +4 -4
- package/api/llms.txt +3 -3
- package/examples/README.md +50 -32
- package/examples/basic-state-machine.md +75 -31
- package/examples/form-validation.md +199 -127
- package/examples/multi-router-integration.md +312 -230
- package/examples/routing-patterns.md +243 -187
- package/examples/traffic-light.md +114 -65
- package/guides/README.md +29 -15
- package/guides/getting-started.md +224 -144
- package/guides/installation.md +153 -213
- package/package.json +2 -2
- package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +0 -38
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +0 -33
package/guides/installation.md
CHANGED
|
@@ -1,175 +1,157 @@
|
|
|
1
|
+
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
+
|
|
1
3
|
# Installation
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Install XMachines packages for your platform.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
6
8
|
|
|
7
|
-
Before installing XMachines, ensure you have:
|
|
8
|
-
|
|
9
9
|
- **Node.js 22+** (or compatible runtime)
|
|
10
|
-
- **
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
## Installing XMachines
|
|
14
|
-
|
|
15
|
-
Choose your preferred package manager:
|
|
10
|
+
- **TypeScript 5.7+** with `strict: true` and `"type": "module"` in `package.json`
|
|
11
|
+
- A package manager: npm, pnpm, or yarn
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
XMachines packages are **ESM-only** — no CommonJS builds. All packages use `"type": "module"`.
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
npm install @xmachines/play @xmachines/play-xstate @xmachines/play-actor @xmachines/play-signals
|
|
21
|
-
```
|
|
15
|
+
## Core Packages
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
The minimum installation for defining machines and actors:
|
|
24
18
|
|
|
25
19
|
```bash
|
|
26
|
-
|
|
20
|
+
npm install @xmachines/play-xstate @xmachines/play-actor @xmachines/play-signals xstate
|
|
27
21
|
```
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
| Package | Role |
|
|
24
|
+
| ------------------------- | ----------------------------------------------------------- |
|
|
25
|
+
| `xstate` | XState v5 peer dependency — `setup`, `assign`, etc. |
|
|
26
|
+
| `@xmachines/play-xstate` | `definePlayer`, `formatPlayRouteTransitions`, `PlayerActor` |
|
|
27
|
+
| `@xmachines/play-actor` | `AbstractActor`, `typedSpec` — actor base class |
|
|
28
|
+
| `@xmachines/play-signals` | TC39 Signals polyfill, `watchSignal` |
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
yarn add @xmachines/play @xmachines/play-xstate @xmachines/play-actor @xmachines/play-signals
|
|
33
|
-
```
|
|
30
|
+
### Minimal working example
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Core Packages (Required)
|
|
40
|
-
|
|
41
|
-
**@xmachines/play**
|
|
42
|
-
|
|
43
|
-
- Foundation package with core protocols and contracts
|
|
44
|
-
- Required by all other packages
|
|
45
|
-
|
|
46
|
-
**@xmachines/play-actor**
|
|
47
|
-
|
|
48
|
-
- Abstract actor base class extending XState Actor
|
|
49
|
-
- Required for instantiating state machines
|
|
32
|
+
```typescript
|
|
33
|
+
import { setup } from "xstate";
|
|
34
|
+
import { definePlayer } from "@xmachines/play-xstate";
|
|
50
35
|
|
|
51
|
-
|
|
36
|
+
const machine = setup({
|
|
37
|
+
types: {
|
|
38
|
+
context: {} as { count: number },
|
|
39
|
+
events: {} as { type: "increment" },
|
|
40
|
+
input: {} as undefined,
|
|
41
|
+
},
|
|
42
|
+
}).createMachine({
|
|
43
|
+
id: "counter",
|
|
44
|
+
initial: "idle",
|
|
45
|
+
context: { count: 0 },
|
|
46
|
+
states: {
|
|
47
|
+
idle: {},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
const createPlayer = definePlayer({ machine });
|
|
52
|
+
const actor = createPlayer();
|
|
53
|
+
actor.start();
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
console.log("✓ XMachines installed successfully");
|
|
56
|
+
console.log("Current state:", actor.getSnapshot().value);
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
actor.stop();
|
|
59
|
+
```
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Run with:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
|
|
64
|
+
npx tsx my-script.ts
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
**@json-render/core** (external)
|
|
70
|
-
|
|
71
|
-
- Component catalog and schema definition with Zod validation
|
|
72
|
-
- Install if: Building declarative UI structures from state
|
|
73
|
-
|
|
74
|
-
**@xmachines/play-router**
|
|
67
|
+
## Framework-Specific Additions
|
|
75
68
|
|
|
76
|
-
|
|
77
|
-
- Install if: Implementing logic-driven routing
|
|
78
|
-
|
|
79
|
-
**@xmachines/play-tanstack-react-router**
|
|
80
|
-
|
|
81
|
-
- TanStack Router adapter with signal observation
|
|
82
|
-
- Install if: Using TanStack Router for navigation (React)
|
|
83
|
-
|
|
84
|
-
**@xmachines/play-react**
|
|
85
|
-
|
|
86
|
-
- React view renderer with JSON-Render
|
|
87
|
-
- Install if: Building React applications
|
|
88
|
-
|
|
89
|
-
> **Other frameworks:** Vue (`@xmachines/play-vue`, `@xmachines/play-vue-router`), SolidJS (`@xmachines/play-solid`, `@xmachines/play-solid-router`, `@xmachines/play-tanstack-solid-router`), and Vanilla DOM (`@xmachines/play-dom`) adapters are also available.
|
|
90
|
-
|
|
91
|
-
### Complete Installation
|
|
92
|
-
|
|
93
|
-
For full-featured development with React and routing:
|
|
69
|
+
### Vanilla DOM
|
|
94
70
|
|
|
95
71
|
```bash
|
|
96
|
-
npm install @xmachines/play
|
|
72
|
+
npm install @xmachines/play-dom @xmachines/play-dom-router @xmachines/play-router @json-render/core
|
|
97
73
|
```
|
|
98
74
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
75
|
+
| Package | Role |
|
|
76
|
+
| ---------------------------- | ------------------------------------------------------------------------- |
|
|
77
|
+
| `@xmachines/play-dom` | `connectRenderer`, `defineRegistry` |
|
|
78
|
+
| `@xmachines/play-dom-router` | `connectRouter`, `createBrowserHistory`, `createRouter`, `createRouteMap` |
|
|
79
|
+
| `@xmachines/play-router` | `extractMachineRoutes`, `getRoutableRoutes` |
|
|
80
|
+
| `@json-render/core` | Catalog and schema definitions (`defineCatalog`) |
|
|
102
81
|
|
|
103
|
-
###
|
|
82
|
+
### React
|
|
104
83
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
import { setup } from "xstate";
|
|
109
|
-
import { definePlayer } from "@xmachines/play-xstate";
|
|
110
|
-
import { Signal } from "@xmachines/play-signals";
|
|
84
|
+
```bash
|
|
85
|
+
npm install @xmachines/play-react @xmachines/play-router @json-render/core @json-render/react
|
|
111
86
|
```
|
|
112
87
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### Node.js
|
|
116
|
-
|
|
117
|
-
XMachines uses ESM (ECMAScript Modules) exclusively. Ensure your project is configured for ESM:
|
|
88
|
+
With routing:
|
|
118
89
|
|
|
119
|
-
|
|
90
|
+
```bash
|
|
91
|
+
# TanStack React Router
|
|
92
|
+
npm install @xmachines/play-tanstack-react-router @tanstack/react-router
|
|
120
93
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"type": "module",
|
|
124
|
-
"dependencies": {
|
|
125
|
-
"@xmachines/play": "^1.0.0"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
94
|
+
# React Router v7
|
|
95
|
+
npm install @xmachines/play-react-router react-router
|
|
128
96
|
```
|
|
129
97
|
|
|
130
|
-
|
|
98
|
+
| Package | Role |
|
|
99
|
+
| --------------------------------------- | ---------------------------------------------------------------- |
|
|
100
|
+
| `@xmachines/play-react` | `PlayRenderer`, `defineRegistry` |
|
|
101
|
+
| `@xmachines/play-tanstack-react-router` | `PlayRouterProvider`, `createRouteMapFromTree` |
|
|
102
|
+
| `@xmachines/play-react-router` | `PlayRouterProvider`, `createRouteMapFromTree` (React Router v7) |
|
|
131
103
|
|
|
132
|
-
|
|
104
|
+
### Vue 3
|
|
133
105
|
|
|
134
106
|
```bash
|
|
135
|
-
|
|
107
|
+
npm install @xmachines/play-vue @xmachines/play-vue-router @xmachines/play-router @json-render/core vue-router
|
|
136
108
|
```
|
|
137
109
|
|
|
138
|
-
|
|
110
|
+
| Package | Role |
|
|
111
|
+
| ---------------------------- | -------------------------------------- |
|
|
112
|
+
| `@xmachines/play-vue` | `PlayRenderer`, `defineRegistry` |
|
|
113
|
+
| `@xmachines/play-vue-router` | `PlayRouterProvider`, `createRouteMap` |
|
|
139
114
|
|
|
140
|
-
|
|
141
|
-
import { setup } from "xstate";
|
|
142
|
-
import { definePlayer } from "@xmachines/play-xstate";
|
|
115
|
+
### SolidJS
|
|
143
116
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
initial: "idle",
|
|
147
|
-
states: {
|
|
148
|
-
idle: { on: { START: "running" } },
|
|
149
|
-
running: { on: { STOP: "idle" } },
|
|
150
|
-
},
|
|
151
|
-
});
|
|
117
|
+
```bash
|
|
118
|
+
npm install @xmachines/play-solid @xmachines/play-router @json-render/core
|
|
152
119
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
120
|
+
# With router:
|
|
121
|
+
npm install @xmachines/play-solid-router @solidjs/router
|
|
122
|
+
# or TanStack:
|
|
123
|
+
npm install @xmachines/play-tanstack-solid-router @tanstack/solid-router
|
|
156
124
|
```
|
|
157
125
|
|
|
158
|
-
|
|
126
|
+
| Package | Role |
|
|
127
|
+
| --------------------------------------- | ------------------------------------------------------- |
|
|
128
|
+
| `@xmachines/play-solid` | `PlayRenderer`, `defineRegistry` |
|
|
129
|
+
| `@xmachines/play-solid-router` | `PlayRouterProvider`, `createRouteMap` (SolidJS Router) |
|
|
130
|
+
| `@xmachines/play-tanstack-solid-router` | `PlayRouterProvider`, `createRouteMap` (TanStack Solid) |
|
|
159
131
|
|
|
160
|
-
|
|
132
|
+
### Svelte 5
|
|
161
133
|
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
134
|
+
```bash
|
|
135
|
+
npm install @xmachines/play-svelte @xmachines/play-router @json-render/core
|
|
136
|
+
|
|
137
|
+
# With SvelteKit routing:
|
|
138
|
+
npm install @xmachines/play-sveltekit-router
|
|
139
|
+
|
|
140
|
+
# With svelte-spa-router (hash routing):
|
|
141
|
+
npm install @xmachines/play-svelte-spa-router
|
|
166
142
|
```
|
|
167
143
|
|
|
168
|
-
|
|
144
|
+
| Package | Role |
|
|
145
|
+
| ----------------------------------- | ----------------------------------------------------- |
|
|
146
|
+
| `@xmachines/play-svelte` | `PlayRenderer`, `defineRegistry` |
|
|
147
|
+
| `@xmachines/play-sveltekit-router` | `connectRouter`, `createRouteMap` (SvelteKit) |
|
|
148
|
+
| `@xmachines/play-svelte-spa-router` | `connectRouter`, `createRouteMap` (svelte-spa-router) |
|
|
169
149
|
|
|
170
|
-
|
|
150
|
+
## TypeScript Configuration
|
|
171
151
|
|
|
172
|
-
|
|
152
|
+
All XMachines packages require TypeScript strict mode and ESM module resolution.
|
|
153
|
+
|
|
154
|
+
**Recommended `tsconfig.json`:**
|
|
173
155
|
|
|
174
156
|
```json
|
|
175
157
|
{
|
|
@@ -185,133 +167,91 @@ XMachines is written in TypeScript and includes built-in type definitions. No se
|
|
|
185
167
|
}
|
|
186
168
|
```
|
|
187
169
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- **`moduleResolution: "bundler"`** (recommended) or `"node16"` for Node.js projects
|
|
191
|
-
- **`strict: true`** enables full type checking
|
|
192
|
-
- **`target: "ESNext"`** leverages modern JavaScript features
|
|
170
|
+
For Node.js projects (without a bundler), use `"moduleResolution": "node16"` or `"nodenext"`.
|
|
193
171
|
|
|
194
|
-
**
|
|
195
|
-
|
|
196
|
-
XMachines provides full type inference from machine definition through to components:
|
|
172
|
+
**ESM import extensions:** Always use `.js` extensions in TypeScript import paths, even when importing `.ts` source files:
|
|
197
173
|
|
|
198
174
|
```typescript
|
|
199
|
-
|
|
200
|
-
import {
|
|
201
|
-
|
|
202
|
-
const machine = setup({}).createMachine({
|
|
203
|
-
id: "typed",
|
|
204
|
-
initial: "idle",
|
|
205
|
-
context: { count: 0 },
|
|
206
|
-
states: {
|
|
207
|
-
idle: { on: { START: "running" } },
|
|
208
|
-
running: { on: { STOP: "idle" } },
|
|
209
|
-
},
|
|
210
|
-
});
|
|
175
|
+
// ✅ Correct
|
|
176
|
+
import { authMachine } from "./auth-machine.js";
|
|
211
177
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
// Actor signals provide reactive type-safe state access
|
|
178
|
+
// ❌ Wrong — will fail at runtime
|
|
179
|
+
import { authMachine } from "./auth-machine";
|
|
215
180
|
```
|
|
216
181
|
|
|
217
|
-
|
|
182
|
+
**`package.json` for your project:**
|
|
218
183
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
initial: "ready",
|
|
230
|
-
states: {
|
|
231
|
-
ready: {},
|
|
232
|
-
},
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
const createTest = definePlayer({ machine });
|
|
236
|
-
const actor = createTest();
|
|
237
|
-
actor.start();
|
|
238
|
-
|
|
239
|
-
console.log("✓ XMachines installed successfully");
|
|
240
|
-
console.log("Current state:", actor.getSnapshot().value);
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"type": "module",
|
|
187
|
+
"dependencies": {
|
|
188
|
+
"@xmachines/play-xstate": "latest",
|
|
189
|
+
"@xmachines/play-actor": "latest",
|
|
190
|
+
"@xmachines/play-signals": "latest",
|
|
191
|
+
"xstate": "latest"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
241
194
|
```
|
|
242
195
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
# TypeScript (requires tsx or ts-node)
|
|
247
|
-
npx tsx test.ts
|
|
196
|
+
## ESM Setup for Node.js
|
|
248
197
|
|
|
249
|
-
|
|
250
|
-
npx tsc test.ts && node test.js
|
|
198
|
+
XMachines uses ESM exclusively. For Node.js:
|
|
251
199
|
|
|
252
|
-
|
|
253
|
-
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"type": "module"
|
|
203
|
+
}
|
|
254
204
|
```
|
|
255
205
|
|
|
256
|
-
|
|
206
|
+
Or use `.mjs` file extensions. Dynamic imports work in CommonJS contexts:
|
|
257
207
|
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Current state: ready
|
|
208
|
+
```javascript
|
|
209
|
+
const { definePlayer } = await import("@xmachines/play-xstate");
|
|
261
210
|
```
|
|
262
211
|
|
|
263
|
-
##
|
|
264
|
-
|
|
265
|
-
### Module Not Found
|
|
212
|
+
## Deno
|
|
266
213
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
**Solutions:**
|
|
214
|
+
XMachines works with Deno via npm specifiers:
|
|
270
215
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
216
|
+
```typescript
|
|
217
|
+
import { setup } from "npm:xstate";
|
|
218
|
+
import { definePlayer } from "npm:@xmachines/play-xstate";
|
|
219
|
+
```
|
|
274
220
|
|
|
275
|
-
|
|
221
|
+
## Troubleshooting
|
|
276
222
|
|
|
277
|
-
|
|
223
|
+
### `Cannot find module '@xmachines/play-xstate'`
|
|
278
224
|
|
|
279
|
-
|
|
225
|
+
```bash
|
|
226
|
+
# Verify installation
|
|
227
|
+
npm list @xmachines/play-xstate
|
|
280
228
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
229
|
+
# Reinstall
|
|
230
|
+
npm install
|
|
231
|
+
```
|
|
284
232
|
|
|
285
|
-
###
|
|
233
|
+
### `SyntaxError: Cannot use import statement outside a module`
|
|
286
234
|
|
|
287
|
-
|
|
235
|
+
Add `"type": "module"` to your `package.json`, or rename files to `.mjs`.
|
|
288
236
|
|
|
289
|
-
|
|
237
|
+
### `Could not find a declaration file for module`
|
|
290
238
|
|
|
291
|
-
|
|
292
|
-
- Check TypeScript version (4.5+ required)
|
|
293
|
-
- Verify `moduleResolution` in tsconfig.json is set correctly
|
|
294
|
-
- Try `npm install` again to ensure types are properly linked
|
|
239
|
+
Types are built-in — no separate `@types/` package needed. Check:
|
|
295
240
|
|
|
296
|
-
|
|
241
|
+
- `moduleResolution` in `tsconfig.json` is set to `"bundler"`, `"node16"`, or `"nodenext"`
|
|
242
|
+
- TypeScript version is 5.7+
|
|
243
|
+
- Run `npm install` again to ensure dist files are present
|
|
297
244
|
|
|
298
|
-
|
|
245
|
+
### Type incompatibilities between packages
|
|
299
246
|
|
|
300
|
-
**Solution:**
|
|
301
247
|
Install all XMachines packages with matching major versions:
|
|
302
248
|
|
|
303
249
|
```bash
|
|
304
|
-
npm install @xmachines/play
|
|
250
|
+
npm install @xmachines/play-xstate@latest @xmachines/play-actor@latest @xmachines/play-signals@latest
|
|
305
251
|
```
|
|
306
252
|
|
|
307
253
|
## Next Steps
|
|
308
254
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
- **[
|
|
312
|
-
- **[API Reference](../api/README.md)** - Deep dive into each package
|
|
313
|
-
- **[Examples](../examples/README.md)** - See XMachines in action
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
**Need help?** Check the [API Reference](../api/README.md) for detailed information.
|
|
255
|
+
- **[Getting Started →](getting-started.md)** — Build your first machine and actor
|
|
256
|
+
- **[Examples](../examples/README.md)** — Routing patterns, form validation, multi-router demos
|
|
257
|
+
- **[API Reference](../api/README.md)** — Generated API docs for all packages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/docs",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.27",
|
|
4
4
|
"description": "Documentation for XMachines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typedoc": "typedoc"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@xmachines/shared": "1.0.0-beta.
|
|
51
|
+
"@xmachines/shared": "1.0.0-beta.27",
|
|
52
52
|
"oxfmt": "^0.43.0",
|
|
53
53
|
"oxlint": "^1.57.0",
|
|
54
54
|
"typedoc": "^0.28.18",
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
[Documentation](../../../README.md) / [@xmachines/play-tanstack-react-router](../README.md) / extractParams
|
|
2
|
-
|
|
3
|
-
# Function: extractParams()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function extractParams(pathname, pattern): Record<string, string>;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-tanstack-react-router/src/extract-params.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-tanstack-react-router/src/extract-params.ts#L29)
|
|
10
|
-
|
|
11
|
-
Extract route parameters from URL path based on route pattern using URLPattern API
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
| Parameter | Type | Description |
|
|
16
|
-
| ---------- | -------- | ---------------------------------------------------- |
|
|
17
|
-
| `pathname` | `string` | Actual URL path (e.g., "/profile/123") |
|
|
18
|
-
| `pattern` | `string` | Route pattern with params (e.g., "/profile/:userId") |
|
|
19
|
-
|
|
20
|
-
## Returns
|
|
21
|
-
|
|
22
|
-
`Record`\<`string`, `string`\>
|
|
23
|
-
|
|
24
|
-
Object with extracted parameters
|
|
25
|
-
|
|
26
|
-
## Example
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
extractParams("/profile/123", "/profile/:userId");
|
|
30
|
-
// Returns: { userId: "123" }
|
|
31
|
-
|
|
32
|
-
extractParams("/api/123", "/api/:id(\\d+)");
|
|
33
|
-
// Returns: { id: "123" }
|
|
34
|
-
// Validates numeric constraint via URLPattern
|
|
35
|
-
|
|
36
|
-
extractParams("/docs/intro", "/docs/*");
|
|
37
|
-
// Returns: { "0": "intro" }
|
|
38
|
-
```
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
[Documentation](../../../README.md) / [@xmachines/play-tanstack-react-router](../README.md) / extractQueryParams
|
|
2
|
-
|
|
3
|
-
# Function: extractQueryParams()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function extractQueryParams(search): Record<string, string>;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-tanstack-react-router/src/extract-params.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-tanstack-react-router/src/extract-params.ts#L68)
|
|
10
|
-
|
|
11
|
-
Extract query parameters from search string
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
| Parameter | Type | Description |
|
|
16
|
-
| --------- | -------- | -------------------------------------------------------------------------------- |
|
|
17
|
-
| `search` | `string` | Query string with or without leading ? (e.g., "?tab=settings" or "tab=settings") |
|
|
18
|
-
|
|
19
|
-
## Returns
|
|
20
|
-
|
|
21
|
-
`Record`\<`string`, `string`\>
|
|
22
|
-
|
|
23
|
-
Object mapping query parameter names to values
|
|
24
|
-
|
|
25
|
-
## Example
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
extractQueryParams("?tab=settings&theme=dark");
|
|
29
|
-
// Returns: { tab: "settings", theme: "dark" }
|
|
30
|
-
|
|
31
|
-
extractQueryParams("q=hello%20world");
|
|
32
|
-
// Returns: { q: "hello world" } (auto-decoded)
|
|
33
|
-
```
|