@bytexbyte/nxtlinq-ai-agent-sdk 1.6.1 → 1.6.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.
- package/dist/components/ui/MessageInput.d.ts.map +1 -1
- package/dist/components/ui/MessageInput.js +5 -0
- package/dist/components/ui/MessageList.js +2 -2
- package/dist/components/ui/PermissionForm.d.ts.map +1 -1
- package/dist/components/ui/PermissionForm.js +6 -1
- package/dist/components/ui/styles/isolatedStyles.d.ts +1 -0
- package/dist/components/ui/styles/isolatedStyles.d.ts.map +1 -1
- package/dist/components/ui/styles/isolatedStyles.js +52 -7
- package/package.json +1 -1
- package/umd/nxtlinq-ai-agent.umd.js +122 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../src/components/ui/MessageInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../src/components/ui/MessageInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAsGhC,CAAC"}
|
|
@@ -19,6 +19,7 @@ export const MessageInput = () => {
|
|
|
19
19
|
return (_jsxs("div", { css: css `
|
|
20
20
|
padding: 15px !important;
|
|
21
21
|
display: flex !important;
|
|
22
|
+
align-items: center !important;
|
|
22
23
|
gap: 10px !important;
|
|
23
24
|
border-top: 1px solid #eee !important;
|
|
24
25
|
`, children: [_jsx(InputBase, { value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyPress: handleKeyPress, placeholder: inputPlaceholder, disabled: isDisabled, fullWidth: true, inputProps: {
|
|
@@ -31,6 +32,8 @@ export const MessageInput = () => {
|
|
|
31
32
|
outline: none !important;
|
|
32
33
|
font-size: 14px !important;
|
|
33
34
|
background-color: ${isDisabled ? '#f8f9fa' : '#fff'} !important;
|
|
35
|
+
height: 40px !important;
|
|
36
|
+
box-sizing: border-box !important;
|
|
34
37
|
` }), _jsxs("button", { onClick: (e) => handleSubmit(e), disabled: isDisabled || !inputValue.trim(), css: css `
|
|
35
38
|
${actionButton}
|
|
36
39
|
padding: 10px 20px !important;
|
|
@@ -39,6 +42,8 @@ export const MessageInput = () => {
|
|
|
39
42
|
display: flex !important;
|
|
40
43
|
align-items: center !important;
|
|
41
44
|
justify-content: center !important;
|
|
45
|
+
height: 40px !important;
|
|
46
|
+
box-sizing: border-box !important;
|
|
42
47
|
|
|
43
48
|
&:disabled {
|
|
44
49
|
background-color: #e9ecef !important;
|
|
@@ -5,7 +5,7 @@ import { css } from '@emotion/react';
|
|
|
5
5
|
import { convertUrlsToLinks } from '../../core/utils/urlUtils';
|
|
6
6
|
import { useChatBot } from '../context/ChatBotContext';
|
|
7
7
|
import { AI_MODEL_MAP } from '../types/ChatBotTypes';
|
|
8
|
-
import { messageListContainer, messageBubble, userMessage, messageContent, userMessageContent, retryMessageContent,
|
|
8
|
+
import { messageListContainer, messageBubble, userMessage, messageContent, userMessageContent, retryMessageContent, chatbotButton, connectedButton, loadingIndicator, modelIndicator, modelBadge, modelDot } from './styles/isolatedStyles';
|
|
9
9
|
export const MessageList = () => {
|
|
10
10
|
const { messages, isLoading, connectWallet, signInWallet, hitAddress, isAutoConnecting, isNeedSignInWithWallet, enableAIT, isAITLoading, isAITEnabling, sendMessage, permissions } = useChatBot();
|
|
11
11
|
const messagesEndRef = React.useRef(null);
|
|
@@ -65,7 +65,7 @@ export const MessageList = () => {
|
|
|
65
65
|
(message.button === 'signIn' && !isNeedSignInWithWallet) ? connectedButton :
|
|
66
66
|
(message.button === 'continue') ? connectedButton :
|
|
67
67
|
(message.button === 'enableAIT' && (message.metadata?.toolName && permissions.includes(message.metadata.toolName))) ? connectedButton :
|
|
68
|
-
|
|
68
|
+
chatbotButton, children: isAutoConnecting ? 'Connecting...' :
|
|
69
69
|
message.button === 'connectWallet' ? (Boolean(hitAddress) ? 'Connected' : 'Connect Wallet') :
|
|
70
70
|
message.button === 'signIn' ? (!isNeedSignInWithWallet ? 'Signed In' : 'Sign In') :
|
|
71
71
|
message.button === 'continue' ? 'Continue' :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionForm.d.ts","sourceRoot":"","sources":["../../../src/components/ui/PermissionForm.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"PermissionForm.d.ts","sourceRoot":"","sources":["../../../src/components/ui/PermissionForm.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqiBxD,CAAC"}
|
|
@@ -367,18 +367,23 @@ export const PermissionForm = ({ onClose }) => {
|
|
|
367
367
|
font-size: 14px !important;
|
|
368
368
|
font-weight: 500 !important;
|
|
369
369
|
transition: all 0.2s !important;
|
|
370
|
+
margin-top: 0 !important;
|
|
370
371
|
|
|
371
372
|
&:hover {
|
|
372
373
|
background-color: #e9ecef !important;
|
|
373
374
|
border-color: #ced4da !important;
|
|
374
375
|
}
|
|
375
376
|
`, children: "Cancel" }), _jsx("button", { onClick: handleSave, disabled: !hasPermissionChanges() || isSaving || isAITLoading, css: css `
|
|
376
|
-
${actionButton}
|
|
377
377
|
padding: 10px 20px !important;
|
|
378
378
|
background-color: ${!hasPermissionChanges() || isSaving || isAITLoading ? '#e9ecef' : '#007bff'} !important;
|
|
379
379
|
color: ${!hasPermissionChanges() || isSaving || isAITLoading ? '#6c757d' : 'white'} !important;
|
|
380
|
+
border: none !important;
|
|
380
381
|
border-radius: 8px !important;
|
|
382
|
+
cursor: ${!hasPermissionChanges() || isSaving || isAITLoading ? 'not-allowed' : 'pointer'} !important;
|
|
381
383
|
font-size: 14px !important;
|
|
384
|
+
font-weight: 500 !important;
|
|
385
|
+
transition: all 0.2s !important;
|
|
386
|
+
margin-top: 0 !important;
|
|
382
387
|
|
|
383
388
|
&:disabled {
|
|
384
389
|
cursor: not-allowed !important;
|
|
@@ -12,6 +12,7 @@ export declare const userMessage: import("@emotion/utils").SerializedStyles;
|
|
|
12
12
|
export declare const messageContent: import("@emotion/utils").SerializedStyles;
|
|
13
13
|
export declare const userMessageContent: import("@emotion/utils").SerializedStyles;
|
|
14
14
|
export declare const retryMessageContent: import("@emotion/utils").SerializedStyles;
|
|
15
|
+
export declare const chatbotButton: import("@emotion/utils").SerializedStyles;
|
|
15
16
|
export declare const actionButton: import("@emotion/utils").SerializedStyles;
|
|
16
17
|
export declare const connectedButton: import("@emotion/utils").SerializedStyles;
|
|
17
18
|
export declare const loadingIndicator: import("@emotion/utils").SerializedStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isolatedStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/styles/isolatedStyles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,2CAwBpB,CAAC;AAGF,eAAO,MAAM,YAAY,2CAqDxB,CAAC;AAGF,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"isolatedStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/styles/isolatedStyles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,2CAwBpB,CAAC;AAGF,eAAO,MAAM,YAAY,2CAqDxB,CAAC;AAGF,eAAO,MAAM,cAAc,2CA0B1B,CA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7 +98,12 @@ export const floatingButton = css `
|
|
|
98
98
|
font-weight: 500 !important;
|
|
99
99
|
font-family: inherit !important;
|
|
100
100
|
|
|
101
|
-
&:
|
|
101
|
+
&:disabled {
|
|
102
|
+
cursor: not-allowed !important;
|
|
103
|
+
opacity: 0.6 !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:hover:not(:disabled) {
|
|
102
107
|
background-color: #0056b3 !important;
|
|
103
108
|
transform: translateY(-2px) !important;
|
|
104
109
|
}
|
|
@@ -157,7 +162,12 @@ export const headerButton = css `
|
|
|
157
162
|
line-height: 0 !important;
|
|
158
163
|
vertical-align: middle !important;
|
|
159
164
|
|
|
160
|
-
&:
|
|
165
|
+
&:disabled {
|
|
166
|
+
cursor: not-allowed !important;
|
|
167
|
+
opacity: 0.6 !important;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:hover:not(:disabled) {
|
|
161
171
|
background-color: rgba(255, 255, 255, 0.2) !important;
|
|
162
172
|
}
|
|
163
173
|
`;
|
|
@@ -177,6 +187,11 @@ export const closeButton = css `
|
|
|
177
187
|
height: 32px !important;
|
|
178
188
|
line-height: 0 !important;
|
|
179
189
|
vertical-align: middle !important;
|
|
190
|
+
|
|
191
|
+
&:disabled {
|
|
192
|
+
cursor: not-allowed !important;
|
|
193
|
+
opacity: 0.6 !important;
|
|
194
|
+
}
|
|
180
195
|
`;
|
|
181
196
|
// Message list container styles
|
|
182
197
|
export const messageListContainer = css `
|
|
@@ -233,7 +248,24 @@ export const retryMessageContent = css `
|
|
|
233
248
|
border: 1px solid #ffeaa7 !important;
|
|
234
249
|
font-family: inherit !important;
|
|
235
250
|
`;
|
|
236
|
-
//
|
|
251
|
+
// Chatbot button styles (for buttons inside chatbot window)
|
|
252
|
+
export const chatbotButton = css `
|
|
253
|
+
padding: 8px 16px !important;
|
|
254
|
+
background-color: #007bff !important;
|
|
255
|
+
color: white !important;
|
|
256
|
+
border: none !important;
|
|
257
|
+
border-radius: 5px !important;
|
|
258
|
+
cursor: pointer !important;
|
|
259
|
+
font-size: 14px !important;
|
|
260
|
+
font-family: inherit !important;
|
|
261
|
+
|
|
262
|
+
&:disabled {
|
|
263
|
+
background-color: #6c757d !important;
|
|
264
|
+
cursor: not-allowed !important;
|
|
265
|
+
opacity: 0.8 !important;
|
|
266
|
+
}
|
|
267
|
+
`;
|
|
268
|
+
// Action button styles (for buttons outside chatbot window)
|
|
237
269
|
export const actionButton = css `
|
|
238
270
|
padding: 8px 16px !important;
|
|
239
271
|
background-color: #007bff !important;
|
|
@@ -243,7 +275,6 @@ export const actionButton = css `
|
|
|
243
275
|
cursor: pointer !important;
|
|
244
276
|
font-size: 14px !important;
|
|
245
277
|
font-family: inherit !important;
|
|
246
|
-
margin-top: 10px !important;
|
|
247
278
|
|
|
248
279
|
&:disabled {
|
|
249
280
|
background-color: #6c757d !important;
|
|
@@ -261,7 +292,11 @@ export const connectedButton = css `
|
|
|
261
292
|
cursor: pointer !important;
|
|
262
293
|
font-size: 14px !important;
|
|
263
294
|
font-family: inherit !important;
|
|
264
|
-
|
|
295
|
+
|
|
296
|
+
&:disabled {
|
|
297
|
+
cursor: not-allowed !important;
|
|
298
|
+
opacity: 0.8 !important;
|
|
299
|
+
}
|
|
265
300
|
`;
|
|
266
301
|
// Loading indicator styles
|
|
267
302
|
export const loadingIndicator = css `
|
|
@@ -418,7 +453,12 @@ export const idvVerifyButton = css `
|
|
|
418
453
|
transition: background-color 0.2s !important;
|
|
419
454
|
font-family: inherit !important;
|
|
420
455
|
|
|
421
|
-
&:
|
|
456
|
+
&:disabled {
|
|
457
|
+
cursor: not-allowed !important;
|
|
458
|
+
opacity: 0.6 !important;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
&:hover:not(:disabled) {
|
|
422
462
|
background-color: #e67e22 !important;
|
|
423
463
|
}
|
|
424
464
|
`;
|
|
@@ -434,7 +474,12 @@ export const idvDismissButton = css `
|
|
|
434
474
|
transition: background-color 0.2s !important;
|
|
435
475
|
font-family: inherit !important;
|
|
436
476
|
|
|
437
|
-
&:
|
|
477
|
+
&:disabled {
|
|
478
|
+
cursor: not-allowed !important;
|
|
479
|
+
opacity: 0.6 !important;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
&:hover:not(:disabled) {
|
|
438
483
|
background-color: rgba(133, 100, 4, 0.1) !important;
|
|
439
484
|
}
|
|
440
485
|
`;
|
package/package.json
CHANGED