@firstlovecenter/ai-chat 0.2.3 → 0.5.0

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.
@@ -1,3 +1,4 @@
1
+ import { ComponentType } from 'react';
1
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
 
3
4
  type NarrativeProvider = 'claude' | 'grok' | 'gemini';
@@ -10,6 +11,21 @@ type AiChatProps$1 = {
10
11
  };
11
12
  declare function AiChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps$1): react_jsx_runtime.JSX.Element;
12
13
 
14
+ type AiChatSessionSummary = {
15
+ id: number;
16
+ title: string;
17
+ updatedAt: string | null;
18
+ };
19
+ type AiChatProps = {
20
+ userFirstName: string;
21
+ /** Data scope label shown as a chip beneath the input (eg. "All countries"). */
22
+ scopeLabel: string;
23
+ /** User's stored narrative provider, surfaced as the model picker default. */
24
+ initialProvider: 'claude' | 'grok' | 'gemini';
25
+ };
26
+
27
+ declare function VercelChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps): react_jsx_runtime.JSX.Element;
28
+
13
29
  type ChartSpec = {
14
30
  type: 'line' | 'bar' | 'stacked_bar' | 'pie';
15
31
  x: string;
@@ -73,17 +89,13 @@ declare function AnswerBlocks({ blocks }: {
73
89
  blocks: BlockState[];
74
90
  }): react_jsx_runtime.JSX.Element;
75
91
 
76
- type AiChatSessionSummary = {
77
- id: number;
78
- title: string;
79
- updatedAt: string | null;
80
- };
81
- type AiChatProps = {
82
- userFirstName: string;
83
- /** Data scope label shown as a chip beneath the input (eg. "All countries"). */
84
- scopeLabel: string;
85
- /** User's stored narrative provider, surfaced as the model picker default. */
86
- initialProvider: 'claude' | 'grok' | 'gemini';
92
+ type ChatInterfaceDef = {
93
+ id: 'custom' | 'vercel';
94
+ label: string;
95
+ description: string;
96
+ Component: ComponentType<AiChatProps>;
87
97
  };
98
+ declare const chatInterfaces: ChatInterfaceDef[];
99
+ declare function getChatInterface(id: string): ChatInterfaceDef;
88
100
 
89
- export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, sanitiseBlock };
101
+ export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, type ChatInterfaceDef, VercelChat, chatInterfaces, getChatInterface, sanitiseBlock };
@@ -1,3 +1,4 @@
1
+ import { ComponentType } from 'react';
1
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
 
3
4
  type NarrativeProvider = 'claude' | 'grok' | 'gemini';
@@ -10,6 +11,21 @@ type AiChatProps$1 = {
10
11
  };
11
12
  declare function AiChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps$1): react_jsx_runtime.JSX.Element;
12
13
 
14
+ type AiChatSessionSummary = {
15
+ id: number;
16
+ title: string;
17
+ updatedAt: string | null;
18
+ };
19
+ type AiChatProps = {
20
+ userFirstName: string;
21
+ /** Data scope label shown as a chip beneath the input (eg. "All countries"). */
22
+ scopeLabel: string;
23
+ /** User's stored narrative provider, surfaced as the model picker default. */
24
+ initialProvider: 'claude' | 'grok' | 'gemini';
25
+ };
26
+
27
+ declare function VercelChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps): react_jsx_runtime.JSX.Element;
28
+
13
29
  type ChartSpec = {
14
30
  type: 'line' | 'bar' | 'stacked_bar' | 'pie';
15
31
  x: string;
@@ -73,17 +89,13 @@ declare function AnswerBlocks({ blocks }: {
73
89
  blocks: BlockState[];
74
90
  }): react_jsx_runtime.JSX.Element;
75
91
 
76
- type AiChatSessionSummary = {
77
- id: number;
78
- title: string;
79
- updatedAt: string | null;
80
- };
81
- type AiChatProps = {
82
- userFirstName: string;
83
- /** Data scope label shown as a chip beneath the input (eg. "All countries"). */
84
- scopeLabel: string;
85
- /** User's stored narrative provider, surfaced as the model picker default. */
86
- initialProvider: 'claude' | 'grok' | 'gemini';
92
+ type ChatInterfaceDef = {
93
+ id: 'custom' | 'vercel';
94
+ label: string;
95
+ description: string;
96
+ Component: ComponentType<AiChatProps>;
87
97
  };
98
+ declare const chatInterfaces: ChatInterfaceDef[];
99
+ declare function getChatInterface(id: string): ChatInterfaceDef;
88
100
 
89
- export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, sanitiseBlock };
101
+ export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, type ChatInterfaceDef, VercelChat, chatInterfaces, getChatInterface, sanitiseBlock };