@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.
Files changed (37) hide show
  1. package/dist/components/ChatBot.d.ts.map +1 -1
  2. package/dist/components/ChatBot.js +0 -1
  3. package/dist/components/context/ChatBotContext.d.ts.map +1 -1
  4. package/dist/components/context/ChatBotContext.js +42 -82
  5. package/dist/components/ui/BerifyMeModal.d.ts +1 -0
  6. package/dist/components/ui/BerifyMeModal.d.ts.map +1 -1
  7. package/dist/components/ui/BerifyMeModal.js +8 -10
  8. package/dist/components/ui/ChatBotUI.d.ts +1 -0
  9. package/dist/components/ui/ChatBotUI.d.ts.map +1 -1
  10. package/dist/components/ui/ChatBotUI.js +58 -222
  11. package/dist/components/ui/MessageInput.d.ts.map +1 -1
  12. package/dist/components/ui/MessageInput.js +41 -38
  13. package/dist/components/ui/MessageList.d.ts +1 -0
  14. package/dist/components/ui/MessageList.d.ts.map +1 -1
  15. package/dist/components/ui/MessageList.js +16 -79
  16. package/dist/components/ui/ModelSelector.d.ts +1 -0
  17. package/dist/components/ui/ModelSelector.d.ts.map +1 -1
  18. package/dist/components/ui/ModelSelector.js +51 -45
  19. package/dist/components/ui/NotificationModal.d.ts +1 -0
  20. package/dist/components/ui/NotificationModal.d.ts.map +1 -1
  21. package/dist/components/ui/NotificationModal.js +48 -74
  22. package/dist/components/ui/PermissionForm.d.ts +1 -1
  23. package/dist/components/ui/PermissionForm.d.ts.map +1 -1
  24. package/dist/components/ui/PermissionForm.js +302 -293
  25. package/dist/components/ui/PresetMessages.d.ts +1 -0
  26. package/dist/components/ui/PresetMessages.d.ts.map +1 -1
  27. package/dist/components/ui/PresetMessages.js +26 -27
  28. package/dist/components/ui/styles/isolatedStyles.d.ts +34 -0
  29. package/dist/components/ui/styles/isolatedStyles.d.ts.map +1 -0
  30. package/dist/components/ui/styles/isolatedStyles.js +449 -0
  31. package/dist/core/lib/useSpeechToTextFromMic/helper.d.ts.map +1 -1
  32. package/dist/core/lib/useSpeechToTextFromMic/helper.js +0 -4
  33. package/dist/core/lib/useSpeechToTextFromMic/index.js +1 -1
  34. package/dist/core/metakeepClient.d.ts.map +1 -1
  35. package/dist/core/metakeepClient.js +0 -1
  36. package/package.json +1 -1
  37. 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;AAI/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAwHjC,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", { style: { display: 'flex', alignItems: 'center' }, children: [_jsxs("div", { style: {
26
- display: 'flex',
27
- alignItems: 'center',
28
- cursor: 'pointer',
29
- padding: '4px 8px',
30
- borderRadius: '4px',
31
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
32
- transition: 'background-color 0.2s',
33
- fontSize: '12px',
34
- fontWeight: '500'
35
- }, onClick: handleClick, onMouseOver: (e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.2)', onMouseOut: (e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)', title: "Change AI Model", children: [_jsx("span", { style: { marginRight: '4px' }, children: availableModels[safeSelectedModelIndex]?.label || fallbackModelLabel }), _jsx("span", { style: { fontSize: '10px' }, children: "\u25BC" })] }), open && (_jsx("div", { style: {
36
- position: 'absolute',
37
- top: '100%',
38
- left: '0',
39
- backgroundColor: 'white',
40
- border: '1px solid #ddd',
41
- borderRadius: '4px',
42
- boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
43
- zIndex: 1000,
44
- minWidth: '120px',
45
- marginTop: '4px'
46
- }, children: availableModels.map((model, index) => (_jsx("div", { style: {
47
- padding: '8px 12px',
48
- cursor: 'pointer',
49
- backgroundColor: index === safeSelectedModelIndex ? '#f0f0f0' : 'transparent',
50
- color: index === safeSelectedModelIndex ? '#007bff' : '#333',
51
- fontSize: '12px',
52
- borderBottom: index < availableModels.length - 1 ? '1px solid #eee' : 'none'
53
- }, onClick: (event) => handleMenuItemClick(event, index), onMouseOver: (e) => {
54
- if (index !== safeSelectedModelIndex) {
55
- e.currentTarget.style.backgroundColor = '#f8f9fa';
56
- }
57
- }, onMouseOut: (e) => {
58
- if (index !== safeSelectedModelIndex) {
59
- e.currentTarget.style.backgroundColor = 'transparent';
60
- }
61
- }, children: model.label }, model.value))) })), open && (_jsx("div", { style: {
62
- position: 'fixed',
63
- top: 0,
64
- left: 0,
65
- right: 0,
66
- bottom: 0,
67
- zIndex: 999
68
- }, onClick: handleClose }))] }));
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,3 +1,4 @@
1
+ /** @jsxImportSource @emotion/react */
1
2
  import * as React from 'react';
2
3
  interface NotificationModalProps {
3
4
  type: 'success' | 'error' | 'info' | 'warning';
@@ -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;AAG/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,CA0H9D,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", { style: {
7
- position: 'fixed',
8
- top: 0,
9
- left: 0,
10
- right: 0,
11
- bottom: 0,
12
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
13
- display: 'flex',
14
- alignItems: 'center',
15
- justifyContent: 'center',
16
- zIndex: 1000
17
- }, children: _jsxs("div", { style: {
18
- backgroundColor: 'white',
19
- padding: '24px',
20
- borderRadius: '12px',
21
- width: '400px',
22
- maxWidth: '90%',
23
- boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
24
- textAlign: 'center'
25
- }, children: [_jsx("div", { style: {
26
- fontSize: '48px',
27
- marginBottom: '16px'
28
- }, children: icon }), _jsx("h3", { style: {
29
- margin: '0 0 12px 0',
30
- fontSize: '20px',
31
- fontWeight: '600',
32
- color: '#1a1a1a'
33
- }, children: title }), _jsx("p", { style: {
34
- margin: '0 0 24px 0',
35
- fontSize: '16px',
36
- color: '#666',
37
- lineHeight: '1.5'
38
- }, children: message }), _jsxs("div", { style: {
39
- display: 'flex',
40
- justifyContent: 'center',
41
- gap: '12px'
42
- }, children: [showConfirm && onConfirm && (_jsx("button", { onClick: onConfirm, style: {
43
- padding: '10px 20px',
44
- backgroundColor: type === 'error' ? '#dc3545' : '#007bff',
45
- color: 'white',
46
- border: 'none',
47
- borderRadius: '8px',
48
- cursor: 'pointer',
49
- fontSize: '14px',
50
- fontWeight: '500',
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,7 +1,7 @@
1
+ /** @jsxImportSource @emotion/react */
1
2
  import * as React from 'react';
2
3
  interface PermissionFormProps {
3
4
  onClose: () => void;
4
- onOpen: () => void;
5
5
  }
6
6
  export declare const PermissionForm: React.FC<PermissionFormProps>;
7
7
  export {};
@@ -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;AAG/B,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoiBxD,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"}