@layers-app/shared 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  3. package/dist/components/AppContainer/AppContainer.js +72 -79
  4. package/dist/components/AppContainer/AppContainer.module.css.js +6 -6
  5. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  6. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
  7. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  8. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +46 -37
  9. package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/Header.js +6 -5
  11. package/dist/components/AppContainer/components/Main.js +4 -4
  12. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  13. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  14. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  15. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  16. package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  18. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +131 -121
  19. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  20. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  21. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainer.js +59 -56
  23. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  24. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
  25. package/dist/components/AppContainer/types.d.ts +1 -0
  26. package/dist/components/AppContainer/types.d.ts.map +1 -1
  27. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  28. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  29. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  30. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  31. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +37 -37
  32. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  33. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  34. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  35. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  36. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  37. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +84 -37
  38. package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
  39. package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
  40. package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
  41. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  42. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
  43. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  44. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
  45. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +7 -7
  46. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  47. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +138 -84
  48. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
  49. package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
  50. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  51. package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
  52. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
  53. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  54. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  55. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  56. package/dist/components/Chat/CallMessage/index.js +49 -0
  57. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  58. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  59. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  60. package/dist/components/Chat/ChatBubble/index.js +32 -0
  61. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  62. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  63. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  64. package/dist/components/Chat/ChatHeader/index.js +78 -0
  65. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +49 -0
  66. package/dist/components/Chat/ChatInput/index.d.ts +74 -0
  67. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  68. package/dist/components/Chat/ChatInput/index.js +288 -0
  69. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
  70. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
  71. package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
  72. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  73. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  74. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  75. package/dist/components/Chat/ChatLayout/index.js +43 -0
  76. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  77. package/dist/components/Chat/ChatMessage/index.d.ts +47 -0
  78. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  79. package/dist/components/Chat/ChatMessage/index.js +206 -0
  80. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  81. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  82. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  83. package/dist/components/Chat/ChatPill/index.js +21 -0
  84. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  85. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  86. package/dist/components/Chat/DayMeta/index.js +9 -0
  87. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  88. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  89. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  90. package/dist/components/Chat/DialogItem/index.js +107 -0
  91. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  92. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  93. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  94. package/dist/components/Chat/DialogList/index.js +19 -0
  95. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  96. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  97. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  98. package/dist/components/Chat/MediaDocument/index.js +73 -0
  99. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  100. package/dist/components/Chat/MessageActions/index.d.ts +23 -0
  101. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  102. package/dist/components/Chat/MessageActions/index.js +68 -0
  103. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  104. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  105. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  106. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  107. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  108. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  109. package/dist/components/Chat/MessageForward/index.js +30 -0
  110. package/dist/components/Chat/MessageList/MessageList.module.css.js +21 -0
  111. package/dist/components/Chat/MessageList/index.d.ts +39 -0
  112. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  113. package/dist/components/Chat/MessageList/index.js +159 -0
  114. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  115. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  116. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  117. package/dist/components/Chat/MessageMeta/index.js +33 -0
  118. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  119. package/dist/components/Chat/MessageReactions/index.d.ts +32 -0
  120. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  121. package/dist/components/Chat/MessageReactions/index.js +72 -0
  122. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  123. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  124. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  125. package/dist/components/Chat/MessageReply/index.js +40 -0
  126. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +11 -0
  127. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  128. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  129. package/dist/components/Chat/MessageStatus/index.js +68 -0
  130. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  131. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  132. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  133. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  134. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  135. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  136. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  137. package/dist/components/Chat/colors.d.ts +7 -0
  138. package/dist/components/Chat/colors.d.ts.map +1 -0
  139. package/dist/components/Chat/colors.js +30 -0
  140. package/dist/components/Chat/icons.d.ts +9 -0
  141. package/dist/components/Chat/icons.d.ts.map +1 -0
  142. package/dist/components/Chat/icons.js +49 -0
  143. package/dist/components/Chat/index.d.ts +24 -0
  144. package/dist/components/Chat/index.d.ts.map +1 -0
  145. package/dist/components/Chat/mock-data.d.ts +32 -0
  146. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  147. package/dist/components/Chat/types.d.ts +159 -0
  148. package/dist/components/Chat/types.d.ts.map +1 -0
  149. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
  150. package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
  151. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  152. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  153. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  154. package/dist/components/ColorPicker/ColorPickerList.js +81 -68
  155. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  156. package/dist/components/ColorPicker/ColorPickerToolbar.js +75 -70
  157. package/dist/components/ColorPicker/icons.js +5 -5
  158. package/dist/components/ColorPicker/types.d.ts +6 -0
  159. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  160. package/dist/components/ColorPicker/types.js +53 -11
  161. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  162. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  163. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  164. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  165. package/dist/components/CommentComposer/types.js +9 -0
  166. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  167. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  168. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  169. package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -1
  170. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  171. package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
  172. package/dist/components/EmojiPicker/EmojiPicker.d.ts +23 -1
  173. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  174. package/dist/components/EmojiPicker/EmojiPicker.js +126 -88
  175. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  176. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  177. package/dist/components/EmojiPicker/IconsPanel.js +28 -25
  178. package/dist/components/EntityIcon.d.ts +1 -0
  179. package/dist/components/EntityIcon.d.ts.map +1 -1
  180. package/dist/components/EntityIcon.js +90 -33
  181. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  182. package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
  183. package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
  184. package/dist/components/ErrorPage/components/Error403.js +25 -21
  185. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  186. package/dist/components/ErrorPage/index.d.ts +5 -1
  187. package/dist/components/ErrorPage/index.d.ts.map +1 -1
  188. package/dist/components/ErrorPage/index.js +17 -10
  189. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  190. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  191. package/dist/components/FilePicker/FilePicker.js +135 -161
  192. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  193. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  194. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  195. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  196. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  197. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  198. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  199. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  200. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  201. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  202. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  203. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  204. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  205. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  206. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  207. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  208. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  209. package/dist/components/Loaders/styles.module.css.js +6 -6
  210. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  211. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  212. package/dist/components/MusicPlayerBar/components/HoverActions.js +28 -28
  213. package/dist/components/NavMenu/NavMenu.d.ts +7 -1
  214. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  215. package/dist/components/NavMenu/NavMenu.js +54 -44
  216. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  217. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  218. package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
  219. package/dist/components/NavMenu/types.d.ts +4 -0
  220. package/dist/components/NavMenu/types.d.ts.map +1 -1
  221. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  222. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  223. package/dist/components/Notification/Notification.module.css.js +1 -1
  224. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  225. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  226. package/dist/components/PillTabs/PillTabs.js +50 -0
  227. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  228. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  229. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  230. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  231. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  232. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  233. package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
  234. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  235. package/dist/components/table/FrontTable.d.ts.map +1 -1
  236. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  237. package/dist/config/envConfig.d.ts +2 -0
  238. package/dist/config/envConfig.d.ts.map +1 -1
  239. package/dist/config/envConfig.js +41 -37
  240. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  241. package/dist/helpers/showNotifications.d.ts +15 -0
  242. package/dist/helpers/showNotifications.d.ts.map +1 -1
  243. package/dist/helpers/showNotifications.js +114 -72
  244. package/dist/helpers/showNotifications.module.css.js +16 -4
  245. package/dist/hooks/useUiPref.d.ts +2 -0
  246. package/dist/hooks/useUiPref.d.ts.map +1 -0
  247. package/dist/hooks/useUiPref.js +80 -0
  248. package/dist/index.css +1 -1
  249. package/dist/index.d.ts +4 -0
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +588 -527
  252. package/dist/lang/locales/ui_en.json.js +5 -5
  253. package/dist/lang/locales/ui_es.json.js +1 -1
  254. package/dist/lang/locales/ui_ru.json.js +1 -1
  255. package/docs/README.md +499 -499
  256. package/package.json +78 -75
