@memori.ai/memori-react 2.2.2 → 2.3.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 (51) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +6 -2
  3. package/dist/components/AvatarView/index.js +1 -1
  4. package/dist/components/AvatarView/index.js.map +1 -1
  5. package/dist/components/Header/Header.css +3 -3
  6. package/dist/components/MemoriWidget/MemoriWidget.d.ts +1 -1
  7. package/dist/components/MemoriWidget/MemoriWidget.js +6 -3
  8. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  9. package/dist/components/PoweredBy/PoweredBy.css +1 -1
  10. package/dist/components/SettingsDrawer/SettingsDrawer.d.ts +2 -1
  11. package/dist/components/SettingsDrawer/SettingsDrawer.js.map +1 -1
  12. package/dist/components/ShareButton/ShareButton.css +1 -0
  13. package/dist/components/layouts/Chat.d.ts +4 -0
  14. package/dist/components/layouts/Chat.js +8 -0
  15. package/dist/components/layouts/Chat.js.map +1 -0
  16. package/dist/components/layouts/Chat.test.d.ts +1 -0
  17. package/dist/components/layouts/Chat.test.js +25 -0
  18. package/dist/components/layouts/Chat.test.js.map +1 -0
  19. package/dist/components/layouts/chat.css +114 -0
  20. package/dist/styles.css +1 -0
  21. package/esm/components/AvatarView/index.js +1 -1
  22. package/esm/components/AvatarView/index.js.map +1 -1
  23. package/esm/components/Header/Header.css +3 -3
  24. package/esm/components/MemoriWidget/MemoriWidget.d.ts +1 -1
  25. package/esm/components/MemoriWidget/MemoriWidget.js +6 -3
  26. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  27. package/esm/components/PoweredBy/PoweredBy.css +1 -1
  28. package/esm/components/SettingsDrawer/SettingsDrawer.d.ts +2 -1
  29. package/esm/components/SettingsDrawer/SettingsDrawer.js.map +1 -1
  30. package/esm/components/ShareButton/ShareButton.css +1 -0
  31. package/esm/components/layouts/Chat.d.ts +4 -0
  32. package/esm/components/layouts/Chat.js +5 -0
  33. package/esm/components/layouts/Chat.js.map +1 -0
  34. package/esm/components/layouts/Chat.test.d.ts +1 -0
  35. package/esm/components/layouts/Chat.test.js +22 -0
  36. package/esm/components/layouts/Chat.test.js.map +1 -0
  37. package/esm/components/layouts/chat.css +114 -0
  38. package/esm/styles.css +1 -0
  39. package/package.json +1 -1
  40. package/src/components/AvatarView/index.tsx +2 -1
  41. package/src/components/Header/Header.css +3 -3
  42. package/src/components/MemoriWidget/MemoriWidget.tsx +4 -1
  43. package/src/components/PoweredBy/PoweredBy.css +1 -1
  44. package/src/components/SettingsDrawer/SettingsDrawer.tsx +2 -2
  45. package/src/components/ShareButton/ShareButton.css +1 -0
  46. package/src/components/layouts/Chat.test.tsx +31 -0
  47. package/src/components/layouts/Chat.tsx +35 -0
  48. package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +329 -0
  49. package/src/components/layouts/chat.css +114 -0
  50. package/src/components/layouts/layouts.stories.tsx +110 -0
  51. package/src/styles.css +1 -0
