@memori.ai/memori-react 8.42.0 → 8.43.0

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 (105) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/Chat/Chat.js +1 -1
  3. package/dist/components/Chat/Chat.js.map +1 -1
  4. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +6 -1
  5. package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
  6. package/dist/components/ChatInputs/ChatInputs.js +2 -2
  7. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  8. package/dist/components/IconButton/IconButton.css +144 -0
  9. package/dist/components/IconButton/IconButton.d.ts +9 -0
  10. package/dist/components/IconButton/IconButton.js +36 -0
  11. package/dist/components/IconButton/IconButton.js.map +1 -0
  12. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +1 -1
  13. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  14. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +29 -7
  15. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +3 -0
  16. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +8 -6
  17. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
  18. package/dist/components/PositionPopover/PositionPopover.d.ts +2 -0
  19. package/dist/components/PositionPopover/PositionPopover.js +19 -11
  20. package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
  21. package/dist/components/UploadButton/UploadButton.d.ts +1 -0
  22. package/dist/components/UploadButton/UploadButton.js +12 -18
  23. package/dist/components/UploadButton/UploadButton.js.map +1 -1
  24. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
  25. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +7 -139
  26. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
  27. package/dist/components/icons/Print.js +1 -1
  28. package/dist/components/icons/Print.js.map +1 -1
  29. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +24 -3
  30. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  31. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +137 -55
  32. package/dist/components/layouts/fullpage.css +165 -68
  33. package/dist/helpers/constants.d.ts +1 -0
  34. package/dist/helpers/constants.js +24 -1
  35. package/dist/helpers/constants.js.map +1 -1
  36. package/dist/helpers/convertDocument.d.ts +1 -0
  37. package/dist/helpers/convertDocument.js +24 -0
  38. package/dist/helpers/convertDocument.js.map +1 -0
  39. package/dist/helpers/positionPopover.d.ts +1 -1
  40. package/dist/helpers/positionPopover.js +2 -2
  41. package/dist/helpers/positionPopover.js.map +1 -1
  42. package/dist/helpers/tts/muteSpeaker.d.ts +13 -0
  43. package/dist/helpers/tts/muteSpeaker.js +26 -0
  44. package/dist/helpers/tts/muteSpeaker.js.map +1 -0
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/esm/components/Chat/Chat.js +1 -1
  48. package/esm/components/Chat/Chat.js.map +1 -1
  49. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +6 -1
  50. package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
  51. package/esm/components/ChatInputs/ChatInputs.js +2 -2
  52. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  53. package/esm/components/IconButton/IconButton.css +144 -0
  54. package/esm/components/IconButton/IconButton.d.ts +9 -0
  55. package/esm/components/IconButton/IconButton.js +33 -0
  56. package/esm/components/IconButton/IconButton.js.map +1 -0
  57. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +2 -2
  58. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  59. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +29 -7
  60. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +3 -0
  61. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +8 -6
  62. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
  63. package/esm/components/PositionPopover/PositionPopover.d.ts +2 -0
  64. package/esm/components/PositionPopover/PositionPopover.js +20 -12
  65. package/esm/components/PositionPopover/PositionPopover.js.map +1 -1
  66. package/esm/components/UploadButton/UploadButton.d.ts +1 -0
  67. package/esm/components/UploadButton/UploadButton.js +13 -19
  68. package/esm/components/UploadButton/UploadButton.js.map +1 -1
  69. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
  70. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +8 -140
  71. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
  72. package/esm/components/icons/Print.js +1 -1
  73. package/esm/components/icons/Print.js.map +1 -1
  74. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +24 -3
  75. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  76. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +137 -55
  77. package/esm/components/layouts/fullpage.css +165 -68
  78. package/esm/helpers/constants.d.ts +1 -0
  79. package/esm/helpers/constants.js +23 -0
  80. package/esm/helpers/constants.js.map +1 -1
  81. package/esm/helpers/convertDocument.d.ts +1 -0
  82. package/esm/helpers/convertDocument.js +20 -0
  83. package/esm/helpers/convertDocument.js.map +1 -0
  84. package/esm/helpers/positionPopover.d.ts +1 -1
  85. package/esm/helpers/positionPopover.js +2 -2
  86. package/esm/helpers/positionPopover.js.map +1 -1
  87. package/esm/helpers/tts/muteSpeaker.d.ts +13 -0
  88. package/esm/helpers/tts/muteSpeaker.js +21 -0
  89. package/esm/helpers/tts/muteSpeaker.js.map +1 -0
  90. package/esm/version.d.ts +1 -1
  91. package/esm/version.js +1 -1
  92. package/package.json +2 -2
  93. package/src/components/Chat/Chat.tsx +1 -0
  94. package/src/components/ChatInputs/ChatInputs.tsx +3 -0
  95. package/src/components/FilePreview/FilePreview.stories.tsx +0 -3
  96. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +2 -2
  97. package/src/components/UploadButton/UploadButton.stories.tsx +2 -2
  98. package/src/components/UploadButton/UploadButton.tsx +19 -19
  99. package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +13 -187
  100. package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +2 -2
  101. package/src/components/icons/Print.tsx +6 -2
  102. package/src/helpers/constants.ts +24 -0
  103. package/src/helpers/convertDocument.test.ts +67 -0
  104. package/src/helpers/convertDocument.ts +35 -0
  105. package/src/version.ts +1 -1
