import * as React from 'react'; import type { ChatBoxSlots, ChatBoxSlotProps } from "../ChatBox/ChatBox.types.js"; /** * Opt-in row dividers rendered by the default message row. Shared by `ChatBox` * (`features` prop) and the standalone `ChatMessageList` (`features` prop). */ export interface ChatMessageListFeatures { /** * Whether to render a date divider between messages whose `createdAt` values * fall on different calendar days. Use the `dateDivider` slot to customize the * rendered component once enabled. * @default false */ dateDivider?: boolean; /** * Whether to render the unread "new messages" marker above the first unread * message (derived from the active conversation's `unreadCount` / `readState`). * Use the `unreadMarker` slot to customize the rendered component once enabled. * @default false */ unreadMarker?: boolean; /** * Whether to show the animated streaming indicator while waiting for / * receiving an assistant response. * - `'auto'` – shown only in assistant-backed conversations (auto-detected). * - `true` – always shown while a response is in flight. * - `false` – never shown. * Use the `streamingIndicator` slot to customize the rendered component. * @default 'auto' */ streamingIndicator?: boolean | 'auto'; } /** * Flat per-row slot keys shared by `ChatBox` and `ChatMessageList` — the * message-rendering pipeline vocabulary (group wrapper, dividers, and the * per-row `message*` parts). A subset of the public `ChatBoxSlots`. */ type ChatMessageRowSlotKeys = 'messageGroup' | 'dateDivider' | 'unreadMarker' | 'streamingIndicator' | 'messageRoot' | 'messageAvatar' | 'messageContent' | 'messageMeta' | 'messageInlineMeta' | 'messageError' | 'messageActions' | 'messageAuthorName'; export interface ChatMessageRowSlots extends Pick {} export interface ChatMessageRowSlotProps extends Pick {} export interface DefaultMessageItemProps { id: string; /** * Index of this row within the rendered list. Forwarded to the group so grouping * (previous/next neighbor lookup) is computed against the rendered list rather than * the full conversation when a custom `items` subset is used. */ index?: number; /** The rendered list's message ids. Forwarded to the group alongside `index`. */ items?: string[]; slots?: ChatMessageRowSlots; slotProps?: ChatMessageRowSlotProps; /** * Opt-in row dividers. Both are disabled by default; pass `{ dateDivider: true }` * and/or `{ unreadMarker: true }` to render them. */ features?: ChatMessageListFeatures; } /** * Default message-row composition used by `ChatBox` and `ChatMessageList` * when no custom `renderItem` is provided. * * Slots are read from the `ChatSlots` context (the `ChatBox` path) unless passed * explicitly via props (the standalone `ChatMessageList` path, which partitions * its own flat slots and forwards the row keys here). `messageGroup` swaps the * group component; the flat `message*` keys flow into the group, which maps them * onto the inner `ChatMessage`'s short local slots. * * Memoized because this is the per-row component inside the virtualized list: * `ChatBox`'s `renderItem` carries no slot payload (it reads context), so * scroll-driven re-renders short-circuit on the shallow id/index/items compare. */ export declare const DefaultMessageItem: React.MemoExoticComponent<({ id, index, items, slots: slotsProp, slotProps: slotPropsProp, features }: DefaultMessageItemProps) => import("react/jsx-runtime").JSX.Element>; export {};