@bytexbyte/nxtlinq-ai-agent-sdk 1.5.9 → 1.6.1
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/ChatBot.d.ts.map +1 -1
- package/dist/components/ChatBot.js +0 -1
- package/dist/components/context/ChatBotContext.d.ts.map +1 -1
- package/dist/components/context/ChatBotContext.js +42 -82
- package/dist/components/ui/BerifyMeModal.d.ts +1 -0
- package/dist/components/ui/BerifyMeModal.d.ts.map +1 -1
- package/dist/components/ui/BerifyMeModal.js +8 -10
- package/dist/components/ui/ChatBotUI.d.ts +1 -0
- package/dist/components/ui/ChatBotUI.d.ts.map +1 -1
- package/dist/components/ui/ChatBotUI.js +58 -222
- package/dist/components/ui/MessageInput.d.ts.map +1 -1
- package/dist/components/ui/MessageInput.js +41 -38
- package/dist/components/ui/MessageList.d.ts +1 -0
- package/dist/components/ui/MessageList.d.ts.map +1 -1
- package/dist/components/ui/MessageList.js +16 -79
- package/dist/components/ui/ModelSelector.d.ts +1 -0
- package/dist/components/ui/ModelSelector.d.ts.map +1 -1
- package/dist/components/ui/ModelSelector.js +51 -45
- package/dist/components/ui/NotificationModal.d.ts +1 -0
- package/dist/components/ui/NotificationModal.d.ts.map +1 -1
- package/dist/components/ui/NotificationModal.js +48 -74
- package/dist/components/ui/PermissionForm.d.ts +1 -1
- package/dist/components/ui/PermissionForm.d.ts.map +1 -1
- package/dist/components/ui/PermissionForm.js +302 -293
- package/dist/components/ui/PresetMessages.d.ts +1 -0
- package/dist/components/ui/PresetMessages.d.ts.map +1 -1
- package/dist/components/ui/PresetMessages.js +26 -27
- package/dist/components/ui/styles/isolatedStyles.d.ts +34 -0
- package/dist/components/ui/styles/isolatedStyles.d.ts.map +1 -0
- package/dist/components/ui/styles/isolatedStyles.js +449 -0
- package/dist/core/lib/useSpeechToTextFromMic/helper.d.ts.map +1 -1
- package/dist/core/lib/useSpeechToTextFromMic/helper.js +0 -4
- package/dist/core/lib/useSpeechToTextFromMic/index.js +1 -1
- package/dist/core/metakeepClient.d.ts.map +1 -1
- package/dist/core/metakeepClient.js +0 -1
- package/package.json +1 -1
- package/umd/nxtlinq-ai-agent.umd.js +882 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelSelector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ModelSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelSelector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ModelSelector.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAsHjC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
2
3
|
import * as React from 'react';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
3
5
|
import { useChatBot } from '../context/ChatBotContext';
|
|
4
6
|
export const ModelSelector = () => {
|
|
5
7
|
const { availableModels, selectedModelIndex, showModelSelector, handleModelChange } = useChatBot();
|
|
@@ -22,48 +24,52 @@ export const ModelSelector = () => {
|
|
|
22
24
|
if (!showModelSelector) {
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
return (_jsxs("div", {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
27
|
+
return (_jsxs("div", { css: css `
|
|
28
|
+
display: flex !important;
|
|
29
|
+
align-items: center !important;
|
|
30
|
+
position: relative !important;
|
|
31
|
+
`, children: [_jsxs("div", { css: css `
|
|
32
|
+
display: flex !important;
|
|
33
|
+
align-items: center !important;
|
|
34
|
+
cursor: pointer !important;
|
|
35
|
+
padding: 4px 8px !important;
|
|
36
|
+
border-radius: 4px !important;
|
|
37
|
+
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
38
|
+
transition: background-color 0.2s !important;
|
|
39
|
+
font-size: 12px !important;
|
|
40
|
+
font-weight: 500 !important;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: rgba(255, 255, 255, 0.2) !important;
|
|
44
|
+
}
|
|
45
|
+
`, onClick: handleClick, title: "Change AI Model", children: [_jsx("span", { css: css `margin-right: 4px !important;`, children: availableModels[safeSelectedModelIndex]?.label || fallbackModelLabel }), _jsx("span", { css: css `font-size: 10px !important;`, children: "\u25BC" })] }), open && (_jsx("div", { css: css `
|
|
46
|
+
position: absolute !important;
|
|
47
|
+
top: 100% !important;
|
|
48
|
+
left: 0 !important;
|
|
49
|
+
background-color: white !important;
|
|
50
|
+
border: 1px solid #ddd !important;
|
|
51
|
+
border-radius: 4px !important;
|
|
52
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
|
|
53
|
+
z-index: 1000 !important;
|
|
54
|
+
min-width: 120px !important;
|
|
55
|
+
margin-top: 4px !important;
|
|
56
|
+
`, children: availableModels.map((model, index) => (_jsx("div", { css: css `
|
|
57
|
+
padding: 8px 12px !important;
|
|
58
|
+
cursor: pointer !important;
|
|
59
|
+
background-color: ${index === safeSelectedModelIndex ? '#f0f0f0' : 'transparent'} !important;
|
|
60
|
+
color: ${index === safeSelectedModelIndex ? '#007bff' : '#333'} !important;
|
|
61
|
+
font-size: 12px !important;
|
|
62
|
+
border-bottom: ${index < availableModels.length - 1 ? '1px solid #eee' : 'none'} !important;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background-color: ${index === safeSelectedModelIndex ? '#f0f0f0' : '#f8f9fa'} !important;
|
|
66
|
+
}
|
|
67
|
+
`, onClick: (event) => handleMenuItemClick(event, index), children: model.label }, model.value))) })), open && (_jsx("div", { css: css `
|
|
68
|
+
position: fixed !important;
|
|
69
|
+
top: 0 !important;
|
|
70
|
+
left: 0 !important;
|
|
71
|
+
right: 0 !important;
|
|
72
|
+
bottom: 0 !important;
|
|
73
|
+
z-index: 999 !important;
|
|
74
|
+
`, onClick: handleClose }))] }));
|
|
69
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/NotificationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/NotificationModal.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,sBAAsB;IAC9B,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4F9D,CAAC"}
|
|
@@ -1,79 +1,53 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { css } from '@emotion/react';
|
|
2
3
|
import { createNotification, getNotificationIcon } from '../../core/utils/notificationUtils';
|
|
4
|
+
import { actionButton, modalOverlay } from './styles/isolatedStyles';
|
|
3
5
|
export const NotificationModal = ({ type, title, message, onClose, onConfirm, showConfirm = false, confirmText = 'Confirm', cancelText = 'Cancel' }) => {
|
|
4
6
|
const icon = getNotificationIcon(type);
|
|
5
7
|
const notification = createNotification(type, message);
|
|
6
|
-
return (_jsx("div", {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
transition: 'background-color 0.2s'
|
|
52
|
-
}, onMouseOver: (e) => e.currentTarget.style.backgroundColor = type === 'error' ? '#c82333' : '#0056b3', onMouseOut: (e) => e.currentTarget.style.backgroundColor = type === 'error' ? '#dc3545' : '#007bff', children: confirmText })), _jsx("button", { onClick: onClose, style: {
|
|
53
|
-
padding: '10px 20px',
|
|
54
|
-
backgroundColor: showConfirm ? '#f8f9fa' : '#007bff',
|
|
55
|
-
color: showConfirm ? '#666' : 'white',
|
|
56
|
-
border: showConfirm ? '1px solid #dee2e6' : 'none',
|
|
57
|
-
borderRadius: '8px',
|
|
58
|
-
cursor: 'pointer',
|
|
59
|
-
fontSize: '14px',
|
|
60
|
-
fontWeight: '500',
|
|
61
|
-
transition: 'all 0.2s'
|
|
62
|
-
}, onMouseOver: (e) => {
|
|
63
|
-
if (showConfirm) {
|
|
64
|
-
e.currentTarget.style.backgroundColor = '#e9ecef';
|
|
65
|
-
e.currentTarget.style.borderColor = '#ced4da';
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
e.currentTarget.style.backgroundColor = '#0056b3';
|
|
69
|
-
}
|
|
70
|
-
}, onMouseOut: (e) => {
|
|
71
|
-
if (showConfirm) {
|
|
72
|
-
e.currentTarget.style.backgroundColor = '#f8f9fa';
|
|
73
|
-
e.currentTarget.style.borderColor = '#dee2e6';
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
e.currentTarget.style.backgroundColor = '#007bff';
|
|
77
|
-
}
|
|
78
|
-
}, children: cancelText })] })] }) }));
|
|
8
|
+
return (_jsx("div", { css: modalOverlay, children: _jsxs("div", { css: css `
|
|
9
|
+
background-color: white !important;
|
|
10
|
+
padding: 24px !important;
|
|
11
|
+
border-radius: 12px !important;
|
|
12
|
+
width: 400px !important;
|
|
13
|
+
max-width: 90% !important;
|
|
14
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
|
|
15
|
+
text-align: center !important;
|
|
16
|
+
`, children: [_jsx("div", { css: css `
|
|
17
|
+
font-size: 48px !important;
|
|
18
|
+
margin-bottom: 16px !important;
|
|
19
|
+
`, children: icon }), _jsx("h3", { css: css `
|
|
20
|
+
margin: 0 0 12px 0 !important;
|
|
21
|
+
font-size: 20px !important;
|
|
22
|
+
font-weight: 600 !important;
|
|
23
|
+
color: #1a1a1a !important;
|
|
24
|
+
`, children: title }), _jsx("p", { css: css `
|
|
25
|
+
margin: 0 0 24px 0 !important;
|
|
26
|
+
font-size: 16px !important;
|
|
27
|
+
color: #666 !important;
|
|
28
|
+
line-height: 1.5 !important;
|
|
29
|
+
`, children: message }), _jsxs("div", { css: css `
|
|
30
|
+
display: flex !important;
|
|
31
|
+
justify-content: center !important;
|
|
32
|
+
gap: 12px !important;
|
|
33
|
+
`, children: [showConfirm && onConfirm && (_jsx("button", { onClick: onConfirm, css: css `
|
|
34
|
+
${actionButton}
|
|
35
|
+
background-color: ${type === 'error' ? '#dc3545' : '#007bff'} !important;
|
|
36
|
+
border-radius: 8px !important;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: ${type === 'error' ? '#c82333' : '#0056b3'} !important;
|
|
40
|
+
}
|
|
41
|
+
`, children: confirmText })), _jsx("button", { onClick: onClose, css: css `
|
|
42
|
+
${actionButton}
|
|
43
|
+
background-color: ${showConfirm ? '#f8f9fa' : '#007bff'} !important;
|
|
44
|
+
color: ${showConfirm ? '#666' : 'white'} !important;
|
|
45
|
+
border: ${showConfirm ? '1px solid #dee2e6' : 'none'} !important;
|
|
46
|
+
border-radius: 8px !important;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background-color: ${showConfirm ? '#e9ecef' : '#0056b3'} !important;
|
|
50
|
+
border-color: ${showConfirm ? '#ced4da' : 'none'} !important;
|
|
51
|
+
}
|
|
52
|
+
`, children: cancelText })] })] }) }));
|
|
79
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionForm.d.ts","sourceRoot":"","sources":["../../../src/components/ui/PermissionForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
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,CAgiBxD,CAAC"}
|