Interface: ViewMeta
API / @xmachines/play-view / index / ViewMeta
Defined in: packages/play-view/src/view-types.ts:32
The view that an author writes in meta.view: the Spec type of
@xmachines/json-render-core, and the outlets of a parent view.
It is not what a renderer receives. The view derivation turns it into a
PlaySpec: it consumes outlets, it projects the context under /context,
and it stamps viewKey. Validate the derived view, and not this one.
Extends
Spec
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
elements | public | Record<string, UIElement> | Flat map of elements by key | Spec.elements | - |
outlets? | readonly | Readonly<Record<string, ViewOutlet>> | The places where the views of the active substates go. Write this field in the meta.view of a PARENT state. The view derivation then renders the parent view and puts the view of each active child into the outlet of that child, so a layout and its page, or the regions of a parallel state, share one screen. Each key is the key of a child state in states, or "*" for each active child that has no entry of its own. A compound state fills one outlet with its active child. A parallel state fills one outlet for each region. | - | packages/play-view/src/view-types.ts:43 |
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 | - |