rune-langium / visual-editor/src / AdapterNode
Interface: AdapterNode
Defined in: packages/visual-editor/src/adapters/structure-graph-adapter.ts:35
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
$type | readonly | "Data" | "Choice" | "Enum" | "Record" | "TypeAlias" | "Function" | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:37 |
annotations? | readonly | readonly string[] | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:85 |
attributes? | readonly | readonly (AdapterAttribute | null | undefined)[] | Data nodes carry their attributes here. Array entries may be null during partial-parse state (the user has typed attrs: but the parser hasn't materialized the entry yet); the adapter filters those out. Type widened from ReadonlyArray<AdapterAttribute> to ReadonlyArray<AdapterAttribute | null | undefined> so consumers reading the type as documentation see the true runtime contract (Copilot review on PR #219; the alternative would be to sanitize at the projection boundary, but the adapter is the canonical tolerator). | packages/visual-editor/src/adapters/structure-graph-adapter.ts:60 |
choiceOptions? | readonly | readonly (AdapterChoiceOption | null | undefined)[] | Choice nodes carry their arms here — real ChoiceOption AST shape (typeCall only, no name/card). | packages/visual-editor/src/adapters/structure-graph-adapter.ts:62 |
conditions? | readonly | readonly { name: string; preview: string; }[] | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:86 |
deferred? | readonly | boolean | Forwarded from GraphNodeMeta.deferred by graphNodesToAdapterDocument. True when this node is a deferred curated placeholder whose namespace hasn't been on-demand hydrated yet. Propagated onto the built StructureDataNode/Choice/Enum/Function so structure-view nodes can show the same hydrating-spinner treatment as the main graph canvas. | packages/visual-editor/src/adapters/structure-graph-adapter.ts:48 |
definition? | readonly | string | Phase A — type metadata projected from the store node by the studio (graphNodesToAdapterDocument). All optional: fallback / hydration nodes may omit them. definition is the doc string; annotations are display strings from annotationsToDisplay; conditions are { name, preview } pairs from conditionsToDisplay (Data only, in practice). The adapter forwards these onto the built StructureNode. | packages/visual-editor/src/adapters/structure-graph-adapter.ts:84 |
extends? | readonly | string | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:49 |
id | readonly | string | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:36 |
imports? | readonly | readonly NamespaceImport[] | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:40 |
inputs? | readonly | readonly (AdapterAttribute | null | undefined)[] | Phase C — Function nodes carry their input parameters here. Inputs are Attribute-shaped (same shape as Data attributes: name + typeCall + card), so they reuse AdapterAttribute. Array entries may be null during partial-parse; buildFunctionNode filters those out. | packages/visual-editor/src/adapters/structure-graph-adapter.ts:70 |
name | readonly | string | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:38 |
namespace | readonly | string | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:39 |
output? | readonly | AdapterAttribute | null | Phase C — a Function's (optional) output parameter, also Attribute-shaped. Null/undefined when the function declares no output. | packages/visual-editor/src/adapters/structure-graph-adapter.ts:75 |
values? | readonly | readonly { name: string; }[] | - | packages/visual-editor/src/adapters/structure-graph-adapter.ts:63 |