@layers-app/shared 0.4.7 → 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 (378) 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/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  5. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  6. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  7. package/dist/components/AppContainer/AppContainer.js +76 -71
  8. package/dist/components/AppContainer/AppContainer.module.css.js +14 -14
  9. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +77 -49
  11. package/dist/components/AppContainer/components/NavbarContent.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/NavbarContent.js +16 -2
  13. package/dist/components/AppContainer/components/ToolSidebar.d.ts +5 -0
  14. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/ToolSidebar.js +42 -30
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +90 -90
  17. package/dist/components/AppContainer/types.d.ts +12 -0
  18. package/dist/components/AppContainer/types.d.ts.map +1 -1
  19. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  20. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +0 -2
  21. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts.map +1 -1
  22. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +17 -22
  23. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +22 -22
  24. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +120 -172
  26. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  27. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +28 -32
  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 +22 -20
  32. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -4
  33. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +8 -8
  34. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +1 -1
  35. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +1 -1
  36. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +44 -44
  37. package/dist/components/Chat/ChatInput/index.d.ts +13 -1
  38. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -1
  39. package/dist/components/Chat/ChatInput/index.js +264 -164
  40. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts +16 -0
  41. package/dist/components/Chat/ChatInput/useVoiceRecorder.d.ts.map +1 -0
  42. package/dist/components/Chat/ChatInput/useVoiceRecorder.js +83 -0
  43. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +4 -4
  44. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +20 -16
  45. package/dist/components/Chat/ChatMessage/index.d.ts +16 -0
  46. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -1
  47. package/dist/components/Chat/ChatMessage/index.js +153 -118
  48. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +1 -1
  49. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +4 -4
  50. package/dist/components/Chat/DialogList/DialogList.module.css.js +1 -1
  51. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +4 -4
  52. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +1 -1
  53. package/dist/components/Chat/MessageActions/index.d.ts +2 -0
  54. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -1
  55. package/dist/components/Chat/MessageActions/index.js +188 -50
  56. package/dist/components/Chat/MessageAuthor/index.d.ts +7 -1
  57. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -1
  58. package/dist/components/Chat/MessageAuthor/index.js +39 -25
  59. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +1 -1
  60. package/dist/components/Chat/MessageList/MessageList.module.css.js +14 -12
  61. package/dist/components/Chat/MessageList/index.d.ts +17 -25
  62. package/dist/components/Chat/MessageList/index.d.ts.map +1 -1
  63. package/dist/components/Chat/MessageList/index.js +201 -149
  64. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +3 -3
  65. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +12 -12
  66. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +7 -7
  67. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +8 -8
  68. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +1 -1
  69. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  70. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  71. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  72. package/dist/components/ColorPicker/ColorPickerList.js +83 -72
  73. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +1 -0
  74. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  75. package/dist/components/ColorPicker/ColorPickerToolbar.js +94 -85
  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/CommentComposer/CommentComposer.module.css.js +4 -4
  84. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +2 -1
  85. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
  86. package/dist/components/CommentComposer/CommentEditorHotkeys.js +29 -26
  87. package/dist/components/CommentComposer/index.d.ts +1 -1
  88. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  89. package/dist/components/CommentComposer/index.js +70 -68
  90. package/dist/components/CommentComposer/types.d.ts +6 -0
  91. package/dist/components/CommentComposer/types.d.ts.map +1 -1
  92. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  93. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  94. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  95. package/dist/components/CustomKBD/index.js +21 -22
  96. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  97. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  98. package/dist/components/EmojiPicker/EmojiPicker.js +129 -121
  99. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  100. package/dist/components/EntityTitle/EntityTitle.d.ts +3 -4
  101. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  102. package/dist/components/EntityTitle/EntityTitle.js +81 -80
  103. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  104. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  105. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  106. package/dist/components/FilePicker/FilePicker.module.css.js +7 -7
  107. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  108. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  109. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  110. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  111. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  112. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  113. package/dist/components/FormViewer/helpers/conditions.d.ts.map +1 -1
  114. package/dist/components/FormViewer/helpers/conditions.js +33 -17
  115. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  116. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  117. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  118. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  119. package/dist/components/Loaders/styles.module.css.js +6 -6
  120. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  121. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  122. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  123. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  124. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  125. package/dist/components/Notification/InfiniteScroll.d.ts +12 -0
  126. package/dist/components/Notification/InfiniteScroll.d.ts.map +1 -0
  127. package/dist/components/Notification/InfiniteScroll.js +42 -0
  128. package/dist/components/Notification/Notification.d.ts +4 -1
  129. package/dist/components/Notification/Notification.d.ts.map +1 -1
  130. package/dist/components/Notification/Notification.module.css.js +28 -4
  131. package/dist/components/Notification/atoms/ActionBadge.d.ts +11 -0
  132. package/dist/components/Notification/atoms/ActionBadge.d.ts.map +1 -0
  133. package/dist/components/Notification/atoms/ActionBadge.js +53 -0
  134. package/dist/components/Notification/atoms/ArchiveIcon.d.ts +7 -0
  135. package/dist/components/Notification/atoms/ArchiveIcon.d.ts.map +1 -0
  136. package/dist/components/Notification/atoms/ArchiveIcon.js +40 -0
  137. package/dist/components/Notification/atoms/InboxIcon.d.ts +7 -0
  138. package/dist/components/Notification/atoms/InboxIcon.d.ts.map +1 -0
  139. package/dist/components/Notification/atoms/InboxIcon.js +33 -0
  140. package/dist/components/Notification/atoms/MarkReadIcon.d.ts +7 -0
  141. package/dist/components/Notification/atoms/MarkReadIcon.d.ts.map +1 -0
  142. package/dist/components/Notification/atoms/MarkReadIcon.js +33 -0
  143. package/dist/components/Notification/atoms/ResourceIcon.d.ts +7 -0
  144. package/dist/components/Notification/atoms/ResourceIcon.d.ts.map +1 -0
  145. package/dist/components/Notification/atoms/TabBadge.d.ts +7 -0
  146. package/dist/components/Notification/atoms/TabBadge.d.ts.map +1 -0
  147. package/dist/components/Notification/atoms/TabBadge.js +32 -0
  148. package/dist/components/Notification/atoms/UnreadDot.d.ts +6 -0
  149. package/dist/components/Notification/atoms/UnreadDot.d.ts.map +1 -0
  150. package/dist/components/Notification/atoms/UnreadDot.js +23 -0
  151. package/dist/components/Notification/atoms/index.d.ts +5 -0
  152. package/dist/components/Notification/atoms/index.d.ts.map +1 -0
  153. package/dist/components/Notification/hooks/index.d.ts +8 -0
  154. package/dist/components/Notification/hooks/index.d.ts.map +1 -0
  155. package/dist/components/Notification/hooks/useInboxActions.d.ts +12 -0
  156. package/dist/components/Notification/hooks/useInboxActions.d.ts.map +1 -0
  157. package/dist/components/Notification/hooks/useInboxActions.js +58 -0
  158. package/dist/components/Notification/hooks/useInboxLoader.d.ts +8 -0
  159. package/dist/components/Notification/hooks/useInboxLoader.d.ts.map +1 -0
  160. package/dist/components/Notification/hooks/useInboxLoader.js +49 -0
  161. package/dist/components/Notification/hooks/useNotificationItem.d.ts +26 -0
  162. package/dist/components/Notification/hooks/useNotificationItem.d.ts.map +1 -0
  163. package/dist/components/Notification/hooks/useNotificationItem.js +51 -0
  164. package/dist/components/Notification/hooks/useNotificationStore.d.ts +49 -0
  165. package/dist/components/Notification/hooks/useNotificationStore.d.ts.map +1 -0
  166. package/dist/components/Notification/hooks/useNotificationStore.js +139 -0
  167. package/dist/components/Notification/hooks/useNotificationStream.d.ts +2 -0
  168. package/dist/components/Notification/hooks/useNotificationStream.d.ts.map +1 -0
  169. package/dist/components/Notification/hooks/useNotificationStream.js +86 -0
  170. package/dist/components/Notification/hooks/useNotificationTime.d.ts +2 -0
  171. package/dist/components/Notification/hooks/useNotificationTime.d.ts.map +1 -0
  172. package/dist/components/Notification/hooks/useNotificationTime.js +23 -0
  173. package/dist/components/Notification/hooks/useNotificationsApi.d.ts +25 -0
  174. package/dist/components/Notification/hooks/useNotificationsApi.d.ts.map +1 -0
  175. package/dist/components/Notification/hooks/useNotificationsApi.js +64 -0
  176. package/dist/components/Notification/lib/api.d.ts +4 -0
  177. package/dist/components/Notification/lib/api.d.ts.map +1 -0
  178. package/dist/components/Notification/lib/api.js +19 -0
  179. package/dist/components/Notification/lib/index.d.ts +5 -0
  180. package/dist/components/Notification/lib/index.d.ts.map +1 -0
  181. package/dist/components/Notification/lib/notificationText.d.ts +10 -0
  182. package/dist/components/Notification/lib/notificationText.d.ts.map +1 -0
  183. package/dist/components/Notification/lib/notificationText.js +131 -0
  184. package/dist/components/Notification/lib/stripHtml.d.ts +2 -0
  185. package/dist/components/Notification/lib/stripHtml.d.ts.map +1 -0
  186. package/dist/components/Notification/lib/stripHtml.js +6 -0
  187. package/dist/components/Notification/lib/types.d.ts +45 -0
  188. package/dist/components/Notification/lib/types.d.ts.map +1 -0
  189. package/dist/components/Notification/lib/types.js +9 -0
  190. package/dist/components/Notification/molecules/InboxEmpty.d.ts +8 -0
  191. package/dist/components/Notification/molecules/InboxEmpty.d.ts.map +1 -0
  192. package/dist/components/Notification/molecules/InboxEmpty.js +21 -0
  193. package/dist/components/Notification/molecules/InboxHeader.d.ts +17 -0
  194. package/dist/components/Notification/molecules/InboxHeader.d.ts.map +1 -0
  195. package/dist/components/Notification/molecules/InboxHeader.js +73 -0
  196. package/dist/components/Notification/molecules/InboxTabs.d.ts +15 -0
  197. package/dist/components/Notification/molecules/InboxTabs.d.ts.map +1 -0
  198. package/dist/components/Notification/molecules/InboxTabs.js +60 -0
  199. package/dist/components/Notification/molecules/NotificationActions.d.ts +9 -0
  200. package/dist/components/Notification/molecules/NotificationActions.d.ts.map +1 -0
  201. package/dist/components/Notification/molecules/NotificationActions.js +64 -0
  202. package/dist/components/Notification/molecules/NotificationAvatar.d.ts +17 -0
  203. package/dist/components/Notification/molecules/NotificationAvatar.d.ts.map +1 -0
  204. package/dist/components/Notification/molecules/NotificationAvatar.js +38 -0
  205. package/dist/components/Notification/molecules/NotificationContent.d.ts +22 -0
  206. package/dist/components/Notification/molecules/NotificationContent.d.ts.map +1 -0
  207. package/dist/components/Notification/molecules/NotificationContent.js +183 -0
  208. package/dist/components/Notification/molecules/index.d.ts +7 -0
  209. package/dist/components/Notification/molecules/index.d.ts.map +1 -0
  210. package/dist/components/Notification/organisms/InboxItem.d.ts +14 -0
  211. package/dist/components/Notification/organisms/InboxItem.d.ts.map +1 -0
  212. package/dist/components/Notification/organisms/InboxItem.js +100 -0
  213. package/dist/components/Notification/organisms/InboxPanel.d.ts +4 -0
  214. package/dist/components/Notification/organisms/InboxPanel.d.ts.map +1 -0
  215. package/dist/components/Notification/organisms/InboxPanel.js +99 -0
  216. package/dist/components/Notification/organisms/index.d.ts +3 -0
  217. package/dist/components/Notification/organisms/index.d.ts.map +1 -0
  218. package/dist/components/PillTabs/PillTabs.module.css.js +1 -1
  219. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  220. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  221. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  222. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  223. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  224. package/dist/components/modals/RemoveConfirmModal.js +27 -26
  225. package/dist/components/table/FrontTable.d.ts.map +1 -1
  226. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  227. package/dist/config/envConfig.d.ts +2 -0
  228. package/dist/config/envConfig.d.ts.map +1 -1
  229. package/dist/config/envConfig.js +29 -28
  230. package/dist/helpers/getFileIcons.js +5 -5
  231. package/dist/helpers/getFileType.d.ts.map +1 -1
  232. package/dist/helpers/getFileType.js +11 -2
  233. package/dist/helpers/platform.d.ts +1 -1
  234. package/dist/helpers/platform.d.ts.map +1 -1
  235. package/dist/helpers/platform.js +1 -0
  236. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  237. package/dist/helpers/showNotifications.module.css.js +1 -1
  238. package/dist/index.css +1 -1
  239. package/dist/index.d.ts +0 -2
  240. package/dist/index.d.ts.map +1 -1
  241. package/dist/index.js +560 -571
  242. package/dist/lang/locales/ui_en.json.js +1 -1
  243. package/dist/lang/locales/ui_es.json.js +1 -1
  244. package/dist/lang/locales/ui_ru.json.js +1 -1
  245. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.context.js +15 -0
  246. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.js +228 -0
  247. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/Audio.module.css.js +4 -0
  248. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioControls.js +19 -0
  249. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioMuteButton.js +30 -0
  250. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioPlayButton.js +40 -0
  251. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSkipButton.js +28 -0
  252. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpectrum.js +137 -0
  253. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioSpeedControl.js +31 -0
  254. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeDisplay.js +44 -0
  255. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioTimeline.js +71 -0
  256. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioVolumeSlider.js +43 -0
  257. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/components/AudioWaveform.js +166 -0
  258. package/dist/node_modules/@gfazioli/mantine-audio/dist/esm/use-audio.js +201 -0
  259. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.context.js +15 -0
  260. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.js +272 -0
  261. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/Video.module.css.js +4 -0
  262. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoCaptionsButton.js +55 -0
  263. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoControls.js +30 -0
  264. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoFullscreenButton.js +31 -0
  265. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoMuteButton.js +29 -0
  266. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPiPButton.js +29 -0
  267. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoPlayButton.js +28 -0
  268. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoSkipButton.js +27 -0
  269. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeDisplay.js +44 -0
  270. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/components/VideoTimeline.js +70 -0
  271. package/dist/node_modules/@gfazioli/mantine-video/dist/esm/use-video.js +170 -0
  272. package/docs/README.md +499 -499
  273. package/package.json +80 -79
  274. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts +0 -15
  275. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.d.ts.map +0 -1
  276. package/dist/components/AttachmentsGalleryModal/components/AttachmentVideoPlayer.js +0 -36
  277. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts +0 -14
  278. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.d.ts.map +0 -1
  279. package/dist/components/AttachmentsGalleryModal/components/LegacyAttachmentVideoPlayer.js +0 -31
  280. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts +0 -18
  281. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.d.ts.map +0 -1
  282. package/dist/components/AttachmentsGalleryModal/components/StatusVideoPlayer.js +0 -35
  283. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts +0 -33
  284. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.d.ts.map +0 -1
  285. package/dist/components/AttachmentsGalleryModal/components/useAttachmentVideoStatus.js +0 -70
  286. package/dist/components/Notification/Notification.js +0 -119
  287. package/dist/components/Notification/NotificationCard.d.ts +0 -10
  288. package/dist/components/Notification/NotificationCard.d.ts.map +0 -1
  289. package/dist/components/Notification/NotificationCard.js +0 -93
  290. package/dist/components/VideoPlayer/VideoPlayer.d.ts +0 -24
  291. package/dist/components/VideoPlayer/VideoPlayer.d.ts.map +0 -1
  292. package/dist/components/VideoPlayer/VideoPlayer.js +0 -727
  293. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts +0 -8
  294. package/dist/components/VideoPlayer/components/MobileDrawer/index.d.ts.map +0 -1
  295. package/dist/components/VideoPlayer/components/MobileDrawer/index.js +0 -67
  296. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts +0 -7
  297. package/dist/components/VideoPlayer/components/SelectListOptionButton.d.ts.map +0 -1
  298. package/dist/components/VideoPlayer/components/SelectListOptionButton.js +0 -44
  299. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts +0 -9
  300. package/dist/components/VideoPlayer/components/StoryboardPreview.d.ts.map +0 -1
  301. package/dist/components/VideoPlayer/components/StoryboardPreview.js +0 -38
  302. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts +0 -33
  303. package/dist/components/VideoPlayer/components/VideoCustomControls.d.ts.map +0 -1
  304. package/dist/components/VideoPlayer/components/VideoCustomControls.js +0 -601
  305. package/dist/components/VideoPlayer/components/VideoIcons.d.ts +0 -25
  306. package/dist/components/VideoPlayer/components/VideoIcons.d.ts.map +0 -1
  307. package/dist/components/VideoPlayer/components/VideoIcons.js +0 -145
  308. package/dist/components/VideoPlayer/components/VideoMenu.d.ts +0 -27
  309. package/dist/components/VideoPlayer/components/VideoMenu.d.ts.map +0 -1
  310. package/dist/components/VideoPlayer/components/VideoMenu.js +0 -77
  311. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts +0 -17
  312. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.d.ts.map +0 -1
  313. package/dist/components/VideoPlayer/components/VideoMobileSettingsDrawer.js +0 -289
  314. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts +0 -10
  315. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.d.ts.map +0 -1
  316. package/dist/components/VideoPlayer/components/VideoQualityMenu/index.js +0 -55
  317. package/dist/components/VideoPlayer/components/VideoSelect.d.ts +0 -10
  318. package/dist/components/VideoPlayer/components/VideoSelect.d.ts.map +0 -1
  319. package/dist/components/VideoPlayer/components/VideoSelect.js +0 -168
  320. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts +0 -12
  321. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.d.ts.map +0 -1
  322. package/dist/components/VideoPlayer/components/VideoSettingsMenu/index.js +0 -48
  323. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts +0 -25
  324. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.d.ts.map +0 -1
  325. package/dist/components/VideoPlayer/components/VideoSettingsModal/ChaptersSection.js +0 -384
  326. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts +0 -21
  327. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.d.ts.map +0 -1
  328. package/dist/components/VideoPlayer/components/VideoSettingsModal/CoverSection.js +0 -264
  329. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts +0 -10
  330. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.d.ts.map +0 -1
  331. package/dist/components/VideoPlayer/components/VideoSettingsModal/FooterActions.js +0 -39
  332. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts +0 -14
  333. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.d.ts.map +0 -1
  334. package/dist/components/VideoPlayer/components/VideoSettingsModal/ManualSubtitlesPanel.js +0 -360
  335. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts +0 -16
  336. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitleTrackRow.d.ts.map +0 -1
  337. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts +0 -14
  338. package/dist/components/VideoPlayer/components/VideoSettingsModal/SubtitlesSection.d.ts.map +0 -1
  339. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts +0 -4
  340. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.d.ts.map +0 -1
  341. package/dist/components/VideoPlayer/components/VideoSettingsModal/context.js +0 -14
  342. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts +0 -22
  343. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.d.ts.map +0 -1
  344. package/dist/components/VideoPlayer/components/VideoSettingsModal/index.js +0 -211
  345. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts +0 -11
  346. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.d.ts.map +0 -1
  347. package/dist/components/VideoPlayer/components/VideoSpeedMenu/index.js +0 -41
  348. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts +0 -10
  349. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.d.ts.map +0 -1
  350. package/dist/components/VideoPlayer/components/VideoSubtitlesMenu/index.js +0 -69
  351. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts +0 -21
  352. package/dist/components/VideoPlayer/hooks/useStoryboard.d.ts.map +0 -1
  353. package/dist/components/VideoPlayer/hooks/useStoryboard.js +0 -91
  354. package/dist/components/VideoPlayer/index.d.ts +0 -11
  355. package/dist/components/VideoPlayer/index.d.ts.map +0 -1
  356. package/dist/components/VideoPlayer/types.d.ts +0 -101
  357. package/dist/components/VideoPlayer/types.d.ts.map +0 -1
  358. package/dist/components/VideoPlayer/utils/chapters.d.ts +0 -8
  359. package/dist/components/VideoPlayer/utils/chapters.d.ts.map +0 -1
  360. package/dist/components/VideoPlayer/utils/chapters.js +0 -38
  361. package/dist/components/VideoPlayer/utils/storyboard.d.ts +0 -5
  362. package/dist/components/VideoPlayer/utils/storyboard.d.ts.map +0 -1
  363. package/dist/components/VideoPlayer/utils/storyboard.js +0 -47
  364. package/dist/components/VideoPlayer/utils/subtitles.d.ts +0 -18
  365. package/dist/components/VideoPlayer/utils/subtitles.d.ts.map +0 -1
  366. package/dist/components/VideoPlayer/utils/subtitles.js +0 -23
  367. package/dist/components/VideoPlayer/utils/touch.d.ts +0 -3
  368. package/dist/components/VideoPlayer/utils/touch.d.ts.map +0 -1
  369. package/dist/components/VideoPlayer/utils/touch.js +0 -5
  370. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts +0 -10
  371. package/dist/components/VideoPlayer/utils/videoPlayerUtils.d.ts.map +0 -1
  372. package/dist/components/VideoPlayer/utils/videoPlayerUtils.js +0 -22
  373. package/dist/components/VideoPlayer/utils/videoSettings.d.ts +0 -69
  374. package/dist/components/VideoPlayer/utils/videoSettings.d.ts.map +0 -1
  375. package/dist/components/VideoPlayer/utils/videoSettings.js +0 -90
  376. package/dist/videoSettings/createVideoSettingsDataSource.d.ts +0 -19
  377. package/dist/videoSettings/createVideoSettingsDataSource.d.ts.map +0 -1
  378. package/dist/videoSettings/createVideoSettingsDataSource.js +0 -127