@@ -19,12 +19,7 @@
19
19
  flex-direction: column;
20
20
  gap: 0;
21
21
  }
22
- /* "Powered by" is rendered inside .memori--grid-column-left and pinned to its bottom-left corner
23
- via the default absolute positioning defined in PoweredBy.css. */
24
- .memori-widget.memori-layout-fullpage .memori--grid-column-left > .memori--powered-by {
25
- bottom: 1rem;
26
- left: 1rem;
27
- }
22
+ /* "Powered by" lives in the conversation footer under the chat input. */
28
23
 
29
24
  /* Header spacing + fullpage chrome (brand + actions bar) */
30
25
  .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
@@ -32,45 +27,62 @@
32
27
  z-index: 6;
33
28
  width: 100%;
34
29
  flex-shrink: 0;
35
- padding: 0 var(--memori-spacing-md);
30
+ padding: 0;
36
31
  padding-bottom: 0;
37
32
  margin-bottom: var(--memori-spacing-sm);
38
33
  }
39
34
 
40
- .memori-widget.memori-layout-fullpage .memori-chat-layout--header {
41
- min-width: 100%;
42
- flex-shrink: 0;
43
- /* padding: 0.625rem 0.9rem; */
44
- border-bottom: 1px solid var(--memori-border-color);
45
- /* border-radius: 0.9rem; */
46
- -webkit-backdrop-filter: blur(12px);
47
- backdrop-filter: blur(12px);
48
- background: var(--memori-secondary-background);
49
- /* box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08); */
50
- }
51
-
52
- .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--history {
53
- min-height: 0;
54
- flex: 1 1 auto;
55
- border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 12%, transparent);
56
- border-bottom: none;
57
- margin-bottom: 0;
58
- background-color: var(--chat-bg, #f4f4f5);
59
- border-bottom-left-radius: 0;
60
- border-bottom-right-radius: 0;
61
- }
62
-
63
35
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
64
36
  .memori-widget.memori-layout-chat .memori-fullpage-header-row {
37
+ position: sticky;
38
+ z-index: 6;
39
+ top: 0;
65
40
  display: flex;
66
41
  width: 100%;
67
42
  min-height: 48px;
43
+ flex-wrap: nowrap;
68
44
  align-items: center;
69
- justify-content: space-between;
45
+ justify-content: flex-end;
70
46
  padding: var(--memori-spacing-md);
71
47
  border-bottom: 1px solid var(--memori-border-color);
72
- background: var(--memori-secondary-background);
48
+ background: transparent;
73
49
  gap: var(--memori-spacing-md);
50
+ transition: background-color var(--memori-motion-duration-fast, 0.15s) var(--memori-motion-ease, ease);
51
+ }
52
+
53
+ /* FULLPAGE header shares the same content axis as .memori--grid, so brand,
54
+ actions and the divider stay aligned with the card edges at any width. */
55
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row {
56
+ max-width: var(--memori-layout-max-width);
57
+ padding-right: var(--memori-spacing-md);
58
+ padding-left: var(--memori-spacing-md);
59
+ margin-right: auto;
60
+ margin-left: auto;
61
+ }
62
+
63
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row.memori-header--scrolled,
64
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row.memori-header--scrolled,
65
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--header.memori-header--scrolled,
66
+ .memori-widget.memori-layout-chat .memori-chat-layout--header.memori-header--scrolled,
67
+ .memori-widget.memori-layout-fullpage .memori-fullpage-top-header.memori-header--scrolled {
68
+ background: var(--memori-secondary-background);
69
+ }
70
+
71
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--header {
72
+ min-width: 100%;
73
+ flex-shrink: 0;
74
+ -webkit-backdrop-filter: none;
75
+ backdrop-filter: none;
76
+ background: transparent;
77
+ }
78
+
79
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--history {
80
+ min-height: 0;
81
+ flex: 1 1 auto;
82
+ border: none;
83
+ border-radius: var(--memori-radius-box);
84
+ margin-bottom: 0;
85
+ background-color: var(--memori-secondary-background);
74
86
  }
