pub struct Node {
pub kind: Kind,
pub parent: Option<u32>,
pub children: Vec<u32>,
pub text: Option<String>,
pub style: Style,
pub attributes: Vec<(String, AttrValue)>,
pub is_static: bool,
pub is_hidden: bool,
pub has_transform: bool,
pub text_styling: Option<TextStyle>,
}Expand description
A single node in the arena.
Mirrors the union of DOMElement + TextNode from dom.ts (dom.ts:27-81).
Fields common to both are always present; text is meaningful only on
Text and VirtualText kinds (where ink stores it in a child #text
node — folded here per task spec).
Fields§
§kind: Kind§parent: Option<u32>§children: Vec<u32>§text: Option<String>Text content. Mirrors TextNode.nodeValue (dom.ts:79-81).
For Text/VirtualText nodes. No-op field on Root/Box.
style: StyleLayout and visual style for this node.
attributes: Vec<(String, AttrValue)>String/bool/number attributes — mirrors DOMElement.attributes
(dom.ts:29). Does NOT include internal_transform or
internal_static; those are separate flags per the reconciler
(reconciler.ts:231-245).
is_static: boolinternal_static flag (reconciler.ts:237-244).
Set by Hide/Unhide ops. The actual yoga display effect is JS-side.
has_transform: boolinternal_transform presence flag (reconciler.ts:231-235).
The transform function itself stays JS-side per the FFI design.
text_styling: Option<TextStyle>Inline text styling (P5.1 SET_TEXT_STYLE). Read by the render walk via
resolve_transform to compose SGR natively. None until a SetTextStyle
op writes it; reset to None by ClearTextStyle on a styled→plain
rerender (P6.2).