@@ -0,0 +1,114 @@
1
+ .memori-widget.memori-layout-chat {
2
+ height: 100vh !important;
3
+ }
4
+
5
+ .memori-widget.memori-layout-chat .memori--global-background.no-background-image {
6
+ background: none;
7
+ }
8
+
9
+ .memori-widget>.memori-spin.memori-chat-layout {
10
+ display: flex;
11
+ height: 100%;
12
+ flex-direction: column;
13
+ }
14
+
15
+ .memori-chat-layout--header {
16
+ text-align: right;
17
+ }
18
+
19
+ .memori-chat-layout .memori-header {
20
+ display: inline-block;
21
+ width: auto;
22
+ }
23
+
24
+ .memori-chat-layout .memori--avatar {
25
+ top: 0;
26
+ }
27
+
28
+ .memori-chat-layout .memori--title {
29
+ position: relative;
30
+ top: 10px;
31
+ }
32
+
33
+ .memori-chat-layout .memori-chat--cover {
34
+ display: none;
35
+ }
36
+
37
+ .memori-chat-layout .memori--cover {
38
+ top: 10px;
39
+ padding: 0;
40
+ background-image: none !important;
41
+ }
42
+
43
+ .memori-chat-layout .memori--powered-by {
44
+ top: 0;
45
+ bottom: auto;
46
+ }
47
+
48
+ .memori-chat-layout--controls {
49
+ position: relative;
50
+ z-index: 5;
51
+ max-height: calc(100% - 50px);
52
+ flex: 1;
53
+ }
54
+
55
+ .memori-chat-layout--controls .memori--start-panel,
56
+ .memori-chat-layout--controls .memori-chat--wrapper {
57
+ width: 80vw;
58
+ max-width: 800px;
59
+ margin: 0 auto;
60
+ }
61
+
62
+ .memori-chat-layout--controls .memori--start-panel {
63
+ margin-top: 3rem;
64
+ }
65
+
66
+ .memori-chat-layout--controls .memori-chat--wrapper {
67
+ height: calc(100% - 1rem);
68
+ }
69
+
70
+ .memori-chat-layout .memori-chat--content {
71
+ padding: 0;
72
+ }
73
+
74
+ @media (max-width: 870px) {
75
+
76
+ .memori-chat-layout--controls .memori--start-panel,
77
+ .memori-chat-layout--controls .memori-chat--wrapper {
78
+ width: 100%;
79
+ }
80
+
81
+ .memori-chat-layout--controls .memori-chat--wrapper {
82
+ padding: 0;
83
+ }
84
+ }
85
+
86
+ @media (max-width: 480px) {
87
+ .memori-send-on-enter-menu {
88
+ display: none;
89
+ }
90
+
91
+ .memori-header--button-settings {
92
+ display: none;
93
+ }
94
+ }
95
+
96
+ .memori-chat-layout .memori--avatar-toggle {
97
+ display: none;
98
+ width: 100%;
99
+ justify-content: center;
100
+ }
101
+
102
+ .memori-chat-layout .memori--title,
103
+ .memori-chat-layout .memori--description,
104
+ .memori-chat-layout .memori--needsPosition {
105
+ color: var(--memori-text-color);
106
+ }
107
+
108
+ .memori-chat-layout .memori--global-background-image {
109
+ background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(200, 200, 200, 0.8));
110
+ }
111
+
112
+ .memori-chat-layout .memori-chat-inputs--mic {
113
+ font-size: 125%;
114
+ }
@@ -74,6 +74,116 @@ FullPage.args = {
74
74
  layout: 'FULLPAGE',
75
75
  };
76
76
 
