@layers-app/shared 0.4.4 → 0.4.5

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 (176) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  3. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  4. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  5. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  6. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  7. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  8. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  9. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  10. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  11. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  12. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  13. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  14. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
  15. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +7 -7
  16. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  17. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
  18. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
  19. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
  20. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  21. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  22. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  23. package/dist/components/Chat/CallMessage/index.js +49 -0
  24. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  25. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  26. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  27. package/dist/components/Chat/ChatBubble/index.js +32 -0
  28. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  29. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  30. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  31. package/dist/components/Chat/ChatHeader/index.js +78 -0
  32. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
  33. package/dist/components/Chat/ChatInput/index.d.ts +46 -0
  34. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  35. package/dist/components/Chat/ChatInput/index.js +228 -0
  36. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  37. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  38. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  39. package/dist/components/Chat/ChatLayout/index.js +43 -0
  40. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  41. package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
  42. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  43. package/dist/components/Chat/ChatMessage/index.js +188 -0
  44. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  45. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  46. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  47. package/dist/components/Chat/ChatPill/index.js +21 -0
  48. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  49. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  50. package/dist/components/Chat/DayMeta/index.js +9 -0
  51. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  52. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  53. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  54. package/dist/components/Chat/DialogItem/index.js +107 -0
  55. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  56. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  57. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  58. package/dist/components/Chat/DialogList/index.js +19 -0
  59. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  60. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  61. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  62. package/dist/components/Chat/MediaDocument/index.js +73 -0
  63. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  64. package/dist/components/Chat/MessageActions/index.d.ts +16 -0
  65. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  66. package/dist/components/Chat/MessageActions/index.js +65 -0
  67. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  68. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  69. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  70. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  71. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  72. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  73. package/dist/components/Chat/MessageForward/index.js +30 -0
  74. package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
  75. package/dist/components/Chat/MessageList/index.d.ts +12 -0
  76. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  77. package/dist/components/Chat/MessageList/index.js +71 -0
  78. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  79. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  80. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  81. package/dist/components/Chat/MessageMeta/index.js +33 -0
  82. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  83. package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
  84. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  85. package/dist/components/Chat/MessageReactions/index.js +40 -0
  86. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  87. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  88. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  89. package/dist/components/Chat/MessageReply/index.js +40 -0
  90. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
  91. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  92. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  93. package/dist/components/Chat/MessageStatus/index.js +53 -0
  94. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  95. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  96. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  97. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  98. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  99. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  100. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  101. package/dist/components/Chat/colors.d.ts +7 -0
  102. package/dist/components/Chat/colors.d.ts.map +1 -0
  103. package/dist/components/Chat/colors.js +30 -0
  104. package/dist/components/Chat/icons.d.ts +9 -0
  105. package/dist/components/Chat/icons.d.ts.map +1 -0
  106. package/dist/components/Chat/icons.js +49 -0
  107. package/dist/components/Chat/index.d.ts +24 -0
  108. package/dist/components/Chat/index.d.ts.map +1 -0
  109. package/dist/components/Chat/mock-data.d.ts +32 -0
  110. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  111. package/dist/components/Chat/types.d.ts +159 -0
  112. package/dist/components/Chat/types.d.ts.map +1 -0
  113. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  114. package/dist/components/ColorPicker/ColorPicker.module.css.js +24 -24
  115. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  116. package/dist/components/CommentComposer/types.js +9 -0
  117. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  118. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  119. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  120. package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
  121. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  122. package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
  123. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  124. package/dist/components/EntityIcon.d.ts.map +1 -1
  125. package/dist/components/EntityIcon.js +36 -27
  126. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  127. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  128. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  129. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  130. package/dist/components/FilePicker/FilePicker.js +135 -161
  131. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  132. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  133. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  134. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  135. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  136. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  137. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  138. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  139. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  140. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  141. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  142. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  143. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  144. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  145. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  146. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  147. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  148. package/dist/components/Loaders/styles.module.css.js +6 -6
  149. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  150. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  151. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  152. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  153. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  154. package/dist/components/Notification/Notification.module.css.js +1 -1
  155. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  156. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  157. package/dist/components/PillTabs/PillTabs.js +50 -0
  158. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  159. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  160. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  161. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  162. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  163. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  164. package/dist/components/table/FrontTable.d.ts.map +1 -1
  165. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  166. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  167. package/dist/helpers/showNotifications.module.css.js +1 -1
  168. package/dist/index.css +1 -1
  169. package/dist/index.d.ts +3 -0
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +573 -522
  172. package/dist/lang/locales/ui_en.json.js +5 -5
  173. package/dist/lang/locales/ui_es.json.js +1 -1
  174. package/dist/lang/locales/ui_ru.json.js +1 -1
  175. package/docs/README.md +499 -499
  176. package/package.json +78 -75
