@memori.ai/memori-react 8.34.0 → 8.35.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +7 -1
  3. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +4 -1
  4. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +3 -3
  5. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
  6. package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +139 -89
  7. package/dist/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -1
  8. package/dist/components/MemoriWidget/MemoriWidget.js +10 -8
  9. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  10. package/dist/components/MicrophoneButton/MicrophoneButton.css +1 -0
  11. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +377 -0
  12. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +57 -0
  13. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +159 -0
  14. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  15. package/dist/components/PositionPopover/PositionPopover.css +107 -112
  16. package/dist/components/PositionPopover/PositionPopover.js +23 -18
  17. package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
  18. package/dist/components/StartPanel/StartPanel.js +1 -0
  19. package/dist/components/StartPanel/StartPanel.js.map +1 -1
  20. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +2 -2
  21. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  22. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +23 -25
  23. package/dist/components/layouts/fullpage.css +21 -9
  24. package/dist/version.d.ts +1 -1
  25. package/dist/version.js +1 -1
  26. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +7 -1
  27. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +4 -1
  28. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +4 -4
  29. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
  30. package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js +139 -89
  31. package/esm/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.js.map +1 -1
  32. package/esm/components/MemoriWidget/MemoriWidget.js +10 -8
  33. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  34. package/esm/components/MicrophoneButton/MicrophoneButton.css +1 -0
  35. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +377 -0
  36. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +57 -0
  37. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +157 -0
  38. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  39. package/esm/components/PositionPopover/PositionPopover.css +107 -112
  40. package/esm/components/PositionPopover/PositionPopover.js +25 -20
  41. package/esm/components/PositionPopover/PositionPopover.js.map +1 -1
  42. package/esm/components/StartPanel/StartPanel.js +1 -0
  43. package/esm/components/StartPanel/StartPanel.js.map +1 -1
  44. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +2 -2
  45. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  46. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +23 -25
  47. package/esm/components/layouts/fullpage.css +21 -9
  48. package/esm/version.d.ts +1 -1
  49. package/esm/version.js +1 -1
  50. package/package.json +2 -2
  51. package/src/components/Chat/Chat.stories.tsx +127 -1
  52. package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +300 -162
  53. package/src/components/MemoriWidget/MemoriWidget.tsx +5 -3
  54. package/src/components/MicrophoneButton/MicrophoneButton.css +1 -0
  55. package/src/components/StartPanel/StartPanel.tsx +1 -0
  56. package/src/mocks/data.ts +143 -13
  57. package/src/version.ts +1 -1
@@ -2,6 +2,8 @@
2
2
 
3
3
  .memori-widget.memori-layout-fullpage {
4
4
  max-width: var(--memori-layout-max-width);
5
+ min-height: 100vh;
6
+ min-height: 100dvh;
5
7
  padding: var(--memori-spacing-md);
6
8
  margin-right: auto;
7
9
  margin-left: auto;
@@ -9,7 +11,9 @@
9
11
 
10
12
  .memori-widget.memori-layout-fullpage > .memori-spin {
11
13
  display: flex;
12
- height: 100%;
14
+ height: calc(100vh - 50px);
15
+ height: calc(100dvh - 50px);
16
+ min-height: 0;
13
17
  flex-direction: column;
14
18
  gap: var(--memori-spacing-lg);
15
19
  }
@@ -19,14 +23,13 @@
19
23
  min-width: 100%;
20
24
  flex-shrink: 0;
21
25
  border-radius: var(--memori-radius-box);
22
- margin-bottom: var(--memori-spacing-md);
26
+ margin-bottom: var(--memori-spacing-sm);
23
27
  }
24
28
 
25
29
  /* Grid: main + left column (avatar) */
