orchid-ai 1.2.0 → 1.2.2

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,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IconName } from './Icon';
2
3
  import { CommandTheme, ChatMessage, ModelInfo, ChatTheme, ServerConfig } from '../types/types';
3
4
  interface ChatPanelProps {
4
5
  isOpen: boolean;
@@ -48,6 +49,9 @@ interface ChatPanelProps {
48
49
  query: string;
49
50
  context?: string;
50
51
  } | undefined>>;
52
+ headerIcon?: IconName | React.ReactElement;
53
+ headerTitle?: string;
54
+ headerSubtitle?: string;
51
55
  }
52
56
  /**
53
57
  * ChatPanel component
@@ -75,6 +79,9 @@ interface ChatPanelProps {
75
79
  * @param chatLevel - Optional chat level - 'full' or 'basic' or 'none'
76
80
  * @param initialQuery - Optional initial query to send when modal opens
77
81
  * @param setInitialQuery - Optional function to set/clear the initial query
82
+ * @param headerIcon - Optional icon to display in header - can be IconName string or React component (default: 'command' bot icon)
83
+ * @param headerTitle - Optional header title text (default: 'AI Logistics & Customs Expert')
84
+ * @param headerSubtitle - Optional header subtitle text (default: 'Ready to assist you with your queries')
78
85
  */
79
86
  export declare function ChatPanel({ isOpen, setIsOpen, onClose, onOpen, userId, formData, setFormState, onNavigate, theme, // Legacy support
80
87
  chatTheme, // New theme system
@@ -82,7 +89,8 @@ themeMode, // Default to system preference
82
89
  showHistory, // Default to hidden
83
90
  showProfileBubbles, // Default to hidden
84
91
  modalPosition, // Default to left position
85
- serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
92
+ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, headerIcon, // Default to bot icon
93
+ headerTitle, headerSubtitle, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
86
94
  /**
87
95
  * ChatInput component
88
96
  * @param query - The current query
@@ -28,7 +28,7 @@ import { Action } from '../types/types';
28
28
  * // Or any numeric value for custom pixel size
29
29
  */
30
30
  export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
31
- export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
31
+ export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'command' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
32
32
  export interface IconProps {
33
33
  name: IconName;
34
34
  size?: IconSize;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IconName } from './Icon';
2
3
  import { CommandTheme, ChatMessage, ModelInfo, ChatTheme, ServerConfig } from '../types/types';
3
4
  interface ChatPanelProps {
4
5
  isOpen: boolean;
@@ -48,6 +49,9 @@ interface ChatPanelProps {
48
49
  query: string;
49
50
  context?: string;
50
51
  } | undefined>>;
52
+ headerIcon?: IconName | React.ReactElement;
53
+ headerTitle?: string;
54
+ headerSubtitle?: string;
51
55
  }
52
56
  /**
53
57
  * ChatPanel component
@@ -75,6 +79,9 @@ interface ChatPanelProps {
75
79
  * @param chatLevel - Optional chat level - 'full' or 'basic' or 'none'
76
80
  * @param initialQuery - Optional initial query to send when modal opens
77
81
  * @param setInitialQuery - Optional function to set/clear the initial query
82
+ * @param headerIcon - Optional icon to display in header - can be IconName string or React component (default: 'command' bot icon)
83
+ * @param headerTitle - Optional header title text (default: 'AI Logistics & Customs Expert')
84
+ * @param headerSubtitle - Optional header subtitle text (default: 'Ready to assist you with your queries')
78
85
  */
79
86
  export declare function ChatPanel({ isOpen, setIsOpen, onClose, onOpen, userId, formData, setFormState, onNavigate, theme, // Legacy support
80
87
  chatTheme, // New theme system
@@ -82,7 +89,8 @@ themeMode, // Default to system preference
82
89
  showHistory, // Default to hidden
83
90
  showProfileBubbles, // Default to hidden
84
91
  modalPosition, // Default to left position
85
- serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
92
+ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, headerIcon, // Default to bot icon
93
+ headerTitle, headerSubtitle, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
86
94
  /**
87
95
  * ChatInput component
88
96
  * @param query - The current query
@@ -28,7 +28,7 @@ import { Action } from '../types/types';
28
28
  * // Or any numeric value for custom pixel size
29
29
  */
30
30
  export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
31
- export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
31
+ export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'command' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
32
32
  export interface IconProps {
33
33
  name: IconName;
34
34
  size?: IconSize;
package/dist/index.esm.js CHANGED
@@ -1104,6 +1104,7 @@ const iconComponents = {
1104
1104
  noImage: ({ size, className = '', color = 'currentColor' }) => (jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), jsx("polyline", { points: "21,15 16,10 5,21" }), jsx("line", { x1: "3", y1: "3", x2: "21", y2: "21" })] })),
1105
1105
  microphone: ({ size, className = '', color = 'currentColor' }) => (jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsx("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), jsx("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), jsx("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), jsx("line", { x1: "8", y1: "23", x2: "16", y2: "23" })] })),
1106
1106
  send: ({ size, className = '', color = 'currentColor' }) => (jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsx("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), jsx("polygon", { points: "22,2 15,22 11,13 2,9 22,2" })] })),
1107
+ command: ({ size, className = '', color = 'currentColor' }) => (jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: [jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), jsx("circle", { cx: "9", cy: "9", r: "1.5" }), jsx("circle", { cx: "15", cy: "9", r: "1.5" }), jsx("path", { d: "M9 14h6" }), jsx("path", { d: "M9 17h6" }), jsx("path", { d: "M12 6v2" })] })),
1107
1108
  // Action Icons
1108
1109
  plus: ({ size, className = '', color = 'currentColor' }) => (jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: [jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })] })),
