@memori.ai/memori-react 8.41.6 → 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 (240) hide show
  1. package/CHANGELOG.md +30 -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 +372 -0
  5. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +36 -0
  6. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +116 -0
  7. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
  8. package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
  9. package/dist/components/ChatInputs/ChatInputs.js +2 -2
  10. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  11. package/dist/components/DrawerFooter/DrawerFooter.css +62 -0
  12. package/dist/components/DrawerFooter/DrawerFooter.d.ts +12 -0
  13. package/dist/components/DrawerFooter/DrawerFooter.js +10 -0
  14. package/dist/components/DrawerFooter/DrawerFooter.js.map +1 -0
  15. package/dist/components/IconButton/IconButton.css +144 -0
  16. package/dist/components/IconButton/IconButton.d.ts +9 -0
  17. package/dist/components/IconButton/IconButton.js +36 -0
  18. package/dist/components/IconButton/IconButton.js.map +1 -0
  19. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +1 -1
  20. package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  21. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +459 -0
  22. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
  23. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +294 -0
  24. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  25. package/dist/components/PositionPopover/PositionPopover.css +219 -0
  26. package/dist/components/PositionPopover/PositionPopover.d.ts +22 -0
  27. package/dist/components/PositionPopover/PositionPopover.js +195 -0
  28. package/dist/components/PositionPopover/PositionPopover.js.map +1 -0
  29. package/dist/components/UploadButton/UploadButton.d.ts +1 -0
  30. package/dist/components/UploadButton/UploadButton.js +12 -18
  31. package/dist/components/UploadButton/UploadButton.js.map +1 -1
  32. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
  33. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +7 -139
  34. package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
  35. package/dist/components/icons/Print.js +1 -1
  36. package/dist/components/icons/Print.js.map +1 -1
  37. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
  38. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +64 -0
  39. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
  40. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +806 -0
  41. package/dist/components/layouts/fullpage.css +522 -0
  42. package/dist/context/widgetSurfaceContext.d.ts +3 -0
  43. package/dist/context/widgetSurfaceContext.js +11 -0
  44. package/dist/context/widgetSurfaceContext.js.map +1 -0
  45. package/dist/helpers/constants.d.ts +1 -0
  46. package/dist/helpers/constants.js +24 -1
  47. package/dist/helpers/constants.js.map +1 -1
  48. package/dist/helpers/convertDocument.d.ts +1 -0
  49. package/dist/helpers/convertDocument.js +24 -0
  50. package/dist/helpers/convertDocument.js.map +1 -0
  51. package/dist/helpers/media.js +18 -3
  52. package/dist/helpers/media.js.map +1 -1
  53. package/dist/helpers/positionPopover.d.ts +1 -0
  54. package/dist/helpers/positionPopover.js +7 -0
  55. package/dist/helpers/positionPopover.js.map +1 -0
  56. package/dist/helpers/tts/muteSpeaker.d.ts +13 -0
  57. package/dist/helpers/tts/muteSpeaker.js +26 -0
  58. package/dist/helpers/tts/muteSpeaker.js.map +1 -0
  59. package/dist/helpers/usePressTooltip.d.ts +13 -0
  60. package/dist/helpers/usePressTooltip.js +23 -0
  61. package/dist/helpers/usePressTooltip.js.map +1 -0
  62. package/dist/icons/FacebookIcon.d.ts +3 -0
  63. package/dist/icons/FacebookIcon.js +6 -0
  64. package/dist/icons/FacebookIcon.js.map +1 -0
  65. package/dist/icons/LinkedinIcon.d.ts +3 -0
  66. package/dist/icons/LinkedinIcon.js +6 -0
  67. package/dist/icons/LinkedinIcon.js.map +1 -0
  68. package/dist/icons/MemoriIcon.d.ts +3 -0
  69. package/dist/icons/MemoriIcon.js +8 -0
  70. package/dist/icons/MemoriIcon.js.map +1 -0
  71. package/dist/icons/TelegramIcon.d.ts +3 -0
  72. package/dist/icons/TelegramIcon.js +6 -0
  73. package/dist/icons/TelegramIcon.js.map +1 -0
  74. package/dist/icons/TwitterIcon.d.ts +3 -0
  75. package/dist/icons/TwitterIcon.js +6 -0
  76. package/dist/icons/TwitterIcon.js.map +1 -0
  77. package/dist/icons/WhatsappIcon.d.ts +3 -0
  78. package/dist/icons/WhatsappIcon.js +6 -0
  79. package/dist/icons/WhatsappIcon.js.map +1 -0
  80. package/dist/icons/artifacts/DocumentIcon.d.ts +3 -0
  81. package/dist/icons/artifacts/DocumentIcon.js +6 -0
  82. package/dist/icons/artifacts/DocumentIcon.js.map +1 -0
  83. package/dist/icons/artifacts/HtmlIcon.d.ts +3 -0
  84. package/dist/icons/artifacts/HtmlIcon.js +6 -0
  85. package/dist/icons/artifacts/HtmlIcon.js.map +1 -0
  86. package/dist/icons/artifacts/JavascriptIcon.d.ts +3 -0
  87. package/dist/icons/artifacts/JavascriptIcon.js +6 -0
  88. package/dist/icons/artifacts/JavascriptIcon.js.map +1 -0
  89. package/dist/icons/artifacts/MarkdownIcon.d.ts +3 -0
  90. package/dist/icons/artifacts/MarkdownIcon.js +6 -0
  91. package/dist/icons/artifacts/MarkdownIcon.js.map +1 -0
  92. package/dist/icons/artifacts/PythonIcon.d.ts +3 -0
  93. package/dist/icons/artifacts/PythonIcon.js +6 -0
  94. package/dist/icons/artifacts/PythonIcon.js.map +1 -0
  95. package/dist/icons/artifacts/SvgIcon.d.ts +3 -0
  96. package/dist/icons/artifacts/SvgIcon.js +6 -0
  97. package/dist/icons/artifacts/SvgIcon.js.map +1 -0
  98. package/dist/icons/artifacts/XmlIcon.d.ts +3 -0
  99. package/dist/icons/artifacts/XmlIcon.js +6 -0
  100. package/dist/icons/artifacts/XmlIcon.js.map +1 -0
  101. package/dist/icons/artifacts/cssIcon.d.ts +3 -0
  102. package/dist/icons/artifacts/cssIcon.js +6 -0
  103. package/dist/icons/artifacts/cssIcon.js.map +1 -0
  104. package/dist/testUtils.d.ts +5 -0
  105. package/dist/testUtils.js +18 -0
  106. package/dist/testUtils.js.map +1 -0
  107. package/dist/version.d.ts +1 -1
  108. package/dist/version.js +1 -1
  109. package/esm/components/Chat/Chat.js +1 -1
  110. package/esm/components/Chat/Chat.js.map +1 -1
  111. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +372 -0
  112. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +36 -0
  113. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +113 -0
  114. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
  115. package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
  116. package/esm/components/ChatInputs/ChatInputs.js +2 -2
  117. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  118. package/esm/components/DrawerFooter/DrawerFooter.css +62 -0
  119. package/esm/components/DrawerFooter/DrawerFooter.d.ts +12 -0
  120. package/esm/components/DrawerFooter/DrawerFooter.js +8 -0
  121. package/esm/components/DrawerFooter/DrawerFooter.js.map +1 -0
  122. package/esm/components/IconButton/IconButton.css +144 -0
  123. package/esm/components/IconButton/IconButton.d.ts +9 -0
  124. package/esm/components/IconButton/IconButton.js +33 -0
  125. package/esm/components/IconButton/IconButton.js.map +1 -0
  126. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +2 -2
  127. package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
  128. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +459 -0
  129. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
  130. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +291 -0
  131. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  132. package/esm/components/PositionPopover/PositionPopover.css +219 -0
  133. package/esm/components/PositionPopover/PositionPopover.d.ts +22 -0
  134. package/esm/components/PositionPopover/PositionPopover.js +190 -0
  135. package/esm/components/PositionPopover/PositionPopover.js.map +1 -0
  136. package/esm/components/UploadButton/UploadButton.d.ts +1 -0
  137. package/esm/components/UploadButton/UploadButton.js +13 -19
  138. package/esm/components/UploadButton/UploadButton.js.map +1 -1
  139. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +1 -6
  140. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +8 -140
  141. package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
  142. package/esm/components/icons/Print.js +1 -1
  143. package/esm/components/icons/Print.js.map +1 -1
  144. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
  145. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +61 -0
  146. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
  147. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +806 -0
  148. package/esm/components/layouts/fullpage.css +522 -0
  149. package/esm/context/widgetSurfaceContext.d.ts +3 -0
  150. package/esm/context/widgetSurfaceContext.js +7 -0
  151. package/esm/context/widgetSurfaceContext.js.map +1 -0
  152. package/esm/helpers/constants.d.ts +1 -0
  153. package/esm/helpers/constants.js +23 -0
  154. package/esm/helpers/constants.js.map +1 -1
  155. package/esm/helpers/convertDocument.d.ts +1 -0
  156. package/esm/helpers/convertDocument.js +20 -0
  157. package/esm/helpers/convertDocument.js.map +1 -0
  158. package/esm/helpers/media.js +18 -3
  159. package/esm/helpers/media.js.map +1 -1
  160. package/esm/helpers/positionPopover.d.ts +1 -0
  161. package/esm/helpers/positionPopover.js +4 -0
  162. package/esm/helpers/positionPopover.js.map +1 -0
  163. package/esm/helpers/tts/muteSpeaker.d.ts +13 -0
  164. package/esm/helpers/tts/muteSpeaker.js +21 -0
  165. package/esm/helpers/tts/muteSpeaker.js.map +1 -0
  166. package/esm/helpers/usePressTooltip.d.ts +13 -0
  167. package/esm/helpers/usePressTooltip.js +20 -0
  168. package/esm/helpers/usePressTooltip.js.map +1 -0
  169. package/esm/icons/FacebookIcon.d.ts +3 -0
  170. package/esm/icons/FacebookIcon.js +4 -0
  171. package/esm/icons/FacebookIcon.js.map +1 -0
  172. package/esm/icons/LinkedinIcon.d.ts +3 -0
  173. package/esm/icons/LinkedinIcon.js +4 -0
  174. package/esm/icons/LinkedinIcon.js.map +1 -0
  175. package/esm/icons/MemoriIcon.d.ts +3 -0
  176. package/esm/icons/MemoriIcon.js +6 -0
  177. package/esm/icons/MemoriIcon.js.map +1 -0
  178. package/esm/icons/TelegramIcon.d.ts +3 -0
  179. package/esm/icons/TelegramIcon.js +4 -0
  180. package/esm/icons/TelegramIcon.js.map +1 -0
  181. package/esm/icons/TwitterIcon.d.ts +3 -0
  182. package/esm/icons/TwitterIcon.js +4 -0
  183. package/esm/icons/TwitterIcon.js.map +1 -0
  184. package/esm/icons/WhatsappIcon.d.ts +3 -0
  185. package/esm/icons/WhatsappIcon.js +4 -0
  186. package/esm/icons/WhatsappIcon.js.map +1 -0
  187. package/esm/icons/artifacts/DocumentIcon.d.ts +3 -0
  188. package/esm/icons/artifacts/DocumentIcon.js +4 -0
  189. package/esm/icons/artifacts/DocumentIcon.js.map +1 -0
  190. package/esm/icons/artifacts/HtmlIcon.d.ts +3 -0
  191. package/esm/icons/artifacts/HtmlIcon.js +4 -0
  192. package/esm/icons/artifacts/HtmlIcon.js.map +1 -0
  193. package/esm/icons/artifacts/JavascriptIcon.d.ts +3 -0
  194. package/esm/icons/artifacts/JavascriptIcon.js +4 -0
  195. package/esm/icons/artifacts/JavascriptIcon.js.map +1 -0
  196. package/esm/icons/artifacts/MarkdownIcon.d.ts +3 -0
  197. package/esm/icons/artifacts/MarkdownIcon.js +4 -0
  198. package/esm/icons/artifacts/MarkdownIcon.js.map +1 -0
  199. package/esm/icons/artifacts/PythonIcon.d.ts +3 -0
  200. package/esm/icons/artifacts/PythonIcon.js +4 -0
  201. package/esm/icons/artifacts/PythonIcon.js.map +1 -0
  202. package/esm/icons/artifacts/SvgIcon.d.ts +3 -0
  203. package/esm/icons/artifacts/SvgIcon.js +4 -0
  204. package/esm/icons/artifacts/SvgIcon.js.map +1 -0
  205. package/esm/icons/artifacts/XmlIcon.d.ts +3 -0
  206. package/esm/icons/artifacts/XmlIcon.js +4 -0
  207. package/esm/icons/artifacts/XmlIcon.js.map +1 -0
  208. package/esm/icons/artifacts/cssIcon.d.ts +3 -0
  209. package/esm/icons/artifacts/cssIcon.js +4 -0
  210. package/esm/icons/artifacts/cssIcon.js.map +1 -0
  211. package/esm/testUtils.d.ts +5 -0
  212. package/esm/testUtils.js +15 -0
  213. package/esm/testUtils.js.map +1 -0
  214. package/esm/version.d.ts +1 -1
  215. package/esm/version.js +1 -1
  216. package/package.json +2 -2
  217. package/src/components/Chat/Chat.tsx +1 -0
  218. package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +10 -10
  219. package/src/components/ChatInputs/ChatInputs.tsx +3 -0
  220. package/src/components/FilePreview/FilePreview.stories.tsx +0 -3
  221. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +2 -2
  222. package/src/components/UploadButton/UploadButton.stories.tsx +2 -2
  223. package/src/components/UploadButton/UploadButton.tsx +19 -19
  224. package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +13 -187
  225. package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +2 -2
  226. package/src/components/icons/Print.tsx +6 -2
  227. package/src/helpers/constants.ts +24 -0
  228. package/src/helpers/convertDocument.test.ts +67 -0
  229. package/src/helpers/convertDocument.ts +35 -0
  230. package/src/helpers/media.test.ts +36 -0
  231. package/src/helpers/media.ts +39 -12
  232. package/src/version.ts +1 -1
  233. package/dist/components/MemoriArtifactSystem/utils/applyEdits.d.ts +0 -8
  234. package/dist/components/MemoriArtifactSystem/utils/applyEdits.js +0 -117
  235. package/dist/components/MemoriArtifactSystem/utils/applyEdits.js.map +0 -1
  236. package/dist/helpers/nats/natsBundled.js +0 -13224
  237. package/esm/components/MemoriArtifactSystem/utils/applyEdits.d.ts +0 -8
  238. package/esm/components/MemoriArtifactSystem/utils/applyEdits.js +0 -112
  239. package/esm/components/MemoriArtifactSystem/utils/applyEdits.js.map +0 -1
  240. package/esm/helpers/nats/natsBundled.js +0 -13225
