@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,520 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-actor](../README.md) / AbstractActor
|
|
2
|
+
|
|
3
|
+
# Abstract Class: AbstractActor\<TLogic\>
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:179](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L179)
|
|
6
|
+
|
|
7
|
+
Abstract base class for Play Architecture actors.
|
|
8
|
+
|
|
9
|
+
Extends XState Actor to maintain ecosystem compatibility (inspection, devtools)
|
|
10
|
+
while enforcing minimal signal protocol for Actor ↔ Infrastructure communication.
|
|
11
|
+
|
|
12
|
+
The core protocol contains only:
|
|
13
|
+
|
|
14
|
+
- state: Reactive state snapshot
|
|
15
|
+
- send: Event dispatch method
|
|
16
|
+
|
|
17
|
+
Optional capabilities (routing, view rendering) are provided via interfaces:
|
|
18
|
+
|
|
19
|
+
- Implement Routable for routing support
|
|
20
|
+
- Implement Viewable for view rendering support
|
|
21
|
+
|
|
22
|
+
Concrete implementations created by @xmachines/play-xstate adapter.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
Simple actor (no routing, no view)
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
class SimpleActor extends AbstractActor<AnyActorLogic> {
|
|
30
|
+
state = new Signal.State({...});
|
|
31
|
+
send(event) { ... }
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Routable actor
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
class RoutableActor extends AbstractActor<AnyActorLogic> implements Routable {
|
|
39
|
+
state = new Signal.State({...});
|
|
40
|
+
currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
|
|
41
|
+
send(event) { ... }
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Full-featured actor (routing + view)
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
class PlayerActor extends AbstractActor<AnyActorLogic> implements Routable, Viewable {
|
|
49
|
+
state = new Signal.State({...});
|
|
50
|
+
currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
|
|
51
|
+
currentView = new Signal.State(null);
|
|
52
|
+
catalog = {};
|
|
53
|
+
send(event) { ... }
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## See
|
|
58
|
+
|
|
59
|
+
- [RFC Play v1 Section 5.3](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md#53-actor-protocol)
|
|
60
|
+
- [Routable](../interfaces/Routable.md) for routing capability
|
|
61
|
+
- [Viewable](../interfaces/Viewable.md) for view rendering capability
|
|
62
|
+
|
|
63
|
+
## Extends
|
|
64
|
+
|
|
65
|
+
- `Actor`\<`TLogic`\>
|
|
66
|
+
|
|
67
|
+
## Extended by
|
|
68
|
+
|
|
69
|
+
- [`PlayerActor`](../../play-xstate/classes/PlayerActor.md)
|
|
70
|
+
|
|
71
|
+
## Type Parameters
|
|
72
|
+
|
|
73
|
+
| Type Parameter | Description |
|
|
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. |
|
|
76
|
+
|
|
77
|
+
## Constructors
|
|
78
|
+
|
|
79
|
+
### Constructor
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
new AbstractActor<TLogic>(logic, options?): AbstractActor<TLogic>;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:50
|
|
86
|
+
|
|
87
|
+
Creates a new actor instance for the given logic with the provided options,
|
|
88
|
+
if any.
|
|
89
|
+
|
|
90
|
+
#### Parameters
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Description |
|
|
93
|
+
| ---------- | -------------------------- | --------------------------------- |
|
|
94
|
+
| `logic` | `TLogic` | The logic to create an actor from |
|
|
95
|
+
| `options?` | `ActorOptions`\<`TLogic`\> | Actor options |
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`AbstractActor`\<`TLogic`\>
|
|
100
|
+
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
Actor<TLogic>.constructor
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Properties
|
|
108
|
+
|
|
109
|
+
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
110
|
+
| ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
111
|
+
| <a id="property-_parent"></a> `_parent?` | `public` | `AnyActorRef` | - | `Actor._parent` | node_modules/xstate/dist/declarations/src/createActor.d.ts:33 |
|
|
112
|
+
| <a id="property-clock"></a> `clock` | `public` | `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`\<`TLogic`\>\> | - | `Actor.options` | node_modules/xstate/dist/declarations/src/createActor.d.ts:26 |
|
|
116
|
+
| <a id="property-ref"></a> `ref` | `public` | `ActorRef`\<`SnapshotFrom`\<`TLogic`\>, `EventFromLogic`\<`TLogic`\>, `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` | - | `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/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L199) |
|
|
120
|
+
| <a id="property-system"></a> `system` | `public` | `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
|
+
|
|
123
|
+
## Methods
|
|
124
|
+
|
|
125
|
+
### \[observable\]()
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
observable: InteropSubscribable<SnapshotFrom<TLogic>>;
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:153
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`InteropSubscribable`\<`SnapshotFrom`\<`TLogic`\>\>
|
|
136
|
+
|
|
137
|
+
#### Inherited from
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
Actor.[observable]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### getPersistedSnapshot()
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
getPersistedSnapshot(): Snapshot<unknown>;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:152
|
|
152
|
+
|
|
153
|
+
Obtain the internal state of the actor, which can be persisted.
|
|
154
|
+
|
|
155
|
+
#### Returns
|
|
156
|
+
|
|
157
|
+
`Snapshot`\<`unknown`\>
|
|
158
|
+
|
|
159
|
+
#### Remarks
|
|
160
|
+
|
|
161
|
+
The internal state can be persisted from any actor, not only machines.
|
|
162
|
+
|
|
163
|
+
Note that the persisted state is not the same as the snapshot from
|
|
164
|
+
[Actor.getSnapshot](#getsnapshot). Persisted state represents the internal state of
|
|
165
|
+
the actor, while snapshots represent the actor's last emitted value.
|
|
166
|
+
|
|
167
|
+
Can be restored with [ActorOptions.state](#)
|
|
168
|
+
|
|
169
|
+
#### See
|
|
170
|
+
|
|
171
|
+
https://stately.ai/docs/persistence
|
|
172
|
+
|
|
173
|
+
#### Inherited from
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
Actor.getPersistedSnapshot;
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### getSnapshot()
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
getSnapshot(): SnapshotFrom<TLogic>;
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:168
|
|
188
|
+
|
|
189
|
+
Read an actor’s snapshot synchronously.
|
|
190
|
+
|
|
191
|
+
#### Returns
|
|
192
|
+
|
|
193
|
+
`SnapshotFrom`\<`TLogic`\>
|
|
194
|
+
|
|
195
|
+
#### Remarks
|
|
196
|
+
|
|
197
|
+
The snapshot represent an actor's last emitted value.
|
|
198
|
+
|
|
199
|
+
When an actor receives an event, its internal state may change. An actor
|
|
200
|
+
may emit a snapshot when a state transition occurs.
|
|
201
|
+
|
|
202
|
+
Note that some actors, such as callback actors generated with
|
|
203
|
+
`fromCallback`, will not emit snapshots.
|
|
204
|
+
|
|
205
|
+
#### See
|
|
206
|
+
|
|
207
|
+
- [Actor.subscribe](#subscribe) to subscribe to an actor’s snapshot values.
|
|
208
|
+
- [Actor.getPersistedSnapshot](#getpersistedsnapshot) to persist the internal state of an actor (which is more than just a snapshot).
|
|
209
|
+
|
|
210
|
+
#### Inherited from
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
Actor.getSnapshot;
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### on()
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
on<TType>(type, handler): Subscription;
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:115
|
|
225
|
+
|
|
226
|
+
#### Type Parameters
|
|
227
|
+
|
|
228
|
+
| Type Parameter |
|
|
229
|
+
| ----------------------- |
|
|
230
|
+
| `TType` _extends_ `any` |
|
|
231
|
+
|
|
232
|
+
#### Parameters
|
|
233
|
+
|
|
234
|
+
| Parameter | Type |
|
|
235
|
+
| --------- | --------------------- |
|
|
236
|
+
| `type` | `TType` |
|
|
237
|
+
| `handler` | (`emitted`) => `void` |
|
|
238
|
+
|
|
239
|
+
#### Returns
|
|
240
|
+
|
|
241
|
+
`Subscription`
|
|
242
|
+
|
|
243
|
+
#### Inherited from
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
Actor.on;
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### send()
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
abstract send(event): void;
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L223)
|
|
258
|
+
|
|
259
|
+
Send event to Actor
|
|
260
|
+
|
|
261
|
+
Infrastructure forwards user intents (navigation, domain events, custom events)
|
|
262
|
+
as events to the Actor. The Actor's state machine guards determine whether
|
|
263
|
+
each event is valid from the current state.
|
|
264
|
+
|
|
265
|
+
#### Parameters
|
|
266
|
+
|
|
267
|
+
| Parameter | Type | Description |
|
|
268
|
+
| --------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
269
|
+
| `event` | `object` & `Record`\<`string`, `unknown`\> | Event object with type property (e.g., PlayEvent, PlayRouteEvent) Invariant: Actor Authority - Only Actor decides whether an event is valid. |
|
|
270
|
+
|
|
271
|
+
#### Returns
|
|
272
|
+
|
|
273
|
+
`void`
|
|
274
|
+
|
|
275
|
+
#### Example
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
// Infrastructure forwards user intent
|
|
279
|
+
actor.send({ type: "auth.login", userId: "123" });
|
|
280
|
+
// Actor's guards determine if event is allowed
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
#### Remarks
|
|
284
|
+
|
|
285
|
+
Accepts any event object with a type property. Core events (PlayEvent) are in
|
|
286
|
+
@xmachines/play, routing events (PlayRouteEvent) are in @xmachines/play-router.
|
|
287
|
+
|
|
288
|
+
#### Overrides
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
Actor.send;
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
### start()
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
start(): this;
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:119
|
|
303
|
+
|
|
304
|
+
Starts the Actor from the initial state
|
|
305
|
+
|
|
306
|
+
#### Returns
|
|
307
|
+
|
|
308
|
+
`this`
|
|
309
|
+
|
|
310
|
+
#### Inherited from
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
Actor.start;
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
### stop()
|
|
319
|
+
|
|
320
|
+
```ts
|
|
321
|
+
stop(): this;
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:123
|
|
325
|
+
|
|
326
|
+
Stops the Actor and unsubscribe all listeners.
|
|
327
|
+
|
|
328
|
+
#### Returns
|
|
329
|
+
|
|
330
|
+
`this`
|
|
331
|
+
|
|
332
|
+
#### Inherited from
|
|
333
|
+
|
|
334
|
+
```ts
|
|
335
|
+
Actor.stop;
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
### subscribe()
|
|
341
|
+
|
|
342
|
+
#### Call Signature
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
subscribe(observer): Subscription;
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:113
|
|
349
|
+
|
|
350
|
+
Subscribe an observer to an actor’s snapshot values.
|
|
351
|
+
|
|
352
|
+
##### Parameters
|
|
353
|
+
|
|
354
|
+
| Parameter | Type | Description |
|
|
355
|
+
| ---------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
356
|
+
| `observer` | `Observer`\<`SnapshotFrom`\<`TLogic`\>\> | Either a plain function that receives the latest snapshot, or an observer object whose `.next(snapshot)` method receives the latest snapshot |
|
|
357
|
+
|
|
358
|
+
##### Returns
|
|
359
|
+
|
|
360
|
+
`Subscription`
|
|
361
|
+
|
|
362
|
+
##### Remarks
|
|
363
|
+
|
|
364
|
+
The observer will receive the actor’s snapshot value when it is emitted.
|
|
365
|
+
The observer can be:
|
|
366
|
+
|
|
367
|
+
- A plain function that receives the latest snapshot, or
|
|
368
|
+
- An observer object whose `.next(snapshot)` method receives the latest
|
|
369
|
+
snapshot
|
|
370
|
+
|
|
371
|
+
##### Examples
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
// Observer as a plain function
|
|
375
|
+
const subscription = actor.subscribe((snapshot) => {
|
|
376
|
+
console.log(snapshot);
|
|
377
|
+
});
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
// Observer as an object
|
|
382
|
+
const subscription = actor.subscribe({
|
|
383
|
+
next(snapshot) {
|
|
384
|
+
console.log(snapshot);
|
|
385
|
+
},
|
|
386
|
+
error(err) {
|
|
387
|
+
// ...
|
|
388
|
+
},
|
|
389
|
+
complete() {
|
|
390
|
+
// ...
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
The return value of `actor.subscribe(observer)` is a subscription object
|
|
396
|
+
that has an `.unsubscribe()` method. You can call
|
|
397
|
+
`subscription.unsubscribe()` to unsubscribe the observer:
|
|
398
|
+
|
|
399
|
+
```ts
|
|
400
|
+
const subscription = actor.subscribe((snapshot) => {
|
|
401
|
+
// ...
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
// Unsubscribe the observer
|
|
405
|
+
subscription.unsubscribe();
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
When the actor is stopped, all of its observers will automatically be
|
|
409
|
+
unsubscribed.
|
|
410
|
+
|
|
411
|
+
##### Inherited from
|
|
412
|
+
|
|
413
|
+
```ts
|
|
414
|
+
Actor.subscribe;
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
#### Call Signature
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
subscribe(
|
|
421
|
+
nextListener?,
|
|
422
|
+
errorListener?,
|
|
423
|
+
completeListener?): Subscription;
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:114
|
|
427
|
+
|
|
428
|
+
Subscribe an observer to an actor’s snapshot values.
|
|
429
|
+
|
|
430
|
+
##### Parameters
|
|
431
|
+
|
|
432
|
+
| Parameter | Type |
|
|
433
|
+
| ------------------- | ---------------------- |
|
|
434
|
+
| `nextListener?` | (`snapshot`) => `void` |
|
|
435
|
+
| `errorListener?` | (`error`) => `void` |
|
|
436
|
+
| `completeListener?` | () => `void` |
|
|
437
|
+
|
|
438
|
+
##### Returns
|
|
439
|
+
|
|
440
|
+
`Subscription`
|
|
441
|
+
|
|
442
|
+
##### Remarks
|
|
443
|
+
|
|
444
|
+
The observer will receive the actor’s snapshot value when it is emitted.
|
|
445
|
+
The observer can be:
|
|
446
|
+
|
|
447
|
+
- A plain function that receives the latest snapshot, or
|
|
448
|
+
- An observer object whose `.next(snapshot)` method receives the latest
|
|
449
|
+
snapshot
|
|
450
|
+
|
|
451
|
+
##### Examples
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
// Observer as a plain function
|
|
455
|
+
const subscription = actor.subscribe((snapshot) => {
|
|
456
|
+
console.log(snapshot);
|
|
457
|
+
});
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
```ts
|
|
461
|
+
// Observer as an object
|
|
462
|
+
const subscription = actor.subscribe({
|
|
463
|
+
next(snapshot) {
|
|
464
|
+
console.log(snapshot);
|
|
465
|
+
},
|
|
466
|
+
error(err) {
|
|
467
|
+
// ...
|
|
468
|
+
},
|
|
469
|
+
complete() {
|
|
470
|
+
// ...
|
|
471
|
+
},
|
|
472
|
+
});
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
The return value of `actor.subscribe(observer)` is a subscription object
|
|
476
|
+
that has an `.unsubscribe()` method. You can call
|
|
477
|
+
`subscription.unsubscribe()` to unsubscribe the observer:
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
const subscription = actor.subscribe((snapshot) => {
|
|
481
|
+
// ...
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
// Unsubscribe the observer
|
|
485
|
+
subscription.unsubscribe();
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
When the actor is stopped, all of its observers will automatically be
|
|
489
|
+
unsubscribed.
|
|
490
|
+
|
|
491
|
+
##### Inherited from
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
Actor.subscribe;
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
### toJSON()
|
|
500
|
+
|
|
501
|
+
```ts
|
|
502
|
+
toJSON(): object;
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:135
|
|
506
|
+
|
|
507
|
+
#### Returns
|
|
508
|
+
|
|
509
|
+
`object`
|
|
510
|
+
|
|
511
|
+
| Name | Type | Defined in |
|
|
512
|
+
| -------------- | -------- | -------------------------------------------------------------- |
|
|
513
|
+
| `id` | `string` | node_modules/xstate/dist/declarations/src/createActor.d.ts:137 |
|
|
514
|
+
| `xstate$$type` | `number` | node_modules/xstate/dist/declarations/src/createActor.d.ts:136 |
|
|
515
|
+
|
|
516
|
+
#### Inherited from
|
|
517
|
+
|
|
518
|
+
```ts
|
|
519
|
+
Actor.toJSON;
|
|
520
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-actor](../README.md) / Routable
|
|
2
|
+
|
|
3
|
+
# Interface: Routable
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L41)
|
|
6
|
+
|
|
7
|
+
Optional capability: Routing support
|
|
8
|
+
|
|
9
|
+
Actors implementing this interface can derive a route from their state.
|
|
10
|
+
Router adapters observe the currentRoute signal to sync browser URLs.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
class MyActor extends AbstractActor implements Routable {
|
|
16
|
+
currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Router requires Routable
|
|
20
|
+
function connectRouter<T extends AbstractActor & Routable>(actor: T) {
|
|
21
|
+
watcher.watch(actor.currentRoute);
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Properties
|
|
26
|
+
|
|
27
|
+
| Property | Modifier | Type | Description | Defined in |
|
|
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/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L58) |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-actor](../README.md) / ViewMetadata
|
|
2
|
+
|
|
3
|
+
# Interface: ViewMetadata
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L87)
|
|
6
|
+
|
|
7
|
+
View metadata for rendering
|
|
8
|
+
|
|
9
|
+
Describes the component to be rendered and the props to pass to it.
|
|
10
|
+
Used by PlayRenderer to dynamically render UI based on actor state.
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
| Property | Type | Description | Defined in |
|
|
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/00a28432ed57807112288436d1ae4387d9f06919/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/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L91) |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-actor](../README.md) / Viewable
|
|
2
|
+
|
|
3
|
+
# Interface: Viewable
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L94)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Modifier | Type | Description | Defined in |
|
|
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/00a28432ed57807112288436d1ae4387d9f06919/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/00a28432ed57807112288436d1ae4387d9f06919/packages/play-actor/src/abstract-actor.ts#L111) |
|