1109
1110
  // AI Provider Icons
@@ -1216,6 +1217,8 @@ const getBasicSvgString = (name, size, color, className) => {
1216
1217
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2"${classAttr}><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>`;
1217
1218
  case 'send':
1218
1219
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2"${classAttr}><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22,2 15,22 11,13 2,9 22,2"/></svg>`;
1220
+ case 'command':
1221
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"${classAttr}><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="9" cy="9" r="1.5"/><circle cx="15" cy="9" r="1.5"/><path d="M9 14h6"/><path d="M9 17h6"/><path d="M12 6v2"/></svg>`;
1219
1222
  case 'error':
1220
1223
  return `<svg width="${size}" height="${size}" fill="#EF4444" viewBox="0 0 20 20"${classAttr}><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`;
1221
1224
  case 'warning':
@@ -3027,6 +3030,9 @@ const getTextFromMessage = (msg) => {
3027
3030
  * @param chatLevel - Optional chat level - 'full' or 'basic' or 'none'
3028
3031
  * @param initialQuery - Optional initial query to send when modal opens
3029
3032
  * @param setInitialQuery - Optional function to set/clear the initial query
3033
+ * @param headerIcon - Optional icon to display in header - can be IconName string or React component (default: 'command' bot icon)
3034
+ * @param headerTitle - Optional header title text (default: 'AI Logistics & Customs Expert')
3035
+ * @param headerSubtitle - Optional header subtitle text (default: 'Ready to assist you with your queries')
3030
3036
  */
3031
3037
  function ChatPanel({ isOpen, setIsOpen, onClose, onOpen, userId, formData, setFormState, onNavigate, theme = defaultTheme, // Legacy support
3032
3038
  chatTheme, // New theme system
@@ -3034,7 +3040,8 @@ themeMode = 'system', // Default to system preference
3034
3040
  showHistory = false, // Default to hidden
3035
3041
  showProfileBubbles = false, // Default to hidden
3036
3042
  modalPosition = 'left', // Default to left position
3037
- serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {}, showFloatingButton = false, floatingButtonIcon, floatingButtonPosition = 'bottom-right', floatingButtonSize = 'md', floatingButtonClassName = '', chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, }) {
3043
+ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {}, showFloatingButton = false, floatingButtonIcon, floatingButtonPosition = 'bottom-right', floatingButtonSize = 'md', floatingButtonClassName = '', chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, headerIcon = 'command', // Default to bot icon
3044
+ headerTitle = 'AI Logistics & Customs Expert', headerSubtitle = 'Ready to assist you with your queries', }) {
3038
3045
  const handleSuggestionClick = (s) => {
3039
3046
  if (setFormState && s.formState)
3040
3047
  setFormState(s.formState, s.actionType);
@@ -3228,7 +3235,7 @@ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {},
3228
3235
  }, ref: containerRef, onClick: (e) => e.stopPropagation(), children: [jsx("div", { className: `flex items-center justify-between px-6 py-4 border-b min-h-[72px] transition-all duration-500 delay-100 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-2'}`, style: {
3229
3236
  borderColor: finalTheme.colors.border.primary,
3230
3237
  backgroundColor: finalTheme.colors.background.primary,
3231
- }, children: jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: `inline-flex items-center justify-center rounded-full w-8 h-8 transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-75 rotate-12'}`, style: { backgroundColor: finalTheme.colors.primary[600] }, children: jsx(Icon, { name: "ai", size: "sm", style: { color: finalTheme.colors.text.primary } }) }), jsxs("div", { className: `transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-x-0' : 'opacity-0 translate-x-2'}`, children: [jsx("div", { className: "font-bold text-lg leading-tight", style: { color: finalTheme.colors.text.primary }, children: "AI Logistics & Customs Expert" }), jsx("div", { className: "text-xs", style: { color: finalTheme.colors.text.tertiary }, children: "Ready to assist you with your queries" })] })] }) }), jsxs("div", { className: `flex flex-1 min-h-0 h-full transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100' : 'opacity-0 scale-95'}`, children: [showHistory && (jsx(ChatHistorySidebar, { chats: chats || {}, currentChatId: currentChatId || 'default', switchChat: () => { }, newChat: () => { }, theme: finalTheme, isOpen: isOpen })), jsx("div", { className: "flex-1 flex flex-col min-h-0 h-full", children: jsx("div", { className: `flex-1 px-6 py-4 min-h-0 transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4'}`, style: {
3238
+ }, children: jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: `inline-flex items-center justify-center rounded-full w-8 h-8 transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-75 rotate-12'}`, style: { backgroundColor: finalTheme.colors.primary[600] }, children: typeof headerIcon === 'string' ? (jsx(Icon, { name: headerIcon, size: "sm", style: { color: finalTheme.colors.text.primary } })) : (headerIcon || (jsx(Icon, { name: "command", size: "sm", style: { color: finalTheme.colors.text.primary } }))) }), jsxs("div", { className: `transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-x-0' : 'opacity-0 translate-x-2'}`, children: [jsx("div", { className: "font-bold text-lg leading-tight", style: { color: finalTheme.colors.text.primary }, children: headerTitle }), jsx("div", { className: "text-xs", style: { color: finalTheme.colors.text.tertiary }, children: headerSubtitle })] })] }) }), jsxs("div", { className: `flex flex-1 min-h-0 h-full transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100' : 'opacity-0 scale-95'}`, children: [showHistory && (jsx(ChatHistorySidebar, { chats: chats || {}, currentChatId: currentChatId || 'default', switchChat: () => { }, newChat: () => { }, theme: finalTheme, isOpen: isOpen })), jsx("div", { className: "flex-1 flex flex-col min-h-0 h-full", children: jsx("div", { className: `flex-1 px-6 py-4 min-h-0 transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4'}`, style: {
3232
3239
  backgroundColor: finalTheme.colors.background.primary,
3233
3240
  }, children: jsx(Conversation, { onSuggestionClick: handleSuggestionClick, theme: finalTheme, showProfileBubbles: showProfileBubbles, autoScroll: true, showInput: true,
3234
3241
  // AI functionality props
package/dist/index.js CHANGED
@@ -1106,6 +1106,7 @@ const iconComponents = {
1106
1106
  noImage: ({ size, className = '', color = 'currentColor' }) => (jsxRuntime.jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), jsxRuntime.jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), jsxRuntime.jsx("polyline", { points: "21,15 16,10 5,21" }), jsxRuntime.jsx("line", { x1: "3", y1: "3", x2: "21", y2: "21" })] })),
1107
1107
  microphone: ({ size, className = '', color = 'currentColor' }) => (jsxRuntime.jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsxRuntime.jsx("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }), jsxRuntime.jsx("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), jsxRuntime.jsx("line", { x1: "12", y1: "19", x2: "12", y2: "23" }), jsxRuntime.jsx("line", { x1: "8", y1: "23", x2: "16", y2: "23" })] })),
1108
1108
  send: ({ size, className = '', color = 'currentColor' }) => (jsxRuntime.jsxs("svg", { width: size, height: size, fill: "none", stroke: color, strokeWidth: "2", viewBox: "0 0 24 24", className: className, children: [jsxRuntime.jsx("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), jsxRuntime.jsx("polygon", { points: "22,2 15,22 11,13 2,9 22,2" })] })),
1109
+ command: ({ size, className = '', color = 'currentColor' }) => (jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: [jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), jsxRuntime.jsx("circle", { cx: "9", cy: "9", r: "1.5" }), jsxRuntime.jsx("circle", { cx: "15", cy: "9", r: "1.5" }), jsxRuntime.jsx("path", { d: "M9 14h6" }), jsxRuntime.jsx("path", { d: "M9 17h6" }), jsxRuntime.jsx("path", { d: "M12 6v2" })] })),
1109
1110
  // Action Icons
1110
1111
  plus: ({ size, className = '', color = 'currentColor' }) => (jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: [jsxRuntime.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })] })),