75
87
 
76
88
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand,
@@ -79,8 +91,21 @@
79
91
  overflow: hidden;
80
92
  min-width: 0;
81
93
  flex: 1 1 auto;
94
+ flex-wrap: nowrap;
82
95
  align-items: center;
96
+ margin-right: auto;
83
97
  gap: 0.625rem;
98
+ white-space: nowrap;
99
+ }
100
+
101
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-text,
102
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-text {
103
+ display: flex;
104
+ overflow: hidden;
105
+ min-width: 0;
106
+ flex: 1 1 auto;
107
+ flex-direction: column;
108
+ gap: 0.125rem;
84
109
  }
85
110
 
86
111
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon,
@@ -90,8 +115,7 @@
90
115
  height: 30px;
91
116
  flex-shrink: 0;
92
117
  border-radius: 50%;
93
- background: linear-gradient(145deg, #6d28d9 0%, #534ab7 52%, #4338ca 100%);
94
- box-shadow: 0 1px 4px rgba(109, 40, 217, 0.35);
118
+ background: var(--memori-primary);
95
119
  }
96
120
 
97
121
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon--avatar,
@@ -99,7 +123,7 @@
99
123
  flex-shrink: 0;
100
124
  border: 0;
101
125
  background: none;
102
- box-shadow: 0 1px 4px rgba(109, 40, 217, 0.2);
126
+ box-shadow: none;
103
127
  object-fit: cover;
104
128
  }
105
129
 
@@ -109,9 +133,8 @@
109
133
  overflow: hidden;
110
134
  min-width: 0;
111
135
  max-width: 100%;
112
- flex: 1 1 auto;
113
136
  color: var(--memori-text-color, #1f2937);
114
- font-size: 1.35rem;
137
+ font-size: 1.05rem;
115
138
  font-weight: 700;
116
139
  letter-spacing: -0.02em;
117
140
  line-height: 1.2;
@@ -119,6 +142,20 @@
119
142
  white-space: nowrap;
120
143
  }
121
144
 
145
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-role,
146
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-role {
147
+ display: block;
148
+ overflow: hidden;
149
+ min-width: 0;
150
+ max-width: 100%;
151
+ color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
152
+ font-size: var(--memori-text-size-sm, 0.8125rem);
153
+ font-weight: var(--memori-text-weight-normal, 400);
154
+ line-height: 1.3;
155
+ text-overflow: ellipsis;
156
+ white-space: nowrap;
157
+ }
158
+
122
159
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-actions,
123
160
  .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
124
161
  display: flex;
@@ -126,28 +163,35 @@
126
163
  flex: 0 0 auto;
127
164
  align-items: center;
128
165
  justify-content: flex-end;
166
+ margin-left: auto;
129
167
  }
130
168
 
