import * as React from 'react'; /** Position inside an element's border box, as fractions of its width and height. `{ x: 0, y: 0 }` is the top-left corner. */ export interface PointerRatio { x: number; y: number; } /** Options for {@link usePointerRatio}. */ export interface UsePointerRatioOptions { /** Fires with the position on pointer down and on every subsequent move that changes it, plus the native event. */ onRatioChange: (ratio: PointerRatio, event: PointerEvent) => void; /** Fires once when the drag ends — `pointerup` or `pointercancel`. The final position was already reported by `onRatioChange`. */ onRatioChangeEnd?: ((event: PointerEvent) => void) | undefined; } /** Return value of {@link usePointerRatio}. */ export interface UsePointerRatioResult { /** Spread onto the element whose box defines the coordinate space. It is re-measured on every move. */ onPointerDown: (event: React.PointerEvent) => void; /** `true` between pointer down and pointer up/cancel. Suitable for a `data-dragging` styling hook. */ dragging: boolean; } /** * Turns pointer position inside an element into normalized `x`/`y` fractions in `[0, 1]`. * * @internal */ export declare function usePointerRatio(options: UsePointerRatioOptions): UsePointerRatioResult;