@filigran/chatbot 1.0.1 → 1.1.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.
- package/dist/index.d.ts +105 -95
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,98 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type FilePreviewData = string | ArrayBuffer;
|
|
4
|
-
type FilePreviewItem = {
|
|
5
|
-
data: FilePreviewData;
|
|
6
|
-
mime: string;
|
|
7
|
-
name: string;
|
|
8
|
-
preview: string;
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
type messageType = 'apiMessage' | 'userMessage' | 'usermessagewaiting' | 'leadCaptureMessage';
|
|
12
|
-
type IAgentReasoning = {
|
|
13
|
-
agentName?: string;
|
|
14
|
-
messages?: string[];
|
|
15
|
-
usedTools?: any[];
|
|
16
|
-
artifacts?: FileUpload[];
|
|
17
|
-
sourceDocuments?: any[];
|
|
18
|
-
instructions?: string;
|
|
19
|
-
nextAgent?: string;
|
|
20
|
-
};
|
|
21
|
-
type IAction = {
|
|
22
|
-
id?: string;
|
|
23
|
-
data?: any;
|
|
24
|
-
elements?: Array<{
|
|
25
|
-
type: string;
|
|
26
|
-
label: string;
|
|
27
|
-
}>;
|
|
28
|
-
mapping?: {
|
|
29
|
-
approve: string;
|
|
30
|
-
reject: string;
|
|
31
|
-
toolCalls: any[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
type FileUpload = Omit<FilePreviewItem, 'preview'>;
|
|
35
|
-
type MessageType = {
|
|
36
|
-
messageId?: string;
|
|
37
|
-
message: string;
|
|
38
|
-
type: messageType;
|
|
39
|
-
sourceDocuments?: any;
|
|
40
|
-
fileAnnotations?: any;
|
|
41
|
-
fileUploads?: Partial<FileUpload>[];
|
|
42
|
-
artifacts?: Partial<FileUpload>[];
|
|
43
|
-
agentReasoning?: IAgentReasoning[];
|
|
44
|
-
execution?: any;
|
|
45
|
-
agentFlowEventStatus?: string;
|
|
46
|
-
agentFlowExecutedData?: any;
|
|
47
|
-
usedTools?: any[];
|
|
48
|
-
action?: IAction | null;
|
|
49
|
-
id?: string;
|
|
50
|
-
followUpPrompts?: string;
|
|
51
|
-
dateTime?: string;
|
|
52
|
-
};
|
|
53
|
-
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
|
|
54
|
-
type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
|
|
55
|
-
type BotProps = {
|
|
56
|
-
expanded?: boolean;
|
|
57
|
-
onExpand?: () => void;
|
|
58
|
-
agenticUrl: string;
|
|
59
|
-
onRequest?: (request: RequestInit) => Promise<void>;
|
|
60
|
-
chatflowConfig?: Record<string, unknown> & {
|
|
61
|
-
vars: Record<string, string>;
|
|
62
|
-
};
|
|
63
|
-
backgroundColor?: string;
|
|
64
|
-
welcomeMessage?: string;
|
|
65
|
-
errorMessage?: string;
|
|
66
|
-
botMessage?: BotMessageTheme$1;
|
|
67
|
-
userMessage?: UserMessageTheme$1;
|
|
68
|
-
textInput?: TextInputTheme$1;
|
|
69
|
-
poweredByTextColor?: string;
|
|
70
|
-
badgeBackgroundColor?: string;
|
|
71
|
-
bubbleBackgroundColor?: string;
|
|
72
|
-
bubbleTextColor?: string;
|
|
73
|
-
showTitle?: boolean;
|
|
74
|
-
showAgentMessages?: boolean;
|
|
75
|
-
title?: string;
|
|
76
|
-
titleAvatarSrc?: string;
|
|
77
|
-
titleTextColor?: string;
|
|
78
|
-
titleBackgroundColor?: string;
|
|
79
|
-
formBackgroundColor?: string;
|
|
80
|
-
formTextColor?: string;
|
|
81
|
-
fontSize?: number;
|
|
82
|
-
isFullPage?: boolean;
|
|
83
|
-
footer?: FooterTheme$1;
|
|
84
|
-
sourceDocsTitle?: string;
|
|
85
|
-
observersConfig?: observersConfigType;
|
|
86
|
-
starterPrompts?: string[] | Record<string, {
|
|
87
|
-
prompt: string;
|
|
88
|
-
}>;
|
|
89
|
-
starterPromptFontSize?: number;
|
|
90
|
-
clearChatOnReload?: boolean;
|
|
91
|
-
disclaimer?: DisclaimerPopUpTheme$1;
|
|
92
|
-
dateTimeToggle?: DateTimeToggleTheme$1;
|
|
93
|
-
renderHTML?: boolean;
|
|
94
|
-
closeBot?: () => void;
|
|
95
|
-
};
|
|
1
|
+
import { Ref } from 'react';
|
|
96
2
|
|
|
97
3
|
type BubbleParams = {
|
|
98
4
|
theme?: BubbleTheme;
|
|
@@ -210,9 +116,113 @@ type DateTimeToggleTheme = {
|
|
|
210
116
|
time?: boolean;
|
|
211
117
|
};
|
|
212
118
|
|
|
119
|
+
type FilePreviewData = string | ArrayBuffer;
|
|
120
|
+
type FilePreviewItem = {
|
|
121
|
+
data: FilePreviewData;
|
|
122
|
+
mime: string;
|
|
123
|
+
name: string;
|
|
124
|
+
preview: string;
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
type messageType = 'apiMessage' | 'userMessage' | 'usermessagewaiting' | 'leadCaptureMessage';
|
|
128
|
+
type IAgentReasoning = {
|
|
129
|
+
agentName?: string;
|
|
130
|
+
messages?: string[];
|
|
131
|
+
usedTools?: any[];
|
|
132
|
+
artifacts?: FileUpload[];
|
|
133
|
+
sourceDocuments?: any[];
|
|
134
|
+
instructions?: string;
|
|
135
|
+
nextAgent?: string;
|
|
136
|
+
};
|
|
137
|
+
type IAction = {
|
|
138
|
+
id?: string;
|
|
139
|
+
data?: any;
|
|
140
|
+
elements?: Array<{
|
|
141
|
+
type: string;
|
|
142
|
+
label: string;
|
|
143
|
+
}>;
|
|
144
|
+
mapping?: {
|
|
145
|
+
approve: string;
|
|
146
|
+
reject: string;
|
|
147
|
+
toolCalls: any[];
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
type FileUpload = Omit<FilePreviewItem, 'preview'>;
|
|
151
|
+
type MessageType = {
|
|
152
|
+
messageId?: string;
|
|
153
|
+
message: string;
|
|
154
|
+
type: messageType;
|
|
155
|
+
sourceDocuments?: any;
|
|
156
|
+
fileAnnotations?: any;
|
|
157
|
+
fileUploads?: Partial<FileUpload>[];
|
|
158
|
+
artifacts?: Partial<FileUpload>[];
|
|
159
|
+
agentReasoning?: IAgentReasoning[];
|
|
160
|
+
execution?: any;
|
|
161
|
+
agentFlowEventStatus?: string;
|
|
162
|
+
agentFlowExecutedData?: any;
|
|
163
|
+
usedTools?: any[];
|
|
164
|
+
action?: IAction | null;
|
|
165
|
+
id?: string;
|
|
166
|
+
followUpPrompts?: string;
|
|
167
|
+
dateTime?: string;
|
|
168
|
+
};
|
|
169
|
+
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
|
|
170
|
+
type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
|
|
171
|
+
type BotProps = {
|
|
172
|
+
expanded?: boolean;
|
|
173
|
+
onExpand?: () => void;
|
|
174
|
+
agenticUrl: string;
|
|
175
|
+
onRequest?: (request: RequestInit) => Promise<void>;
|
|
176
|
+
chatflowConfig?: Record<string, unknown> & {
|
|
177
|
+
vars: Record<string, string>;
|
|
178
|
+
};
|
|
179
|
+
backgroundColor?: string;
|
|
180
|
+
welcomeMessage?: string;
|
|
181
|
+
errorMessage?: string;
|
|
182
|
+
botMessage?: BotMessageTheme;
|
|
183
|
+
userMessage?: UserMessageTheme;
|
|
184
|
+
textInput?: TextInputTheme;
|
|
185
|
+
poweredByTextColor?: string;
|
|
186
|
+
badgeBackgroundColor?: string;
|
|
187
|
+
bubbleBackgroundColor?: string;
|
|
188
|
+
bubbleTextColor?: string;
|
|
189
|
+
showTitle?: boolean;
|
|
190
|
+
showAgentMessages?: boolean;
|
|
191
|
+
title?: string;
|
|
192
|
+
titleAvatarSrc?: string;
|
|
193
|
+
titleTextColor?: string;
|
|
194
|
+
titleBackgroundColor?: string;
|
|
195
|
+
formBackgroundColor?: string;
|
|
196
|
+
formTextColor?: string;
|
|
197
|
+
fontSize?: number;
|
|
198
|
+
isFullPage?: boolean;
|
|
199
|
+
footer?: FooterTheme;
|
|
200
|
+
sourceDocsTitle?: string;
|
|
201
|
+
observersConfig?: observersConfigType;
|
|
202
|
+
starterPrompts?: string[] | Record<string, {
|
|
203
|
+
prompt: string;
|
|
204
|
+
}>;
|
|
205
|
+
starterPromptFontSize?: number;
|
|
206
|
+
clearChatOnReload?: boolean;
|
|
207
|
+
disclaimer?: DisclaimerPopUpTheme;
|
|
208
|
+
dateTimeToggle?: DateTimeToggleTheme;
|
|
209
|
+
renderHTML?: boolean;
|
|
210
|
+
closeBot?: () => void;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
213
|
type BubbleProps = BotProps & BubbleParams & {
|
|
214
214
|
open?: boolean;
|
|
215
215
|
onClose?: () => void;
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
+
declare module 'react/jsx-runtime' {
|
|
219
|
+
namespace JSX {
|
|
220
|
+
interface IntrinsicElements {
|
|
221
|
+
"filigran-chatbot": Omit<BubbleProps, 'ref'> & {
|
|
222
|
+
ref: Ref<unknown>;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
218
228
|
export type { BotProps, BubbleProps };
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/FiligranHQ/filigran-ui.git"
|
|
9
9
|
},
|
|
10
|
-
"version": "1.0
|
|
10
|
+
"version": "1.1.0",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -46,19 +46,20 @@
|
|
|
46
46
|
"@types/lodash": "4.17.21",
|
|
47
47
|
"@types/node": "24.10.1",
|
|
48
48
|
"@types/uuid": "11.0.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
50
|
-
"@typescript-eslint/parser": "8.
|
|
51
|
-
"autoprefixer": "10.4.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "8.50.0",
|
|
50
|
+
"@typescript-eslint/parser": "8.50.0",
|
|
51
|
+
"autoprefixer": "10.4.23",
|
|
52
52
|
"babel-plugin-lodash": "3.3.4",
|
|
53
53
|
"babel-preset-solid": "1.9.10",
|
|
54
54
|
"eslint": "8.57.1",
|
|
55
|
-
"eslint-config-next": "15.5.
|
|
56
|
-
"eslint-config-prettier": "
|
|
55
|
+
"eslint-config-next": "15.5.9",
|
|
56
|
+
"eslint-config-prettier": "10.1.8",
|
|
57
57
|
"eslint-plugin-prettier": "5.5.4",
|
|
58
58
|
"eslint-plugin-solid": "0.14.5",
|
|
59
59
|
"postcss": "8.5.6",
|
|
60
60
|
"prettier": "3.7.4",
|
|
61
|
-
"
|
|
61
|
+
"react": "19.2.3",
|
|
62
|
+
"rollup": "4.53.5",
|
|
62
63
|
"rollup-plugin-dts": "6.3.0",
|
|
63
64
|
"rollup-plugin-livereload": "2.0.5",
|
|
64
65
|
"rollup-plugin-postcss": "4.0.2",
|