1111
1112
  // AI Provider Icons
@@ -1218,6 +1219,8 @@ const getBasicSvgString = (name, size, color, className) => {
1218
1219
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2"${classAttr}><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>`;
1219
1220
  case 'send':
1220
1221
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2"${classAttr}><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22,2 15,22 11,13 2,9 22,2"/></svg>`;
1222
+ case 'command':
1223
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"${classAttr}><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="9" cy="9" r="1.5"/><circle cx="15" cy="9" r="1.5"/><path d="M9 14h6"/><path d="M9 17h6"/><path d="M12 6v2"/></svg>`;
1221
1224
  case 'error':
1222
1225
  return `<svg width="${size}" height="${size}" fill="#EF4444" viewBox="0 0 20 20"${classAttr}><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`;
1223
1226
  case 'warning':
@@ -3029,6 +3032,9 @@ const getTextFromMessage = (msg) => {
3029
3032
  * @param chatLevel - Optional chat level - 'full' or 'basic' or 'none'
3030
3033
  * @param initialQuery - Optional initial query to send when modal opens
3031
3034
  * @param setInitialQuery - Optional function to set/clear the initial query
3035
+ * @param headerIcon - Optional icon to display in header - can be IconName string or React component (default: 'command' bot icon)
3036
+ * @param headerTitle - Optional header title text (default: 'AI Logistics & Customs Expert')
3037
+ * @param headerSubtitle - Optional header subtitle text (default: 'Ready to assist you with your queries')
3032
3038
  */
3033
3039
  function ChatPanel({ isOpen, setIsOpen, onClose, onOpen, userId, formData, setFormState, onNavigate, theme = defaultTheme, // Legacy support
3034
3040
  chatTheme, // New theme system
@@ -3036,7 +3042,8 @@ themeMode = 'system', // Default to system preference
3036
3042
  showHistory = false, // Default to hidden
3037
3043
  showProfileBubbles = false, // Default to hidden
3038
3044
  modalPosition = 'left', // Default to left position
3039
- serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {}, showFloatingButton = false, floatingButtonIcon, floatingButtonPosition = 'bottom-right', floatingButtonSize = 'md', floatingButtonClassName = '', chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, }) {
3045
+ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {}, showFloatingButton = false, floatingButtonIcon, floatingButtonPosition = 'bottom-right', floatingButtonSize = 'md', floatingButtonClassName = '', chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, headerIcon = 'command', // Default to bot icon
3046
+ headerTitle = 'AI Logistics & Customs Expert', headerSubtitle = 'Ready to assist you with your queries', }) {
3040
3047
  const handleSuggestionClick = (s) => {
3041
3048
  if (setFormState && s.formState)
3042
3049
  setFormState(s.formState, s.actionType);
@@ -3230,7 +3237,7 @@ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features = {},
3230
3237
  }, ref: containerRef, onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsx("div", { className: `flex items-center justify-between px-6 py-4 border-b min-h-[72px] transition-all duration-500 delay-100 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-2'}`, style: {
3231
3238
  borderColor: finalTheme.colors.border.primary,
3232
3239
  backgroundColor: finalTheme.colors.background.primary,
3233
- }, children: jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx("span", { className: `inline-flex items-center justify-center rounded-full w-8 h-8 transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-75 rotate-12'}`, style: { backgroundColor: finalTheme.colors.primary[600] }, children: jsxRuntime.jsx(Icon, { name: "ai", size: "sm", style: { color: finalTheme.colors.text.primary } }) }), jsxRuntime.jsxs("div", { className: `transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-x-0' : 'opacity-0 translate-x-2'}`, children: [jsxRuntime.jsx("div", { className: "font-bold text-lg leading-tight", style: { color: finalTheme.colors.text.primary }, children: "AI Logistics & Customs Expert" }), jsxRuntime.jsx("div", { className: "text-xs", style: { color: finalTheme.colors.text.tertiary }, children: "Ready to assist you with your queries" })] })] }) }), jsxRuntime.jsxs("div", { className: `flex flex-1 min-h-0 h-full transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100' : 'opacity-0 scale-95'}`, children: [showHistory && (jsxRuntime.jsx(ChatHistorySidebar, { chats: chats || {}, currentChatId: currentChatId || 'default', switchChat: () => { }, newChat: () => { }, theme: finalTheme, isOpen: isOpen })), jsxRuntime.jsx("div", { className: "flex-1 flex flex-col min-h-0 h-full", children: jsxRuntime.jsx("div", { className: `flex-1 px-6 py-4 min-h-0 transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4'}`, style: {
3240
+ }, children: jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx("span", { className: `inline-flex items-center justify-center rounded-full w-8 h-8 transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-75 rotate-12'}`, style: { backgroundColor: finalTheme.colors.primary[600] }, children: typeof headerIcon === 'string' ? (jsxRuntime.jsx(Icon, { name: headerIcon, size: "sm", style: { color: finalTheme.colors.text.primary } })) : (headerIcon || (jsxRuntime.jsx(Icon, { name: "command", size: "sm", style: { color: finalTheme.colors.text.primary } }))) }), jsxRuntime.jsxs("div", { className: `transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-x-0' : 'opacity-0 translate-x-2'}`, children: [jsxRuntime.jsx("div", { className: "font-bold text-lg leading-tight", style: { color: finalTheme.colors.text.primary }, children: headerTitle }), jsxRuntime.jsx("div", { className: "text-xs", style: { color: finalTheme.colors.text.tertiary }, children: headerSubtitle })] })] }) }), jsxRuntime.jsxs("div", { className: `flex flex-1 min-h-0 h-full transition-all duration-500 delay-200 ${isOpen ? 'opacity-100 scale-100' : 'opacity-0 scale-95'}`, children: [showHistory && (jsxRuntime.jsx(ChatHistorySidebar, { chats: chats || {}, currentChatId: currentChatId || 'default', switchChat: () => { }, newChat: () => { }, theme: finalTheme, isOpen: isOpen })), jsxRuntime.jsx("div", { className: "flex-1 flex flex-col min-h-0 h-full", children: jsxRuntime.jsx("div", { className: `flex-1 px-6 py-4 min-h-0 transition-all duration-500 delay-300 ${isOpen ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-4'}`, style: {
3234
3241
  backgroundColor: finalTheme.colors.background.primary,
3235
3242
  }, children: jsxRuntime.jsx(Conversation, { onSuggestionClick: handleSuggestionClick, theme: finalTheme, showProfileBubbles: showProfileBubbles, autoScroll: true, showInput: true,
3236
3243
  // AI functionality props
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type IconName } from './Icon';
2
3
  import { CommandTheme, ChatMessage, ModelInfo, ChatTheme, ServerConfig } from '../types/types';
3
4
  interface ChatPanelProps {
4
5
  isOpen: boolean;
@@ -48,6 +49,9 @@ interface ChatPanelProps {
48
49
  query: string;
49
50
  context?: string;
50
51
  } | undefined>>;
52
+ headerIcon?: IconName | React.ReactElement;
53
+ headerTitle?: string;
54
+ headerSubtitle?: string;
51
55
  }
52
56
  /**
53
57
  * ChatPanel component
@@ -75,6 +79,9 @@ interface ChatPanelProps {
75
79
  * @param chatLevel - Optional chat level - 'full' or 'basic' or 'none'
76
80
  * @param initialQuery - Optional initial query to send when modal opens
77
81
  * @param setInitialQuery - Optional function to set/clear the initial query
82
+ * @param headerIcon - Optional icon to display in header - can be IconName string or React component (default: 'command' bot icon)
83
+ * @param headerTitle - Optional header title text (default: 'AI Logistics & Customs Expert')
84
+ * @param headerSubtitle - Optional header subtitle text (default: 'Ready to assist you with your queries')
78
85
  */
79
86
  export declare function ChatPanel({ isOpen, setIsOpen, onClose, onOpen, userId, formData, setFormState, onNavigate, theme, // Legacy support
80
87
  chatTheme, // New theme system
@@ -82,7 +89,8 @@ themeMode, // Default to system preference
82
89
  showHistory, // Default to hidden
83
90
  showProfileBubbles, // Default to hidden
84
91
  modalPosition, // Default to left position
85
- serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
92
+ serverConfig, models, defaultModel, showUsageStats, maxFileSize, features, showFloatingButton, floatingButtonIcon, floatingButtonPosition, floatingButtonSize, floatingButtonClassName, chats, setChats, currentChatId, setCurrentChatId, chatLevel, initialQuery, setInitialQuery, headerIcon, // Default to bot icon
93
+ headerTitle, headerSubtitle, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
86
94
  /**
87
95
  * ChatInput component
88
96
  * @param query - The current query
@@ -28,7 +28,7 @@ import { Action } from '../types/types';
28
28
  * // Or any numeric value for custom pixel size
29
29
  */
30
30
  export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
31
- export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
31
+ export type IconName = 'ai' | 'user' | 'system' | 'paperclip' | 'image' | 'noImage' | 'microphone' | 'send' | 'command' | 'plus' | 'pencil' | 'trash' | 'eye' | 'claude' | 'openai' | 'gemini' | 'grok' | 'error' | 'warning' | 'timeout' | 'auth-error' | 'pdf' | 'word' | 'excel' | 'csv' | 'text' | 'rtf' | 'file-generic';
32
32
  export interface IconProps {
33
33
  name: IconName;
34
34
  size?: IconSize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchid-ai",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "description": "AI-powered command processing and chat interface for React applications",
6
6
  "main": "dist/index.js",