@@ -1,257 +1,333 @@
1
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
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,
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { useState as O, useRef as N, useEffect as q, useCallback as d } from "react";
3
+ import { Edit04Icon as fe, LinkBackwardIcon as pe, Image01Icon as ve, PlayIcon as ge, File01Icon as xe, AtIcon as Ne, Attachment02Icon as Ie, Delete02Icon as we, Mic01Icon as Ce, Sent02Icon as ze } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as u } from "@hugeicons/react";
5
+ import { Box as J, Button as Re, CloseButton as A, Group as ke, Text as Q, ActionIcon as I, Textarea as Pe } from "@mantine/core";
6
+ import { AttachmentsPreview as be } from "../../AttachmentsPreview/AttachmentsPreview.js";
7
+ import { EmojiPicker as ye } from "../../EmojiPicker/EmojiPicker.js";
8
+ import { IconEntity as Be } from "../../ProjectIcon/ProjectIcon.js";
9
+ import { SmilePlusIcon as De } from "./smilePlusIcon.js";
10
+ import { useVoiceRecorder as Me, isVoiceRecordingSupported as Ae } from "./useVoiceRecorder.js";
11
+ import t from "./ChatInput.module.css.js";
12
+ function Se({
13
+ value: S,
13
14
  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
15
+ onSend: $,
16
+ onAttach: g,
17
+ onEmojiSelect: R,
18
+ onMention: j,
19
+ onGifSelect: F,
20
+ onVoiceRecorded: k,
21
+ placeholder: W = "Add a message...",
22
+ replyTo: a,
23
+ editing: m,
24
+ notice: c,
25
+ attachments: l,
26
+ onRemoveAttachment: Y,
27
+ maxLength: Z,
28
+ disabled: s,
29
+ disableAttachments: w,
30
+ className: _,
31
+ style: ee
29
32
  }) {
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);
33
+ const P = S !== void 0, [ne, te] = O(""), p = P ? S : ne, C = N(null), b = N(null), K = N(l?.length ?? 0);
34
+ q(() => {
35
+ const e = l?.length ?? 0;
36
+ e > K.current && b.current?.focus(), K.current = e;
37
+ }, [l?.length]);
38
+ const T = !!a, H = !!m;
39
+ q(() => {
40
+ (T || H) && b.current?.focus();
41
+ }, [T, H]);
42
+ const x = d(
43
+ (e) => {
44
+ P || te(e), E?.(e);
42
45
  },
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());
46
+ [P, E]
47
+ ), y = d(() => {
48
+ const e = p.trim();
49
+ (e || l && l.length > 0) && ($?.(e), x(""));
50
+ }, [p, l, $, x]), ie = d(
51
+ (e) => {
52
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), y());
50
53
  },
