@hlang-org/editor-react
React bindings of the Lumen editor for hlang: hooks that connect @hlang-org/editor-core to React Flow. Version 0.3.0, 37 exports.
Interfaces
ClipboardState
Defined in: packages/editor-react/src/hooks/useClipboard.ts:34
Methods
canPaste()
canPaste(): boolean;Defined in: packages/editor-react/src/hooks/useClipboard.ts:51
Whether the in-memory clipboard holds something to paste.
Returns
boolean
copy()
copy(): void;Defined in: packages/editor-react/src/hooks/useClipboard.ts:36
Copy the current selection into the clipboard (no graph change).
Returns
void
cut()
cut(): void;Defined in: packages/editor-react/src/hooks/useClipboard.ts:38
Copy the selection, then delete it as one undo step.
Returns
void
duplicate()
duplicate(): void;Defined in: packages/editor-react/src/hooks/useClipboard.ts:47
Clone the current selection in place (offset), selecting the clones.
Returns
void
paste()
paste(flowPos?): void;Defined in: packages/editor-react/src/hooks/useClipboard.ts:45
Paste the clipboard as fresh nodes, selecting them. If flowPos is given
(the canvas cursor in flow space), the pasted set is anchored there; else a
small fixed offset is used. Prefers the system clipboard (cross-document),
falling back to the in-memory copy. Async because it reads the OS clipboard.
Parameters
| Parameter | Type |
|---|---|
flowPos? | Point |
Returns
void
remove()
remove(): void;Defined in: packages/editor-react/src/hooks/useClipboard.ts:49
Delete the current selection as one undo step.
Returns
void
DiagnosticsState
Defined in: packages/editor-react/src/hooks/useDiagnostics.ts:11
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
all | readonly | readonly Diagnostic[] | packages/editor-react/src/hooks/useDiagnostics.ts:12 |
byNode | readonly | ReadonlyMap<string, readonly Diagnostic[]> | packages/editor-react/src/hooks/useDiagnostics.ts:13 |
Methods
worstOf()
worstOf(id): Diagnostic | undefined;Defined in: packages/editor-react/src/hooks/useDiagnostics.ts:15
The most severe diagnostic on a node (error > warning), or undefined.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Diagnostic | undefined
EdgeViewState
Defined in: packages/editor-react/src/mapping/convert.ts:49
Per-edge view flags reflected into React Flow.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
selected? | readonly | boolean | Whether the edge is selected in editor-core's selection service. | packages/editor-react/src/mapping/convert.ts:51 |
EditorProviderProps
Defined in: packages/editor-react/src/context.tsx:15
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
children | readonly | ReactNode | packages/editor-react/src/context.tsx:17 |
core | readonly | EditorCore | packages/editor-react/src/context.tsx:16 |
GraphView
Defined in: packages/editor-react/src/hooks/useGraphSync.ts:17
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
edges | readonly | readonly HlangRFEdge[] | packages/editor-react/src/hooks/useGraphSync.ts:19 |
nodes | readonly | readonly HlangRFNode[] | packages/editor-react/src/hooks/useGraphSync.ts:18 |
HistoryState
Defined in: packages/editor-react/src/hooks/useHistory.ts:11
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
canRedo | readonly | boolean | packages/editor-react/src/hooks/useHistory.ts:13 |
canUndo | readonly | boolean | packages/editor-react/src/hooks/useHistory.ts:12 |
Methods
redo()
redo(): void;Defined in: packages/editor-react/src/hooks/useHistory.ts:15
Returns
void
undo()
undo(): void;Defined in: packages/editor-react/src/hooks/useHistory.ts:14
Returns
void
HlangEdgeData
Defined in: packages/editor-react/src/mapping/types.ts:28
Data payload attached to a React Flow edge. Carries the hlang port ids so a custom edge can distinguish, e.g., an error-port edge from a normal one.
Extends
Record<string,unknown>
Indexable
[key: string]: unknownProperties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
capacity? | readonly | number | A bounded connection's capacity and overflow (RFC 0001); absent when unbounded. | packages/editor-react/src/mapping/types.ts:36 |
isError | readonly | boolean | Whether the source port is the @node/error port. | packages/editor-react/src/mapping/types.ts:32 |
overflow? | readonly | "drop-oldest" | - | packages/editor-react/src/mapping/types.ts:37 |
sourcePortId | readonly | string | - | packages/editor-react/src/mapping/types.ts:29 |
stream | readonly | "live" | "value" | The source port's stream mode ('live' default | 'value'), for edge visuals. | packages/editor-react/src/mapping/types.ts:34 |
targetPortId | readonly | string | - | packages/editor-react/src/mapping/types.ts:30 |
HlangFlowProps
Defined in: packages/editor-react/src/hooks/useHlangFlow.ts:40
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
edges | readonly | HlangRFEdge[] | - | packages/editor-react/src/hooks/useHlangFlow.ts:42 |
isValidConnection | readonly |