131
- /* FullPage header controls: compact square actions + rounded login CTA */
132
- .memori-widget.memori-layout-fullpage .memori-header.memori-header--fullpage {
169
+ /* FullPage / Chat / Zoomed header controls: compact square actions + rounded login CTA */
170
+ .memori-widget.memori-layout-fullpage .memori-header.memori-header--fullpage,
171
+ .memori-widget.memori-layout-chat .memori-header.memori-header--fullpage {
172
+ width: auto;
133
173
  min-width: 0;
134
174
  flex-wrap: nowrap;
135
175
  justify-content: flex-end;
176
+ margin-left: auto;
136
177
  gap: 0.5rem;
137
178
  }
138
179
 
139
180
  .memori-widget.memori-layout-fullpage .memori-header--fullpage-primary,
140
- .memori-widget.memori-layout-fullpage .memori-header--fullpage-secondary {
181
+ .memori-widget.memori-layout-fullpage .memori-header--fullpage-secondary,
182
+ .memori-widget.memori-layout-chat .memori-header--fullpage-primary,
183
+ .memori-widget.memori-layout-chat .memori-header--fullpage-secondary {
141
184
  flex-wrap: nowrap;
142
185
  gap: 0.5rem;
143
186
  }
144
187
 
145
- .memori-widget.memori-layout-fullpage .memori-header--fullpage-divider {
188
+ .memori-widget.memori-layout-fullpage .memori-header--fullpage-divider,
189
+ .memori-widget.memori-layout-chat .memori-header--fullpage-divider {
146
190
  min-height: 26px;
147
191
  margin: 0;
148
192
  }
149
193
 
150
- /* CHAT: title block a sinistra, controlli allineati a destra */
194
+ /* CHAT: title block a sinistra, controlli allineati a destra. */
151
195
  .memori-widget.memori-layout-chat .memori-fullpage-header-row {
152
196
  justify-content: flex-end;
153
197
  }
@@ -171,9 +215,10 @@
171
215
  align-items: stretch;
172
216
  }
173
217
 
174
- /* Grid: main + left column (avatar) */
218
+ /* Grid holds avatar + chat as two separate panels: no outer frame, vertical breathing room. */
175
219
  .memori-widget.memori-layout-fullpage .memori--grid {
176
220
  display: flex;
221
+ overflow: hidden;
177
222
  width: 100%;
178
223
  max-width: var(--memori-layout-max-width);
179
224
  height: 100%;
@@ -181,29 +226,69 @@
181
226
  flex: 1 1 0%;
182
227
  align-items: stretch;
183
228
  justify-content: center;
184
- padding: 0 var(--memori-spacing-md) var(--memori-spacing-md);
185
- padding-top: var(--memori-spacing-md);
186
- padding-bottom: var(--memori-spacing-xl);
229
+ padding: var(--memori-spacing-md);
230
+ border: none;
187
231
  margin: 0 auto;
232
+ background: var(--memori-secondary-background);
188
233
  gap: var(--memori-spacing-md);
189
234
  }
190
235
 
236
+ /* Avatar column: its own rounded panel, wider than the chat sidebar it replaced. */
191
237
  .memori-widget.memori-layout-fullpage .memori--grid-column-left {
238
+ position: relative;
192
239
  display: flex;
193
240
  overflow: hidden;
194
- width: 50%;
195
- max-width: 420px;
241
+ width: clamp(240px, 34%, 420px);
196
242
  height: 100%;
197
243
  min-height: 0;
198
244
  flex-direction: column;
199
245
  flex-shrink: 0;
200
246
  align-items: stretch;
201
247
  align-self: stretch;
202
- border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 10%, transparent);
203
- border-radius: 0.9rem;
248
+ border: none;
249
+ border-radius: 12px;
204
250
  margin-right: 0;
205
- backdrop-filter: blur(10px);
206
- background: #ffffff;
251
+ background: color-mix(in srgb, var(--memori-text-color) 4%, var(--memori-secondary-background));
252
+ }
253
+
254
+ /* Agent status indicator above the avatar. */
255
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status {
256
+ display: flex;
257
+ flex-shrink: 0;
258
+ align-items: center;
259
+ justify-content: center;
260
+ padding: var(--memori-spacing-sm) var(--memori-spacing-md);
261
+ color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
262
+ font-size: var(--memori-text-size-sm, 0.8125rem);
263
+ gap: var(--memori-spacing-xs);
264
+ line-height: 1.2;
265
+ text-align: center;
266
+ }
267
+
268
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot {
269
+ display: inline-block;
270
+ width: 8px;
271
+ height: 8px;
272
+ flex-shrink: 0;
273
+ border-radius: 50%;
274
+ background: currentColor;
275
+ }
276
+
277
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-speaking {
278
+ background: var(--memori-primary);
279
+ }
280
+
281
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-processing {
282
+ background: color-mix(in srgb, var(--memori-text-color) 55%, transparent);
283
+ }
284
+
285
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-listening {
286
+ background: var(--memori-primary);
287
+ }
288
+
289
+ /* Cover banner is removed in FULLPAGE — it wastes the most valuable space. */
290
+ .memori-widget.memori-layout-fullpage .memori-chat--cover {
291
+ display: none;
207
292
  }
208
293
 
209
294
  .memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper {
@@ -250,7 +335,7 @@
250
335
  }
251
336
 
252
337
  .memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open {
253
- width: 600px;
338
+ width: 700px;
254
339
  border-left: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 10%, transparent);
255
340
  background: var(--memori-secondary-background);
256
341
  }
