scene
The Mix Scenes document core, with no renderer and no interpreter. A scene
is a --- envelope of headers followed by one ```mix fence
holding a strict-data map of nodes:
---
scene: 1
name: about-panel
citizen: about-citizen
model: {"title":"About"}
---
```mix
root: {widget: "column", gap: 8, children: ["title"]}
title: {widget: "text", text: "= $model.title", size: 18, bold: true}
```
The crate provides:
parseto aSceneDocument,lintfor every diagnostic (codes inALL_CODES),resolveto aResolvedScenewith defaults filled and bindings evaluated,diffbetween two resolved trees,describefor a family's ports, andto_sourceto write a document back out;bindings:= expressionports compiled once (compile), re-evaluated on a model patch (reevaluate) and instantiated per list row (template_instantiate_with);evaluator: theEvaluatortrait the bindings go through, implemented byExprEvaluatorover the expr crate and used by default;fixtures: the test documents, exported for hosts' tests.
The node fence is parsed by strict and never
executed. A binding may read $model anywhere and $item inside a list
template; calls, assignments, statements and shell or Bus forms are refused
at compile time with binding-policy.
Window declarations accept kind:"edge", kind:"dialog" and
kind:"toast". Toasts are pointer-only overlays in compd, with optional
w, h, title and chrome (false by default). The host clamps their
geometry and manages visibility through its
toast verbs.
Test: cargo test -p scene.
The source is libs/scene.