import { NodeId, Position } from '../types/core'; /** * @file Context for managing node drag state during drag operations */ import * as React from "react"; export type DragState = { nodeIds: NodeId[]; startPosition: Position; offset: Position; initialPositions: Record; affectedChildNodes: Record; }; export type DragStateActionsValue = { startDrag: (nodeIds: NodeId[], startPosition: Position, initialPositions: Record, affectedChildNodes: Record) => void; updateDrag: (offset: Position) => void; endDrag: () => void; }; export type DragStateContextValue = DragStateActionsValue & { dragState: DragState | null; }; export declare const DragStateProvider: React.FC<{ children: React.ReactNode; }>; /** * Hook to access only the drag state * Use this when you only need to read the current drag state * Note: Returns null when not dragging, DragState when dragging */ export declare const useDragStateState: () => DragState | null; /** * Hook to access only the drag state actions * Use this when you only need to dispatch actions and don't need to re-render on drag state changes * The returned actions have stable references and won't cause re-renders */ export declare const useDragStateActions: () => DragStateActionsValue; /** * Hook to access both state and actions (backward compatible) * Prefer useDragStateState or useDragStateActions for better performance */ export declare const useDragState: () => DragStateContextValue;