import { ComponentProps, RefObject } from 'react'; import { type ChatPanelMode, type ChatPanelSide } from './chat-panel-context'; export interface ChatPanelPosition { x: number; y: number; } export interface ChatPanelSize { width: number; height: number; } /** An element (or ref to one) that confines floating-window dragging. */ export type ChatPanelDragBoundary = HTMLElement | RefObject; /** Which resize handles to render, mirroring the CSS `resize` vocabulary. */ export type ChatPanelResize = 'both' | 'horizontal' | 'vertical' | 'none'; /** How a mode change animates. */ export type ChatPanelTransition = 'minimal' | 'morph'; export interface ChatPanelRootProps extends ComponentProps<'aside'> { /** Presentation mode of the panel (controlled). */ mode?: ChatPanelMode; /** * Initial mode when uncontrolled. * @defaultValue "docked" */ defaultMode?: ChatPanelMode; /** Called when the mode changes. */ onModeChange?: (mode: ChatPanelMode) => void; /** * Which edge the panel docks to; also picks the corner used by the * floating default position and the minimized trigger. * @defaultValue "right" */ side?: ChatPanelSide; /** Floating window position in viewport pixels (controlled). */ position?: ChatPanelPosition | null; /** * Initial floating position when uncontrolled. When omitted the window * starts at the bottom corner on the docked `side`. */ defaultPosition?: ChatPanelPosition; /** Called when a drag ends or resizing moves the floating window. */ onPositionChange?: (position: ChatPanelPosition) => void; /** Floating window size in pixels (controlled). */ size?: ChatPanelSize; /** * Initial floating size when uncontrolled. * @defaultValue { width: 400, height: 560 } */ defaultSize?: ChatPanelSize; /** Called when resizing changes the floating window size. */ onSizeChange?: (size: ChatPanelSize) => void; /** * Smallest allowed floating size. * @defaultValue { width: 280, height: 320 } */ minSize?: ChatPanelSize; /** * Largest allowed floating size, always additionally clamped by the * viewport. * @defaultValue the initial floating size — out of the box the window can * only shrink; pass a larger `maxSize` to let it grow. */ maxSize?: ChatPanelSize; /** * Which axes the floating window can be resized on; mirrors the CSS * `resize` property vocabulary. * @defaultValue "both" */ resize?: ChatPanelResize; /** * Whether the floating window can be dragged by its header. Shadows the * (useless here) native `draggable` attribute. * @defaultValue true */ draggable?: boolean; /** * Confines floating-window dragging to an element instead of the * viewport. Accepts the element or a ref to it. */ dragBoundary?: ChatPanelDragBoundary; /** * How a mode change animates. `"minimal"` eases the new mode in from its own * edge or corner; `"morph"` measures the box the panel is leaving and tweens * the new mode out of it, so the panel moves and reshapes into place. * @defaultValue "minimal" */ transition?: ChatPanelTransition; } export declare function ChatPanelRoot({ className, children, style, mode: modeProp, defaultMode, onModeChange, side, position: positionProp, defaultPosition, onPositionChange, size: sizeProp, defaultSize, onSizeChange, minSize, maxSize, resize, draggable, dragBoundary, transition, ref, ...props }: ChatPanelRootProps): import("react/jsx-runtime").JSX.Element; export declare namespace ChatPanelRoot { var displayName: string; } //# sourceMappingURL=chat-panel-root.d.ts.map