@@ -0,0 +1,459 @@
1
+ .memori-mobile-session-panel--overlay {
2
+ position: fixed;
3
+ z-index: 2100;
4
+ top: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ left: 0;
8
+ display: flex;
9
+ align-items: flex-end;
10
+ background: rgba(0, 0, 0, 0.34);
11
+ }
12
+
13
+ .memori-mobile-session-panel--backdrop {
14
+ position: absolute;
15
+ z-index: 0;
16
+ padding: 0;
17
+ border: none;
18
+ margin: 0;
19
+ background: transparent;
20
+ cursor: default;
21
+ inset: 0;
22
+ }
23
+
24
+ .memori-mobile-session-panel--overlay-popover {
25
+ align-items: flex-start;
26
+ justify-content: flex-end;
27
+ background: transparent;
28
+ pointer-events: none;
29
+ }
30
+
31
+ .memori-mobile-session-panel {
32
+ position: relative;
33
+ z-index: 1;
34
+ overflow: auto;
35
+ width: 100%;
36
+ max-height: 90vh;
37
+ padding: 0.75rem 0 0;
38
+ border-radius: 20px 20px 0 0;
39
+ background: var(--memori-secondary-background, #f5f5f5);
40
+ transition: transform 0.2s ease-out;
41
+ }
42
+
43
+ .memori-mobile-session-panel:not(.memori-mobile-session-panel--popover) {
44
+ margin-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
45
+ }
46
+
47
+ .memori-mobile-session-panel--popover {
48
+ width: min(24rem, calc(100vw - 1rem));
49
+ max-height: min(75vh, 34rem);
50
+ border: 1px solid var(--memori-border-color, rgba(0, 0, 0, 0.08));
51
+ border-radius: 14px;
52
+ margin: 0.5rem;
53
+ margin-top: 4.5rem;
54
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
55
+ overflow-x: hidden;
56
+ overflow-y: auto;
57
+ pointer-events: auto;
58
+ }
59
+
60
+ .memori-mobile-session-panel--handle {
61
+ width: 44px;
62
+ height: 4px;
63
+ border-radius: 999px;
64
+ margin: 0 auto 0.875rem;
65
+ background: var(--memori-border-color);
66
+ }
67
+
68
+ .memori-mobile-session-panel--user {
69
+ display: flex;
70
+ align-items: center;
71
+ padding: 0 1rem 0.9rem;
72
+ border-bottom: 1px solid var(--memori-border-color);
73
+ gap: 0.75rem;
74
+ }
75
+
76
+ .memori-mobile-session-panel--login {
77
+ display: inline-flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ padding: 0.45rem 0.8rem;
81
+ border: 1px solid rgba(0, 0, 0, 0.15);
82
+ border-radius: 999px;
83
+ margin-left: auto;
84
+ background: var(--memori-main-background);
85
+ color: var(--memori-text-color, #111);
86
+ cursor: pointer;
87
+ font-size: 0.82rem;
88
+ font-weight: 600;
89
+ }
90
+
91
+ .memori-mobile-session-panel--login-cta-wrap {
92
+ position: sticky;
93
+ bottom: 0;
94
+ /* padding: 0.75rem 1rem calc(0.95rem + env(safe-area-inset-bottom, 0px)); */
95
+ border-top: 1px solid var(--memori-border-color, rgba(0, 0, 0, 0.08));
96
+ margin-top: 0.5rem;
97
+ background: var(--memori-secondary-background, #f5f5f5);
98
+ }
99
+
100
+ .memori-mobile-session-panel--login-cta {
101
+ width: 100%;
102
+ min-height: 2.8rem;
103
+ justify-content: flex-start !important;
104
+ padding: 0.72rem 1rem !important;
105
+ border: 0 !important;
106
+ border-radius: 0 !important;
107
+ gap: 0.5rem;
108
+ }
109
+
110
+ .memori-mobile-session-panel--login-cta > span {
111
+ gap: 0.5rem;
112
+ }
113
+
114
+ .memori-mobile-session-panel--avatar {
115
+ display: inline-flex;
116
+ width: 42px;
117
+ height: 42px;
118
+ align-items: center;
119
+ justify-content: center;
120
+ border-radius: 999px;
121
+ background: linear-gradient(140deg, #6f63d9, #4f5dcf);
122
+ color: #fff;
123
+ font-size: 1rem;
124
+ font-weight: 600;
125
+ }
126
+
127
+ .memori-mobile-session-panel--user-meta {
128
+ min-width: 0;
129
+ }
130
+
131
+ .memori-mobile-session-panel--user-name {
132
+ margin: 0;
133
+ color: var(--memori-text-color, #111);
134
+ font-size: 1rem;
135
+ font-weight: 600;
136
+ }
137
+
138
+ .memori-mobile-session-panel--user-email {
139
+ overflow: hidden;
140
+ margin: 0.1rem 0 0;
141
+ color: var(--memori-text-color);
142
+ font-size: 0.9rem;
143
+ text-overflow: ellipsis;
144
+ white-space: nowrap;
145
+ }
146
+
147
+ .memori-mobile-session-panel--session-info {
148
+ padding-bottom: 0.15rem;
149
+ border-bottom: 1px solid var(--memori-border-color, rgba(0, 0, 0, 0.08));
150
+ margin-bottom: 0.15rem;
151
+ }
152
+
153
+ .memori-mobile-session-panel--section-title {
154
+ padding: 0.85rem 1rem 0.3rem;
155
+ color: var(--memori-text-color);
156
+ font-size: 0.8rem;
157
+ font-weight: 600;
158
+ letter-spacing: 0.03em;
159
+ text-transform: uppercase;
160
+ }
161
+
162
+ .memori-mobile-session-panel--actions {
163
+ padding: 0;
164
+ margin: 0;
165
+ list-style: none;
166
+ }
167
+
168
+ .memori-mobile-session-panel--action {
169
+ display: flex;
170
+ width: 100%;
171
+ align-items: center;
172
+ justify-content: flex-start;
173
+ padding: 0.72rem 1rem;
174
+ border: 0;
175
+ border-radius: 0 !important;
176
+ background: transparent;
177
+ color: inherit;
178
+ cursor: pointer;
179
+ gap: 0.7rem;
180
+ text-align: left;
181
+ }
182
+
183
+ .memori-mobile-session-panel--actions li {
184
+ width: 100%;
185
+ }
186
+
187
+ .memori-mobile-session-panel--action:disabled {
188
+ cursor: not-allowed;
189
+ opacity: 0.45;
190
+ }
191
+
192
+ .memori-mobile-session-panel--action-icon {
193
+ display: inline-flex;
194
+ width: 2.3rem;
195
+ height: 2.3rem;
196
+ align-items: center;
197
+ justify-content: center;
198
+ border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
199
+ border-radius: 12px;
200
+ color: var(--memori-icon-button-icon, color-mix(in oklch, var(--memori-text-color, #111827) 72%, transparent));
201
+ }
202
+
203
+ [data-theme='dark'] .memori-mobile-session-panel--action-icon {
204
+ border-color: color-mix(in srgb, #fff 16%, transparent);
205
+ color: #fff;
206
+ }
207
+
208
+ .memori-mobile-session-panel--logout .memori-mobile-session-panel--action-icon {
209
+ color: #a53b45;
210
+ }
211
+
212
+ .memori-mobile-session-panel--action:focus-visible .memori-mobile-session-panel--action-icon {
213
+ color: var(--memori-primary);
214
+ }
215
+
216
+ .memori-mobile-session-panel--action:hover:not(:disabled) .memori-mobile-session-panel--action-icon {
217
+ color: var(--memori-primary);
218
+ }
219
+
220
+ [data-theme='dark'] .memori-mobile-session-panel--action:focus-visible .memori-mobile-session-panel--action-icon {
221
+ color: var(--memori-primary);
222
+ }
223
+
224
+ [data-theme='dark'] .memori-mobile-session-panel--action:hover:not(:disabled) .memori-mobile-session-panel--action-icon {
225
+ color: var(--memori-primary);
226
+ }
227
+
228
+ .memori-mobile-session-panel--action-icon svg {
229
+ width: 1rem;
230
+ max-width: 1rem;
231
+ height: 1rem;
232
+ max-height: 1rem;
233
+ flex-shrink: 0;
234
+ color: inherit;
235
+ }
236
+
237
+ .memori-mobile-session-panel--action-copy {
238
+ display: flex;
239
+ min-width: 0;
240
+ flex: 1;
241
+ flex-direction: column;
242
+ }
243
+
244
+ .memori-mobile-session-panel--action-title {
245
+ color: var(--memori-text-color, #111);
246
+ font-size: 1rem;
247
+ font-weight: 500;
248
+ }
249
+
250
+ .memori-mobile-session-panel--action-subtitle {
251
+ color: var(--memori-text-color);
252
+ font-size: 0.82rem;
253
+ }
254
+
255
+ .memori-mobile-session-panel--action-trailing {
256
+ display: inline-flex;
257
+ align-items: center;
258
+ margin-left: auto;
259
+ color: var(--memori-text-color);
260
+ }
261
+
262
+ .memori-mobile-session-panel--chevron {
263
+ font-size: 1rem;
264
+ font-weight: 700;
265
+ }
266
+
267
+ .memori-mobile-session-panel--logout {
268
+ display: flex !important;
269
+ width: calc(100% - 2rem);
270
+ align-items: center !important;
271
+ justify-content: flex-start !important;
272
+ padding: 0.85rem 0rem !important;
273
+ border: 0;
274
+ border-radius: 0 !important;
275
+ border-top: 1px solid var(--memori-border-color);
276
+ margin: 0.35rem 1rem 0.2rem;
277
+ background: transparent;
278
+ color: #a53b45;
279
+ cursor: pointer;
280
+ gap: 0.7rem;
281
+ }
282
+
283
+ .memori-mobile-session-panel--logout > span {
284
+ gap: 0.5rem;
285
+ }
286
+
287
+ .memori-mobile-session-panel--action .memori-button__content {
288
+ display: flex !important;
289
+ width: 100%;
290
+ align-items: center;
291
+ gap: 0.5rem;
292
+ }
293
+
294
+ .memori-mobile-session-panel--logout-label {
295
+ font-size: 1.02rem;
296
+ font-weight: 500;
297
+ }
298
+
299
+ .memori-mobile-session-panel--page {
300
+ padding: 0.25rem 1rem 1rem;
301
+ }
302
+
303
+ .memori-mobile-session-panel--back {
304
+ display: inline-flex !important;
305
+ align-items: center !important;
306
+ padding: 0;
307
+ border: 0;
308
+ border-radius: 0 !important;
309
+ margin-bottom: 0.4rem;
310
+ background: transparent;
311
+ color: var(--memori-text-color);
312
+ cursor: pointer;
313
+ font-size: 0.88rem;
314
+ font-weight: 600;
315
+ gap: 0.35rem;
316
+ }
317
+
318
+ .memori-mobile-session-panel--page:has(.memori-mobile-session-panel--back) {
319
+ padding-top: 0;
320
+ padding-bottom: 0.65rem;
321
+ border-bottom: 0.5px solid var(--memori-border-color, #e5e7eb);
322
+ margin-bottom: 0.75rem;
323
+ }
324
+
325
+ /* User details typography */
326
+ .memori-dropdown--user-details {
327
+ display: flex;
328
+ min-width: 0;
329
+ flex: 1;
330
+ flex-direction: column;
331
+ gap: 2px;
332
+ }
333
+
334
+ .memori-dropdown--user-name {
335
+ margin: 0;
336
+ color: var(--memori-text-color, #111);
337
+ font-size: 1.05rem;
338
+ font-weight: 700;
339
+ letter-spacing: -0.01em;
340
+ line-height: 1.3;
341
+ }
342
+
343
+ .memori-dropdown--user-email {
344
+ overflow: hidden;
345
+ margin: 0;
346
+ color: var(--memori-text-muted, #666);
347
+ font-size: 0.875rem;
348
+ line-height: 1.35;
349
+ text-overflow: ellipsis;
350
+ white-space: nowrap;
351
+ }
352
+
353
+ .memori-mobile-session-panel--page-title {
354
+ margin: 0 0 0.8rem;
355
+ color: var(--memori-text-color, #111);
356
+ font-size: 1.15rem;
357
+ }
358
+
359
+ .memori-mobile-session-panel--page-content {
360
+ display: flex;
361
+ flex-direction: column;
362
+ gap: 0.8rem;
363
+ }
364
+
365
+ .memori-mobile-session-panel--share-content,
366
+ .memori-mobile-session-panel--share-content * {
367
+ font-family: var(--memori-font-family, 'Lexend Deca', sans-serif);
368
+ }
369
+
370
+ .memori-mobile-session-panel--ai-usage-content {
371
+ padding: 0;
372
+ }
373
+
374
+ .memori-mobile-session-panel--ai-usage.memori-dropdown--sustainability {
375
+ width: 100%;
376
+ min-width: 0;
377
+ padding: 0;
378
+ }
379
+
380
+ .memori-mobile-session-panel--meta-label {
381
+ margin: 0;
382
+ color: var(--memori-text-color);
383
+ font-size: 0.8rem;
384
+ text-transform: uppercase;
385
+ }
386
+
387
+ .memori-mobile-session-panel--meta-value {
388
+ margin: 0;
389
+ color: var(--memori-text-color, #111);
390
+ font-size: 0.96rem;
391
+ }
392
+
393
+ .memori-mobile-session-panel--page-actions {
394
+ display: flex;
395
+ flex-direction: column;
396
+ gap: 0.5rem;
397
+ }
398
+
399
+ .memori-mobile-session-panel--page-btn {
400
+ display: flex !important;
401
+ width: 100%;
402
+ align-items: center !important;
403
+ justify-content: center !important;
404
+ padding: 0.65rem 0.75rem;
405
+ border: 1px solid rgba(0, 0, 0, 0.12);
406
+ /* border-radius: 0 !important; */
407
+ background: var(--memori-main-background);
408
+ color: var(--memori-text-color, #111);
409
+ cursor: pointer;
410
+ font-size: 0.9rem;
411
+ font-weight: 600;
412
+ text-align: center;
413
+ }
414
+
415
+ .memori-mobile-session-panel--page-btn .memori-button__content {
416
+ display: inline-flex !important;
417
+ width: 100%;
418
+ align-items: center;
419
+ justify-content: center;
420
+ gap: 0.5rem;
421
+ }
422
+
423
+ .memori-mobile-session-panel--page-btn-active {
424
+ border-color: color-mix(in oklch, var(--memori-success, #16a34a) 55%, var(--memori-border-color, #e5e7eb));
425
+ color: var(--memori-text-color, #111);
426
+ }
427
+
428
+ .memori-mobile-session-panel--page-btn:disabled {
429
+ cursor: not-allowed;
430
+ opacity: 0.45;
431
+ }
432
+
433
+ .memori-mobile-session-panel--page-btn-secondary {
434
+ background: transparent;
435
+ }
436
+
437
+ [data-theme='dark'] .memori-mobile-session-panel--page-btn-active,
438
+ .memori-widget[data-theme='dark'] .memori-mobile-session-panel--page-btn-active {
439
+ background: transparent;
440
+ color: var(--memori-text-color, #fff);
441
+ }
442
+
443
+ .memori-mobile-session-panel--known-facts-description,
444
+ .memori-mobile-session-panel--known-facts-count {
445
+ margin: 0;
446
+ color: rgba(0, 0, 0, 0.7);
447
+ font-size: 0.9rem;
448
+ }
449
+
450
+ @media (max-width: 768px) {
451
+ .memori-mobile-session-panel--overlay {
452
+ display: flex;
453
+ }
454
+
455
+ .memori-mobile-session-panel--overlay-popover {
456
+ align-items: flex-start;
457
+ justify-content: flex-end;
458
+ }
459
+ }
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import { Message, User, Venue } from '@memori.ai/memori-api-client/dist/types';
3
+ type SessionAction = {
4
+ key: string;
5
+ icon: React.ReactNode;
6
+ title: string;
7
+ subtitle?: string;
8
+ onClick?: () => void;
9
+ trailing?: React.ReactNode;
10
+ view?: 'location' | 'knownFacts' | 'share';
11
+ disabled?: boolean;
12
+ };
13
+ export interface MobileSessionPanelProps {
14
+ open: boolean;
15
+ onClose: () => void;
16
+ presentation?: 'sheet' | 'popover';
17
+ title: string;
18
+ loginToken?: string;
19
+ userName: string;
20
+ userInitial?: string;
21
+ user?: User;
22
+ apiClient?: {
23
+ backend?: {
24
+ uploadAsset?: (name: string, payload: string, token: string) => Promise<any>;
25
+ pwlUpdateUser?: (token: string, userID: string, user: Partial<User>) => Promise<any>;
26
+ };
27
+ };
28
+ userEmail?: string;
29
+ birthDate?: string;
30
+ avatarURL?: string;
31
+ actions: SessionAction[];
32
+ logoutLabel?: string;
33
+ onLogout?: () => void;
34
+ onKnownFactsOpen?: () => void;
35
+ onLocationEnable?: () => void;
36
+ onLocationDisable?: () => void;
37
+ knownFactsPageTitle?: string;
38
+ sharePageTitle?: string;
39
+ locationPageTitle?: string;
40
+ backLabel?: string;
41
+ locationStatusLabel?: string;
42
+ locationPlace?: string;
43
+ locationUnknownLabel?: string;
44
+ locationEnableLabel?: string;
45
+ locationDisableLabel?: string;
46
+ venue?: Venue;
47
+ setVenue?: (venue?: Venue) => void;
48
+ knownFactsDescription?: string;
49
+ knownFactsCtaLabel?: string;
50
+ knownFactsCountLabel?: string;
51
+ shareContent?: React.ReactNode;
52
+ knownFactsDisabled?: boolean;
53
+ knownFactsHint?: string;
54
+ showSessionInfo?: boolean;
55
+ showKnownFacts?: boolean;
56
+ history?: Message[];
57
+ aiUsageTitle?: string;
58
+ showMessageConsumption?: boolean;
59
+ isLoggedIn?: boolean;
60
+ showLogin?: boolean;
61
+ loginLabel?: string;
62
+ onLogin?: () => void;
63
+ }
64
+ declare const MobileSessionPanel: React.FC<MobileSessionPanelProps>;
65
+ export default MobileSessionPanel;