@memori.ai/memori-react 9.0.0-alpha.7 → 9.0.0-alpha.9
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 +37 -0
- package/dist/components/Chat/Chat.css +48 -7
- package/dist/components/Chat/Chat.d.ts +1 -0
- package/dist/components/Chat/Chat.js +7 -2
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +16 -14
- package/dist/components/ChatInputs/ChatInputs.css +233 -100
- package/dist/components/ChatTextArea/ChatTextArea.css +28 -6
- package/dist/components/KnownFacts/KnownFacts.js +2 -2
- package/dist/components/KnownFacts/KnownFacts.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.css +1 -3
- package/dist/components/MemoriWidget/MemoriWidget.js +18 -15
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +50 -18
- package/dist/components/PoweredBy/PoweredBy.css +10 -2
- package/dist/components/UploadButton/UploadImages/UploadImages.js +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/layouts/Chat.js +5 -5
- package/dist/components/layouts/Chat.js.map +1 -1
- package/dist/components/layouts/HiddenChat.js +10 -236
- package/dist/components/layouts/HiddenChat.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +23 -2
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/website-assistant.css +138 -55
- package/dist/components/layouts/ZoomedFullBody.js +2 -2
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/chat.css +42 -29
- package/dist/components/layouts/fullpage.css +29 -22
- package/dist/components/layouts/hidden-chat.css +147 -33
- package/dist/components/layouts/zoomed-full-body.css +33 -32
- package/dist/helpers/positionPopover.d.ts +1 -0
- package/dist/helpers/positionPopover.js +7 -0
- package/dist/helpers/positionPopover.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.css +48 -7
- package/esm/components/Chat/Chat.d.ts +1 -0
- package/esm/components/Chat/Chat.js +7 -2
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +16 -14
- package/esm/components/ChatInputs/ChatInputs.css +233 -100
- package/esm/components/ChatTextArea/ChatTextArea.css +28 -6
- package/esm/components/KnownFacts/KnownFacts.js +2 -2
- package/esm/components/KnownFacts/KnownFacts.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.css +1 -3
- package/esm/components/MemoriWidget/MemoriWidget.js +18 -15
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +50 -18
- package/esm/components/PoweredBy/PoweredBy.css +10 -2
- package/esm/components/UploadButton/UploadImages/UploadImages.js +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/layouts/Chat.js +5 -5
- package/esm/components/layouts/Chat.js.map +1 -1
- package/esm/components/layouts/HiddenChat.js +12 -238
- package/esm/components/layouts/HiddenChat.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +23 -2
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/website-assistant.css +138 -55
- package/esm/components/layouts/ZoomedFullBody.js +2 -2
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/chat.css +42 -29
- package/esm/components/layouts/fullpage.css +29 -22
- package/esm/components/layouts/hidden-chat.css +147 -33
- package/esm/components/layouts/zoomed-full-body.css +33 -32
- package/esm/helpers/positionPopover.d.ts +1 -0
- package/esm/helpers/positionPopover.js +4 -0
- package/esm/helpers/positionPopover.js.map +1 -0
- package/esm/styles.css +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.css +48 -7
- package/src/components/Chat/Chat.tsx +11 -0
- package/src/components/ChatBubble/ChatBubble.css +16 -14
- package/src/components/ChatInputs/ChatInputs.css +233 -100
- package/src/components/ChatTextArea/ChatTextArea.css +28 -6
- package/src/components/KnownFacts/KnownFacts.tsx +2 -0
- package/src/components/MemoriWidget/MemoriWidget.css +1 -3
- package/src/components/MemoriWidget/MemoriWidget.tsx +397 -384
- package/src/components/MicrophoneButton/MicrophoneButton.css +50 -18
- package/src/components/PoweredBy/PoweredBy.css +10 -2
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +1 -1
- package/src/components/layouts/Chat.tsx +42 -44
- package/src/components/layouts/HiddenChat.tsx +16 -413
- package/src/components/layouts/WebsiteAssistant/WebsiteAssistant.tsx +59 -15
- package/src/components/layouts/WebsiteAssistant/website-assistant.css +138 -55
- package/src/components/layouts/ZoomedFullBody.tsx +3 -1
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +227 -236
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +30 -40
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +165 -66
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +15 -20
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +153 -158
- package/src/components/layouts/chat.css +42 -29
- package/src/components/layouts/fullpage.css +29 -22
- package/src/components/layouts/hidden-chat.css +147 -33
- package/src/components/layouts/layouts.stories.tsx +1 -0
- package/src/components/layouts/zoomed-full-body.css +33 -32
- package/src/helpers/positionPopover.test.ts +33 -0
- package/src/helpers/positionPopover.ts +13 -0
- package/src/styles.css +34 -13
- package/src/version.ts +1 -1
|
@@ -11,16 +11,22 @@
|
|
|
11
11
|
|
|
12
12
|
.memori-chat-inputs--mic {
|
|
13
13
|
z-index: 1;
|
|
14
|
-
width:
|
|
15
|
-
min-width:
|
|
16
|
-
height:
|
|
14
|
+
width: 34px;
|
|
15
|
+
min-width: 34px;
|
|
16
|
+
height: 34px;
|
|
17
17
|
box-sizing: border-box;
|
|
18
|
+
flex-shrink: 0;
|
|
18
19
|
padding: 0;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
border: none;
|
|
21
|
+
border-radius: 10px;
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
background: transparent;
|
|
24
|
+
color: #888;
|
|
25
|
+
cursor: pointer;
|
|
21
26
|
-webkit-tap-highlight-color: transparent;
|
|
22
27
|
touch-action: manipulation;
|
|
23
28
|
-webkit-touch-callout: none;
|
|
29
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
24
30
|
-webkit-user-drag: none;
|
|
25
31
|
-khtml-user-drag: none;
|
|
26
32
|
-moz-user-drag: none;
|
|
@@ -30,21 +36,45 @@
|
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
.memori-chat-inputs--mic svg {
|
|
33
|
-
width:
|
|
34
|
-
height:
|
|
35
|
-
color:
|
|
39
|
+
width: 18px;
|
|
40
|
+
height: 18px;
|
|
41
|
+
color: inherit;
|
|
36
42
|
font-size: 1em;
|
|
37
43
|
-webkit-user-select: none;
|
|
38
44
|
user-select: none;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
.memori-chat-inputs--mic:hover {
|
|
42
|
-
background-color:
|
|
48
|
+
background-color: #f2eef5 !important;
|
|
49
|
+
color: #555 !important;
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
.memori-chat-inputs--mic:active,
|
|
46
53
|
.memori-chat-inputs--mic:focus {
|
|
47
|
-
box-shadow:
|
|
54
|
+
box-shadow: none !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.memori-chat-inputs--mic:not(.memori-chat-inputs--mic--listening):active,
|
|
58
|
+
.memori-chat-inputs--mic:not(.memori-chat-inputs--mic--listening):focus {
|
|
59
|
+
color: #555 !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Layout-scoped mic colors (FULL_PAGE / HIDDEN_CHAT / WEBSITE_ASSISTANT) */
|
|
63
|
+
.memori-widget.memori-layout-fullpage .memori-chat-inputs--mic,
|
|
64
|
+
.memori-widget.memori-layout-hidden_chat .memori-chat-inputs--mic,
|
|
65
|
+
.memori-widget.memori-layout-website_assistant .memori-chat-inputs--mic {
|
|
66
|
+
color: #9c98a4;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.memori-widget.memori-layout-fullpage .memori-chat-inputs--mic:hover {
|
|
70
|
+
background-color: #332f3a !important;
|
|
71
|
+
color: #d8d6de !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.memori-widget.memori-layout-hidden_chat .memori-chat-inputs--mic:hover,
|
|
75
|
+
.memori-widget.memori-layout-website_assistant .memori-chat-inputs--mic:hover {
|
|
76
|
+
background-color: transparent !important;
|
|
77
|
+
color: #d8d6de !important;
|
|
48
78
|
}
|
|
49
79
|
|
|
50
80
|
/* Enhanced touch feedback for mobile */
|
|
@@ -55,17 +85,10 @@
|
|
|
55
85
|
}
|
|
56
86
|
|
|
57
87
|
.memori-chat-inputs--mic:not(.memori-chat-inputs--mic--listening):active {
|
|
58
|
-
background-color:
|
|
88
|
+
background-color: #f2eef5;
|
|
59
89
|
}
|
|
60
90
|
}
|
|
61
91
|
|
|
62
|
-
/* Prevent double-tap zoom on mobile - already defined above */
|
|
63
|
-
|
|
64
|
-
.memori-chat-inputs--mic:not(.memori-chat-inputs--mic--listening):active,
|
|
65
|
-
.memori-chat-inputs--mic:not(.memori-chat-inputs--mic--listening):focus {
|
|
66
|
-
color: var(--memori-primary) !important;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
92
|
@keyframes micBtnActivePulse {
|
|
70
93
|
0% {
|
|
71
94
|
transform: scale(1.25);
|
|
@@ -160,3 +183,12 @@
|
|
|
160
183
|
[data-theme='dark'] .memori-chat-inputs--mic .lucide-mic {
|
|
161
184
|
color: #fff;
|
|
162
185
|
}
|
|
186
|
+
|
|
187
|
+
.memori-widget.memori-layout-fullpage[data-theme='dark'] .memori-chat-inputs--mic .lucide-mic,
|
|
188
|
+
[data-theme='dark'] .memori-widget.memori-layout-fullpage .memori-chat-inputs--mic .lucide-mic,
|
|
189
|
+
.memori-widget.memori-layout-hidden_chat[data-theme='dark'] .memori-chat-inputs--mic .lucide-mic,
|
|
190
|
+
[data-theme='dark'] .memori-widget.memori-layout-hidden_chat .memori-chat-inputs--mic .lucide-mic,
|
|
191
|
+
.memori-widget.memori-layout-website_assistant[data-theme='dark'] .memori-chat-inputs--mic .lucide-mic,
|
|
192
|
+
[data-theme='dark'] .memori-widget.memori-layout-website_assistant .memori-chat-inputs--mic .lucide-mic {
|
|
193
|
+
color: inherit;
|
|
194
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/* border: 1px solid var(--memori-border-color); */
|
|
11
11
|
border-radius: 9999px;
|
|
12
12
|
/* background-color: var(--memori-secondary-background); */
|
|
13
|
-
color: var(--memori-text-color);
|
|
13
|
+
color: color-mix(in srgb, var(--memori-text-color) 45%, transparent);
|
|
14
14
|
font-size: 0.75rem;
|
|
15
15
|
font-weight: 500;
|
|
16
16
|
gap: 0.5rem;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
width: 1.25rem;
|
|
23
23
|
height: 1.25rem;
|
|
24
24
|
flex-shrink: 0;
|
|
25
|
+
opacity: 0.55;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.memori--powered-by-label {
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.memori--powered-by-label a {
|
|
34
|
-
color:
|
|
35
|
+
color: inherit;
|
|
35
36
|
text-decoration: underline;
|
|
36
37
|
text-underline-offset: 2px;
|
|
37
38
|
}
|
|
@@ -46,4 +47,11 @@
|
|
|
46
47
|
.memori-widget .memori--powered-by {
|
|
47
48
|
display: none !important;
|
|
48
49
|
}
|
|
50
|
+
|
|
51
|
+
/* Keep the footer strip visible under the input on compact chat layouts */
|
|
52
|
+
.memori-widget.memori-layout-chat .memori--powered-by,
|
|
53
|
+
.memori-widget.memori-layout-website_assistant .memori--powered-by,
|
|
54
|
+
.memori-widget.memori-layout-hidden_chat .memori--powered-by {
|
|
55
|
+
display: flex !important;
|
|
56
|
+
}
|
|
49
57
|
}
|
|
@@ -499,7 +499,7 @@ const UploadImages: React.FC<UploadImagesProps> = ({
|
|
|
499
499
|
borderTop: '1px solid rgba(255, 255, 255, 0.2)',
|
|
500
500
|
}}
|
|
501
501
|
>
|
|
502
|
-
<Button onClick={handleCancelUpload} variant="outline">
|
|
502
|
+
<Button onClick={handleCancelUpload} variant="outline" danger>
|
|
503
503
|
{t('cancel') ?? 'Cancel'}
|
|
504
504
|
</Button>
|
|
505
505
|
<Button
|
|
@@ -226,8 +226,6 @@ const ChatLayout: React.FC<LayoutProps> = ({
|
|
|
226
226
|
{integrationBackground}
|
|
227
227
|
|
|
228
228
|
<Spin spinning={loading} className="memori-chat-layout">
|
|
229
|
-
{poweredBy}
|
|
230
|
-
|
|
231
229
|
<div id="extension" />
|
|
232
230
|
|
|
233
231
|
<div className="memori-chat-layout--main">
|
|
@@ -356,7 +354,7 @@ const ChatLayout: React.FC<LayoutProps> = ({
|
|
|
356
354
|
/>
|
|
357
355
|
)}
|
|
358
356
|
{sessionId && hasUserActivatedSpeak && Chat && chatProps ? (
|
|
359
|
-
<Chat {...chatProps} />
|
|
357
|
+
<Chat {...chatProps} showInputs={false} />
|
|
360
358
|
) : startPanelProps ? (
|
|
361
359
|
<div
|
|
362
360
|
className="memori-chat-layout--start-shell"
|
|
@@ -365,50 +363,50 @@ const ChatLayout: React.FC<LayoutProps> = ({
|
|
|
365
363
|
<div className="memori-chat-layout--start-panel-wrap">
|
|
366
364
|
<StartPanel {...startPanelProps} />
|
|
367
365
|
</div>
|
|
368
|
-
{Chat && chatProps && chatProps.showInputs !== false && (
|
|
369
|
-
<div className="memori-chat-layout--prechat-inputs">
|
|
370
|
-
<ChatInputs
|
|
371
|
-
userMessage={chatProps.userMessage}
|
|
372
|
-
onChangeUserMessage={chatProps.onChangeUserMessage}
|
|
373
|
-
dialogState={chatProps.dialogState}
|
|
374
|
-
instruct={chatProps.instruct}
|
|
375
|
-
authToken={chatProps.authToken}
|
|
376
|
-
sendMessage={chatProps.sendMessage}
|
|
377
|
-
isTyping={chatProps.memoriTyping}
|
|
378
|
-
microphoneMode={chatProps.microphoneMode}
|
|
379
|
-
sendOnEnter={chatProps.sendOnEnter}
|
|
380
|
-
setSendOnEnter={chatProps.setSendOnEnter}
|
|
381
|
-
client={chatProps.client}
|
|
382
|
-
sessionID={chatProps.sessionID}
|
|
383
|
-
showUpload={chatProps.showUpload}
|
|
384
|
-
attachmentsMenuOpen={chatProps.attachmentsMenuOpen}
|
|
385
|
-
setAttachmentsMenuOpen={
|
|
386
|
-
chatProps.setAttachmentsMenuOpen
|
|
387
|
-
}
|
|
388
|
-
onTextareaFocus={() => {
|
|
389
|
-
chatProps.stopListening?.();
|
|
390
|
-
}}
|
|
391
|
-
onTextareaBlur={() => {}}
|
|
392
|
-
onTextareaExpanded={() => {}}
|
|
393
|
-
startListening={chatProps.startListening}
|
|
394
|
-
stopListening={chatProps.stopListening}
|
|
395
|
-
stopAudio={chatProps.stopAudio}
|
|
396
|
-
listening={chatProps.listening}
|
|
397
|
-
isPlayingAudio={chatProps.isPlayingAudio}
|
|
398
|
-
showMicrophone={chatProps.showMicrophone}
|
|
399
|
-
memoriID={chatProps.memori?.memoriID}
|
|
400
|
-
maxTextareaCharacters={chatProps.maxTextareaCharacters}
|
|
401
|
-
maxDocumentsPerMessage={maxDocumentsPerMessage}
|
|
402
|
-
maxDocumentContentLength={maxDocumentContentLength}
|
|
403
|
-
pasteAsCardLineThreshold={pasteAsCardLineThreshold}
|
|
404
|
-
pasteAsCardCharThreshold={pasteAsCardCharThreshold}
|
|
405
|
-
showAiGeneratedNote={false}
|
|
406
|
-
/>
|
|
407
|
-
</div>
|
|
408
|
-
)}
|
|
409
366
|
</div>
|
|
410
367
|
) : null}
|
|
411
368
|
</div>
|
|
369
|
+
|
|
370
|
+
{/* Input bar sits outside body so it spans full width below the scroll area */}
|
|
371
|
+
{Chat && chatProps && chatProps.showInputs !== false && (
|
|
372
|
+
<ChatInputs
|
|
373
|
+
userMessage={chatProps.userMessage}
|
|
374
|
+
onChangeUserMessage={chatProps.onChangeUserMessage}
|
|
375
|
+
dialogState={chatProps.dialogState}
|
|
376
|
+
instruct={chatProps.instruct}
|
|
377
|
+
authToken={chatProps.authToken}
|
|
378
|
+
sendMessage={chatProps.sendMessage}
|
|
379
|
+
isTyping={chatProps.memoriTyping}
|
|
380
|
+
microphoneMode={chatProps.microphoneMode}
|
|
381
|
+
sendOnEnter={chatProps.sendOnEnter}
|
|
382
|
+
setSendOnEnter={chatProps.setSendOnEnter}
|
|
383
|
+
client={chatProps.client}
|
|
384
|
+
sessionID={chatProps.sessionID}
|
|
385
|
+
showUpload={chatProps.showUpload}
|
|
386
|
+
attachmentsMenuOpen={chatProps.attachmentsMenuOpen}
|
|
387
|
+
setAttachmentsMenuOpen={chatProps.setAttachmentsMenuOpen}
|
|
388
|
+
onTextareaFocus={() => {
|
|
389
|
+
chatProps.stopListening?.();
|
|
390
|
+
}}
|
|
391
|
+
onTextareaBlur={() => {}}
|
|
392
|
+
onTextareaExpanded={() => {}}
|
|
393
|
+
startListening={chatProps.startListening}
|
|
394
|
+
stopListening={chatProps.stopListening}
|
|
395
|
+
stopAudio={chatProps.stopAudio}
|
|
396
|
+
listening={chatProps.listening}
|
|
397
|
+
isPlayingAudio={chatProps.isPlayingAudio}
|
|
398
|
+
showMicrophone={chatProps.showMicrophone}
|
|
399
|
+
memoriID={chatProps.memori?.memoriID}
|
|
400
|
+
maxTextareaCharacters={chatProps.maxTextareaCharacters}
|
|
401
|
+
maxTotalMessagePayload={chatProps.maxTotalMessagePayload}
|
|
402
|
+
maxDocumentsPerMessage={maxDocumentsPerMessage}
|
|
403
|
+
maxDocumentContentLength={maxDocumentContentLength}
|
|
404
|
+
pasteAsCardLineThreshold={pasteAsCardLineThreshold}
|
|
405
|
+
pasteAsCardCharThreshold={pasteAsCardCharThreshold}
|
|
406
|
+
showAiGeneratedNote={isSessionStarted}
|
|
407
|
+
/>
|
|
408
|
+
)}
|
|
409
|
+
{poweredBy}
|
|
412
410
|
</div>
|
|
413
411
|
|
|
414
412
|
{/* Artifact column — width 0→480px with CSS transition */}
|