re-export connectionState types
This commit is contained in:
@@ -101,6 +101,10 @@ export {
|
|||||||
type EdgeAddChange,
|
type EdgeAddChange,
|
||||||
type EdgeReplaceChange,
|
type EdgeReplaceChange,
|
||||||
type KeyCode,
|
type KeyCode,
|
||||||
|
type ConnectionState,
|
||||||
|
type FinalConnectionState,
|
||||||
|
type ConnectionInProgress,
|
||||||
|
type NoConnection,
|
||||||
} from '@xyflow/system';
|
} from '@xyflow/system';
|
||||||
|
|
||||||
// we need this workaround to prevent a duplicate identifier error
|
// we need this workaround to prevent a duplicate identifier error
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ export type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectS
|
|||||||
export type OnConnect = (connection: Connection) => void;
|
export type OnConnect = (connection: Connection) => void;
|
||||||
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
|
export type OnConnectEnd = (event: MouseEvent | TouchEvent, connectionState: FinalConnectionState) => void;
|
||||||
|
|
||||||
export type FinalConnectionState = Omit<ConnectionState, 'inProgress'>;
|
|
||||||
|
|
||||||
export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
|
export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
|
||||||
|
|
||||||
export type FitViewParamsBase<NodeType extends NodeBase> = {
|
export type FitViewParamsBase<NodeType extends NodeBase> = {
|
||||||
@@ -175,6 +173,11 @@ export type ConnectionState<NodeType extends InternalNodeBase = InternalNodeBase
|
|||||||
| ConnectionInProgress<NodeType>
|
| ConnectionInProgress<NodeType>
|
||||||
| NoConnection;
|
| NoConnection;
|
||||||
|
|
||||||
|
export type FinalConnectionState<NodeType extends InternalNodeBase = InternalNodeBase> = Omit<
|
||||||
|
ConnectionState<NodeType>,
|
||||||
|
'inProgress'
|
||||||
|
>;
|
||||||
|
|
||||||
export type UpdateConnection<NodeType extends InternalNodeBase = InternalNodeBase> = (
|
export type UpdateConnection<NodeType extends InternalNodeBase = InternalNodeBase> = (
|
||||||
params: ConnectionState<NodeType>
|
params: ConnectionState<NodeType>
|
||||||
) => void;
|
) => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user