@@ -0,0 +1,228 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import { useState as J, useRef as N, useEffect as y, useCallback as m } from "react";
3
+ import { Edit04Icon as M, LinkBackwardIcon as Q, Image01Icon as T, PlayIcon as W, File01Icon as X, SmileIcon as Y, Attachment02Icon as Z, Sent02Icon as _ } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as l } from "@hugeicons/react";
5
+ import { Box as ee, CloseButton as j, ActionIcon as I, Textarea as ae } from "@mantine/core";
6
+ import { AttachmentsPreview as te } from "../../AttachmentsPreview/AttachmentsPreview.js";
7
+ import { EmojiPicker as ne } from "../../EmojiPicker/EmojiPicker.js";
8
+ import { IconEntity as ie } from "../../ProjectIcon/ProjectIcon.js";
9
+ import t from "./ChatInput.module.css.js";
10
+ function se({
11
+ value: g,
12
+ onChange: C,
13
+ onSend: z,
14
+ onAttach: k,
15
+ onEmojiSelect: u,
16
+ placeholder: K = "Add a message...",
17
+ replyTo: n,
18
+ editing: o,
19
+ attachments: i,
20
+ onRemoveAttachment: S,
21
+ maxLength: $,
22
+ disabled: w,
23
+ disableAttachments: B,
24
+ className: D,
25
+ style: F
26
+ }) {
27
+ const f = g !== void 0, [H, P] = J(""), c = f ? g : H, h = N(null), v = N(null), b = N(i?.length ?? 0);
28
+ y(() => {
29
+ const e = i?.length ?? 0;
30
+ e > b.current && v.current?.focus(), b.current = e;
31
+ }, [i?.length]);
32
+ const R = !!n, A = !!o;
33
+ y(() => {
34
+ (R || A) && v.current?.focus();
35
+ }, [R, A]);
36
+ const d = m(
37
+ (e) => {
38
+ f || P(e), C?.(e);
39
+ },
40
+ [f, C]
41
+ ), p = m(() => {
42
+ const e = c.trim();
43
+ (e || i && i.length > 0) && (z?.(e), d(""));
44
+ }, [c, i, z, d]), V = m(
45
+ (e) => {
46
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), p());
47
+ },
48
+ [p]
49
+ ), L = m(
50
+ (e) => {
51
+ const r = ie.parse(e)?.emoji ?? e;
52
+ u ? u(r) : d(c + r);
53
+ },
54
+ [u, d, c]
55
+ ), O = m(
56
+ (e) => {
57
+ const r = e.target.files;
58
+ r && r.length > 0 && k?.(Array.from(r)), h.current && (h.current.value = "");
59
+ },
60
+ [k]
61
+ ), U = c.trim().length > 0, x = i && i.length > 0, E = x && i.some((e) => "isTemp" in e && e.isTemp), q = U || x && !E, G = !!(o || n);
62
+ return /* @__PURE__ */ s(
63
+ ee,
64
+ {
65
+ className: `${t.root} ${D || ""}`,
66
+ style: F,
67
+ "data-testid": "chat-input",
68
+ px: "md",
69
+ pb: "md",
70
+ children: [
71
+ !B && /* @__PURE__ */ a(
72
+ "input",
73
+ {
74
+ ref: h,
75
+ type: "file",
76
+ multiple: !0,
77
+ accept: "*/*",
78
+ className: t.hiddenFileInput,
79
+ onChange: O,
80
+ tabIndex: -1
81
+ }
82
+ ),
83
+ /* @__PURE__ */ s("div", { className: t.inputRow, children: [
84
+ /* @__PURE__ */ s(
85
+ "div",
86
+ {
87
+ className: `${t.inputBox} ${G ? t.withHeader : ""}`,
88
+ children: [
89
+ o ? /* @__PURE__ */ s("div", { className: t.header, children: [
90
+ /* @__PURE__ */ a("div", { className: t.headerIcon, children: /* @__PURE__ */ a(l, { icon: M, size: 20 }) }),
91
+ /* @__PURE__ */ s("div", { className: t.headerBar, "data-variant": "edit", children: [
92
+ /* @__PURE__ */ a("div", { className: t.headerTitle, "data-variant": "edit", children: "Edit" }),
93
+ /* @__PURE__ */ a("div", { className: t.headerText, children: o.text })
94
+ ] }),
95
+ /* @__PURE__ */ a(
96
+ j,
97
+ {
98
+ size: "sm",
99
+ onClick: o.onCancel,
100
+ "aria-label": "Close"
101
+ }
102
+ )
103
+ ] }) : n ? /* @__PURE__ */ s("div", { className: t.header, children: [
104
+ /* @__PURE__ */ a("div", { className: t.headerIcon, children: /* @__PURE__ */ a(l, { icon: Q, size: 20 }) }),
105
+ /* @__PURE__ */ s("div", { className: t.headerBar, "data-variant": "reply", children: [
106
+ /* @__PURE__ */ a("div", { className: t.headerTitle, "data-variant": "reply", children: n.senderName }),
107
+ /* @__PURE__ */ a("div", { className: t.headerText, children: (() => {
108
+ if (n.text && n.text.trim().length > 0) return n.text;
109
+ if (n.attachmentName) {
110
+ const r = n.attachmentKind === "image" ? T : n.attachmentKind === "video" ? W : X;
111
+ return /* @__PURE__ */ s("span", { className: t.headerAttachment, children: [
112
+ /* @__PURE__ */ a(l, { icon: r, size: 14 }),
113
+ /* @__PURE__ */ a("span", { children: n.attachmentName })
114
+ ] });
115
+ }
116
+ return "";
117
+ })() })
118
+ ] }),
119
+ /* @__PURE__ */ a(
120
+ j,
121
+ {
122
+ size: "sm",
123
+ onClick: n.onCancel,
124
+ "aria-label": "Close"
125
+ }
126
+ )
127
+ ] }) : null,
128
+ x && /* @__PURE__ */ a("div", { className: t.attachments, children: /* @__PURE__ */ a(
129
+ te,
130
+ {
131
+ files: i,
132
+ mode: "draft",
133
+ onRemove: S
134
+ }
135
+ ) }),
136
+ /* @__PURE__ */ s("div", { className: t.inputArea, children: [
137
+ /* @__PURE__ */ a(
138
+ ne,
139
+ {
140
+ onChange: L,
141
+ showIcons: !1,
142
+ showRemoveButton: !1,
143
+ position: "top-start",
144
+ closeOnSelect: !1,
145
+ children: /* @__PURE__ */ a(
146
+ I,
147
+ {
148
+ variant: "subtle",
149
+ radius: "xl",
150
+ size: 34,
151
+ color: "gray",
152
+ className: t.iconButton,
153
+ "aria-label": "Emoji",
154
+ children: /* @__PURE__ */ a(l, { icon: Y, size: 24 })
155
+ }
156
+ )
157
+ }
158
+ ),
159
+ /* @__PURE__ */ a(
160
+ ae,
161
+ {
162
+ ref: v,
163
+ classNames: {
164
+ root: t.textarea,
165
+ input: t.textareaInput
166
+ },
167
+ w: "100%",
168
+ flex: 1,
169
+ value: c,
170
+ onChange: (e) => d(e.currentTarget.value),
171
+ onKeyDown: V,
172
+ placeholder: K,
173
+ autosize: !0,
174
+ minRows: 1,
175
+ maxRows: 6,
176
+ disabled: w,
177
+ variant: "unstyled",
178
+ maxLength: $
179
+ }
180
+ ),
181
+ !B && /* @__PURE__ */ a(
182
+ I,
183
+ {
184
+ variant: "subtle",
185
+ radius: "xl",
186
+ size: 34,
187
+ color: "gray",
188
+ className: t.iconButton,
189
+ "aria-label": "Attach file",
190
+ onClick: () => h.current?.click(),
191
+ children: /* @__PURE__ */ a(
192
+ l,
193
+ {
194
+ icon: Z,
195
+ size: 24,
196
+ style: { transform: "rotate(30deg)" }
197
+ }
198
+ )
199
+ }
200
+ )
201
+ ] })
202
+ ]
203
+ }
204
+ ),
205
+ /* @__PURE__ */ a(
206
+ I,
207
+ {
208
+ className: t.sendButton,
209
+ variant: "filled",
210
+ color: "indigo",
211
+ radius: 12,
212
+ size: 50,
213
+ onClick: p,
214
+ disabled: w || !q,
215
+ loading: E,
216
+ "aria-label": "Send message",
217
+ children: /* @__PURE__ */ a(l, { icon: _, size: 24 })
218
+ }
219
+ )
220
+ ] })
221
+ ]
222
+ }
223
+ );
224
+ }
225
+ se.displayName = "ChatInput";
226
+ export {
227
+ se as ChatInput
228
+ };
@@ -0,0 +1,15 @@
1
+ const o = "_root_uj82d_1", d = "_sidebar_uj82d_23", t = "_chat_uj82d_45", _ = "_info_uj82d_67", r = "_drawerBody_uj82d_87", s = {
2
+ root: o,
3
+ sidebar: d,
4
+ chat: t,
5
+ info: _,
6
+ drawerBody: r
7
+ };
8
+ export {
9
+ t as chat,
10
+ s as default,
11
+ r as drawerBody,
12
+ _ as info,
13
+ o as root,
14
+ d as sidebar
15
+ };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface ChatLayoutProps {
3
+ sidebar: React.ReactNode;
4
+ chat: React.ReactNode;
5
+ info?: React.ReactNode;
6
+ showInfo?: boolean;
7
+ sidebarOpened?: boolean;
8
+ onSidebarClose?: () => void;
9
+ maxWidth?: number;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ }
13
+ export declare function ChatLayout({ sidebar, chat, info, showInfo, sidebarOpened, onSidebarClose, maxWidth, className, style, }: ChatLayoutProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare namespace ChatLayout {
15
+ var displayName: string;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ChatLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,QAAe,EACf,SAAS,EACT,KAAK,GACN,EAAE,eAAe,2CAuBjB;yBAjCe,UAAU"}
@@ -0,0 +1,43 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { Drawer as h } from "@mantine/core";
3
+ import a from "./ChatLayout.module.css.js";
4
+ function p({
5
+ sidebar: o,
6
+ chat: r,
7
+ info: s,
8
+ showInfo: i,
9
+ sidebarOpened: d,
10
+ onSidebarClose: l,
11
+ maxWidth: c = 1680,
12
+ className: t,
13
+ style: m
14
+ }) {
15
+ return /* @__PURE__ */ n(
16
+ "div",
17
+ {
18
+ className: `${a.root}${t ? ` ${t}` : ""}`,
19
+ style: { ...m, "--chat-layout-max-width": `${c}px` },
20
+ children: [
21
+ /* @__PURE__ */ e("div", { className: a.sidebar, children: o }),
22
+ /* @__PURE__ */ e(
23
+ h,
24
+ {
25
+ opened: !!d,
26
+ onClose: () => l?.(),
27
+ size: 320,
28
+ withCloseButton: !1,
29
+ padding: 0,
30
+ classNames: { body: a.drawerBody },
31
+ children: o
32
+ }
33
+ ),
34
+ /* @__PURE__ */ e("div", { className: a.chat, children: r }),
35
+ i && s && /* @__PURE__ */ e("div", { className: a.info, children: s })
36
+ ]
37
+ }
38
+ );
39
+ }
40
+ p.displayName = "ChatLayout";
41
+ export {
42
+ p as ChatLayout
43
+ };
@@ -0,0 +1,21 @@
1
+ const t = "_wrapper_4i762_1", a = "_avatar_4i762_69", e = "_spacer_4i762_83", s = "_content_4i762_97", n = "_attachmentsWrap_4i762_143", _ = "_mediaOnlyMeta_4i762_203", o = "_messageRow_4i762_245", c = "_hoverActions_4i762_255", r = {
2
+ wrapper: t,
3
+ avatar: a,
4
+ spacer: e,
5
+ content: s,
6
+ attachmentsWrap: n,
7
+ mediaOnlyMeta: _,
8
+ messageRow: o,
9
+ hoverActions: c
10
+ };
11
+ export {
12
+ n as attachmentsWrap,
13
+ a as avatar,
14
+ s as content,
15
+ r as default,
16
+ c as hoverActions,
17
+ _ as mediaOnlyMeta,
18
+ o as messageRow,
19
+ e as spacer,
20
+ t as wrapper
21
+ };
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { CommentComposerTypes } from '../../CommentComposer/types';
3
+ import { type Reaction } from '../MessageReactions';
4
+ import { type MessageDeliveryStatus } from '../MessageStatus';
5
+ export interface ChatMessageProps {
6
+ children: React.ReactNode;
7
+ outgoing?: boolean;
8
+ senderName?: string;
9
+ senderColor?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
10
+ avatarName?: string;
11
+ avatarSrc?: string;
12
+ showAvatar?: boolean;
13
+ timestamp?: string;
14
+ status?: MessageDeliveryStatus;
15
+ replyTo?: {
16
+ senderName: string;
17
+ text: React.ReactNode;
18
+ color?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
19
+ onClick?: () => void;
20
+ };
21
+ forwardFrom?: string;
22
+ edited?: boolean;
23
+ attachments?: CommentComposerTypes.AnyCommentFile[];
24
+ reactions?: Reaction[];
25
+ onReactionToggle?: (emoji: string) => void;
26
+ groupPosition?: 'single' | 'first' | 'middle' | 'last';
27
+ onReaction?: (emoji: string) => void;
28
+ onReply?: () => void;
29
+ onEdit?: () => void;
30
+ onDelete?: () => void;
31
+ onCopy?: () => void;
32
+ onForward?: () => void;
33
+ onPin?: () => void;
34
+ onContextMenu?: (e: React.MouseEvent) => void;
35
+ onAvatarClick?: () => void;
36
+ fullWidth?: boolean;
37
+ noBubble?: boolean;
38
+ mediaOnly?: boolean;
39
+ hasMedia?: boolean;
40
+ id?: string;
41
+ className?: string;
42
+ style?: React.CSSProperties;
43
+ }
44
+ export declare const ChatMessage: React.NamedExoticComponent<ChatMessageProps & React.RefAttributes<HTMLDivElement>>;
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ChatMessage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAOnE,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,kBAAkB,CAAC;AAO7E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,OAAO,CAAC,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,oBAAoB,CAAC,cAAc,EAAE,CAAC;IACpD,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,oFAsMvB,CAAC"}
@@ -0,0 +1,188 @@
1
+ import { jsx as e, jsxs as c, Fragment as Q } from "react/jsx-runtime";
2
+ import I, { useMemo as L } from "react";
3
+ import { AttachmentsPreview as V } from "../../AttachmentsPreview/AttachmentsPreview.js";
4
+ import { UserAvatar as X } from "../../UserAvatar/index.js";
5
+ import { ChatBubble as Z } from "../ChatBubble/index.js";
6
+ import { MessageActions as D } from "../MessageActions/index.js";
7
+ import { MessageAuthor as P } from "../MessageAuthor/index.js";
8
+ import { MessageForward as T } from "../MessageForward/index.js";
9
+ import { MessageMeta as ee } from "../MessageMeta/index.js";
10
+ import { MessageReactions as ae } from "../MessageReactions/index.js";
11
+ import { MessageReply as se } from "../MessageReply/index.js";
12
+ import { MessageStatus as te } from "../MessageStatus/index.js";
13
+ import { getAvatarColor as re } from "../colors.js";
14
+ import s from "./ChatMessage.module.css.js";
15
+ const ie = { cursor: "pointer" }, oe = I.memo(
16
+ I.forwardRef(function({
17
+ children: v,
18
+ outgoing: a,
19
+ senderName: i,
20
+ senderColor: l,
21
+ avatarName: f,
22
+ avatarSrc: _,
23
+ showAvatar: $,
24
+ timestamp: p,
25
+ status: g,
26
+ replyTo: t,
27
+ forwardFrom: M,
28
+ edited: j,
29
+ attachments: r,
30
+ reactions: d,
31
+ onReactionToggle: B,
32
+ groupPosition: u = "single",
33
+ onReaction: A,
34
+ onReply: C,
35
+ onEdit: n,
36
+ onDelete: h,
37
+ onCopy: w,
38
+ onForward: N,
39
+ onPin: b,
40
+ onContextMenu: E,
41
+ onAvatarClick: x,
42
+ fullWidth: z,
43
+ noBubble: K,
44
+ mediaOnly: O,
45
+ hasMedia: R,
46
+ id: U,
47
+ className: S,
48
+ style: W
49
+ }, Y) {
50
+ const q = !a && !!i, F = !a && $, G = !!(A || C || n || h || w || N || b), H = L(() => {
51
+ const m = re(l);
52
+ return {
53
+ root: { "--avatar-bg": m },
54
+ placeholder: { backgroundColor: m }
55
+ };
56
+ }, [l]), k = d && d.length > 0, J = L(
57
+ () => r?.filter((m) => m.isImage).length ?? 0,
58
+ [r]
59
+ ), o = p ? /* @__PURE__ */ e(
60
+ ee,
61
+ {
62
+ time: p,
63
+ edited: j,
64
+ outgoing: a,
65
+ inReactions: k,
66
+ children: a && g && /* @__PURE__ */ e(te, { status: g })
67
+ }
68
+ ) : null, y = /* @__PURE__ */ c(Q, { children: [
69
+ q && /* @__PURE__ */ e(P, { name: i, color: l }),
70
+ t && /* @__PURE__ */ e(
71
+ se,
72
+ {
73
+ title: t.senderName,
74
+ subtitle: t.text,
75
+ color: t.color,
76
+ outgoing: a,
77
+ onClick: t.onClick
78
+ }
79
+ ),
80
+ M && /* @__PURE__ */ e(T, { from: M, outgoing: a }),
81
+ O ? /* @__PURE__ */ c(
82
+ "div",
83
+ {
84
+ className: s.content,
85
+ style: { position: "relative" },
86
+ "data-testid": "chat-message-content",
87
+ "data-has-media": R || void 0,
88
+ "data-media-only": !0,
89
+ children: [
90
+ v,
91
+ o && /* @__PURE__ */ e("div", { className: s.mediaOnlyMeta, children: o })
92
+ ]
93
+ }
94
+ ) : /* @__PURE__ */ c(
95
+ "div",
96
+ {
97
+ className: s.content,
98
+ "data-testid": "chat-message-content",
99
+ "data-has-media": R || void 0,
100
+ "data-single-image": J === 1 || void 0,
101
+ children: [
102
+ v,
103
+ r && r.length > 0 && /* @__PURE__ */ e("div", { className: s.attachmentsWrap, children: /* @__PURE__ */ e(
104
+ V,
105
+ {
106
+ files: r,
107
+ mode: "view",
108
+ parentIsExisting: !0
109
+ }
110
+ ) }),
111
+ k ? /* @__PURE__ */ e(
112
+ ae,
113
+ {
114
+ reactions: d,
115
+ onToggle: B,
116
+ meta: o
117
+ }
118
+ ) : o
119
+ ]
120
+ }
121
+ )
122
+ ] });
123
+ return /* @__PURE__ */ e(
124
+ "div",
125
+ {
126
+ ref: Y,
127
+ className: `${s.messageRow}${S ? ` ${S}` : ""}`,
128
+ "data-outgoing": a || void 0,
129
+ "data-message-id": U,
130
+ onContextMenu: E,
131
+ style: W,
132
+ children: /* @__PURE__ */ c(
133
+ "div",
134
+ {
135
+ className: s.wrapper,
136
+ "data-outgoing": a || void 0,
137
+ "data-group-position": u,
138
+ children: [
139
+ F ? /* @__PURE__ */ e("div", { className: s.avatar, children: /* @__PURE__ */ e(
140
+ X,
141
+ {
142
+ user: {
143
+ id: f || i || "",
144
+ name: f || i,
145
+ avatar: _
146
+ },
147
+ size: 33,
148
+ radius: "xl",
149
+ onClick: x,
150
+ style: x ? ie : void 0,
151
+ styles: H
152
+ }
153
+ ) }) : !a && /* @__PURE__ */ e("div", { className: s.spacer }),
154
+ K ? y : /* @__PURE__ */ e(
155
+ Z,
156
+ {
157
+ outgoing: a,
158
+ fullWidth: z,
159
+ groupPosition: u,
160
+ children: y
161
+ }
162
+ ),
163
+ G && /* @__PURE__ */ e(
164
+ D,
165
+ {
166
+ className: s.hoverActions,
167
+ onReaction: A,
168
+ onReply: C,
169
+ onEdit: n,
170
+ onDelete: h,
171
+ onCopy: w,
172
+ onForward: N,
173
+ onPin: b,
174
+ showEdit: !!n,
175
+ showDelete: !!h
176
+ }
177
+ )
178
+ ]
179
+ }
180
+ )
181
+ }
182
+ );
183
+ })
184
+ );
185
+ oe.displayName = "ChatMessage";
186
+ export {
187
+ oe as ChatMessage
188
+ };
@@ -0,0 +1,11 @@
1
+ const l = "_root_1rg6u_1", o = "_line_1rg6u_17", t = "_label_1rg6u_31", e = {
2
+ root: l,
3
+ line: o,
4
+ label: t
5
+ };
6
+ export {
7
+ e as default,
8
+ t as label,
9
+ o as line,
10
+ l as root
11
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface ChatPillProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ 'data-testid'?: string;
7
+ }
8
+ export declare function ChatPill({ children, className, style, 'data-testid': testId }: ChatPillProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare namespace ChatPill {
10
+ var displayName: string;
11
+ }
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ChatPill/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,aAAa,2CAY5F;yBAZe,QAAQ"}
@@ -0,0 +1,21 @@
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import a from "./ChatPill.module.css.js";
3
+ function r({ children: i, className: t, style: l, "data-testid": e }) {
4
+ return /* @__PURE__ */ d(
5
+ "div",
6
+ {
7
+ className: `${a.root}${t ? ` ${t}` : ""}`,
8
+ style: l,
9
+ "data-testid": e,
10
+ children: [
11
+ /* @__PURE__ */ s("div", { className: a.line }),
12
+ /* @__PURE__ */ s("span", { className: a.label, children: i }),
13
+ /* @__PURE__ */ s("div", { className: a.line })
14
+ ]
15
+ }
16
+ );
17
+ }
18
+ r.displayName = "ChatPill";
19
+ export {
20
+ r as ChatPill
21
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface DayMetaProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ export declare function DayMeta({ children, className, style }: DayMetaProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare namespace DayMeta {
9
+ var displayName: string;
10
+ }
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/DayMeta/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,YAAY,2CAMnE;yBANe,OAAO"}
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { ChatPill as i } from "../ChatPill/index.js";
3
+ function m({ children: t, className: a, style: e }) {
4
+ return /* @__PURE__ */ r(i, { className: a, style: e, "data-testid": "day-meta", children: t });
5
+ }
6
+ m.displayName = "DayMeta";
7
+ export {
8
+ m as DayMeta
9
+ };
@@ -0,0 +1,17 @@
1
+ const t = "_root_1wv58_1", o = "_dialogContent_1wv58_59", n = "_dialogContentDraft_1wv58_79", e = "_dialogContentSender_1wv58_89", _ = "_titleRow_1wv58_99", a = "_textContent_1wv58_119", l = {
2
+ root: t,
3
+ dialogContent: o,
4
+ dialogContentDraft: n,
5
+ dialogContentSender: e,
6
+ titleRow: _,
7
+ textContent: a
8
+ };
9
+ export {
10
+ l as default,
11
+ o as dialogContent,
12
+ n as dialogContentDraft,
13
+ e as dialogContentSender,
14
+ t as root,
15
+ a as textContent,
16
+ _ as titleRow
17
+ };