@kite-copilot/chat-panel 0.2.45 → 0.2.47

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.
@@ -82,6 +82,8 @@ type StartingQuestion = {
82
82
  icon?: "layout" | "upload" | "setup" | "default";
83
83
  };
84
84
 
85
+ /** Corner position for the floating panel */
86
+ type PanelCorner = "bottom-left" | "bottom-right";
85
87
  interface ChatPanelProps {
86
88
  /** Whether the panel is open (controlled mode) */
87
89
  isOpen?: boolean;
@@ -100,22 +102,24 @@ interface ChatPanelProps {
100
102
  startingQuestionsEndpoint?: string;
101
103
  /** Unique identifier for the current user */
102
104
  userId?: string;
103
- /** Organization identifier */
105
+ /** Organization ID for multi-tenant data isolation */
104
106
  orgId?: string;
105
107
  /** User's display name (for personalization and support) */
106
108
  userName?: string;
107
109
  /** User's email address (for support agent context) */
108
110
  userEmail?: string;
109
- /** User's organization/company name (for support agent context) */
110
- userOrganization?: string;
111
111
  /** Supabase URL for realtime features (typing indicators in live chat) */
112
112
  supabaseUrl?: string;
113
113
  /** Supabase anonymous key for realtime features */
114
114
  supabaseAnonKey?: string;
115
+ /** Initial corner position for the panel (default: "bottom-left") */
116
+ initialCorner?: PanelCorner;
117
+ /** Callback when panel corner changes after drag */
118
+ onCornerChange?: (corner: PanelCorner) => void;
115
119
  /** Product backend URL for user authentication (e.g., https://dev.api.rocketalumnisolutions.com) */
116
120
  productBackendUrl?: string;
117
121
  }
118
- declare function ChatPanel({ isOpen, onClose, onOpen, onBack, onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions: startingQuestionsProp, startingQuestionsEndpoint, userId, orgId, userName, userEmail, userOrganization, supabaseUrl, supabaseAnonKey, productBackendUrl, }?: ChatPanelProps): react_jsx_runtime.JSX.Element;
122
+ declare function ChatPanel({ isOpen, onClose, onOpen, onBack, onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions: startingQuestionsProp, startingQuestionsEndpoint, userId, orgId, userName, userEmail, supabaseUrl, supabaseAnonKey, initialCorner, onCornerChange, productBackendUrl, }?: ChatPanelProps): react_jsx_runtime.JSX.Element;
119
123
  /**
120
124
  * PanelToggle - An arrow button on the right edge that toggles the side panel
121
125
  * Shows left arrow when closed (click to open), right arrow when open (click to close)
@@ -162,22 +166,24 @@ interface ChatPanelWithToggleProps {
162
166
  onOpenChange?: (isOpen: boolean) => void;
163
167
  /** Unique identifier for the current user */
164
168
  userId?: string;
165
- /** Organization identifier */
169
+ /** Organization ID for multi-tenant data isolation */
166
170
  orgId?: string;
167
171
  /** User's display name (for personalization and support) */
168
172
  userName?: string;
169
173
  /** User's email address (for support agent context) */
170
174
  userEmail?: string;
171
- /** User's organization/company name (for support agent context) */
172
- userOrganization?: string;
173
175
  /** Supabase URL for realtime features (typing indicators in live chat) */
174
176
  supabaseUrl?: string;
175
177
  /** Supabase anonymous key for realtime features */
176
178
  supabaseAnonKey?: string;
179
+ /** Initial corner position for the panel (default: "bottom-left") */
180
+ initialCorner?: PanelCorner;
181
+ /** Callback when panel corner changes after drag */
182
+ onCornerChange?: (corner: PanelCorner) => void;
177
183
  /** Product backend URL for user authentication (e.g., https://dev.api.rocketalumnisolutions.com) */
178
184
  productBackendUrl?: string;
179
185
  }
