import { ResizerPosition } from './types'; /** * Defines the type for pointer information used in resizing. * @typedef {Object} PointerType * @property {number} width - The width of the pointer component. * @property {number} pointerId - Unique identifier for the pointer from a touch event. * @property {number} initialClientX - The initial X coordinate of the pointer when resizing started. */ export type PointerType = { width: number; pointerId: number; initialClientX: number; }; /** * Defines the state and methods used for managing the column resizing. * @typedef {Object} ResizingState * @property {PointerType | null} pointer - The current pointer data, or null if no pointer is active. * @property {(pointer: PointerType | null) => void} setPointer - Setter to update the pointer. * @property {(columnIndex: number) => boolean} getIsPressed - Indicates if a resizer for the given column is currently pressed/dragged. * @property {(columnIndex: number, pressed: boolean) => void} setIsPressed - Sets the pressed state for a given column. * @property {(columnIndex: number) => ResizerPosition} getPosition - Gets the position of the resizer for the specified column. * @property {(position: ResizerPosition) => void} setPosition - Updates the position of the resizer. * @property {number} lastPressedTimestamp - Timestamp of the last time a column was pressed, used to detect double-clicks. */ export interface ResizingState { pointer: PointerType | null; setPointer: (pointer: PointerType | null) => void; getIsPressed: (columnIndex: number) => boolean; setIsPressed: (columnIndex: number, pressed: boolean) => void; getPosition: (columnIndex: number) => ResizerPosition; setPosition: (position: ResizerPosition) => void; lastPressedTimestamp: number; } /** * The initial position of the resizer element. * @type {ResizerPosition} */ export declare const initialPosition: { left: string; top: string; }; /** * Custom hook that provides the state and methods needed to manage a resizing operation on columns. * @returns {ResizingState} The resizing state and methods for controlling resizing behavior. */ declare const useResizingState: () => ResizingState; export default useResizingState;