Interface: PlaySpec
API / @xmachines/play-actor / PlaySpec
Defined in: packages/play-actor/src/abstract-actor.ts:47
The XMachines extension of the Spec type of @xmachines/json-render-core.
Each derived view receives the machine context in its state store, under the
read-only /context subtree. A spec therefore reads the context through the
ordinary { $state: "/context/…" } grammar: in a prop, in a visible condition,
and in repeat.statePath. The store always holds the complete context, and a
spec reads only the paths that it needs.
Extends
Spec
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
elements | public | Record<string, UIElement> | Flat map of elements by key | Spec.elements | - |
root | public | string | Root element key | Spec.root | - |
state? | public | Record<string, unknown> | Optional initial state to seed the state model. Components using statePath will read from / write to this state. | Spec.state | - |
viewKey? | readonly | string | The identity of the view of this derived spec. deriveCurrentView sets it from the meta entry that the derivation selected. A provider uses it as the key of its store lifecycle: a new viewKey seeds the store again, and the same viewKey refreshes /context in place, which keeps the ephemeral view state. Never write this field in meta.view. | - | packages/play-actor/src/abstract-actor.ts:55 |