180
- declare function ChatPanelWithToggle({ onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions, startingQuestionsEndpoint, defaultOpen, isOpen: controlledIsOpen, onOpenChange, userId, orgId, userName, userEmail, userOrganization, supabaseUrl, supabaseAnonKey, productBackendUrl, }: ChatPanelWithToggleProps): react_jsx_runtime.JSX.Element;
186
+ declare function ChatPanelWithToggle({ onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions, startingQuestionsEndpoint, defaultOpen, isOpen: controlledIsOpen, onOpenChange, userId, orgId, userName, userEmail, supabaseUrl, supabaseAnonKey, initialCorner, onCornerChange, productBackendUrl, }: ChatPanelWithToggleProps): react_jsx_runtime.JSX.Element;
181
187
  /**
182
188
  * @deprecated Use ChatPanelWithToggle instead for the new side panel UX
183
189
  */
@@ -203,7 +209,6 @@ declare function HelpButton({ onClick, className }: HelpButtonProps): react_jsx_
203
209
  *
204
210
  * const chat = createKiteChat({
205
211
  * userId: 'user-123',
206
- * orgId: 'org-456',
207
212
  * agentUrl: 'https://api.example.com',
208
213
  * onNavigate: (page) => router.push(`/${page}`),
209
214
  * });
