@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.
- package/dist/assets/default-workspace-avatar.jpg.js +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +82 -70
- package/dist/components/AppContainer/AppContainer.module.css.js +20 -10
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
- package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +238 -105
- package/dist/components/AppContainer/components/Main.js +4 -4
- package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
- package/dist/components/AppContainer/components/NavbarContent.js +16 -2
- package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
- package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
- package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolSidebar.js +51 -39
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1107 -137
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
- package/dist/components/AppContainer/types.d.ts +12 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +18 -16
- package/dist/components/Chat/ChatInput/index.d.ts +13 -1
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatInput/index.js +264 -164
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
- package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
- package/dist/components/Chat/ChatMessage/index.js +153 -118
- package/dist/components/Chat/MessageActions/index.d.ts +2 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageActions/index.js +189 -50
- package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageAuthor/index.js +39 -25
- package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
- package/dist/components/Chat/MessageList/index.d.ts +17 -25
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageList/index.js +201 -149
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
- package/dist/components/Chat/MessageMeta/index.js +21 -19
- package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +81 -76
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +97 -91
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
- package/dist/components/CommentComposer/index.d.ts +1 -1
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +70 -68
- package/dist/components/CommentComposer/types.d.ts +6 -0
- package/dist/components/CommentComposer/types.d.ts.map +1 -1
- package/dist/components/CustomKBD/index.js +21 -22
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
- package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
- package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
- package/dist/components/EntityTitle/EntityTitle.js +81 -80
- package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +33 -17
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
- package/dist/components/NewToolbar/utils.d.ts +12 -0
- package/dist/components/NewToolbar/utils.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
- package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/Notification/InfiniteScroll.js +42 -0
- package/dist/components/Notification/Notification.d.ts +4 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.module.css.js +28 -4
- package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
- package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ActionBadge.js +53 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/InboxIcon.js +33 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
- package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
- package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
- package/dist/components/Notification/atoms/TabBadge.js +32 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
- package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
- package/dist/components/Notification/atoms/UnreadDot.js +23 -0
- package/dist/components/Notification/atoms/index.d.ts +5 -0
- package/dist/components/Notification/atoms/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/index.d.ts +8 -0
- package/dist/components/Notification/hooks/index.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
- package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxActions.js +58 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
- package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
- package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
- package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
- package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
- package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
- package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
- package/dist/components/Notification/lib/api.d.ts +4 -0
- package/dist/components/Notification/lib/api.d.ts.map +1 -0
- package/dist/components/Notification/lib/api.js +19 -0
- package/dist/components/Notification/lib/index.d.ts +5 -0
- package/dist/components/Notification/lib/index.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.d.ts +10 -0
- package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
- package/dist/components/Notification/lib/notificationText.js +131 -0
- package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
- package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
- package/dist/components/Notification/lib/stripHtml.js +6 -0
- package/dist/components/Notification/lib/types.d.ts +45 -0
- package/dist/components/Notification/lib/types.d.ts.map +1 -0
- package/dist/components/Notification/lib/types.js +9 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
- package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
- package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxHeader.js +73 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
- package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
- package/dist/components/Notification/molecules/InboxTabs.js +60 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
- package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationActions.js +64 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
- package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
- package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
- package/dist/components/Notification/molecules/NotificationContent.js +183 -0
- package/dist/components/Notification/molecules/index.d.ts +7 -0
- package/dist/components/Notification/molecules/index.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
- package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxItem.js +100 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
- package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
- package/dist/components/Notification/organisms/InboxPanel.js +99 -0
- package/dist/components/Notification/organisms/index.d.ts +3 -0
- package/dist/components/Notification/organisms/index.d.ts.map +1 -0
- package/dist/components/OnboardingTour/index.d.ts +1 -1
- package/dist/components/OnboardingTour/index.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +27 -26
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +29 -29
- package/dist/config/envConfig.d.ts +4 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +29 -28
- package/dist/helpers/getFileIcons.js +5 -5
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +11 -2
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +1 -0
- package/dist/helpers/showNotifications.d.ts +8 -14
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +107 -111
- package/dist/helpers/showNotifications.module.css.js +4 -16
- package/dist/hooks/useDateUtils.d.ts.map +1 -1
- package/dist/hooks/useDateUtils.js +19 -23
- package/dist/index.css +1 -1
- package/dist/index.js +576 -573
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
- package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
- package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
- package/package.json +5 -3
- package/dist/components/Notification/Notification.js +0 -119
- package/dist/components/Notification/NotificationCard.d.ts +0 -10
- package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
- package/dist/components/Notification/NotificationCard.js +0 -93
|
@@ -1,159 +1,211 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { ArrowDown01Icon as
|
|
4
|
-
import { HugeiconsIcon as
|
|
5
|
-
import { ScrollArea as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
110
|
+
L(), requestAnimationFrame(() => {
|
|
111
|
+
L(), requestAnimationFrame(L);
|
|
112
|
+
});
|
|
67
113
|
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
I && /* @__PURE__ */ U("div", { className: l.scrollToBottomWrap, children: [
|
|
180
|
+
/* @__PURE__ */ s(
|
|
181
|
+
de,
|
|
145
182
|
{
|
|
146
|
-
|
|
147
|
-
"
|
|
148
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
|
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
|
|
4
|
+
function g({
|
|
4
5
|
time: t,
|
|
5
6
|
edited: i,
|
|
6
|
-
views:
|
|
7
|
-
outgoing:
|
|
8
|
-
inReactions:
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
11
|
-
style:
|
|
7
|
+
views: a,
|
|
8
|
+
outgoing: o,
|
|
9
|
+
inReactions: d,
|
|
10
|
+
children: m,
|
|
11
|
+
className: n,
|
|
12
|
+
style: r
|
|
12
13
|
}) {
|
|
13
|
-
|
|
14
|
+
const { t: c } = p("meet");
|
|
15
|
+
return /* @__PURE__ */ l(
|
|
14
16
|
"div",
|
|
15
17
|
{
|
|
16
|
-
className: `${e.root} ${
|
|
17
|
-
style:
|
|
18
|
-
"data-outgoing":
|
|
19
|
-
"data-in-reactions":
|
|
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__ */
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
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
|
-
|
|
32
|
+
g.displayName = "MessageMeta";
|
|
31
33
|
export {
|
|
32
|
-
|
|
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;
|
|
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"}
|