Skip to content

rune-langium / visual-editor/src / AdapterNode

Interface: AdapterNode ​

Defined in: packages/visual-editor/src/adapters/structure-graph-adapter.ts:35

Properties ​

PropertyModifierTypeDescriptionDefined in
$typereadonly"Data" | "Choice" | "Enum" | "Record" | "TypeAlias" | "Function"-packages/visual-editor/src/adapters/structure-graph-adapter.ts:37
annotations?readonlyreadonly string[]-packages/visual-editor/src/adapters/structure-graph-adapter.ts:85
attributes?readonlyreadonly (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&lt;AdapterAttribute&gt; 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?readonlyreadonly (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?readonlyreadonly { name: string; preview: string; }[]-packages/visual-editor/src/adapters/structure-graph-adapter.ts:86
deferred?readonlybooleanForwarded 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?readonlystringPhase 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?readonlystring-packages/visual-editor/src/adapters/structure-graph-adapter.ts:49
idreadonlystring-packages/visual-editor/src/adapters/structure-graph-adapter.ts:36
imports?readonlyreadonly NamespaceImport[]-packages/visual-editor/src/adapters/structure-graph-adapter.ts:40
inputs?readonlyreadonly (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
namereadonlystring-packages/visual-editor/src/adapters/structure-graph-adapter.ts:38
namespacereadonlystring-packages/visual-editor/src/adapters/structure-graph-adapter.ts:39
output?readonlyAdapterAttribute | nullPhase 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?readonlyreadonly { name: string; }[]-packages/visual-editor/src/adapters/structure-graph-adapter.ts:63

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.