import { autoUpdate, type Placement, shift as shiftMw } from '@floating-ui/react'; export type PopperLikePlacement = Placement | 'auto' | 'auto-start' | 'auto-end'; export type OffsetOpt = number | { mainAxis?: number; crossAxis?: number; alignmentAxis?: number; } | [crossAxis: number, mainAxis: number]; export type UsePopoverParams = { placement?: PopperLikePlacement; /** Flips on overflow, except for 'auto*', 'left*' and 'right*' placements. Defaults to true. */ allowFlip?: boolean; /** Shifts the popover to stay inside the viewport. Defaults to true. */ allowShift?: boolean; /** Options for the Floating UI `shift()` middleware, merged over the default `padding: 8`. */ shiftOptions?: Parameters[0]; /** Constrains the max size to the available space instead of overflowing. Defaults to false. */ fitAvailableSpace?: boolean; /** Offset as a number, an object, or a `[crossAxis, mainAxis]` tuple. */ offset?: OffsetOpt; /** Disables `autoUpdate`, so the position updates only through `update()`. Defaults to false. */ freeze?: boolean; /** * Options of Floating UI's `autoUpdate`, merged over defaults that follow ancestor scroll and * resize (and element resize when `ResizeObserver` exists). Ignored when `freeze` is true. */ autoUpdateOptions?: Partial[3]>; }; export declare function usePopoverPosition({ allowFlip, allowShift, autoUpdateOptions, fitAvailableSpace, freeze, offset, placement, shiftOptions, }: UsePopoverParams): { placement: Placement; strategy: import("@floating-ui/utils").Strategy; middlewareData: import("@floating-ui/core").MiddlewareData; y: number; x: number; isPositioned: boolean; update: () => void; floatingStyles: React.CSSProperties; refs: { reference: import("react").MutableRefObject; floating: React.MutableRefObject; setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void; setFloating: (node: HTMLElement | null) => void; } & import("@floating-ui/react").ExtendedRefs; elements: { reference: import("@floating-ui/react-dom").ReferenceType | null; floating: HTMLElement | null; } & import("@floating-ui/react").ExtendedElements; context: { y: number; x: number; placement: Placement; strategy: import("@floating-ui/utils").Strategy; middlewareData: import("@floating-ui/core").MiddlewareData; isPositioned: boolean; update: () => void; floatingStyles: React.CSSProperties; open: boolean; onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void; events: import("@floating-ui/react").FloatingEvents; dataRef: React.MutableRefObject; nodeId: string | undefined; floatingId: string | undefined; refs: import("@floating-ui/react").ExtendedRefs; elements: import("@floating-ui/react").ExtendedElements; }; }; //# sourceMappingURL=usePopoverPosition.d.ts.map