@nabeh/chat-widget 0.1.2 → 0.1.4

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.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  type WidgetPosition = "bottom-right" | "bottom-left";
2
+ type ChatWidgetDisplayMode = "widget" | "embedded";
2
3
  type ChatWidgetTheme = {
3
4
  accent: string;
4
5
  accentSoft: string;
@@ -32,6 +33,7 @@ type RagCitation = {
32
33
  sheetName?: string | null;
33
34
  rowNumber?: number | null;
34
35
  knowledgeName?: string | null;
36
+ text?: string | null;
35
37
  };
36
38
  type SendMessageRequest = {
37
39
  message: string;
@@ -70,6 +72,7 @@ type ChatWidgetConfig = {
70
72
  deleteLastQa?: string;
71
73
  };
72
74
  mount?: HTMLElement;
75
+ displayMode?: ChatWidgetDisplayMode;
73
76
  position?: WidgetPosition;
74
77
  title?: string;
75
78
  subtitle?: string;
@@ -88,6 +91,11 @@ type ChatWidgetConfig = {
88
91
  onOpen?: () => void;
89
92
  onClose?: () => void;
90
93
  onError?: (error: Error) => void;
94
+ onOpenAssistantPage?: () => Promise<void> | void;
95
+ assistantPageUrl?: string;
96
+ embedded?: {
97
+ showHeader?: boolean;
98
+ };
91
99
  };
92
100
  type ChatWidgetInstance = {
93
101
  open: () => void;
@@ -108,4 +116,4 @@ type BrowserGlobal = {
108
116
 
109
117
  declare function createChatWidget(config: ChatWidgetConfig): ChatWidgetInstance;
110
118
 
111
- export { type BrowserGlobal, type ChatListItem, type ChatWidgetConfig, type ChatWidgetInstance, type ChatWidgetTheme, type SendMessageRequest, type SendMessageResponse, type UserContext, type WidgetPosition, createChatWidget };
119
+ export { type BrowserGlobal, type ChatListItem, type ChatWidgetConfig, type ChatWidgetDisplayMode, type ChatWidgetInstance, type ChatWidgetTheme, type SendMessageRequest, type SendMessageResponse, type UserContext, type WidgetPosition, createChatWidget };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type WidgetPosition = "bottom-right" | "bottom-left";
2
+ type ChatWidgetDisplayMode = "widget" | "embedded";
2
3
  type ChatWidgetTheme = {
3
4
  accent: string;
4
5
  accentSoft: string;
@@ -32,6 +33,7 @@ type RagCitation = {
32
33
  sheetName?: string | null;
33
34
  rowNumber?: number | null;
34
35
  knowledgeName?: string | null;
36
+ text?: string | null;
35
37
  };
36
38
  type SendMessageRequest = {
37
39
  message: string;
@@ -70,6 +72,7 @@ type ChatWidgetConfig = {
70
72
  deleteLastQa?: string;
71
73
  };
72
74
  mount?: HTMLElement;
75
+ displayMode?: ChatWidgetDisplayMode;
73
76
  position?: WidgetPosition;
74
77
  title?: string;
75
78
  subtitle?: string;
@@ -88,6 +91,11 @@ type ChatWidgetConfig = {
88
91
  onOpen?: () => void;
89
92
  onClose?: () => void;
90
93
  onError?: (error: Error) => void;
94
+ onOpenAssistantPage?: () => Promise<void> | void;
95
+ assistantPageUrl?: string;
96
+ embedded?: {
97
+ showHeader?: boolean;
98
+ };
91
99
  };
92
100
  type ChatWidgetInstance = {
93
101
  open: () => void;
@@ -108,4 +116,4 @@ type BrowserGlobal = {
108
116
 
109
117
  declare function createChatWidget(config: ChatWidgetConfig): ChatWidgetInstance;
110
118
 
111
- export { type BrowserGlobal, type ChatListItem, type ChatWidgetConfig, type ChatWidgetInstance, type ChatWidgetTheme, type SendMessageRequest, type SendMessageResponse, type UserContext, type WidgetPosition, createChatWidget };
119
+ export { type BrowserGlobal, type ChatListItem, type ChatWidgetConfig, type ChatWidgetDisplayMode, type ChatWidgetInstance, type ChatWidgetTheme, type SendMessageRequest, type SendMessageResponse, type UserContext, type WidgetPosition, createChatWidget };