@layers-app/shared 0.4.6 → 0.4.8

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 (232) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  5. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  6. package/dist/components/AppContainer/AppContainer.js +82 -70
  7. package/dist/components/AppContainer/AppContainer.module.css.js +20 -10
  8. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
  9. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
  10. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
  11. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  13. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  14. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +238 -105
  15. package/dist/components/AppContainer/components/Main.js +4 -4
  16. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  17. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  18. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  19. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  20. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  21. package/dist/components/AppContainer/components/ToolSidebar.js +51 -39
  22. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
  23. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  24. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1107 -137
  25. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
  26. package/dist/components/AppContainer/types.d.ts +12 -0
  27. package/dist/components/AppContainer/types.d.ts.map +1 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  31. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +18 -16
  32. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  33. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  34. package/dist/components/Chat/ChatInput/index.js +264 -164
  35. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  36. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  37. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  38. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  39. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  40. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  41. package/dist/components/Chat/ChatMessage/index.js +153 -118
  42. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  43. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  44. package/dist/components/Chat/MessageActions/index.js +189 -50
  45. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  46. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  47. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  48. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  49. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  50. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  51. package/dist/components/Chat/MessageList/index.js +201 -149
  52. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
  53. package/dist/components/Chat/MessageMeta/index.js +21 -19
  54. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
  55. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  56. package/dist/components/ColorPicker/ColorPicker.js +81 -76
  57. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  58. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  59. package/dist/components/ColorPicker/ColorPickerToolbar.js +97 -91
  60. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  61. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  62. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  63. package/dist/components/CommentComposer/index.d.ts +1 -1
  64. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  65. package/dist/components/CommentComposer/index.js +70 -68
  66. package/dist/components/CommentComposer/types.d.ts +6 -0
  67. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  68. package/dist/components/CustomKBD/index.js +21 -22
  69. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  70. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  72. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  73. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  74. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  75. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  76. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  77. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
  78. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
  79. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
  80. package/dist/components/NewToolbar/utils.d.ts +12 -0
  81. package/dist/components/NewToolbar/utils.d.ts.map +1 -0
  82. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  83. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  84. package/dist/components/Notification/InfiniteScroll.js +42 -0
  85. package/dist/components/Notification/Notification.d.ts +4 -1
  86. package/dist/components/Notification/Notification.d.ts.map +1 -1
  87. package/dist/components/Notification/Notification.module.css.js +28 -4
  88. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  89. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  90. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  91. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  92. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  93. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  94. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  95. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  96. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  97. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  98. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  99. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  100. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  101. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  102. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  103. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  104. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  105. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  106. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  107. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  108. package/dist/components/Notification/atoms/index.d.ts +5 -0
  109. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  110. package/dist/components/Notification/hooks/index.d.ts +8 -0
  111. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  112. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  113. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  114. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  115. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  116. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  117. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  118. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  119. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  120. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  121. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  122. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  123. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  124. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  125. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  126. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  127. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  128. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  129. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  130. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  131. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  132. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  133. package/dist/components/Notification/lib/api.d.ts +4 -0
  134. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  135. package/dist/components/Notification/lib/api.js +19 -0
  136. package/dist/components/Notification/lib/index.d.ts +5 -0
  137. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  138. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  139. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  140. package/dist/components/Notification/lib/notificationText.js +131 -0
  141. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  142. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  143. package/dist/components/Notification/lib/stripHtml.js +6 -0
  144. package/dist/components/Notification/lib/types.d.ts +45 -0
  145. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  146. package/dist/components/Notification/lib/types.js +9 -0
  147. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  148. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  149. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  150. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  151. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  152. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  153. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  154. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  155. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  156. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  157. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  158. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  159. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  160. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  161. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  162. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  163. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  164. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  165. package/dist/components/Notification/molecules/index.d.ts +7 -0
  166. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  167. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  168. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  169. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  170. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  171. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  172. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  173. package/dist/components/Notification/organisms/index.d.ts +3 -0
  174. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  175. package/dist/components/OnboardingTour/index.d.ts +1 -1
  176. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  177. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
  178. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
  179. package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
  180. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  181. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  182. package/dist/config/brand.d.ts.map +1 -1
  183. package/dist/config/brand.js +29 -29
  184. package/dist/config/envConfig.d.ts +4 -0
  185. package/dist/config/envConfig.d.ts.map +1 -1
  186. package/dist/config/envConfig.js +29 -28
  187. package/dist/helpers/getFileIcons.js +5 -5
  188. package/dist/helpers/getFileType.d.ts.map +1 -1
  189. package/dist/helpers/getFileType.js +11 -2
  190. package/dist/helpers/platform.d.ts +1 -1
  191. package/dist/helpers/platform.d.ts.map +1 -1
  192. package/dist/helpers/platform.js +1 -0
  193. package/dist/helpers/showNotifications.d.ts +8 -14
  194. package/dist/helpers/showNotifications.d.ts.map +1 -1
  195. package/dist/helpers/showNotifications.js +107 -111
  196. package/dist/helpers/showNotifications.module.css.js +4 -16
  197. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  198. package/dist/hooks/useDateUtils.js +19 -23
  199. package/dist/index.css +1 -1
  200. package/dist/index.js +576 -573
  201. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  202. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  203. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  204. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  205. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  206. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  207. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  208. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  209. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  210. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  211. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  212. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  213. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  214. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  215. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  216. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  217. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  218. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  219. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  220. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  221. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  222. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  223. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  224. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  225. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  226. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  227. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  228. package/package.json +5 -3
  229. package/dist/components/Notification/Notification.js +0 -119
  230. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  231. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  232. package/dist/components/Notification/NotificationCard.js +0 -93
