import type { ConfigProviderProps as AntdConfigProviderProps, ThemeConfig } from 'antd'; import React from 'react'; import type { AnyObject, ShortcutKeys } from '../_util/type'; import type { ActionsProps } from '../actions/interface'; import type { AttachmentsProps } from '../attachments'; import type { BubbleProps } from '../bubble'; import type { CodeHighlighterProps } from '../code-highlighter'; import type { ConversationsProps } from '../conversations'; import type { FileCardProps } from '../file-card'; import type { FolderProps } from '../folder'; import { Locale } from '../locale'; import type { MermaidProps } from '../mermaid'; import type { PromptsProps } from '../prompts'; import type { SenderProps } from '../sender'; import type { SourcesProps } from '../sources'; import type { SuggestionProps } from '../suggestion'; import type { MappingAlgorithm, OverrideToken } from '../theme/interface'; import type { ThinkProps } from '../think'; import type { ThoughtChainProps } from '../thought-chain'; import type { WelcomeProps } from '../welcome'; interface BaseComponentConfig { style: React.CSSProperties; styles: Record; className: string; classNames: Record; } export interface XComponentConfig extends BaseComponentConfig { shortcutKeys: Record; } type ComponentConfig = Pick; export interface XComponentsConfig { bubble?: ComponentConfig; conversations?: ComponentConfig; prompts?: ComponentConfig; sender?: ComponentConfig; suggestion?: ComponentConfig; thoughtChain?: ComponentConfig; attachments?: ComponentConfig; welcome?: ComponentConfig; actions?: ComponentConfig; think?: ComponentConfig; fileCard?: ComponentConfig; folder?: ComponentConfig; sources?: ComponentConfig; codeHighlighter?: ComponentConfig; mermaid?: ComponentConfig; } type ComponentsConfig = { [key in keyof OverrideToken]?: OverrideToken[key] & { algorithm?: boolean | MappingAlgorithm | MappingAlgorithm[]; }; }; export interface XProviderProps extends XComponentsConfig, Omit { theme?: Omit & { components?: ThemeConfig['components'] & ComponentsConfig; }; locale?: Locale; } declare const XProviderContext: React.Context; export default XProviderContext;