77
+ export const ChatOnly = Template.bind({});
78
+ ChatOnly.args = {
79
+ uiLang: 'it',
80
+ showShare: true,
81
+ showSettings: true,
82
+ // memori,
83
+ // tenant,
84
+ memori: {
85
+ memoriID: '6573844d-a7cd-47ef-9e78-840d82020c21',
86
+ name: 'Nicola',
87
+ password: null,
88
+ recoveryTokens: null,
89
+ newPassword: null,
90
+ ownerUserID: null,
91
+ ownerUserName: 'nzambello',
92
+ ownerTenantName: 'app.memorytwin.com',
93
+ memoriConfigurationID: 'fd10bb42-98d9-4c08-8e02-2b08bd4e4975',
94
+ description:
95
+ 'Sono Nicola Zambello, sviluppatore e attivista per un web etico e sostenibile',
96
+ completionDescription: null,
97
+ engineMemoriID: '9b0a2913-d3d8-4e98-a49d-6e1c99479e1b',
98
+ isOwner: false,
99
+ isGiver: false,
100
+ isReceiver: false,
101
+ giverTag: null,
102
+ giverPIN: null,
103
+ privacyType: 'PUBLIC',
104
+ secretToken: null,
105
+ minimumNumberOfRecoveryTokens: null,
106
+ totalNumberOfRecoveryTokens: null,
107
+ sentInvitations: [],
108
+ receivedInvitations: [],
109
+ integrations: [
110
+ {
111
+ integrationID: '62de8c99-0ac2-4cbe-bd95-a39ad7dc6b32',
112
+ memoriID: '6573844d-a7cd-47ef-9e78-840d82020c21',
113
+ type: 'LANDING_EXPERIENCE',
114
+ state: 'NEW',
115
+ deviceEmails: null,
116
+ invocationText: null,
117
+ jobID: null,
118
+ customData:
119
+ '{"textColor":"#000000","buttonBgColor":"#007eb6","buttonTextColor":"#ffffff","globalBackground":"https://assets.memori.ai/api/v2/asset/cade3b9c-0437-4342-b2bd-8db9c2a3a20e.png","blurBackground":true,"innerBgColor":"light","multilanguage":true,"avatar":"readyplayerme","avatarURL":"https://assets.memori.ai/api/v2/asset/893c41df-7619-436d-9e86-fe1d406fc933.glb#1681736752156","name":"Pagina pubblica","contextVars":"ANIMALE:CANE","personTag":"☠️","personPIN":"666666","personName":"Pirata","showShare":true,"avatarFullBodyURL":"https://models.readyplayer.me/63b55751f17e295642bf07a2.glb"}',
120
+ resources: [],
121
+ publish: true,
122
+ creationTimestamp: '2022-06-13T14:44:52.833573Z',
123
+ lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
124
+ },
125
+ ],
126
+ avatarURL:
127
+ 'https://assets.memori.ai/api/v2/asset/3049582f-db5f-452c-913d-e4340d4afd0a.png',
128
+ coverURL:
129
+ 'https://assets.memori.ai/api/v2/asset/e9bb9f6d-8f34-45ab-af9e-6d630d9a51a8.png',
130
+ avatar3DURL:
131
+ 'https://assets.memori.ai/api/v2/asset/893c41df-7619-436d-9e86-fe1d406fc933.glb',
132
+ avatarOriginal3DURL:
133
+ 'https://d1a370nemizbjq.cloudfront.net/c7c80a1d-deda-4fe1-96c6-fabad0771aa2.glb',
134
+ needsPosition: false,
135
+ voiceType: 'MALE',
136
+ culture: 'it-IT',
137
+ categories: [
138
+ 'biografico',
139
+ 'tecnologia',
140
+ 'web',
141
+ 'open-source',
142
+ 'green',
143
+ 'privacy',
144
+ ],
145
+ exposed: true,
146
+ disableR2R3Loop: null,
147
+ disableR4Loop: null,
148
+ disableR5Loop: null,
149
+ enableCompletions: true,
150
+ completionModel: null,
151
+ chainingMemoriID: null,
152
+ chainingBaseURL: null,
153
+ chainingPassword: null,
154
+ contentQualityIndex: 210.8,
155
+ contentQualityIndexTimestamp: '2023-04-17T00:01:32.194744Z',
156
+ publishedInTheMetaverse: true,
157
+ metaverseEnvironment: 'apartment',
158
+ blockedUntil: null,
159
+ creationTimestamp: '2022-06-13T14:21:55.793034Z',
160
+ lastChangeTimestamp: '2023-04-15T08:15:36.403546Z',
161
+ },
162
+ integration: {
163
+ integrationID: '62de8c99-0ac2-4cbe-bd95-a39ad7dc6b32',
164
+ memoriID: '6573844d-a7cd-47ef-9e78-840d82020c21',
165
+ type: 'LANDING_EXPERIENCE',
166
+ state: 'NEW',
167
+ deviceEmails: null,
168
+ invocationText: null,
169
+ jobID: null,
170
+ publish: true,
171
+ creationTimestamp: '2022-06-13T14:44:52.833573Z',
172
+ lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
173
+ customData: JSON.stringify({
174
+ ...JSON.parse(
175
+ '{"textColor":"#000000","buttonBgColor":"#007eb6","buttonTextColor":"#ffffff","globalBackground":"https://assets.memori.ai/api/v2/asset/cade3b9c-0437-4342-b2bd-8db9c2a3a20e.png","blurBackground":true,"innerBgColor":"light","multilanguage":true,"avatar":"readyplayerme","avatarURL":"https://assets.memori.ai/api/v2/asset/893c41df-7619-436d-9e86-fe1d406fc933.glb#1681736752156","name":"Pagina pubblica","contextVars":"ANIMALE:CANE","personTag":"☠️","personPIN":"666666","personName":"Pirata","showShare":true,"avatarFullBodyURL":"https://models.readyplayer.me/63b55751f17e295642bf07a2.glb"}'
176
+ ),
177
+ avatar: 'readyplayerme-full',
178
+ avatarURL:
179
+ 'https://models.readyplayer.me/63b55751f17e295642bf07a2.glb#' +
180
+ // 'https://models.readyplayer.me/63b558263858282637c54115.glb#' +
181
+ new Date(Date.now()).getTime(),
182
+ }),
183
+ },
184
+ layout: 'CHAT',
185
+ };
186
+
77
187
  export const Totem = Template.bind({});
78
188
  Totem.args = {
79
189
  uiLang: 'it',
package/src/styles.css CHANGED
@@ -41,6 +41,7 @@
41
41
  @import url('https://fonts.bunny.net/css?family=exo-2:200,400,700');
42
42
 
43
43
  @import url('./components/layouts/totem.css');
44
+ @import url('./components/layouts/chat.css');
44
45
 
45
46
  .sr-only {
46
47
  position: absolute;