import * as React from 'react'; import { IDndActor, DropPosition, AcceptDropParams, DndActorRenderParams, DropPositionOptions } from '../../types/dnd'; import { UuiContexts } from '../../types/contexts'; import { DndContextState } from './DndContext'; export interface DndActorProps extends IDndActor { /** Render callback for DragActor content */ render(props: DndActorRenderParams): React.ReactNode; } interface DndActorState { pointerX: number; pointerY: number; isMouseDown: boolean; isDragging: boolean; isMouseOver: boolean; position?: DropPosition; dndContextState: DndContextState; } /** * This workaround is needed to make it tree-shakable, but it does not look good. * It's better to rewrite it to functional component instead. * The key point here is to get rid of any static props (like sectorPositionPriorities, contextType). */ export declare const DndActor: { new (props: DndActorProps): { state: DndActorState; context: UuiContexts; dndRef: React.RefObject; componentDidMount(): void; componentWillUnmount(): void; contextUpdateHandler: (dndContextState: DndContextState) => void; windowPointerUpHandler: () => void; windowPointerMoveHandler: (e: MouseEvent) => void; getDropParams(e: React.MouseEvent): AcceptDropParams; getPosition(params: AcceptDropParams, options: DropPositionOptions): DropPosition; render(): React.ReactNode; setState(state: DndActorState | ((prevState: Readonly, props: Readonly>) => DndActorState | Pick) | Pick, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly>; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly): any; componentDidUpdate?(prevProps: Readonly>, prevState: Readonly, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): void; }; contextType: React.Context>; sectorPositionPriorities: Record; propTypes?: any; }; export {}; //# sourceMappingURL=DndActor.d.ts.map