@xmachines/docs 1.0.0-beta.10 → 1.0.0-beta.11
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/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/classes/AbstractActor.md +33 -33
- package/api/@xmachines/play-actor/interfaces/Routable.md +2 -2
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +3 -3
- package/api/@xmachines/play-catalog/functions/defineCatalog.md +1 -1
- package/api/@xmachines/play-catalog/functions/defineComponents.md +1 -1
- package/api/@xmachines/play-catalog/type-aliases/Catalog.md +1 -1
- package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +1 -1
- package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +1 -1
- package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +1 -1
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +18 -18
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- 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 +6 -6
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -22
- package/api/@xmachines/play-react-router/classes/RouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -29
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-router/functions/crawlMachine.md +4 -4
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +4 -4
- package/api/@xmachines/play-router/functions/extractRoute.md +6 -6
- 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/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +5 -5
- package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- 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/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/StateVisit.md +6 -6
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.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/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +27 -27
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +27 -27
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.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 +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +22 -22
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.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 +4 -4
- package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +23 -23
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.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 +4 -4
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +5 -5
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +24 -24
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- 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-xstate/classes/PlayerActor.md +43 -43
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- 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/definePlayer.md +5 -5
- 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 +1 -1
- 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/mergeViewProps.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/functions/stateMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +1 -1
- package/api/@xmachines/play-xstate/functions/validateViewProps.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +8 -8
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/Catalog.md +1 -1
- 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 +7 -7
- 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/play-xstate/type-aliases/ValidationResult.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +3 -3
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/examples/README.md +3 -4
- package/examples/basic-state-machine.md +1 -1
- package/examples/form-validation.md +2 -2
- package/examples/traffic-light.md +1 -1
- package/guides/README.md +1 -1
- package/guides/getting-started.md +4 -12
- package/guides/installation.md +4 -5
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type PlayEvent<TPayload> = object & TPayload;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play/src/types.ts#L69)
|
|
10
10
|
|
|
11
11
|
Generic event type for Play Architecture
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ Robot, and other state machine libraries.
|
|
|
34
34
|
|
|
35
35
|
| Name | Type | Defined in |
|
|
36
36
|
| ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
-
| `type` | `string` | [types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
37
|
+
| `type` | `string` | [types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play/src/types.ts#L70) |
|
|
38
38
|
|
|
39
39
|
## Type Parameters
|
|
40
40
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Abstract Class: AbstractActor\<TLogic\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:179](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:179](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L179)
|
|
6
6
|
|
|
7
7
|
Abstract base class for Play Architecture actors.
|
|
8
8
|
|
|
@@ -62,7 +62,7 @@ class PlayerActor extends AbstractActor<AnyActorLogic> implements Routable, View
|
|
|
62
62
|
|
|
63
63
|
## Extends
|
|
64
64
|
|
|
65
|
-
- `Actor
|
|
65
|
+
- [`Actor`](https://www.jsdocs.io/package/xstate#Actor)\<`TLogic`\>
|
|
66
66
|
|
|
67
67
|
## Extended by
|
|
68
68
|
|
|
@@ -70,9 +70,9 @@ class PlayerActor extends AbstractActor<AnyActorLogic> implements Routable, View
|
|
|
70
70
|
|
|
71
71
|
## Type Parameters
|
|
72
72
|
|
|
73
|
-
| Type Parameter
|
|
74
|
-
|
|
|
75
|
-
| `TLogic` _extends_ `AnyActorLogic` | XState actor logic type (maintains type safety) Invariant: Actor Authority - Actor is the sole source of truth for state transitions. Invariant: Signal-Only Reactivity - Infrastructure observes via TC39 Signals. Invariant: Passive Infrastructure - Infrastructure reflects, never decides. |
|
|
73
|
+
| Type Parameter | Description |
|
|
74
|
+
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
75
|
+
| `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | XState actor logic type (maintains type safety) Invariant: Actor Authority - Actor is the sole source of truth for state transitions. Invariant: Signal-Only Reactivity - Infrastructure observes via TC39 Signals. Invariant: Passive Infrastructure - Infrastructure reflects, never decides. |
|
|
76
76
|
|
|
77
77
|
## Constructors
|
|
78
78
|
|
|
@@ -89,10 +89,10 @@ if any.
|
|
|
89
89
|
|
|
90
90
|
#### Parameters
|
|
91
91
|
|
|
92
|
-
| Parameter | Type
|
|
93
|
-
| ---------- |
|
|
94
|
-
| `logic` | `TLogic`
|
|
95
|
-
| `options?` | `ActorOptions
|
|
92
|
+
| Parameter | Type | Description |
|
|
93
|
+
| ---------- | ------------------------------------------------------------------------------- | --------------------------------- |
|
|
94
|
+
| `logic` | `TLogic` | The logic to create an actor from |
|
|
95
|
+
| `options?` | [`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\> | Actor options |
|
|
96
96
|
|
|
97
97
|
#### Returns
|
|
98
98
|
|
|
@@ -106,19 +106,19 @@ Actor<TLogic>.constructor
|
|
|
106
106
|
|
|
107
107
|
## Properties
|
|
108
108
|
|
|
109
|
-
| Property | Modifier | Type
|
|
110
|
-
| ------------------------------------------- | ---------- |
|
|
111
|
-
| <a id="property-_parent"></a> `_parent?` | `public` | `AnyActorRef`
|
|
112
|
-
| <a id="property-clock"></a> `clock` | `public` | `Clock`
|
|
113
|
-
| <a id="property-id"></a> `id` | `public` | `string`
|
|
114
|
-
| <a id="property-logic"></a> `logic` | `public` | `TLogic`
|
|
115
|
-
| <a id="property-options"></a> `options` | `public` | `Readonly
|
|
116
|
-
| <a id="property-ref"></a> `ref` | `public` | `ActorRef
|
|
117
|
-
| <a id="property-sessionid"></a> `sessionId` | `public` | `string`
|
|
118
|
-
| <a id="property-src"></a> `src` | `public` | `string` \| `AnyActorLogic`
|
|
119
|
-
| <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\>
|
|
120
|
-
| <a id="property-system"></a> `system` | `public` | `AnyActorSystem`
|
|
121
|
-
| <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined`
|
|
109
|
+
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
110
|
+
| ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
111
|
+
| <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | node_modules/xstate/dist/declarations/src/createActor.d.ts:33 |
|
|
112
|
+
| <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | `Actor.clock` | node_modules/xstate/dist/declarations/src/createActor.d.ts:25 |
|
|
113
|
+
| <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | node_modules/xstate/dist/declarations/src/createActor.d.ts:28 |
|
|
114
|
+
| <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | node_modules/xstate/dist/declarations/src/createActor.d.ts:18 |
|
|
115
|
+
| <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | node_modules/xstate/dist/declarations/src/createActor.d.ts:26 |
|
|
116
|
+
| <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | node_modules/xstate/dist/declarations/src/createActor.d.ts:34 |
|
|
117
|
+
| <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | node_modules/xstate/dist/declarations/src/createActor.d.ts:38 |
|
|
118
|
+
| <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | node_modules/xstate/dist/declarations/src/createActor.d.ts:42 |
|
|
119
|
+
| <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Typed as `Signal.State<unknown>` at the abstract level; concrete implementations narrow this to the actual snapshot type (e.g., `Signal.State<AnyMachineSnapshot>` in `@xmachines/play-xstate`'s `PlayerActor`). Infrastructure observes this signal to react to state changes without directly coupling to the Actor's internal state machine implementation. **Example** `// Infrastructure observes state signal const watcher = new Signal.subtle.Watcher(() => { console.log('Actor state changed:', actor.state.get()); }); watcher.watch(actor.state);` | - | [packages/play-actor/src/abstract-actor.ts:199](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L199) |
|
|
120
|
+
| <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | node_modules/xstate/dist/declarations/src/createActor.d.ts:40 |
|
|
121
|
+
| <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | node_modules/xstate/dist/declarations/src/createActor.d.ts:36 |
|
|
122
122
|
|
|
123
123
|
## Methods
|
|
124
124
|
|
|
@@ -132,7 +132,7 @@ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:153
|
|
|
132
132
|
|
|
133
133
|
#### Returns
|
|
134
134
|
|
|
135
|
-
`InteropSubscribable
|
|
135
|
+
[`InteropSubscribable`](https://www.jsdocs.io/package/xstate#InteropSubscribable)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\>
|
|
136
136
|
|
|
137
137
|
#### Inherited from
|
|
138
138
|
|
|
@@ -154,7 +154,7 @@ Obtain the internal state of the actor, which can be persisted.
|
|
|
154
154
|
|
|
155
155
|
#### Returns
|
|
156
156
|
|
|
157
|
-
`Snapshot
|
|
157
|
+
[`Snapshot`](https://www.jsdocs.io/package/xstate#Snapshot)\<`unknown`\>
|
|
158
158
|
|
|
159
159
|
#### Remarks
|
|
160
160
|
|
|
@@ -164,7 +164,7 @@ Note that the persisted state is not the same as the snapshot from
|
|
|
164
164
|
[Actor.getSnapshot](#getsnapshot). Persisted state represents the internal state of
|
|
165
165
|
the actor, while snapshots represent the actor's last emitted value.
|
|
166
166
|
|
|
167
|
-
Can be restored with [ActorOptions.state](#)
|
|
167
|
+
Can be restored with [ActorOptions.state](https://www.jsdocs.io/package/xstate#ActorOptions.state)
|
|
168
168
|
|
|
169
169
|
#### See
|
|
170
170
|
|
|
@@ -190,7 +190,7 @@ Read an actor’s snapshot synchronously.
|
|
|
190
190
|
|
|
191
191
|
#### Returns
|
|
192
192
|
|
|
193
|
-
`SnapshotFrom
|
|
193
|
+
[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>
|
|
194
194
|
|
|
195
195
|
#### Remarks
|
|
196
196
|
|
|
@@ -238,7 +238,7 @@ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:115
|
|
|
238
238
|
|
|
239
239
|
#### Returns
|
|
240
240
|
|
|
241
|
-
`Subscription`
|
|
241
|
+
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
242
242
|
|
|
243
243
|
#### Inherited from
|
|
244
244
|
|
|
@@ -254,7 +254,7 @@ Actor.on;
|
|
|
254
254
|
abstract send(event): void;
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
257
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L223)
|
|
258
258
|
|
|
259
259
|
Send event to Actor
|
|
260
260
|
|
|
@@ -351,13 +351,13 @@ Subscribe an observer to an actor’s snapshot values.
|
|
|
351
351
|
|
|
352
352
|
##### Parameters
|
|
353
353
|
|
|
354
|
-
| Parameter | Type
|
|
355
|
-
| ---------- |
|
|
356
|
-
| `observer` | `Observer
|
|
354
|
+
| Parameter | Type | Description |
|
|
355
|
+
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
356
|
+
| `observer` | [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\> | Either a plain function that receives the latest snapshot, or an observer object whose `.next(snapshot)` method receives the latest snapshot |
|
|
357
357
|
|
|
358
358
|
##### Returns
|
|
359
359
|
|
|
360
|
-
`Subscription`
|
|
360
|
+
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
361
361
|
|
|
362
362
|
##### Remarks
|
|
363
363
|
|
|
@@ -437,7 +437,7 @@ Subscribe an observer to an actor’s snapshot values.
|
|
|
437
437
|
|
|
438
438
|
##### Returns
|
|
439
439
|
|
|
440
|
-
`Subscription`
|
|
440
|
+
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
441
441
|
|
|
442
442
|
##### Remarks
|
|
443
443
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Routable
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L41)
|
|
6
6
|
|
|
7
7
|
Optional capability: Routing support
|
|
8
8
|
|
|
@@ -26,4 +26,4 @@ function connectRouter<T extends AbstractActor & Routable>(actor: T) {
|
|
|
26
26
|
|
|
27
27
|
| Property | Modifier | Type | Description | Defined in |
|
|
28
28
|
| ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
-
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | Current route signal Computed signal derived from state machine. Infrastructure observes to sync browser URL. Invariant: Passive Infrastructure - Infrastructure reflects route, never decides. **Example** `const watcher = new Signal.subtle.Watcher(() => { const route = actor.currentRoute.get(); console.log('Route changed:', route); }); watcher.watch(actor.currentRoute);` | [packages/play-actor/src/abstract-actor.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
29
|
+
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | Current route signal Computed signal derived from state machine. Infrastructure observes to sync browser URL. Invariant: Passive Infrastructure - Infrastructure reflects route, never decides. **Example** `const watcher = new Signal.subtle.Watcher(() => { const route = actor.currentRoute.get(); console.log('Route changed:', route); }); watcher.watch(actor.currentRoute);` | [packages/play-actor/src/abstract-actor.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L58) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewMetadata
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L87)
|
|
6
6
|
|
|
7
7
|
View metadata for rendering
|
|
8
8
|
|
|
@@ -13,5 +13,5 @@ Used by PlayRenderer to dynamically render UI based on actor state.
|
|
|
13
13
|
|
|
14
14
|
| Property | Type | Description | Defined in |
|
|
15
15
|
| ------------------------------------------- | ------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
-
| <a id="property-component"></a> `component` | `string` | Name of the component to render from the catalog | [packages/play-actor/src/abstract-actor.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
17
|
-
| <a id="property-props"></a> `props` | `Record`\<`string`, `unknown`\> | Props to pass to the component | [packages/play-actor/src/abstract-actor.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
16
|
+
| <a id="property-component"></a> `component` | `string` | Name of the component to render from the catalog | [packages/play-actor/src/abstract-actor.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L89) |
|
|
17
|
+
| <a id="property-props"></a> `props` | `Record`\<`string`, `unknown`\> | Props to pass to the component | [packages/play-actor/src/abstract-actor.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L91) |
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Viewable
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L94)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
9
|
| Property | Modifier | Type | Description | Defined in |
|
|
10
10
|
| ----------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
11
|
-
| <a id="property-catalog"></a> `catalog` | `readonly` | `Record`\<`string`, `unknown`\> | Component catalog for view resolution Maps component names to actual component implementations. Used by renderers to resolve view.component to actual UI components. | [packages/play-actor/src/abstract-actor.ts:119](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
12
|
-
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal State signal containing UI structure schema from meta.view. Infrastructure renders view. Invariant: Logic-Driven UI - View structure is defined by business logic, not JSX. **Example** `const watcher = new Signal.subtle.Watcher(() => { const view = actor.currentView.get(); console.log('View changed:', view); }); watcher.watch(actor.currentView);` | [packages/play-actor/src/abstract-actor.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
11
|
+
| <a id="property-catalog"></a> `catalog` | `readonly` | `Record`\<`string`, `unknown`\> | Component catalog for view resolution Maps component names to actual component implementations. Used by renderers to resolve view.component to actual UI components. | [packages/play-actor/src/abstract-actor.ts:119](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L119) |
|
|
12
|
+
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal State signal containing UI structure schema from meta.view. Infrastructure renders view. Invariant: Logic-Driven UI - View structure is defined by business logic, not JSX. **Example** `const watcher = new Signal.subtle.Watcher(() => { const view = actor.currentView.get(); console.log('View changed:', view); }); watcher.watch(actor.currentView);` | [packages/play-actor/src/abstract-actor.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-actor/src/abstract-actor.ts#L111) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineCatalog<TCatalog>(schemas): TCatalog;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [define-catalog.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [define-catalog.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/define-catalog.ts#L74)
|
|
10
10
|
|
|
11
11
|
Define component catalog with Zod schemas for type-safe UI projection
|
|
12
12
|
|
|
@@ -9,7 +9,7 @@ function defineComponents<TCatalog, TComponents>(
|
|
|
9
9
|
): NoExtraKeys<TComponents, TCatalog>;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [define-components.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
12
|
+
Defined in: [define-components.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/define-components.ts#L116)
|
|
13
13
|
|
|
14
14
|
Define components matching catalog schema with compile-time validation
|
|
15
15
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Catalog<TCatalog> = TCatalog;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/types.ts#L35)
|
|
10
10
|
|
|
11
11
|
Component catalog mapping component names to Zod prop schemas
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type ComponentsFor<TCatalog> = { [K in keyof TCatalog]: unknown };
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [define-components.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [define-components.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/define-components.ts#L10)
|
|
10
10
|
|
|
11
11
|
Component map type enforcing catalog keys
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type InferComponentProps<TCatalog, TKey> = z.infer<TCatalog[TKey]>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/types.ts#L84)
|
|
10
10
|
|
|
11
11
|
Infer component prop types from catalog entry
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@ type NoExtraKeys<TComponents, TCatalog> = TComponents &
|
|
|
7
7
|
Record<Exclude<keyof TComponents, keyof TCatalog>, never>;
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Defined in: [define-components.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
10
|
+
Defined in: [define-components.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-catalog/src/define-components.ts#L14)
|
|
11
11
|
|
|
12
12
|
## Type Parameters
|
|
13
13
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayErrorBoundary
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L49)
|
|
6
6
|
|
|
7
7
|
React class component error boundary for catching catalog component render errors.
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@ Per CONS-14: Class component pattern works with all React versions (18 and 19).
|
|
|
32
32
|
new PlayErrorBoundary(props): PlayErrorBoundary;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
35
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L53)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -71,7 +71,7 @@ React.Component<
|
|
|
71
71
|
componentDidCatch(error, info): void;
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
74
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L62)
|
|
75
75
|
|
|
76
76
|
Catches exceptions generated in descendant components. Unhandled exceptions will cause
|
|
77
77
|
the entire component tree to unmount.
|
|
@@ -160,11 +160,11 @@ optional componentWillMount(): void;
|
|
|
160
160
|
|
|
161
161
|
Defined in: node_modules/@types/react/index.d.ts:1277
|
|
162
162
|
|
|
163
|
-
Called immediately before mounting occurs, and before Component.render.
|
|
163
|
+
Called immediately before mounting occurs, and before [Component.render](https://www.jsdocs.io/package/@types/react#Component.render).
|
|
164
164
|
Avoid introducing any side-effects or subscriptions in this method.
|
|
165
165
|
|
|
166
166
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
167
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
167
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
168
168
|
this from being invoked.
|
|
169
169
|
|
|
170
170
|
#### Returns
|
|
@@ -203,7 +203,7 @@ props if you only want to handle changes.
|
|
|
203
203
|
Calling [Component.setState](#setstate) generally does not trigger this method.
|
|
204
204
|
|
|
205
205
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
206
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
206
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
207
207
|
this from being invoked.
|
|
208
208
|
|
|
209
209
|
#### Parameters
|
|
@@ -219,7 +219,7 @@ this from being invoked.
|
|
|
219
219
|
|
|
220
220
|
#### Deprecated
|
|
221
221
|
|
|
222
|
-
16.3, use static StaticLifecycle.getDerivedStateFromProps
|
|
222
|
+
16.3, use static [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) instead; will stop working in React 17
|
|
223
223
|
|
|
224
224
|
#### See
|
|
225
225
|
|
|
@@ -273,7 +273,7 @@ Called immediately before rendering when new props or state is received. Not cal
|
|
|
273
273
|
Note: You cannot call [Component.setState](#setstate) here.
|
|
274
274
|
|
|
275
275
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
276
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
276
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
277
277
|
this from being invoked.
|
|
278
278
|
|
|
279
279
|
#### Parameters
|
|
@@ -339,9 +339,9 @@ optional getSnapshotBeforeUpdate(prevProps, prevState): any;
|
|
|
339
339
|
|
|
340
340
|
Defined in: node_modules/@types/react/index.d.ts:1255
|
|
341
341
|
|
|
342
|
-
Runs before React applies the result of Component.render
|
|
342
|
+
Runs before React applies the result of [render](https://www.jsdocs.io/package/@types/react#Component.render) to the document, and
|
|
343
343
|
returns an object to be given to [componentDidUpdate](#componentdidupdate). Useful for saving
|
|
344
|
-
things such as scroll position before Component.render
|
|
344
|
+
things such as scroll position before [render](https://www.jsdocs.io/package/@types/react#Component.render) causes changes to it.
|
|
345
345
|
|
|
346
346
|
Note: the presence of this method prevents any of the deprecated
|
|
347
347
|
lifecycle events from running.
|
|
@@ -371,7 +371,7 @@ React.Component.getSnapshotBeforeUpdate;
|
|
|
371
371
|
render(): ReactNode;
|
|
372
372
|
```
|
|
373
373
|
|
|
374
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
374
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L67)
|
|
375
375
|
|
|
376
376
|
#### Returns
|
|
377
377
|
|
|
@@ -435,7 +435,7 @@ Called to determine whether the change in props and state should trigger a re-re
|
|
|
435
435
|
`PureComponent` implements a shallow comparison on props and state and returns true if any
|
|
436
436
|
props or states have changed.
|
|
437
437
|
|
|
438
|
-
If false is returned, Component.render, `componentWillUpdate`
|
|
438
|
+
If false is returned, [Component.render](https://www.jsdocs.io/package/@types/react#Component.render), `componentWillUpdate`
|
|
439
439
|
and `componentDidUpdate` will not be called.
|
|
440
440
|
|
|
441
441
|
#### Parameters
|
|
@@ -466,13 +466,13 @@ optional UNSAFE_componentWillMount(): void;
|
|
|
466
466
|
|
|
467
467
|
Defined in: node_modules/@types/react/index.d.ts:1292
|
|
468
468
|
|
|
469
|
-
Called immediately before mounting occurs, and before Component.render.
|
|
469
|
+
Called immediately before mounting occurs, and before [Component.render](https://www.jsdocs.io/package/@types/react#Component.render).
|
|
470
470
|
Avoid introducing any side-effects or subscriptions in this method.
|
|
471
471
|
|
|
472
472
|
This method will not stop working in React 17.
|
|
473
473
|
|
|
474
474
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
475
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
475
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
476
476
|
this from being invoked.
|
|
477
477
|
|
|
478
478
|
#### Returns
|
|
@@ -513,7 +513,7 @@ Calling [Component.setState](#setstate) generally does not trigger this method.
|
|
|
513
513
|
This method will not stop working in React 17.
|
|
514
514
|
|
|
515
515
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
516
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
516
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
517
517
|
this from being invoked.
|
|
518
518
|
|
|
519
519
|
#### Parameters
|
|
@@ -529,7 +529,7 @@ this from being invoked.
|
|
|
529
529
|
|
|
530
530
|
#### Deprecated
|
|
531
531
|
|
|
532
|
-
16.3, use static StaticLifecycle.getDerivedStateFromProps
|
|
532
|
+
16.3, use static [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) instead
|
|
533
533
|
|
|
534
534
|
#### See
|
|
535
535
|
|
|
@@ -562,7 +562,7 @@ Note: You cannot call [Component.setState](#setstate) here.
|
|
|
562
562
|
This method will not stop working in React 17.
|
|
563
563
|
|
|
564
564
|
Note: the presence of [getSnapshotBeforeUpdate](#getsnapshotbeforeupdate)
|
|
565
|
-
or StaticLifecycle.getDerivedStateFromProps
|
|
565
|
+
or [getDerivedStateFromProps](https://www.jsdocs.io/package/@types/react#StaticLifecycle.getDerivedStateFromProps) prevents
|
|
566
566
|
this from being invoked.
|
|
567
567
|
|
|
568
568
|
#### Parameters
|
|
@@ -600,7 +600,7 @@ React.Component.UNSAFE_componentWillUpdate;
|
|
|
600
600
|
static getDerivedStateFromError(error): PlayErrorBoundaryState;
|
|
601
601
|
```
|
|
602
602
|
|
|
603
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
603
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L58)
|
|
604
604
|
|
|
605
605
|
#### Parameters
|
|
606
606
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useSignalEffect(callback): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/useSignalEffect.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/src/useSignalEffect.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/useSignalEffect.ts#L65)
|
|
10
10
|
|
|
11
11
|
React hook that subscribes to signal changes and runs effect callback
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayErrorBoundaryProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L14)
|
|
6
6
|
|
|
7
7
|
Props for PlayErrorBoundary
|
|
8
8
|
|
|
@@ -10,6 +10,6 @@ Props for PlayErrorBoundary
|
|
|
10
10
|
|
|
11
11
|
| Property | Type | Description | Defined in |
|
|
12
12
|
| ------------------------------------------ | --------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
-
| <a id="property-children"></a> `children` | `ReactNode` | Child components to render | [packages/play-react/src/PlayErrorBoundary.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
-
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Fallback UI to render when a child component throws. Defaults to null. | [packages/play-react/src/PlayErrorBoundary.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
15
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `info`) => `void` | Optional error handler callback — forwards errors to observability tools (Sentry, etc.) | [packages/play-react/src/PlayErrorBoundary.tsx:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
13
|
+
| <a id="property-children"></a> `children` | `ReactNode` | Child components to render | [packages/play-react/src/PlayErrorBoundary.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L18) |
|
|
14
|
+
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Fallback UI to render when a child component throws. Defaults to null. | [packages/play-react/src/PlayErrorBoundary.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L16) |
|
|
15
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `info`) => `void` | Optional error handler callback — forwards errors to observability tools (Sentry, etc.) | [packages/play-react/src/PlayErrorBoundary.tsx:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L20) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayErrorBoundaryState
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L28)
|
|
6
6
|
|
|
7
7
|
Internal state shape for PlayErrorBoundary
|
|
8
8
|
|
|
@@ -10,5 +10,5 @@ Internal state shape for PlayErrorBoundary
|
|
|
10
10
|
|
|
11
11
|
| Property | Type | Defined in |
|
|
12
12
|
| ----------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
-
| <a id="property-error"></a> `error` | `Error` \| `null` | [packages/play-react/src/PlayErrorBoundary.tsx:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
-
| <a id="property-haserror"></a> `hasError` | `boolean` | [packages/play-react/src/PlayErrorBoundary.tsx:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
13
|
+
| <a id="property-error"></a> `error` | `Error` \| `null` | [packages/play-react/src/PlayErrorBoundary.tsx:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L30) |
|
|
14
|
+
| <a id="property-haserror"></a> `hasError` | `boolean` | [packages/play-react/src/PlayErrorBoundary.tsx:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayErrorBoundary.tsx#L29) |
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRendererProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-react/src/types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/types.ts#L18)
|
|
6
6
|
|
|
7
7
|
Props for PlayRenderer component
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
| Property | Type
|
|
12
|
-
| --------------------------------------------- |
|
|
13
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)
|
|
14
|
-
| <a id="property-components"></a> `components` | `Record`\<`string`, `React.ElementType`\>
|
|
15
|
-
| <a id="property-fallback"></a> `fallback?` | `ReactNode`
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-react/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/types.ts#L20) |
|
|
14
|
+
| <a id="property-components"></a> `components` | `Record`\<`string`, `React.ElementType`\> | Map of component names to React components | [packages/play-react/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/types.ts#L23) |
|
|
15
|
+
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Optional component shown when currentView is null | [packages/play-react/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/types.ts#L26) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const PlayRenderer: React.FC<PlayRendererProps>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/PlayRenderer.tsx:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/src/PlayRenderer.tsx:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/8aa0643f9736fab0deae2851a2d403008d4412ed/packages/play-react/src/PlayRenderer.tsx#L61)
|
|
10
10
|
|
|
11
11
|
Main renderer component that subscribes to actor signals and renders UI
|
|
12
12
|
|