import React, { ReactNode } from 'react'; export interface OverlayConfig { id: string; content: ReactNode; trigger?: 'click' | 'hover' | 'contextmenu' | 'manual'; placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'auto'; offset?: number; anchor?: { x: number; y: number; width: number; height: number; }; /** * The anchor/trigger DOM node (web). Used by the non-blocking outside-click * detection so clicking the trigger doesn't count as an "outside" click (the * trigger handles its own toggle). Optional — omit for cursor-anchored overlays. */ anchorNode?: any; /** * Viewport edge to pin the overlay to on its main axis, with the distance from * that edge. Supplied by the positioning layer for vertical placements. * * Pinning by the trigger-adjacent edge keeps the rendered position independent * of the overlay's own height, so content that grows or shrinks (a filtering * suggestion list) expands away from the trigger instead of dragging the whole * overlay with it. When absent the renderer falls back to `anchor.y`. */ pinEdge?: 'top' | 'bottom'; pinOffset?: number; width?: number | string; maxWidth?: number | string; maxHeight?: number | string; onClose?: () => void; closeOnClickOutside?: boolean; closeOnEscape?: boolean; strategy?: 'absolute' | 'fixed' | 'portal'; zIndex?: number; viewport?: { padding: number; }; } interface OverlayApiValue { openOverlay: (config: Omit) => string; closeOverlay: (id: string) => void; closeAllOverlays: () => void; updateOverlay: (id: string, updates: Partial) => void; } export declare function OverlayProvider({ children }: { children: ReactNode; }): React.JSX.Element; export declare function useOverlay(): { overlays: OverlayConfig[]; } & OverlayApiValue; export declare function useOverlayApi(): OverlayApiValue; export declare function useOptionalOverlayApi(): OverlayApiValue | null; export declare function useOverlays(): OverlayConfig[]; export {};