import { getPositionUpdates } from './utils.js'; import { Arrow, SquareDataType, DraggingPieceDataType, PieceDropHandlerArgs, PieceHandlerArgs, PieceRenderObject, PositionDataType, SquareHandlerArgs, SquareRenderer } from './types.js'; import { defaultArrowOptions } from './defaults.js'; type Defined = T extends undefined ? never : T; type ContextType = { id: Defined; pieces: Defined; boardOrientation: Defined; chessboardRows: Defined; chessboardColumns: Defined; boardStyle: Defined; squareStyle: Defined; squareStyles: Defined; darkSquareStyle: Defined; lightSquareStyle: Defined; dropSquareStyle: Defined; draggingPieceStyle: Defined; draggingPieceGhostStyle: Defined; darkSquareNotationStyle: Defined; lightSquareNotationStyle: Defined; alphaNotationStyle: Defined; numericNotationStyle: Defined; showNotation: Defined; animationDurationInMs: Defined; showAnimations: Defined; allowDragging: Defined; allowDragOffBoard: Defined; allowDrawingArrows: Defined; arrows: Defined; arrowOptions: Defined; canDragPiece: ChessboardOptions['canDragPiece']; onMouseOutSquare: ChessboardOptions['onMouseOutSquare']; onMouseOverSquare: ChessboardOptions['onMouseOverSquare']; onPieceClick: ChessboardOptions['onPieceClick']; onSquareClick: ChessboardOptions['onSquareClick']; onSquareMouseDown: ChessboardOptions['onSquareMouseDown']; onSquareMouseUp: ChessboardOptions['onSquareMouseUp']; onSquareRightClick: ChessboardOptions['onSquareRightClick']; squareRenderer: ChessboardOptions['squareRenderer']; board: SquareDataType[][]; isWrapped: boolean; draggingPiece: DraggingPieceDataType | null; currentPosition: PositionDataType; positionDifferences: ReturnType; newArrowStartSquare: string | null; newArrowOverSquare: { square: string; color: string; } | null; setNewArrowStartSquare: (square: string | null) => void; setNewArrowOverSquare: (square: string | null, modifiers?: { shiftKey: boolean; ctrlKey: boolean; }) => void; internalArrows: Arrow[]; drawArrow: (newArrowEndSquare: string, modifiers?: { shiftKey: boolean; ctrlKey: boolean; }) => void; clearArrows: () => void; }; export declare const useChessboardContext: () => ContextType; export type ChessboardOptions = { id?: string; pieces?: PieceRenderObject; position?: string | PositionDataType; boardOrientation?: 'white' | 'black'; chessboardRows?: number; chessboardColumns?: number; boardStyle?: React.CSSProperties; squareStyle?: React.CSSProperties; squareStyles?: Record; darkSquareStyle?: React.CSSProperties; lightSquareStyle?: React.CSSProperties; dropSquareStyle?: React.CSSProperties; draggingPieceStyle?: React.CSSProperties; draggingPieceGhostStyle?: React.CSSProperties; darkSquareNotationStyle?: React.CSSProperties; lightSquareNotationStyle?: React.CSSProperties; alphaNotationStyle?: React.CSSProperties; numericNotationStyle?: React.CSSProperties; showNotation?: boolean; animationDurationInMs?: number; showAnimations?: boolean; allowDragging?: boolean; allowDragOffBoard?: boolean; allowAutoScroll?: boolean; dragActivationDistance?: number; allowDrawingArrows?: boolean; arrows?: Arrow[]; arrowOptions?: typeof defaultArrowOptions; clearArrowsOnClick?: boolean; clearArrowsOnPositionChange?: boolean; canDragPiece?: ({ isSparePiece, piece, square }: PieceHandlerArgs) => boolean; onArrowsChange?: ({ arrows }: { arrows: Arrow[]; }) => void; onMouseOutSquare?: ({ piece, square }: SquareHandlerArgs) => void; onMouseOverSquare?: ({ piece, square }: SquareHandlerArgs) => void; onPieceClick?: ({ isSparePiece, piece, square }: PieceHandlerArgs) => void; onPieceDrag?: ({ isSparePiece, piece, square }: PieceHandlerArgs) => void; onPieceDrop?: ({ piece, sourceSquare, targetSquare, }: PieceDropHandlerArgs) => boolean; onSquareClick?: ({ piece, square }: SquareHandlerArgs) => void; onSquareMouseDown?: ({ piece, square }: SquareHandlerArgs, e: React.MouseEvent) => void; onSquareMouseUp?: ({ piece, square }: SquareHandlerArgs, e: React.MouseEvent) => void; onSquareRightClick?: ({ piece, square }: SquareHandlerArgs) => void; squareRenderer?: SquareRenderer; }; export declare function ChessboardProvider({ children, options, }: React.PropsWithChildren<{ options?: ChessboardOptions; }>): import("react/jsx-runtime").JSX.Element; export {};