26
30
  .memori-widget.memori-layout-fullpage .memori--grid {
27
31
  display: flex;
28
- height: auto;
29
- height: 95vh;
32
+ height: 100%;
30
33
  min-height: 0;
31
34
  flex: 1 1 auto;
32
35
  align-items: stretch;
@@ -44,18 +47,23 @@
44
47
  .memori-widget.memori-layout-fullpage .memori-chat-layout--main {
45
48
  display: flex;
46
49
  min-width: 0;
50
+ min-height: 0;
47
51
  flex: 1;
48
52
  flex-direction: column;
49
- align-items: center;
50
- justify-content: center;
53
+ align-items: stretch;
54
+ justify-content: stretch;
51
55
  }
52
56
 
53
57
  .memori-widget.memori-layout-fullpage .memori-chat-layout--controls {
54
58
  display: flex;
55
59
  width: 100%;
56
60
  max-width: 720px;
61
+ height: 100%;
62
+ min-height: 0;
63
+ max-height: 100%;
64
+ flex: 1 1 auto;
57
65
  flex-direction: column;
58
- align-items: center;
66
+ align-items: stretch;
59
67
  padding: var(--memori-spacing-md);
60
68
  }
61
69
 
@@ -63,6 +71,8 @@
63
71
  .memori-widget.memori-layout-fullpage .memori-chat-layout--controls .memori-chat--wrapper {
64
72
  width: 100%;
65
73
  max-width: 100%;
74
+ height: 100%;
75
+ min-height: 0;
66
76
  padding: 0 !important;
67
77
  margin-right: 0;
68
78
  margin-left: 0;
@@ -98,10 +108,12 @@
98
108
  .memori-widget.memori-layout-fullpage {
99
109
  padding: var(--memori-spacing-sm);
100
110
  }
101
-
111
+ /*
102
112
  .memori-widget.memori-layout-fullpage > .memori-spin {
113
+ height: calc(100vh - 100px);
114
+ height: calc(100dvh - 100px);
103
115
  gap: var(--memori-spacing-md);
104
- }
116
+ } */
105
117
 
106
118
  .memori-widget.memori-layout-fullpage .memori--grid-column-left {
107
119
  display: none;
package/esm/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "8.34.0";
1
+ export declare const version = "8.35.1";
package/esm/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '8.34.0';
1
+ export const version = '8.35.1';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.34.0",
2
+ "version": "8.35.1",
3
3
  "name": "@memori.ai/memori-react",
4
4
  "author": "Memori Srl",
5
5
  "main": "dist/index.js",
@@ -293,7 +293,7 @@
293
293
  },
294
294
  "dependencies": {
295
295
  "@headlessui/react": "1.7.4",
296
- "@memori.ai/memori-api-client": "6.20.0",
296
+ "@memori.ai/memori-api-client": "6.22.0",
297
297
  "@react-three/drei": "8.20.2",
298
298
  "@react-three/fiber": "7.0.25",
299
299
  "classnames": "2.5.1",
@@ -6,6 +6,7 @@ import {
6
6
  history,
7
7
  historyWithMedia,
8
8
  historyWithAIGeneratedMessages,
9
+ historyWithArtifact,
9
10
  sessionID,
10
11
  dialogState as dialogStateWithHints,
11
12
  historyWithExpandable,
@@ -84,6 +85,130 @@ MemoriTyping.args = {
84
85
  setSendOnEnter: () => {},
85
86
  };
86
87
 
88
+ export const WithArtifactBug = Template.bind({});
89
+ WithArtifactBug.args = {
90
+ memori,
91
+ tenant,
92
+ sessionID,
93
+ history: historyWithArtifact,
94
+ dialogState,
95
+ layout: 'DEFAULT',
96
+ };
97
+
98
+ export const ArtifactTagOnlyInRawText = Template.bind({});
99
+ ArtifactTagOnlyInRawText.args = {
100
+ memori,
101
+ tenant,
102
+ sessionID,
103
+ history: [
104
+ {
105
+ text: 'lo voglio in un artifact interattivo',
106
+ fromUser: true,
107
+ timestamp: '2026-04-27T14:22:12.068937Z',
108
+ media: [],
109
+ },
110
+ {
111
+ text: `<output class="memori-artifact" data-mimetype="html" data-title="Battaglia Navale">
112
+ <!DOCTYPE html>
113
+ <html lang="it">
114
+ <head>
115
+ <meta charset="UTF-8">
116
+ <title>Battaglia Navale</title>
117
+ </head>
118
+ <body>
119
+ <h1>Battaglia Navale</h1>
120
+ <p>Artifact should be detected from raw text.</p>
121
+ </body>
122
+ </html>
123
+ </output>`,
124
+ // Regression setup: translated text exists but does not contain the <output> tag.
125
+ translatedText:
126
+ 'Interfaccia pronta! Inserisci le coordinate delle navi e premi Inizia.',
127
+ fromUser: false,
128
+ timestamp: '2026-04-27T14:22:36.740195Z',
129
+ media: [],
130
+ },
131
+ ],
132
+ dialogState,
133
+ layout: 'DEFAULT',
134
+ simulateUserPrompt: () => {},
135
+ sendMessage: (msg: string) => console.log(msg),
136
+ stopListening: () => {},
137
+ resetTranscript: () => {},
138
+ setAttachmentsMenuOpen: () => {},
139
+ setSendOnEnter: () => {},
140
+ };
141
+
142
+ export const ArtifactWithoutClosingTag = Template.bind({});
143
+ ArtifactWithoutClosingTag.args = {
144
+ memori,
145
+ tenant,
146
+ sessionID,
147
+ history: [
148
+ {
149
+ text: 'Puoi prepararmi una proposta tecnica in artifact?',
150
+ fromUser: true,
151
+ timestamp: '2026-04-27T14:18:10.000000Z',
152
+ media: [],
153
+ },
154
+ {
155
+ text: `<output class="memori-artifact" data-mimetype="markdown">
156
+ # Proposta Tecnica
157
+
158
+ ## Sommario
159
+ - Piano A: On-premise + Cloud
160
+ - Piano B: Solo on-premise
161
+
162
+ ## Raccomandazione
163
+ Per workload critici, preferire on-premise.
164
+
165
+ Questa risposta riproduce il caso reale in cui manca il tag di chiusura`,
166
+ fromUser: false,
167
+ timestamp: '2026-04-27T14:18:16.846760Z',
168
+ media: [],
169
+ },
170
+ ],
171
+ dialogState,
172
+ layout: 'DEFAULT',
173
+ simulateUserPrompt: () => {},
174
+ sendMessage: (msg: string) => console.log(msg),
175
+ stopListening: () => {},
176
+ resetTranscript: () => {},
177
+ setAttachmentsMenuOpen: () => {},
178
+ setSendOnEnter: () => {},
179
+ };
180
+
181
+ export const ArtifactPlainTextMime = Template.bind({});
182
+ ArtifactPlainTextMime.args = {
183
+ memori,
184
+ tenant,
185
+ sessionID,
186
+ history: [
187
+ {
188
+ text: 'mostramelo come artifact semplice',
189
+ fromUser: true,
190
+ timestamp: '2026-04-27T14:30:00.000000Z',
191
+ media: [],
192
+ },
193
+ {
194
+ text: `<output class="memori-artifact" data-mimetype="text">
195
+ ciao
196
+ </output>`,
197
+ fromUser: false,
198
+ timestamp: '2026-04-27T14:30:05.000000Z',
199
+ media: [],
200
+ },
201
+ ],
202
+ dialogState,
203
+ layout: 'DEFAULT',
204
+ simulateUserPrompt: () => {},
205
+ sendMessage: (msg: string) => console.log(msg),
206
+ stopListening: () => {},
207
+ resetTranscript: () => {},
208
+ setAttachmentsMenuOpen: () => {},
209
+ setSendOnEnter: () => {},
210
+ };
211
+
87
212
  export const WithHints = Template.bind({});
88
213
  WithHints.args = {
89
214
  memori,
@@ -286,7 +411,8 @@ const historyAllMediaExamples = [
286
411
  },
287
412
  {
288
413
  mediumID: 'agent-doc-1',
289
- mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
414
+ mimeType:
415
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
290
416
  title: 'Excel',
291
417
  url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
292
418
  },