import React from 'react'; import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, e as ChatViewportSize, R as RemoteConfig } from './index-BKOyhayB.mjs'; export { A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, i as Chunk, j as ChunkOptions, k as CircuitBreaker, l as CircuitBreakerOptions, m as ConfigFetcher, n as ConfigurationException, o as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, p as IRendererStrategy, q as IntentCategory, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, v as ProviderCredentials, w as ProviderNotFoundException, x as RateLimitException, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, G as RenderDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, U as isTransientError } from './index-BKOyhayB.mjs'; import { O as ObservabilityTrace, P as Product, U as UITransformationResponse, a as UseRagChatOptions, b as UseRagChatReturn, c as ProjectChatSettings } from './ILLMProvider-DO5gj-e5.mjs'; export { A as AuthMode, C as ChatMessage, d as ChatOptions, e as ChatResponse, E as EmbedOptions, f as EmbeddingConfig, g as EmbeddingProvider, I as ILLMProvider, h as IngestDocument, L as LLMConfig, i as LLMProvider, j as LatencyBreakdown, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, R as RAGConfig, p as RagConfig, q as RagMessage, r as RetrievalConfig, s as RetrievedChunk, T as ThemeMode, t as TokenUsage, u as UIConfig, v as UniversalRagConfig, w as UpsertDocument, V as VectorDBConfig, x as VectorDBProvider, y as VectorMatch, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-DO5gj-e5.mjs'; /** * ChatWidget — Floating Action Button (FAB) that toggles the chat window. * * Initialization is handled entirely by ConfigProvider (validate → /config). * ChatWidget reads the resulting context flags to decide its visual state: * * isProjectSettingsLoading → null (invisible while sequence is in-flight) * !isLicenseValid → disabled/locked FAB (license expired or invalid) * !isConfigLoaded → disabled/locked FAB (/config API failed) * both true → active FAB that opens the chat window * * No additional network calls are made by ChatWidget itself. */ declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWidgetProps): React.JSX.Element | null; /** * ChatWindow — The primary chat interface container component. * * Renders a fully functional chat experience including: * - Header with branding, online indicator, and window controls (clear/resize/maximize/close) * - Scrollable message area with SSE-streamed assistant replies, sources, and welcome state * - Input area with textarea, voice input, document upload, auto-suggestions, and send controls * - Mandatory license validation on mount (shows a blocking error overlay if invalid / terminated) * * All chat-send-side inputs (textarea, voice, upload, suggestion chips, send button) are * automatically disabled when the license validation fails or SDK version is unsupported. */ /** * ChatWindow component. * * @param className - Additional CSS class for the outer wrapper. * @param style - Inline styles for the outer wrapper. * @param onClose - Callback for the close (X) button (widget mode only). * @param showClose - Whether to render the close button. * @param onResizeStart - Callback fired when user begins dragging the resize handle. * @param onResetResize - Callback fired when the reset-size button is clicked. * @param isResized - True if the window has been resized away from defaults. * @param onMaximize - Callback for the maximize/minimize toggle button. * @param isMaximized - True if the window is currently maximized. * @param onAddToCart - Callback fired when user clicks "Add to Cart" on a product card. * @param apiUrl - Override URL for the chat endpoint (bypasses retrivoraApiBase). * @param retrivoraApiBase - Base URL for Retrivora catch-all endpoints (chat/suggestions/history/etc). * @param licenseKey - Override license key (highest priority; falls back to headers/env). * @param headers - Custom headers forwarded with every network request. */ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers, sessionId: sessionIdProp, showHistory, }: ChatWindowProps): React.JSX.Element; declare function DocumentUpload({ namespace, uploadUrl, retrivoraApiBase, onUploadComplete, className }: DocumentUploadProps): React.JSX.Element; declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, onAddToCart, viewportSize, showSources: showSourcesProp, onFeedback, }: MessageBubbleProps): React.JSX.Element; declare function SourceCard({ source, index }: SourceCardProps): React.JSX.Element; interface ObservabilityPanelProps { trace: ObservabilityTrace; primaryColor?: string; } declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelProps): React.JSX.Element; /** * ConfigProvider — React Context that makes RagConfig (UI subset) available * to all child components without prop drilling. * * Initialization sequence (sequential, short-circuits on failure): * 1. POST /validate — verify the license key is ACTIVE * ↳ If invalid/expired → isLicenseValid=false, isConfigLoaded=false, stop. * ChatWidget shows a disabled/locked FAB immediately. * 2. GET /config — fetch project credentials & settings (only if step 1 passed) * ↳ If fails → isLicenseValid=true, isConfigLoaded=false. * ChatWidget shows a disabled FAB (config unavailable). * 3. All good → isLicenseValid=true, isConfigLoaded=true. * ChatWidget shows the active FAB. * * Only the UI-safe portions of RagConfig are exposed to the client. */ declare function ConfigProvider({ config, children, }: ConfigProviderProps): React.JSX.Element; declare function useConfig(): ClientConfig; interface Snippet { id: string; title: string; description: string; code: string; language: string; } declare function CodeViewer({ snippet }: { snippet: Snippet; }): React.JSX.Element; declare function ProductCard({ product, primaryColor, onAddToCart }: ProductCardProps): React.JSX.Element; declare function ProductCarousel({ products, primaryColor, onAddToCart }: ProductCarouselProps): React.JSX.Element | null; declare function UIDispatcher({ rawContent, primaryColor, accentColor, isStreaming, onAddToCart, viewportSize }: { rawContent: string; primaryColor?: string; accentColor?: string; isStreaming?: boolean; onAddToCart?: (product: Product) => void; viewportSize?: ChatViewportSize; }): React.JSX.Element | null; interface VisualizationRendererProps { data: UITransformationResponse; className?: string; primaryColor?: string; onAddToCart?: (product: Product) => void; isStreaming?: boolean; } /** * VisualizationRenderer — Renders UI transformations as React components. * * Dynamically selects the appropriate visualization component based on the * transformation type returned by UITransformer. All charts are rendered via * Recharts (chart.js has been removed). * * Supported types: bar_chart · line_chart · pie_chart · table · product_carousel · text * * @example * const transformation = await UITransformer.analyzeAndDecide(query, sources, llm); * return ; */ declare function VisualizationRenderer({ data, className, primaryColor, onAddToCart, isStreaming, }: VisualizationRendererProps): React.JSX.Element; interface UIBlock { view: 'carousel' | 'table' | 'chart' | 'form' | 'actions' | string; title?: string; description?: string; data?: any; columns?: string[]; chartType?: 'bar' | 'line' | 'pie' | 'scatter'; xAxisKey?: string; dataKeys?: string[]; colors?: string[]; fields?: Array<{ name: string; type: 'text' | 'email' | 'number' | 'textarea' | 'checkbox'; label: string; required?: boolean; placeholder?: string; }>; submitText?: string; buttons?: Array<{ label: string; action: 'trigger_workflow' | 'open_url' | 'send_message' | string; payload?: Record; }>; [key: string]: any; } interface UIBlockRendererProps { block: UIBlock | unknown; customRenderers?: Record React.ReactNode>; primaryColor?: string; accentColor?: string; onAddToCart?: (product: Product) => void; onActionTriggered?: (action: string, payload: any) => void; onFormSubmit?: (formData: Record) => void | Promise; isStreaming?: boolean; } declare function UIBlockRenderer({ block, customRenderers, primaryColor, accentColor, onAddToCart, onActionTriggered, onFormSubmit, isStreaming, }: UIBlockRendererProps): React.JSX.Element | null; declare function useRagChat(projectId: string, options?: UseRagChatOptions): UseRagChatReturn; interface UseProjectSettingsOptions { licenseKey?: string; enabled?: boolean; initialSettings?: Partial; } interface UseProjectSettingsReturn { settings: ProjectChatSettings; remoteConfig: RemoteConfig | null; isLoading: boolean; error: string | null; reload: () => Promise; } declare function useProjectSettings(projectId: string, options?: UseProjectSettingsOptions): UseProjectSettingsReturn; /** * Dynamically registers new synonyms into the global FIELD_SYNONYMS dictionary. * You can call this during your app initialization to support custom schema fields. */ declare function addSynonyms(customSynonyms: Record): void; export { ChatWidget, ChatWidgetProps, ChatWindow, ChatWindowProps, ClientConfig, CodeViewer, ConfigProvider, DocumentUpload, DocumentUploadProps, MessageBubble, MessageBubbleProps, ObservabilityPanel, ObservabilityTrace, ProductCard, ProductCardProps, ProductCarousel, ProductCarouselProps, ProjectChatSettings, RemoteConfig, SourceCard, SourceCardProps, type UIBlock, UIBlockRenderer, UIDispatcher, type UseProjectSettingsOptions, type UseProjectSettingsReturn, UseRagChatOptions, UseRagChatReturn, VisualizationRenderer, addSynonyms, useConfig, useProjectSettings, useRagChat };