@memori.ai/memori-react 8.45.5 → 8.45.6

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 (49) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/MemoriWidget/MemoriWidget.js +34 -3
  3. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  4. package/dist/helpers/speech/speechRequest.d.ts +15 -0
  5. package/dist/helpers/speech/speechRequest.js +76 -0
  6. package/dist/helpers/speech/speechRequest.js.map +1 -0
  7. package/dist/helpers/stt/useSTT.d.ts +4 -0
  8. package/dist/helpers/stt/useSTT.js +20 -13
  9. package/dist/helpers/stt/useSTT.js.map +1 -1
  10. package/dist/helpers/tts/useTTS.d.ts +5 -0
  11. package/dist/helpers/tts/useTTS.js +12 -4
  12. package/dist/helpers/tts/useTTS.js.map +1 -1
  13. package/dist/locales/de.json +4 -0
  14. package/dist/locales/en.json +4 -0
  15. package/dist/locales/es.json +4 -0
  16. package/dist/locales/fr.json +4 -0
  17. package/dist/locales/it.json +4 -0
  18. package/dist/version.d.ts +1 -1
  19. package/dist/version.js +1 -1
  20. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +78 -0
  21. package/esm/components/DrawerFooter/DrawerFooter.css +62 -0
  22. package/esm/components/IconButton/IconButton.css +135 -0
  23. package/esm/components/LoginModal/LoginModal.css +270 -0
  24. package/esm/components/MemoriWidget/MemoriWidget.js +34 -3
  25. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  26. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +540 -0
  27. package/esm/components/PositionPopover/PositionPopover.css +218 -0
  28. package/esm/components/ReasoningBlock/ReasoningBlock.css +156 -0
  29. package/esm/components/SideDrawer/SideDrawer.css +112 -0
  30. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +889 -0
  31. package/esm/components/layouts/fullpage.css +628 -0
  32. package/esm/helpers/speech/speechRequest.d.ts +15 -0
  33. package/esm/helpers/speech/speechRequest.js +68 -0
  34. package/esm/helpers/speech/speechRequest.js.map +1 -0
  35. package/esm/helpers/stt/useSTT.d.ts +4 -0
  36. package/esm/helpers/stt/useSTT.js +20 -13
  37. package/esm/helpers/stt/useSTT.js.map +1 -1
  38. package/esm/helpers/tts/useTTS.d.ts +5 -0
  39. package/esm/helpers/tts/useTTS.js +12 -4
  40. package/esm/helpers/tts/useTTS.js.map +1 -1
  41. package/esm/locales/de.json +4 -0
  42. package/esm/locales/en.json +4 -0
  43. package/esm/locales/es.json +4 -0
  44. package/esm/locales/fr.json +4 -0
  45. package/esm/locales/it.json +4 -0
  46. package/esm/styles/motion.css +25 -0
  47. package/esm/version.d.ts +1 -1
  48. package/esm/version.js +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1,628 @@
