/** * Centralized design tokens for the chat UI. * * The defaults below produce a modern, Telegram-inspired look (azure accent, * soft 18px bubbles, rounded composer, inline time + vector ticks). Consumers * can override any subset through the `theme` / `darkTheme` props on `Chat`; * overrides are deep-merged over these defaults, and explicit per-component * style props still win over the theme. Components read the resolved theme via * the `useTheme` hook. */ export interface ChatThemeColors { /** Accent used for the send button, links, read ticks and active states. */ accent: string; /** Chat list background. Lets white incoming bubbles read on light themes. */ background: string; /** Incoming (left) bubble background. */ incomingBubble: string; /** Outgoing (right) bubble background. */ outgoingBubble: string; /** Incoming message text. */ incomingText: string; /** Outgoing message text. */ outgoingText: string; /** Time/meta text inside incoming bubbles. */ incomingMeta: string; /** Time/meta text inside outgoing bubbles. */ outgoingMeta: string; /** Sender name shown above grouped incoming messages. */ senderName: string; /** Delivery tick color before the message is read. */ ticksSent: string; /** Delivery tick color once the message is read. */ ticksRead: string; /** Hairlines and dividers. */ separator: string; /** Background of the rounded composer field. */ inputBackground: string; /** Background of the whole input bar surrounding the field. */ inputBarBackground: string; /** Composer text color. */ inputText: string; /** Composer placeholder color. */ placeholder: string; /** Translucent day-separator pill background. */ dayPillBackground: string; /** Day-separator pill text. */ dayPillText: string; /** Surface color for floating elements (scroll-to-bottom button, picker). */ surface: string; /** Inactive reaction pill background. */ reactionBackground: string; /** Active (selected) reaction pill background. */ reactionActiveBackground: string; /** Translucent overlay drawn on top of outgoing bubbles (e.g. reply quotes). */ outgoingOverlay: string; /** Error / "not implemented" placeholder text. */ error: string; /** Optional border around the composer field (default transparent). */ inputFieldBorder: string; } export interface ChatThemeAvatar { size: number; /** Background palette for initials avatars, picked deterministically per user. */ palette: string[]; /** Initials text color drawn on a palette background. */ textColor: string; } export interface ChatThemeRadii { bubble: number; bubbleGrouped: number; inputField: number; sendButton: number; reaction: number; dayPill: number; } export interface ChatThemeHorizontalEdge { left: number; right: number; } export interface ChatThemeSpacing { bubblePaddingV: number; bubblePaddingH: number; withinGroup: number; betweenGroups: number; /** Horizontal inset applied to the input bar and its accessories (e.g. the reply preview). */ screenEdge: ChatThemeHorizontalEdge; /** Vertical padding of the input bar's primary row (around the composer/actions). */ inputToolbarPaddingV: number; } /** Accepted shape for a `screenEdge` override: a single value for both sides, or either side individually. */ export type ChatThemeScreenEdgeOverride = number | Partial; export interface ChatThemeTextStyle { fontSize: number; lineHeight?: number; fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; } export interface ChatThemeTypography { message: ChatThemeTextStyle; time: ChatThemeTextStyle; senderName: ChatThemeTextStyle; day: ChatThemeTextStyle; system: ChatThemeTextStyle; } export interface ChatThemeComposer { /** Resting height of the composer field (single line). */ minHeight: number; /** Max height before the field scrolls internally instead of growing. */ maxHeight: number; /** Horizontal padding inside the field pill. */ fieldPaddingH: number; /** Size of the inset icons (emoji, attachment, camera). */ insetIconSize: number; } export interface ChatThemeVoice { /** Horizontal slide distance (px) to cancel a recording. */ cancelThreshold: number; /** Vertical slide distance (px) to lock hands-free recording. */ lockThreshold: number; } export interface ChatTheme { colors: ChatThemeColors; radii: ChatThemeRadii; spacing: ChatThemeSpacing; typography: ChatThemeTypography; avatar: ChatThemeAvatar; sendButton: { size: number; }; composer: ChatThemeComposer; voice: ChatThemeVoice; } export type PartialChatTheme = { colors?: Partial; radii?: Partial; spacing?: Partial> & { screenEdge?: ChatThemeScreenEdgeOverride; }; typography?: Partial>>; avatar?: Partial; sendButton?: Partial<{ size: number; }>; composer?: Partial; voice?: Partial; }; export declare const defaultLightTheme: ChatTheme; export declare const defaultDarkTheme: ChatTheme; export interface ChatThemeOverrides { light?: PartialChatTheme; dark?: PartialChatTheme; } /** * Resolve the active theme for a color scheme, applying the matching override. * Used by `Chat` to compute the theme once per change and share it via context. */ export declare function resolveTheme(colorScheme: 'light' | 'dark' | null | undefined, light?: PartialChatTheme, dark?: PartialChatTheme): ChatTheme; /** Deep-merge a partial theme over a base theme (two levels deep). */ export declare function mergeTheme(base: ChatTheme, override?: PartialChatTheme): ChatTheme; //# sourceMappingURL=Theme.d.ts.map