input highlights
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import React from 'react'
|
||||
import type { Connection } from '@xyflow/react'
|
||||
|
||||
export type ConnectionFrom = { nodeId: string; sourceHandle?: string } | null
|
||||
|
||||
export type FlowContextValue = {
|
||||
nodes: any[]
|
||||
@@ -7,6 +10,10 @@ export type FlowContextValue = {
|
||||
setEdges: (updater: any) => void
|
||||
renamingNodeId: string | null
|
||||
setRenamingNodeId: (id: string | null) => void
|
||||
/** Set when user starts dragging from an output handle; cleared on connect end. Used to highlight valid targets. */
|
||||
connectionFrom: ConnectionFrom
|
||||
setConnectionFrom: (v: ConnectionFrom) => void
|
||||
isValidConnection: (connection: Connection) => boolean
|
||||
}
|
||||
|
||||
const FlowContext = React.createContext<FlowContextValue | null>(null)
|
||||
|
||||
Reference in New Issue
Block a user