1
+ /* FullPage layout – spacing, typography and structure using global design tokens */
2
+
3
+ .memori-widget.memori-layout-fullpage {
4
+ /* max-width: var(--memori-layout-max-width); */
5
+ /* min-height: 100vh;
6
+ min-height: 100dvh; */
7
+ padding: var(--memori-spacing-md);
8
+ margin-right: auto;
9
+ margin-left: auto;
10
+ }
11
+
12
+ .memori-widget.memori-layout-fullpage > .memori-spin,
13
+ .memori-widget.memori-layout-fullpage > .memori-widget__surface > .memori-spin {
14
+ display: flex;
15
+ overflow: hidden;
16
+ height: 100%;
17
+ min-height: 0;
18
+ flex: 1 1 auto;
19
+ flex-direction: column;
20
+ gap: 0;
21
+ }
22
+ /* "Powered by" lives inside StartPanel on the start screen, then in the
23
+ conversation footer under the chat input once the session starts. */
24
+
25
+ /* Header spacing + fullpage chrome (brand + actions bar) */
26
+ .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
27
+ position: relative;
28
+ z-index: 6;
29
+ width: 100%;
30
+ flex-shrink: 0;
31
+ padding: 0;
32
+ padding-bottom: 0;
33
+ margin-bottom: var(--memori-spacing-sm);
34
+ }
35
+
36
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
37
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row {
38
+ position: sticky;
39
+ z-index: 6;
40
+ top: 0;
41
+ display: flex;
42
+ width: 100%;
43
+ min-height: 48px;
44
+ flex-wrap: nowrap;
45
+ align-items: center;
46
+ justify-content: flex-end;
47
+ padding: var(--memori-spacing-md);
48
+ border-bottom: 1px solid var(--memori-border-color);
49
+ background: transparent;
50
+ gap: var(--memori-spacing-md);
51
+ transition: background-color var(--memori-motion-duration-fast, 0.15s) var(--memori-motion-ease-out, ease);
52
+ }
53
+
54
+ /* FULLPAGE header shares the same content axis as .memori--grid, so brand,
55
+ actions and the divider stay aligned with the card edges at any width. */
56
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row {
57
+ max-width: var(--memori-layout-max-width);
58
+ padding-right: var(--memori-spacing-md);
59
+ padding-left: var(--memori-spacing-md);
60
+ margin-right: auto;
61
+ margin-left: auto;
62
+ }
63
+
64
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row.memori-header--scrolled,
65
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row.memori-header--scrolled,
66
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--header.memori-header--scrolled,
67
+ .memori-widget.memori-layout-chat .memori-chat-layout--header.memori-header--scrolled,
68
+ .memori-widget.memori-layout-fullpage .memori-fullpage-top-header.memori-header--scrolled {
69
+ background: var(--memori-secondary-background);
70
+ }
71
+
72
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--header {
73
+ min-width: 100%;
74
+ flex-shrink: 0;
75
+ -webkit-backdrop-filter: none;
76
+ backdrop-filter: none;
77
+ background: transparent;
78
+ }
79
+
80
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--history {
81
+ min-height: 0;
82
+ flex: 1 1 auto;
83
+ border: none;
84
+ border-radius: var(--memori-radius-surface);
85
+ margin-bottom: 0;
86
+ background-color: var(--memori-secondary-background);
87
+ }
88
+
89
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand,
90
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand {
91
+ display: inline-flex;
92
+ overflow: hidden;
93
+ min-width: 0;
94
+ flex: 1 1 auto;
95
+ flex-wrap: nowrap;
96
+ align-items: center;
97
+ margin-right: auto;
98
+ gap: var(--memori-spacing-sm);
99
+ white-space: nowrap;
100
+ }
101
+
102
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-text,
103
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-text {
104
+ display: flex;
105
+ overflow: hidden;
106
+ min-width: 0;
107
+ flex: 1 1 auto;
108
+ flex-direction: column;
109
+ gap: 0.125rem;
110
+ }
111
+
112
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon,
113
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-icon {
114
+ display: block;
115
+ width: 30px;
116
+ height: 30px;
117
+ flex-shrink: 0;
118
+ border-radius: 50%;
119
+ background: var(--memori-primary);
120
+ }
121
+
122
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-icon--avatar,
123
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-icon--avatar {
124
+ flex-shrink: 0;
125
+ border: 0;
126
+ background: none;
127
+ box-shadow: none;
128
+ object-fit: cover;
129
+ }
130
+
131
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-name,
132
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-name {
133
+ display: block;
134
+ overflow: hidden;
135
+ min-width: 0;
136
+ max-width: 100%;
137
+ color: var(--memori-text-color, #1f2937);
138
+ font-size: var(--memori-text-size-lg);
139
+ font-weight: 700;
140
+ letter-spacing: -0.02em;
141
+ line-height: 1.2;
142
+ text-overflow: ellipsis;
143
+ white-space: nowrap;
144
+ }
145
+
146
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-role,
147
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand-role {
148
+ display: block;
149
+ overflow: hidden;
150
+ min-width: 0;
151
+ max-width: 100%;
152
+ color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
153
+ cursor: pointer;
154
+ font-size: var(--memori-text-size-sm);
155
+ font-weight: var(--memori-text-weight-normal, 400);
156
+ line-height: 1.3;
157
+ text-overflow: ellipsis;
158
+ white-space: nowrap;
159
+ }
160
+
161
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-actions,
162
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
163
+ display: flex;
164
+ min-width: 0;
165
+ flex: 0 0 auto;
166
+ align-items: center;
167
+ justify-content: flex-end;
168
+ margin-left: auto;
169
+ }
170
+
171
+ /* FullPage / Chat / Zoomed header controls: compact square actions + rounded login CTA */
172
+ .memori-widget.memori-layout-fullpage .memori-header.memori-header--fullpage,
173
+ .memori-widget.memori-layout-chat .memori-header.memori-header--fullpage {
174
+ width: auto;
175
+ min-width: 0;
176
+ flex-wrap: nowrap;
177
+ justify-content: flex-end;
178
+ margin-left: auto;
179
+ gap: 0.5rem;
180
+ }
181
+
182
+ .memori-widget.memori-layout-fullpage .memori-header--fullpage-primary,
183
+ .memori-widget.memori-layout-fullpage .memori-header--fullpage-secondary,
184
+ .memori-widget.memori-layout-chat .memori-header--fullpage-primary,
185
+ .memori-widget.memori-layout-chat .memori-header--fullpage-secondary {
186
+ flex-wrap: nowrap;
187
+ gap: 0.5rem;
188
+ }
189
+
190
+ .memori-widget.memori-layout-fullpage .memori-header--fullpage-divider,
191
+ .memori-widget.memori-layout-chat .memori-header--fullpage-divider {
192
+ min-height: 26px;
193
+ margin: 0;
194
+ }
195
+
196
+ /* CHAT: title block a sinistra, controlli allineati a destra. */
197
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row {
198
+ justify-content: flex-end;
199
+ }
200
+
201
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand {
202
+ margin-right: auto;
203
+ }
204
+
205
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
206
+ flex: 0 0 auto;
207
+ }
208
+
209
+ /* Full-height flex row: [grid] [artifact column] — outside the grid so artifact
210
+ spans the entire content height without inheriting grid padding/max-width */
211
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row {
212
+ display: flex;
213
+ overflow: hidden;
214
+ min-height: 0;
215
+ flex: 1 1 0%;
216
+ flex-direction: row;
217
+ align-items: stretch;
218
+ }
219
+
220
+ /* Grid holds avatar + chat as two separate panels: no outer frame, vertical breathing room. */
221
+ .memori-widget.memori-layout-fullpage .memori--grid {
222
+ display: flex;
223
+ overflow: hidden;
224
+ width: 100%;
225
+ max-width: var(--memori-layout-max-width);
226
+ height: 100%;
227
+ min-height: 0;
228
+ flex: 1 1 0%;
229
+ align-items: stretch;
230
+ justify-content: center;
231
+ padding: var(--memori-spacing-md);
232
+ border: none;
233
+ margin: 0 auto;
234
+ background: var(--memori-secondary-background);
235
+ gap: var(--memori-spacing-md);
236
+ }
237
+
238
+ /* Avatar column: its own rounded panel, wider than the chat sidebar it replaced. */
239
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left {
240
+ position: relative;
241
+ display: flex;
242
+ overflow: hidden;
243
+ width: clamp(240px, 34%, 420px);
244
+ height: 100%;
245
+ min-height: 0;
246
+ flex-direction: column;
247
+ flex-shrink: 0;
248
+ align-items: stretch;
249
+ align-self: stretch;
250
+ border: none;
251
+ border-radius: var(--memori-radius-surface);
252
+ margin-right: 0;
253
+ background: color-mix(in srgb, var(--memori-text-color) 4%, var(--memori-secondary-background));
254
+ }
255
+
256
+ /* Agent status indicator above the avatar. */
257
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status {
258
+ display: flex;
259
+ flex-shrink: 0;
260
+ align-items: center;
261
+ justify-content: center;
262
+ padding: var(--memori-spacing-sm) var(--memori-spacing-md);
263
+ color: color-mix(in srgb, var(--memori-text-color) 72%, transparent);
264
+ font-size: var(--memori-text-size-sm);
265
+ gap: var(--memori-spacing-xs);
266
+ line-height: 1.2;
267
+ text-align: center;
268
+ }
269
+
270
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot {
271
+ display: inline-block;
272
+ width: 8px;
273
+ height: 8px;
274
+ flex-shrink: 0;
275
+ border-radius: 50%;
276
+ background: currentColor;
277
+ }
278
+
279
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-speaking {
280
+ background: var(--memori-primary);
281
+ }
282
+
283
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-processing {
284
+ background: color-mix(in srgb, var(--memori-text-color) 55%, transparent);
285
+ }
286
+
287
+ .memori-widget.memori-layout-fullpage .memori-fullpage-agent-status--dot-listening {
288
+ background: var(--memori-primary);
289
+ }
290
+
291
+ /* Cover banner is removed in FULLPAGE — it wastes the most valuable space. */
292
+ .memori-widget.memori-layout-fullpage .memori-chat--cover {
293
+ display: none;
294
+ }
295
+
296
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper {
297
+ position: relative;
298
+ display: flex;
299
+ width: 100%;
300
+ height: 100%;
301
+ min-height: 0;
302
+ flex: 1 1 0%;
303
+ align-items: stretch;
304
+ justify-content: center;
305
+ padding-top: 0;
306
+ }
307
+
308
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper model-viewer,
309
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper canvas,
310
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left .memori--avatar-wrapper > div {
311
+ width: 100% !important;
312
+ max-width: 100%;
313
+ height: 100% !important;
314
+ max-height: 100%;
315
+ }
316
+
317
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--main {
318
+ display: flex;
319
+ min-width: 0;
320
+ height: 100%;
321
+ min-height: 0;
322
+ flex: 1;
323
+ flex-direction: column;
324
+ align-items: stretch;
325
+ align-self: stretch;
326
+ justify-content: stretch;
327
+ }
328
+
329
+ /* Artifact column — flex sibling of .memori--grid inside .memori-fullpage-content-row.
330
+ Sits outside the padded grid so it spans the full content height with no padding gaps. */
331
+ .memori-widget.memori-layout-fullpage .memori--grid-column-artifact {
332
+ position: relative;
333
+ overflow: hidden;
334
+ width: 0;
335
+ min-width: 0;
336
+ flex-shrink: 0;
337
+ transition: width var(--memori-motion-duration-fast, 0.15s) var(--memori-motion-ease-out, ease);
338
+ }
339
+
340
+ .memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open {
341
+ width: var(--memori-artifact-column-width, 720px);
342
+ border-left: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 10%, transparent);
343
+ background: #fbfaf8;
344
+ }
345
+
346
+ [data-theme='dark'] .memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open,
347
+ .memori-widget.memori-layout-fullpage[data-theme='dark'] .memori--grid-column-artifact--open {
348
+ background: color-mix(in srgb, var(--memori-text-color) 6%, var(--memori-secondary-background));
349
+ }
350
+
351
+ /* Keep a readable chat column beside the avatar on desktop. On phones the
352
+ avatar column is hidden and 400px exceeds the viewport, which clips both
353
+ bubbles and the composer. */
354
+ .memori-widget.memori-layout-fullpage
355
+ .memori-fullpage-content-row:not(.memori-fullpage-content-row--artifact-overlay)
356
+ .memori-chat-layout--main {
357
+ min-width: min(400px, 100%);
358
+ }
359
+
360
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle {
361
+ position: absolute;
362
+ z-index: 4;
363
+ top: 0;
364
+ bottom: 0;
365
+ left: 0;
366
+ width: 10px;
367
+ margin-left: -5px;
368
+ background: transparent;
369
+ cursor: col-resize;
370
+ touch-action: none;
371
+ }
372
+
373
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle::after {
374
+ position: absolute;
375
+ top: 0;
376
+ bottom: 0;
377
+ left: 50%;
378
+ width: 2px;
379
+ background: transparent;
380
+ content: '';
381
+ transform: translateX(-50%);
382
+ transition: background-color var(--memori-motion-duration-fast, 0.15s) var(--memori-motion-ease-out, ease);
383
+ }
384
+
385
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle:hover::after,
386
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle:focus-visible::after,
387
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row--resizing .memori-artifact-resize-handle::after {
388
+ background: var(--memori-primary);
389
+ }
390
+
391
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle:focus-visible {
392
+ outline: none;
393
+ }
394
+
395
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row--resizing,
396
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row--resizing * {
397
+ cursor: col-resize !important;
398
+ user-select: none !important;
399
+ }
400
+
401
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row--resizing .memori--grid-column-artifact {
402
+ transition: none;
403
+ }
404
+
405
+ /* Hide avatar column when artifact drawer is open (split and overlay).
406
+ Overlay must still show chat on the left, like the CHAT layout. */
407
+ .memori-widget.memori-layout-fullpage
408
+ .memori-fullpage-content-row:has(.memori--grid-column-artifact--open)
409
+ .memori--grid-column-left,
410
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left[hidden] {
411
+ display: none;
412
+ }
413
+
414
+ @media (max-width: 1199px) {
415
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row {
416
+ position: relative;
417
+ }
418
+
419
+ .memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open,
420
+ .memori-widget.memori-layout-fullpage
421
+ .memori-fullpage-content-row--artifact-overlay
422
+ .memori--grid-column-artifact--open {
423
+ position: absolute;
424
+ z-index: 8;
425
+ top: 0;
426
+ right: 0;
427
+ bottom: 0;
428
+ width: min(var(--memori-artifact-column-width, 720px), 100%);
429
+ box-shadow: var(--memori-shadow-lg, 0 10px 28px rgba(0, 0, 0, 0.12));
430
+ }
431
+
432
+ .memori-widget.memori-layout-fullpage .memori-fullpage-content-row--artifact-overlay .memori-chat-layout--main {
433
+ min-width: 0;
434
+ }
435
+ }
436
+
437
+ @media (max-width: 768px) {
438
+ .memori-widget.memori-layout-fullpage .memori--grid-column-artifact--open {
439
+ width: 100%;
440
+ }
441
+
442
+ .memori-widget.memori-layout-fullpage .memori-artifact-resize-handle {
443
+ display: none;
444
+ }
445
+ }
446
+
447
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
448
+ display: flex;
449
+ width: 100%;
450
+ height: 100%;
451
+ min-height: 0;
452
+ max-height: 100%;
453
+ flex: 1 1 0%;
454
+ flex-direction: column;
455
+ align-items: stretch;
456
+ padding: 0;
457
+ background: var(--memori-secondary-background);
458
+ }
459
+
460
+ .memori-widget.memori-layout-fullpage .memori-conversation-column {
461
+ display: flex;
462
+ width: 100%;
463
+ max-width: none;
464
+ min-height: 0;
465
+ flex: 1 1 0%;
466
+ flex-direction: column;
467
+ padding-inline: 0;
468
+ }
469
+
470
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori--start-panel,
471
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--wrapper {
472
+ display: flex;
473
+ width: 100%;
474
+ max-width: 100%;
475
+ height: 100%;
476
+ min-height: 0;
477
+ flex: 1 1 0%;
478
+ flex-direction: column;
479
+ padding: 0 !important;
480
+ margin-right: 0;
481
+ margin-left: 0;
482
+ }
483
+
484
+ /* Typography: title and description in fullpage left column */
485
+ .memori-widget.memori-layout-fullpage .memori--title {
486
+ margin-bottom: var(--memori-spacing-xs);
487
+ color: var(--memori-text-color);
488
+ font-size: var(--memori-text-size-2xl);
489
+ font-weight: var(--memori-text-weight-bold);
490
+ line-height: var(--memori-text-line-tight);
491
+ }
492
+
493
+ .memori-widget.memori-layout-fullpage .memori--description,
494
+ .memori-widget.memori-layout-fullpage .memori--needsPosition {
495
+ padding: var(--memori-spacing-lg);
496
+ padding-top: var(--memori-spacing-xs);
497
+ color: var(--memori-text-color);
498
+ font-size: var(--memori-text-size-md);
499
+ line-height: var(--memori-text-line-relaxed);
500
+ }
501
+
502
+ /* Input bar styles live in ChatInputs.css (layout-scoped dark pill). */
503
+
504
+ /* Keep the input bar inside the chat panel, pinned to the bottom of the column */
505
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--wrapper {
506
+ display: flex;
507
+ min-height: 0;
508
+ flex: 1 1 0%;
509
+ flex-direction: column;
510
+ }
511
+
512
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat-inputs-wrapper {
513
+ width: 100%;
514
+ min-width: 0;
515
+ flex-shrink: 0;
516
+ padding: 16px 4px;
517
+ border: none;
518
+ border-radius: 0;
519
+ background: var(--memori-secondary-background);
520
+ }
521
+
522
+ @media (max-width: 870px) {
523
+ .memori-widget.memori-layout-fullpage {
524
+ padding: var(--memori-spacing-sm);
525
+ }
526
+
527
+ .memori-widget.memori-layout-fullpage
528
+ .memori-fullpage-content-row:not(.memori-fullpage-content-row--artifact-overlay)
529
+ .memori-chat-layout--main {
530
+ min-width: 0;
531
+ }
532
+
533
+ .memori-widget.memori-layout-fullpage .memori-chat--history.memori-chat--history-touch {
534
+ height: auto !important;
535
+ min-height: 0;
536
+ flex: 1 1 auto;
537
+ }
538
+
539
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat-inputs-wrapper {
540
+ padding: 12px;
541
+ }
542
+ /*
543
+ .memori-widget.memori-layout-fullpage > .memori-spin {
544
+ height: calc(100vh - 100px);
545
+ height: calc(100dvh - 100px);
546
+ gap: var(--memori-spacing-md);
547
+ } */
548
+
549
+ .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
550
+ padding: 0;
551
+ margin-bottom: var(--memori-spacing-md);
552
+ }
553
+
554
+ .memori-widget.memori-layout-fullpage .memori--grid-column-left {
555
+ display: none;
556
+ }
557
+
558
+ .memori-widget.memori-layout-fullpage .memori--grid {
559
+ padding: var(--memori-spacing-sm);
560
+ gap: var(--memori-spacing-sm);
561
+ }
562
+
563
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
564
+ padding: 0;
565
+ }
566
+ }
567
+
568
+ @media (max-width: 480px) {
569
+ .memori-widget.memori-layout-fullpage .memori-fullpage-top-header {
570
+ padding: 0;
571
+ }
572
+
573
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand-name {
574
+ font-size: 1.1rem;
575
+ }
576
+
577
+ .memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
578
+ padding: 0;
579
+ }
580
+
581
+ .memori-widget.memori-layout-fullpage .memori--grid {
582
+ padding: var(--memori-spacing-xs) var(--memori-spacing-sm);
583
+ }
584
+
585
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-row,
586
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row {
587
+ /* flex-wrap: wrap; */
588
+ align-items: flex-start;
589
+ }
590
+
591
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-brand,
592
+ .memori-widget.memori-layout-chat .memori-fullpage-header-brand {
593
+ min-width: 0;
594
+ max-width: calc(100% - 6.5rem);
595
+ flex: 1 1 auto;
596
+ }
597
+
598
+ .memori-widget.memori-layout-fullpage .memori-fullpage-header-actions {
599
+ flex: 0 0 auto;
600
+ justify-content: flex-end;
601
+ }
602
+
603
+ /* CHAT: keep agent title + toolbar on one row on small phones */
604
+ .memori-widget.memori-layout-chat .memori-fullpage-header-row {
605
+ flex-wrap: nowrap;
606
+ align-items: center;
607
+ }
608
+
609
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions {
610
+ overflow: visible;
611
+ min-width: 0;
612
+ flex: 0 0 auto;
613
+ flex-wrap: nowrap;
614
+ justify-content: flex-end;
615
+ }
616
+
617
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-header.memori-header--fullpage {
618
+ min-width: max-content;
619
+ flex-shrink: 0;
620
+ flex-wrap: nowrap;
621
+ }
622
+
623
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-icon-button,
624
+ .memori-widget.memori-layout-chat .memori-fullpage-header-actions .memori-button {
625
+ overflow: visible;
626
+ flex-shrink: 0;
627
+ }
628
+ }
@@ -0,0 +1,15 @@
1
+ export type SpeechErrorCode = 'missing_session' | 'invalid_session' | 'tenant_mismatch' | 'rate_limited';
2
+ export declare class SpeechRequestError extends Error {
3
+ readonly status: number;
4
+ readonly code?: string;
5
+ constructor(message: string, status: number, code?: string);
6
+ }
7
+ export declare function resolveSpeechSessionId(config: {
8
+ sessionId?: string;
9
+ sessionIdRef?: {
10
+ current: string | undefined;
11
+ };
12
+ }): string;
13
+ export declare function speechTenantForRequest(apiUrl: string, tenant?: string, locationHref?: string): string | undefined;
14
+ export declare function speechErrorFromResponse(response: Response): Promise<SpeechRequestError>;
15
+ export declare function speechErrorI18nKey(error: unknown): string | undefined;
@@ -0,0 +1,68 @@
1
+ export class SpeechRequestError extends Error {
2
+ constructor(message, status, code) {
3
+ super(message);
4
+ this.name = 'SpeechRequestError';
5
+ this.status = status;
6
+ this.code = code;
7
+ }
8
+ }
9
+ export function resolveSpeechSessionId(config) {
10
+ const raw = config.sessionIdRef
11
+ ? config.sessionIdRef.current
12
+ : config.sessionId;
13
+ const sessionId = raw === null || raw === void 0 ? void 0 : raw.trim();
14
+ if (!sessionId) {
15
+ throw new SpeechRequestError('Missing required parameter: sessionId', 401, 'missing_session');
16
+ }
17
+ return sessionId;
18
+ }
19
+ const normalizeTenant = (value) => {
20
+ if (!value)
21
+ return '';
22
+ return value
23
+ .trim()
24
+ .toLowerCase()
25
+ .replace(/^https?:\/\//, '')
26
+ .split('/')[0]
27
+ .split(':')[0];
28
+ };
29
+ const isLocalHostname = (hostname) => !hostname ||
30
+ hostname === 'localhost' ||
31
+ hostname === '127.0.0.1' ||
32
+ hostname.endsWith('.localhost');
33
+ export function speechTenantForRequest(apiUrl, tenant, locationHref) {
34
+ const claimed = normalizeTenant(tenant);
35
+ if (!claimed)
36
+ return undefined;
37
+ const base = locationHref !== null && locationHref !== void 0 ? locationHref : (typeof window !== 'undefined' ? window.location.href : 'http://localhost');
38
+ let hostname = '';
39
+ try {
40
+ hostname = new URL(apiUrl, base).hostname.toLowerCase();
41
+ }
42
+ catch (_a) {
43
+ return claimed;
44
+ }
45
+ if (isLocalHostname(hostname))
46
+ return claimed;
47
+ return claimed === hostname ? claimed : undefined;
48
+ }
49
+ export async function speechErrorFromResponse(response) {
50
+ const data = (await response.json().catch(() => ({})));
51
+ const message = typeof data.error === 'string' && data.error.length > 0
52
+ ? data.error
53
+ : `API error: ${response.status}`;
54
+ const code = typeof data.code === 'string' ? data.code : undefined;
55
+ return new SpeechRequestError(message, response.status, code);
56
+ }
57
+ const SPEECH_ERROR_I18N = {
58
+ missing_session: 'errors.speechMissingSession',
59
+ invalid_session: 'errors.speechInvalidSession',
60
+ tenant_mismatch: 'errors.speechTenantMismatch',
61
+ rate_limited: 'errors.speechRateLimited',
62
+ };
63
+ export function speechErrorI18nKey(error) {
64
+ if (!(error instanceof SpeechRequestError) || !error.code)
65
+ return undefined;
66
+ return SPEECH_ERROR_I18N[error.code];
67
+ }
68
+ //# sourceMappingURL=speechRequest.js.map