@xmachines/docs 1.0.0-beta.10
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/LICENSE +21 -0
- package/README.md +15 -0
- package/api/@xmachines/play/README.md +130 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +81 -0
- package/api/@xmachines/play-actor/README.md +247 -0
- package/api/@xmachines/play-actor/classes/AbstractActor.md +520 -0
- package/api/@xmachines/play-actor/interfaces/Routable.md +29 -0
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +17 -0
- package/api/@xmachines/play-actor/interfaces/Viewable.md +12 -0
- package/api/@xmachines/play-catalog/README.md +331 -0
- package/api/@xmachines/play-catalog/functions/defineCatalog.md +98 -0
- package/api/@xmachines/play-catalog/functions/defineComponents.md +134 -0
- package/api/@xmachines/play-catalog/type-aliases/Catalog.md +48 -0
- package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +20 -0
- package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +65 -0
- package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +17 -0
- package/api/@xmachines/play-react/README.md +423 -0
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +613 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +68 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +15 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +14 -0
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +15 -0
- package/api/@xmachines/play-react/variables/PlayRenderer.md +64 -0
- package/api/@xmachines/play-react-router/README.md +198 -0
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +321 -0
- package/api/@xmachines/play-react-router/classes/RouteMap.md +137 -0
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +19 -0
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +35 -0
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +14 -0
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +17 -0
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-react-router-demo/README.md +137 -0
- package/api/@xmachines/play-router/README.md +502 -0
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +142 -0
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +300 -0
- package/api/@xmachines/play-router/functions/buildRouteTree.md +27 -0
- package/api/@xmachines/play-router/functions/connectRouter.md +67 -0
- package/api/@xmachines/play-router/functions/crawlMachine.md +92 -0
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +47 -0
- package/api/@xmachines/play-router/functions/createRouteMap.md +53 -0
- package/api/@xmachines/play-router/functions/createRouter.md +76 -0
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +32 -0
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +64 -0
- package/api/@xmachines/play-router/functions/extractRoute.md +45 -0
- package/api/@xmachines/play-router/functions/findRouteById.md +37 -0
- package/api/@xmachines/play-router/functions/findRouteByPath.md +39 -0
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +35 -0
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +39 -0
- package/api/@xmachines/play-router/functions/routeExists.md +26 -0
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +29 -0
- package/api/@xmachines/play-router/functions/validateStateExists.md +29 -0
- package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +27 -0
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +172 -0
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +69 -0
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +13 -0
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +19 -0
- package/api/@xmachines/play-router/interfaces/RouteMap.md +56 -0
- package/api/@xmachines/play-router/interfaces/RouteNode.md +21 -0
- package/api/@xmachines/play-router/interfaces/RouteObject.md +21 -0
- package/api/@xmachines/play-router/interfaces/RouteTree.md +20 -0
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-router/interfaces/StateVisit.md +15 -0
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +28 -0
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +11 -0
- package/api/@xmachines/play-router-demo/README.md +137 -0
- package/api/@xmachines/play-signals/README.md +176 -0
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +34 -0
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +49 -0
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +35 -0
- package/api/@xmachines/play-signals/interfaces/SignalState.md +68 -0
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +97 -0
- package/api/@xmachines/play-signals/namespaces/Signal/README.md +22 -0
- package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +52 -0
- package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +72 -0
- package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/README.md +21 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +85 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +13 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +25 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +9 -0
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +9 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +19 -0
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +19 -0
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +32 -0
- package/api/@xmachines/play-solid/README.md +311 -0
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +15 -0
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +70 -0
- package/api/@xmachines/play-solid-router/README.md +666 -0
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +150 -0
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +347 -0
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +19 -0
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +32 -0
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +486 -0
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +14 -0
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +9 -0
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +51 -0
- package/api/@xmachines/play-solid-router-demo/README.md +127 -0
- package/api/@xmachines/play-tanstack-react-router/README.md +226 -0
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +137 -0
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +348 -0
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +19 -0
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +53 -0
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +35 -0
- package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +38 -0
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +33 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +14 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +17 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +26 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +9 -0
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +78 -0
- package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +64 -0
- package/api/@xmachines/play-tanstack-react-router-demo/README.md +126 -0
- package/api/@xmachines/play-tanstack-solid-router/README.md +285 -0
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +150 -0
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +343 -0
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +19 -0
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +32 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +23 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +9 -0
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +9 -0
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +78 -0
- package/api/@xmachines/play-tanstack-solid-router-demo/README.md +126 -0
- package/api/@xmachines/play-vue/README.md +292 -0
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +14 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +9 -0
- package/api/@xmachines/play-vue-router/README.md +604 -0
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +209 -0
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +201 -0
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +360 -0
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +19 -0
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +119 -0
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +15 -0
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +104 -0
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +9 -0
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +67 -0
- package/api/@xmachines/play-vue-router-demo/README.md +133 -0
- package/api/@xmachines/play-xstate/README.md +512 -0
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +527 -0
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +43 -0
- package/api/@xmachines/play-xstate/functions/composeGuards.md +79 -0
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +67 -0
- package/api/@xmachines/play-xstate/functions/definePlayer.md +127 -0
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +109 -0
- package/api/@xmachines/play-xstate/functions/eventMatches.md +40 -0
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +54 -0
- package/api/@xmachines/play-xstate/functions/hasContext.md +42 -0
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +41 -0
- package/api/@xmachines/play-xstate/functions/mergeViewProps.md +26 -0
- package/api/@xmachines/play-xstate/functions/negateGuard.md +61 -0
- package/api/@xmachines/play-xstate/functions/stateMatches.md +25 -0
- package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +39 -0
- package/api/@xmachines/play-xstate/functions/validateViewProps.md +80 -0
- package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +16 -0
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +24 -0
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +26 -0
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +22 -0
- package/api/@xmachines/play-xstate/type-aliases/Catalog.md +21 -0
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +14 -0
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +34 -0
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +20 -0
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +29 -0
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +45 -0
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +51 -0
- package/api/@xmachines/play-xstate/type-aliases/ValidationResult.md +17 -0
- package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +35 -0
- package/api/@xmachines/shared/README.md +379 -0
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +29 -0
- package/api/@xmachines/shared/functions/xmAliases.md +24 -0
- package/api/README.md +25 -0
- package/api/llms.txt +26 -0
- package/examples/README.md +63 -0
- package/examples/basic-state-machine.md +70 -0
- package/examples/form-validation.md +167 -0
- package/examples/multi-router-integration.md +277 -0
- package/examples/routing-patterns.md +260 -0
- package/examples/traffic-light.md +99 -0
- package/guides/README.md +29 -0
- package/guides/getting-started.md +223 -0
- package/guides/installation.md +323 -0
- package/index.d.ts +3 -0
- package/index.js +4 -0
- package/package.json +54 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / validateViewProps
|
|
2
|
+
|
|
3
|
+
# Function: validateViewProps()
|
|
4
|
+
|
|
5
|
+
Implementation — shared by both overloads
|
|
6
|
+
|
|
7
|
+
## Call Signature
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function validateViewProps<TCatalog>(componentName, props, catalog): ValidationResult;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L35)
|
|
14
|
+
|
|
15
|
+
Validate view props against Zod schema — generic overload for typed catalogs
|
|
16
|
+
|
|
17
|
+
When called with a typed catalog, `componentName` is constrained to `keyof TCatalog`.
|
|
18
|
+
Malformed catalog entries or unknown component names produce compile-time errors
|
|
19
|
+
rather than runtime failures.
|
|
20
|
+
|
|
21
|
+
### Type Parameters
|
|
22
|
+
|
|
23
|
+
| Type Parameter | Description |
|
|
24
|
+
| ------------------------------------------------------------ | ---------------------------------- |
|
|
25
|
+
| `TCatalog` _extends_ [`Catalog`](../type-aliases/Catalog.md) | Catalog type (must extend Catalog) |
|
|
26
|
+
|
|
27
|
+
### Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --------------- | --------------------------- | ----------------------------------------------------- |
|
|
31
|
+
| `componentName` | keyof `TCatalog` & `string` | Component name constrained to string keys of TCatalog |
|
|
32
|
+
| `props` | `unknown` | Props to validate |
|
|
33
|
+
| `catalog` | `TCatalog` | Typed component catalog |
|
|
34
|
+
|
|
35
|
+
### Returns
|
|
36
|
+
|
|
37
|
+
[`ValidationResult`](../type-aliases/ValidationResult.md)
|
|
38
|
+
|
|
39
|
+
Zod parse result
|
|
40
|
+
|
|
41
|
+
## Call Signature
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
function validateViewProps(componentName, props, catalog): ValidationResult;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L64)
|
|
48
|
+
|
|
49
|
+
Validate view props against Zod schema — base overload for untyped catalogs
|
|
50
|
+
|
|
51
|
+
Per CONTEXT.md:
|
|
52
|
+
|
|
53
|
+
- "Prop validation: At state entry"
|
|
54
|
+
- "currentView derivation: Merge meta.view with relevant context data"
|
|
55
|
+
|
|
56
|
+
Per RESEARCH.md Pattern 4: Use safeParse() for validation
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
| Parameter | Type | Description |
|
|
61
|
+
| --------------- | --------------------------------------- | ------------------------------ |
|
|
62
|
+
| `componentName` | `string` | Component name from catalog |
|
|
63
|
+
| `props` | `unknown` | Props to validate |
|
|
64
|
+
| `catalog` | [`Catalog`](../type-aliases/Catalog.md) | Component catalog with schemas |
|
|
65
|
+
|
|
66
|
+
### Returns
|
|
67
|
+
|
|
68
|
+
[`ValidationResult`](../type-aliases/ValidationResult.md)
|
|
69
|
+
|
|
70
|
+
Zod parse result
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
const props = { userId: "123", stats: { logins: 5 } };
|
|
76
|
+
const result = validateViewProps("Dashboard", props, catalog);
|
|
77
|
+
if (!result.success) {
|
|
78
|
+
console.error(result.error);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / CatalogEntry
|
|
2
|
+
|
|
3
|
+
# Interface: CatalogEntry
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-xstate/src/catalog/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/types.ts#L9)
|
|
6
|
+
|
|
7
|
+
UI component catalog entry with schema and component reference
|
|
8
|
+
|
|
9
|
+
Per CONTEXT.md: String keys reference components, Zod schemas validate props
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type | Description | Defined in |
|
|
14
|
+
| ------------------------------------------- | ---------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| <a id="property-component"></a> `component` | `unknown` | React component (or other framework component) | [packages/play-xstate/src/catalog/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/types.ts#L13) |
|
|
16
|
+
| <a id="property-schema"></a> `schema` | `ZodType`\<`unknown`\> | Zod schema for component props | [packages/play-xstate/src/catalog/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/types.ts#L11) |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / PlayerConfig
|
|
2
|
+
|
|
3
|
+
# Interface: PlayerConfig\<TMachine, TCatalog\>
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L9)
|
|
6
|
+
|
|
7
|
+
Configuration for definePlayer()
|
|
8
|
+
|
|
9
|
+
Per CONTEXT.md: Single config object with machine, catalog, options
|
|
10
|
+
|
|
11
|
+
## Type Parameters
|
|
12
|
+
|
|
13
|
+
| Type Parameter | Default type |
|
|
14
|
+
| -------------------------------------- | ------------------------------- |
|
|
15
|
+
| `TMachine` _extends_ `AnyStateMachine` | - |
|
|
16
|
+
| `TCatalog` | `Record`\<`string`, `unknown`\> |
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
| Property | Type | Description | Defined in |
|
|
21
|
+
| ---------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
22
|
+
| <a id="property-catalog"></a> `catalog?` | `TCatalog` | UI component catalog (optional - allows machines without UI) | [packages/play-xstate/src/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L17) |
|
|
23
|
+
| <a id="property-machine"></a> `machine` | `TMachine` | XState v5 state machine | [packages/play-xstate/src/types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L14) |
|
|
24
|
+
| <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | Lifecycle hooks and configuration | [packages/play-xstate/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L20) |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / PlayerOptions
|
|
2
|
+
|
|
3
|
+
# Interface: PlayerOptions\<TMachine\>
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L28)
|
|
6
|
+
|
|
7
|
+
Player lifecycle hooks
|
|
8
|
+
|
|
9
|
+
Per CONTEXT.md: Rich set of hooks for observability
|
|
10
|
+
|
|
11
|
+
## Type Parameters
|
|
12
|
+
|
|
13
|
+
| Type Parameter |
|
|
14
|
+
| -------------------------------------- |
|
|
15
|
+
| `TMachine` _extends_ `AnyStateMachine` |
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Description | Defined in |
|
|
20
|
+
| ------------------------------------------------------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
21
|
+
| <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | Called on actor errors | [packages/play-xstate/src/types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L46) |
|
|
22
|
+
| <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | Called when actor starts | [packages/play-xstate/src/types.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L30) |
|
|
23
|
+
| <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | Called when state signal changes | [packages/play-xstate/src/types.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L43) |
|
|
24
|
+
| <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | Called when actor stops | [packages/play-xstate/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L33) |
|
|
25
|
+
| <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | Called on every state transition | [packages/play-xstate/src/types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L36) |
|
|
26
|
+
| <a id="property-propvalidation"></a> `propValidation?` | `"strict"` \| `"lenient"` | Prop validation failure mode (default: 'lenient') - 'lenient': On validation failure, call onError hook and render with unvalidated props (current behavior). Documents as explicit trade-off. - 'strict': On validation failure, call onError hook and set viewSignal to null (no render). Blocks rendering until machine transitions to a state with valid props. | [packages/play-xstate/src/types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L57) |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / RouteContext
|
|
2
|
+
|
|
3
|
+
# Interface: RouteContext
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-xstate/src/routing/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/types.ts#L11)
|
|
6
|
+
|
|
7
|
+
Route build context from machine context
|
|
8
|
+
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
[key: string]: unknown
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Type | Description | Defined in |
|
|
18
|
+
| ------------------------------------------------ | ------------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| <a id="property-basepath"></a> `basePath?` | `string` | Base path for relative routes | [packages/play-xstate/src/routing/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/types.ts#L13) |
|
|
20
|
+
| <a id="property-hash"></a> `hash?` | `string` | Hash fragment | [packages/play-xstate/src/routing/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/types.ts#L19) |
|
|
21
|
+
| <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | Query parameters | [packages/play-xstate/src/routing/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/types.ts#L17) |
|
|
22
|
+
| <a id="property-routeparams"></a> `routeParams?` | `Record`\<`string`, `unknown`\> | Route parameters to substitute | [packages/play-xstate/src/routing/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/types.ts#L15) |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / Catalog
|
|
2
|
+
|
|
3
|
+
# Type Alias: Catalog
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type Catalog = Catalog | Record<string, CatalogEntry>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/catalog/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/types.ts#L28)
|
|
10
|
+
|
|
11
|
+
Component catalog mapping
|
|
12
|
+
|
|
13
|
+
Re-export from @xmachines/play-catalog for consistent API.
|
|
14
|
+
|
|
15
|
+
Supports two formats:
|
|
16
|
+
|
|
17
|
+
- Direct Zod schemas: `Record<string, z.ZodType>` via defineCatalog()
|
|
18
|
+
- CatalogEntry objects: `Record<string, CatalogEntry>` with { schema, component }
|
|
19
|
+
|
|
20
|
+
PlayerActor accepts either format - if entry has 'schema' property, uses CatalogEntry pattern,
|
|
21
|
+
otherwise treats as direct Zod schema.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / ComposedGuard
|
|
2
|
+
|
|
3
|
+
# Type Alias: ComposedGuard
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type ComposedGuard = GuardPredicate<MachineContext, EventObject, unknown, ParameterizedObject>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/compose.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/guards/compose.ts#L14)
|
|
10
|
+
|
|
11
|
+
Narrowest public return type for guard composition helpers.
|
|
12
|
+
|
|
13
|
+
`GuardPredicate<MachineContext, EventObject, unknown, ParameterizedObject>` is the
|
|
14
|
+
widest-compatible concrete XState guard type that does not use `any`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / Guard
|
|
2
|
+
|
|
3
|
+
# Type Alias: Guard\<TContext, TEvent\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type Guard<TContext, TEvent> = (args) => boolean;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/guards/types.ts#L13)
|
|
10
|
+
|
|
11
|
+
Standard XState guard function signature
|
|
12
|
+
|
|
13
|
+
Per CONTEXT.md: Guards receive { context, event } per XState standard
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter | Default type |
|
|
18
|
+
| -------------- | --------------------------------------------------- |
|
|
19
|
+
| `TContext` | `Record`\<`string`, `unknown`\> |
|
|
20
|
+
| `TEvent` | [`PlayEvent`](../../play/type-aliases/PlayEvent.md) |
|
|
21
|
+
|
|
22
|
+
## Parameters
|
|
23
|
+
|
|
24
|
+
| Parameter | Type | Description |
|
|
25
|
+
| -------------- | ----------------------------------------------- | ----------------------------------------- |
|
|
26
|
+
| `args` | \{ `context`: `TContext`; `event`: `TEvent`; \} | Guard arguments with context and event |
|
|
27
|
+
| `args.context` | `TContext` | Current machine context |
|
|
28
|
+
| `args.event` | `TEvent` | Event that triggered the guard evaluation |
|
|
29
|
+
|
|
30
|
+
## Returns
|
|
31
|
+
|
|
32
|
+
`boolean`
|
|
33
|
+
|
|
34
|
+
boolean indicating if guard passes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / GuardArray
|
|
2
|
+
|
|
3
|
+
# Type Alias: GuardArray\<TContext, TEvent\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type GuardArray<TContext, TEvent> = Guard<TContext, TEvent>[] | string[];
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/guards/types.ts#L23)
|
|
10
|
+
|
|
11
|
+
Array of guard predicates or guard names
|
|
12
|
+
|
|
13
|
+
Per CONTEXT.md: Array means AND - all guards must pass
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter | Default type |
|
|
18
|
+
| -------------- | --------------------------------------------------- |
|
|
19
|
+
| `TContext` | `Record`\<`string`, `unknown`\> |
|
|
20
|
+
| `TEvent` | [`PlayEvent`](../../play/type-aliases/PlayEvent.md) |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / PlayerFactory
|
|
2
|
+
|
|
3
|
+
# Type Alias: PlayerFactory\<TMachine\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type PlayerFactory<TMachine> = (input?) => PlayerActor<TMachine>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/types.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/types.ts#L65)
|
|
10
|
+
|
|
11
|
+
Factory function returned by definePlayer()
|
|
12
|
+
|
|
13
|
+
Per CONTEXT.md: Factory supports creating multiple actor instances
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter |
|
|
18
|
+
| -------------------------------------- |
|
|
19
|
+
| `TMachine` _extends_ `AnyStateMachine` |
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| --------- | ------------------------- |
|
|
25
|
+
| `input?` | `InputFrom`\<`TMachine`\> |
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
[`PlayerActor`](../classes/PlayerActor.md)\<`TMachine`\>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / RouteMachineConfig
|
|
2
|
+
|
|
3
|
+
# Type Alias: RouteMachineConfig
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type RouteMachineConfig = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L29)
|
|
10
|
+
|
|
11
|
+
## Indexable
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
[key: string]: unknown
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### context?
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
optional context?: unknown;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L30)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### on?
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
optional on?: Record<string, unknown>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L32)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### states?
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
optional states?: Record<string, unknown>;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L31)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / RouteStateNode
|
|
2
|
+
|
|
3
|
+
# Type Alias: RouteStateNode
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type RouteStateNode = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L13)
|
|
10
|
+
|
|
11
|
+
## Indexable
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
[key: string]: unknown
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### id?
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
optional id?: string;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L14)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### meta?
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
optional meta?: object;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L15)
|
|
36
|
+
|
|
37
|
+
#### route?
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
optional route?: string;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### states?
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
optional states?: Record<string, RouteStateNode>;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/routing/format-play-route-transitions.ts#L18)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / ValidationResult
|
|
2
|
+
|
|
3
|
+
# Type Alias: ValidationResult
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type ValidationResult =
|
|
7
|
+
| {
|
|
8
|
+
data: Record<string, unknown>;
|
|
9
|
+
success: true;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
error: z.ZodError | Error;
|
|
13
|
+
success: false;
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L11)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-xstate](../README.md) / ViewMergeContext
|
|
2
|
+
|
|
3
|
+
# Type Alias: ViewMergeContext
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type ViewMergeContext = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L5)
|
|
10
|
+
|
|
11
|
+
## Indexable
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
[key: string]: unknown
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### queryParams?
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
optional queryParams?: Record<string, unknown>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L7)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### routeParams?
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
optional routeParams?: Record<string, unknown>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Defined in: [packages/play-xstate/src/catalog/validate-props.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-xstate/src/catalog/validate-props.ts#L6)
|