@@ -222,8 +227,8 @@ declare function HelpButton({ onClick, className }: HelpButtonProps): react_jsx_
222
227
  interface KiteChatConfig {
223
228
  /** Unique identifier for the current user */
224
229
  userId: string;
225
- /** Organization identifier */
226
- orgId: string;
230
+ /** Organization ID for multi-tenant data isolation */
231
+ orgId?: string;
227
232
  /** Backend agent API URL (defaults to http://localhost:5002) */
228
233
  agentUrl?: string;
229
234
  /** Current page context for the chat (e.g., 'dashboard', 'settings') */
@@ -242,8 +247,6 @@ interface KiteChatConfig {
242
247
  userName?: string;
243
248
  /** User's email address (optional - for support agent context) */
244
249
  userEmail?: string;
245
- /** User's organization/company name (optional - for support agent context) */
246
- userOrganization?: string;
247
250
  /** Supabase URL for realtime features (typing indicators in live chat) */
248
251
  supabaseUrl?: string;
249
252
  /** Supabase anonymous key for realtime features */
@@ -269,7 +272,7 @@ interface KiteChatInstance {
269
272
  isOpen: () => boolean;
270
273
  /** Update the current page context */
271
274
  setCurrentPage: (page: string) => void;
272
- /** Update configuration (userId, orgId, callbacks, etc.) */
275
+ /** Update configuration (userId, callbacks, etc.) */
273
276
  updateConfig: (config: Partial<KiteChatConfig>) => void;
274
277
  /** Check if the widget is currently mounted */
275
278
  isMounted: () => boolean;
@@ -287,7 +290,6 @@ interface KiteChatInstance {
287
290
  * ```ts
288
291
  * const chat = createKiteChat({
289
292
  * userId: 'user-123',
290
- * orgId: 'org-456',
291
293
  * onNavigate: (page) => router.push(`/${page}`)
292
294
  * });
293
295
  *
@@ -297,4 +299,4 @@ interface KiteChatInstance {
297
299
  */
298
300
  declare function createKiteChat(config: KiteChatConfig): KiteChatInstance;
299
301
 
300
- export { type ActionType as A, ChatPanel as C, HelpButton as H, type KiteChatConfig as K, type NavigationTarget as N, PanelToggle as P, type SettingsTab as S, type KiteChatInstance as a, ChatPanelWithToggle as b, createKiteChat as c, type ChatPanelProps as d, type ChatPanelWithToggleProps as e, type PanelToggleProps as f, type HelpButtonProps as g, type Page as h, type ActionData as i, type StartingQuestion as j };
302
+ export { type ActionType as A, ChatPanel as C, HelpButton as H, type KiteChatConfig as K, type NavigationTarget as N, PanelToggle as P, type SettingsTab as S, type KiteChatInstance as a, ChatPanelWithToggle as b, createKiteChat as c, type ChatPanelProps as d, type ChatPanelWithToggleProps as e, type PanelToggleProps as f, type HelpButtonProps as g, type Page as h, type ActionData as i, type StartingQuestion as j, type PanelCorner as k };
@@ -82,6 +82,8 @@ type StartingQuestion = {
82
82
  icon?: "layout" | "upload" | "setup" | "default";
83
83
  };
84
84
 
85
+ /** Corner position for the floating panel */
86
+ type PanelCorner = "bottom-left" | "bottom-right";
85
87
  interface ChatPanelProps {
86
88
  /** Whether the panel is open (controlled mode) */
87
89
  isOpen?: boolean;
@@ -100,22 +102,24 @@ interface ChatPanelProps {
100
102
  startingQuestionsEndpoint?: string;
101
103
  /** Unique identifier for the current user */
102
104
  userId?: string;
103
- /** Organization identifier */
105
+ /** Organization ID for multi-tenant data isolation */
104
106
  orgId?: string;
105
107
  /** User's display name (for personalization and support) */
106
108
  userName?: string;
107
109
  /** User's email address (for support agent context) */
108
110
  userEmail?: string;
109
- /** User's organization/company name (for support agent context) */
110
- userOrganization?: string;
111
111
  /** Supabase URL for realtime features (typing indicators in live chat) */
112
112
  supabaseUrl?: string;
113
113
  /** Supabase anonymous key for realtime features */
114
114
  supabaseAnonKey?: string;
115
+ /** Initial corner position for the panel (default: "bottom-left") */
116
+ initialCorner?: PanelCorner;
117
+ /** Callback when panel corner changes after drag */
118
+ onCornerChange?: (corner: PanelCorner) => void;
115
119
  /** Product backend URL for user authentication (e.g., https://dev.api.rocketalumnisolutions.com) */
116
120
  productBackendUrl?: string;
117
121
  }
118
- declare function ChatPanel({ isOpen, onClose, onOpen, onBack, onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions: startingQuestionsProp, startingQuestionsEndpoint, userId, orgId, userName, userEmail, userOrganization, supabaseUrl, supabaseAnonKey, productBackendUrl, }?: ChatPanelProps): react_jsx_runtime.JSX.Element;
122
+ declare function ChatPanel({ isOpen, onClose, onOpen, onBack, onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions: startingQuestionsProp, startingQuestionsEndpoint, userId, orgId, userName, userEmail, supabaseUrl, supabaseAnonKey, initialCorner, onCornerChange, productBackendUrl, }?: ChatPanelProps): react_jsx_runtime.JSX.Element;
119
123
  /**
120
124
  * PanelToggle - An arrow button on the right edge that toggles the side panel
121
125
  * Shows left arrow when closed (click to open), right arrow when open (click to close)
@@ -162,22 +166,24 @@ interface ChatPanelWithToggleProps {
162
166
  onOpenChange?: (isOpen: boolean) => void;
163
167
  /** Unique identifier for the current user */
164
168
  userId?: string;
165
- /** Organization identifier */
169
+ /** Organization ID for multi-tenant data isolation */
166
170
  orgId?: string;
167
171
  /** User's display name (for personalization and support) */
168
172
  userName?: string;
169
173
  /** User's email address (for support agent context) */
170
174
  userEmail?: string;
171
- /** User's organization/company name (for support agent context) */
172
- userOrganization?: string;
173
175
  /** Supabase URL for realtime features (typing indicators in live chat) */
174
176
  supabaseUrl?: string;
175
177
  /** Supabase anonymous key for realtime features */
176
178
  supabaseAnonKey?: string;
179
+ /** Initial corner position for the panel (default: "bottom-left") */
180
+ initialCorner?: PanelCorner;
181
+ /** Callback when panel corner changes after drag */
182
+ onCornerChange?: (corner: PanelCorner) => void;
177
183
  /** Product backend URL for user authentication (e.g., https://dev.api.rocketalumnisolutions.com) */
178
184
  productBackendUrl?: string;
179
185
  }
180
- declare function ChatPanelWithToggle({ onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions, startingQuestionsEndpoint, defaultOpen, isOpen: controlledIsOpen, onOpenChange, userId, orgId, userName, userEmail, userOrganization, supabaseUrl, supabaseAnonKey, productBackendUrl, }: ChatPanelWithToggleProps): react_jsx_runtime.JSX.Element;
186
+ declare function ChatPanelWithToggle({ onNavigate, onActionComplete, currentPage, agentUrl, startingQuestions, startingQuestionsEndpoint, defaultOpen, isOpen: controlledIsOpen, onOpenChange, userId, orgId, userName, userEmail, supabaseUrl, supabaseAnonKey, initialCorner, onCornerChange, productBackendUrl, }: ChatPanelWithToggleProps): react_jsx_runtime.JSX.Element;
181
187
  /**
182
188
  * @deprecated Use ChatPanelWithToggle instead for the new side panel UX
183
189
  */
@@ -203,7 +209,6 @@ declare function HelpButton({ onClick, className }: HelpButtonProps): react_jsx_
203
209
  *
204
210
  * const chat = createKiteChat({
205
211
  * userId: 'user-123',
206
- * orgId: 'org-456',
207
212
  * agentUrl: 'https://api.example.com',
208
213
  * onNavigate: (page) => router.push(`/${page}`),
209
214
  * });
@@ -222,8 +227,8 @@ declare function HelpButton({ onClick, className }: HelpButtonProps): react_jsx_
222
227
  interface KiteChatConfig {
223
228
  /** Unique identifier for the current user */
224
229
  userId: string;
225
- /** Organization identifier */
226
- orgId: string;
230
+ /** Organization ID for multi-tenant data isolation */
231
+ orgId?: string;
227
232
  /** Backend agent API URL (defaults to http://localhost:5002) */
228
233
  agentUrl?: string;
229
234
  /** Current page context for the chat (e.g., 'dashboard', 'settings') */
@@ -242,8 +247,6 @@ interface KiteChatConfig {
242
247
  userName?: string;
243
248
  /** User's email address (optional - for support agent context) */
244
249
  userEmail?: string;
245
- /** User's organization/company name (optional - for support agent context) */
246
- userOrganization?: string;
247
250
  /** Supabase URL for realtime features (typing indicators in live chat) */
248
251
  supabaseUrl?: string;
249
252
  /** Supabase anonymous key for realtime features */
@@ -269,7 +272,7 @@ interface KiteChatInstance {
269
272
  isOpen: () => boolean;
270
273
  /** Update the current page context */
271
274
  setCurrentPage: (page: string) => void;
272
- /** Update configuration (userId, orgId, callbacks, etc.) */
275
+ /** Update configuration (userId, callbacks, etc.) */
273
276
  updateConfig: (config: Partial<KiteChatConfig>) => void;
274
277
  /** Check if the widget is currently mounted */
275
278
  isMounted: () => boolean;
@@ -287,7 +290,6 @@ interface KiteChatInstance {
287
290
  * ```ts
288
291
  * const chat = createKiteChat({
289
292
  * userId: 'user-123',
290
- * orgId: 'org-456',
291
293
  * onNavigate: (page) => router.push(`/${page}`)
292
294
  * });
293
295
  *
@@ -297,4 +299,4 @@ interface KiteChatInstance {
297
299
  */
298
300
  declare function createKiteChat(config: KiteChatConfig): KiteChatInstance;
299
301
 
300
- export { type ActionType as A, ChatPanel as C, HelpButton as H, type KiteChatConfig as K, type NavigationTarget as N, PanelToggle as P, type SettingsTab as S, type KiteChatInstance as a, ChatPanelWithToggle as b, createKiteChat as c, type ChatPanelProps as d, type ChatPanelWithToggleProps as e, type PanelToggleProps as f, type HelpButtonProps as g, type Page as h, type ActionData as i, type StartingQuestion as j };
302
+ export { type ActionType as A, ChatPanel as C, HelpButton as H, type KiteChatConfig as K, type NavigationTarget as N, PanelToggle as P, type SettingsTab as S, type KiteChatInstance as a, ChatPanelWithToggle as b, createKiteChat as c, type ChatPanelProps as d, type ChatPanelWithToggleProps as e, type PanelToggleProps as f, type HelpButtonProps as g, type Page as h, type ActionData as i, type StartingQuestion as j, type PanelCorner as k };