@memori.ai/memori-react 8.45.4 → 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 (264) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/Chat/Chat.d.ts +1 -0
  3. package/dist/components/Chat/Chat.js +2 -2
  4. package/dist/components/Chat/Chat.js.map +1 -1
  5. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +78 -0
  6. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +3 -3
  7. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +5 -28
  8. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
  9. package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
  10. package/dist/components/ChatInputs/ChatInputs.js +2 -2
  11. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  12. package/dist/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
  13. package/dist/components/ContentPreviewModal/DocumentMarkdown.js +31 -0
  14. package/dist/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
  15. package/dist/components/DrawerFooter/DrawerFooter.css +62 -0
  16. package/dist/components/IconButton/IconButton.css +135 -0
  17. package/dist/components/IconButton/IconButton.d.ts +1 -1
  18. package/dist/components/LoginModal/LoginModal.css +270 -0
  19. package/dist/components/LoginModal/LoginModal.d.ts +19 -0
  20. package/dist/components/LoginModal/LoginModal.js +355 -0
  21. package/dist/components/LoginModal/LoginModal.js.map +1 -0
  22. package/dist/components/MemoriWidget/MemoriWidget.d.ts +1 -1
  23. package/dist/components/MemoriWidget/MemoriWidget.js +45 -23
  24. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  25. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +540 -0
  26. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +72 -112
  27. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
  28. package/dist/components/PositionPopover/PositionPopover.css +218 -0
  29. package/dist/components/ReasoningBlock/ReasoningBlock.css +156 -0
  30. package/dist/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
  31. package/dist/components/ReasoningBlock/ReasoningBlock.js +61 -0
  32. package/dist/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
  33. package/dist/components/SideDrawer/SideDrawer.css +112 -0
  34. package/dist/components/SideDrawer/SideDrawer.d.ts +22 -0
  35. package/dist/components/SideDrawer/SideDrawer.js +17 -0
  36. package/dist/components/SideDrawer/SideDrawer.js.map +1 -0
  37. package/dist/components/UploadButton/UploadButton.d.ts +2 -0
  38. package/dist/components/UploadButton/UploadButton.js +2 -2
  39. package/dist/components/UploadButton/UploadButton.js.map +1 -1
  40. package/dist/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
  41. package/dist/components/UploadButton/UploadImages/UploadImages.js +7 -1
  42. package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
  43. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +87 -7
  44. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
  45. package/dist/components/layouts/WebsiteAssistant/website-assistant.css +889 -0
  46. package/dist/components/layouts/fullpage.css +628 -0
  47. package/dist/helpers/artifactPanel.d.ts +6 -0
  48. package/dist/helpers/artifactPanel.js +42 -0
  49. package/dist/helpers/artifactPanel.js.map +1 -0
  50. package/dist/helpers/chatScroll.d.ts +12 -0
  51. package/dist/helpers/chatScroll.js +14 -0
  52. package/dist/helpers/chatScroll.js.map +1 -0
  53. package/dist/helpers/conversationHistory.d.ts +16 -0
  54. package/dist/helpers/conversationHistory.js +89 -0
  55. package/dist/helpers/conversationHistory.js.map +1 -0
  56. package/dist/helpers/conversationTitle.d.ts +8 -0
  57. package/dist/helpers/conversationTitle.js +27 -0
  58. package/dist/helpers/conversationTitle.js.map +1 -0
  59. package/dist/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
  60. package/dist/helpers/enhanceBubbleCodeBlocks.js +97 -0
  61. package/dist/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
  62. package/dist/helpers/highlightMatches.d.ts +2 -0
  63. package/dist/helpers/highlightMatches.js +54 -0
  64. package/dist/helpers/highlightMatches.js.map +1 -0
  65. package/dist/helpers/nats/dialogStateCatchUp.d.ts +3 -0
  66. package/dist/helpers/nats/dialogStateCatchUp.js +40 -0
  67. package/dist/helpers/nats/dialogStateCatchUp.js.map +1 -0
  68. package/dist/helpers/positionPopover.d.ts +1 -0
  69. package/dist/helpers/positionPopover.js +9 -3
  70. package/dist/helpers/positionPopover.js.map +1 -1
  71. package/dist/helpers/prism.d.ts +16 -0
  72. package/dist/helpers/prism.js +78 -0
  73. package/dist/helpers/prism.js.map +1 -0
  74. package/dist/helpers/reasoning.d.ts +7 -0
  75. package/dist/helpers/reasoning.js +43 -0
  76. package/dist/helpers/reasoning.js.map +1 -0
  77. package/dist/helpers/relativeTime.d.ts +3 -0
  78. package/dist/helpers/relativeTime.js +56 -0
  79. package/dist/helpers/relativeTime.js.map +1 -0
  80. package/dist/helpers/sourcesCount.d.ts +2 -0
  81. package/dist/helpers/sourcesCount.js +22 -0
  82. package/dist/helpers/sourcesCount.js.map +1 -0
  83. package/dist/helpers/speech/speechRequest.d.ts +15 -0
  84. package/dist/helpers/speech/speechRequest.js +76 -0
  85. package/dist/helpers/speech/speechRequest.js.map +1 -0
  86. package/dist/helpers/stt/useSTT.d.ts +4 -0
  87. package/dist/helpers/stt/useSTT.js +20 -13
  88. package/dist/helpers/stt/useSTT.js.map +1 -1
  89. package/dist/helpers/tts/muteSpeaker.js +3 -4
  90. package/dist/helpers/tts/muteSpeaker.js.map +1 -1
  91. package/dist/helpers/tts/useTTS.d.ts +5 -0
  92. package/dist/helpers/tts/useTTS.js +12 -4
  93. package/dist/helpers/tts/useTTS.js.map +1 -1
  94. package/dist/helpers/usePressTooltip.d.ts +6 -1
  95. package/dist/helpers/usePressTooltip.js +17 -3
  96. package/dist/helpers/usePressTooltip.js.map +1 -1
  97. package/dist/locales/de.json +4 -0
  98. package/dist/locales/en.json +4 -0
  99. package/dist/locales/es.json +4 -0
  100. package/dist/locales/fr.json +4 -0
  101. package/dist/locales/it.json +4 -0
  102. package/dist/styles/motion.css +25 -0
  103. package/dist/version.d.ts +1 -1
  104. package/dist/version.js +1 -1
  105. package/esm/components/Chat/Chat.d.ts +1 -0
  106. package/esm/components/Chat/Chat.js +2 -2
  107. package/esm/components/Chat/Chat.js.map +1 -1
  108. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +78 -0
  109. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +39 -0
  110. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +40 -0
  111. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
  112. package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
  113. package/esm/components/ChatInputs/ChatInputs.js +2 -2
  114. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  115. package/esm/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
  116. package/esm/components/ContentPreviewModal/DocumentMarkdown.js +28 -0
  117. package/esm/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
  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 +135 -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/LoginModal/LoginModal.css +270 -0
  127. package/esm/components/LoginModal/LoginModal.d.ts +19 -0
  128. package/esm/components/LoginModal/LoginModal.js +352 -0
  129. package/esm/components/LoginModal/LoginModal.js.map +1 -0
  130. package/esm/components/MemoriWidget/MemoriWidget.d.ts +1 -1
  131. package/esm/components/MemoriWidget/MemoriWidget.js +40 -19
  132. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  133. package/esm/components/MobileSessionPanel/MobileSessionPanel.css +540 -0
  134. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
  135. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +251 -0
  136. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  137. package/esm/components/PositionPopover/PositionPopover.css +218 -0
  138. package/esm/components/PositionPopover/PositionPopover.d.ts +22 -0
  139. package/esm/components/PositionPopover/PositionPopover.js +203 -0
  140. package/esm/components/PositionPopover/PositionPopover.js.map +1 -0
  141. package/esm/components/ReasoningBlock/ReasoningBlock.css +156 -0
  142. package/esm/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
  143. package/esm/components/ReasoningBlock/ReasoningBlock.js +58 -0
  144. package/esm/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
  145. package/esm/components/SideDrawer/SideDrawer.css +112 -0
  146. package/esm/components/SideDrawer/SideDrawer.d.ts +22 -0
  147. package/esm/components/SideDrawer/SideDrawer.js +12 -0
  148. package/esm/components/SideDrawer/SideDrawer.js.map +1 -0
  149. package/esm/components/UploadButton/UploadButton.d.ts +2 -0
  150. package/esm/components/UploadButton/UploadButton.js +2 -2
  151. package/esm/components/UploadButton/UploadButton.js.map +1 -1
  152. package/esm/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
  153. package/esm/components/UploadButton/UploadImages/UploadImages.js +7 -1
  154. package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
  155. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
  156. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +141 -0
  157. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
  158. package/esm/components/layouts/WebsiteAssistant/website-assistant.css +889 -0
  159. package/esm/components/layouts/fullpage.css +628 -0
  160. package/esm/helpers/artifactPanel.d.ts +6 -0
  161. package/esm/helpers/artifactPanel.js +37 -0
  162. package/esm/helpers/artifactPanel.js.map +1 -0
  163. package/esm/helpers/chatScroll.d.ts +12 -0
  164. package/esm/helpers/chatScroll.js +9 -0
  165. package/esm/helpers/chatScroll.js.map +1 -0
  166. package/esm/helpers/conversationHistory.d.ts +16 -0
  167. package/esm/helpers/conversationHistory.js +82 -0
  168. package/esm/helpers/conversationHistory.js.map +1 -0
  169. package/esm/helpers/conversationTitle.d.ts +8 -0
  170. package/esm/helpers/conversationTitle.js +23 -0
  171. package/esm/helpers/conversationTitle.js.map +1 -0
  172. package/esm/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
  173. package/esm/helpers/enhanceBubbleCodeBlocks.js +94 -0
  174. package/esm/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
  175. package/esm/helpers/highlightMatches.d.ts +2 -0
  176. package/esm/helpers/highlightMatches.js +49 -0
  177. package/esm/helpers/highlightMatches.js.map +1 -0
  178. package/esm/helpers/nats/dialogStateCatchUp.d.ts +3 -0
  179. package/esm/helpers/nats/dialogStateCatchUp.js +35 -0
  180. package/esm/helpers/nats/dialogStateCatchUp.js.map +1 -0
  181. package/esm/helpers/positionPopover.d.ts +3 -0
  182. package/esm/helpers/positionPopover.js +17 -0
  183. package/esm/helpers/positionPopover.js.map +1 -0
  184. package/esm/helpers/prism.d.ts +16 -0
  185. package/esm/helpers/prism.js +74 -0
  186. package/esm/helpers/prism.js.map +1 -0
  187. package/esm/helpers/reasoning.d.ts +7 -0
  188. package/esm/helpers/reasoning.js +39 -0
  189. package/esm/helpers/reasoning.js.map +1 -0
  190. package/esm/helpers/relativeTime.d.ts +3 -0
  191. package/esm/helpers/relativeTime.js +50 -0
  192. package/esm/helpers/relativeTime.js.map +1 -0
  193. package/esm/helpers/sourcesCount.d.ts +2 -0
  194. package/esm/helpers/sourcesCount.js +18 -0
  195. package/esm/helpers/sourcesCount.js.map +1 -0
  196. package/esm/helpers/speech/speechRequest.d.ts +15 -0
  197. package/esm/helpers/speech/speechRequest.js +68 -0
  198. package/esm/helpers/speech/speechRequest.js.map +1 -0
  199. package/esm/helpers/stt/useSTT.d.ts +4 -0
  200. package/esm/helpers/stt/useSTT.js +20 -13
  201. package/esm/helpers/stt/useSTT.js.map +1 -1
  202. package/esm/helpers/tts/muteSpeaker.d.ts +13 -0
  203. package/esm/helpers/tts/muteSpeaker.js +21 -0
  204. package/esm/helpers/tts/muteSpeaker.js.map +1 -0
  205. package/esm/helpers/tts/useTTS.d.ts +5 -0
  206. package/esm/helpers/tts/useTTS.js +12 -4
  207. package/esm/helpers/tts/useTTS.js.map +1 -1
  208. package/esm/helpers/usePressTooltip.d.ts +18 -0
  209. package/esm/helpers/usePressTooltip.js +35 -0
  210. package/esm/helpers/usePressTooltip.js.map +1 -0
  211. package/esm/icons/FacebookIcon.d.ts +3 -0
  212. package/esm/icons/FacebookIcon.js +4 -0
  213. package/esm/icons/FacebookIcon.js.map +1 -0
  214. package/esm/icons/LinkedinIcon.d.ts +3 -0
  215. package/esm/icons/LinkedinIcon.js +4 -0
  216. package/esm/icons/LinkedinIcon.js.map +1 -0
  217. package/esm/icons/MemoriIcon.d.ts +3 -0
  218. package/esm/icons/MemoriIcon.js +6 -0
  219. package/esm/icons/MemoriIcon.js.map +1 -0
  220. package/esm/icons/TelegramIcon.d.ts +3 -0
  221. package/esm/icons/TelegramIcon.js +4 -0
  222. package/esm/icons/TelegramIcon.js.map +1 -0
  223. package/esm/icons/TwitterIcon.d.ts +3 -0
  224. package/esm/icons/TwitterIcon.js +4 -0
  225. package/esm/icons/TwitterIcon.js.map +1 -0
  226. package/esm/icons/WhatsappIcon.d.ts +3 -0
  227. package/esm/icons/WhatsappIcon.js +4 -0
  228. package/esm/icons/WhatsappIcon.js.map +1 -0
  229. package/esm/icons/artifacts/DocumentIcon.d.ts +3 -0
  230. package/esm/icons/artifacts/DocumentIcon.js +4 -0
  231. package/esm/icons/artifacts/DocumentIcon.js.map +1 -0
  232. package/esm/icons/artifacts/HtmlIcon.d.ts +3 -0
  233. package/esm/icons/artifacts/HtmlIcon.js +4 -0
  234. package/esm/icons/artifacts/HtmlIcon.js.map +1 -0
  235. package/esm/icons/artifacts/JavascriptIcon.d.ts +3 -0
  236. package/esm/icons/artifacts/JavascriptIcon.js +4 -0
  237. package/esm/icons/artifacts/JavascriptIcon.js.map +1 -0
  238. package/esm/icons/artifacts/MarkdownIcon.d.ts +3 -0
  239. package/esm/icons/artifacts/MarkdownIcon.js +4 -0
  240. package/esm/icons/artifacts/MarkdownIcon.js.map +1 -0
  241. package/esm/icons/artifacts/PythonIcon.d.ts +3 -0
  242. package/esm/icons/artifacts/PythonIcon.js +4 -0
  243. package/esm/icons/artifacts/PythonIcon.js.map +1 -0
  244. package/esm/icons/artifacts/SvgIcon.d.ts +3 -0
  245. package/esm/icons/artifacts/SvgIcon.js +4 -0
  246. package/esm/icons/artifacts/SvgIcon.js.map +1 -0
  247. package/esm/icons/artifacts/XmlIcon.d.ts +3 -0
  248. package/esm/icons/artifacts/XmlIcon.js +4 -0
  249. package/esm/icons/artifacts/XmlIcon.js.map +1 -0
  250. package/esm/icons/artifacts/cssIcon.d.ts +3 -0
  251. package/esm/icons/artifacts/cssIcon.js +4 -0
  252. package/esm/icons/artifacts/cssIcon.js.map +1 -0
  253. package/esm/locales/de.json +4 -0
  254. package/esm/locales/en.json +4 -0
  255. package/esm/locales/es.json +4 -0
  256. package/esm/locales/fr.json +4 -0
  257. package/esm/locales/it.json +4 -0
  258. package/esm/styles/motion.css +25 -0
  259. package/esm/version.d.ts +1 -1
  260. package/esm/version.js +1 -1
  261. package/package.json +2 -1
  262. package/dist/context/widgetSurfaceContext.d.ts +0 -3
  263. package/dist/context/widgetSurfaceContext.js +0 -11
  264. package/dist/context/widgetSurfaceContext.js.map +0 -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,6 @@