@@ -1,159 +1,211 @@
1
- import { jsxs as T, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as D, useRef as i, useState as P, useEffect as u, useCallback as W, useImperativeHandle as k } from "react";
3
- import { ArrowDown01Icon as C } from "@hugeicons/core-free-icons";
4
- import { HugeiconsIcon as G } from "@hugeicons/react";
5
- import { ScrollArea as J, ActionIcon as K } from "@mantine/core";
6
- import s from "./MessageList.module.css.js";
7
- const Q = D(
8
- function({
9
- children: L,
10
- className: y,
11
- style: E,
12
- stickToBottom: f,
13
- unreadCount: v = 0,
14
- onStickChange: h,
15
- resetKey: F,
16
- onReachTop: g,
17
- floatingTopAction: N,
18
- bottomOffset: M = 0
19
- }, $) {
20
- const r = i(null), B = i(null), n = i(!0), w = i(0), [A, q] = P(!1), H = i(h), b = i(g), x = i(!1);
21
- u(() => {
22
- H.current = h;
23
- }, [h]), u(() => {
24
- b.current = g;
25
- }, [g]), u(() => {
26
- const e = r.current, o = B.current;
27
- if (!e || !o) return;
28
- const t = new IntersectionObserver(
29
- (m) => {
30
- if (!m[0]?.isIntersecting || x.current || !b.current || n.current) return;
31
- x.current = !0;
32
- const p = e.scrollHeight, c = e.scrollTop;
33
- Promise.resolve(b.current()).then(() => {
34
- requestAnimationFrame(() => {
35
- const a = r.current;
36
- if (!a) return;
37
- const d = a.scrollHeight - p;
38
- d > 0 && (a.scrollTop = c + d);
39
- });
40
- }).finally(() => {
41
- x.current = !1;
42
- });
43
- },
44
- { root: e, rootMargin: "300px 0px 0px 0px" }
45
- );
46
- return t.observe(o), () => t.disconnect();
47
- }, []);
48
- const z = W(() => {
49
- r.current && r.current.scrollTo({
50
- top: r.current.scrollHeight,
51
- behavior: "smooth"
52
- });
53
- }, []);
54
- k(
55
- $,
56
- () => ({
57
- scrollToBottom: () => {
58
- const e = r.current;
59
- if (!e) return;
60
- n.current = !0, H.current?.(!0), e.scrollTop = e.scrollHeight;
61
- const o = () => {
62
- const t = r.current;
63
- t && (t.scrollTop = t.scrollHeight, n.current = !0);
1
+ import { jsxs as U, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as se, useRef as a, useState as B, useEffect as p, useCallback as v, useLayoutEffect as Y, useImperativeHandle as ce } from "react";
3
+ import { ArrowDown01Icon as ie } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as ae } from "@hugeicons/react";
5
+ import { ScrollArea as ue, ActionIcon as de } from "@mantine/core";
6
+ import { useVirtualizer as fe } from "@tanstack/react-virtual";
7
+ import l from "./MessageList.module.css.js";
8
+ const he = 300, me = 100;
9
+ function pe({
10
+ items: t,
11
+ renderItem: N,
12
+ getItemKey: f,
13
+ estimateItemSize: g = 64,
14
+ className: O,
15
+ style: G,
16
+ contentStyle: J,
17
+ stickToBottom: w,
18
+ unreadCount: T = 0,
19
+ onStickChange: x,
20
+ onReachTop: b,
21
+ floatingTopAction: z,
22
+ bottomOffset: K = 0,
23
+ contentBottomPad: F = 0
24
+ }, Q) {
25
+ const u = a(null), S = a(null), n = a(!0), [I, X] = B(!1), [q, D] = B(0), [M, V] = B(null), h = a(null), m = a(x), y = a(b), $ = a(!1);
26
+ p(() => {
27
+ m.current = x;
28
+ }, [x]), p(() => {
29
+ y.current = b;
30
+ }, [b]);
31
+ const o = t.length > me, Z = v(
32
+ (e) => typeof g == "function" ? g(t[e], e) : g,
33
+ [g, t]
34
+ ), d = fe({
35
+ count: t.length,
36
+ // Only let the virtualizer drive the scroll element while virtualizing, so
37
+ // the flow path owns scrolling outright (no competing scroll math).
38
+ getScrollElement: v(
39
+ () => o ? u.current : null,
40
+ [o]
41
+ ),
42
+ estimateSize: Z,
43
+ getItemKey: v(
44
+ (e) => f(t[e], e),
45
+ [t, f]
46
+ ),
47
+ overscan: 12
48
+ }), _ = d.getTotalSize(), C = o ? d.getVirtualItems() : [], j = o ? Math.max(0, q - _) : 0, k = j + _ + F, c = v(() => {
49
+ const e = u.current;
50
+ e && (e.scrollTop = e.scrollHeight);
51
+ }, []);
52
+ Y(() => {
53
+ !w || !n.current || c();
54
+ }, [k, t, w, c]), p(() => {
55
+ const e = S.current;
56
+ if (!e || !w) return;
57
+ const r = new ResizeObserver(() => {
58
+ n.current && c();
59
+ });
60
+ return r.observe(e), () => r.disconnect();
61
+ }, [w, c]);
62
+ const W = v(
63
+ (e) => {
64
+ const r = t.findIndex((i, R) => f(i, R) === e);
65
+ r < 0 || (n.current = !1, o ? (d.scrollToIndex(r, { align: "center" }), requestAnimationFrame(
66
+ () => d.scrollToIndex(r, { align: "center" })
67
+ )) : S.current?.querySelector(`[data-index="${r}"]`)?.scrollIntoView({ block: "center" }), V(e), h.current && window.clearTimeout(h.current), h.current = window.setTimeout(
68
+ () => V(null),
69
+ 1600
70
+ ));
71
+ },
72
+ [t, f, o, d]
73
+ );
74
+ ce(
75
+ Q,
76
+ () => ({
77
+ scrollToBottom: () => {
78
+ n.current = !0, m.current?.(!0), c();
79
+ },
80
+ scrollToKey: W
81
+ }),
82
+ [c, W]
83
+ ), p(
84
+ () => () => {
85
+ h.current && window.clearTimeout(h.current);
86
+ },
87
+ []
88
+ ), Y(() => {
89
+ const e = u.current;
90
+ if (!e) return;
91
+ const r = new ResizeObserver(() => D(e.clientHeight));
92
+ return r.observe(e), D(e.clientHeight), () => r.disconnect();
93
+ }, []), p(() => {
94
+ const e = u.current;
95
+ if (!e) return;
96
+ let r = !1, i = e.scrollTop;
97
+ const R = () => {
98
+ const { scrollTop: H, scrollHeight: te, clientHeight: oe } = e, P = te - H - oe, ne = H < i;
99
+ i = H, P < 40 ? n.current || (n.current = !0, m.current?.(!0)) : ne && n.current && (n.current = !1, m.current?.(!1));
100
+ const E = P > 200;
101
+ if (E !== r && (r = E, X(E)), H < he && !n.current && !$.current && y.current) {
102
+ $.current = !0;
103
+ const le = e.scrollHeight - e.scrollTop;
104
+ Promise.resolve(y.current()).then(() => {
105
+ const L = () => {
106
+ const A = u.current;
107
+ A && (A.scrollTop = A.scrollHeight - le);
64
108
  };
65
109
  requestAnimationFrame(() => {
66
- o(), requestAnimationFrame(o);
110
+ L(), requestAnimationFrame(() => {
111
+ L(), requestAnimationFrame(L);
112
+ });
67
113
  });
68
- }
69
- }),
70
- []
71
- ), u(() => {
72
- !f || !r.current || (n.current = !0, w.current = r.current.scrollHeight, r.current.scrollTop = r.current.scrollHeight);
73
- }, [f, F]), u(() => {
74
- const e = r.current;
75
- if (!f || !e) return;
76
- const o = new ResizeObserver(() => {
77
- const c = e.scrollHeight;
78
- c !== w.current && n.current && (e.scrollTop = c), w.current = c;
79
- }), t = e.firstElementChild;
80
- t && o.observe(t);
81
- let m = !1;
82
- const p = () => {
83
- const { scrollTop: c, scrollHeight: a, clientHeight: d } = e, I = a - c - d, S = I < 40;
84
- S !== n.current && (n.current = S, H.current?.(S));
85
- const R = I > 200;
86
- R !== m && (m = R, q(R));
87
- };
88
- return e.addEventListener("scroll", p, { passive: !0 }), () => {
89
- o.disconnect(), e.removeEventListener("scroll", p);
90
- };
91
- }, [f]);
92
- const O = v > 999 ? "999+" : v, j = v > 0;
93
- return /* @__PURE__ */ T(
94
- "div",
95
- {
96
- className: s.container,
97
- style: { "--ml-bottom-offset": `${M}px` },
98
- children: [
99
- /* @__PURE__ */ l(
100
- J,
101
- {
102
- className: `${s.root}${y ? ` ${y}` : ""}`,
103
- style: E,
104
- type: "auto",
105
- scrollbars: "y",
106
- viewportRef: r,
107
- "data-testid": "message-list",
108
- styles: {
109
- content: {
110
- display: "flex",
111
- flexDirection: "column",
112
- minHeight: "100%"
113
- }
114
- },
115
- children: /* @__PURE__ */ T("div", { className: s.wrapper, children: [
116
- /* @__PURE__ */ l(
114
+ }).finally(() => {
115
+ $.current = !1;
116
+ });
117
+ }
118
+ };
119
+ return e.addEventListener("scroll", R, { passive: !0 }), () => e.removeEventListener("scroll", R);
120
+ }, []);
121
+ const ee = T > 999 ? "999+" : T, re = T > 0;
122
+ return /* @__PURE__ */ U(
123
+ "div",
124
+ {
125
+ className: l.container,
126
+ style: { "--ml-bottom-offset": `${K}px` },
127
+ children: [
128
+ /* @__PURE__ */ s(
129
+ ue,
130
+ {
131
+ className: `${l.root}${O ? ` ${O}` : ""}`,
132
+ style: G,
133
+ type: "auto",
134
+ scrollbars: "y",
135
+ viewportRef: u,
136
+ "data-testid": "message-list",
137
+ children: /* @__PURE__ */ s(
138
+ "div",
139
+ {
140
+ ref: S,
141
+ className: l.virtualRoot,
142
+ "data-testid": "message-list-items",
143
+ "data-flow": !o || void 0,
144
+ style: {
145
+ height: o ? k : void 0,
146
+ // Fill the viewport (real px — a `%` doesn't resolve through Mantine
147
+ // ScrollArea's content wrapper) so the leading margin-top:auto can
148
+ // push a short chat to the bottom edge.
149
+ minHeight: o ? void 0 : q || void 0,
150
+ paddingBottom: o ? void 0 : F,
151
+ ...J
152
+ },
153
+ children: o ? C.map((e) => /* @__PURE__ */ s(
117
154
  "div",
118
155
  {
119
- ref: B,
120
- className: s.top,
121
- "data-testid": "message-list-top"
122
- }
123
- ),
124
- /* @__PURE__ */ l("div", { className: s.items, "data-testid": "message-list-items", children: L })
125
- ] })
126
- }
127
- ),
128
- A && /* @__PURE__ */ T("div", { className: s.scrollToBottomWrap, children: [
129
- /* @__PURE__ */ l(
130
- K,
131
- {
132
- variant: "default",
133
- radius: "xl",
134
- size: 34,
135
- onClick: z,
136
- "aria-label": "Scroll to bottom",
137
- "data-testid": "scroll-to-bottom",
138
- children: /* @__PURE__ */ l(G, { icon: C, size: 18 })
156
+ "data-index": e.index,
157
+ ref: d.measureElement,
158
+ className: `${l.virtualRow}${e.key === M ? ` ${l.highlightRow}` : ""}`,
159
+ style: { transform: `translateY(${j + e.start}px)` },
160
+ children: N(t[e.index], e.index)
161
+ },
162
+ e.key
163
+ )) : t.map((e, r) => {
164
+ const i = f(e, r);
165
+ return /* @__PURE__ */ s(
166
+ "div",
167
+ {
168
+ "data-index": r,
169
+ className: `${l.flowRow}${i === M ? ` ${l.highlightRow}` : ""}`,
170
+ children: N(e, r)
171
+ },
172
+ i
173
+ );
174
+ })
139
175
  }
140
- ),
141
- j && /* @__PURE__ */ l("span", { className: s.scrollToBottomBadge, children: O })
142
- ] }),
143
- N && /* @__PURE__ */ l(
144
- "div",
176
+ )
177
+ }
178
+ ),
179
+ I && /* @__PURE__ */ U("div", { className: l.scrollToBottomWrap, children: [
180
+ /* @__PURE__ */ s(
181
+ de,
145
182
  {
146
- className: s.floatingTopAction,
147
- "data-raised": A || void 0,
148
- children: N
183
+ variant: "default",
184
+ radius: "xl",
185
+ size: 34,
186
+ onClick: () => {
187
+ n.current = !0, m.current?.(!0), c();
188
+ },
189
+ "aria-label": "Scroll to bottom",
190
+ "data-testid": "scroll-to-bottom",
191
+ children: /* @__PURE__ */ s(ae, { icon: ie, size: 18 })
149
192
  }
150
- )
151
- ]
152
- }
153
- );
154
- }
155
- );
156
- Q.displayName = "MessageList";
193
+ ),
194
+ re && /* @__PURE__ */ s("span", { className: l.scrollToBottomBadge, children: ee })
195
+ ] }),
196
+ z && /* @__PURE__ */ s(
197
+ "div",
198
+ {
199
+ className: l.floatingTopAction,
200
+ "data-raised": I || void 0,
201
+ children: z
202
+ }
203
+ )
204
+ ]
205
+ }
206
+ );
207
+ }
208
+ const be = se(pe);
157
209
  export {
158
- Q as MessageList
210
+ be as MessageList
159
211
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageMeta/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,gBAAgB,2CAelB;yBAxBe,WAAW"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageMeta/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,gBAAgB,2CAgBlB;yBAzBe,WAAW"}
@@ -1,33 +1,35 @@
1
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { useTranslation as p } from "react-i18next";
2
3
  import e from "./MessageMeta.module.css.js";
