import { Placement } from '@floating-ui/dom'; import { LitElement, PropertyValues, TemplateResult, CSSResult } from 'lit'; declare global { interface HTMLElementTagNameMap { 'forge-ai-overlay': ForgeAiOverlayComponent; } interface HTMLElementEventMap { 'forge-ai-overlay-toggle': CustomEvent<{ open: boolean; newState: string; oldState: string; }>; } } export type OverlayPlacement = Placement; export type OverlayOffset = number | { mainAxis?: number; crossAxis?: number; alignmentAxis?: number; }; /** * @summary A low-level overlay component that positions content relative to an anchor. Used by `forge-ai-popover` and `forge-ai-tooltip`. * * @slot - The default slot for overlay content. * * @cssproperty --ai-overlay-available-width - Set on the overlay when `autoSize` is enabled; the width available in the chosen placement direction. Consumers can use this to constrain slotted content instead of being clipped by the viewport. * @cssproperty --ai-overlay-available-height - Set on the overlay when `autoSize` is enabled; the height available in the chosen placement direction. */ export declare class ForgeAiOverlayComponent extends LitElement { static styles: CSSResult; /** * The anchor element to position the overlay relative to. */ anchor: Element | null; /** * The placement of the overlay relative to the anchor. */ placement: OverlayPlacement; /** * Whether the overlay should flip to the opposite side when there's no space. */ flip: boolean; /** * Whether the overlay should shift to stay in view. */ shift: boolean; /** * Whether the overlay should constrain its own size to the space available in the chosen * placement direction, exposed as the `--ai-overlay-available-width`/`--ai-overlay-available-height` * CSS custom properties on the overlay so slotted content can shrink (and scroll internally) * instead of being clipped by the viewport. */ autoSize: boolean; /** * Whether the overlay is open. */ open: boolean; /** * The arrow element to position relative to the overlay. */ arrowElement: HTMLElement | null; /** * The offset of the overlay from the anchor element. * Can be a number (main axis offset) or an object with mainAxis, crossAxis, and alignmentAxis properties. */ offset: OverlayOffset | undefined; /** * The dismiss mode for the overlay. * - 'auto': Automatically closes on outside clicks and Escape key * - 'manual': Requires manual control to close */ dismissMode: 'auto' | 'manual'; private _overlayElement; private _cleanupAutoUpdate; disconnectedCallback(): void; updated(changedProperties: PropertyValues): void; private _handleOpenChange; private _showOverlay; private _hideOverlay; private _updatePosition; private _computePosition; private _roundByDPR; private _cleanup; private _onToggle; render(): TemplateResult; }