diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 7c984bf0..cb36e305 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -101,6 +101,10 @@ export { type EdgeAddChange, type EdgeReplaceChange, type KeyCode, + type ConnectionState, + type FinalConnectionState, + type ConnectionInProgress, + type NoConnection, } from '@xyflow/system'; // we need this workaround to prevent a duplicate identifier error diff --git a/packages/system/src/types/general.ts b/packages/system/src/types/general.ts index 56e97afe..98d8afb6 100644 --- a/packages/system/src/types/general.ts +++ b/packages/system/src/types/general.ts @@ -52,8 +52,6 @@ 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 FinalConnectionState = Omit; - export type IsValidConnection = (edge: EdgeBase | Connection) => boolean; export type FitViewParamsBase = { @@ -175,6 +173,11 @@ export type ConnectionState | NoConnection; +export type FinalConnectionState = Omit< + ConnectionState, + 'inProgress' +>; + export type UpdateConnection = ( params: ConnectionState ) => void;