Interface: StructureNode
Defined in: packages/core/src/model.ts:238
A node in an authored structure tree (@structure), written as nested CSS: a compound selector for the element and its children (the rules nested inside it). Emitters render the tree and, via toMermaid, a diagram.
Properties
cardinality?
optional cardinality?: "optional" | "many" | "one-or-more";Defined in: packages/core/src/model.ts:248
How often the child may appear, from a trailing pseudo on the selector: :optional/:opt (0..1), :many (0..n), or :one-or-more/:more (1..n). Absent means the child is required (present when the component is used). A pseudo, not a /* … */ comment, because @structure lives inside a doc comment where comments can't nest; an unknown pseudo is valid selector syntax and is stripped from the stored selector.
children
children: StructureNode[];Defined in: packages/core/src/model.ts:259
Child nodes (rules nested one brace level deeper).
colocated?
optional colocated?: string;Defined in: packages/core/src/model.ts:255
The full single-selector argument from a :is(…) compound — means this element itself carries that selector (co-location, not containment). E.g. .pfx-card, button, #id, [attr="val"].
description?
optional description?: string;Defined in: packages/core/src/model.ts:257
Prose from a @wrapper doc tag matching this node's class, when authored (annotates the node).
scope?
optional scope?: string;Defined in: packages/core/src/model.ts:253
When present, this node is a @scope boundary. The value is the @scope prelude, e.g. (.component) from @scope (.component) { … }.
selector
selector: string;Defined in: packages/core/src/model.ts:240
The node's compound selector, e.g. .tabs, .tab.-selected, or .list:has(.tab). Empty string for @scope boundary nodes.