@layers-app/shared 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +1 -1
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +32 -32
  4. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  5. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  6. package/dist/components/AppContainer/AppContainer.js +82 -70
  7. package/dist/components/AppContainer/AppContainer.module.css.js +20 -10
  8. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts +6 -0
  9. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.d.ts.map +1 -0
  10. package/dist/components/AppContainer/components/AppsSidebar/DesktopUpdateButton.js +161 -0
  11. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  13. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  14. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +238 -105
  15. package/dist/components/AppContainer/components/Main.js +4 -4
  16. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  17. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  18. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  19. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  20. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  21. package/dist/components/AppContainer/components/ToolSidebar.js +51 -39
  22. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +62 -1
  23. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  24. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1107 -137
  25. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +158 -6
  26. package/dist/components/AppContainer/types.d.ts +12 -0
  27. package/dist/components/AppContainer/types.d.ts.map +1 -1
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +3 -1
  29. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  30. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +237 -93
  31. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +18 -16
  32. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  33. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  34. package/dist/components/Chat/ChatInput/index.js +264 -164
  35. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  36. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  37. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  38. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  39. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  40. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  41. package/dist/components/Chat/ChatMessage/index.js +153 -118
  42. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  43. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  44. package/dist/components/Chat/MessageActions/index.js +189 -50
  45. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  46. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  47. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  48. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  49. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  50. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  51. package/dist/components/Chat/MessageList/index.js +201 -149
  52. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -1
  53. package/dist/components/Chat/MessageMeta/index.js +21 -19
  54. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -0
  55. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  56. package/dist/components/ColorPicker/ColorPicker.js +81 -76
  57. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  58. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  59. package/dist/components/ColorPicker/ColorPickerToolbar.js +97 -91
  60. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  61. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  62. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  63. package/dist/components/CommentComposer/index.d.ts +1 -1
  64. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  65. package/dist/components/CommentComposer/index.js +70 -68
  66. package/dist/components/CommentComposer/types.d.ts +6 -0
  67. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  68. package/dist/components/CustomKBD/index.js +21 -22
  69. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  70. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  72. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  73. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  74. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  75. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  76. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  77. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +3 -1
  78. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
  79. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +26 -25
  80. package/dist/components/NewToolbar/utils.d.ts +12 -0
  81. package/dist/components/NewToolbar/utils.d.ts.map +1 -0
  82. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  83. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  84. package/dist/components/Notification/InfiniteScroll.js +42 -0
  85. package/dist/components/Notification/Notification.d.ts +4 -1
  86. package/dist/components/Notification/Notification.d.ts.map +1 -1
  87. package/dist/components/Notification/Notification.module.css.js +28 -4
  88. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  89. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  90. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  91. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  92. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  93. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  94. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  95. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  96. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  97. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  98. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  99. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  100. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  101. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  102. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  103. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  104. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  105. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  106. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  107. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  108. package/dist/components/Notification/atoms/index.d.ts +5 -0
  109. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  110. package/dist/components/Notification/hooks/index.d.ts +8 -0
  111. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  112. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  113. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  114. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  115. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  116. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  117. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  118. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  119. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  120. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  121. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  122. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  123. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  124. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  125. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  126. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  127. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  128. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  129. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  130. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  131. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  132. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  133. package/dist/components/Notification/lib/api.d.ts +4 -0
  134. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  135. package/dist/components/Notification/lib/api.js +19 -0
  136. package/dist/components/Notification/lib/index.d.ts +5 -0
  137. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  138. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  139. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  140. package/dist/components/Notification/lib/notificationText.js +131 -0
  141. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  142. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  143. package/dist/components/Notification/lib/stripHtml.js +6 -0
  144. package/dist/components/Notification/lib/types.d.ts +45 -0
  145. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  146. package/dist/components/Notification/lib/types.js +9 -0
  147. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  148. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  149. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  150. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  151. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  152. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  153. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  154. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  155. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  156. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  157. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  158. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  159. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  160. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  161. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  162. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  163. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  164. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  165. package/dist/components/Notification/molecules/index.d.ts +7 -0
  166. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  167. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  168. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  169. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  170. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  171. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  172. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  173. package/dist/components/Notification/organisms/index.d.ts +3 -0
  174. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  175. package/dist/components/OnboardingTour/index.d.ts +1 -1
  176. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  177. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +2 -0
  178. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
  179. package/dist/components/OnboardingTour/useOnboardingTour.js +63 -51
  180. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  181. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  182. package/dist/config/brand.d.ts.map +1 -1
  183. package/dist/config/brand.js +29 -29
  184. package/dist/config/envConfig.d.ts +4 -0
  185. package/dist/config/envConfig.d.ts.map +1 -1
  186. package/dist/config/envConfig.js +29 -28
  187. package/dist/helpers/getFileIcons.js +5 -5
  188. package/dist/helpers/getFileType.d.ts.map +1 -1
  189. package/dist/helpers/getFileType.js +11 -2
  190. package/dist/helpers/platform.d.ts +1 -1
  191. package/dist/helpers/platform.d.ts.map +1 -1
  192. package/dist/helpers/platform.js +1 -0
  193. package/dist/helpers/showNotifications.d.ts +8 -14
  194. package/dist/helpers/showNotifications.d.ts.map +1 -1
  195. package/dist/helpers/showNotifications.js +107 -111
  196. package/dist/helpers/showNotifications.module.css.js +4 -16
  197. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  198. package/dist/hooks/useDateUtils.js +19 -23
  199. package/dist/index.css +1 -1
  200. package/dist/index.js +576 -573
  201. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  202. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  203. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  204. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  205. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  206. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  207. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  208. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  209. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  210. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  211. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  212. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  213. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  214. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  215. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  216. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  217. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  218. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  219. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  220. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  221. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  222. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  223. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  224. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  225. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  226. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  227. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  228. package/package.json +5 -3
  229. package/dist/components/Notification/Notification.js +0 -119
  230. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  231. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  232. package/dist/components/Notification/NotificationCard.js +0 -93