1
+ export declare const ARTIFACT_COLUMN_DEFAULT_WIDTH = 720;
2
+ export declare const ARTIFACT_CHAT_MIN_WIDTH = 400;
3
+ export declare const ARTIFACT_COLUMN_MIN_WIDTH = 360;
4
+ export declare const ARTIFACT_OVERLAY_BREAKPOINT = 1200;
5
+ export declare function formatArtifactType(mimeType: string): string;
6
+ export declare function clampArtifactColumnWidth(requestedWidth: number, containerWidth: number, overlay: boolean): number;
@@ -0,0 +1,37 @@
1
+ export const ARTIFACT_COLUMN_DEFAULT_WIDTH = 720;
2
+ export const ARTIFACT_CHAT_MIN_WIDTH = 400;
3
+ export const ARTIFACT_COLUMN_MIN_WIDTH = 360;
4
+ export const ARTIFACT_OVERLAY_BREAKPOINT = 1200;
5
+ const MIME_LABELS = {
6
+ html: 'HTML',
7
+ markdown: 'Markdown',
8
+ json: 'JSON',
9
+ css: 'CSS',
10
+ javascript: 'JavaScript',
11
+ typescript: 'TypeScript',
12
+ svg: 'SVG',
13
+ xml: 'XML',
14
+ text: 'Text',
15
+ python: 'Python',
16
+ java: 'Java',
17
+ cpp: 'C++',
18
+ csharp: 'C#',
19
+ php: 'PHP',
20
+ ruby: 'Ruby',
21
+ go: 'Go',
22
+ rust: 'Rust',
23
+ yaml: 'YAML',
24
+ sql: 'SQL',
25
+ };
26
+ export function formatArtifactType(mimeType) {
27
+ return MIME_LABELS[mimeType.toLowerCase()] || mimeType;
28
+ }
29
+ export function clampArtifactColumnWidth(requestedWidth, containerWidth, overlay) {
30
+ const reserved = overlay ? 0 : ARTIFACT_CHAT_MIN_WIDTH;
31
+ const upperBound = Math.max(0, containerWidth - reserved);
32
+ if (upperBound <= ARTIFACT_COLUMN_MIN_WIDTH) {
33
+ return upperBound;
34
+ }
35
+ return Math.min(Math.max(requestedWidth, ARTIFACT_COLUMN_MIN_WIDTH), upperBound);
36
+ }
37
+ //# sourceMappingURL=artifactPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifactPanel.js","sourceRoot":"","sources":["../../src/helpers/artifactPanel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AACjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;AAEhD,MAAM,WAAW,GAA2B;IAC1C,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;CACX,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,OAAO,WAAW,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,QAAQ,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,cAAsB,EACtB,cAAsB,EACtB,OAAgB;IAEhB,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;IACvD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC,CAAC;IAE1D,IAAI,UAAU,IAAI,yBAAyB,EAAE,CAAC;QAC5C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CACb,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,yBAAyB,CAAC,EACnD,UAAU,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const CHAT_SCROLL_BOTTOM_THRESHOLD_PX = 80;
2
+ type ScrollMetrics = {
3
+ scrollTop: number;
4
+ scrollHeight: number;
5
+ clientHeight: number;
6
+ };
7
+ export declare function isChatScrolledToBottom(element: ScrollMetrics, thresholdPx?: number): boolean;
8
+ export declare function scrollChatToBottom(element: {
9
+ scrollTop: number;
10
+ scrollHeight: number;
11
+ }): void;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ export const CHAT_SCROLL_BOTTOM_THRESHOLD_PX = 80;
2
+ export function isChatScrolledToBottom(element, thresholdPx = CHAT_SCROLL_BOTTOM_THRESHOLD_PX) {
3
+ return (element.scrollHeight - element.scrollTop - element.clientHeight <=
4
+ thresholdPx);
5
+ }
6
+ export function scrollChatToBottom(element) {
7
+ element.scrollTop = element.scrollHeight;
8
+ }
9
+ //# sourceMappingURL=chatScroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatScroll.js","sourceRoot":"","sources":["../../src/helpers/chatScroll.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAQlD,MAAM,UAAU,sBAAsB,CACpC,OAAsB,EACtB,WAAW,GAAG,+BAA+B;IAE7C,OAAO,CACL,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,YAAY;QAC/D,WAAW,CACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAGlC;IACC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC;AAC3C,CAAC"}