@layers-app/shared 0.4.5 → 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 (128) hide show
  1. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  2. package/dist/components/AppContainer/AppContainer.js +72 -79
  3. package/dist/components/AppContainer/AppContainer.module.css.js +6 -6
  4. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  5. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
  6. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  7. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +46 -37
  8. package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
  9. package/dist/components/AppContainer/components/Header.js +6 -5
  10. package/dist/components/AppContainer/components/Main.js +4 -4
  11. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  12. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  13. package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
  14. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +131 -121
  16. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  17. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  18. package/dist/components/AppContainer/hooks/useAppContainer.js +59 -56
  19. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  20. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
  21. package/dist/components/AppContainer/types.d.ts +1 -0
  22. package/dist/components/AppContainer/types.d.ts.map +1 -1
  23. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  24. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +37 -37
  25. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  26. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +68 -62
  27. package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
  28. package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
  29. package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
  30. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  31. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
  32. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  33. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
  34. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  35. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +135 -80
  36. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
  37. package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
  38. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  39. package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
  40. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
  41. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +5 -5
  42. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +40 -28
  43. package/dist/components/Chat/ChatInput/index.d.ts +29 -1
  44. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  45. package/dist/components/Chat/ChatInput/index.js +178 -118
  46. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
  47. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
  48. package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
  49. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +9 -9
  50. package/dist/components/Chat/ChatMessage/index.d.ts +2 -0
  51. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  52. package/dist/components/Chat/ChatMessage/index.js +136 -118
  53. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  54. package/dist/components/Chat/MessageActions/index.d.ts +7 -0
  55. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  56. package/dist/components/Chat/MessageActions/index.js +33 -30
  57. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -10
  58. package/dist/components/Chat/MessageList/index.d.ts +30 -3
  59. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  60. package/dist/components/Chat/MessageList/index.js +154 -66
  61. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +7 -7
  62. package/dist/components/Chat/MessageReactions/index.d.ts +17 -0
  63. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -1
  64. package/dist/components/Chat/MessageReactions/index.js +60 -28
  65. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +6 -4
  66. package/dist/components/Chat/MessageStatus/index.d.ts +1 -1
  67. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -1
  68. package/dist/components/Chat/MessageStatus/index.js +49 -34
  69. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
  70. package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
  71. package/dist/components/ColorPicker/ColorPicker.module.css.js +26 -20
  72. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  73. package/dist/components/ColorPicker/ColorPickerList.js +81 -68
  74. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  75. package/dist/components/ColorPicker/ColorPickerToolbar.js +75 -70
  76. package/dist/components/ColorPicker/icons.js +5 -5
  77. package/dist/components/ColorPicker/types.d.ts +6 -0
  78. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  79. package/dist/components/ColorPicker/types.js +53 -11
  80. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  81. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  82. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  83. package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -1
  84. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  85. package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
  86. package/dist/components/EmojiPicker/EmojiPicker.d.ts +16 -1
  87. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  88. package/dist/components/EmojiPicker/EmojiPicker.js +121 -86
  89. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  90. package/dist/components/EmojiPicker/IconsPanel.js +28 -25
  91. package/dist/components/EntityIcon.d.ts +1 -0
  92. package/dist/components/EntityIcon.d.ts.map +1 -1
  93. package/dist/components/EntityIcon.js +80 -32
  94. package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
  95. package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
  96. package/dist/components/ErrorPage/components/Error403.js +25 -21
  97. package/dist/components/ErrorPage/index.d.ts +5 -1
  98. package/dist/components/ErrorPage/index.d.ts.map +1 -1
  99. package/dist/components/ErrorPage/index.js +17 -10
  100. package/dist/components/MusicPlayerBar/components/HoverActions.js +28 -28
  101. package/dist/components/NavMenu/NavMenu.d.ts +7 -1
  102. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  103. package/dist/components/NavMenu/NavMenu.js +54 -44
  104. package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
  105. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  106. package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
  107. package/dist/components/NavMenu/types.d.ts +4 -0
  108. package/dist/components/NavMenu/types.d.ts.map +1 -1
  109. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  110. package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
  111. package/dist/config/envConfig.d.ts +2 -0
  112. package/dist/config/envConfig.d.ts.map +1 -1
  113. package/dist/config/envConfig.js +41 -37
  114. package/dist/helpers/showNotifications.d.ts +15 -0
  115. package/dist/helpers/showNotifications.d.ts.map +1 -1
  116. package/dist/helpers/showNotifications.js +114 -72
  117. package/dist/helpers/showNotifications.module.css.js +16 -4
  118. package/dist/hooks/useUiPref.d.ts +2 -0
  119. package/dist/hooks/useUiPref.d.ts.map +1 -0
  120. package/dist/hooks/useUiPref.js +80 -0
  121. package/dist/index.css +1 -1
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +550 -540
  125. package/dist/lang/locales/ui_en.json.js +1 -1
  126. package/dist/lang/locales/ui_es.json.js +1 -1
  127. package/dist/lang/locales/ui_ru.json.js +1 -1
  128. package/package.json +1 -1
