rune-langium / visual-editor/src / EditorActions
Interface: EditorActions
Defined in: packages/visual-editor/src/store/editor-store.ts:278
Extends
InspectorMetadataActions
Methods
activeHydrationNamespaces()
activeHydrationNamespaces(): string[];Defined in: packages/visual-editor/src/store/editor-store.ts:457
Namespaces that must be sent on EVERY parse (replacement-semantics worker): confirmed-hydrated plus in-flight pending, so a concurrent reparse can't evict a namespace mid-hydration.
Returns
string[]
addAnnotation()
addAnnotation(nodeId, annotationName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:430
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
annotationName | string |
Returns
void
addAttribute()
addAttribute(
nodeId,
attrName,
typeName,
cardinality
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:332
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
typeName | string |
cardinality | string |
Returns
void
addChoiceOption()
addChoiceOption(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:361
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
addCondition()
addCondition(nodeId, condition): void;Defined in: packages/visual-editor/src/store/editor-store.ts:402
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
condition | { definition?: string; expressionText: string; isPostCondition?: boolean; name?: string; } |
condition.definition? | string |
condition.expressionText | string |
condition.isPostCondition? | boolean |
condition.name? | string |
Returns
void
addEnumValue()
addEnumValue(
nodeId,
valueName,
displayName?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:352
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueName | string |
displayName? | string |
Returns
void
addEnumValueSynonym()
addEnumValueSynonym(
nodeId,
valueIndex,
source,
value
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:356
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueIndex | number |
source | string |
value | string |
Returns
void
addInputParam()
addInputParam(
nodeId,
paramName,
typeName
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:365
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
paramName | string |
typeName | string |
Returns
void
addSynonym()
addSynonym(
nodeId,
source,
value?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:426
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
source | string |
value? | string |
Returns
void
applyMetadataCommand()
applyMetadataCommand(target, command): MetadataEditResult;Defined in: packages/visual-editor/src/store/metadata-target.ts:76
Parameters
| Parameter | Type |
|---|---|
target | MetadataTarget |
command | MetadataCommand |
Returns
MetadataEditResult
Inherited from
InspectorMetadataActions.applyMetadataCommand
applyReactFlowEdgeChanges()
applyReactFlowEdgeChanges(changes): void;Defined in: packages/visual-editor/src/store/editor-store.ts:435
Parameters
| Parameter | Type |
|---|---|
changes | EdgeChange<TypeGraphEdge>[] |
Returns
void
applyReactFlowNodeChanges()
applyReactFlowNodeChanges(changes): void;Defined in: packages/visual-editor/src/store/editor-store.ts:434
Parameters
| Parameter | Type |
|---|---|
changes | NodeChange<TypeGraphNode>[] |
Returns
void
captureMetadataTarget()
captureMetadataTarget(nodeId, path): MetadataTarget | undefined;Defined in: packages/visual-editor/src/store/metadata-target.ts:75
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
path | MetadataPath |
Returns
MetadataTarget | undefined
Inherited from
InspectorMetadataActions.captureMetadataTarget
collapseAllNamespaces()
collapseAllNamespaces(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:302
Returns
void
createType()
createType(
kind,
name,
namespace
): string;Defined in: packages/visual-editor/src/store/editor-store.ts:329
Parameters
| Parameter | Type |
|---|---|
kind | TypeKind |
name | string |
namespace | string |
Returns
string
deleteType()
deleteType(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:330
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
dequeuePendingHydration()
dequeuePendingHydration(names): void;Defined in: packages/visual-editor/src/store/editor-store.ts:460
Remove namespaces from the pending queue WITHOUT marking them hydrated — used when an on-demand hydration parse fails, so re-selecting re-queues.
Parameters
| Parameter | Type |
|---|---|
names | string[] |
Returns
void
expandAllNamespaces()
expandAllNamespaces(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:301
Returns
void
getEdges()
getEdges(): TypeGraphEdge[];Defined in: packages/visual-editor/src/store/editor-store.ts:296
Returns
getNodes()
getNodes(): TypeGraphNode[];Defined in: packages/visual-editor/src/store/editor-store.ts:295
Returns
getVisibleEdges()
getVisibleEdges(): TypeGraphEdge[];Defined in: packages/visual-editor/src/store/editor-store.ts:306
Returns
getVisibleNodes()
getVisibleNodes(): TypeGraphNode[];Defined in: packages/visual-editor/src/store/editor-store.ts:305
Returns
isolateNode()
isolateNode(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:316
Hide all nodes except the given node's focused cluster.
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
loadDeferredExports()
loadDeferredExports(entries): void;Defined in: packages/visual-editor/src/store/editor-store.ts:282
Register deferred corpus types as graph nodes without full AST models.
Parameters
| Parameter | Type |
|---|---|
entries | DeferredExportEntry[] |
Returns
void
loadModels()
loadModels(models, layoutOpts?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:280
Parameters
| Parameter | Type |
|---|---|
models | unknown |
layoutOpts? | LayoutOptions |
Returns
void
markNamespacesHydrated()
markNamespacesHydrated(names): void;Defined in: packages/visual-editor/src/store/editor-store.ts:451
Mark a set of namespaces as successfully hydrated: move them from pendingHydrationNamespaces to hydratedNamespaces. Called by the App.tsx effect after applyParseResult returns. Also increments hydrationNonce so effects that depend on it (e.g. the re-link effect in ExplorePerspective) can react to the new AST being live.
Parameters
| Parameter | Type |
|---|---|
names | string[] |
Returns
void
relayout()
relayout(options?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:291
Parameters
| Parameter | Type |
|---|---|
options? | LayoutOptions |
Returns
void
removeAnnotation()
removeAnnotation(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:431
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
removeAttribute()
removeAttribute(nodeId, attrName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:333
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
Returns
void
removeChoiceOption()
removeChoiceOption(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:362
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
removeCondition()
removeCondition(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:411
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
removeEnumValue()
removeEnumValue(nodeId, valueName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:353
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueName | string |
Returns
void
removeEnumValueSynonym()
removeEnumValueSynonym(
nodeId,
valueIndex,
synIndex
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:357
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueIndex | number |
synIndex | number |
Returns
void
removeInputParam()
removeInputParam(nodeId, paramName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:366
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
paramName | string |
Returns
void
removeSynonym()
removeSynonym(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:427
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
renameAttribute()
renameAttribute(
nodeId,
oldName,
newName
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:334
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
Returns
void
renameType()
renameType(nodeId, newName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:331
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
newName | string |
Returns
void
reorderAttribute()
reorderAttribute(
nodeId,
fromIndex,
toIndex
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:346
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
reorderCondition()
reorderCondition(
nodeId,
fromIndex,
toIndex
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:421
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
reorderEnumValue()
reorderEnumValue(
nodeId,
fromIndex,
toIndex
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:355
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
reorderInputParam()
reorderInputParam(
nodeId,
fromIndex,
toIndex
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:385
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
requestNamespaceHydration()
requestNamespaceHydration(ns): void;Defined in: packages/visual-editor/src/store/editor-store.ts:443
Queue a namespace for server-side hydration. No-op if the namespace is already hydrated or already pending. The App.tsx effect watches pendingHydrationNamespaces and re-parses when this list is non-empty.
Parameters
| Parameter | Type |
|---|---|
ns | string |
Returns
void
resetHydration()
resetHydration(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:467
Clear all hydration state. Called on workspace switch so stale browsed- namespace names from the previous workspace don't carry over into the new one (the on-demand effect won't re-fire for names already in hydratedNamespaces, so they must be cleared on workspace load).
Returns
void
revealNeighbors()
revealNeighbors(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:318
Unhide a node's focused cluster (expand their namespaces too).
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
selectNode()
selectNode(nodeId, options?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:285
Parameters
| Parameter | Type |
|---|---|
nodeId | string | null |
options? | { isolateInFocusMode?: boolean; reapplyFocusMode?: boolean; } |
options.isolateInFocusMode? | boolean |
options.reapplyFocusMode? | boolean |
Returns
void
setEnumParent()
setEnumParent(nodeId, parentId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:358
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
parentId | string | null |
Returns
void
setFilters()
setFilters(filters): void;Defined in: packages/visual-editor/src/store/editor-store.ts:287
Parameters
| Parameter | Type |
|---|---|
filters | GraphFilters |
Returns
void
setFunctionParent()
setFunctionParent(nodeId, parentId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:397
Set (or clear, with null) a Function's superFunction parent reference.
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
parentId | string | null |
Returns
void
setInheritance()
setInheritance(childId, parentId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:348
Parameters
| Parameter | Type |
|---|---|
childId | string |
parentId | string | null |
Returns
void
setInitialVisibility()
setInitialVisibility(totalNodeCount): void;Defined in: packages/visual-editor/src/store/editor-store.ts:303
Parameters
| Parameter | Type |
|---|---|
totalNodeCount | number |
Returns
void
setLayoutEngine()
setLayoutEngine(engine): void;Defined in: packages/visual-editor/src/store/editor-store.ts:292
Parameters
| Parameter | Type |
|---|---|
engine | LayoutEngine |
Returns
void
setSearchQuery()
setSearchQuery(query): void;Defined in: packages/visual-editor/src/store/editor-store.ts:286
Parameters
| Parameter | Type |
|---|---|
query | string |
Returns
void
showAllEdgeKinds()
showAllEdgeKinds(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:312
Returns
void
showAllNodeKinds()
showAllNodeKinds(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:311
Returns
void
showAllNodes()
showAllNodes(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:322
Unhide all nodes (reset hiddenNodeIds).
Returns
void
showOnly()
showOnly(nodeIds): void;Defined in: packages/visual-editor/src/store/editor-store.ts:320
Hide all nodes except the given set.
Parameters
| Parameter | Type |
|---|---|
nodeIds | Set<string> |
Returns
void
toggleDetailPanel()
toggleDetailPanel(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:288
Returns
void
toggleEdgeKind()
toggleEdgeKind(kind): void;Defined in: packages/visual-editor/src/store/editor-store.ts:310
Parameters
| Parameter | Type |
|---|---|
kind | EdgeKind |
Returns
void
toggleExplorer()
toggleExplorer(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:304
Returns
void
toggleFocusMode()
toggleFocusMode(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:324
Toggle focus mode (auto-isolate selected node + neighbors).
Returns
void
toggleFocusRelatedExcludedKind()
toggleFocusRelatedExcludedKind(kind): void;Defined in: packages/visual-editor/src/store/editor-store.ts:326
Toggle exclusion of a node kind from focus-mode related clusters.
Parameters
| Parameter | Type |
|---|---|
kind | TypeKind |
Returns
void
toggleNamespace()
toggleNamespace(namespace): void;Defined in: packages/visual-editor/src/store/editor-store.ts:299
Parameters
| Parameter | Type |
|---|---|
namespace | string |
Returns
void
toggleNodeKind()
toggleNodeKind(kind): void;Defined in: packages/visual-editor/src/store/editor-store.ts:309
Parameters
| Parameter | Type |
|---|---|
kind | TypeKind |
Returns
void
toggleNodeVisibility()
toggleNodeVisibility(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:300
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
updateAttribute()
updateAttribute(
nodeId,
oldName,
newName,
typeName,
cardinality
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:345
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
typeName | string |
cardinality | string |
Returns
void
updateAttributeType()
updateAttributeType(
nodeId,
attrName,
newTypeName,
targetTypeId
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:344
Update the type ref on an attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
nodeId | string | - |
attrName | string | - |
newTypeName | string | - |
targetTypeId | string | Canonical node id of the resolved target (namespace.Name). The store validates the id against current nodes and writes a fully-qualified $refText when any other node shares the bare name across namespaces (spec 020 Phase 13, Finding 3). Stale or unknown ids are rejected (no-op). |
Returns
void
updateCardinality()
updateCardinality(
nodeId,
attrName,
cardinality
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:347
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
cardinality | string |
Returns
void
updateComments()
updateComments(nodeId, comments): void;Defined in: packages/visual-editor/src/store/editor-store.ts:425
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
comments | string |
Returns
void
updateCondition()
updateCondition(
nodeId,
index,
updates
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:412
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
updates | { definition?: string; expressionText?: string; name?: string; } |
updates.definition? | string |
updates.expressionText? | string |
updates.name? | string |
Returns
void
updateDefinition()
updateDefinition(nodeId, definition): void;Defined in: packages/visual-editor/src/store/editor-store.ts:424
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
definition | string |
Returns
void
updateEnumValue()
updateEnumValue(
nodeId,
oldName,
newName,
displayName?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:354
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
displayName? | string |
Returns
void
updateExpression()
updateExpression(
nodeId,
expressionText,
operationIndex?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:399
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
expressionText | string |
operationIndex? | number |
Returns
void
updateInputParam()
updateInputParam(
nodeId,
oldName,
newName,
typeName,
cardinality,
targetTypeId?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:377
Update name, type, and cardinality for a function input parameter.
Parameters
| Parameter | Type | Description |
|---|---|---|
nodeId | string | - |
oldName | string | - |
newName | string | - |
typeName | string | - |
cardinality | string | - |
targetTypeId? | string | Canonical node id of the resolved target (namespace.Name). Mirrors updateAttributeType's qualification contract: when provided, the store calls disambiguateTypeRef and writes a fully-qualified $refText when another node shares the bare name across namespaces. When omitted (or unknown), the bare typeName is written as before (backward-compatible). |
Returns
void
updateOutputParam()
updateOutputParam(
nodeId,
oldName,
newName,
typeName,
cardinality,
targetTypeId?
): void;Defined in: packages/visual-editor/src/store/editor-store.ts:387
Update the output signature and its references as one undoable edit.
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
typeName | string |
cardinality | string |
targetTypeId? | string |
Returns
void
updateOutputType()
updateOutputType(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:395
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
updateTypeAliasType()
updateTypeAliasType(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:398
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
validate()
validate(): ValidationError[];Defined in: packages/visual-editor/src/store/editor-store.ts:349