@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
|
@@ -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
|
-
}
|
|
@@ -4,7 +4,6 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ChatTextArea_1 = tslib_1.__importDefault(require("../ChatTextArea/ChatTextArea"));
|
|
7
|
-
const Button_1 = tslib_1.__importDefault(require("../ui/Button"));
|
|
8
7
|
const react_i18next_1 = require("react-i18next");
|
|
9
8
|
const Send_1 = tslib_1.__importDefault(require("../icons/Send"));
|
|
10
9
|
const MicrophoneButton_1 = tslib_1.__importDefault(require("../MicrophoneButton/MicrophoneButton"));
|
|
@@ -23,7 +22,10 @@ const ChatInputs = ({ dialogState, userMessage = '', sendOnEnter, onChangeUserMe
|
|
|
23
22
|
if (isTyping)
|
|
24
23
|
return;
|
|
25
24
|
const mediaWithIds = files.map((file, index) => {
|
|
26
|
-
const generatedMediumID = file.mediumID ||
|
|
25
|
+
const generatedMediumID = file.mediumID ||
|
|
26
|
+
`file_${Date.now()}_${index}_${Math.random()
|
|
27
|
+
.toString(36)
|
|
28
|
+
.substr(2, 9)}`;
|
|
27
29
|
return {
|
|
28
30
|
mediumID: generatedMediumID,
|
|
29
31
|
mimeType: file.mimeType,
|
|
@@ -46,7 +48,10 @@ const ChatInputs = ({ dialogState, userMessage = '', sendOnEnter, onChangeUserMe
|
|
|
46
48
|
if (sendOnEnter === 'keypress' && (userMessage === null || userMessage === void 0 ? void 0 : userMessage.length) > 0) {
|
|
47
49
|
stopListening();
|
|
48
50
|
const mediaWithIds = documentPreviewFiles.map((file, index) => {
|
|
49
|
-
const generatedMediumID = file.mediumID ||
|
|
51
|
+
const generatedMediumID = file.mediumID ||
|
|
52
|
+
`file_${Date.now()}_${index}_${Math.random()
|
|
53
|
+
.toString(36)
|
|
54
|
+
.substr(2, 9)}`;
|
|
50
55
|
return {
|
|
51
56
|
mediumID: generatedMediumID,
|
|
52
57
|
mimeType: file.mimeType,
|
|
@@ -74,28 +79,39 @@ const ChatInputs = ({ dialogState, userMessage = '', sendOnEnter, onChangeUserMe
|
|
|
74
79
|
onTextareaExpanded(expanded);
|
|
75
80
|
}
|
|
76
81
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
const isDisabled = (dialogState === null || dialogState === void 0 ? void 0 : dialogState.state) === 'X2a' || (dialogState === null || dialogState === void 0 ? void 0 : dialogState.state) === 'X3';
|
|
83
|
+
const textareaDisabled = ['R2', 'R3', 'R4', 'R5', 'G3', 'X3'].includes((dialogState === null || dialogState === void 0 ? void 0 : dialogState.state) || '');
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs-wrapper", children: (0, jsx_runtime_1.jsxs)("fieldset", { id: "chat-fieldset", className: (0, classnames_1.default)('memori-chat-inputs', {
|
|
85
|
+
'memori-chat-inputs--expanded': isExpanded,
|
|
86
|
+
}), disabled: isDisabled, children: [showUpload && ((0, jsx_runtime_1.jsx)(FilePreview_1.default, { previewFiles: documentPreviewFiles, removeFile: removeFile })), (0, jsx_runtime_1.jsxs)("div", { className: "memori-chat-inputs--container", children: [(0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs--leading", children: showUpload && ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs--upload-wrapper", children: (0, jsx_runtime_1.jsx)(UploadButton_1.default, { authToken: authToken, client: client, sessionID: sessionID, isMediaAccepted: (dialogState === null || dialogState === void 0 ? void 0 : dialogState.acceptsMedia) || false, setDocumentPreviewFiles: setDocumentPreviewFiles, documentPreviewFiles: documentPreviewFiles, memoriID: memoriID }) })) }), (0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs--primary", children: (0, jsx_runtime_1.jsx)(ChatTextArea_1.default, { value: userMessage, onChange: onChangeUserMessage, onPressEnter: onTextareaPressEnter, onFocus: onTextareaFocus, onBlur: onTextareaBlur, onExpandedChange: handleTextareaExpanded, disabled: textareaDisabled }) }), (0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs--trailing", children: (0, jsx_runtime_1.jsxs)("div", { className: "memori-chat-inputs--trailing-inner", children: [showMicrophone && microphoneMode === 'CONTINUOUS' && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: (0, classnames_1.default)('memori-chat-inputs--mic-btn', {
|
|
87
|
+
'memori-chat-inputs--mic-btn--listening': listening,
|
|
88
|
+
}), title: listening
|
|
89
|
+
? t('write_and_speak.micButtonPopoverListening') ||
|
|
90
|
+
'Listening'
|
|
91
|
+
: t('write_and_speak.micButtonPopover') ||
|
|
92
|
+
'Start listening', onClick: () => {
|
|
93
|
+
if (listening) {
|
|
94
|
+
stopListening();
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
stopAudio();
|
|
98
|
+
startListening();
|
|
99
|
+
}
|
|
100
|
+
}, disabled: isDisabled, "aria-label": listening
|
|
101
|
+
? t('write_and_speak.micButtonPopoverListening') ||
|
|
102
|
+
'Listening'
|
|
103
|
+
: t('write_and_speak.micButtonPopover') ||
|
|
104
|
+
'Start listening', children: (0, jsx_runtime_1.jsx)(Microphone_1.default, { className: "icon" }) })), showMicrophone && microphoneMode === 'HOLD_TO_TALK' && ((0, jsx_runtime_1.jsx)(MicrophoneButton_1.default, { listening: listening, startListening: startListening, stopListening: () => {
|
|
105
|
+
stopListening();
|
|
106
|
+
if (listening && !!(userMessage === null || userMessage === void 0 ? void 0 : userMessage.length)) {
|
|
107
|
+
sendMessage(userMessage);
|
|
108
|
+
}
|
|
109
|
+
}, stopAudio: stopAudio })), (0, jsx_runtime_1.jsx)("button", { type: "button", className: (0, classnames_1.default)('memori-chat-inputs--send-btn', {
|
|
110
|
+
'memori-chat-inputs--send-btn--active': !!(userMessage === null || userMessage === void 0 ? void 0 : userMessage.length),
|
|
111
|
+
'memori-chat-inputs--send-btn--disabled': !userMessage || userMessage.length === 0,
|
|
112
|
+
}), onClick: () => {
|
|
113
|
+
onSendMessage(documentPreviewFiles);
|
|
114
|
+
}, disabled: !userMessage || userMessage.length === 0 || isTyping, title: t('send') || 'Send', "aria-label": t('send') || 'Send', children: isTyping ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-inputs--send-btn--loading" })) : ((0, jsx_runtime_1.jsx)(Send_1.default, { className: "icon" })) })] }) })] })] }) }));
|
|
99
115
|
};
|
|
100
116
|
exports.default = ChatInputs;
|
|
101
117
|
//# sourceMappingURL=ChatInputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInputs.js","sourceRoot":"","sources":["../../../src/components/ChatInputs/ChatInputs.tsx"],"names":[],"mappings":";;;;AAAA,iCAAwC;AAExC,wFAAwD;
|
|
1
|
+
{"version":3,"file":"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AW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,EAC9D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,MAAM,gBACd,CAAC,CAAC,MAAM,CAAC,IAAI,MAAM,YAE9B,QAAQ,CAAC,CAAC,CAAC,CACV,gCAAK,SAAS,EAAC,uCAAuC,GAAG,CAC1D,CAAC,CAAC,CAAC,CACF,uBAAC,cAAI,IAAC,SAAS,EAAC,MAAM,GAAG,CAC1B,GACM,IACL,GACF,IACF,IACG,GAUP,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -1,78 +1,128 @@
|
|
|
1
1
|
.memori-chat-textarea {
|
|
2
2
|
position: relative;
|
|
3
|
-
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-height: 36px;
|
|
4
6
|
box-sizing: border-box;
|
|
5
|
-
flex: 1
|
|
6
|
-
|
|
7
|
+
flex: 1;
|
|
8
|
+
align-items: center;
|
|
7
9
|
transition: height 0.2s ease-in-out;
|
|
8
|
-
/* margin-left: 0.5rem; */
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.memori-chat-textarea--expanded {
|
|
12
|
-
height:
|
|
13
|
+
min-height: 36px;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/* Responsive adjustments for small screens */
|
|
16
17
|
@media (max-width: 768px) {
|
|
17
18
|
.memori-chat-textarea--expanded {
|
|
18
|
-
height:
|
|
19
|
+
min-height: 36px;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
@media (max-width: 480px) {
|
|
23
24
|
.memori-chat-textarea--expanded {
|
|
24
|
-
height:
|
|
25
|
+
min-height: 36px;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.memori-chat-textarea--inner {
|
|
29
|
-
position:
|
|
30
|
-
right: 0;
|
|
31
|
-
bottom: 0;
|
|
32
|
-
left: 0;
|
|
30
|
+
position: relative;
|
|
33
31
|
display: flex;
|
|
34
32
|
overflow: hidden;
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
width: 100%;
|
|
34
|
+
min-height: 36px;
|
|
35
|
+
max-height: 208px;
|
|
37
36
|
box-sizing: border-box;
|
|
38
|
-
border:
|
|
39
|
-
border-radius:
|
|
40
|
-
background:
|
|
41
|
-
transition:
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
background: transparent;
|
|
40
|
+
transition: height 0.2s ease-in-out;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
.memori-chat-textarea--expanded .memori-chat-textarea--inner {
|
|
45
|
-
max-height:
|
|
44
|
+
max-height: 208px;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
/* Responsive adjustments for textarea inner */
|
|
49
48
|
@media (max-width: 768px) {
|
|
49
|
+
.memori-chat-textarea--inner {
|
|
50
|
+
max-height: 200px;
|
|
51
|
+
}
|
|
52
|
+
|
|
50
53
|
.memori-chat-textarea--expanded .memori-chat-textarea--inner {
|
|
51
54
|
max-height: 200px;
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
@media (max-width: 480px) {
|
|
59
|
+
.memori-chat-textarea--inner {
|
|
60
|
+
max-height: 150px;
|
|
61
|
+
}
|
|
62
|
+
|
|
56
63
|
.memori-chat-textarea--expanded .memori-chat-textarea--inner {
|
|
57
64
|
max-height: 150px;
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
.memori-chat-textarea--disabled .memori-chat-textarea--inner {
|
|
62
|
-
|
|
63
|
-
opacity: 0.8;
|
|
69
|
+
opacity: 0.5;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
textarea.memori-chat-textarea--input {
|
|
67
73
|
width: 100%;
|
|
68
|
-
height:
|
|
74
|
+
min-height: 36px;
|
|
75
|
+
max-height: 208px;
|
|
69
76
|
box-sizing: border-box;
|
|
70
|
-
padding:
|
|
77
|
+
/* padding: 8px 0; */
|
|
71
78
|
border: none;
|
|
72
|
-
background:
|
|
79
|
+
background: transparent;
|
|
73
80
|
color: #000;
|
|
74
|
-
font-family: var(--memori-font-family);
|
|
81
|
+
font-family: var(--memori-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
line-height: 1.5;
|
|
84
|
+
overflow-y: auto;
|
|
75
85
|
resize: none;
|
|
86
|
+
scrollbar-width: thin;
|
|
87
|
+
transition: height 0.2s ease-in-out;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Placeholder styling */
|
|
91
|
+
textarea.memori-chat-textarea--input::placeholder {
|
|
92
|
+
color: rgba(0, 0, 0, 0.5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Scrollbar styling */
|
|
96
|
+
textarea.memori-chat-textarea--input::-webkit-scrollbar {
|
|
97
|
+
width: 6px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
textarea.memori-chat-textarea--input::-webkit-scrollbar-track {
|
|
101
|
+
background: transparent;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
textarea.memori-chat-textarea--input::-webkit-scrollbar-thumb {
|
|
105
|
+
border-radius: 3px;
|
|
106
|
+
background: rgba(0, 0, 0, 0.2);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
textarea.memori-chat-textarea--input::-webkit-scrollbar-thumb:hover {
|
|
110
|
+
background: rgba(0, 0, 0, 0.3);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Responsive adjustments for textarea input */
|
|
114
|
+
@media (max-width: 768px) {
|
|
115
|
+
textarea.memori-chat-textarea--input {
|
|
116
|
+
max-height: 200px;
|
|
117
|
+
font-size: 16px; /* Prevent zoom on iOS */
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (max-width: 480px) {
|
|
122
|
+
textarea.memori-chat-textarea--input {
|
|
123
|
+
max-height: 150px;
|
|
124
|
+
font-size: 16px; /* Prevent zoom on iOS */
|
|
125
|
+
}
|
|
76
126
|
}
|
|
77
127
|
|
|
78
128
|
textarea.memori-chat-textarea--input:focus {
|
|
@@ -81,6 +131,7 @@ textarea.memori-chat-textarea--input:focus {
|
|
|
81
131
|
|
|
82
132
|
.memori-chat-textarea--disabled textarea.memori-chat-textarea--input {
|
|
83
133
|
cursor: not-allowed;
|
|
134
|
+
opacity: 0.5;
|
|
84
135
|
}
|
|
85
136
|
|
|
86
137
|
.memori-chat-textarea--expand {
|
|
@@ -97,15 +148,12 @@ button.memori-chat-textarea--expand-button {
|
|
|
97
148
|
|
|
98
149
|
button.memori-chat-textarea--expand-button:hover,
|
|
99
150
|
button.memori-chat-textarea--expand-button:focus {
|
|
100
|
-
color: #000;
|
|
101
151
|
opacity: 1;
|
|
102
152
|
}
|
|
103
153
|
|
|
104
154
|
.memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea--inner:hover,
|
|
105
155
|
.memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea--inner:focus,
|
|
106
156
|
.memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea--inner:focus-within {
|
|
107
|
-
border-color: var(--memori-primary);
|
|
108
|
-
box-shadow: none;
|
|
109
157
|
outline: none;
|
|
110
158
|
}
|
|
111
159
|
|
|
@@ -117,7 +165,3 @@ button.memori-chat-textarea--expand-button:focus {
|
|
|
117
165
|
.memori-chat-textarea--expand-button {
|
|
118
166
|
opacity: 1;
|
|
119
167
|
}
|
|
120
|
-
|
|
121
|
-
.memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea-inner:focus-within {
|
|
122
|
-
box-shadow: 0 0.2rem 0.33rem #b5b6c4;
|
|
123
|
-
}
|