@@ -1,197 +1,257 @@
1
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
2
+ import { useState as Z, useRef as z, useEffect as $, useCallback as d } from "react";
3
+ import { Edit04Icon as _, LinkBackwardIcon as ee, Image01Icon as ae, PlayIcon as ne, File01Icon as ie, Attachment02Icon as te, Sent02Icon as se } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as m } from "@hugeicons/react";
5
+ import { Box as le, Button as re, CloseButton as B, ActionIcon as R, Textarea as ce } from "@mantine/core";
6
+ import { AttachmentsPreview as oe } from "../../AttachmentsPreview/AttachmentsPreview.js";
7
+ import { EmojiPicker as de } from "../../EmojiPicker/EmojiPicker.js";
8
+ import { IconEntity as me } from "../../ProjectIcon/ProjectIcon.js";
9
+ import { SmilePlusIcon as ue } from "./smilePlusIcon.js";
10
+ import e from "./ChatInput.module.css.js";
11
+ function he({
12
+ value: D,
13
+ onChange: E,
14
+ onSend: P,
15
+ onAttach: u,
16
+ onEmojiSelect: N,
17
+ onGifSelect: b,
18
+ placeholder: H = "Add a message...",
19
+ replyTo: i,
20
+ editing: h,
21
+ notice: l,
22
+ attachments: r,
23
+ onRemoveAttachment: V,
24
+ maxLength: G,
25
+ disabled: c,
26
+ disableAttachments: v,
27
+ className: L,
28
+ style: M
26
29
  }) {
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);
30
+ const x = D !== void 0, [O, T] = Z(""), o = x ? D : O, p = z(null), g = z(null), y = z(r?.length ?? 0);
31
+ $(() => {
32
+ const n = r?.length ?? 0;
33
+ n > y.current && g.current?.focus(), y.current = n;
34
+ }, [r?.length]);
35
+ const j = !!i, A = !!h;
36
+ $(() => {
37
+ (j || A) && g.current?.focus();
38
+ }, [j, A]);
39
+ const f = d(
40
+ (n) => {
41
+ x || T(n), E?.(n);
39
42
  },
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());
43
+ [x, E]
44
+ ), I = d(() => {
45
+ const n = o.trim();
46
+ (n || r && r.length > 0) && (P?.(n), f(""));
47
+ }, [o, r, P, f]), U = d(
48
+ (n) => {
49
+ n.key === "Enter" && !n.shiftKey && (n.preventDefault(), I());
47
50
  },
48
- [p]
49
- ), L = m(
50
- (e) => {
51
- const r = ie.parse(e)?.emoji ?? e;
52
- u ? u(r) : d(c + r);
51
+ [I]
52
+ ), q = d(
53
+ (n) => {
54
+ const t = me.parse(n)?.emoji ?? n;
55
+ N ? N(t) : f(o + t);
53
56
  },
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 = "");
57
+ [N, f, o]
58
+ ), J = d(
59
+ (n) => {
60
+ const t = n.target.files;
61
+ t && t.length > 0 && u?.(Array.from(t)), p.current && (p.current.value = "");
59
62
  },
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);
63
+ [u]
64
+ ), Q = d(
65
+ (n) => {
66
+ if (c || v || !u) return;
67
+ const t = n.clipboardData?.items;
68
+ if (!t) return;
69
+ const w = [];
70
+ for (let k = 0; k < t.length; k++) {
71
+ const S = t[k];
72
+ if (S.kind === "file") {
73
+ const F = S.getAsFile();
74
+ F && w.push(F);
75
+ }
76
+ }
77
+ w.length > 0 && (n.preventDefault(), u(w));
78
+ },
79
+ [c, v, u]
80
+ ), W = o.trim().length > 0, C = r && r.length > 0, K = C && r.some((n) => "isTemp" in n && n.isTemp), X = W || C && !K, Y = !!(h || i);
62
81
  return /* @__PURE__ */ s(
63
- ee,
82
+ le,
64
83
  {
65
- className: `${t.root} ${D || ""}`,
66
- style: F,
84
+ className: `${e.root} ${L || ""}`,
85
+ style: M,
67
86
  "data-testid": "chat-input",
68
87
  px: "md",
69
88
  pb: "md",
70
89
  children: [
71
- !B && /* @__PURE__ */ a(
90
+ !v && /* @__PURE__ */ a(
72
91
  "input",
73
92
  {
74
- ref: h,
93
+ ref: p,
75
94
  type: "file",
76
95
  multiple: !0,
77
96
  accept: "*/*",
78
- className: t.hiddenFileInput,
79
- onChange: O,
97
+ className: e.hiddenFileInput,
98
+ onChange: J,
80
99
  tabIndex: -1
81
100
  }
82
101
  ),
83
- /* @__PURE__ */ s("div", { className: t.inputRow, children: [
102
+ /* @__PURE__ */ s("div", { className: e.inputRow, children: [
84
103
  /* @__PURE__ */ s(
85
104
  "div",
86
105
  {
87
- className: `${t.inputBox} ${G ? t.withHeader : ""}`,
106
+ className: `${e.inputBox} ${Y ? e.withHeader : ""}`,
107
+ "data-disabled": c || void 0,
88
108
  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 })
109
+ l ? /* @__PURE__ */ s(
110
+ "div",
111
+ {
112
+ className: e.notice,
113
+ "data-variant": l.variant ?? "warning",
114
+ children: [
115
+ l.icon ? /* @__PURE__ */ a("span", { className: e.noticeIcon, children: l.icon }) : null,
116
+ /* @__PURE__ */ s("div", { className: e.noticeMain, children: [
117
+ /* @__PURE__ */ a("span", { className: e.noticeText, children: l.text }),
118
+ l.action ? /* @__PURE__ */ a(
119
+ re,
120
+ {
121
+ size: "compact-xs",
122
+ variant: "white",
123
+ radius: "xl",
124
+ className: e.noticeAction,
125
+ onClick: l.action.onClick,
126
+ children: l.action.label
127
+ }
128
+ ) : null
129
+ ] }),
130
+ l.onDismiss ? /* @__PURE__ */ a(
131
+ B,
132
+ {
133
+ size: "sm",
134
+ className: e.noticeDismiss,
135
+ onClick: l.onDismiss,
136
+ "aria-label": "Dismiss"
137
+ }
138
+ ) : null
139
+ ]
140
+ }
141
+ ) : null,
142
+ h ? /* @__PURE__ */ s("div", { className: e.header, children: [
143
+ /* @__PURE__ */ a("div", { className: e.headerIcon, children: /* @__PURE__ */ a(m, { icon: _, size: 20 }) }),
144
+ /* @__PURE__ */ s("div", { className: e.headerBar, "data-variant": "edit", children: [
145
+ /* @__PURE__ */ a("div", { className: e.headerTitle, "data-variant": "edit", children: "Edit" }),
146
+ /* @__PURE__ */ a("div", { className: e.headerText, children: h.text })
94
147
  ] }),
95
148
  /* @__PURE__ */ a(
96
- j,
149
+ B,
97
150
  {
98
151
  size: "sm",
99
- onClick: o.onCancel,
152
+ onClick: h.onCancel,
100
153
  "aria-label": "Close"
101
154
  }
102
155
  )
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 })
156
+ ] }) : i ? /* @__PURE__ */ s("div", { className: e.header, children: [
157
+ /* @__PURE__ */ a("div", { className: e.headerIcon, children: /* @__PURE__ */ a(m, { icon: ee, size: 20 }) }),
158
+ /* @__PURE__ */ s("div", { className: e.headerBar, "data-variant": "reply", children: [
159
+ /* @__PURE__ */ a("div", { className: e.headerTitle, "data-variant": "reply", children: i.senderName }),
160
+ /* @__PURE__ */ a("div", { className: e.headerText, children: (() => {
161
+ if (i.text && i.text.trim().length > 0) return i.text;
162
+ if (i.attachmentName) {
163
+ const t = i.attachmentKind === "image" ? ae : i.attachmentKind === "video" ? ne : ie;
164
+ return /* @__PURE__ */ s("span", { className: e.headerAttachment, children: [
165
+ /* @__PURE__ */ a(m, { icon: t, size: 14 }),
166
+ /* @__PURE__ */ a("span", { children: i.attachmentName })
114
167
  ] });
115
168
  }
116
169
  return "";
117
170
  })() })
118
171
  ] }),
119
172
  /* @__PURE__ */ a(
120
- j,
173
+ B,
121
174
  {
122
175
  size: "sm",
123
- onClick: n.onCancel,
176
+ onClick: i.onCancel,
124
177
  "aria-label": "Close"
125
178
  }
126
179
  )
127
180
  ] }) : null,
128
- x && /* @__PURE__ */ a("div", { className: t.attachments, children: /* @__PURE__ */ a(
129
- te,
181
+ C && /* @__PURE__ */ a("div", { className: e.attachments, children: /* @__PURE__ */ a(
182
+ oe,
130
183
  {
131
- files: i,
184
+ files: r,
132
185
  mode: "draft",
133
- onRemove: S
186
+ onRemove: V
134
187
  }
135
188
  ) }),
136
- /* @__PURE__ */ s("div", { className: t.inputArea, children: [
189
+ /* @__PURE__ */ s("div", { className: e.inputArea, children: [
137
190
  /* @__PURE__ */ a(
138
- ne,
191
+ de,
139
192
  {
140
- onChange: L,
193
+ onChange: q,
141
194
  showIcons: !1,
195
+ showGifs: !!b,
196
+ onSelectGif: b,
142
197
  showRemoveButton: !1,
198
+ showRandomButton: !1,
143
199
  position: "top-start",
144
200
  closeOnSelect: !1,
201
+ withinPortal: !0,
145
202
  children: /* @__PURE__ */ a(
146
- I,
203
+ R,
147
204
  {
148
205
  variant: "subtle",
149
206
  radius: "xl",
150
207
  size: 34,
151
208
  color: "gray",
152
- className: t.iconButton,
209
+ className: e.iconButton,
153
210
  "aria-label": "Emoji",
154
- children: /* @__PURE__ */ a(l, { icon: Y, size: 24 })
211
+ disabled: c,
212
+ children: /* @__PURE__ */ a(m, { icon: ue, size: 24 })
155
213
  }
156
214
  )
157
215
  }
158
216
  ),
159
217
  /* @__PURE__ */ a(
160
- ae,
218
+ ce,
161
219
  {
162
- ref: v,
220
+ ref: g,
163
221
  classNames: {
164
- root: t.textarea,
165
- input: t.textareaInput
222
+ root: e.textarea,
223
+ input: e.textareaInput
166
224
  },
167
225
  w: "100%",
168
226
  flex: 1,
169
- value: c,
170
- onChange: (e) => d(e.currentTarget.value),
171
- onKeyDown: V,
172
- placeholder: K,
227
+ value: o,
228
+ onChange: (n) => f(n.currentTarget.value),
229
+ onPaste: Q,
230
+ onKeyDown: U,
231
+ placeholder: H,
173
232
  autosize: !0,
174
233
  minRows: 1,
175
234
  maxRows: 6,
176
- disabled: w,
235
+ disabled: c,
177
236
  variant: "unstyled",
178
- maxLength: $
237
+ maxLength: G
179
238
  }
180
239
  ),
181
- !B && /* @__PURE__ */ a(
182
- I,
240
+ !v && /* @__PURE__ */ a(
241
+ R,
183
242
  {
184
243
  variant: "subtle",
185
244
  radius: "xl",
186
245
  size: 34,
187
246
  color: "gray",
188
- className: t.iconButton,
247
+ className: e.iconButton,
189
248
  "aria-label": "Attach file",
190
- onClick: () => h.current?.click(),
249
+ onClick: () => p.current?.click(),
250
+ disabled: c,
191
251
  children: /* @__PURE__ */ a(
192
- l,
252
+ m,
193
253
  {
194
- icon: Z,
254
+ icon: te,
195
255
  size: 24,
196
256
  style: { transform: "rotate(30deg)" }
197
257
  }
@@ -203,18 +263,18 @@ function se({
203
263
  }
204
264
  ),
205
265
  /* @__PURE__ */ a(
206
- I,
266
+ R,
207
267
  {
208
- className: t.sendButton,
268
+ className: e.sendButton,
209
269
  variant: "filled",
210
270
  color: "indigo",
211
271
  radius: 12,
212
272
  size: 50,
213
- onClick: p,
214
- disabled: w || !q,
215
- loading: E,
273
+ onClick: I,
274
+ disabled: c || !X,
275
+ loading: K,
216
276
  "aria-label": "Send message",
217
- children: /* @__PURE__ */ a(l, { icon: _, size: 24 })
277
+ children: /* @__PURE__ */ a(m, { icon: se, size: 24 })
218
278
  }
219
279
  )
220
280
  ] })
@@ -222,7 +282,7 @@ function se({
222
282
  }
223
283
  );
224
284
  }
225
- se.displayName = "ChatInput";
285
+ he.displayName = "ChatInput";
226
286
  export {
227
- se as ChatInput
287
+ he as ChatInput
228
288
  };
@@ -0,0 +1,3 @@
1
+ import type { IconSvgElement } from '@hugeicons/react';
2
+ export declare const SmilePlusIcon: IconSvgElement;
3
+ //# sourceMappingURL=smilePlusIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smilePlusIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ChatInput/smilePlusIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,aAAa,EAAE,cA6C3B,CAAC"}
@@ -0,0 +1,49 @@
1
+ const o = [
2
+ [
3
+ "path",
4
+ {
5
+ d: "M21.3 10.5C21.4311 11.1462 21.5 11.8151 21.5 12.5C21.5 18.0228 17.0228 22.5 11.5 22.5C5.97715 22.5 1.5 18.0228 1.5 12.5C1.5 6.97715 5.97715 2.5 11.5 2.5C12.1849 2.5 12.8538 2.56886 13.5 2.70004",
6
+ stroke: "currentColor",
7
+ strokeWidth: "1.5",
8
+ strokeLinecap: "round",
9
+ strokeLinejoin: "round",
10
+ key: "0"
11
+ }
12
+ ],
13
+ [
14
+ "path",
15
+ {
16
+ d: "M19.494 1.5V7.5M22.5 4.494L16.5 4.494",
17
+ stroke: "currentColor",
18
+ strokeWidth: "1.5",
19
+ strokeLinecap: "round",
20
+ strokeLinejoin: "round",
21
+ key: "1"
22
+ }
23
+ ],
24
+ [
25
+ "path",
26
+ {
27
+ d: "M7.5 15.5C8.41212 16.7144 9.86433 17.5 11.5 17.5C13.1357 17.5 14.5879 16.7144 15.5 15.5",
28
+ stroke: "currentColor",
29
+ strokeWidth: "1.5",
30
+ strokeLinecap: "round",
31
+ strokeLinejoin: "round",
32
+ key: "2"
33
+ }
34
+ ],
35
+ [
36
+ "path",
37
+ {
38
+ d: "M15.125 8.887V9.41649M7.875 8.887V9.41649M8.25 9.25C8.25 8.83579 8.08211 8.5 7.875 8.5C7.66789 8.5 7.5 8.83579 7.5 9.25C7.5 9.66421 7.66789 10 7.875 10C8.08211 10 8.25 9.66421 8.25 9.25ZM15.5 9.25C15.5 8.83579 15.3321 8.5 15.125 8.5C14.9179 8.5 14.75 8.83579 14.75 9.25C14.75 9.66421 14.9179 10 15.125 10C15.3321 10 15.5 9.66421 15.5 9.25Z",
39
+ stroke: "currentColor",
40
+ strokeWidth: "1.5",
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round",
43
+ key: "3"
44
+ }
45
+ ]
46
+ ];
47
+ export {
48
+ o as SmilePlusIcon
49
+ };
@@ -1,21 +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 = {
1
+ const t = "_wrapper_1hoj2_1", a = "_avatar_1hoj2_77", e = "_spacer_1hoj2_93", o = "_content_1hoj2_107", s = "_attachmentsWrap_1hoj2_153", n = "_mediaOnlyMeta_1hoj2_243", _ = "_messageRow_1hoj2_285", c = "_hoverActions_1hoj2_295", r = {
2
2
  wrapper: t,
3
3
  avatar: a,
4
4
  spacer: e,
5
- content: s,
6
- attachmentsWrap: n,
7
- mediaOnlyMeta: _,
8
- messageRow: o,
5
+ content: o,
6
+ attachmentsWrap: s,
7
+ mediaOnlyMeta: n,
8
+ messageRow: _,
9
9
  hoverActions: c
10
10
  };
11
11
  export {
12
- n as attachmentsWrap,
12
+ s as attachmentsWrap,
13
13
  a as avatar,
14
- s as content,
14
+ o as content,
15
15
  r as default,
16
16
  c as hoverActions,
17
- _ as mediaOnlyMeta,
18
- o as messageRow,
17
+ n as mediaOnlyMeta,
18
+ _ as messageRow,
19
19
  e as spacer,
20
20
  t as wrapper
21
21
  };
@@ -12,6 +12,8 @@ export interface ChatMessageProps {
12
12
  showAvatar?: boolean;
13
13
  timestamp?: string;
14
14
  status?: MessageDeliveryStatus;
15
+ onRetry?: () => void;
16
+ retryLabel?: string;
15
17
  replyTo?: {
16
18
  senderName: string;
17
19
  text: React.ReactNode;
@@ -1 +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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