@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,68 +1,207 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { SmileIcon as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import B, { useState as w } from "react";
|
|
3
|
+
import { useTranslation as D } from "react-i18next";
|
|
4
|
+
import { SmileIcon as E, ArrowDown01Icon as T, LinkBackwardIcon as C, MoreVerticalIcon as _, Copy01Icon as j, Share08Icon as H, PinIcon as N, Edit02Icon as Q, Delete02Icon as R } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as o } from "@hugeicons/react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import G from "
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
import { Group as b, Popover as u, ActionIcon as t, Menu as r } from "@mantine/core";
|
|
7
|
+
import { EmojiPicker as q } from "../../EmojiPicker/EmojiPicker.js";
|
|
8
|
+
import { IconEntity as G } from "../../ProjectIcon/ProjectIcon.js";
|
|
9
|
+
import K from "./MessageActions.module.css.js";
|
|
10
|
+
const L = ["👍", "❤️", "😂", "🔥", "🎉"], U = B.memo(function({
|
|
11
|
+
onReaction: s,
|
|
12
|
+
canAddReaction: y = !0,
|
|
13
|
+
onReply: f,
|
|
14
|
+
onThread: g,
|
|
15
|
+
onEdit: l,
|
|
16
|
+
onDelete: d,
|
|
17
|
+
onCopy: m,
|
|
18
|
+
onForward: p,
|
|
19
|
+
onPin: h,
|
|
20
|
+
showEdit: I,
|
|
21
|
+
showDelete: z,
|
|
22
|
+
className: k,
|
|
23
|
+
style: S
|
|
22
24
|
}) {
|
|
23
|
-
const [
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const { t: a } = D("meet"), [v, M] = w(!1), [A, c] = w(!1), x = !!(l || d || m || p || h || I || z), O = (i) => {
|
|
26
|
+
if (!s) return;
|
|
27
|
+
const P = G.parse(i);
|
|
28
|
+
s(P?.emoji ?? i);
|
|
27
29
|
};
|
|
28
30
|
return /* @__PURE__ */ e(
|
|
29
31
|
"div",
|
|
30
32
|
{
|
|
31
|
-
className: `${
|
|
32
|
-
style:
|
|
33
|
+
className: `${K.root}${k ? ` ${k}` : ""}`,
|
|
34
|
+
style: S,
|
|
33
35
|
"data-testid": "message-actions",
|
|
34
|
-
children: /* @__PURE__ */ n(
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
children: /* @__PURE__ */ n(b, { gap: 2, wrap: "nowrap", children: [
|
|
37
|
+
s && y && /* @__PURE__ */ n(
|
|
38
|
+
u,
|
|
37
39
|
{
|
|
38
|
-
|
|
40
|
+
opened: A,
|
|
41
|
+
onChange: c,
|
|
39
42
|
position: "top-start",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
showRandomButton: !1,
|
|
43
|
+
shadow: "md",
|
|
44
|
+
radius: "xl",
|
|
43
45
|
withinPortal: !0,
|
|
44
|
-
|
|
46
|
+
keepMounted: !0,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ e(u.Target, { children: /* @__PURE__ */ e(
|
|
49
|
+
t,
|
|
50
|
+
{
|
|
51
|
+
variant: "subtle",
|
|
52
|
+
color: "gray",
|
|
53
|
+
size: 22,
|
|
54
|
+
radius: 8,
|
|
55
|
+
"aria-label": "Add reaction",
|
|
56
|
+
onClick: () => c((i) => !i),
|
|
57
|
+
children: /* @__PURE__ */ e(o, { icon: E, size: 16 })
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
/* @__PURE__ */ e(u.Dropdown, { p: 4, children: /* @__PURE__ */ n(b, { gap: 2, wrap: "nowrap", children: [
|
|
61
|
+
L.map((i) => /* @__PURE__ */ e(
|
|
62
|
+
t,
|
|
63
|
+
{
|
|
64
|
+
variant: "subtle",
|
|
65
|
+
color: "gray",
|
|
66
|
+
size: 30,
|
|
67
|
+
radius: "xl",
|
|
68
|
+
onClick: () => {
|
|
69
|
+
s(i), c(!1);
|
|
70
|
+
},
|
|
71
|
+
"aria-label": `React ${i}`,
|
|
72
|
+
style: { fontSize: 18, lineHeight: 1 },
|
|
73
|
+
children: i
|
|
74
|
+
},
|
|
75
|
+
i
|
|
76
|
+
)),
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
q,
|
|
79
|
+
{
|
|
80
|
+
onChange: (i) => {
|
|
81
|
+
O(i), c(!1);
|
|
82
|
+
},
|
|
83
|
+
position: "top-start",
|
|
84
|
+
showRemoveButton: !1,
|
|
85
|
+
showIcons: !1,
|
|
86
|
+
showRandomButton: !1,
|
|
87
|
+
withinPortal: !0,
|
|
88
|
+
children: /* @__PURE__ */ e(
|
|
89
|
+
t,
|
|
90
|
+
{
|
|
91
|
+
variant: "subtle",
|
|
92
|
+
color: "gray",
|
|
93
|
+
size: 30,
|
|
94
|
+
radius: "xl",
|
|
95
|
+
"aria-label": "More reactions",
|
|
96
|
+
children: /* @__PURE__ */ e(o, { icon: T, size: 16 })
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] }) })
|
|
102
|
+
]
|
|
45
103
|
}
|
|
46
104
|
),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
105
|
+
f && /* @__PURE__ */ e(
|
|
106
|
+
t,
|
|
107
|
+
{
|
|
108
|
+
variant: "subtle",
|
|
109
|
+
color: "gray",
|
|
110
|
+
size: 22,
|
|
111
|
+
radius: 8,
|
|
112
|
+
onClick: f,
|
|
113
|
+
"aria-label": "Reply in thread",
|
|
114
|
+
children: /* @__PURE__ */ e(o, { icon: C, size: 16 })
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
g && /* @__PURE__ */ e(
|
|
118
|
+
t,
|
|
119
|
+
{
|
|
120
|
+
variant: "subtle",
|
|
121
|
+
color: "gray",
|
|
122
|
+
size: 22,
|
|
123
|
+
radius: 8,
|
|
124
|
+
onClick: g,
|
|
125
|
+
"aria-label": "Open thread",
|
|
126
|
+
"data-cy": "message-thread-open",
|
|
127
|
+
children: /* @__PURE__ */ e(o, { icon: C, size: 16 })
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
x && /* @__PURE__ */ n(
|
|
131
|
+
r,
|
|
132
|
+
{
|
|
133
|
+
position: "bottom-end",
|
|
134
|
+
withinPortal: !0,
|
|
135
|
+
shadow: "md",
|
|
136
|
+
width: 200,
|
|
137
|
+
opened: v,
|
|
138
|
+
onChange: M,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ e(r.Target, { children: /* @__PURE__ */ e(
|
|
141
|
+
t,
|
|
142
|
+
{
|
|
143
|
+
variant: "subtle",
|
|
144
|
+
color: "gray",
|
|
145
|
+
size: 22,
|
|
146
|
+
radius: 8,
|
|
147
|
+
"aria-label": "More actions",
|
|
148
|
+
children: /* @__PURE__ */ e(o, { icon: _, size: 16 })
|
|
149
|
+
}
|
|
150
|
+
) }),
|
|
151
|
+
/* @__PURE__ */ n(r.Dropdown, { children: [
|
|
152
|
+
m && /* @__PURE__ */ e(
|
|
153
|
+
r.Item,
|
|
154
|
+
{
|
|
155
|
+
leftSection: /* @__PURE__ */ e(o, { icon: j, size: 16 }),
|
|
156
|
+
onClick: m,
|
|
157
|
+
children: a("message.copy", "Copy")
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
p && /* @__PURE__ */ e(
|
|
161
|
+
r.Item,
|
|
162
|
+
{
|
|
163
|
+
leftSection: /* @__PURE__ */ e(o, { icon: H, size: 16 }),
|
|
164
|
+
onClick: p,
|
|
165
|
+
children: a("message.forward", "Forward")
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
h && /* @__PURE__ */ e(
|
|
169
|
+
r.Item,
|
|
170
|
+
{
|
|
171
|
+
leftSection: /* @__PURE__ */ e(o, { icon: N, size: 16 }),
|
|
172
|
+
onClick: h,
|
|
173
|
+
children: a("message.pin", "Pin")
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
(I || l) && /* @__PURE__ */ e(
|
|
177
|
+
r.Item,
|
|
178
|
+
{
|
|
179
|
+
leftSection: /* @__PURE__ */ e(o, { icon: Q, size: 16 }),
|
|
180
|
+
onClick: l,
|
|
181
|
+
children: a("message.edit", "Edit")
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
(z || d) && /* @__PURE__ */ n($, { children: [
|
|
185
|
+
/* @__PURE__ */ e(r.Divider, {}),
|
|
186
|
+
/* @__PURE__ */ e(
|
|
187
|
+
r.Item,
|
|
188
|
+
{
|
|
189
|
+
color: "red",
|
|
190
|
+
leftSection: /* @__PURE__ */ e(o, { icon: R, size: 16 }),
|
|
191
|
+
onClick: d,
|
|
192
|
+
children: a("message.delete", "Delete")
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] })
|
|
196
|
+
] })
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
)
|
|
61
200
|
] })
|
|
62
201
|
}
|
|
63
202
|
);
|
|
64
203
|
});
|
|
65
|
-
|
|
204
|
+
U.displayName = "MessageActions";
|
|
66
205
|
export {
|
|
67
|
-
|
|
206
|
+
U as MessageActions
|
|
68
207
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export interface MessageAuthorBadge {
|
|
3
|
+
label: string;
|
|
4
|
+
variant?: 'anonymous' | 'external';
|
|
5
|
+
}
|
|
2
6
|
export interface MessageAuthorProps {
|
|
3
7
|
/** Author display name */
|
|
4
8
|
name: string;
|
|
@@ -12,8 +16,10 @@ export interface MessageAuthorProps {
|
|
|
12
16
|
className?: string;
|
|
13
17
|
/** Custom style */
|
|
14
18
|
style?: React.CSSProperties;
|
|
19
|
+
/** Category pill next to the name (anonymous guest / external non-member) */
|
|
20
|
+
badge?: MessageAuthorBadge;
|
|
15
21
|
}
|
|
16
|
-
export declare function MessageAuthor({ name, color, outgoing, onClick, className, style, }: MessageAuthorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function MessageAuthor({ name, color, outgoing, onClick, className, style, badge, }: MessageAuthorProps): import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
export declare namespace MessageAuthor {
|
|
18
24
|
var displayName: string;
|
|
19
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageAuthor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageAuthor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,EACL,KAAK,GACN,EAAE,kBAAkB,2CA0CpB;yBAlDe,aAAa"}
|
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { getAuthorColor as
|
|
5
|
-
function
|
|
6
|
-
name:
|
|
7
|
-
color:
|
|
8
|
-
outgoing:
|
|
9
|
-
onClick:
|
|
10
|
-
className:
|
|
11
|
-
style:
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h } from "react";
|
|
3
|
+
import { Group as c, Badge as p, Text as g } from "@mantine/core";
|
|
4
|
+
import { getAuthorColor as x } from "../colors.js";
|
|
5
|
+
function f({
|
|
6
|
+
name: i,
|
|
7
|
+
color: m = 6,
|
|
8
|
+
outgoing: n,
|
|
9
|
+
onClick: r,
|
|
10
|
+
className: l,
|
|
11
|
+
style: t,
|
|
12
|
+
badge: e
|
|
12
13
|
}) {
|
|
13
|
-
const
|
|
14
|
-
() => ({ ...
|
|
15
|
-
[
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
n,
|
|
14
|
+
const o = n ? "var(--mantine-color-green-6)" : x(m), d = h(
|
|
15
|
+
() => ({ ...t, color: o, maxHeight: 38, cursor: r ? "pointer" : void 0 }),
|
|
16
|
+
[t, o, r]
|
|
17
|
+
), a = /* @__PURE__ */ s(
|
|
18
|
+
g,
|
|
19
19
|
{
|
|
20
20
|
size: "sm",
|
|
21
21
|
fw: 600,
|
|
22
22
|
truncate: !0,
|
|
23
|
-
className:
|
|
24
|
-
style:
|
|
25
|
-
mb: 4,
|
|
23
|
+
className: l,
|
|
24
|
+
style: d,
|
|
25
|
+
mb: e ? void 0 : 4,
|
|
26
26
|
"data-testid": "message-author",
|
|
27
|
-
"data-clickable":
|
|
28
|
-
onClick:
|
|
29
|
-
children:
|
|
27
|
+
"data-clickable": r ? !0 : void 0,
|
|
28
|
+
onClick: r,
|
|
29
|
+
children: i
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
+
return e ? /* @__PURE__ */ u(c, { gap: 6, wrap: "nowrap", mb: 4, style: { maxWidth: "100%" }, children: [
|
|
33
|
+
a,
|
|
34
|
+
/* @__PURE__ */ s(
|
|
35
|
+
p,
|
|
36
|
+
{
|
|
37
|
+
size: "xs",
|
|
38
|
+
variant: "light",
|
|
39
|
+
color: e.variant === "external" ? "orange" : "gray",
|
|
40
|
+
styles: { root: { flexShrink: 0 } },
|
|
41
|
+
"data-testid": "message-author-badge",
|
|
42
|
+
children: e.label
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }) : a;
|
|
32
46
|
}
|
|
33
|
-
|
|
47
|
+
f.displayName = "MessageAuthor";
|
|
34
48
|
export {
|
|
35
|
-
|
|
49
|
+
f as MessageAuthor
|
|
36
50
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_container_9s5zl_1", t = "_root_9s5zl_31", l = "_virtualRoot_9s5zl_51", s = "_virtualRow_9s5zl_95", _ = "_flowRow_9s5zl_109", c = "_highlightRow_9s5zl_121", n = "_scrollToBottomWrap_9s5zl_143", r = "_floatingTopAction_9s5zl_163", i = "_scrollToBottomBadge_9s5zl_193", a = {
|
|
2
2
|
container: o,
|
|
3
3
|
root: t,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
virtualRoot: l,
|
|
5
|
+
virtualRow: s,
|
|
6
|
+
flowRow: _,
|
|
7
|
+
highlightRow: c,
|
|
7
8
|
scrollToBottomWrap: n,
|
|
8
|
-
floatingTopAction:
|
|
9
|
-
scrollToBottomBadge:
|
|
9
|
+
floatingTopAction: r,
|
|
10
|
+
scrollToBottomBadge: i
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
13
|
o as container,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
a as default,
|
|
15
|
+
r as floatingTopAction,
|
|
16
|
+
_ as flowRow,
|
|
17
|
+
c as highlightRow,
|
|
16
18
|
t as root,
|
|
17
|
-
|
|
19
|
+
i as scrollToBottomBadge,
|
|
18
20
|
n as scrollToBottomWrap,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
l as virtualRoot,
|
|
22
|
+
s as virtualRow
|
|
21
23
|
};
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface MessageListProps {
|
|
3
|
-
|
|
2
|
+
export interface MessageListProps<T> {
|
|
3
|
+
/** Source items, oldest-first. */
|
|
4
|
+
items: T[];
|
|
5
|
+
renderItem: (item: T, index: number) => React.ReactNode;
|
|
6
|
+
getItemKey: (item: T, index: number) => string;
|
|
7
|
+
/** Estimated row height for the virtualized (older-history) path only. A
|
|
8
|
+
* function lets the host return a content-aware estimate per item. */
|
|
9
|
+
estimateItemSize?: number | ((item: T, index: number) => number);
|
|
4
10
|
className?: string;
|
|
5
11
|
style?: React.CSSProperties;
|
|
12
|
+
contentStyle?: React.CSSProperties;
|
|
6
13
|
stickToBottom?: boolean;
|
|
7
14
|
unreadCount?: number;
|
|
8
15
|
onStickChange?: (stuck: boolean) => void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Called when the user scrolls near the top — used to load an older page of
|
|
12
|
-
* history. Should resolve once the older messages have been prepended; the
|
|
13
|
-
* list preserves the visual scroll position across the prepend.
|
|
14
|
-
*/
|
|
16
|
+
/** Called when the user scrolls near the top — loads an older page; the list
|
|
17
|
+
* preserves the visual scroll position across the prepend. */
|
|
15
18
|
onReachTop?: () => void | Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Floating control pinned bottom-right, stacked ABOVE the scroll-to-bottom
|
|
18
|
-
* arrow (e.g. the "jump to mention" button). Shown independently of the
|
|
19
|
-
* arrow — it raises above the arrow when the arrow is visible, otherwise
|
|
20
|
-
* sits at the arrow's spot.
|
|
21
|
-
*/
|
|
22
19
|
floatingTopAction?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* Lift the floating controls (scroll-to-bottom arrow + floatingTopAction) up
|
|
25
|
-
* by this many px — so a composer that overlays the list bottom (frosted
|
|
26
|
-
* floating input) doesn't sit on top of them.
|
|
27
|
-
*/
|
|
28
20
|
bottomOffset?: number;
|
|
21
|
+
/** Empty space reserved below the last row so it clears a floating composer. */
|
|
22
|
+
contentBottomPad?: number;
|
|
29
23
|
}
|
|
30
24
|
export interface MessageListHandle {
|
|
31
|
-
/**
|
|
32
|
-
* Snap to the latest message and re-arm bottom-stick. Hosts call this when
|
|
33
|
-
* the local user sends a message so the view jumps to their just-sent
|
|
34
|
-
* content even if they had scrolled up — matching Telegram/Slack behavior.
|
|
35
|
-
*/
|
|
36
25
|
scrollToBottom: () => void;
|
|
26
|
+
scrollToKey: (key: string) => void;
|
|
37
27
|
}
|
|
38
|
-
export declare const MessageList:
|
|
28
|
+
export declare const MessageList: <T>(props: MessageListProps<T> & {
|
|
29
|
+
ref?: React.ForwardedRef<MessageListHandle>;
|
|
30
|
+
}) => React.ReactElement;
|
|
39
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,kCAAkC;IAClC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IACxD,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C;2EACuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;mEAC+D;IAC/D,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AA8UD,eAAO,MAAM,WAAW,EAAmC,CAAC,CAAC,EAC3D,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAAE,KACzE,KAAK,CAAC,YAAY,CAAC"}
|