import { Effect, Option, Schema as S } from 'effect'; import * as Command from 'foldkit/command'; import { type ChildAttribute, type Html } from 'foldkit/html'; import * as Mount from 'foldkit/mount'; import * as Update from 'foldkit/update'; import { AnchorConfig } from '../anchor/index.js'; /** Schema for the popover component's state, tracking open/closed status and animation lifecycle. */ export declare const Model: S.Struct<{ readonly id: S.String; readonly isOpen: S.Boolean; readonly isAnimated: S.Boolean; readonly isModal: S.Boolean; readonly contentFocus: S.Boolean; readonly animation: S.Struct<{ readonly id: S.String; readonly isShowing: S.Boolean; readonly transitionState: S.Literals; }>; readonly maybeLastButtonPointerType: S.Option; }>; export type Model = typeof Model.Type; /** Union of all messages the popover component can produce. */ export declare const Message: import("foldkit/message").MessageUnion<{ readonly RequestedOpen: {}; readonly RequestedClose: {}; readonly BlurredPanel: {}; readonly PressedPointerOnButton: { readonly pointerType: S.String; readonly button: S.Number; }; readonly CompletedFocusPanel: {}; readonly CompletedFocusButton: {}; readonly CompletedLockScroll: {}; readonly CompletedUnlockScroll: {}; readonly CompletedInertOthers: {}; readonly CompletedRestoreInert: {}; readonly IgnoredMouseClick: {}; readonly SuppressedSpaceScroll: {}; readonly CompletedAnchorPopover: {}; readonly CompletedPortalPopoverBackdrop: {}; readonly GotAnimationMessage: { readonly message: import("foldkit/message").MessageUnion<{ readonly Showed: {}; readonly Hid: {}; readonly CompletedWaitForPaint: {}; readonly EndedAnimation: {}; }>; }; }>; export type RequestedOpen = typeof Message.RequestedOpen.Type; export type RequestedClose = typeof Message.RequestedClose.Type; export type BlurredPanel = typeof Message.BlurredPanel.Type; export type PressedPointerOnButton = typeof Message.PressedPointerOnButton.Type; export type IgnoredMouseClick = typeof Message.IgnoredMouseClick.Type; export type SuppressedSpaceScroll = typeof Message.SuppressedSpaceScroll.Type; export type Message = typeof Message.Type; /** Union of OutMessages the popover component can produce. Handle open and * close transitions in the `foldOutMessage` of the Popover's * `Update.foldChild` config. */ export declare const OutMessage: import("foldkit/message").MessageUnion<{ readonly Opened: {}; readonly Closed: {}; }>; export type OutMessage = typeof OutMessage.Type; export type Opened = typeof OutMessage.Opened.Type; export type Closed = typeof OutMessage.Closed.Type; /** Configuration for creating a popover model with `init`. `isAnimated` enables animation coordination (default `false`). `isModal` locks page scroll and inerts other elements when open (default `false`). `contentFocus` hands focus ownership to the consumer. The panel is not focusable and does not close on blur, so the consumer must focus a descendant on open and close the popover on its own blur rules (default `false`). */ export type InitConfig = Readonly<{ id: string; isAnimated?: boolean; isModal?: boolean; contentFocus?: boolean; }>; /** Creates an initial popover model from a config. Defaults to closed. */ export declare const init: (config: InitConfig) => Model; /** Returns the bare DOM id of the popover trigger button, derived from the * popover's base id. Use this to associate an external label with the * trigger via a native `