import * as react_jsx_runtime from 'react/jsx-runtime'; import * as _xpert_ai_chatkit_types from '@xpert-ai/chatkit-types'; import { ChatKitOptions, ChatKitReference, ProjectSelection, AssistantAppearance, Attachment, WorkspaceConnectorConnectRequest, SendUserMessageParams, ChatKitMessageFocusRequest, ToolOutputAttachmentPreviewRequest, ChatKitWorkbenchNavigation, ChatKitPetAnimationName, ChatKitMessageFocusResult, ChatKitTheme, ColorScheme } from '@xpert-ai/chatkit-types'; import { XpertProjectTypeRef, ConversationShareSnapshot, Assistant, IconDefinition, RuntimeCapabilitiesSelection as RuntimeCapabilitiesSelection$1 } from '@xpert-ai/xpert-sdk'; import * as class_variance_authority_types from 'class-variance-authority/types'; import * as React from 'react'; import { ReactNode } from 'react'; import { VariantProps } from 'class-variance-authority'; import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; import * as _xpert_ai_chatkit_web_shared from '@xpert-ai/chatkit-web-shared'; import { WindowDragRegions, Capability } from '@xpert-ai/chatkit-web-shared'; type ChatProps = { className?: string; title?: string; placeholder?: string; clientSecret?: string; refreshClientSecret?: () => Promise<{ secret: string; organizationId?: string; }>; options?: ChatKitOptions | null; isClientSecretInitializing?: boolean; surface?: 'main' | 'side'; referenceRequest?: ChatReferenceRequest | null; activeProjectId?: string; projectSelection?: ProjectSelection; projectsEnabled?: boolean; connectorsEnabled?: boolean; onProjectChange?: (projectId: string | null, selection?: ProjectSelection, navigation?: { resumeLatestConversation: boolean; }) => void; onProjectCreate?: (name: string, projectType?: XpertProjectTypeRef) => void; onProjectTypeCreate?: (projectType: XpertProjectTypeRef) => void; onConnectorsChange?: (connectorBindingIds: string[]) => void; }; type ChatReferenceRequest = { id: string; reference: ChatKitReference; }; /** Both conversation kinds run through the original Chat rendering path. * Only the runtime adapter changes: a group session must never query a private * assistant stream with group credentials. */ declare function Chat(props: ChatProps): react_jsx_runtime.JSX.Element; /** Accept only the exported text projection, never live messages or execution metadata. */ declare function ReadonlyMessageList({ messages, }: Pick): react_jsx_runtime.JSX.Element; declare const buttonVariants: (props?: ({ variant?: "secondary" | "outline" | "ghost" | "default" | "link" | "destructive" | null | undefined; size?: "sm" | "lg" | "xs" | "icon" | "default" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type ButtonProps = React.ComponentProps<"button"> & VariantProps & { asChild?: boolean; }; declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): react_jsx_runtime.JSX.Element; type InputProps = React.InputHTMLAttributes; declare const Input: React.ForwardRefExoticComponent>; declare const ScrollArea: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const ScrollBar: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const Avatar: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const AvatarImage: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const AvatarFallback: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; type ChatkitAvatarData = { appearance?: AssistantAppearance; background?: string; emoji?: { colons?: string; id?: string; unified?: string; }; url?: string; useNotoColor?: boolean; }; type ChatkitAvatarProps = React.ComponentProps & { avatar?: ChatkitAvatarData | null; fallback?: React.ReactNode; fallbackClassName?: string; imageClassName?: string; label: string; }; declare function getAvatarFallback(label: string): string; declare function normalizeChatkitAvatar(rawAvatar: unknown): ChatkitAvatarData | null; declare function extractAssistantAvatar(assistant: Assistant): ChatkitAvatarData | null; declare function ChatkitAvatar({ avatar, className, fallback, fallbackClassName, imageClassName, label, style, ...props }: ChatkitAvatarProps): react_jsx_runtime.JSX.Element; type IconDefinitionRendererProps = { icon?: IconDefinition | null; size?: number; className?: string; fallback?: React.ReactNode; decorative?: boolean; dataSlot?: string; }; declare function IconDefinitionRenderer({ icon, size, className, fallback, decorative, dataSlot, }: IconDefinitionRendererProps): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | react_jsx_runtime.JSX.Element | null; declare const Badge: React.ForwardRefExoticComponent & { variant?: "default" | "secondary" | "outline"; } & React.RefAttributes>; declare const Card: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardHeader: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardTitle: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardDescription: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardContent: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardFooter: React.ForwardRefExoticComponent & React.RefAttributes>; declare const CardAction: React.ForwardRefExoticComponent & React.RefAttributes>; declare const Separator: React.ForwardRefExoticComponent & { orientation?: "horizontal" | "vertical"; } & React.RefAttributes>; type TabsValue = string; type TabsProps = React.HTMLAttributes & { defaultValue?: TabsValue; value?: TabsValue; onValueChange?: (value: TabsValue) => void; }; declare function Tabs({ className, defaultValue, value, onValueChange, ...props }: TabsProps): react_jsx_runtime.JSX.Element; declare const TabsList: React.ForwardRefExoticComponent & React.RefAttributes>; declare const TabsTrigger: React.ForwardRefExoticComponent & { value: TabsValue; } & React.RefAttributes>; declare const TabsContent: React.ForwardRefExoticComponent & { value: TabsValue; } & React.RefAttributes>; type RuntimeCapabilitiesSelectionSet = { skills: { workspaceId?: string; ids: string[]; }; plugins: { nodeKeys: string[]; }; subAgents?: { nodeKeys: string[]; }; connectors?: { bindingIds: string[]; }; }; type RuntimeCapabilitiesSelection = RuntimeCapabilitiesSelection$1 & { inheritUnselected?: boolean; recommended?: RuntimeCapabilitiesSelectionSet; }; type ComposerValuePayload = { text?: string; reply?: string; attachments?: Attachment[]; references?: ChatKitReference[]; appendReferences?: boolean; selectedToolId?: string | null; selectedModelId?: string | null; runtimeCapabilities?: RuntimeCapabilitiesSelection | null; insertRuntimeCapabilities?: boolean; }; type CommandMessageMap = { onRealtimeVoiceCommand: _xpert_ai_chatkit_types.RealtimeVoiceCommand; onApprovalDecision: _xpert_ai_chatkit_types.ApprovalDecisionRequest; onApprovalAction: _xpert_ai_chatkit_types.ApprovalActionRequest; onConnectWorkspaceConnector: WorkspaceConnectorConnectRequest; onSendUserMessage: SendUserMessageParams; onSetComposerValue: ComposerValuePayload | null; onSetRuntimeCapabilities: RuntimeCapabilitiesSelection | null; onSetOptions: ChatKitOptions | null; onSetPetEnabled: { enabled: boolean; }; onFocusMessage: ChatKitMessageFocusRequest; onFocusComposer: null; onPrepareLeave: null; onSetThreadId: { threadId: string | null; }; onClientToolCall: unknown; onToolOutputAttachmentPreview: ToolOutputAttachmentPreviewRequest; onWorkbenchNavigationChange: ChatKitWorkbenchNavigation; onWorkbenchClientCommand: { commandKey: string; payload?: unknown; hostType: 'agent'; hostId: string; viewKey: string; }; onGetClientSecret: string | null; onWidgetAction: { action: string | { type: string; payload?: Record; }; widgetItem: unknown; }; }; type ParentEventPayloadMap = { window_drag_regions: WindowDragRegions; public_event: [Capability.Event, unknown]; chat_minimize_change: { minimized: boolean; }; pet_options_change: { pet: ChatKitOptions['pet'] | null; }; pet_state_change: { state: ChatKitPetAnimationName; }; }; type ParentEventName = keyof ParentEventPayloadMap; type ParentMessenger = { isParentAvailable: boolean; sendCommand: (command: C, data?: CommandMessageMap[C], transfer?: Transferable[]) => Promise; sendEvent: (event: E, data: ParentEventPayloadMap[E], transfer?: Transferable[]) => void; }; type ParentMessengerProviderProps = { channelId?: string; children: ReactNode; }; declare function ParentMessengerProvider({ channelId, children, }: ParentMessengerProviderProps): react_jsx_runtime.JSX.Element; type ParentMessengerOptions = { onSetOptions?: (options: ChatKitOptions | null) => void; onSetPetEnabled?: (enabled: boolean) => void; onSetComposerValue?: (payload: ComposerValuePayload | null) => void; onSetRuntimeCapabilities?: (selection: RuntimeCapabilitiesSelection | null) => void; onPrepareLeave?: () => Promise; onFocusMessage?: (request: ChatKitMessageFocusRequest) => Promise; onFocusComposer?: () => void; }; declare function useParentMessenger({ onSetOptions, onSetPetEnabled, onSetComposerValue, onSetRuntimeCapabilities, onPrepareLeave, onFocusMessage, onFocusComposer, }?: ParentMessengerOptions): { isParentAvailable: boolean; sendCommand: ; }; widgetItem: unknown; }; }>(command: C, data?: { onRealtimeVoiceCommand: _xpert_ai_chatkit_types.RealtimeVoiceCommand; onApprovalDecision: _xpert_ai_chatkit_types.ApprovalDecisionRequest; onApprovalAction: _xpert_ai_chatkit_types.ApprovalActionRequest; onConnectWorkspaceConnector: _xpert_ai_chatkit_types.WorkspaceConnectorConnectRequest; onSendUserMessage: _xpert_ai_chatkit_types.SendUserMessageParams; onSetComposerValue: ComposerValuePayload | null; onSetRuntimeCapabilities: RuntimeCapabilitiesSelection | null; onSetOptions: ChatKitOptions | null; onSetPetEnabled: { enabled: boolean; }; onFocusMessage: ChatKitMessageFocusRequest; onFocusComposer: null; onPrepareLeave: null; onSetThreadId: { threadId: string | null; }; onClientToolCall: unknown; onToolOutputAttachmentPreview: _xpert_ai_chatkit_types.ToolOutputAttachmentPreviewRequest; onWorkbenchNavigationChange: _xpert_ai_chatkit_types.ChatKitWorkbenchNavigation; onWorkbenchClientCommand: { commandKey: string; payload?: unknown; hostType: "agent"; hostId: string; viewKey: string; }; onGetClientSecret: string | null; onWidgetAction: { action: string | { type: string; payload?: Record; }; widgetItem: unknown; }; }[C], transfer?: Transferable[]) => Promise; sendEvent: (event: E, data: { window_drag_regions: _xpert_ai_chatkit_web_shared.WindowDragRegions; public_event: [_xpert_ai_chatkit_web_shared.Capability.Event, unknown]; chat_minimize_change: { minimized: boolean; }; pet_options_change: { pet: ChatKitOptions["pet"] | null; }; pet_state_change: { state: _xpert_ai_chatkit_types.ChatKitPetAnimationName; }; }[E], transfer?: Transferable[]) => void; updateComposer: (payload: ComposerValuePayload) => Promise; focusComposer: () => Promise; }; interface ThemeProviderProps { children: React.ReactNode; /** * Theme configuration. Accepts ChatKitTheme object or ColorScheme string for backward compatibility. * ColorScheme string will be normalized to ChatKitTheme object internally. * @preferred ChatKitTheme */ theme?: ChatKitTheme | ColorScheme; } interface ThemeContextValue { /** * Normalized theme configuration as ChatKitTheme object. * ColorScheme strings are converted to ChatKitTheme for consistent access. */ theme: ChatKitTheme; isDarkMode: boolean; /** * Element that owns ChatKit's resolved CSS variables. This lets sandbox * bridges read the same computed values that ChatKit renders with. */ themeRootRef: React.RefObject; /** * Increments after the current theme has been applied to themeRootRef. */ themeRevision: number; } declare function useTheme(): ThemeContextValue; declare function useTheme(options: { optional: true; }): ThemeContextValue | undefined; /** * ThemeProvider applies theme configuration via CSS variables */ declare function ThemeProvider({ children, theme: themeProp, }: ThemeProviderProps): react_jsx_runtime.JSX.Element; declare const supportedLocales: readonly ["en-US", "zh-CN"]; type SupportedLocale = (typeof supportedLocales)[number]; declare function setLanguage(locale?: string | null): SupportedLocale; declare function getLanguage(): SupportedLocale; export { Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatProps, ChatkitAvatar, type ChatkitAvatarData, type ChatkitAvatarProps, IconDefinitionRenderer, type IconDefinitionRendererProps, Input, type ParentMessenger, ParentMessengerProvider, type ParentMessengerProviderProps, ReadonlyMessageList, ScrollArea, ScrollBar, Separator, Tabs, TabsContent, TabsList, TabsTrigger, ThemeProvider, type ThemeProviderProps, supportedLocales as chatkitSupportedLocales, extractAssistantAvatar, getAvatarFallback, getLanguage as getChatkitLanguage, normalizeChatkitAvatar, setLanguage as setChatkitLanguage, useParentMessenger, useTheme };