import type { RefObject, CSSProperties } from 'react'; import type { Placement } from './Placement'; import type { TargetBoundaries } from './getTargetBoundaries'; import type { VariantBoundaries } from './getVariantBoundaries'; export type { Placement } from './Placement'; export type { Position } from './Position'; export type { PlacementVariant } from './PlacementVariant'; export type { TargetBoundaries } from './getTargetBoundaries'; export type { VariantBoundaries } from './getVariantBoundaries'; export type UsePositionOptions = { margin?: number; /** The element the target must fit in; the viewport of the anchor's window when not given. */ container?: Element; placement?: Placement; }; export type UsePositionResult = { style: CSSProperties; placement?: Placement; }; export declare function getPositionStyle({ placement, targetRect, containerRect, targetBoundaries, variantBoundaries, margin, }: { placement: Placement; targetRect: DOMRect; containerRect: DOMRect; targetBoundaries: TargetBoundaries; variantBoundaries: VariantBoundaries; margin?: number; }): UsePositionResult; /** * Hook to deal and position an element using an anchor. * * The position follows the anchor as the page or any of its scroll containers scrolls, and as the anchor, the target or * the window resizes, at most once per frame. * * @param anchorRef - the anchor * @param targetRef - the element to be positioned * @param options - options to position * @returns The style containing top and left position * @public */ export declare function usePosition(anchorRef: RefObject, targetRef: RefObject, { margin, placement, container }?: UsePositionOptions): UsePositionResult; //# sourceMappingURL=index.d.ts.map