import { type RefObject } from 'react'; import type { TWidthFromAnchorMode } from '../popover/types'; /** * Sets the width of a popover element relative to its anchor element. * * - `'match-anchor'` → `width: anchor-size(width)` - popover matches anchor width exactly. * - `'min-anchor'` → `min-width: anchor-size(width)` - popover is at least as wide as anchor, * but can grow wider. * - `'none'` → no explicit width is set (default behaviour) * * Uses CSS `anchor-size(width)` when the browser supports it, falling back to a * one-off measurement of `anchor.offsetWidth`. * * Designed to be composed alongside `useAnchorPosition` for top-layer popovers. */ export declare function useWidthFromAnchor({ mode, popoverRef, anchorRef, isOpen, }: { mode: TWidthFromAnchorMode; popoverRef: RefObject; anchorRef: RefObject; isOpen: boolean; }): void;