51
- [I]
52
- ), q = d(
53
- (n) => {
54
- const t = me.parse(n)?.emoji ?? n;
55
- N ? N(t) : f(o + t);
54
+ [y]
55
+ ), ae = d(
56
+ (e) => {
57
+ const i = Be.parse(e)?.emoji ?? e;
58
+ R ? R(i) : x(p + i);
56
59
  },
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 = "");
60
+ [R, x, p]
61
+ ), re = d(
62
+ (e) => {
63
+ const i = e.target.files;
64
+ i && i.length > 0 && g?.(Array.from(i)), C.current && (C.current.value = "");
62
65
  },
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);
66
+ [g]
67
+ ), se = d(
68
+ (e) => {
69
+ if (s || w || !g) return;
70
+ const i = e.clipboardData?.items;
71
+ if (!i) return;
72
+ const h = [];
73
+ for (let f = 0; f < i.length; f++) {
74
+ const G = i[f];
75
+ if (G.kind === "file") {
76
+ const L = G.getAsFile();
77
+ L && h.push(L);
75
78
  }
76
79
  }
77
- w.length > 0 && (n.preventDefault(), u(w));
80
+ h.length > 0 && (e.preventDefault(), g(h));
78
81
  },
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);
81
- return /* @__PURE__ */ s(
82
- le,
82
+ [s, w, g]
83
+ ), oe = p.trim().length > 0, B = l && l.length > 0, U = B && l.some((e) => "isTemp" in e && e.isTemp), V = oe || B && !U, ce = !!(m || a), o = Me(), le = !!k && Ae() && !V && !m && !s, [v, z] = O(!1), D = N(!1), X = N(0), M = d(
84
+ async (e) => {
85
+ if (e || v) {
86
+ o.cancel(), z(!1);
87
+ return;
88
+ }
89
+ const i = await o.stop();
90
+ if (z(!1), i && i.blob.size > 0 && i.durationMs >= 500) {
91
+ const h = i.mime.includes("mp4") ? "m4a" : i.mime.includes("ogg") ? "ogg" : "webm", f = new File([i.blob], `voice-message.${h}`, {
92
+ type: i.mime
93
+ });
94
+ k?.(f, i.durationMs);
95
+ }
96
+ },
97
+ [v, o, k]
98
+ ), de = d(
99
+ async (e) => {
100
+ if (s) return;
101
+ e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), X.current = e.clientX, D.current = !0, z(!1), await o.start() && !D.current && o.cancel();
102
+ },
103
+ [s, o]
104
+ ), me = d(
105
+ (e) => {
106
+ if (!o.isRecording) return;
107
+ const i = e.clientX - X.current;
108
+ z(i < -90);
109
+ },
110
+ [o.isRecording]
111
+ ), ue = d(
112
+ (e) => {
113
+ e.currentTarget.releasePointerCapture?.(e.pointerId), D.current = !1, M(!1);
114
+ },
115
+ [M]
116
+ ), he = (e) => {
117
+ const i = Math.floor(e / 1e3), h = Math.floor(i / 60), f = i % 60;
118
+ return `${h}:${f.toString().padStart(2, "0")}`;
119
+ };
120
+ return /* @__PURE__ */ r(
121
+ J,
83
122
  {
84
- className: `${e.root} ${L || ""}`,
85
- style: M,
123
+ className: `${t.root} ${_ || ""}`,
124
+ style: ee,
86
125
  "data-testid": "chat-input",
87
126
  px: "md",
88
127
  pb: "md",
89
128
  children: [
90
- !v && /* @__PURE__ */ a(
129
+ !w && /* @__PURE__ */ n(
91
130
  "input",
92
131
  {
93
- ref: p,
132
+ ref: C,
94
133
  type: "file",
95
134
  multiple: !0,
96
135
  accept: "*/*",
97
- className: e.hiddenFileInput,
98
- onChange: J,
136
+ className: t.hiddenFileInput,
137
+ onChange: re,
99
138
  tabIndex: -1
100
139
  }
101
140
  ),
102
- /* @__PURE__ */ s("div", { className: e.inputRow, children: [
103
- /* @__PURE__ */ s(
141
+ /* @__PURE__ */ r("div", { className: t.inputRow, children: [
142
+ /* @__PURE__ */ r(
104
143
  "div",
105
144
  {
106
- className: `${e.inputBox} ${Y ? e.withHeader : ""}`,
107
- "data-disabled": c || void 0,
145
+ className: `${t.inputBox} ${ce ? t.withHeader : ""}`,
146
+ "data-disabled": s || void 0,
108
147
  children: [
109
- l ? /* @__PURE__ */ s(
148
+ c ? /* @__PURE__ */ r(
110
149
  "div",
111
150
  {
112
- className: e.notice,
113
- "data-variant": l.variant ?? "warning",
151
+ className: t.notice,
152
+ "data-variant": c.variant ?? "warning",
114
153
  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,
154
+ c.icon ? /* @__PURE__ */ n("span", { className: t.noticeIcon, children: c.icon }) : null,
155
+ /* @__PURE__ */ r("div", { className: t.noticeMain, children: [
156
+ /* @__PURE__ */ n("span", { className: t.noticeText, children: c.text }),
157
+ c.action ? /* @__PURE__ */ n(
158
+ Re,
120
159
  {
121
160
  size: "compact-xs",
122
161
  variant: "white",
123
162
  radius: "xl",
124
- className: e.noticeAction,
125
- onClick: l.action.onClick,
126
- children: l.action.label
163
+ className: t.noticeAction,
164
+ onClick: c.action.onClick,
165
+ children: c.action.label
127
166
  }
128
167
  ) : null
129
168
  ] }),
130
- l.onDismiss ? /* @__PURE__ */ a(
131
- B,
169
+ c.onDismiss ? /* @__PURE__ */ n(
170
+ A,
132
171
  {
133
172
  size: "sm",
134
- className: e.noticeDismiss,
135
- onClick: l.onDismiss,
173
+ className: t.noticeDismiss,
174
+ onClick: c.onDismiss,
136
175
  "aria-label": "Dismiss"
137
176
  }
138
177
  ) : null
139
178
  ]
140
179
  }
141
180
  ) : 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 })
181
+ m ? /* @__PURE__ */ r("div", { className: t.header, children: [
182
+ /* @__PURE__ */ n("div", { className: t.headerIcon, children: /* @__PURE__ */ n(u, { icon: fe, size: 20 }) }),
183
+ /* @__PURE__ */ r("div", { className: t.headerBar, "data-variant": "edit", children: [
184
+ /* @__PURE__ */ n("div", { className: t.headerTitle, "data-variant": "edit", children: "Edit" }),
185
+ /* @__PURE__ */ n("div", { className: t.headerText, children: m.text })
147
186
  ] }),
148
- /* @__PURE__ */ a(
149
- B,
187
+ /* @__PURE__ */ n(
188
+ A,
150
189
  {
151
190
  size: "sm",
152
- onClick: h.onCancel,
191
+ onClick: m.onCancel,
153
192
  "aria-label": "Close"
154
193
  }
155
194
  )
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 })
195
+ ] }) : a ? /* @__PURE__ */ r("div", { className: t.header, children: [
196
+ /* @__PURE__ */ n("div", { className: t.headerIcon, children: /* @__PURE__ */ n(u, { icon: pe, size: 20 }) }),
197
+ /* @__PURE__ */ r("div", { className: t.headerBar, "data-variant": "reply", children: [
198
+ /* @__PURE__ */ n("div", { className: t.headerTitle, "data-variant": "reply", children: a.senderName }),
199
+ /* @__PURE__ */ n("div", { className: t.headerText, children: (() => {
200
+ if (a.text && a.text.trim().length > 0) return a.text;
201
+ if (a.attachmentName) {
202
+ const i = a.attachmentKind === "image" ? ve : a.attachmentKind === "video" ? ge : xe;
203
+ return /* @__PURE__ */ r("span", { className: t.headerAttachment, children: [
204
+ /* @__PURE__ */ n(u, { icon: i, size: 14 }),
205
+ /* @__PURE__ */ n("span", { children: a.attachmentName })
167
206
  ] });
168
207
  }
169
208
  return "";
170
209
  })() })
171
210
  ] }),
172
- /* @__PURE__ */ a(
173
- B,
211
+ /* @__PURE__ */ n(
212
+ A,
174
213
  {
175
214
  size: "sm",
176
- onClick: i.onCancel,
215
+ onClick: a.onCancel,
177
216
  "aria-label": "Close"
178
217
  }
179
218
  )
180
219
  ] }) : null,
181
- C && /* @__PURE__ */ a("div", { className: e.attachments, children: /* @__PURE__ */ a(
182
- oe,
220
+ B && /* @__PURE__ */ n("div", { className: t.attachments, children: /* @__PURE__ */ n(
221
+ be,
183
222
  {
184
- files: r,
223
+ files: l,
185
224
  mode: "draft",
186
- onRemove: V
225
+ onRemove: Y
187
226
  }
188
227
  ) }),
189
- /* @__PURE__ */ s("div", { className: e.inputArea, children: [
190
- /* @__PURE__ */ a(
191
- de,
228
+ o.isRecording ? /* @__PURE__ */ n("div", { className: t.inputArea, children: /* @__PURE__ */ r(ke, { gap: "sm", wrap: "nowrap", w: "100%", px: 6, py: 4, children: [
229
+ /* @__PURE__ */ n(
230
+ J,
231
+ {
232
+ w: 10,
233
+ h: 10,
234
+ style: {
235
+ borderRadius: "50%",
236
+ background: "var(--mantine-color-red-6)"
237
+ }
238
+ }
239
+ ),
240
+ /* @__PURE__ */ n(Q, { fw: 600, c: "red", children: he(o.durationMs) }),
241
+ /* @__PURE__ */ n(
242
+ Q,
243
+ {
244
+ size: "sm",
245
+ c: v ? "red" : "dimmed",
246
+ ml: "auto",
247
+ style: { userSelect: "none" },
248
+ children: v ? "Отпустите для отмены" : "‹ Отведите для отмены"
249
+ }
250
+ )
251
+ ] }) }) : /* @__PURE__ */ r("div", { className: t.inputArea, children: [
252
+ /* @__PURE__ */ n(
253
+ ye,
192
254
  {
193
- onChange: q,
255
+ onChange: ae,
194
256
  showIcons: !1,
195
- showGifs: !!b,
196
- onSelectGif: b,
257
+ showGifs: !!F && !m,
258
+ onSelectGif: F,
197
259
  showRemoveButton: !1,
198
260
  showRandomButton: !1,
199
261
  position: "top-start",
200
262
  closeOnSelect: !1,
201
263
  withinPortal: !0,
202
- children: /* @__PURE__ */ a(
203
- R,
264
+ children: /* @__PURE__ */ n(
265
+ I,
204
266
  {
205
267
  variant: "subtle",
206
268
  radius: "xl",
207
269
  size: 34,
208
270
  color: "gray",
209
- className: e.iconButton,
271
+ className: t.iconButton,
210
272
  "aria-label": "Emoji",
211
- disabled: c,
212
- children: /* @__PURE__ */ a(m, { icon: ue, size: 24 })
273
+ disabled: s,
274
+ children: /* @__PURE__ */ n(u, { icon: De, size: 24 })
213
275
  }
214
276
  )
215
277
  }
216
278
  ),
217
- /* @__PURE__ */ a(
218
- ce,
279
+ /* @__PURE__ */ n(
280
+ Pe,
219
281
  {
220
- ref: g,
282
+ ref: b,
221
283
  classNames: {
222
- root: e.textarea,
223
- input: e.textareaInput
284
+ root: t.textarea,
285
+ input: t.textareaInput
224
286
  },
225
287
  w: "100%",
226
288
  flex: 1,
227
- value: o,
228
- onChange: (n) => f(n.currentTarget.value),
229
- onPaste: Q,
230
- onKeyDown: U,
231
- placeholder: H,
289
+ value: p,
290
+ onChange: (e) => x(e.currentTarget.value),
291
+ onPaste: se,
292
+ onKeyDown: ie,
293
+ placeholder: W,
232
294
  autosize: !0,
233
295
  minRows: 1,
234
296
  maxRows: 6,
235
- disabled: c,
297
+ disabled: s,
236
298
  variant: "unstyled",
237
- maxLength: G
299
+ maxLength: Z
238
300
  }
239
301
  ),
240
- !v && /* @__PURE__ */ a(
241
- R,
302
+ j && /* @__PURE__ */ n(
303
+ I,
242
304
  {
243
305
  variant: "subtle",
244
306
  radius: "xl",
245
307
  size: 34,
246
308
  color: "gray",
247
- className: e.iconButton,
309
+ className: t.iconButton,
310
+ "aria-label": "Mention",
311
+ onClick: j,
312
+ disabled: s,
313
+ children: /* @__PURE__ */ n(u, { icon: Ne, size: 24 })
314
+ }
315
+ ),
316
+ !w && !m && /* @__PURE__ */ n(
317
+ I,
318
+ {
319
+ variant: "subtle",
320
+ radius: "xl",
321
+ size: 34,
322
+ color: "gray",
323
+ className: t.iconButton,
248
324
  "aria-label": "Attach file",
249
- onClick: () => p.current?.click(),
250
- disabled: c,
251
- children: /* @__PURE__ */ a(
252
- m,
325
+ onClick: () => C.current?.click(),
326
+ disabled: s,
327
+ children: /* @__PURE__ */ n(
328
+ u,
253
329
  {
254
- icon: te,
330
+ icon: Ie,
255
331
  size: 24,
256
332
  style: { transform: "rotate(30deg)" }
257
333
  }
@@ -262,19 +338,43 @@ function he({
262
338
  ]
263
339
  }
264
340
  ),
265
- /* @__PURE__ */ a(
266
- R,
341
+ le ? /* @__PURE__ */ n(
342
+ I,
343
+ {
344
+ className: t.sendButton,
345
+ variant: "filled",
346
+ color: v || o.isRecording ? "red" : "indigo",
347
+ radius: 12,
348
+ size: 50,
349
+ onPointerDown: de,
350
+ onPointerMove: me,
351
+ onPointerUp: ue,
352
+ onPointerCancel: () => {
353
+ M(!0);
354
+ },
355
+ "aria-label": "Record voice message",
356
+ style: { touchAction: "none" },
357
+ children: /* @__PURE__ */ n(
358
+ u,
359
+ {
360
+ icon: v ? we : Ce,
361
+ size: 24
362
+ }
363
+ )
364
+ }
365
+ ) : /* @__PURE__ */ n(
366
+ I,
267
367
  {
268
- className: e.sendButton,
368
+ className: t.sendButton,
269
369
  variant: "filled",
270
370
  color: "indigo",
271
371
  radius: 12,
272
372
  size: 50,
273
- onClick: I,
274
- disabled: c || !X,
275
- loading: K,
373
+ onClick: y,
374
+ disabled: s || !V,
375
+ loading: U,
276
376
  "aria-label": "Send message",
277
- children: /* @__PURE__ */ a(m, { icon: se, size: 24 })
377
+ children: /* @__PURE__ */ n(u, { icon: ze, size: 24 })
278
378
  }
279
379
  )
280
380
  ] })
@@ -282,7 +382,7 @@ function he({
282
382
  }
283
383
  );
284
384
  }
285
- he.displayName = "ChatInput";
385
+ Se.displayName = "ChatInput";
286
386
  export {
287
- he as ChatInput
387
+ Se as ChatInput
288
388
  };
@@ -0,0 +1,16 @@
1
+ export declare function isVoiceRecordingSupported(): boolean;
2
+ export interface VoiceRecording {
3
+ blob: Blob;
4
+ durationMs: number;
5
+ mime: string;
6
+ }
7
+ export interface UseVoiceRecorder {
8
+ isRecording: boolean;
9
+ durationMs: number;
10
+ error: string | null;
11
+ start: () => Promise<boolean>;
12
+ stop: () => Promise<VoiceRecording | null>;
13
+ cancel: () => void;
14
+ }
15
+ export declare function useVoiceRecorder(): UseVoiceRecorder;
16
+ //# sourceMappingURL=useVoiceRecorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ChatInput/useVoiceRecorder.ts"],"names":[],"mappings":"AAiBA,wBAAgB,yBAAyB,IAAI,OAAO,CAMnD;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,gBAAgB,IAAI,gBAAgB,CA2HnD"}
@@ -0,0 +1,83 @@
1
+ import { useState as v, useRef as t, useCallback as m, useEffect as A } from "react";
2
+ const C = [
3
+ "audio/webm;codecs=opus",
4
+ "audio/webm",
5
+ "audio/ogg;codecs=opus",
6
+ "audio/mp4"
7
+ ];
8
+ function P() {
9
+ if (!(typeof MediaRecorder > "u")) {
10
+ for (const s of C)
11
+ if (MediaRecorder.isTypeSupported(s)) return s;
12
+ }
13
+ }
14
+ function V() {
15
+ return typeof window < "u" && typeof MediaRecorder < "u" && !!navigator.mediaDevices?.getUserMedia;
16
+ }
17
+ function _() {
18
+ const [s, n] = v(!1), [D, a] = v(0), [E, y] = v(null), o = t(null), R = t(null), i = t([]), w = t(0), M = t(0), l = t(null), d = t(!1), f = t(null), r = m(() => {
19
+ l.current !== null && (window.clearInterval(l.current), l.current = null), R.current?.getTracks().forEach((e) => e.stop()), R.current = null, o.current = null, i.current = [];
20
+ }, []);
21
+ A(() => () => r(), [r]);
22
+ const k = m(async () => {
23
+ if (o.current) return !1;
24
+ y(null);
25
+ try {
26
+ const e = await navigator.mediaDevices.getUserMedia({ audio: !0 }), c = P(), u = new MediaRecorder(
27
+ e,
28
+ c ? { mimeType: c } : void 0
29
+ );
30
+ return i.current = [], d.current = !1, u.ondataavailable = (p) => {
31
+ p.data.size > 0 && i.current.push(p.data);
32
+ }, u.onstop = () => {
33
+ const p = d.current, b = i.current.slice(), h = u.mimeType || c || "audio/webm", S = M.current - w.current, g = f.current;
34
+ if (f.current = null, r(), n(!1), a(0), !!g) {
35
+ if (p || b.length === 0) {
36
+ g(null);
37
+ return;
38
+ }
39
+ g({
40
+ blob: new Blob(b, { type: h }),
41
+ durationMs: S,
42
+ mime: h
43
+ });
44
+ }
45
+ }, u.start(), o.current = u, R.current = e, w.current = Date.now(), a(0), n(!0), l.current = window.setInterval(() => {
46
+ a(Date.now() - w.current);
47
+ }, 100), !0;
48
+ } catch (e) {
49
+ return y(e instanceof Error ? e.message : "mic_unavailable"), r(), n(!1), !1;
50
+ }
51
+ }, [r]), I = m(
52
+ () => new Promise((e) => {
53
+ const c = o.current;
54
+ if (!c) {
55
+ e(null);
56
+ return;
57
+ }
58
+ d.current = !1, M.current = Date.now(), f.current = e;
59
+ try {
60
+ c.stop();
61
+ } catch {
62
+ f.current = null, r(), n(!1), e(null);
63
+ }
64
+ }),
65
+ [r]
66
+ ), T = m(() => {
67
+ const e = o.current;
68
+ if (d.current = !0, M.current = Date.now(), e)
69
+ try {
70
+ e.stop();
71
+ } catch {
72
+ r(), n(!1);
73
+ }
74
+ else
75
+ r(), n(!1);
76
+ a(0);
77
+ }, [r]);
78
+ return { isRecording: s, durationMs: D, error: E, start: k, stop: I, cancel: T };
79
+ }
80
+ export {
81
+ V as isVoiceRecordingSupported,
82
+ _ as useVoiceRecorder
83
+ };