import { type ReactNode } from "react"; type RestoreDisclosureAnchor = (() => void) | null; export type UserMessageDisclosureLabels = { /** Collapsed disclosure action. Defaults to "Show more". */ showMore?: string | undefined; /** Expanded disclosure action. Defaults to "Show less". */ showLess?: string | undefined; }; export type UserMessageDisclosureContextValue = { labels?: UserMessageDisclosureLabels | undefined; expandedByMessageId: Map; beginChange: (messageBody: HTMLElement, disclosureControl: HTMLElement) => RestoreDisclosureAnchor; }; export declare function UserMessageDisclosureProvider({ value, children, }: { value: UserMessageDisclosureContextValue; children: ReactNode; }): import("react").JSX.Element; /** * Deterministic first-paint fallback for runtimes without layout measurement. * Real browsers replace this estimate with the rendered-height decision in the * first layout effect. The complete text always remains mounted either way. */ export declare function userMessageLikelyNeedsDisclosure(text: string): boolean; export type UserMessageBodyProps = { /** Durable timeline item id. Expansion memory is keyed by this value. */ messageId: string; /** Complete source text. Used only for the deterministic measurement fallback. */ text: string; children: ReactNode; className?: string | undefined; /** Per-field overrides for timeline labels, then the English defaults. */ disclosureLabels?: UserMessageDisclosureLabels | undefined; }; /** * Lossless disclosure boundary for already-sent user-message text. * * The full rendered subtree always remains in the DOM. A real browser decides * whether disclosure is needed from rendered height (including Markdown * structure and wrapping); the source-text heuristic is only a deterministic * fallback for SSR/test environments without layout. Timeline-owned context * remembers expansion per durable message id and preserves the reader's scroll * anchor when height changes. */ export declare function UserMessageBody({ messageId, text, children, className, disclosureLabels, }: UserMessageBodyProps): import("react").JSX.Element; export {};