@@ -0,0 +1,68 @@
1
+ import { jsx as e, jsxs as n, Fragment as b } from "react/jsx-runtime";
2
+ import w, { useState as v } from "react";
3
+ import { Group as y, ActionIcon as d, Menu as i } from "@mantine/core";
4
+ import { SmileIcon as j, LinkBackwardIcon as A, MoreVerticalIcon as x, Copy01Icon as B, Share08Icon as P, PinIcon as $, Edit02Icon as E, Delete02Icon as O } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as o } from "@hugeicons/react";
6
+ import { EmojiPicker as _ } from "../../EmojiPicker/EmojiPicker.js";
7
+ import { IconEntity as D } from "../../ProjectIcon/ProjectIcon.js";
8
+ import G from "./MessageActions.module.css.js";
9
+ const H = w.memo(function({
10
+ onReaction: t,
11
+ canAddReaction: I = !0,
12
+ onReply: m,
13
+ onEdit: r,
14
+ onDelete: c,
15
+ onCopy: s,
16
+ onForward: a,
17
+ onPin: l,
18
+ showEdit: h,
19
+ showDelete: p,
20
+ className: u,
21
+ style: g
22
+ }) {
23
+ const [z, k] = v(!1), S = !!(r || c || s || a || l || h || p), C = (f) => {
24
+ if (!t) return;
25
+ const M = D.parse(f);
26
+ t(M?.emoji ?? f);
27
+ };
28
+ return /* @__PURE__ */ e(
29
+ "div",
30
+ {
31
+ className: `${G.root}${u ? ` ${u}` : ""}`,
32
+ style: g,
33
+ "data-testid": "message-actions",
34
+ children: /* @__PURE__ */ n(y, { gap: 2, wrap: "nowrap", children: [
35
+ t && I && /* @__PURE__ */ e(
36
+ _,
37
+ {
38
+ onChange: C,
39
+ position: "top-start",
40
+ showRemoveButton: !1,
41
+ showIcons: !1,
42
+ showRandomButton: !1,
43
+ withinPortal: !0,
44
+ children: /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, "aria-label": "Add reaction", children: /* @__PURE__ */ e(o, { icon: j, size: 16 }) })
45
+ }
46
+ ),
47
+ m && /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, onClick: m, "aria-label": "Reply", children: /* @__PURE__ */ e(o, { icon: A, size: 16 }) }),
48
+ S && /* @__PURE__ */ n(i, { position: "bottom-end", withinPortal: !0, shadow: "md", width: 200, opened: z, onChange: k, children: [
49
+ /* @__PURE__ */ e(i.Target, { children: /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, "aria-label": "More actions", children: /* @__PURE__ */ e(o, { icon: x, size: 16 }) }) }),
50
+ /* @__PURE__ */ n(i.Dropdown, { children: [
51
+ s && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: B, size: 16 }), onClick: s, children: "Copy" }),
52
+ a && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: P, size: 16 }), onClick: a, children: "Forward" }),
53
+ l && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: $, size: 16 }), onClick: l, children: "Pin" }),
54
+ (h || r) && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: E, size: 16 }), onClick: r, children: "Edit" }),
55
+ (p || c) && /* @__PURE__ */ n(b, { children: [
56
+ /* @__PURE__ */ e(i.Divider, {}),
57
+ /* @__PURE__ */ e(i.Item, { color: "red", leftSection: /* @__PURE__ */ e(o, { icon: O, size: 16 }), onClick: c, children: "Delete" })
58
+ ] })
59
+ ] })
60
+ ] })
61
+ ] })
62
+ }
63
+ );
64
+ });
65
+ H.displayName = "MessageActions";
66
+ export {
67
+ H as MessageActions
68
+ };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface MessageAuthorProps {
3
+ /** Author display name */
4
+ name: string;
5
+ /** Author color index 1-7 */
6
+ color?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
7
+ /** Outgoing message uses green palette */
8
+ outgoing?: boolean;
9
+ /** Click handler */
10
+ onClick?: () => void;
11
+ /** Additional className */
12
+ className?: string;
13
+ /** Custom style */
14
+ style?: React.CSSProperties;
15
+ }
16
+ export declare function MessageAuthor({ name, color, outgoing, onClick, className, style, }: MessageAuthorProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare namespace MessageAuthor {
18
+ var displayName: string;
19
+ }
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;CAC7B;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,kBAAkB,2CAyBpB;yBAhCe,aAAa"}
@@ -0,0 +1,36 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useMemo as d } from "react";
3
+ import { Text as n } from "@mantine/core";
4
+ import { getAuthorColor as c } from "../colors.js";
5
+ function l({
6
+ name: o,
7
+ color: s = 6,
8
+ outgoing: a,
9
+ onClick: e,
10
+ className: m,
11
+ style: r
12
+ }) {
13
+ const t = a ? "var(--mantine-color-green-6)" : c(s), i = d(
14
+ () => ({ ...r, color: t, maxHeight: 38, cursor: e ? "pointer" : void 0 }),
15
+ [r, t, e]
16
+ );
17
+ return /* @__PURE__ */ u(
18
+ n,
19
+ {
20
+ size: "sm",
21
+ fw: 600,
22
+ truncate: !0,
23
+ className: m,
24
+ style: i,
25
+ mb: 4,
26
+ "data-testid": "message-author",
27
+ "data-clickable": e ? !0 : void 0,
28
+ onClick: e,
29
+ children: o
30
+ }
31
+ );
32
+ }
33
+ l.displayName = "MessageAuthor";
34
+ export {
35
+ l as MessageAuthor
36
+ };
@@ -0,0 +1,7 @@
1
+ const o = "_root_mla0n_1", t = {
2
+ root: o
3
+ };
4
+ export {
5
+ t as default,
6
+ o as root
7
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface MessageForwardProps {
3
+ from: string;
4
+ outgoing?: boolean;
5
+ onClick?: () => void;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ }
9
+ export declare function MessageForward({ from, outgoing, onClick, className, style, }: MessageForwardProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare namespace MessageForward {
11
+ var displayName: string;
12
+ }
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageForward/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,2CAcrB;yBApBe,cAAc"}
@@ -0,0 +1,30 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { Text as e } from "@mantine/core";
3
+ import m from "./MessageForward.module.css.js";
4
+ function n({
5
+ from: o,
6
+ outgoing: s,
7
+ onClick: r,
8
+ className: a,
9
+ style: d
10
+ }) {
11
+ return /* @__PURE__ */ i(
12
+ e,
13
+ {
14
+ size: "sm",
15
+ truncate: !0,
16
+ className: `${m.root} ${a || ""}`,
17
+ style: d,
18
+ "data-outgoing": s || void 0,
19
+ "data-testid": "message-forward",
20
+ children: [
21
+ /* @__PURE__ */ t(e, { span: !0, children: "Forwarded from " }),
22
+ /* @__PURE__ */ t(e, { span: !0, fw: 500, style: { cursor: r ? "pointer" : void 0 }, onClick: r, tabIndex: r ? 0 : void 0, role: r ? "button" : void 0, children: o })
23
+ ]
24
+ }
25
+ );
26
+ }
27
+ n.displayName = "MessageForward";
28
+ export {
29
+ n as MessageForward
30
+ };
@@ -0,0 +1,21 @@
1
+ const o = "_container_r29um_1", t = "_root_r29um_31", r = "_wrapper_r29um_45", _ = "_top_r29um_55", c = "_items_r29um_55", n = "_scrollToBottomWrap_r29um_99", s = "_floatingTopAction_r29um_119", a = "_scrollToBottomBadge_r29um_149", l = {
2
+ container: o,
3
+ root: t,
4
+ wrapper: r,
5
+ top: _,
6
+ items: c,
7
+ scrollToBottomWrap: n,
8
+ floatingTopAction: s,
9
+ scrollToBottomBadge: a
10
+ };
11
+ export {
12
+ o as container,
13
+ l as default,
14
+ s as floatingTopAction,
15
+ c as items,
16
+ t as root,
17
+ a as scrollToBottomBadge,
18
+ n as scrollToBottomWrap,
19
+ _ as top,
20
+ r as wrapper
21
+ };
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ export interface MessageListProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ stickToBottom?: boolean;
7
+ unreadCount?: number;
8
+ onStickChange?: (stuck: boolean) => void;
9
+ resetKey?: string | null;
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
+ */
15
+ 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
+ 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
+ bottomOffset?: number;
29
+ }
30
+ 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
+ scrollToBottom: () => void;
37
+ }
38
+ export declare const MessageList: React.ForwardRefExoticComponent<MessageListProps & React.RefAttributes<MessageListHandle>>;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,4FAoOvB,CAAC"}
@@ -0,0 +1,159 @@
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);
64
+ };
65
+ requestAnimationFrame(() => {
66
+ o(), requestAnimationFrame(o);
67
+ });
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(
117
+ "div",
118
+ {
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 })
139
+ }
140
+ ),
141
+ j && /* @__PURE__ */ l("span", { className: s.scrollToBottomBadge, children: O })
142
+ ] }),
143
+ N && /* @__PURE__ */ l(
144
+ "div",
145
+ {
146
+ className: s.floatingTopAction,
147
+ "data-raised": A || void 0,
148
+ children: N
149
+ }
150
+ )
151
+ ]
152
+ }
153
+ );
154
+ }
155
+ );
156
+ Q.displayName = "MessageList";
157
+ export {
158
+ Q as MessageList
159
+ };
@@ -0,0 +1,13 @@
1
+ const t = "_root_q0fbi_1", e = "_time_q0fbi_61", i = "_edited_q0fbi_69", o = "_views_q0fbi_77", _ = {
2
+ root: t,
3
+ time: e,
4
+ edited: i,
5
+ views: o
6
+ };
7
+ export {
8
+ _ as default,
9
+ i as edited,
10
+ t as root,
11
+ e as time,
12
+ o as views
13
+ };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface MessageMetaProps {
3
+ time: string;
4
+ edited?: boolean;
5
+ views?: number;
6
+ outgoing?: boolean;
7
+ inReactions?: boolean;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+ export declare function MessageMeta({ time, edited, views, outgoing, inReactions, children, className, style, }: MessageMetaProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare namespace MessageMeta {
14
+ var displayName: string;
15
+ }
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,33 @@
1
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
+ import e from "./MessageMeta.module.css.js";
3
+ function l({
4
+ time: t,
5
+ edited: i,
6
+ views: s,
7
+ outgoing: d,
8
+ inReactions: o,
9
+ children: n,
10
+ className: r,
11
+ style: m
12
+ }) {
13
+ return /* @__PURE__ */ c(
14
+ "div",
15
+ {
16
+ className: `${e.root} ${r || ""}`,
17
+ style: m,
18
+ "data-outgoing": d || void 0,
19
+ "data-in-reactions": o || void 0,
20
+ "data-testid": "message-meta",
21
+ 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
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ l.displayName = "MessageMeta";
31
+ export {
32
+ l as MessageMeta
33
+ };
@@ -0,0 +1,15 @@
1
+ const t = "_row_mtm4b_1", m = "_pill_mtm4b_19", o = "_emoji_mtm4b_99", _ = "_count_mtm4b_141", c = "_meta_mtm4b_185", e = {
2
+ row: t,
3
+ pill: m,
4
+ emoji: o,
5
+ count: _,
6
+ meta: c
7
+ };
8
+ export {
9
+ _ as count,
10
+ e as default,
11
+ o as emoji,
12
+ c as meta,
13
+ m as pill,
14
+ t as row
15
+ };
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ /**
3
+ * Max number of *distinct* emoji a single message can carry. Once reached, the
4
+ * add-reaction picker is hidden (you can still join one of the existing ones by
5
+ * clicking its pill). Mirrors the server cap so the UI and backend agree.
6
+ */
7
+ export declare const MAX_MESSAGE_REACTIONS = 5;
8
+ export interface ReactionReactor {
9
+ id: string;
10
+ name: string;
11
+ avatarUrl?: string;
12
+ }
13
+ export interface Reaction {
14
+ emoji: string;
15
+ count: number;
16
+ active?: boolean;
17
+ /**
18
+ * Who left this reaction (resolved to name + avatar by the host). Drives the
19
+ * who-reacted hover popover. Optional — when absent, the pill is a plain
20
+ * toggle with no popover.
21
+ */
22
+ reactors?: ReactionReactor[];
23
+ }
24
+ export interface MessageReactionsProps {
25
+ reactions: Reaction[];
26
+ onToggle?: (emoji: string) => void;
27
+ meta?: React.ReactNode;
28
+ className?: string;
29
+ style?: React.CSSProperties;
30
+ }
31
+ export declare const MessageReactions: React.NamedExoticComponent<MessageReactionsProps>;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageReactions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,mDA0E3B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { jsxs as r, jsx as a } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { HoverCard as n, ScrollArea as h, Stack as u, Group as f, Text as g } from "@mantine/core";
4
+ import { UserAvatar as v } from "../../UserAvatar/index.js";
5
+ import t from "./MessageReactions.module.css.js";
6
+ const R = 5, w = m.memo(function({
7
+ reactions: s,
8
+ onToggle: d,
9
+ meta: o,
10
+ className: l,
11
+ style: p
12
+ }) {
13
+ return !s.length && !o ? null : /* @__PURE__ */ r(
14
+ "div",
15
+ {
16
+ className: `${t.row}${l ? ` ${l}` : ""}`,
17
+ style: p,
18
+ "data-testid": "message-reactions",
19
+ children: [
20
+ s.map((e) => {
21
+ const c = /* @__PURE__ */ r(
22
+ "button",
23
+ {
24
+ className: t.pill,
25
+ "data-active": e.active || void 0,
26
+ onClick: () => d?.(e.emoji),
27
+ type: "button",
28
+ "aria-pressed": e.active ?? !1,
29
+ "aria-label": `${e.emoji} ${e.count}`,
30
+ children: [
31
+ /* @__PURE__ */ a("span", { className: t.emoji, children: e.emoji }, e.count),
32
+ /* @__PURE__ */ a("span", { className: t.count, children: e.count })
33
+ ]
34
+ }
35
+ );
36
+ return e.reactors?.length ? /* @__PURE__ */ r(
37
+ n,
38
+ {
39
+ withArrow: !0,
40
+ openDelay: 250,
41
+ closeDelay: 100,
42
+ position: "top",
43
+ shadow: "md",
44
+ withinPortal: !0,
45
+ children: [
46
+ /* @__PURE__ */ a(n.Target, { children: c }),
47
+ /* @__PURE__ */ a(n.Dropdown, { p: "xs", children: /* @__PURE__ */ a(h.Autosize, { mah: 220, type: "auto", children: /* @__PURE__ */ a(u, { gap: 6, pr: 6, children: e.reactors.map((i) => /* @__PURE__ */ r(f, { gap: 8, wrap: "nowrap", miw: 0, children: [
48
+ /* @__PURE__ */ a(
49
+ v,
50
+ {
51
+ user: { id: i.id, name: i.name, avatarUrl: i.avatarUrl },
52
+ size: 20,
53
+ radius: "xl"
54
+ }
55
+ ),
56
+ /* @__PURE__ */ a(g, { size: "sm", lineClamp: 1, maw: 200, children: i.name })
57
+ ] }, i.id)) }) }) })
58
+ ]
59
+ },
60
+ e.emoji
61
+ ) : /* @__PURE__ */ a(m.Fragment, { children: c }, e.emoji);
62
+ }),
63
+ o && /* @__PURE__ */ a("div", { className: t.meta, children: o })
64
+ ]
65
+ }
66
+ );
67
+ });
68
+ w.displayName = "MessageReactions";
69
+ export {
70
+ R as MAX_MESSAGE_REACTIONS,
71
+ w as MessageReactions
72
+ };
@@ -0,0 +1,15 @@
1
+ const t = "_root_13gux_21", o = "_border_13gux_15", e = "_content_13gux_67", _ = "_title_13gux_85", n = "_subtitle_13gux_109", s = {
2
+ root: t,
3
+ border: o,
4
+ content: e,
5
+ title: _,
6
+ subtitle: n
7
+ };
8
+ export {
9
+ o as border,
10
+ e as content,
11
+ s as default,
12
+ t as root,
13
+ n as subtitle,
14
+ _ as title
15
+ };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface MessageReplyProps {
3
+ title: string;
4
+ subtitle: React.ReactNode;
5
+ color?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
6
+ outgoing?: boolean;
7
+ onClick?: () => void;
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ }
11
+ export declare function MessageReply({ title, subtitle, color, outgoing, onClick, className, style, }: MessageReplyProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace MessageReply {
13
+ var displayName: string;
14
+ }
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageReply/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,iBAAiB,2CA2BnB;yBAnCe,YAAY"}