@@ -279,7 +364,17 @@
279
364
  flex-direction: column;
280
365
  align-items: stretch;
281
366
  padding: 0;
282
- background: var(--chat-bg, #f4f4f5);
367
+ background: var(--memori-secondary-background);
368
+ }
369
+
370
+ .memori-widget.memori-layout-fullpage .memori-conversation-column {
371
+ display: flex;
372
+ width: 100%;
373
+ max-width: none;
374
+ min-height: 0;
375
+ flex: 1 1 0%;
376
+ flex-direction: column;
377
+ padding-inline: 0;
283
378
  }
284
379
 
285
380
  .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori--start-panel,
@@ -328,10 +423,9 @@
328
423
  .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat-inputs-wrapper {
329
424
  width: 100%;
330
425
  flex-shrink: 0;
331
- border-top: none;
332
- background: var(--chat-bg, #f4f4f5);
333
- border-bottom-left-radius: 12px;
334
- border-bottom-right-radius: 12px;
426
+ border: none;
427
+ border-radius: 0;
428
+ background: var(--memori-secondary-background);
335
429
  }
336
430
 
337
431
  @media (max-width: 870px) {
@@ -346,8 +440,7 @@
346
440
  } */
347
441
 
348
442
  .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
349
- padding: 0 var(--memori-spacing-sm);
350
- padding-bottom: 0;
443
+ padding: 0;
351
444
  margin-bottom: var(--memori-spacing-md);
352
445
  }
353
446
 
@@ -356,7 +449,7 @@
356
449
  }
357
450
 
358
451
  .memori-widget.memori-layout-fullpage .memori--grid {
359
- padding: 0 var(--memori-spacing-sm) var(--memori-spacing-sm);
452
+ padding: var(--memori-spacing-sm);
360
453
  gap: var(--memori-spacing-sm);
361
454
  }
362
455
 
@@ -367,8 +460,7 @@
367
460
 
368
461
  @media (max-width: 480px) {
369
462
  .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
370
- padding: 0 var(--memori-spacing-xs);
371
- padding-bottom: 0;
463
+ padding: 0;
372
464
  }
373
465
 
374
466
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-name {
@@ -380,7 +472,7 @@
380
472
  }
381
473
 
382
474
  .memori-widget.memori-layout-fullpage .memori--grid {
383
- padding: 0 var(--memori-spacing-xs) var(--memori-spacing-xs);
475
+ padding: var(--memori-spacing-xs) var(--memori-spacing-sm);
384
476
  }
385
477
 
386
478
  .memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
@@ -396,8 +488,7 @@
396
488
  flex: 1 1 auto;
397
489
  }
398
490
 
399
- .memori-widget.memori-layout-fullpage .memori-fullpage-header-actions,
400
- .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
491
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-actions {
401
492
  flex: 0 0 auto;
402
493
  justify-content: flex-end;
403
494
  }
@@ -410,7 +501,7 @@
410
501
 
411
502
  .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
412
503
  min-width: 0;
413
- flex: 0 0 auto;
504
+ flex: 1 1 auto;
414
505
  flex-wrap: nowrap;
415
506
  justify-content: flex-end;
416
507
  -webkit-overflow-scrolling: touch;
