import * as React from 'react'; /** * Keeps a node mounted past `present` going false until its CSS exit animation finishes (immediately if none declared), pairing with the `data-state` hook every overlay part emits. * * @example * ```tsx * const ref = React.useRef(null); * const mounted = usePresence(open, ref); * return mounted ?
: null; * ``` */ export declare function usePresence(present: boolean, nodeRef: React.RefObject): boolean; /** Props for {@link Presence}. */ export interface PresenceProps { /** Whether the child should be present; going false starts the child's exit animation instead of unmounting it outright. */ present: boolean; /** * A single React element — `Presence` composes its own ref onto it (via * {@link Slot}) to watch for `animationend`, and renders no DOM of its own. * @default undefined — renders nothing if omitted. */ children?: React.ReactNode | undefined; } /** * Component form of {@link usePresence}: renders its single child element while `present`, then keeps it mounted until the child's CSS exit animation ends, rendering no DOM of its own. * * @example * ```tsx * * * * ``` */ export declare function Presence({ present, children }: PresenceProps): React.JSX.Element | null; export declare namespace Presence { var displayName: string; }