diff --git a/.changeset/rotten-bikes-hunt.md b/.changeset/rotten-bikes-hunt.md new file mode 100644 index 00000000..e4dd48ad --- /dev/null +++ b/.changeset/rotten-bikes-hunt.md @@ -0,0 +1,5 @@ +--- +'@xyflow/system': patch +--- + +Added OnReconnect types diff --git a/packages/system/src/types/general.ts b/packages/system/src/types/general.ts index a2fba7dd..3444fdaf 100644 --- a/packages/system/src/types/general.ts +++ b/packages/system/src/types/general.ts @@ -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 = (oldEdge: EdgeType, newConnection: Connection) => void; +export type OnRecoonnectStart = ( + event: MouseEvent | TouchEvent, + edge: EdgeType, + handleType: HandleType +) => void; +export type OnReconnectEnd = ( + event: MouseEvent | TouchEvent, + edge: EdgeType, + handleType: HandleType, + connectionState: FinalConnectionState +) => void; + export type IsValidConnection = (edge: EdgeBase | Connection) => boolean; /**