import type { MutableRefObject } from 'react'; import type { DeepRequired } from '@dnd-kit/utilities'; import type { SyntheticListeners } from '../hooks/utilities'; import type { Collision } from '../utilities/algorithms'; import type { MeasuringConfiguration } from '../components'; import type { Coordinates, ClientRect, UniqueIdentifier } from '../types'; import type { Actions } from './actions'; import type { DroppableContainersMap } from './constructors'; export interface DraggableElement { node: DraggableNode; id: UniqueIdentifier; index: number; collection: string; disabled: boolean; } declare type AnyData = Record; export declare type Data = T & AnyData; export declare type DataRef = MutableRefObject | undefined>; export interface DroppableContainer { id: UniqueIdentifier; key: UniqueIdentifier; data: DataRef; disabled: boolean; node: MutableRefObject; rect: MutableRefObject; } export interface Active { id: UniqueIdentifier; data: DataRef; rect: MutableRefObject<{ initial: ClientRect | null; translated: ClientRect | null; }>; } export interface Over { id: UniqueIdentifier; rect: ClientRect; disabled: boolean; data: DataRef; } export declare type DraggableNode = { id: UniqueIdentifier; key: UniqueIdentifier; node: MutableRefObject; activatorNode: MutableRefObject; data: DataRef; }; export declare type DraggableNodes = Map; export declare type DroppableContainers = DroppableContainersMap; export declare type RectMap = Map; export interface State { droppable: { containers: DroppableContainers; }; draggable: { active: UniqueIdentifier | null; initialCoordinates: Coordinates; nodes: DraggableNodes; translate: Coordinates; }; } export interface PublicContextDescriptor { activatorEvent: Event | null; active: Active | null; activeNode: HTMLElement | null; activeNodeRect: ClientRect | null; collisions: Collision[] | null; containerNodeRect: ClientRect | null; draggableNodes: DraggableNodes; droppableContainers: DroppableContainers; droppableRects: RectMap; over: Over | null; dragOverlay: { nodeRef: MutableRefObject; rect: ClientRect | null; setRef: (element: HTMLElement | null) => void; }; scrollableAncestors: Element[]; scrollableAncestorRects: ClientRect[]; measuringConfiguration: DeepRequired; measureDroppableContainers(ids: UniqueIdentifier[]): void; measuringScheduled: boolean; windowRect: ClientRect | null; } export interface InternalContextDescriptor { activatorEvent: Event | null; activators: SyntheticListeners; active: Active | null; activeNodeRect: ClientRect | null; ariaDescribedById: { draggable: string; }; dispatch: React.Dispatch; draggableNodes: DraggableNodes; over: Over | null; measureDroppableContainers(ids: UniqueIdentifier[]): void; } export {};