added onReconnect type

This commit is contained in:
peterkogo
2025-05-14 11:11:34 +02:00
parent 649acdc408
commit a95f0e2fbf
2 changed files with 18 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/system': patch
---
Added OnReconnect types
+13
View File
@@ -80,6 +80,19 @@ export type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectS
export type OnConnect = (connection: Connection) => void;
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
export type OnReconnect<EdgeType extends EdgeBase = EdgeBase> = (oldEdge: EdgeType, newConnection: Connection) => void;
export type OnRecoonnectStart<EdgeType extends EdgeBase = EdgeBase> = (
event: MouseEvent | TouchEvent,
edge: EdgeType,
handleType: HandleType
) => void;
export type OnReconnectEnd<EdgeType extends EdgeBase = EdgeBase> = (
event: MouseEvent | TouchEvent,
edge: EdgeType,
handleType: HandleType,
connectionState: FinalConnectionState
) => void;
export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
/**