@@ -1,35 +1,37 @@
1
- import { jsx as e, jsxs as b } from "react/jsx-runtime";
2
- import { forwardRef as k, useState as g } from "react";
3
- import { useTranslation as j } from "react-i18next";
4
- import { Tick02Icon as A } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as E } from "@hugeicons/react";
6
- import { useMantineTheme as z, getThemeColor as R, Flex as x, Tooltip as D, ColorSwatch as F, parseThemeColor as H, ColorInput as M, ActionIcon as y } from "@mantine/core";
7
- import { IconPalette as U, IconPencil as V } from "@tabler/icons-react";
8
- import q from "styled-components";
9
- import { DEFAULT_VALUES as w } from "../../constants.js";
10
- import { ColorPickerList as _ } from "./ColorPickerList.js";
11
- import { ColorPickerToolbar as B } from "./ColorPickerToolbar.js";
12
- import { resolveColorLabel as G, normalizeColorItem as J } from "./types.js";
13
- const K = k(
1
+ import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
+ import { forwardRef as z, useState as y } from "react";
3
+ import { useTranslation as E } from "react-i18next";
4
+ import { Tick02Icon as R } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as D } from "@hugeicons/react";
6
+ import { useMantineTheme as I, getThemeColor as F, Flex as x, Tooltip as H, ColorSwatch as M, parseThemeColor as U, ColorInput as V, ActionIcon as w } from "@mantine/core";
7
+ import { IconPalette as q, IconPencil as _ } from "@tabler/icons-react";
8
+ import B from "styled-components";
9
+ import { DEFAULT_VALUES as k } from "../../constants.js";
10
+ import { ColorPickerList as G } from "./ColorPickerList.js";
11
+ import { ColorPickerToolbar as J } from "./ColorPickerToolbar.js";
12
+ import { resolveColorLabel as K, normalizeColorItem as N } from "./types.js";
13
+ const Q = z(
14
14
  ({
15
15
  value: o,
16
16
  onChange: l,
17
17
  allowCustomColor: n,
18
18
  colors: s,
19
- swatchShape: c = "circle",
20
- swatchVariant: m = "filled",
21
- withTick: d = !1,
22
- fullWidth: p = !1,
23
- swatchSize: i = 30,
24
- ...u
25
- }, f) => {
26
- const h = z(), r = H({
27
- color: o || w.COLORS[0],
28
- theme: h
29
- }), [t, C] = g(r.value), [L, v] = g(!1);
30
- return L ? /* @__PURE__ */ b(x, { align: "center", mih: 30, children: [
19
+ swatchShape: m = "circle",
20
+ swatchVariant: d = "filled",
21
+ withTick: p = !1,
22
+ fullWidth: u = !1,
23
+ swatchSize: f = 30,
24
+ wrapperHeight: i,
25
+ customSizes: a,
26
+ ...h
27
+ }, C) => {
28
+ const r = I(), t = U({
29
+ color: o || k.COLORS[0],
30
+ theme: r
31
+ }), [b, O] = y(t.value), [T, g] = y(!1);
32
+ return T ? /* @__PURE__ */ v(x, { align: "center", mih: 30, children: [
31
33
  /* @__PURE__ */ e(
32
- M,
34
+ V,
33
35
  {
34
36
  w: "100%",
35
37
  popoverProps: {
@@ -39,62 +41,64 @@ const K = k(
39
41
  maxLength: 7,
40
42
  withEyeDropper: !1,
41
43
  size: "xs",
42
- value: t,
43
- onChange: C,
44
+ value: b,
45
+ onChange: O,
44
46
  onChangeEnd: l,
45
47
  placeholder: "Select custom color"
46
48
  }
47
49
  ),
48
50
  /* @__PURE__ */ e(
49
- y,
51
+ w,
50
52
  {
51
53
  radius: "xl",
52
54
  variant: "default",
53
55
  color: "gray",
54
- onClick: () => v(!1),
55
- children: /* @__PURE__ */ e(U, { size: 16 })
56
+ onClick: () => g(!1),
57
+ children: /* @__PURE__ */ e(q, { size: 16 })
56
58
  }
57
59
  )
58
- ] }, 1) : /* @__PURE__ */ b(
60
+ ] }, 1) : /* @__PURE__ */ v(
59
61
  x,
60
62
  {
61
- ref: f,
62
- ...u,
63
- justify: p ? "space-between" : "flex-start",
63
+ ref: C,
64
+ ...h,
65
+ justify: u ? "space-between" : "flex-start",
64
66
  align: "center",
67
+ mih: a && i || 32,
65
68
  children: [
66
- (s || w.COLORS).map((O, T) => {
69
+ (s || k.COLORS).map((P, S) => {
67
70
  const {
68
- value: a,
69
- border: P,
70
- bg: S,
71
- label: $
72
- } = J(O);
71
+ value: c,
72
+ border: $,
73
+ bg: j,
74
+ label: A
75
+ } = N(P);
73
76
  return /* @__PURE__ */ e(
74
- N,
77
+ W,
75
78
  {
76
- value: a,
77
- label: $,
78
- isActive: a === o,
79
- size: i - 4,
80
- swatchShape: c,
81
- swatchVariant: m,
82
- withTick: d,
83
- borderColor: P,
84
- bgColor: S,
85
- onClick: () => l?.(a)
79
+ value: c,
80
+ label: A,
81
+ isActive: c === o,
82
+ size: f - 4,
83
+ swatchShape: m,
84
+ swatchVariant: d,
85
+ withTick: p,
86
+ borderColor: $,
87
+ bgColor: j,
88
+ onClick: () => l?.(c),
89
+ swatchSize: a ? f : void 0
86
90
  },
87
- a || T
91
+ c || S
88
92
  );
89
93
  }),
90
94
  n && /* @__PURE__ */ e(
91
- y,
95
+ w,
92
96
  {
93
97
  radius: "xl",
94
98
  variant: "default",
95
99
  color: "gray",
96
- onClick: () => v(!0),
97
- children: /* @__PURE__ */ e(V, { size: 16 })
100
+ onClick: () => g(!0),
101
+ children: /* @__PURE__ */ e(_, { size: 16 })
98
102
  }
99
103
  )
100
104
  ]
@@ -102,19 +106,20 @@ const K = k(
102
106
  2
103
107
  );
104
108
  }
105
- ), I = k(
109
+ ), L = z(
106
110
  ({
107
111
  value: o,
108
112
  label: l,
109
113
  isActive: n,
110
114
  swatchShape: s,
111
- swatchVariant: c = "filled",
112
- withTick: m,
113
- borderColor: d,
114
- bgColor: p,
115
+ swatchVariant: m = "filled",
116
+ withTick: d,
117
+ borderColor: p,
118
+ bgColor: u,
119
+ swatchSize: f,
115
120
  ...i
116
- }, u) => {
117
- const f = z(), { t: h } = j("ui"), r = o ? R(o, f) : "", t = c === "outline", C = G(h, o, l);
121
+ }, a) => {
122
+ const h = I(), { t: C } = E("ui"), r = o ? F(o, h) : "", t = m === "outline", b = K(C, o, l);
118
123
  return /* @__PURE__ */ e(
119
124
  x,
120
125
  {
@@ -123,10 +128,10 @@ const K = k(
123
128
  justify: "center",
124
129
  align: "center",
125
130
  style: { position: "relative" },
126
- children: /* @__PURE__ */ e(D, { label: C, withArrow: !0, zIndex: 300, children: /* @__PURE__ */ b(
127
- F,
131
+ children: /* @__PURE__ */ e(H, { label: b, withArrow: !0, children: /* @__PURE__ */ v(
132
+ M,
128
133
  {
129
- ref: u,
134
+ ref: a,
130
135
  color: t ? "transparent" : r,
131
136
  radius: s === "circle" ? "xl" : "sm",
132
137
  styles: t ? {
@@ -136,8 +141,8 @@ const K = k(
136
141
  style: {
137
142
  cursor: "pointer",
138
143
  color: "var(--mantine-color-white)",
139
- background: t ? p || `var(--mantine-color-${o}-light, ${r}20)` : void 0,
140
- border: t ? `2px solid ${d || `var(--mantine-color-${o}-outline, ${r})`}` : void 0
144
+ background: t ? u || `var(--mantine-color-${o}-light, ${r}20)` : void 0,
145
+ border: t ? `2px solid ${p || `var(--mantine-color-${o}-outline, ${r})`}` : void 0
141
146
  },
142
147
  ...i,
143
148
  children: [
@@ -157,23 +162,23 @@ const K = k(
157
162
  }
158
163
  }
159
164
  ),
160
- m && n && /* @__PURE__ */ e(E, { size: 20, icon: A })
165
+ d && n && /* @__PURE__ */ e(D, { size: 20, icon: R })
161
166
  ]
162
167
  }
163
168
  ) })
164
169
  }
165
170
  );
166
171
  }
167
- ), N = q(I)`
172
+ ), W = B(L)`
168
173
  .mantine-ColorSwatch-colorOverlay {
169
174
  border-radius: ${({ swatchShape: o }) => o === "square" ? "3px" : "50%"};
170
175
  }
171
- `, ao = Object.assign(K, {
172
- ColorCircle: I,
173
- List: _,
174
- Toolbar: B
176
+ `, mo = Object.assign(Q, {
177
+ ColorCircle: L,
178
+ List: G,
179
+ Toolbar: J
175
180
  });
176
181
  export {
177
- I as ColorCircle,
178
- ao as ColorPicker
182
+ L as ColorCircle,
183
+ mo as ColorPicker
179
184
  };
@@ -8,6 +8,7 @@ export interface ColorPickerToolbarProps {
8
8
  maxRecentColors?: number;
9
9
  disabled?: boolean;
10
10
  recentColorsLabel?: string;
11
+ tooltipZIndex?: number;
11
12
  }
12
13
  export declare const ColorPickerToolbar: import("react").ForwardRefExoticComponent<ColorPickerToolbarProps & import("react").RefAttributes<HTMLDivElement>>;
13
14
  //# sourceMappingURL=ColorPickerToolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPickerToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerToolbar.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYjE;6DAC6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsCD,eAAO,MAAM,kBAAkB,oHA0M9B,CAAC"}
1
+ {"version":3,"file":"ColorPickerToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerToolbar.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYjE;6DAC6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAwCD,eAAO,MAAM,kBAAkB,oHA+M9B,CAAC"}
@@ -1,112 +1,116 @@
1
- import { jsxs as k, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as y, useState as M, useCallback as g, useMemo as O } from "react";
3
- import { useTranslation as j } from "react-i18next";
4
- import { useComputedColorScheme as P, Box as u, Flex as I, Tooltip as U, UnstyledButton as _ } from "@mantine/core";
5
- import { TextColorIcon as K, HighlightSwatch as A } from "./icons.js";
6
- import { normalizeColorItem as w, resolveColorLabel as B, isDefaultColor as q, RECENT_COLOR_HOTKEY as V, colorsEqual as Y } from "./types.js";
7
- import { useRecentColors as G } from "./useRecentColors.js";
8
- import r from "./ColorPicker.module.css.js";
9
- function v({
10
- isActive: m,
11
- round: d,
12
- disabled: h,
13
- onClick: f,
1
+ import { jsxs as v, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as M, useState as O, useCallback as w, useMemo as j } from "react";
3
+ import { useTranslation as P } from "react-i18next";
4
+ import { useComputedColorScheme as U, Box as m, Flex as A, Tooltip as _, UnstyledButton as q } from "@mantine/core";
5
+ import { TextColorIcon as B, HighlightSwatch as E } from "./icons.js";
6
+ import { normalizeColorItem as L, resolveColorLabel as z, isDefaultColor as V, RECENT_COLOR_HOTKEY as Y, colorsEqual as G } from "./types.js";
7
+ import { useRecentColors as J } from "./useRecentColors.js";
8
+ import t from "./ColorPicker.module.css.js";
9
+ function S({
10
+ isActive: h,
11
+ round: f,
12
+ disabled: d,
13
+ onClick: b,
14
14
  children: i,
15
- tooltipLabel: p
15
+ tooltipLabel: p,
16
+ tooltipZIndex: a
16
17
  }) {
17
- const b = /* @__PURE__ */ t(
18
- _,
18
+ const C = /* @__PURE__ */ r(
19
+ q,
19
20
  {
20
21
  type: "button",
21
- className: `${r.inlineSwatch}${d ? ` ${r.inlineSwatchRound}` : ""}${m ? ` ${r.inlineSwatchActive}` : ""}`,
22
- onMouseDown: (a) => a.preventDefault(),
23
- onClick: f,
24
- disabled: h,
22
+ className: `${t.inlineSwatch}${f ? ` ${t.inlineSwatchRound}` : ""}${h ? ` ${t.inlineSwatchActive}` : ""}`,
23
+ onMouseDown: (s) => s.preventDefault(),
24
+ onClick: b,
25
+ disabled: d,
25
26
  children: i
26
27
  }
27
28
  );
28
- return p ? /* @__PURE__ */ t(U, { label: p, withArrow: !0, zIndex: 400, children: b }) : b;
29
+ return p ? /* @__PURE__ */ r(_, { label: p, withArrow: !0, zIndex: a, children: C }) : C;
29
30
  }
30
- const re = y(
31
+ const ce = M(
31
32
  ({
32
- sections: m,
33
- onChange: d,
34
- withRecentColors: h,
35
- maxRecentColors: f = 10,
33
+ sections: h,
34
+ onChange: f,
35
+ withRecentColors: d,
36
+ maxRecentColors: b = 10,
36
37
  disabled: i,
37
- recentColorsLabel: p
38
- }, b) => {
39
- const { t: a } = j("ui"), E = p ?? a("colorPicker.recentlyUsed"), L = P("light", {
38
+ recentColorsLabel: p,
39
+ tooltipZIndex: a = 400
40
+ }, C) => {
41
+ const { t: s } = P("ui"), D = p ?? s("colorPicker.recentlyUsed"), $ = U("light", {
40
42
  getInitialValueInEffect: !0
41
- }) === "dark", { recentColors: z, addRecent: x } = G({
42
- maxItems: f
43
- }), [$, D] = M(z), C = g(
44
- (e, o, c) => {
45
- h && (x(e, o, c), D((l) => {
46
- const n = l.filter(
47
- (s) => !(s.value === e && s.sectionKey === o)
43
+ }) === "dark", { recentColors: H, addRecent: N } = J({
44
+ maxItems: b
45
+ }), [R, y] = O(H), k = w(
46
+ (e, o, n) => {
47
+ d && (N(e, o, n), y((l) => {
48
+ const c = l.filter(
49
+ (u) => !(u.value === e && u.sectionKey === o)
48
50
  );
49
- return [{ value: e, sectionKey: o, border: c }, ...n].slice(
51
+ return [{ value: e, sectionKey: o, border: n }, ...c].slice(
50
52
  0,
51
- f
53
+ b
52
54
  );
53
- })), d(e, o);
55
+ })), f(e, o);
54
56
  },
55
- [d, h, x]
56
- ), S = O(() => {
57
+ [f, d, N]
58
+ ), g = j(() => {
57
59
  const e = {};
58
- for (const o of m) e[o.key] = o;
60
+ for (const o of h) e[o.key] = o;
59
61
  return e;
60
- }, [m]), H = g(
62
+ }, [h]), I = w(
61
63
  (e, o) => {
62
- const l = (o ? S[o] : void 0)?.colors.find(
63
- (s) => w(s).value === e
64
- ), n = l ? w(l).label : void 0;
65
- return B(a, e, n);
64
+ const l = (o ? g[o] : void 0)?.colors.find(
65
+ (u) => L(u).value === e
66
+ ), c = l ? L(l).label : void 0;
67
+ return z(s, e, c);
66
68
  },
67
- [S, a]
68
- ), N = g(
69
- (e) => q(e) ? L ? "#FFFFFF" : "#000000" : e,
70
- [L]
69
+ [g, s]
70
+ ), x = w(
71
+ (e) => V(e) ? $ ? "#FFFFFF" : "#000000" : e,
72
+ [$]
71
73
  );
72
- return /* @__PURE__ */ k(u, { ref: b, children: [
73
- h && $.length > 0 && /* @__PURE__ */ k(u, { className: r.inlineSection, children: [
74
- /* @__PURE__ */ k(u, { className: r.inlineSectionLabelRow, children: [
75
- /* @__PURE__ */ t(u, { className: r.inlineSectionLabel, children: E }),
76
- /* @__PURE__ */ t("span", { className: r.inlineSectionCaption, children: V })
74
+ return /* @__PURE__ */ v(m, { ref: C, children: [
75
+ d && R.length > 0 && /* @__PURE__ */ v(m, { className: t.inlineSection, children: [
76
+ /* @__PURE__ */ v(m, { className: t.inlineSectionLabelRow, children: [
77
+ /* @__PURE__ */ r(m, { className: t.inlineSectionLabel, children: D }),
78
+ /* @__PURE__ */ r("span", { className: t.inlineSectionCaption, children: Y })
77
79
  ] }),
78
- /* @__PURE__ */ t(I, { className: r.inlineRow, gap: 2, children: $.map((e, o) => {
79
- const c = e.sectionKey ? S[e.sectionKey] : void 0, l = c?.key === "textColor" || c?.key === "color" || e.sectionKey === "color", n = H(
80
+ /* @__PURE__ */ r(A, { className: t.inlineRow, gap: 2, children: R.map((e, o) => {
81
+ const n = e.sectionKey ? g[e.sectionKey] : void 0, l = n?.key === "textColor" || n?.key === "color" || e.sectionKey === "color", c = I(
80
82
  e.value,
81
83
  e.sectionKey
82
84
  );
83
- return l ? /* @__PURE__ */ t(
84
- v,
85
+ return l ? /* @__PURE__ */ r(
86
+ S,
85
87
  {
86
88
  isActive: !1,
87
89
  disabled: i,
88
- tooltipLabel: n,
89
- onClick: () => C(e.value, e.sectionKey ?? ""),
90
- children: /* @__PURE__ */ t(
91
- K,
90
+ tooltipZIndex: a,
91
+ tooltipLabel: c,
92
+ onClick: () => k(e.value, e.sectionKey ?? ""),
93
+ children: /* @__PURE__ */ r(
94
+ B,
92
95
  {
93
96
  size: 20,
94
- color: N(e.value),
97
+ color: x(e.value),
95
98
  showBorder: !0
96
99
  }
97
100
  )
98
101
  },
99
102
  `${e.sectionKey}-${e.value}-${o}`
100
- ) : /* @__PURE__ */ t(
101
- v,
103
+ ) : /* @__PURE__ */ r(
104
+ S,
102
105
  {
103
106
  isActive: !1,
104
107
  round: !0,
105
108
  disabled: i,
106
- tooltipLabel: n,
107
- onClick: () => C(e.value, e.sectionKey ?? ""),
108
- children: /* @__PURE__ */ t(
109
- A,
109
+ tooltipZIndex: a,
110
+ tooltipLabel: c,
111
+ onClick: () => k(e.value, e.sectionKey ?? ""),
112
+ children: /* @__PURE__ */ r(
113
+ E,
110
114
  {
111
115
  bgColor: e.value,
112
116
  borderColor: e.border || "var(--mantine-color-default-border)"
@@ -117,37 +121,39 @@ const re = y(
117
121
  );
118
122
  }) })
119
123
  ] }),
120
- m.map((e) => {
124
+ h.map((e) => {
121
125
  const o = e.key === "highlight" || e.key === "background" || e.key === "textHighlight";
122
- return /* @__PURE__ */ k(u, { className: r.inlineSection, children: [
123
- e.label && /* @__PURE__ */ t(u, { className: r.inlineSectionLabel, children: e.label }),
124
- /* @__PURE__ */ t(I, { className: r.inlineRow, gap: 2, children: e.colors.map((c) => {
125
- const { value: l, border: n, label: s } = w(c), R = Y(l, e.value), F = N(l), T = B(a, l, s);
126
- return o ? /* @__PURE__ */ t(
127
- v,
126
+ return /* @__PURE__ */ v(m, { className: t.inlineSection, children: [
127
+ e.label && /* @__PURE__ */ r(m, { className: t.inlineSectionLabel, children: e.label }),
128
+ /* @__PURE__ */ r(A, { className: t.inlineRow, gap: 2, children: e.colors.map((n) => {
129
+ const { value: l, border: c, label: u } = L(n), F = G(l, e.value), T = x(l), K = z(s, l, u);
130
+ return o ? /* @__PURE__ */ r(
131
+ S,
128
132
  {
129
- isActive: R,
133
+ isActive: F,
130
134
  round: !0,
131
135
  disabled: i,
132
- tooltipLabel: T,
133
- onClick: () => C(l, e.key, n),
134
- children: /* @__PURE__ */ t(
135
- A,
136
+ tooltipZIndex: a,
137
+ tooltipLabel: K,
138
+ onClick: () => k(l, e.key, c),
139
+ children: /* @__PURE__ */ r(
140
+ E,
136
141
  {
137
142
  bgColor: l,
138
- borderColor: n || F
143
+ borderColor: c || T
139
144
  }
140
145
  )
141
146
  },
142
147
  l
143
- ) : /* @__PURE__ */ t(
144
- v,
148
+ ) : /* @__PURE__ */ r(
149
+ S,
145
150
  {
146
- isActive: R,
151
+ isActive: F,
147
152
  disabled: i,
148
- tooltipLabel: T,
149
- onClick: () => C(l, e.key),
150
- children: /* @__PURE__ */ t(K, { size: 20, color: F, showBorder: !0 })
153
+ tooltipZIndex: a,
154
+ tooltipLabel: K,
155
+ onClick: () => k(l, e.key),
156
+ children: /* @__PURE__ */ r(B, { size: 20, color: T, showBorder: !0 })
151
157
  },
152
158
  l
153
159
  );
@@ -158,5 +164,5 @@ const re = y(
158
164
  }
159
165
  );
160
166
  export {
161
- re as ColorPickerToolbar
167
+ ce as ColorPickerToolbar
162
168
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CommentComposerTypes } from './types';
3
- export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, commentDraft, onBlur, inputContainerRef, isFloat, isEdit, hasChanges, ns, }: {
3
+ export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, commentDraft, onBlur, inputContainerRef, isFloat, isEdit, hasChanges, ns, forceAutoFocus, }: {
4
4
  children: React.ReactNode;
5
5
  onSubmit: () => void;
6
6
  editorRef: React.MutableRefObject<any>;
@@ -14,5 +14,6 @@ export declare const CommentEditorHandler: ({ children, onSubmit, editorRef, com
14
14
  isEdit: boolean;
15
15
  hasChanges: boolean;
16
16
  ns: string;
17
+ forceAutoFocus?: boolean;
17
18
  }) => import("react/jsx-runtime").JSX.Element;
18
19
  //# sourceMappingURL=CommentEditorHotkeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentEditorHotkeys.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/CommentEditorHotkeys.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,8GAWlC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;KACjD,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,4CA2KA,CAAC"}
1
+ {"version":3,"file":"CommentEditorHotkeys.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/CommentEditorHotkeys.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C,eAAO,MAAM,oBAAoB,GAAI,8HAYlC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;KACjD,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,4CA6KA,CAAC"}
@@ -1,55 +1,58 @@
1
- import { jsx as S } from "react/jsx-runtime";
2
- import { useRef as C, useEffect as u } from "react";
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { useRef as T, useEffect as u } from "react";
3
3
  import { useTranslation as k } from "react-i18next";
4
4
  import { openRemoveConfirmModal as P } from "../modals/RemoveConfirmModal.js";
5
- import w from "./CommentComposer.module.css.js";
6
- const M = ({
5
+ import v from "./CommentComposer.module.css.js";
6
+ const W = ({
7
7
  children: b,
8
8
  onSubmit: E,
9
- editorRef: m,
9
+ editorRef: a,
10
10
  commentDraft: f,
11
11
  onBlur: c,
12
12
  inputContainerRef: p,
13
- isFloat: v,
13
+ isFloat: w,
14
14
  isEdit: i,
15
15
  hasChanges: s,
16
- ns: y
16
+ ns: L,
17
+ forceAutoFocus: S
17
18
  }) => {
18
- const d = C(null), L = i || v, { t: r } = k(y);
19
+ const d = T(null), g = i || w || S, { t: r } = k(L);
19
20
  return u(() => {
20
21
  const t = (e) => {
21
22
  if (e.code === "Enter" && !e.shiftKey) {
22
- if (e.stopPropagation(), i ? s : !s) return;
23
+ if (document.querySelector('[id^="mention-item-"]') || (e.stopPropagation(), i ? s : !s)) return;
23
24
  d.current && d.current.contains(document.activeElement) && (e.preventDefault(), E());
24
25
  }
25
26
  };
26
27
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
27
28
  }, [E, i, s]), u(() => {
28
- if (!L) return;
29
- const t = m.current;
30
- t && setTimeout(() => {
29
+ if (!g) return;
30
+ const t = a.current;
31
+ if (!t) return;
32
+ const e = window.setTimeout(() => {
31
33
  t.focus(() => ({ defaultSelection: "rootEnd" }));
32
34
  }, 100);
33
- }, []), u(() => {
34
- const t = m.current;
35
+ return () => window.clearTimeout(e);
36
+ }, [g]), u(() => {
37
+ const t = a.current;
35
38
  if (!t) return;
36
39
  const e = () => setTimeout(() => {
37
40
  t.focus(() => ({ defaultSelection: "rootEnd" }));
38
- }, 0), o = (a) => {
39
- const n = a.target;
41
+ }, 0), o = (m) => {
42
+ const n = m.target;
40
43
  if (!n || n.closest("button") || n.closest("[data-no-focus]")) return;
41
44
  if (n.closest("[data-editor-spacer='true']")) {
42
45
  e();
43
46
  return;
44
47
  }
45
- const l = n.closest(`.${w.commentComposerWrapper}`);
48
+ const l = n.closest(`.${v.commentComposerWrapper}`);
46
49
  if (!l) return;
47
- const g = l.querySelector("[data-comment-footer]");
48
- if (!g || !g.contains(n)) return;
49
- l.querySelector(`.${w.imagePreviewWrapper}`) || l.querySelector(`.${w.filePreviewWrapper}`) || e();
50
+ const y = l.querySelector("[data-comment-footer]");
51
+ if (!y || !y.contains(n)) return;
52
+ l.querySelector(`.${v.imagePreviewWrapper}`) || l.querySelector(`.${v.filePreviewWrapper}`) || e();
50
53
  };
51
54
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
52
- }, [m]), u(() => {
55
+ }, [a]), u(() => {
53
56
  const t = d.current;
54
57
  if (!t) return;
55
58
  const e = () => {
@@ -62,8 +65,8 @@ const M = ({
62
65
  const t = (e) => {
63
66
  const o = e.target;
64
67
  if (!o) return;
65
- const a = p.current;
66
- if (a && !a.contains(o) && !(o.closest(".mantine-Modal-root") || o.closest(".floating-text-format-popup") || o.closest('[data-test-id="floating-link-dropdown"]'))) {
68
+ const m = p.current;
69
+ if (m && !m.contains(o) && !(o.closest(".mantine-Modal-root") || o.closest(".floating-text-format-popup") || o.closest('[data-test-id="floating-link-dropdown"]'))) {
67
70
  if (i) {
68
71
  if (!s) {
69
72
  e.stopPropagation(), e.preventDefault(), P({
@@ -84,7 +87,7 @@ const M = ({
84
87
  c?.();
85
88
  return;
86
89
  }
87
- if (v) {
90
+ if (w) {
88
91
  if (f.text.trim() !== "" || (f.files?.length ?? 0) > 0) {
89
92
  e.stopPropagation(), e.preventDefault(), P({
90
93
  title: r("editor.composer.discardCommentTitle"),
@@ -106,8 +109,8 @@ const M = ({
106
109
  }
107
110
  };
108
111
  return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
109
- }, [i, v, s, f, c]), /* @__PURE__ */ S("div", { ref: d, children: b });
112
+ }, [i, w, s, f, c]), /* @__PURE__ */ C("div", { ref: d, children: b });
110
113
  };
111
114
  export {
112
- M as CommentEditorHandler
115
+ W as CommentEditorHandler
113
116
  };
@@ -1,3 +1,3 @@
1
1
  import { CommentComposerProps } from './types';
2
- export declare const CommentComposer: ({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const CommentComposer: ({ children, onSubmit, initialDraft, updateLocation, onBlur, setEdit, ns, autoFocus, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=index.d.ts.map