@memori.ai/memori-react 8.12.0 → 8.13.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/CHANGELOG.md +32 -0
- package/dist/components/Chat/Chat.css +37 -3
- package/dist/components/Chat/Chat.js +60 -22
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +9 -5
- package/dist/components/ChatBubble/ChatBubble.js +54 -11
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatInputs/ChatInputs.css +293 -17
- package/dist/components/ChatInputs/ChatInputs.js +41 -25
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.css +75 -31
- package/dist/components/ChatTextArea/ChatTextArea.js +47 -18
- package/dist/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/dist/components/FilePreview/FilePreview.css +225 -146
- package/dist/components/FilePreview/FilePreview.d.ts +1 -2
- package/dist/components/FilePreview/FilePreview.js +20 -6
- package/dist/components/FilePreview/FilePreview.js.map +1 -1
- package/dist/components/Header/Header.css +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +2 -1
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.css +0 -4
- package/dist/components/MemoriWidget/MemoriWidget.css +11 -2
- package/dist/components/MemoriWidget/MemoriWidget.js +41 -5
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/dist/components/StartPanel/StartPanel.css +8 -0
- package/dist/components/UploadButton/UploadButton.css +20 -17
- package/dist/components/UploadButton/UploadButton.js +218 -89
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/layouts/chat.css +1 -1
- package/dist/components/ui/Button.css +1 -0
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +2 -1
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/imageCompression.d.ts +7 -0
- package/dist/helpers/imageCompression.js +123 -0
- package/dist/helpers/imageCompression.js.map +1 -0
- package/dist/locales/de.json +7 -4
- package/dist/locales/en.json +8 -5
- package/dist/locales/es.json +7 -4
- package/dist/locales/fr.json +7 -4
- package/dist/locales/it.json +8 -5
- package/dist/styles.css +1 -2
- package/esm/components/Chat/Chat.css +37 -3
- package/esm/components/Chat/Chat.js +60 -22
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +9 -5
- package/esm/components/ChatBubble/ChatBubble.js +54 -11
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.css +293 -17
- package/esm/components/ChatInputs/ChatInputs.js +42 -26
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.css +75 -31
- package/esm/components/ChatTextArea/ChatTextArea.js +49 -20
- package/esm/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/esm/components/FilePreview/FilePreview.css +225 -146
- package/esm/components/FilePreview/FilePreview.d.ts +1 -2
- package/esm/components/FilePreview/FilePreview.js +21 -7
- package/esm/components/FilePreview/FilePreview.js.map +1 -1
- package/esm/components/Header/Header.css +2 -2
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +2 -1
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.css +0 -4
- package/esm/components/MemoriWidget/MemoriWidget.css +11 -2
- package/esm/components/MemoriWidget/MemoriWidget.js +41 -5
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/esm/components/StartPanel/StartPanel.css +8 -0
- package/esm/components/UploadButton/UploadButton.css +20 -17
- package/esm/components/UploadButton/UploadButton.js +219 -90
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/layouts/chat.css +1 -1
- package/esm/components/ui/Button.css +1 -0
- package/esm/helpers/constants.d.ts +1 -0
- package/esm/helpers/constants.js +1 -0
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/imageCompression.d.ts +7 -0
- package/esm/helpers/imageCompression.js +119 -0
- package/esm/helpers/imageCompression.js.map +1 -0
- package/esm/locales/de.json +7 -4
- package/esm/locales/en.json +8 -5
- package/esm/locales/es.json +7 -4
- package/esm/locales/fr.json +7 -4
- package/esm/locales/it.json +8 -5
- package/esm/styles.css +1 -2
- package/package.json +1 -1
- package/src/__snapshots__/index.test.tsx.snap +5 -5
- package/src/components/Chat/Chat.css +37 -3
- package/src/components/Chat/Chat.tsx +89 -21
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +672 -732
- package/src/components/ChatBubble/ChatBubble.css +9 -5
- package/src/components/ChatBubble/ChatBubble.tsx +111 -20
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +4 -4
- package/src/components/ChatInputs/ChatInputs.css +293 -17
- package/src/components/ChatInputs/ChatInputs.tsx +144 -87
- package/src/components/ChatInputs/__snapshots__/ChatInputs.test.tsx.snap +430 -424
- package/src/components/ChatTextArea/ChatTextArea.css +75 -31
- package/src/components/ChatTextArea/ChatTextArea.test.tsx +1 -16
- package/src/components/ChatTextArea/ChatTextArea.tsx +51 -22
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +9 -72
- package/src/components/FilePreview/FilePreview.css +225 -146
- package/src/components/FilePreview/FilePreview.tsx +49 -36
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +2 -2
- package/src/components/Header/Header.css +2 -2
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/MediaWidget/MediaItemWidget.tsx +2 -1
- package/src/components/MediaWidget/MediaWidget.css +0 -4
- package/src/components/MemoriWidget/MemoriWidget.css +11 -2
- package/src/components/MemoriWidget/MemoriWidget.tsx +61 -12
- package/src/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/src/components/StartPanel/StartPanel.css +8 -0
- package/src/components/UploadButton/UploadButton.css +20 -17
- package/src/components/UploadButton/UploadButton.stories.tsx +247 -35
- package/src/components/UploadButton/UploadButton.tsx +280 -175
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +19 -4
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +195 -35
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +10 -1
- package/src/components/layouts/chat.css +1 -1
- package/src/components/ui/Button.css +1 -0
- package/src/helpers/constants.ts +1 -1
- package/src/helpers/imageCompression.ts +230 -0
- package/src/locales/de.json +7 -4
- package/src/locales/en.json +8 -5
- package/src/locales/es.json +7 -4
- package/src/locales/fr.json +7 -4
- package/src/locales/it.json +8 -5
- package/src/styles.css +1 -2
- package/dist/components/SignupForm/SignupForm.d.ts +0 -12
- package/dist/components/SignupForm/SignupForm.js +0 -199
- package/dist/components/SignupForm/SignupForm.js.map +0 -1
- package/dist/components/UploadMenu/UploadMenu.css +0 -47
- package/dist/components/UploadMenu/UploadMenu.d.ts +0 -9
- package/dist/components/UploadMenu/UploadMenu.js +0 -15
- package/dist/components/UploadMenu/UploadMenu.js.map +0 -1
- package/esm/components/SignupForm/SignupForm.d.ts +0 -12
- package/esm/components/SignupForm/SignupForm.js +0 -196
- package/esm/components/SignupForm/SignupForm.js.map +0 -1
- package/esm/components/UploadMenu/UploadMenu.css +0 -47
- package/esm/components/UploadMenu/UploadMenu.d.ts +0 -9
- package/esm/components/UploadMenu/UploadMenu.js +0 -12
- package/esm/components/UploadMenu/UploadMenu.js.map +0 -1
- package/src/components/UploadMenu/UploadMenu.css +0 -47
- package/src/components/UploadMenu/UploadMenu.stories.tsx +0 -66
- package/src/components/UploadMenu/UploadMenu.test.tsx +0 -34
- package/src/components/UploadMenu/UploadMenu.tsx +0 -68
- package/src/components/UploadMenu/__snapshots__/UploadMenu.test.tsx.snap +0 -137
|
@@ -43,13 +43,20 @@
|
|
|
43
43
|
word-wrap: break-word;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
.memori-chat--bubble-status-message-error {
|
|
47
|
+
border: 1px solid rgba(239, 68, 68, 0.3) !important;
|
|
48
|
+
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%) !important;
|
|
49
|
+
box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
|
|
50
|
+
color: rgb(239, 68, 68) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
.memori-chat--bubble {
|
|
47
54
|
display: inline-flex;
|
|
48
55
|
max-width: 90%;
|
|
49
56
|
flex-direction: column;
|
|
50
57
|
align-items: flex-start;
|
|
51
58
|
padding: 10px 16px;
|
|
52
|
-
border-radius:
|
|
59
|
+
border-radius: 12px 12px 12px 0;
|
|
53
60
|
margin: 10px auto 5px 10px;
|
|
54
61
|
margin-bottom: 5px;
|
|
55
62
|
background: var(--memori-chat-bubble-bg, #ffffff60);
|
|
@@ -60,9 +67,6 @@
|
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
|
|
63
|
-
.memori-chat--bubble-from-user {
|
|
64
|
-
z-index: -1;
|
|
65
|
-
}
|
|
66
70
|
|
|
67
71
|
.memori-chat--bubble-container.memori-chat--with-addon .memori-chat--bubble {
|
|
68
72
|
min-width: 9rem;
|
|
@@ -171,7 +175,7 @@
|
|
|
171
175
|
}
|
|
172
176
|
|
|
173
177
|
.memori-chat--bubble.memori-chat--user-bubble {
|
|
174
|
-
border-radius:
|
|
178
|
+
border-radius: 12px 12px 0 12px;
|
|
175
179
|
margin: 10px 10px 5px auto;
|
|
176
180
|
background: var(--memori-chat-user-bubble-bg);
|
|
177
181
|
box-shadow: 0 1px 6px 0 #d1d3de, 0 1px 3px 0 #c5c6d1;
|
|
@@ -126,7 +126,8 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
126
126
|
showCopyButton && (!!plainText?.length || !!message.text?.length);
|
|
127
127
|
const shouldShowCopyRawButton =
|
|
128
128
|
shouldShowCopyButtons &&
|
|
129
|
-
!!message.text?.length &&
|
|
129
|
+
!!message.text?.length &&
|
|
130
|
+
plainText !== message.text;
|
|
130
131
|
const rawMessageText = message.fromUser
|
|
131
132
|
? message.text || ''
|
|
132
133
|
: (message.text || '').replaceAll(/<think.*?>(.*?)<\/think>/gs, '');
|
|
@@ -180,15 +181,15 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
180
181
|
|
|
181
182
|
useEffect(() => {
|
|
182
183
|
return () => {
|
|
183
|
-
(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
(
|
|
185
|
+
Object.keys(copyFeedbackTimers.current) as Array<'plain' | 'raw'>
|
|
186
|
+
).forEach(key => {
|
|
187
|
+
const timer = copyFeedbackTimers.current[key];
|
|
188
|
+
if (timer) {
|
|
189
|
+
clearTimeout(timer);
|
|
190
|
+
copyFeedbackTimers.current[key] = null;
|
|
190
191
|
}
|
|
191
|
-
);
|
|
192
|
+
});
|
|
192
193
|
};
|
|
193
194
|
}, []);
|
|
194
195
|
|
|
@@ -218,11 +219,15 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
// Check if initial is a string (status message) or boolean (legacy)
|
|
221
|
-
const initialStatus =
|
|
222
|
-
|
|
222
|
+
const initialStatus =
|
|
223
|
+
typeof message.initial === 'string' ? message.initial : null;
|
|
224
|
+
const showInitialDivider =
|
|
225
|
+
(message.initial === true || isFirst) && !initialStatus;
|
|
223
226
|
|
|
227
|
+
// Check if this is a system error message
|
|
228
|
+
const isSystemError = message.emitter === 'system';
|
|
224
229
|
|
|
225
|
-
if(initialStatus) {
|
|
230
|
+
if (initialStatus) {
|
|
226
231
|
return (
|
|
227
232
|
<div className="memori-chat--bubble-status-message">
|
|
228
233
|
<div className="memori-chat--bubble-status-message-content">
|
|
@@ -232,11 +237,94 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
232
237
|
);
|
|
233
238
|
}
|
|
234
239
|
|
|
240
|
+
// Render system error messages as red warning messages
|
|
241
|
+
if (isSystemError) {
|
|
242
|
+
return (
|
|
243
|
+
<Transition
|
|
244
|
+
show
|
|
245
|
+
appear
|
|
246
|
+
as="div"
|
|
247
|
+
className={cx('memori-chat--bubble-container memori-chat-scroll-item', {
|
|
248
|
+
'memori-chat--bubble-from-user': false,
|
|
249
|
+
})}
|
|
250
|
+
>
|
|
251
|
+
<Transition.Child
|
|
252
|
+
as="picture"
|
|
253
|
+
className="memori-chat--bubble-avatar"
|
|
254
|
+
enter="transition ease-in-out duration-300"
|
|
255
|
+
enterFrom={`opacity-0 scale-075 translate-x--15`}
|
|
256
|
+
enterTo="opacity-1 scale-1 translate-x-0"
|
|
257
|
+
leave="transition ease-in-out duration-300"
|
|
258
|
+
leaveFrom="opacity-1 scale-1 translate-x-0"
|
|
259
|
+
leaveTo={`opacity-0 scale-075 translate-x--15`}
|
|
260
|
+
title={
|
|
261
|
+
!!message.emitter?.length && !!memori.enableBoardOfExperts
|
|
262
|
+
? message.emitter
|
|
263
|
+
: memori.name
|
|
264
|
+
}
|
|
265
|
+
>
|
|
266
|
+
<img
|
|
267
|
+
className="memori-chat--bubble-avatar-img"
|
|
268
|
+
alt={
|
|
269
|
+
!!message.emitter?.length && !!memori.enableBoardOfExperts
|
|
270
|
+
? message.emitter
|
|
271
|
+
: memori.name
|
|
272
|
+
}
|
|
273
|
+
src={
|
|
274
|
+
!!message.emitter?.length &&
|
|
275
|
+
!!memori.enableBoardOfExperts &&
|
|
276
|
+
experts?.find(e => e.name === message.emitter)
|
|
277
|
+
? `${
|
|
278
|
+
new URL(apiUrl ?? '/').origin
|
|
279
|
+
}/api/v1/memoriai/memori/avatar/${
|
|
280
|
+
experts.find(e => e.name === message.emitter)
|
|
281
|
+
?.expertMemoriID
|
|
282
|
+
}`
|
|
283
|
+
: memori.avatarURL && memori.avatarURL.length > 0
|
|
284
|
+
? getResourceUrl({
|
|
285
|
+
type: 'avatar',
|
|
286
|
+
tenantID: tenant?.name,
|
|
287
|
+
resourceURI: memori.avatarURL,
|
|
288
|
+
baseURL: baseUrl,
|
|
289
|
+
apiURL: apiUrl,
|
|
290
|
+
})
|
|
291
|
+
: getResourceUrl({
|
|
292
|
+
tenantID: tenant?.name,
|
|
293
|
+
type: 'avatar',
|
|
294
|
+
baseURL: baseUrl || 'https://www.aisuru.com',
|
|
295
|
+
apiURL: apiUrl,
|
|
296
|
+
})
|
|
297
|
+
}
|
|
298
|
+
onError={e => {
|
|
299
|
+
// Fallback image handling if primary source fails
|
|
300
|
+
e.currentTarget.src =
|
|
301
|
+
memori.avatarURL && memori.avatarURL.length > 0
|
|
302
|
+
? getResourceUrl({
|
|
303
|
+
type: 'avatar',
|
|
304
|
+
tenantID: tenant?.name,
|
|
305
|
+
resourceURI: memori.avatarURL,
|
|
306
|
+
baseURL: baseUrl,
|
|
307
|
+
})
|
|
308
|
+
: getResourceUrl({
|
|
309
|
+
tenantID: tenant?.name,
|
|
310
|
+
type: 'avatar',
|
|
311
|
+
baseURL: baseUrl,
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
e.currentTarget.onerror = null;
|
|
315
|
+
}}
|
|
316
|
+
/>
|
|
317
|
+
</Transition.Child>
|
|
318
|
+
<div className="memori-chat--bubble memori-chat--bubble-status-message-error">
|
|
319
|
+
<div className="memori-chat--bubble-message ">{cleanText}</div>
|
|
320
|
+
</div>
|
|
321
|
+
</Transition>
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
235
325
|
return (
|
|
236
326
|
<>
|
|
237
|
-
{showInitialDivider &&
|
|
238
|
-
<div className="memori-chat--bubble-initial" />
|
|
239
|
-
)}
|
|
327
|
+
{showInitialDivider && <div className="memori-chat--bubble-initial" />}
|
|
240
328
|
<Transition
|
|
241
329
|
show
|
|
242
330
|
appear
|
|
@@ -374,8 +462,10 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
374
462
|
shape="circle"
|
|
375
463
|
title={copyFeedback.plain ? copiedLabel : t('copy') || 'Copy'}
|
|
376
464
|
className={cx('memori-chat--bubble-action-icon', {
|
|
377
|
-
'memori-chat--bubble-action-icon--from-user':
|
|
378
|
-
|
|
465
|
+
'memori-chat--bubble-action-icon--from-user':
|
|
466
|
+
message.fromUser,
|
|
467
|
+
'memori-chat--bubble-action-icon--copied':
|
|
468
|
+
copyFeedback.plain,
|
|
379
469
|
})}
|
|
380
470
|
icon={
|
|
381
471
|
<Copy
|
|
@@ -410,7 +500,8 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
410
500
|
: t('copyRawCode') || 'Copy raw code'
|
|
411
501
|
}
|
|
412
502
|
className={cx('memori-chat--bubble-action-icon', {
|
|
413
|
-
'memori-chat--bubble-action-icon--from-user':
|
|
503
|
+
'memori-chat--bubble-action-icon--from-user':
|
|
504
|
+
message.fromUser,
|
|
414
505
|
'memori-chat--bubble-action-icon--copied': copyFeedback.raw,
|
|
415
506
|
})}
|
|
416
507
|
icon={
|
|
@@ -468,7 +559,7 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
468
559
|
|
|
469
560
|
{message.generatedByAI && showAIicon && (
|
|
470
561
|
<Tooltip
|
|
471
|
-
align="
|
|
562
|
+
align="right"
|
|
472
563
|
content={
|
|
473
564
|
t('generatedByAI') ||
|
|
474
565
|
(lang === 'it'
|
|
@@ -494,7 +585,7 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
494
585
|
message.translatedText &&
|
|
495
586
|
message.translatedText !== message.text && (
|
|
496
587
|
<Tooltip
|
|
497
|
-
align="
|
|
588
|
+
align="right"
|
|
498
589
|
content={`${
|
|
499
590
|
lang === 'it' ? 'Testo originale' : 'Original text'
|
|
500
591
|
}: ${message.text}`}
|
|
@@ -6867,7 +6867,7 @@ exports[`renders ChatBubble with debug button unchanged 1`] = `
|
|
|
6867
6867
|
</span>
|
|
6868
6868
|
</button>
|
|
6869
6869
|
<div
|
|
6870
|
-
class="memori-tooltip memori-tooltip--align-
|
|
6870
|
+
class="memori-tooltip memori-tooltip--align-right memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai"
|
|
6871
6871
|
>
|
|
6872
6872
|
<div
|
|
6873
6873
|
class="memori-tooltip--content"
|
|
@@ -7807,7 +7807,7 @@ exports[`renders ChatBubble with msg from BoE expert unchanged 1`] = `
|
|
|
7807
7807
|
</span>
|
|
7808
7808
|
</button>
|
|
7809
7809
|
<div
|
|
7810
|
-
class="memori-tooltip memori-tooltip--align-
|
|
7810
|
+
class="memori-tooltip memori-tooltip--align-right memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai"
|
|
7811
7811
|
>
|
|
7812
7812
|
<div
|
|
7813
7813
|
class="memori-tooltip--content"
|
|
@@ -7934,7 +7934,7 @@ exports[`renders ChatBubble with msg generated by AI unchanged 1`] = `
|
|
|
7934
7934
|
</span>
|
|
7935
7935
|
</button>
|
|
7936
7936
|
<div
|
|
7937
|
-
class="memori-tooltip memori-tooltip--align-
|
|
7937
|
+
class="memori-tooltip memori-tooltip--align-right memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai"
|
|
7938
7938
|
>
|
|
7939
7939
|
<div
|
|
7940
7940
|
class="memori-tooltip--content"
|
|
@@ -8569,7 +8569,7 @@ exports[`renders ChatBubble with translation and original unchanged 1`] = `
|
|
|
8569
8569
|
</span>
|
|
8570
8570
|
</button>
|
|
8571
8571
|
<div
|
|
8572
|
-
class="memori-tooltip memori-tooltip--align-
|
|
8572
|
+
class="memori-tooltip memori-tooltip--align-right memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai"
|
|
8573
8573
|
>
|
|
8574
8574
|
<div
|
|
8575
8575
|
class="memori-tooltip--content"
|
|
@@ -1,40 +1,320 @@
|
|
|
1
|
+
.memori-chat-inputs-wrapper {
|
|
2
|
+
position: sticky;
|
|
3
|
+
z-index: 10;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 0;
|
|
7
|
+
padding-bottom: 1.5rem;
|
|
8
|
+
margin: 0;
|
|
9
|
+
/* background: linear-gradient(to top, rgba(255, 255, 255, 0.8) 0%, transparent 100%); */
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
.memori-chat-inputs {
|
|
2
13
|
position: relative;
|
|
3
14
|
display: flex;
|
|
4
15
|
width: 100%;
|
|
16
|
+
min-width: 97%;
|
|
17
|
+
max-width: 97%;
|
|
5
18
|
box-sizing: border-box;
|
|
19
|
+
flex-flow: column;
|
|
6
20
|
flex-shrink: 0;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
21
|
padding: 0;
|
|
22
|
+
padding: 8px 12px !important;
|
|
10
23
|
border: none;
|
|
24
|
+
border-radius: 12px;
|
|
11
25
|
margin: 0;
|
|
12
|
-
|
|
26
|
+
margin: auto;
|
|
27
|
+
background: white;
|
|
28
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.memori-chat-inputs:disabled {
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
pointer-events: none;
|
|
13
34
|
}
|
|
14
35
|
|
|
15
|
-
.memori-chat-inputs--
|
|
16
|
-
|
|
17
|
-
|
|
36
|
+
.memori-chat-inputs--container {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: grid;
|
|
39
|
+
width: 100%;
|
|
40
|
+
/* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
|
|
41
|
+
min-height: 56px;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
align-items: center;
|
|
44
|
+
padding: 0 1rem;
|
|
45
|
+
padding: 12px;
|
|
46
|
+
border-radius: var(--memori-border-radius);
|
|
47
|
+
/* max-width: 48rem; */
|
|
48
|
+
margin: 0 auto;
|
|
49
|
+
background: #fff;
|
|
50
|
+
gap: 0;
|
|
51
|
+
grid-template-areas: 'leading primary trailing';
|
|
52
|
+
grid-template-columns: auto 1fr auto;
|
|
18
53
|
}
|
|
19
54
|
|
|
20
55
|
/* Responsive adjustments */
|
|
21
56
|
@media (max-width: 768px) {
|
|
22
|
-
.memori-chat-inputs {
|
|
57
|
+
.memori-chat-inputs--container {
|
|
58
|
+
padding: 0 0.5rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (max-width: 480px) {
|
|
63
|
+
.memori-chat-inputs--container {
|
|
23
64
|
padding: 0 0.25rem;
|
|
24
65
|
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.memori-chat-inputs--leading {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
padding-right: 6px;
|
|
72
|
+
grid-area: leading;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.memori-chat-inputs--primary {
|
|
76
|
+
display: flex;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
min-height: 36px;
|
|
79
|
+
align-items: center;
|
|
80
|
+
grid-area: primary;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.memori-chat-inputs--trailing {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
padding-left: 8px;
|
|
87
|
+
grid-area: trailing;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.memori-chat-inputs--trailing-inner {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 12px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Plus button styling */
|
|
97
|
+
.memori-chat-inputs--upload-wrapper {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.memori-chat-inputs--upload-wrapper .memori--unified-upload-wrapper {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.memori-chat-inputs--upload-wrapper .memori-button {
|
|
108
|
+
display: flex;
|
|
109
|
+
width: 20px;
|
|
110
|
+
min-width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
padding: 0;
|
|
115
|
+
border: none !important;
|
|
116
|
+
background: transparent !important;
|
|
117
|
+
box-shadow: none !important;
|
|
118
|
+
color: #000 !important;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
transition: opacity 0.2s ease;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.memori-chat-inputs--upload-wrapper .memori-button:hover {
|
|
124
|
+
background: transparent !important;
|
|
125
|
+
opacity: 0.7;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.memori-chat-inputs--upload-wrapper .memori-button:disabled {
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
opacity: 0.3;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Icon class styling */
|
|
134
|
+
.memori-chat-inputs--container .icon {
|
|
135
|
+
width: 20px;
|
|
136
|
+
height: 20px;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
fill: currentColor;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Microphone button styling */
|
|
142
|
+
.memori-chat-inputs--mic-btn {
|
|
143
|
+
display: flex;
|
|
144
|
+
width: 20px;
|
|
145
|
+
min-width: 20px;
|
|
146
|
+
height: 20px;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
padding: 0;
|
|
150
|
+
border: none;
|
|
151
|
+
background: transparent;
|
|
152
|
+
color: #000;
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
transition: opacity 0.2s ease;
|
|
155
|
+
}
|
|
25
156
|
|
|
26
|
-
|
|
27
|
-
|
|
157
|
+
.memori-chat-inputs--mic-btn:hover {
|
|
158
|
+
opacity: 0.7;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.memori-chat-inputs--mic-btn:disabled {
|
|
162
|
+
cursor: not-allowed;
|
|
163
|
+
opacity: 0.3;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.memori-chat-inputs--mic-btn svg,
|
|
167
|
+
.memori-chat-inputs--mic-btn .icon {
|
|
168
|
+
width: 20px;
|
|
169
|
+
height: 20px;
|
|
170
|
+
fill: #000;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Ensure icons are black on white background */
|
|
174
|
+
.memori-chat-inputs--leading .icon {
|
|
175
|
+
fill: #000;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.memori-chat-inputs--send-btn svg {
|
|
179
|
+
width: 20px;
|
|
180
|
+
height: 20px;
|
|
181
|
+
fill: #fff;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.memori-chat-inputs--send-btn .icon {
|
|
185
|
+
width: 20px;
|
|
186
|
+
height: 20px;
|
|
187
|
+
fill: #fff;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.memori-chat-inputs--upload-wrapper .memori-button svg,
|
|
191
|
+
.memori-chat-inputs--upload-wrapper .memori-button .icon {
|
|
192
|
+
width: 20px;
|
|
193
|
+
height: 20px;
|
|
194
|
+
/* fill: #000; */
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.memori-chat-inputs--trailing .memori-chat-inputs--mic-btn .icon {
|
|
198
|
+
fill: #000;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.memori-chat-inputs--mic-btn--listening {
|
|
202
|
+
color: #10a37f;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.memori-chat-inputs--mic {
|
|
206
|
+
font-size: 125%;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Style MicrophoneButton component when used in trailing area */
|
|
210
|
+
.memori-chat-inputs--trailing .memori-chat-inputs--mic {
|
|
211
|
+
width: 20px;
|
|
212
|
+
min-width: 20px;
|
|
213
|
+
height: 20px;
|
|
214
|
+
padding: 0;
|
|
215
|
+
border: none;
|
|
216
|
+
background: transparent;
|
|
217
|
+
color: #000;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.memori-chat-inputs--trailing .memori-chat-inputs--mic .memori-button {
|
|
221
|
+
width: 20px;
|
|
222
|
+
min-width: 20px;
|
|
223
|
+
height: 20px;
|
|
224
|
+
padding: 0;
|
|
225
|
+
border: none;
|
|
226
|
+
background: transparent;
|
|
227
|
+
color: #000;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Send button styling - ChatGPT style */
|
|
231
|
+
.memori-chat-inputs--send-btn {
|
|
232
|
+
display: flex;
|
|
233
|
+
width: 32px;
|
|
234
|
+
min-width: 32px;
|
|
235
|
+
height: 32px;
|
|
236
|
+
flex-shrink: 0;
|
|
237
|
+
align-items: center;
|
|
238
|
+
justify-content: center;
|
|
239
|
+
padding: 0;
|
|
240
|
+
padding: 1.2rem !important;
|
|
241
|
+
border: none;
|
|
242
|
+
border-radius: var(--memori-border-radius);
|
|
243
|
+
background: #000;
|
|
244
|
+
background: var(--memori-chat-user-bubble-bg);
|
|
245
|
+
color: #fff;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
transition: all 0.2s ease;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.memori-chat-inputs--send-btn:disabled {
|
|
251
|
+
/* background: #f4f4f4; */
|
|
252
|
+
color: #f4f4f4;
|
|
253
|
+
cursor: not-allowed;
|
|
254
|
+
opacity: 0.3;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.memori-chat-inputs--send-btn:hover:not(:disabled) {
|
|
258
|
+
opacity: 0.7;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.memori-chat-inputs--trailing .memori-chat-inputs--mic svg {
|
|
262
|
+
width: 20px;
|
|
263
|
+
height: 20px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.memori-chat-inputs--send-btn--active {
|
|
267
|
+
/* background: #000; */
|
|
268
|
+
color: #fff;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.memori-chat-inputs--send-btn--loading {
|
|
272
|
+
width: 16px;
|
|
273
|
+
height: 16px;
|
|
274
|
+
border: 2px solid currentColor;
|
|
275
|
+
border-radius: var(--memori-border-radius);
|
|
276
|
+
border-top-color: transparent;
|
|
277
|
+
animation: spin 0.8s linear infinite;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@keyframes spin {
|
|
281
|
+
to {
|
|
282
|
+
transform: rotate(360deg);
|
|
28
283
|
}
|
|
29
284
|
}
|
|
30
285
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
286
|
+
/* Disclaimer styling */
|
|
287
|
+
.memori-chat-inputs--disclaimer {
|
|
288
|
+
display: flex;
|
|
289
|
+
min-height: 32px;
|
|
290
|
+
align-items: center;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
padding: 8px 60px;
|
|
293
|
+
margin-top: -4px;
|
|
294
|
+
color: rgba(0, 0, 0, 0.6);
|
|
295
|
+
font-size: 12px;
|
|
296
|
+
line-height: 1.5;
|
|
297
|
+
text-align: center;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.memori-chat-inputs--disclaimer a {
|
|
301
|
+
color: rgba(0, 0, 0, 0.8);
|
|
302
|
+
cursor: pointer;
|
|
303
|
+
text-decoration: underline;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.memori-chat-inputs--disclaimer a:hover {
|
|
307
|
+
opacity: 0.8;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@media (max-width: 768px) {
|
|
311
|
+
.memori-chat-inputs--disclaimer {
|
|
312
|
+
padding: 8px 16px;
|
|
34
313
|
}
|
|
35
314
|
}
|
|
36
315
|
|
|
37
|
-
|
|
316
|
+
/* Legacy support for old button classes */
|
|
317
|
+
.memori-chat-inputs .memori-upload-menu + .memori-send-on-enter-menu {
|
|
38
318
|
margin-left: 0.33rem;
|
|
39
319
|
}
|
|
40
320
|
|
|
@@ -42,7 +322,3 @@
|
|
|
42
322
|
background: #fff;
|
|
43
323
|
color: #000;
|
|
44
324
|
}
|
|
45
|
-
|
|
46
|
-
.memori-chat-inputs--mic {
|
|
47
|
-
font-size: 125%;
|
|
48
|
-
}
|