3
- function l({
4
+ function g({
4
5
  time: t,
5
6
  edited: i,
6
- views: s,
7
- outgoing: d,
8
- inReactions: o,
9
- children: n,
10
- className: r,
11
- style: m
7
+ views: a,
8
+ outgoing: o,
9
+ inReactions: d,
10
+ children: m,
11
+ className: n,
12
+ style: r
12
13
  }) {
13
- return /* @__PURE__ */ c(
14
+ const { t: c } = p("meet");
15
+ return /* @__PURE__ */ l(
14
16
  "div",
15
17
  {
16
- className: `${e.root} ${r || ""}`,
17
- style: m,
18
- "data-outgoing": d || void 0,
19
- "data-in-reactions": o || void 0,
18
+ className: `${e.root} ${n || ""}`,
19
+ style: r,
20
+ "data-outgoing": o || void 0,
21
+ "data-in-reactions": d || void 0,
20
22
  "data-testid": "message-meta",
21
23
  children: [
22
- i && /* @__PURE__ */ a("span", { className: e.edited, children: "edited" }),
23
- s !== void 0 && /* @__PURE__ */ a("span", { className: e.views, children: s }),
24
- /* @__PURE__ */ a("span", { className: e.time, children: t }),
25
- n
24
+ i && /* @__PURE__ */ s("span", { className: e.edited, children: c("message.edited") }),
25
+ a !== void 0 && /* @__PURE__ */ s("span", { className: e.views, children: a }),
26
+ /* @__PURE__ */ s("span", { className: e.time, children: t }),
27
+ m
26
28
  ]
27
29
  }
28
30
  );
29
31
  }
30
- l.displayName = "MessageMeta";
32
+ g.displayName = "MessageMeta";
31
33
  export {
32
- l as MessageMeta
34
+ g as MessageMeta
33
35
  };
@@ -11,6 +11,8 @@ type ColorPickerProps = {
11
11
  withTick?: boolean;
12
12
  fullWidth?: boolean;
13
13
  swatchSize?: number;
14
+ wrapperHeight?: number;
15
+ customSizes?: boolean;
14
16
  } & Omit<FlexProps, 'onChange'>;
15
17
  interface ColorCircleProps extends Omit<ColorSwatchProps, 'color'>, Omit<React.ComponentPropsWithoutRef<'div'>, keyof Omit<ColorSwatchProps, 'color'>> {
16
18
  value?: string | null;
@@ -21,6 +23,7 @@ interface ColorCircleProps extends Omit<ColorSwatchProps, 'color'>, Omit<React.C
21
23
  withTick?: boolean;
22
24
  borderColor?: string;
23
25
  bgColor?: string;
26
+ swatchSize?: number;
24
27
  }
25
28
  export declare const ColorCircle: import("react").ForwardRefExoticComponent<ColorCircleProps & import("react").RefAttributes<HTMLDivElement>>;
26
29
  export declare const ColorPicker: import("react").ForwardRefExoticComponent<Omit<ColorPickerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAEhB,SAAS,EAKV,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAyGhC,UAAU,gBACR,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EACrC,IAAI,CACF,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,MAAM,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CACtC;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,6GAiFvB,CAAC;AASF,eAAO,MAAM,WAAW;;;;CAItB,CAAC"}
1
+ {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAEhB,SAAS,EAKV,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AA6GhC,UAAU,gBACR,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EACrC,IAAI,CACF,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,MAAM,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CACtC;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,6GAkFvB,CAAC;AASF,eAAO,MAAM,WAAW;;;;CAItB,CAAC"}