@@ -419,7 +510,13 @@
419
510
  }
420
511
 
421
512
  .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-header.memori-header--fullpage {
422
- min-width: 0;
513
+ min-width: max-content;
514
+ flex-shrink: 0;
423
515
  flex-wrap: nowrap;
424
516
  }
517
+
518
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-icon-button,
519
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-button {
520
+ flex-shrink: 0;
521
+ }
425
522
  }
@@ -15,6 +15,7 @@ export declare const getGroupedChatLanguages: () => {
15
15
  };
16
16
  export declare const uiLanguages: string[];
17
17
  export declare const officeNativeExtensions: readonly [".doc", ".docx", ".dotx", ".xltx", ".potx"];
18
+ export declare const documentConversionExtensions: readonly [".pdf", ".docm", ".xlsx", ".xlsm", ".xls", ".ods", ".pptx", ".pptm", ".html", ".htm", ".xhtml", ".csv", ".tsv", ".txt", ".md", ".markdown", ".json", ".xml", ".log", ".yml", ".yaml"];
18
19
  export declare const allowedMediaTypes: string[];
19
20
  export declare const officeMimeShortLabels: Record<string, string>;
20
21
  export declare const officeExtensionShortLabels: Record<string, string>;
@@ -44,6 +44,29 @@ export const officeNativeExtensions = [
44
44
  '.xltx',
45
45
  '.potx',
46
46
  ];
