@informedai/react 0.4.22 → 0.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -294,6 +294,42 @@ interface WebsiteChatbotProps extends WebsiteChatbotConfig {
294
294
  */
295
295
  declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
296
296
 
297
+ /**
298
+ * SmartQuestionnaire
299
+ * An embeddable questionnaire widget that guides users through steps,
300
+ * matches answers against a knowledge base, and streams results.
301
+ *
302
+ * Key design: option clicks = zero AI calls. Only free-text answers,
303
+ * matching, and results hit the API.
304
+ */
305
+ interface SmartQuestionnaireTheme {
306
+ primaryColor?: string;
307
+ backgroundColor?: string;
308
+ textColor?: string;
309
+ borderRadius?: string;
310
+ fontFamily?: string;
311
+ }
312
+ interface SmartQuestionnaireConfig {
313
+ /** Questionnaire ID */
314
+ questionnaireId: string;
315
+ /** API base URL (defaults to production) */
316
+ apiUrl?: string;
317
+ /** Theme customization */
318
+ theme?: Partial<SmartQuestionnaireTheme>;
319
+ /** Position (inline or fixed) */
320
+ position?: 'bottom-right' | 'bottom-left' | 'inline';
321
+ /** Start collapsed */
322
+ defaultCollapsed?: boolean;
323
+ /** Widget title */
324
+ title?: string;
325
+ /** Placeholder text for the free-text input */
326
+ placeholder?: string;
327
+ }
328
+ interface SmartQuestionnaireProps extends SmartQuestionnaireConfig {
329
+ className?: string;
330
+ }
331
+ declare function SmartQuestionnaire({ className, ...config }: SmartQuestionnaireProps): react_jsx_runtime.JSX.Element;
332
+
297
333
  interface InformedAIContextValue {
298
334
  session: Session | null;
299
335
  document: Document | null;
@@ -430,4 +466,4 @@ declare class InformedAIClient {
430
466
  private processSSEStream;
431
467
  }
432
468
 
433
- export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type QuickActionGroup, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
469
+ export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type QuickActionGroup, type SSEEvent, type Session, SmartQuestionnaire, type SmartQuestionnaireConfig, type SmartQuestionnaireTheme, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
package/dist/index.d.ts CHANGED
@@ -294,6 +294,42 @@ interface WebsiteChatbotProps extends WebsiteChatbotConfig {
294
294
  */
295
295
  declare function WebsiteChatbot({ className, ...config }: WebsiteChatbotProps): react_jsx_runtime.JSX.Element;
296
296
 
297
+ /**
298
+ * SmartQuestionnaire
299
+ * An embeddable questionnaire widget that guides users through steps,
300
+ * matches answers against a knowledge base, and streams results.
301
+ *
302
+ * Key design: option clicks = zero AI calls. Only free-text answers,
303
+ * matching, and results hit the API.
304
+ */
305
+ interface SmartQuestionnaireTheme {
306
+ primaryColor?: string;
307
+ backgroundColor?: string;
308
+ textColor?: string;
309
+ borderRadius?: string;
310
+ fontFamily?: string;
311
+ }
312
+ interface SmartQuestionnaireConfig {
313
+ /** Questionnaire ID */
314
+ questionnaireId: string;
315
+ /** API base URL (defaults to production) */
316
+ apiUrl?: string;
317
+ /** Theme customization */
318
+ theme?: Partial<SmartQuestionnaireTheme>;
319
+ /** Position (inline or fixed) */
320
+ position?: 'bottom-right' | 'bottom-left' | 'inline';
321
+ /** Start collapsed */
322
+ defaultCollapsed?: boolean;
323
+ /** Widget title */
324
+ title?: string;
325
+ /** Placeholder text for the free-text input */
326
+ placeholder?: string;
327
+ }
328
+ interface SmartQuestionnaireProps extends SmartQuestionnaireConfig {
329
+ className?: string;
330
+ }
331
+ declare function SmartQuestionnaire({ className, ...config }: SmartQuestionnaireProps): react_jsx_runtime.JSX.Element;
332
+
297
333
  interface InformedAIContextValue {
298
334
  session: Session | null;
299
335
  document: Document | null;
@@ -430,4 +466,4 @@ declare class InformedAIClient {
430
466
  private processSSEStream;
431
467
  }
432
468
 
433
- export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type QuickActionGroup, type SSEEvent, type Session, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };
469
+ export { AdminChatbot, type AdminChatbotConfig, type AdminChatbotTheme, type ChatMessage, type Document, type DocumentType, type DocumentTypeSchema, type FieldDefinition, InformedAIClient, InformedAIProvider, InformedAssistant, type InformedAssistantConfig, type QuickAction, type QuickActionGroup, type SSEEvent, type Session, SmartQuestionnaire, type SmartQuestionnaireConfig, type SmartQuestionnaireTheme, type TaskConfig, type TaskState, type UseSessionReturn, WebsiteChatbot, type WebsiteChatbotConfig, type WebsiteChatbotTheme, type WidgetMessage, type WidgetReadyContext, type WidgetTheme, useInformedAI, useSession };