47
+ export const documentConversionExtensions = [
48
+ '.pdf',
49
+ '.docm',
50
+ '.xlsx',
51
+ '.xlsm',
52
+ '.xls',
53
+ '.ods',
54
+ '.pptx',
55
+ '.pptm',
56
+ '.html',
57
+ '.htm',
58
+ '.xhtml',
59
+ '.csv',
60
+ '.tsv',
61
+ '.txt',
62
+ '.md',
63
+ '.markdown',
64
+ '.json',
65
+ '.xml',
66
+ '.log',
67
+ '.yml',
68
+ '.yaml',
69
+ ];
47
70
  export const allowedMediaTypes = [
48
71
  'image/jpeg',
49
72
  'image/png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IACnC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAC/C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE;IACpC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAA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E;QACF;YACE,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;SACf;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,oBAAoB;YAC1B,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,+BAA+B;YACrC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,uCAAuC;YAC7C,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,UAAU,EAAE,CAAC;SACd;KACF;IACD,EAAE,EAAE;QACF;YACE,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;SACf;QACD;YACE,IAAI,EAAE,0CAA0C;YAChD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;QACD;YACE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC;SACd;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const convertDocument: (file: File, sessionID: string, baseUrl?: string) => Promise<string>;
@@ -0,0 +1,20 @@
1
+ export const convertDocument = async (file, sessionID, baseUrl = '') => {
2
+ if (!sessionID) {
3
+ throw new Error('Session ID is required to convert documents');
4
+ }
5
+ const body = new FormData();
6
+ body.append('file', file);
7
+ const origin = baseUrl.replace(/\/+$/, '');
8
+ const response = await fetch(`${origin}/api/convert/${encodeURIComponent(sessionID)}`, {
9
+ method: 'POST',
10
+ body,
11
+ });
12
+ const payload = (await response
13
+ .json()
14
+ .catch(() => null));
15
+ if (!response.ok || !(payload === null || payload === void 0 ? void 0 : payload.text)) {
16
+ throw new Error((payload === null || payload === void 0 ? void 0 : payload.error) || 'Document conversion failed');
17
+ }
18
+ return payload.text;
19
+ };
20
+ //# sourceMappingURL=convertDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertDocument.js","sourceRoot":"","sources":["../../src/helpers/convertDocument.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,IAAU,EACV,SAAiB,EACjB,OAAO,GAAG,EAAE,EACK,EAAE;IACnB,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAChE;IAED,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,MAAM,gBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,EACxD;QACE,MAAM,EAAE,MAAM;QACd,IAAI;KACL,CACF,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,MAAM,QAAQ;SAC5B,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAmC,CAAC;IAExD,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,KAAI,4BAA4B,CAAC,CAAC;KACjE;IAED,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC,CAAC"}
@@ -1 +1 @@
1
- export declare function shouldRestartSessionOnPositionPopoverClose(wasOpen: boolean, nextOpen: boolean, autoStart: boolean): boolean;
1
+ export declare function shouldRestartSessionOnPositionPopoverClose(wasOpen: boolean, nextOpen: boolean, autoStart: boolean, sessionAlreadyStarted?: boolean): boolean;
@@ -1,4 +1,4 @@
1
- export function shouldRestartSessionOnPositionPopoverClose(wasOpen, nextOpen, autoStart) {
2
- return wasOpen && !nextOpen && !!autoStart;
1
+ export function shouldRestartSessionOnPositionPopoverClose(wasOpen, nextOpen, autoStart, sessionAlreadyStarted = false) {
2
+ return (wasOpen && !nextOpen && !!autoStart && !sessionAlreadyStarted);
3
3
  }
4
4
  //# sourceMappingURL=positionPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"positionPopover.js","sourceRoot":"","sources":["../../src/helpers/positionPopover.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,0CAA0C,CACxD,OAAgB,EAChB,QAAiB,EACjB,SAAkB;IAElB,OAAO,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"positionPopover.js","sourceRoot":"","sources":["../../src/helpers/positionPopover.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,0CAA0C,CACxD,OAAgB,EAChB,QAAiB,EACjB,SAAkB,EAClB,qBAAqB,GAAG,KAAK;IAE7B,OAAO,CACL,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,qBAAqB,CAC9D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type MuteSpeakerOptions = {
2
+ defaultEnableAudio: boolean;
3
+ defaultSpeakerActive: boolean;
4
+ autoStart: boolean;
5
+ speakerMuted: boolean;
6
+ storedMute?: boolean;
7
+ };
8
+ export declare function getMuteSpeakerFallback(defaultEnableAudio: boolean, defaultSpeakerActive: boolean, autoStart: boolean): boolean;
9
+ export declare function isSpeakerEffectivelyMuted({ defaultEnableAudio, defaultSpeakerActive, autoStart, speakerMuted, storedMute, }: MuteSpeakerOptions): boolean;
10
+ export declare function shouldPlayTtsAudio({ text, preview, ...muteOptions }: MuteSpeakerOptions & {
11
+ text?: string;
12
+ preview?: boolean;
13
+ }): boolean;
@@ -0,0 +1,21 @@
1
+ export function getMuteSpeakerFallback(defaultEnableAudio, defaultSpeakerActive, autoStart) {
2
+ return !defaultEnableAudio || !defaultSpeakerActive || autoStart;
3
+ }
4
+ export function isSpeakerEffectivelyMuted({ defaultEnableAudio, defaultSpeakerActive, autoStart, speakerMuted, storedMute, }) {
5
+ if (!defaultEnableAudio)
6
+ return true;
7
+ if (speakerMuted)
8
+ return true;
9
+ if (storedMute === true)
10
+ return true;
11
+ if (storedMute === false)
12
+ return false;
13
+ return getMuteSpeakerFallback(defaultEnableAudio, defaultSpeakerActive, autoStart);
14
+ }
15
+ export function shouldPlayTtsAudio({ text, preview = false, ...muteOptions }) {
16
+ return !!(text &&
17
+ text.trim() &&
18
+ !preview &&
19
+ !isSpeakerEffectivelyMuted(muteOptions));
20
+ }
21
+ //# sourceMappingURL=muteSpeaker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"muteSpeaker.js","sourceRoot":"","sources":["../../../src/helpers/tts/muteSpeaker.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,sBAAsB,CACpC,kBAA2B,EAC3B,oBAA6B,EAC7B,SAAkB;IAElB,OAAO,CAAC,kBAAkB,IAAI,CAAC,oBAAoB,IAAI,SAAS,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,EACxC,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,UAAU,GACS;IACnB,IAAI,CAAC,kBAAkB;QAAE,OAAO,IAAI,CAAC;IACrC,IAAI,YAAY;QAAE,OAAO,IAAI,CAAC;IAC9B,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACrC,IAAI,UAAU,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,sBAAsB,CAC3B,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,CACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,GAAG,WAAW,EAC4C;IAC1D,OAAO,CAAC,CAAC,CACP,IAAI;QACJ,IAAI,CAAC,IAAI,EAAE;QACX,CAAC,OAAO;QACR,CAAC,yBAAyB,CAAC,WAAW,CAAC,CACxC,CAAC;AACJ,CAAC"}
package/esm/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "8.42.0";
1
+ export declare const version = "8.43.0";
package/esm/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '8.42.0';
1
+ export const version = '8.43.0';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.42.0",
2
+ "version": "8.43.0",
3
3
  "name": "@memori.ai/memori-react",
4
4
  "author": "Memori Srl",
5
5
  "main": "dist/index.js",
@@ -299,7 +299,7 @@
299
299
  "@react-three/drei": "8.20.2",
300
300
  "@react-three/fiber": "7.0.25",
301
301
  "classnames": "2.5.1",
302
- "dompurify": "^3.4.12",
302
+ "dompurify": "^3.4.13",
303
303
  "ellipsed": "1.6.0",
304
304
  "i18next": "22.0.6",
305
305
  "katex": "^0.16.11",
@@ -619,6 +619,7 @@ const Chat: React.FC<Props> = ({
619
619
  setSendOnEnter={setSendOnEnter}
620
620
  client={client}
621
621
  sessionID={sessionID}
622
+ baseUrl={baseUrl}
622
623
  showUpload={showUpload}
623
624
  attachmentsMenuOpen={attachmentsMenuOpen}
624
625
  setAttachmentsMenuOpen={setAttachmentsMenuOpen}
@@ -35,6 +35,7 @@ export interface Props {
35
35
  isTyping?: boolean;
36
36
  sessionID?: string;
37
37
  memoriID?: string;
38
+ baseUrl?: string;
38
39
  client?: ReturnType<typeof memoriApiClient>;
39
40
  onTextareaExpanded?: (expanded: boolean) => void;
40
41
  /** Override total document payload limit (character count). */
@@ -70,6 +71,7 @@ const ChatInputs: React.FC<Props> = ({
70
71
  sessionID,
71
72
  authToken,
72
73
  memoriID,
74
+ baseUrl,
73
75
  client,
74
76
  onTextareaExpanded,
75
77
  maxTotalMessagePayload,
@@ -367,6 +369,7 @@ ${text}
367
369
  authToken={authToken}
368
370
  client={client}
369
371
  sessionID={sessionID}
372
+ baseUrl={baseUrl}
370
373
  isMediaAccepted={dialogState?.acceptsMedia || false}
371
374
  setDocumentPreviewFiles={setDocumentPreviewFiles}
372
375
  documentPreviewFiles={documentPreviewFiles}
@@ -23,7 +23,6 @@ const meta: Meta = {
23
23
 
24
24
  type Props = {
25
25
  onUpload: (text: string) => void;
26
- convertapiToken: string;
27
26
  };
28
27
 
29
28
  export default meta;
@@ -55,12 +54,10 @@ const Template: Story<Props> = args => {
55
54
  export const Default = Template.bind({});
56
55
  Default.args = {
57
56
  onUpload: () => {},
58
- convertapiToken: '',
59
57
  };
60
58
 
61
59
  export const Disabled = Template.bind({});
62
60
  Disabled.args = {
63
61
  onUpload: () => {},
64
- convertapiToken: '',
65
62
  disabled: true,
66
63
  };
@@ -13,7 +13,7 @@ import Code from '../../../icons/Code';
13
13
  import { PreviewIcon } from '../../../icons/Preview';
14
14
  import Snippet from '../../../Snippet/Snippet';
15
15
  import { Medium } from '@memori.ai/memori-api-client/dist/types';
16
- import { renderMsg } from '../../../../helpers/message';
16
+ import { renderMsg, sanitizeMsg } from '../../../../helpers/message';
17
17
 
18
18
  const ArtifactPreview: React.FC<{
19
19
  artifact: ArtifactData;
@@ -64,7 +64,7 @@ const ArtifactPreview: React.FC<{
64
64
  <div
65
65
  className="memori-artifact-preview-text"
66
66
  dangerouslySetInnerHTML={{
67
- __html: artifact.content,
67
+ __html: sanitizeMsg(artifact.content),
68
68
  }}
69
69
  />
70
70
  );