stream-chat-react 14.12.0 → 15.0.0-rc.1

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 (1428) hide show
  1. package/dist/cjs/ListItemLayout.60c3b287.js +2181 -0
  2. package/dist/cjs/ListItemLayout.60c3b287.js.map +1 -0
  3. package/dist/cjs/{ReactPlayerWrapper.7cc7b0d8.js → ReactPlayerWrapper.f04b1d06.js} +3 -3
  4. package/dist/cjs/{ReactPlayerWrapper.7cc7b0d8.js.map → ReactPlayerWrapper.f04b1d06.js.map} +1 -1
  5. package/dist/cjs/SlotLayout.de45be2d.js +1672 -0
  6. package/dist/cjs/SlotLayout.de45be2d.js.map +1 -0
  7. package/dist/cjs/Thread.373af587.js +7479 -0
  8. package/dist/cjs/Thread.373af587.js.map +1 -0
  9. package/dist/cjs/channel-detail.js +409 -389
  10. package/dist/cjs/channel-detail.js.map +1 -1
  11. package/dist/cjs/emojis.js +18 -16
  12. package/dist/cjs/emojis.js.map +1 -1
  13. package/dist/cjs/index.js +14467 -20208
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/slot-geometry.js +145 -0
  16. package/dist/cjs/slot-geometry.js.map +1 -0
  17. package/dist/cjs/slot-layout.js +37 -0
  18. package/dist/cjs/useChannel.1004ed4c.js +18 -0
  19. package/dist/cjs/useChannel.1004ed4c.js.map +1 -0
  20. package/dist/cjs/useComponentContextIcons.d16834d9.js +1729 -0
  21. package/dist/cjs/useComponentContextIcons.d16834d9.js.map +1 -0
  22. package/dist/cjs/useIsCooldownActive.1f778bc1.js +110 -0
  23. package/dist/cjs/useIsCooldownActive.1f778bc1.js.map +1 -0
  24. package/dist/css/channel-detail.css.map +1 -1
  25. package/dist/css/index.css +208 -103
  26. package/dist/css/index.css.map +1 -1
  27. package/dist/es/a11y/accessibleLabel.mjs +6 -2
  28. package/dist/es/a11y/accessibleLabel.mjs.map +1 -1
  29. package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs +6 -5
  30. package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs.map +1 -1
  31. package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs +9 -33
  32. package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs.map +1 -1
  33. package/dist/es/components/Accessibility/NotificationAnnouncer.mjs +2 -3
  34. package/dist/es/components/Accessibility/NotificationAnnouncer.mjs.map +1 -1
  35. package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs +10 -5
  36. package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs.map +1 -1
  37. package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs +38 -28
  38. package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs.map +1 -1
  39. package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs +5 -8
  40. package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs.map +1 -1
  41. package/dist/es/components/Attachment/Attachment.mjs +21 -6
  42. package/dist/es/components/Attachment/Attachment.mjs.map +1 -1
  43. package/dist/es/components/Attachment/AttachmentActions.mjs +10 -9
  44. package/dist/es/components/Attachment/AttachmentActions.mjs.map +1 -1
  45. package/dist/es/components/Attachment/AttachmentContainer.mjs +21 -17
  46. package/dist/es/components/Attachment/AttachmentContainer.mjs.map +1 -1
  47. package/dist/es/components/Attachment/Audio.mjs +15 -10
  48. package/dist/es/components/Attachment/Audio.mjs.map +1 -1
  49. package/dist/es/components/Attachment/FileAttachment.mjs +4 -5
  50. package/dist/es/components/Attachment/FileAttachment.mjs.map +1 -1
  51. package/dist/es/components/Attachment/Geolocation.mjs +29 -17
  52. package/dist/es/components/Attachment/Geolocation.mjs.map +1 -1
  53. package/dist/es/components/Attachment/Giphy.mjs +4 -4
  54. package/dist/es/components/Attachment/Giphy.mjs.map +1 -1
  55. package/dist/es/components/Attachment/LinkPreview/Card.mjs +4 -4
  56. package/dist/es/components/Attachment/LinkPreview/Card.mjs.map +1 -1
  57. package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs +2 -2
  58. package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs.map +1 -1
  59. package/dist/es/components/Attachment/ModalGallery.mjs +20 -8
  60. package/dist/es/components/Attachment/ModalGallery.mjs.map +1 -1
  61. package/dist/es/components/Attachment/UnsupportedAttachment.mjs +3 -3
  62. package/dist/es/components/Attachment/UnsupportedAttachment.mjs.map +1 -1
  63. package/dist/es/components/Attachment/VideoAttachment.mjs +10 -10
  64. package/dist/es/components/Attachment/VideoAttachment.mjs.map +1 -1
  65. package/dist/es/components/Attachment/VisibilityDisclaimer.mjs +2 -2
  66. package/dist/es/components/Attachment/VisibilityDisclaimer.mjs.map +1 -1
  67. package/dist/es/components/Attachment/VoiceRecording.mjs +17 -12
  68. package/dist/es/components/Attachment/VoiceRecording.mjs.map +1 -1
  69. package/dist/es/components/Attachment/components/AttachmentUploadProgressIndicator.mjs +1 -1
  70. package/dist/es/components/Attachment/components/DownloadButton.mjs +3 -3
  71. package/dist/es/components/Attachment/components/DownloadButton.mjs.map +1 -1
  72. package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs +4 -30
  73. package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs.map +1 -1
  74. package/dist/es/components/Attachment/utils.mjs.map +1 -1
  75. package/dist/es/components/AudioPlayback/AudioPlaybackArbiter.mjs +57 -0
  76. package/dist/es/components/AudioPlayback/AudioPlaybackArbiter.mjs.map +1 -0
  77. package/dist/es/components/AudioPlayback/AudioPlayer.mjs +329 -314
  78. package/dist/es/components/AudioPlayback/AudioPlayer.mjs.map +1 -1
  79. package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs +54 -90
  80. package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs.map +1 -1
  81. package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs +20 -6
  82. package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs.map +1 -1
  83. package/dist/es/components/AudioPlayback/components/ProgressBar.mjs +2 -2
  84. package/dist/es/components/AudioPlayback/components/ProgressBar.mjs.map +1 -1
  85. package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs +2 -2
  86. package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs.map +1 -1
  87. package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs +2 -2
  88. package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs.map +1 -1
  89. package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs +4 -4
  90. package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs.map +1 -1
  91. package/dist/es/components/Avatar/Avatar.mjs.map +1 -1
  92. package/dist/es/components/Avatar/AvatarStack.mjs +1 -1
  93. package/dist/es/components/Avatar/AvatarStack.mjs.map +1 -1
  94. package/dist/es/components/Badge/Badge.mjs.map +1 -1
  95. package/dist/es/components/Badge/MediaBadge.mjs +2 -1
  96. package/dist/es/components/Badge/MediaBadge.mjs.map +1 -1
  97. package/dist/es/components/BaseImage/ImagePlaceholder.mjs +3 -3
  98. package/dist/es/components/BaseImage/ImagePlaceholder.mjs.map +1 -1
  99. package/dist/es/components/Button/PlayButton.mjs +3 -3
  100. package/dist/es/components/Button/PlayButton.mjs.map +1 -1
  101. package/dist/es/components/Button/WorkspaceNavigationButtons.mjs +94 -0
  102. package/dist/es/components/Button/WorkspaceNavigationButtons.mjs.map +1 -0
  103. package/dist/es/components/Channel/Channel.mjs +34 -720
  104. package/dist/es/components/Channel/Channel.mjs.map +1 -1
  105. package/dist/es/components/Channel/hooks/useChannelCapabilities.mjs +21 -0
  106. package/dist/es/components/Channel/hooks/useChannelCapabilities.mjs.map +1 -0
  107. package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs +1 -1
  108. package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs.map +1 -1
  109. package/dist/es/components/ChannelHeader/ChannelHeader.mjs +17 -16
  110. package/dist/es/components/ChannelHeader/ChannelHeader.mjs.map +1 -1
  111. package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs +16 -41
  112. package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs.map +1 -1
  113. package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs +19 -21
  114. package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs.map +1 -1
  115. package/dist/es/components/ChannelList/ChannelList.mjs +60 -131
  116. package/dist/es/components/ChannelList/ChannelList.mjs.map +1 -1
  117. package/dist/es/components/ChannelList/ChannelListHeader.mjs +4 -4
  118. package/dist/es/components/ChannelList/ChannelListHeader.mjs.map +1 -1
  119. package/dist/es/components/ChannelList/ChannelLists.mjs +31 -0
  120. package/dist/es/components/ChannelList/ChannelLists.mjs.map +1 -0
  121. package/dist/es/components/ChannelList/ChannelNavigation.mjs +36 -0
  122. package/dist/es/components/ChannelList/ChannelNavigation.mjs.map +1 -0
  123. package/dist/es/components/ChannelList/hooks/useChannelMembersState.mjs.map +1 -1
  124. package/dist/es/components/ChannelList/hooks/useChannelMembershipState.mjs.map +1 -1
  125. package/dist/es/components/ChannelList/hooks/useChannelPaginatorState.mjs +21 -0
  126. package/dist/es/components/ChannelList/hooks/useChannelPaginatorState.mjs.map +1 -0
  127. package/dist/es/components/ChannelList/hooks/useSelectedChannelState.mjs.map +1 -1
  128. package/dist/es/components/ChannelListItem/ChannelListItem.mjs +23 -74
  129. package/dist/es/components/ChannelListItem/ChannelListItem.mjs.map +1 -1
  130. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs +34 -34
  131. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs.map +1 -1
  132. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs +2 -2
  133. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs.map +1 -1
  134. package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs +7 -6
  135. package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs.map +1 -1
  136. package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs +15 -13
  137. package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs.map +1 -1
  138. package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs +7 -7
  139. package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs.map +1 -1
  140. package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs +8 -26
  141. package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs.map +1 -1
  142. package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs +1 -1
  143. package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs.map +1 -1
  144. package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs +18 -50
  145. package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs.map +1 -1
  146. package/dist/es/components/ChannelListItem/utils.a11y.mjs +35 -21
  147. package/dist/es/components/ChannelListItem/utils.a11y.mjs.map +1 -1
  148. package/dist/es/components/ChannelListItem/utils.mjs +31 -30
  149. package/dist/es/components/ChannelListItem/utils.mjs.map +1 -1
  150. package/dist/es/components/Chat/Chat.mjs +17 -16
  151. package/dist/es/components/Chat/Chat.mjs.map +1 -1
  152. package/dist/es/components/Chat/hooks/useChat.mjs +7 -49
  153. package/dist/es/components/Chat/hooks/useChat.mjs.map +1 -1
  154. package/dist/es/components/Chat/hooks/useCreateChatClient.mjs +1 -1
  155. package/dist/es/components/Chat/hooks/useCreateChatClient.mjs.map +1 -1
  156. package/dist/es/components/Chat/hooks/useCreateChatContext.mjs +3 -11
  157. package/dist/es/components/Chat/hooks/useCreateChatContext.mjs.map +1 -1
  158. package/dist/es/components/Chat/hooks/useNetworkConnectionState.mjs +46 -0
  159. package/dist/es/components/Chat/hooks/useNetworkConnectionState.mjs.map +1 -0
  160. package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs +112 -24
  161. package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs.map +1 -1
  162. package/dist/es/components/Chat/hooks/useSplitActionSet.mjs +1 -1
  163. package/dist/es/components/Chat/hooks/useSplitActionSet.mjs.map +1 -1
  164. package/dist/es/components/Chat/hooks/useWSConnectionState.mjs +31 -0
  165. package/dist/es/components/Chat/hooks/useWSConnectionState.mjs.map +1 -0
  166. package/dist/es/components/DateSeparator/DateSeparator.mjs +2 -2
  167. package/dist/es/components/DateSeparator/DateSeparator.mjs.map +1 -1
  168. package/dist/es/components/Dialog/components/Alert.mjs +1 -1
  169. package/dist/es/components/Dialog/components/Callout.mjs +2 -2
  170. package/dist/es/components/Dialog/components/Callout.mjs.map +1 -1
  171. package/dist/es/components/Dialog/components/ContextMenu.mjs +9 -8
  172. package/dist/es/components/Dialog/components/ContextMenu.mjs.map +1 -1
  173. package/dist/es/components/Dialog/components/Prompt.mjs +5 -5
  174. package/dist/es/components/Dialog/components/Prompt.mjs.map +1 -1
  175. package/dist/es/components/Dialog/components/Viewer.mjs +5 -5
  176. package/dist/es/components/Dialog/components/Viewer.mjs.map +1 -1
  177. package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs +9 -1
  178. package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs.map +1 -1
  179. package/dist/es/components/Dialog/service/DialogManager.mjs +22 -19
  180. package/dist/es/components/Dialog/service/DialogManager.mjs.map +1 -1
  181. package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs +6 -5
  182. package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs.map +1 -1
  183. package/dist/es/components/Form/Dropdown.mjs +6 -3
  184. package/dist/es/components/Form/Dropdown.mjs.map +1 -1
  185. package/dist/es/components/Form/NumericInput.mjs +6 -5
  186. package/dist/es/components/Form/NumericInput.mjs.map +1 -1
  187. package/dist/es/components/Form/SwitchField.mjs +2 -2
  188. package/dist/es/components/Form/SwitchField.mjs.map +1 -1
  189. package/dist/es/components/Form/TextInput.mjs +1 -1
  190. package/dist/es/components/Gallery/GalleryContext.mjs +2 -8
  191. package/dist/es/components/Gallery/GalleryContext.mjs.map +1 -1
  192. package/dist/es/components/Gallery/GalleryHeader.mjs +39 -12
  193. package/dist/es/components/Gallery/GalleryHeader.mjs.map +1 -1
  194. package/dist/es/components/Gallery/GalleryUI.mjs +4 -4
  195. package/dist/es/components/Gallery/GalleryUI.mjs.map +1 -1
  196. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs +16 -14
  197. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs.map +1 -1
  198. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.mjs +43 -0
  199. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.mjs.map +1 -0
  200. package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs +1 -1
  201. package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs.map +1 -1
  202. package/dist/es/components/LoadMore/LoadMoreButton.mjs +3 -3
  203. package/dist/es/components/LoadMore/LoadMoreButton.mjs.map +1 -1
  204. package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs +2 -11
  205. package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs.map +1 -1
  206. package/dist/es/components/Loading/LoadingErrorIndicator.mjs +2 -2
  207. package/dist/es/components/Loading/LoadingErrorIndicator.mjs.map +1 -1
  208. package/dist/es/components/Loading/LoadingIndicator.mjs.map +1 -1
  209. package/dist/es/components/Loading/UploadProgressIndicator.mjs.map +1 -1
  210. package/dist/es/components/Loading/progress-indicators.mjs +2 -2
  211. package/dist/es/components/Loading/progress-indicators.mjs.map +1 -1
  212. package/dist/es/components/Location/ShareLocationDialog.mjs +13 -13
  213. package/dist/es/components/Location/ShareLocationDialog.mjs.map +1 -1
  214. package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs +1 -0
  215. package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs.map +1 -1
  216. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs +4 -4
  217. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs.map +1 -1
  218. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs +7 -7
  219. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs.map +1 -1
  220. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs +4 -4
  221. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs.map +1 -1
  222. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs +2 -2
  223. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs.map +1 -1
  224. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs +1 -1
  225. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs.map +1 -1
  226. package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs +4 -4
  227. package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs.map +1 -1
  228. package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs +32 -26
  229. package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs.map +1 -1
  230. package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs +5 -4
  231. package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs.map +1 -1
  232. package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs +195 -181
  233. package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs.map +1 -1
  234. package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs +7 -11
  235. package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs.map +1 -1
  236. package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs +1 -0
  237. package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs.map +1 -1
  238. package/dist/es/components/MediaRecorder/observable/Observable.mjs +2 -1
  239. package/dist/es/components/MediaRecorder/observable/Observable.mjs.map +1 -1
  240. package/dist/es/components/MediaRecorder/observable/Subject.mjs +3 -2
  241. package/dist/es/components/MediaRecorder/observable/Subject.mjs.map +1 -1
  242. package/dist/es/components/MediaRecorder/observable/Subscription.mjs +2 -1
  243. package/dist/es/components/MediaRecorder/observable/Subscription.mjs.map +1 -1
  244. package/dist/es/components/Message/Message.mjs +13 -54
  245. package/dist/es/components/Message/Message.mjs.map +1 -1
  246. package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs +10 -54
  247. package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs.map +1 -1
  248. package/dist/es/components/Message/MessageBlocked.mjs +2 -2
  249. package/dist/es/components/Message/MessageBlocked.mjs.map +1 -1
  250. package/dist/es/components/Message/MessageDeletedBubble.mjs +2 -2
  251. package/dist/es/components/Message/MessageDeletedBubble.mjs.map +1 -1
  252. package/dist/es/components/Message/MessageEditedIndicator.mjs +8 -7
  253. package/dist/es/components/Message/MessageEditedIndicator.mjs.map +1 -1
  254. package/dist/es/components/Message/MessageRepliesCountButton.mjs +43 -9
  255. package/dist/es/components/Message/MessageRepliesCountButton.mjs.map +1 -1
  256. package/dist/es/components/Message/MessageStatus.mjs +13 -11
  257. package/dist/es/components/Message/MessageStatus.mjs.map +1 -1
  258. package/dist/es/components/Message/MessageText.mjs +4 -4
  259. package/dist/es/components/Message/MessageText.mjs.map +1 -1
  260. package/dist/es/components/Message/MessageTimestamp.mjs +4 -3
  261. package/dist/es/components/Message/MessageTimestamp.mjs.map +1 -1
  262. package/dist/es/components/Message/MessageTranslationIndicator.mjs +7 -7
  263. package/dist/es/components/Message/MessageTranslationIndicator.mjs.map +1 -1
  264. package/dist/es/components/Message/MessageUI.mjs +22 -21
  265. package/dist/es/components/Message/MessageUI.mjs.map +1 -1
  266. package/dist/es/components/Message/PinIndicator.mjs +3 -3
  267. package/dist/es/components/Message/PinIndicator.mjs.map +1 -1
  268. package/dist/es/components/Message/QuotedMessage.mjs +4 -4
  269. package/dist/es/components/Message/QuotedMessage.mjs.map +1 -1
  270. package/dist/es/components/Message/ReminderNotification.mjs +13 -12
  271. package/dist/es/components/Message/ReminderNotification.mjs.map +1 -1
  272. package/dist/es/components/Message/StreamedMessageText.mjs +5 -4
  273. package/dist/es/components/Message/StreamedMessageText.mjs.map +1 -1
  274. package/dist/es/components/Message/Timestamp.mjs +5 -5
  275. package/dist/es/components/Message/Timestamp.mjs.map +1 -1
  276. package/dist/es/components/Message/hooks/useActionHandler.mjs +8 -7
  277. package/dist/es/components/Message/hooks/useActionHandler.mjs.map +1 -1
  278. package/dist/es/components/Message/hooks/useDeleteHandler.mjs +30 -11
  279. package/dist/es/components/Message/hooks/useDeleteHandler.mjs.map +1 -1
  280. package/dist/es/components/Message/hooks/useFlagHandler.mjs +3 -3
  281. package/dist/es/components/Message/hooks/useFlagHandler.mjs.map +1 -1
  282. package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs +8 -3
  283. package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs.map +1 -1
  284. package/dist/es/components/Message/hooks/useMentionsHandler.mjs +2 -4
  285. package/dist/es/components/Message/hooks/useMentionsHandler.mjs.map +1 -1
  286. package/dist/es/components/Message/hooks/useMessageAlsoSentInChannelNavigation.mjs +72 -0
  287. package/dist/es/components/Message/hooks/useMessageAlsoSentInChannelNavigation.mjs.map +1 -0
  288. package/dist/es/components/Message/hooks/useMessageReminder.mjs +1 -1
  289. package/dist/es/components/Message/hooks/useMuteHandler.mjs +26 -9
  290. package/dist/es/components/Message/hooks/useMuteHandler.mjs.map +1 -1
  291. package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs +13 -5
  292. package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs.map +1 -1
  293. package/dist/es/components/Message/hooks/usePinHandler.mjs +26 -21
  294. package/dist/es/components/Message/hooks/usePinHandler.mjs.map +1 -1
  295. package/dist/es/components/Message/hooks/useReactionHandler.mjs +25 -17
  296. package/dist/es/components/Message/hooks/useReactionHandler.mjs.map +1 -1
  297. package/dist/es/components/Message/hooks/useReactionsFetcher.mjs +6 -3
  298. package/dist/es/components/Message/hooks/useReactionsFetcher.mjs.map +1 -1
  299. package/dist/es/components/Message/hooks/useRetryHandler.mjs +9 -7
  300. package/dist/es/components/Message/hooks/useRetryHandler.mjs.map +1 -1
  301. package/dist/es/components/Message/hooks/useUserRole.mjs +16 -12
  302. package/dist/es/components/Message/hooks/useUserRole.mjs.map +1 -1
  303. package/dist/es/components/Message/renderText/renderText.mjs +1 -1
  304. package/dist/es/components/Message/utils.mjs +19 -56
  305. package/dist/es/components/Message/utils.mjs.map +1 -1
  306. package/dist/es/components/MessageActions/DeleteMessageAlert.mjs +5 -5
  307. package/dist/es/components/MessageActions/DeleteMessageAlert.mjs.map +1 -1
  308. package/dist/es/components/MessageActions/DownloadSubmenu.mjs +4 -4
  309. package/dist/es/components/MessageActions/DownloadSubmenu.mjs.map +1 -1
  310. package/dist/es/components/MessageActions/MessageActions.defaults.mjs +72 -73
  311. package/dist/es/components/MessageActions/MessageActions.defaults.mjs.map +1 -1
  312. package/dist/es/components/MessageActions/MessageActions.mjs +3 -3
  313. package/dist/es/components/MessageActions/MessageActions.mjs.map +1 -1
  314. package/dist/es/components/MessageActions/RemindMeSubmenu.mjs +7 -7
  315. package/dist/es/components/MessageActions/RemindMeSubmenu.mjs.map +1 -1
  316. package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs +7 -4
  317. package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs.map +1 -1
  318. package/dist/es/components/MessageBounce/MessageBounceModal.mjs +1 -1
  319. package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs +8 -8
  320. package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs.map +1 -1
  321. package/dist/es/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.mjs +2 -2
  322. package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs +14 -14
  323. package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs.map +1 -1
  324. package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs +9 -9
  325. package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs.map +1 -1
  326. package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs +6 -6
  327. package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs.map +1 -1
  328. package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs +3 -4
  329. package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs.map +1 -1
  330. package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs +2 -2
  331. package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs.map +1 -1
  332. package/dist/es/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.mjs +2 -2
  333. package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs +2 -2
  334. package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs.map +1 -1
  335. package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs +33 -30
  336. package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs.map +1 -1
  337. package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs +26 -31
  338. package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs.map +1 -1
  339. package/dist/es/components/MessageComposer/CommandChip.mjs +3 -3
  340. package/dist/es/components/MessageComposer/CommandChip.mjs.map +1 -1
  341. package/dist/es/components/MessageComposer/EditedMessagePreview.mjs +1 -1
  342. package/dist/es/components/MessageComposer/EditedMessagePreview.mjs.map +1 -1
  343. package/dist/es/components/MessageComposer/LinkPreviewList.mjs +3 -3
  344. package/dist/es/components/MessageComposer/MessageComposer.mjs +12 -17
  345. package/dist/es/components/MessageComposer/MessageComposer.mjs.map +1 -1
  346. package/dist/es/components/MessageComposer/MessageComposerActions.mjs +17 -13
  347. package/dist/es/components/MessageComposer/MessageComposerActions.mjs.map +1 -1
  348. package/dist/es/components/MessageComposer/MessageComposerUI.mjs +8 -8
  349. package/dist/es/components/MessageComposer/MessageComposerUI.mjs.map +1 -1
  350. package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs +40 -40
  351. package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs.map +1 -1
  352. package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs +2 -2
  353. package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs.map +1 -1
  354. package/dist/es/components/MessageComposer/SendButton.mjs +2 -2
  355. package/dist/es/components/MessageComposer/SendButton.mjs.map +1 -1
  356. package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs +2 -2
  357. package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs.map +1 -1
  358. package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs +1 -1
  359. package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs.map +1 -1
  360. package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs +9 -13
  361. package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs.map +1 -1
  362. package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs +15 -2
  363. package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs.map +1 -1
  364. package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs +2 -3
  365. package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs.map +1 -1
  366. package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs +1 -3
  367. package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs.map +1 -1
  368. package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs +2 -3
  369. package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs.map +1 -1
  370. package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs +0 -4
  371. package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs.map +1 -1
  372. package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs +4 -4
  373. package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs.map +1 -1
  374. package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs +8 -34
  375. package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs.map +1 -1
  376. package/dist/es/components/MessageComposer/hooks/useMessageComposerHasSendableData.mjs.map +1 -1
  377. package/dist/es/components/MessageComposer/hooks/useMessageComposerSubmitFn.mjs +16 -0
  378. package/dist/es/components/MessageComposer/hooks/useMessageComposerSubmitFn.mjs.map +1 -0
  379. package/dist/es/components/MessageComposer/hooks/usePasteHandler.mjs +1 -1
  380. package/dist/es/components/MessageComposer/hooks/utils.mjs.map +1 -1
  381. package/dist/es/components/MessageComposer/icons.mjs +2 -2
  382. package/dist/es/components/MessageComposer/icons.mjs.map +1 -1
  383. package/dist/es/components/MessageComposer/preEditSnapshot.mjs +1 -7
  384. package/dist/es/components/MessageComposer/preEditSnapshot.mjs.map +1 -1
  385. package/dist/es/components/MessageList/FloatingDateSeparator.mjs +7 -7
  386. package/dist/es/components/MessageList/FloatingDateSeparator.mjs.map +1 -1
  387. package/dist/es/components/MessageList/MessageList.mjs +168 -213
  388. package/dist/es/components/MessageList/MessageList.mjs.map +1 -1
  389. package/dist/es/components/MessageList/NewMessageNotification.mjs +5 -1
  390. package/dist/es/components/MessageList/NewMessageNotification.mjs.map +1 -1
  391. package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs +27 -22
  392. package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs.map +1 -1
  393. package/dist/es/components/MessageList/UnreadMessagesNotification.mjs +25 -9
  394. package/dist/es/components/MessageList/UnreadMessagesNotification.mjs.map +1 -1
  395. package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs +18 -7
  396. package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs.map +1 -1
  397. package/dist/es/components/MessageList/VirtualizedMessageList.mjs +186 -167
  398. package/dist/es/components/MessageList/VirtualizedMessageList.mjs.map +1 -1
  399. package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs +12 -12
  400. package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs.map +1 -1
  401. package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs +6 -7
  402. package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs.map +1 -1
  403. package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs +6 -10
  404. package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs.map +1 -1
  405. package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs +18 -10
  406. package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs.map +1 -1
  407. package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs +6 -4
  408. package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs.map +1 -1
  409. package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs +27 -202
  410. package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs.map +1 -1
  411. package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs +10 -5
  412. package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs.map +1 -1
  413. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs +6 -5
  414. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs.map +1 -1
  415. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs +4 -4
  416. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs.map +1 -1
  417. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs +5 -1
  418. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs.map +1 -1
  419. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs +14 -9
  420. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs.map +1 -1
  421. package/dist/es/components/MessageList/hooks/useCanPaginateReplies.mjs +47 -0
  422. package/dist/es/components/MessageList/hooks/useCanPaginateReplies.mjs.map +1 -0
  423. package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs +6 -38
  424. package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs.map +1 -1
  425. package/dist/es/components/MessageList/hooks/useLastReadData.mjs +6 -23
  426. package/dist/es/components/MessageList/hooks/useLastReadData.mjs.map +1 -1
  427. package/dist/es/components/MessageList/hooks/useMarkRead.mjs +78 -48
  428. package/dist/es/components/MessageList/hooks/useMarkRead.mjs.map +1 -1
  429. package/dist/es/components/MessageList/hooks/useReceiptsByMessageId.mjs +71 -0
  430. package/dist/es/components/MessageList/hooks/useReceiptsByMessageId.mjs.map +1 -0
  431. package/dist/es/components/MessageList/hooks/useThreadHead.mjs +26 -0
  432. package/dist/es/components/MessageList/hooks/useThreadHead.mjs.map +1 -0
  433. package/dist/es/components/MessageList/messageSourceKey.mjs +37 -0
  434. package/dist/es/components/MessageList/messageSourceKey.mjs.map +1 -0
  435. package/dist/es/components/MessageList/renderMessages.mjs +11 -11
  436. package/dist/es/components/MessageList/renderMessages.mjs.map +1 -1
  437. package/dist/es/components/MessageList/utils.mjs +40 -33
  438. package/dist/es/components/MessageList/utils.mjs.map +1 -1
  439. package/dist/es/components/Modal/GlobalModal.mjs +2 -2
  440. package/dist/es/components/Notifications/Notification.mjs +10 -9
  441. package/dist/es/components/Notifications/Notification.mjs.map +1 -1
  442. package/dist/es/components/Notifications/NotificationList.mjs +5 -19
  443. package/dist/es/components/Notifications/NotificationList.mjs.map +1 -1
  444. package/dist/es/components/Notifications/hooks/useNotificationApi.mjs +69 -62
  445. package/dist/es/components/Notifications/hooks/useNotificationApi.mjs.map +1 -1
  446. package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs +8 -12
  447. package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs.map +1 -1
  448. package/dist/es/components/Notifications/hooks/useNotifications.mjs +1 -1
  449. package/dist/es/components/Notifications/hooks/useSystemNotifications.mjs +1 -1
  450. package/dist/es/components/Notifications/notificationTarget.mjs +17 -2
  451. package/dist/es/components/Notifications/notificationTarget.mjs.map +1 -1
  452. package/dist/es/components/Poll/Poll.mjs +1 -1
  453. package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs +8 -8
  454. package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs.map +1 -1
  455. package/dist/es/components/Poll/PollActions/EndPollAlert.mjs +9 -9
  456. package/dist/es/components/Poll/PollActions/EndPollAlert.mjs.map +1 -1
  457. package/dist/es/components/Poll/PollActions/PollActions.mjs +20 -14
  458. package/dist/es/components/Poll/PollActions/PollActions.mjs.map +1 -1
  459. package/dist/es/components/Poll/PollActions/PollAnswerList.mjs +8 -8
  460. package/dist/es/components/Poll/PollActions/PollAnswerList.mjs.map +1 -1
  461. package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs +4 -4
  462. package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs.map +1 -1
  463. package/dist/es/components/Poll/PollActions/PollQuestion.mjs +1 -1
  464. package/dist/es/components/Poll/PollActions/PollQuestion.mjs.map +1 -1
  465. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs +7 -5
  466. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs.map +1 -1
  467. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs +8 -4
  468. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs.map +1 -1
  469. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs +1 -1
  470. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs.map +1 -1
  471. package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs +11 -7
  472. package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs.map +1 -1
  473. package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs +15 -12
  474. package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs.map +1 -1
  475. package/dist/es/components/Poll/PollContent.mjs +2 -2
  476. package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs +13 -11
  477. package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs.map +1 -1
  478. package/dist/es/components/Poll/PollCreationDialog/NameField.mjs +6 -5
  479. package/dist/es/components/Poll/PollCreationDialog/NameField.mjs.map +1 -1
  480. package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs +14 -13
  481. package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs.map +1 -1
  482. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs +11 -12
  483. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs.map +1 -1
  484. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs +11 -20
  485. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs.map +1 -1
  486. package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs +5 -5
  487. package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs.map +1 -1
  488. package/dist/es/components/Poll/PollHeader.mjs +10 -6
  489. package/dist/es/components/Poll/PollHeader.mjs.map +1 -1
  490. package/dist/es/components/Poll/PollOptionList.mjs +8 -4
  491. package/dist/es/components/Poll/PollOptionList.mjs.map +1 -1
  492. package/dist/es/components/Poll/PollOptionSelector.mjs +13 -7
  493. package/dist/es/components/Poll/PollOptionSelector.mjs.map +1 -1
  494. package/dist/es/components/Poll/PollVote.mjs +6 -5
  495. package/dist/es/components/Poll/PollVote.mjs.map +1 -1
  496. package/dist/es/components/Poll/hooks/useManagePollVotesRealtime.mjs.map +1 -1
  497. package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs +5 -5
  498. package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs.map +1 -1
  499. package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs +6 -5
  500. package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs.map +1 -1
  501. package/dist/es/components/ReactFileUtilities/UploadButton.mjs +5 -5
  502. package/dist/es/components/ReactFileUtilities/UploadButton.mjs.map +1 -1
  503. package/dist/es/components/Reactions/MessageReactions.mjs +7 -7
  504. package/dist/es/components/Reactions/MessageReactions.mjs.map +1 -1
  505. package/dist/es/components/Reactions/MessageReactionsDetail.mjs +19 -12
  506. package/dist/es/components/Reactions/MessageReactionsDetail.mjs.map +1 -1
  507. package/dist/es/components/Reactions/ReactionSelector.mjs +15 -21
  508. package/dist/es/components/Reactions/ReactionSelector.mjs.map +1 -1
  509. package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs +4 -4
  510. package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs.map +1 -1
  511. package/dist/es/components/Reactions/hooks/useFetchReactions.mjs +3 -3
  512. package/dist/es/components/Reactions/hooks/useFetchReactions.mjs.map +1 -1
  513. package/dist/es/components/Reactions/hooks/useProcessReactions.mjs +5 -4
  514. package/dist/es/components/Reactions/hooks/useProcessReactions.mjs.map +1 -1
  515. package/dist/es/components/Search/Search.mjs +1 -1
  516. package/dist/es/components/Search/SearchBar/SearchBar.mjs +8 -7
  517. package/dist/es/components/Search/SearchBar/SearchBar.mjs.map +1 -1
  518. package/dist/es/components/Search/SearchContext.mjs +2 -3
  519. package/dist/es/components/Search/SearchContext.mjs.map +1 -1
  520. package/dist/es/components/Search/SearchResults/SearchResultItem.mjs +56 -39
  521. package/dist/es/components/Search/SearchResults/SearchResultItem.mjs.map +1 -1
  522. package/dist/es/components/Search/SearchResults/SearchResults.mjs +4 -4
  523. package/dist/es/components/Search/SearchResults/SearchResults.mjs.map +1 -1
  524. package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs +6 -5
  525. package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs.map +1 -1
  526. package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs +1 -1
  527. package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs.map +1 -1
  528. package/dist/es/components/Search/SearchResults/SearchSourceResultList.mjs +1 -1
  529. package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs +2 -2
  530. package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs.map +1 -1
  531. package/dist/es/components/Search/SearchResults/SearchSourceResults.mjs +1 -1
  532. package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs +1 -1
  533. package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs.map +1 -1
  534. package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs +1 -1
  535. package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs.map +1 -1
  536. package/dist/es/components/Search/SearchSourceResultsContext.mjs +2 -3
  537. package/dist/es/components/Search/SearchSourceResultsContext.mjs.map +1 -1
  538. package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs +1 -1
  539. package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs.map +1 -1
  540. package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs +44 -19
  541. package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs.map +1 -1
  542. package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs +1 -1
  543. package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs.map +1 -1
  544. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs +2 -2
  545. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs.map +1 -1
  546. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs +2 -2
  547. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs.map +1 -1
  548. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.mjs.map +1 -1
  549. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs +11 -11
  550. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs.map +1 -1
  551. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionListItem.mjs +1 -1
  552. package/dist/es/components/TextareaComposer/TextareaComposer.mjs +13 -11
  553. package/dist/es/components/TextareaComposer/TextareaComposer.mjs.map +1 -1
  554. package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs +12 -11
  555. package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs.map +1 -1
  556. package/dist/es/components/Thread/Thread.mjs +89 -92
  557. package/dist/es/components/Thread/Thread.mjs.map +1 -1
  558. package/dist/es/components/Thread/ThreadHead.mjs +5 -4
  559. package/dist/es/components/Thread/ThreadHead.mjs.map +1 -1
  560. package/dist/es/components/Thread/ThreadHeader.mjs +31 -41
  561. package/dist/es/components/Thread/ThreadHeader.mjs.map +1 -1
  562. package/dist/es/components/Thread/ThreadStart.mjs +11 -10
  563. package/dist/es/components/Thread/ThreadStart.mjs.map +1 -1
  564. package/dist/es/components/Threads/ThreadContext.mjs +1 -5
  565. package/dist/es/components/Threads/ThreadContext.mjs.map +1 -1
  566. package/dist/es/components/Threads/ThreadList/ThreadList.mjs +19 -27
  567. package/dist/es/components/Threads/ThreadList/ThreadList.mjs.map +1 -1
  568. package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs +3 -3
  569. package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs.map +1 -1
  570. package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs +4 -4
  571. package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs.map +1 -1
  572. package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs +30 -30
  573. package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs.map +1 -1
  574. package/dist/es/components/Threads/ThreadList/ThreadListLoadingIndicator.mjs +1 -1
  575. package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs +7 -3
  576. package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs.map +1 -1
  577. package/dist/es/components/Threads/ThreadList/useThreadHighlighting.mjs +47 -0
  578. package/dist/es/components/Threads/ThreadList/useThreadHighlighting.mjs.map +1 -0
  579. package/dist/es/components/Threads/ThreadList/utils.a11y.mjs +13 -8
  580. package/dist/es/components/Threads/ThreadList/utils.a11y.mjs.map +1 -1
  581. package/dist/es/components/Threads/hooks/useCloseThread.mjs +30 -0
  582. package/dist/es/components/Threads/hooks/useCloseThread.mjs.map +1 -0
  583. package/dist/es/components/TypingIndicator/TypingIndicator.mjs +23 -17
  584. package/dist/es/components/TypingIndicator/TypingIndicator.mjs.map +1 -1
  585. package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs +15 -11
  586. package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs.map +1 -1
  587. package/dist/es/components/TypingIndicator/hooks/useDebouncedTypingActive.mjs.map +1 -1
  588. package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs +7 -3
  589. package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs.map +1 -1
  590. package/dist/es/components/VideoPlayer/VideoThumbnail.mjs +2 -2
  591. package/dist/es/components/VideoPlayer/VideoThumbnail.mjs.map +1 -1
  592. package/dist/es/context/AttachmentContext.mjs +16 -0
  593. package/dist/es/context/AttachmentContext.mjs.map +1 -0
  594. package/dist/es/context/ChannelInstanceContext.mjs +17 -0
  595. package/dist/es/context/ChannelInstanceContext.mjs.map +1 -0
  596. package/dist/es/context/ChannelListContext.mjs +3 -6
  597. package/dist/es/context/ChannelListContext.mjs.map +1 -1
  598. package/dist/es/context/ChatContext.mjs +2 -8
  599. package/dist/es/context/ChatContext.mjs.map +1 -1
  600. package/dist/es/context/ComponentContext.mjs +1 -1
  601. package/dist/es/context/ComponentContext.mjs.map +1 -1
  602. package/dist/es/context/DialogManagerContext.mjs +2 -2
  603. package/dist/es/context/DialogManagerContext.mjs.map +1 -1
  604. package/dist/es/context/MessageBounceContext.mjs +12 -14
  605. package/dist/es/context/MessageBounceContext.mjs.map +1 -1
  606. package/dist/es/context/MessageComposerContext.mjs +8 -6
  607. package/dist/es/context/MessageComposerContext.mjs.map +1 -1
  608. package/dist/es/context/MessageComposerControllerContext.mjs +19 -0
  609. package/dist/es/context/MessageComposerControllerContext.mjs.map +1 -0
  610. package/dist/es/context/MessageContext.mjs +2 -5
  611. package/dist/es/context/MessageContext.mjs.map +1 -1
  612. package/dist/es/context/MessageListContext.mjs +2 -8
  613. package/dist/es/context/MessageListContext.mjs.map +1 -1
  614. package/dist/es/context/MessageTranslationViewContext.mjs +3 -6
  615. package/dist/es/context/MessageTranslationViewContext.mjs.map +1 -1
  616. package/dist/es/context/ModalContext.mjs +6 -8
  617. package/dist/es/context/ModalContext.mjs.map +1 -1
  618. package/dist/es/context/PollContext.mjs +2 -3
  619. package/dist/es/context/PollContext.mjs.map +1 -1
  620. package/dist/es/context/TranslationContext.mjs +8 -21
  621. package/dist/es/context/TranslationContext.mjs.map +1 -1
  622. package/dist/es/context/VirtualizedMessageListContext.mjs +2 -1
  623. package/dist/es/context/VirtualizedMessageListContext.mjs.map +1 -1
  624. package/dist/es/context/WithComponents.mjs +3 -3
  625. package/dist/es/context/WithComponents.mjs.map +1 -1
  626. package/dist/es/context/WorkspaceNavigationContext.mjs +45 -0
  627. package/dist/es/context/WorkspaceNavigationContext.mjs.map +1 -0
  628. package/dist/es/context/requireContext.mjs +17 -0
  629. package/dist/es/context/requireContext.mjs.map +1 -0
  630. package/dist/es/context/useChannel.mjs +14 -0
  631. package/dist/es/context/useChannel.mjs.map +1 -0
  632. package/dist/es/context/useComponentContextIcons.mjs +8 -13
  633. package/dist/es/context/useComponentContextIcons.mjs.map +1 -1
  634. package/dist/es/hooks/useIsDmChannel.mjs +30 -0
  635. package/dist/es/hooks/useIsDmChannel.mjs.map +1 -0
  636. package/dist/es/hooks/useMessagePaginator.mjs +14 -0
  637. package/dist/es/hooks/useMessagePaginator.mjs.map +1 -0
  638. package/dist/es/i18n/Streami18n.mjs +38 -521
  639. package/dist/es/i18n/Streami18n.mjs.map +1 -1
  640. package/dist/es/i18n/TranslationBuilder/index.mjs +3 -0
  641. package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs +22 -24
  642. package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs.map +1 -1
  643. package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs +20 -31
  644. package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs.map +1 -1
  645. package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs +42 -15
  646. package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs.map +1 -1
  647. package/dist/es/i18n/runtimeDefaults.mjs +41 -0
  648. package/dist/es/i18n/runtimeDefaults.mjs.map +1 -0
  649. package/dist/es/i18n/useStreami18n.mjs +41 -0
  650. package/dist/es/i18n/useStreami18n.mjs.map +1 -0
  651. package/dist/es/i18n/utils.mjs +7 -125
  652. package/dist/es/i18n/utils.mjs.map +1 -1
  653. package/dist/es/index.mjs +175 -180
  654. package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs +4 -4
  655. package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs.map +1 -1
  656. package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs +1 -1
  657. package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs.map +1 -1
  658. package/dist/es/plugins/ChannelDetail/ChannelDetailEmptyList.mjs.map +1 -1
  659. package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs +3 -3
  660. package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs.map +1 -1
  661. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs +4 -5
  662. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs.map +1 -1
  663. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs +4 -4
  664. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs.map +1 -1
  665. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs +9 -8
  666. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs.map +1 -1
  667. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs +7 -6
  668. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs.map +1 -1
  669. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/useChannelFilesSearch.mjs +1 -1
  670. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs +44 -44
  671. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs.map +1 -1
  672. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs +25 -25
  673. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs.map +1 -1
  674. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs +4 -4
  675. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs.map +1 -1
  676. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs +13 -13
  677. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs.map +1 -1
  678. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs +8 -3
  679. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs.map +1 -1
  680. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/useChannelMediaSearch.mjs +1 -1
  681. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs +44 -41
  682. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs.map +1 -1
  683. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs +6 -5
  684. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs.map +1 -1
  685. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs +19 -11
  686. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs.map +1 -1
  687. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs +12 -11
  688. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs.map +1 -1
  689. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs +8 -8
  690. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs.map +1 -1
  691. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs +8 -4
  692. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs.map +1 -1
  693. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs +1 -1
  694. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs.map +1 -1
  695. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs +3 -3
  696. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs.map +1 -1
  697. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs +24 -21
  698. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs.map +1 -1
  699. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs +9 -17
  700. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs.map +1 -1
  701. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesSearch.mjs +1 -1
  702. package/dist/es/plugins/Emojis/EmojiPicker.mjs +9 -8
  703. package/dist/es/plugins/Emojis/EmojiPicker.mjs.map +1 -1
  704. package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs +2 -1
  705. package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs.map +1 -1
  706. package/dist/es/plugins/SlotGeometry/SlotGeometry.mjs +141 -0
  707. package/dist/es/plugins/SlotGeometry/SlotGeometry.mjs.map +1 -0
  708. package/dist/es/plugins/SlotLayout/ChannelSlot.mjs +30 -0
  709. package/dist/es/plugins/SlotLayout/ChannelSlot.mjs.map +1 -0
  710. package/dist/es/{components/ChatView → plugins/SlotLayout}/ChatView.a11y.utility.mjs +1 -1
  711. package/dist/es/plugins/SlotLayout/ChatView.a11y.utility.mjs.map +1 -0
  712. package/dist/es/plugins/SlotLayout/ChatView.mjs +277 -0
  713. package/dist/es/plugins/SlotLayout/ChatView.mjs.map +1 -0
  714. package/dist/es/plugins/SlotLayout/ChatViewNavigationContext.mjs +239 -0
  715. package/dist/es/plugins/SlotLayout/ChatViewNavigationContext.mjs.map +1 -0
  716. package/dist/es/plugins/SlotLayout/ThreadListSlot.mjs +42 -0
  717. package/dist/es/plugins/SlotLayout/ThreadListSlot.mjs.map +1 -0
  718. package/dist/es/plugins/SlotLayout/ThreadSlot.mjs +34 -0
  719. package/dist/es/plugins/SlotLayout/ThreadSlot.mjs.map +1 -0
  720. package/dist/es/plugins/SlotLayout/hooks/useLayoutViewState.mjs +26 -0
  721. package/dist/es/plugins/SlotLayout/hooks/useLayoutViewState.mjs.map +1 -0
  722. package/dist/es/plugins/SlotLayout/hooks/useSlotEntity.mjs +167 -0
  723. package/dist/es/plugins/SlotLayout/hooks/useSlotEntity.mjs.map +1 -0
  724. package/dist/es/plugins/SlotLayout/layout/Slot.mjs +46 -0
  725. package/dist/es/plugins/SlotLayout/layout/Slot.mjs.map +1 -0
  726. package/dist/es/plugins/SlotLayout/layout/WorkspaceLayout.mjs +23 -0
  727. package/dist/es/plugins/SlotLayout/layout/WorkspaceLayout.mjs.map +1 -0
  728. package/dist/es/plugins/SlotLayout/layoutController/LayoutController.mjs +376 -0
  729. package/dist/es/plugins/SlotLayout/layoutController/LayoutController.mjs.map +1 -0
  730. package/dist/es/plugins/SlotLayout/layoutController/serialization.mjs +80 -0
  731. package/dist/es/plugins/SlotLayout/layoutController/serialization.mjs.map +1 -0
  732. package/dist/es/plugins/SlotLayout/slotBinding.mjs +15 -0
  733. package/dist/es/plugins/SlotLayout/slotBinding.mjs.map +1 -0
  734. package/dist/es/plugins/SlotLayout/slotRegistry.mjs +64 -0
  735. package/dist/es/plugins/SlotLayout/slotRegistry.mjs.map +1 -0
  736. package/dist/es/plugins/SlotLayout/workspaceNavigationAdapter.mjs +130 -0
  737. package/dist/es/plugins/SlotLayout/workspaceNavigationAdapter.mjs.map +1 -0
  738. package/dist/es/slot-geometry.mjs +2 -0
  739. package/dist/es/slot-layout.mjs +14 -0
  740. package/dist/es/store/hooks/useStateStore.mjs.map +1 -1
  741. package/dist/es/utils/getChannel.mjs +5 -2
  742. package/dist/es/utils/getChannel.mjs.map +1 -1
  743. package/dist/es/utils/useStableCallback.mjs +1 -1
  744. package/dist/es/utils/useStableCallback.mjs.map +1 -1
  745. package/dist/types/a11y/accessibleLabel.d.ts.map +1 -1
  746. package/dist/types/components/AIStateIndicator/AIStateIndicator.d.ts.map +1 -1
  747. package/dist/types/components/AIStateIndicator/hooks/useAIState.d.ts +3 -8
  748. package/dist/types/components/AIStateIndicator/hooks/useAIState.d.ts.map +1 -1
  749. package/dist/types/components/Accessibility/NotificationAnnouncer.d.ts +1 -2
  750. package/dist/types/components/Accessibility/NotificationAnnouncer.d.ts.map +1 -1
  751. package/dist/types/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts.map +1 -1
  752. package/dist/types/components/Accessibility/hooks/useInteractionAnnouncements.d.ts.map +1 -1
  753. package/dist/types/components/Accessibility/useAriaLiveAnnouncer.d.ts +4 -0
  754. package/dist/types/components/Accessibility/useAriaLiveAnnouncer.d.ts.map +1 -1
  755. package/dist/types/components/Attachment/Attachment.d.ts +13 -2
  756. package/dist/types/components/Attachment/Attachment.d.ts.map +1 -1
  757. package/dist/types/components/Attachment/AttachmentActions.d.ts.map +1 -1
  758. package/dist/types/components/Attachment/AttachmentContainer.d.ts +2 -2
  759. package/dist/types/components/Attachment/AttachmentContainer.d.ts.map +1 -1
  760. package/dist/types/components/Attachment/Audio.d.ts.map +1 -1
  761. package/dist/types/components/Attachment/FileAttachment.d.ts.map +1 -1
  762. package/dist/types/components/Attachment/Geolocation.d.ts +3 -3
  763. package/dist/types/components/Attachment/Geolocation.d.ts.map +1 -1
  764. package/dist/types/components/Attachment/Giphy.d.ts.map +1 -1
  765. package/dist/types/components/Attachment/LinkPreview/Card.d.ts.map +1 -1
  766. package/dist/types/components/Attachment/LinkPreview/CardAudio.d.ts +1 -1
  767. package/dist/types/components/Attachment/LinkPreview/CardAudio.d.ts.map +1 -1
  768. package/dist/types/components/Attachment/ModalGallery.d.ts.map +1 -1
  769. package/dist/types/components/Attachment/UnsupportedAttachment.d.ts.map +1 -1
  770. package/dist/types/components/Attachment/VideoAttachment.d.ts.map +1 -1
  771. package/dist/types/components/Attachment/VisibilityDisclaimer.d.ts.map +1 -1
  772. package/dist/types/components/Attachment/VoiceRecording.d.ts.map +1 -1
  773. package/dist/types/components/Attachment/components/DownloadButton.d.ts.map +1 -1
  774. package/dist/types/components/Attachment/components/index.d.ts +1 -1
  775. package/dist/types/components/Attachment/components/index.d.ts.map +1 -1
  776. package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts +0 -28
  777. package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts.map +1 -1
  778. package/dist/types/components/Attachment/index.d.ts +1 -1
  779. package/dist/types/components/Attachment/index.d.ts.map +1 -1
  780. package/dist/types/components/Attachment/utils.d.ts +2 -2
  781. package/dist/types/components/Attachment/utils.d.ts.map +1 -1
  782. package/dist/types/components/AudioPlayback/AudioPlaybackArbiter.d.ts +37 -0
  783. package/dist/types/components/AudioPlayback/AudioPlaybackArbiter.d.ts.map +1 -0
  784. package/dist/types/components/AudioPlayback/AudioPlayer.d.ts +1 -1
  785. package/dist/types/components/AudioPlayback/AudioPlayer.d.ts.map +1 -1
  786. package/dist/types/components/AudioPlayback/AudioPlayerPool.d.ts +19 -31
  787. package/dist/types/components/AudioPlayback/AudioPlayerPool.d.ts.map +1 -1
  788. package/dist/types/components/AudioPlayback/WithAudioPlayback.d.ts +17 -2
  789. package/dist/types/components/AudioPlayback/WithAudioPlayback.d.ts.map +1 -1
  790. package/dist/types/components/AudioPlayback/components/ProgressBar.d.ts.map +1 -1
  791. package/dist/types/components/AudioPlayback/components/WaveProgressBar.d.ts.map +1 -1
  792. package/dist/types/components/AudioPlayback/components/progressBarA11y.d.ts +2 -2
  793. package/dist/types/components/AudioPlayback/components/progressBarA11y.d.ts.map +1 -1
  794. package/dist/types/components/AudioPlayback/index.d.ts.map +1 -1
  795. package/dist/types/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.d.ts +2 -2
  796. package/dist/types/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.d.ts.map +1 -1
  797. package/dist/types/components/Avatar/Avatar.d.ts +1 -5
  798. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  799. package/dist/types/components/Badge/Badge.d.ts.map +1 -1
  800. package/dist/types/components/Badge/MediaBadge.d.ts.map +1 -1
  801. package/dist/types/components/BaseImage/ImagePlaceholder.d.ts.map +1 -1
  802. package/dist/types/components/Button/PlayButton.d.ts.map +1 -1
  803. package/dist/types/components/Button/WorkspaceNavigationButtons.d.ts +11 -0
  804. package/dist/types/components/Button/WorkspaceNavigationButtons.d.ts.map +1 -0
  805. package/dist/types/components/Button/index.d.ts +1 -0
  806. package/dist/types/components/Button/index.d.ts.map +1 -1
  807. package/dist/types/components/Channel/Channel.d.ts +9 -57
  808. package/dist/types/components/Channel/Channel.d.ts.map +1 -1
  809. package/dist/types/components/Channel/hooks/useChannelCapabilities.d.ts +4 -0
  810. package/dist/types/components/Channel/hooks/useChannelCapabilities.d.ts.map +1 -0
  811. package/dist/types/components/Channel/index.d.ts +1 -2
  812. package/dist/types/components/Channel/index.d.ts.map +1 -1
  813. package/dist/types/components/ChannelHeader/ChannelHeader.d.ts +12 -0
  814. package/dist/types/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
  815. package/dist/types/components/ChannelHeader/hooks/useChannelHasMembersOnline.d.ts +8 -0
  816. package/dist/types/components/ChannelHeader/hooks/useChannelHasMembersOnline.d.ts.map +1 -1
  817. package/dist/types/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.d.ts +7 -8
  818. package/dist/types/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.d.ts.map +1 -1
  819. package/dist/types/components/ChannelList/ChannelList.d.ts +11 -78
  820. package/dist/types/components/ChannelList/ChannelList.d.ts.map +1 -1
  821. package/dist/types/components/ChannelList/ChannelListHeader.d.ts.map +1 -1
  822. package/dist/types/components/ChannelList/ChannelLists.d.ts +10 -0
  823. package/dist/types/components/ChannelList/ChannelLists.d.ts.map +1 -0
  824. package/dist/types/components/ChannelList/ChannelNavigation.d.ts +9 -0
  825. package/dist/types/components/ChannelList/ChannelNavigation.d.ts.map +1 -0
  826. package/dist/types/components/ChannelList/hooks/index.d.ts +1 -2
  827. package/dist/types/components/ChannelList/hooks/index.d.ts.map +1 -1
  828. package/dist/types/components/ChannelList/hooks/useChannelMembersState.d.ts.map +1 -1
  829. package/dist/types/components/ChannelList/hooks/useChannelMembershipState.d.ts.map +1 -1
  830. package/dist/types/components/ChannelList/hooks/useChannelPaginatorState.d.ts +18 -0
  831. package/dist/types/components/ChannelList/hooks/useChannelPaginatorState.d.ts.map +1 -0
  832. package/dist/types/components/ChannelList/hooks/useSelectedChannelState.d.ts +3 -3
  833. package/dist/types/components/ChannelList/hooks/useSelectedChannelState.d.ts.map +1 -1
  834. package/dist/types/components/ChannelList/index.d.ts +3 -2
  835. package/dist/types/components/ChannelList/index.d.ts.map +1 -1
  836. package/dist/types/components/ChannelListItem/ChannelListItem.d.ts +9 -18
  837. package/dist/types/components/ChannelListItem/ChannelListItem.d.ts.map +1 -1
  838. package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.defaults.d.ts.map +1 -1
  839. package/dist/types/components/ChannelListItem/ChannelListItemTimestamp.d.ts +3 -3
  840. package/dist/types/components/ChannelListItem/ChannelListItemTimestamp.d.ts.map +1 -1
  841. package/dist/types/components/ChannelListItem/ChannelListItemUI.d.ts.map +1 -1
  842. package/dist/types/components/ChannelListItem/hooks/useChannelDisplayName.d.ts +1 -1
  843. package/dist/types/components/ChannelListItem/hooks/useChannelDisplayName.d.ts.map +1 -1
  844. package/dist/types/components/ChannelListItem/hooks/useIsChannelMuted.d.ts +8 -5
  845. package/dist/types/components/ChannelListItem/hooks/useIsChannelMuted.d.ts.map +1 -1
  846. package/dist/types/components/ChannelListItem/hooks/useMessageDeliveryStatus.d.ts.map +1 -1
  847. package/dist/types/components/ChannelListItem/utils.a11y.d.ts +14 -5
  848. package/dist/types/components/ChannelListItem/utils.a11y.d.ts.map +1 -1
  849. package/dist/types/components/ChannelListItem/utils.d.ts +1 -1
  850. package/dist/types/components/ChannelListItem/utils.d.ts.map +1 -1
  851. package/dist/types/components/Chat/Chat.d.ts +1 -4
  852. package/dist/types/components/Chat/Chat.d.ts.map +1 -1
  853. package/dist/types/components/Chat/hooks/useChat.d.ts +4 -16
  854. package/dist/types/components/Chat/hooks/useChat.d.ts.map +1 -1
  855. package/dist/types/components/Chat/hooks/useCreateChatClient.d.ts +2 -2
  856. package/dist/types/components/Chat/hooks/useCreateChatClient.d.ts.map +1 -1
  857. package/dist/types/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
  858. package/dist/types/components/Chat/hooks/useNetworkConnectionState.d.ts +34 -0
  859. package/dist/types/components/Chat/hooks/useNetworkConnectionState.d.ts.map +1 -0
  860. package/dist/types/components/Chat/hooks/useReportLostConnectionSystemNotification.d.ts +26 -2
  861. package/dist/types/components/Chat/hooks/useReportLostConnectionSystemNotification.d.ts.map +1 -1
  862. package/dist/types/components/Chat/hooks/useWSConnectionState.d.ts +22 -0
  863. package/dist/types/components/Chat/hooks/useWSConnectionState.d.ts.map +1 -0
  864. package/dist/types/components/Chat/index.d.ts +2 -0
  865. package/dist/types/components/Chat/index.d.ts.map +1 -1
  866. package/dist/types/components/Dialog/components/ContextMenu.d.ts +0 -4
  867. package/dist/types/components/Dialog/components/ContextMenu.d.ts.map +1 -1
  868. package/dist/types/components/Dialog/hooks/usePopoverPosition.d.ts +2 -2
  869. package/dist/types/components/Dialog/hooks/usePopoverPosition.d.ts.map +1 -1
  870. package/dist/types/components/Dialog/service/DialogManager.d.ts +1 -1
  871. package/dist/types/components/Dialog/service/DialogManager.d.ts.map +1 -1
  872. package/dist/types/components/EmptyStateIndicator/EmptyStateIndicator.d.ts.map +1 -1
  873. package/dist/types/components/Form/Dropdown.d.ts +4 -1
  874. package/dist/types/components/Form/Dropdown.d.ts.map +1 -1
  875. package/dist/types/components/Form/NumericInput.d.ts.map +1 -1
  876. package/dist/types/components/Gallery/GalleryContext.d.ts +5 -0
  877. package/dist/types/components/Gallery/GalleryContext.d.ts.map +1 -1
  878. package/dist/types/components/Gallery/GalleryHeader.d.ts.map +1 -1
  879. package/dist/types/components/Gallery/GalleryUI.d.ts.map +1 -1
  880. package/dist/types/components/Icons/index.d.ts +1 -1
  881. package/dist/types/components/Icons/index.d.ts.map +1 -1
  882. package/dist/types/components/Icons/slots.d.ts +18 -7
  883. package/dist/types/components/Icons/slots.d.ts.map +1 -1
  884. package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +8 -2
  885. package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts.map +1 -1
  886. package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.d.ts +43 -0
  887. package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.d.ts.map +1 -0
  888. package/dist/types/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts +1 -1
  889. package/dist/types/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts.map +1 -1
  890. package/dist/types/components/LoadMore/LoadMoreButton.d.ts.map +1 -1
  891. package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts +3 -0
  892. package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts.map +1 -1
  893. package/dist/types/components/Loading/LoadingErrorIndicator.d.ts.map +1 -1
  894. package/dist/types/components/Loading/LoadingIndicator.d.ts +2 -3
  895. package/dist/types/components/Loading/LoadingIndicator.d.ts.map +1 -1
  896. package/dist/types/components/Loading/UploadProgressIndicator.d.ts +2 -2
  897. package/dist/types/components/Loading/index.d.ts +1 -1
  898. package/dist/types/components/Loading/index.d.ts.map +1 -1
  899. package/dist/types/components/Loading/progress-indicators.d.ts.map +1 -1
  900. package/dist/types/components/Location/ShareLocationDialog.d.ts.map +1 -1
  901. package/dist/types/components/Location/hooks/useLiveLocationSharingManager.d.ts.map +1 -1
  902. package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.d.ts.map +1 -1
  903. package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.d.ts.map +1 -1
  904. package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.d.ts.map +1 -1
  905. package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.d.ts.map +1 -1
  906. package/dist/types/components/MediaRecorder/RecordingPermissionDeniedNotification.d.ts.map +1 -1
  907. package/dist/types/components/MediaRecorder/classes/MediaRecorderController.d.ts.map +1 -1
  908. package/dist/types/components/MediaRecorder/hooks/useMediaRecorder.d.ts +2 -2
  909. package/dist/types/components/MediaRecorder/hooks/useMediaRecorder.d.ts.map +1 -1
  910. package/dist/types/components/Message/Message.d.ts.map +1 -1
  911. package/dist/types/components/Message/MessageAlsoSentInChannelIndicator.d.ts +11 -1
  912. package/dist/types/components/Message/MessageAlsoSentInChannelIndicator.d.ts.map +1 -1
  913. package/dist/types/components/Message/MessageDeletedBubble.d.ts.map +1 -1
  914. package/dist/types/components/Message/MessageEditedIndicator.d.ts.map +1 -1
  915. package/dist/types/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
  916. package/dist/types/components/Message/MessageStatus.d.ts.map +1 -1
  917. package/dist/types/components/Message/MessageText.d.ts.map +1 -1
  918. package/dist/types/components/Message/MessageTimestamp.d.ts.map +1 -1
  919. package/dist/types/components/Message/MessageTranslationIndicator.d.ts.map +1 -1
  920. package/dist/types/components/Message/MessageUI.d.ts.map +1 -1
  921. package/dist/types/components/Message/ReminderNotification.d.ts.map +1 -1
  922. package/dist/types/components/Message/StreamedMessageText.d.ts.map +1 -1
  923. package/dist/types/components/Message/Timestamp.d.ts.map +1 -1
  924. package/dist/types/components/Message/hooks/index.d.ts +1 -0
  925. package/dist/types/components/Message/hooks/index.d.ts.map +1 -1
  926. package/dist/types/components/Message/hooks/useActionHandler.d.ts +1 -1
  927. package/dist/types/components/Message/hooks/useActionHandler.d.ts.map +1 -1
  928. package/dist/types/components/Message/hooks/useDeleteHandler.d.ts +6 -2
  929. package/dist/types/components/Message/hooks/useDeleteHandler.d.ts.map +1 -1
  930. package/dist/types/components/Message/hooks/useMarkUnreadHandler.d.ts +6 -1
  931. package/dist/types/components/Message/hooks/useMarkUnreadHandler.d.ts.map +1 -1
  932. package/dist/types/components/Message/hooks/useMentionsHandler.d.ts.map +1 -1
  933. package/dist/types/components/Message/hooks/useMessageAlsoSentInChannelNavigation.d.ts +22 -0
  934. package/dist/types/components/Message/hooks/useMessageAlsoSentInChannelNavigation.d.ts.map +1 -0
  935. package/dist/types/components/Message/hooks/useMuteHandler.d.ts +7 -2
  936. package/dist/types/components/Message/hooks/useMuteHandler.d.ts.map +1 -1
  937. package/dist/types/components/Message/hooks/useOpenThreadHandler.d.ts +1 -0
  938. package/dist/types/components/Message/hooks/useOpenThreadHandler.d.ts.map +1 -1
  939. package/dist/types/components/Message/hooks/usePinHandler.d.ts +23 -2
  940. package/dist/types/components/Message/hooks/usePinHandler.d.ts.map +1 -1
  941. package/dist/types/components/Message/hooks/useReactionHandler.d.ts +1 -1
  942. package/dist/types/components/Message/hooks/useReactionHandler.d.ts.map +1 -1
  943. package/dist/types/components/Message/hooks/useReactionsFetcher.d.ts +2 -2
  944. package/dist/types/components/Message/hooks/useReactionsFetcher.d.ts.map +1 -1
  945. package/dist/types/components/Message/hooks/useRetryHandler.d.ts +3 -2
  946. package/dist/types/components/Message/hooks/useRetryHandler.d.ts.map +1 -1
  947. package/dist/types/components/Message/hooks/useUserRole.d.ts +1 -0
  948. package/dist/types/components/Message/hooks/useUserRole.d.ts.map +1 -1
  949. package/dist/types/components/Message/types.d.ts +11 -20
  950. package/dist/types/components/Message/types.d.ts.map +1 -1
  951. package/dist/types/components/Message/utils.d.ts +7 -38
  952. package/dist/types/components/Message/utils.d.ts.map +1 -1
  953. package/dist/types/components/MessageActions/DeleteMessageAlert.d.ts.map +1 -1
  954. package/dist/types/components/MessageActions/DownloadSubmenu.d.ts.map +1 -1
  955. package/dist/types/components/MessageActions/MessageActions.d.ts +6 -2
  956. package/dist/types/components/MessageActions/MessageActions.d.ts.map +1 -1
  957. package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
  958. package/dist/types/components/MessageActions/RemindMeSubmenu.d.ts.map +1 -1
  959. package/dist/types/components/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts.map +1 -1
  960. package/dist/types/components/MessageBounce/MessageBouncePrompt.d.ts.map +1 -1
  961. package/dist/types/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.d.ts.map +1 -1
  962. package/dist/types/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.d.ts.map +1 -1
  963. package/dist/types/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.d.ts.map +1 -1
  964. package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
  965. package/dist/types/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.d.ts.map +1 -1
  966. package/dist/types/components/MessageComposer/AttachmentPreviewList/index.d.ts +1 -1
  967. package/dist/types/components/MessageComposer/AttachmentPreviewList/index.d.ts.map +1 -1
  968. package/dist/types/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.d.ts.map +1 -1
  969. package/dist/types/components/MessageComposer/AttachmentSelector/AttachmentSelector.d.ts.map +1 -1
  970. package/dist/types/components/MessageComposer/AttachmentSelector/CommandsMenu.d.ts +5 -5
  971. package/dist/types/components/MessageComposer/AttachmentSelector/CommandsMenu.d.ts.map +1 -1
  972. package/dist/types/components/MessageComposer/CommandChip.d.ts.map +1 -1
  973. package/dist/types/components/MessageComposer/EditMessageForm.d.ts +1 -0
  974. package/dist/types/components/MessageComposer/EditMessageForm.d.ts.map +1 -0
  975. package/dist/types/components/MessageComposer/MessageComposer.d.ts +1 -17
  976. package/dist/types/components/MessageComposer/MessageComposer.d.ts.map +1 -1
  977. package/dist/types/components/MessageComposer/MessageComposerActions.d.ts.map +1 -1
  978. package/dist/types/components/MessageComposer/MessageComposerUI.d.ts.map +1 -1
  979. package/dist/types/components/MessageComposer/QuotedMessagePreview.d.ts +3 -3
  980. package/dist/types/components/MessageComposer/QuotedMessagePreview.d.ts.map +1 -1
  981. package/dist/types/components/MessageComposer/RemoveAttachmentPreviewButton.d.ts.map +1 -1
  982. package/dist/types/components/MessageComposer/SendButton.d.ts.map +1 -1
  983. package/dist/types/components/MessageComposer/SendToChannelCheckbox.d.ts.map +1 -1
  984. package/dist/types/components/MessageComposer/StopAIGenerationButton.d.ts.map +1 -1
  985. package/dist/types/components/MessageComposer/WithDragAndDropUpload.d.ts +2 -5
  986. package/dist/types/components/MessageComposer/WithDragAndDropUpload.d.ts.map +1 -1
  987. package/dist/types/components/MessageComposer/hooks/index.d.ts +1 -0
  988. package/dist/types/components/MessageComposer/hooks/index.d.ts.map +1 -1
  989. package/dist/types/components/MessageComposer/hooks/useAttachmentManagerState.d.ts +5 -1
  990. package/dist/types/components/MessageComposer/hooks/useAttachmentManagerState.d.ts.map +1 -1
  991. package/dist/types/components/MessageComposer/hooks/useAttachmentsForPreview.d.ts +1 -2
  992. package/dist/types/components/MessageComposer/hooks/useAttachmentsForPreview.d.ts.map +1 -1
  993. package/dist/types/components/MessageComposer/hooks/useCreateMessageComposerContext.d.ts.map +1 -1
  994. package/dist/types/components/MessageComposer/hooks/useMessageComposerBindings.d.ts +0 -1
  995. package/dist/types/components/MessageComposer/hooks/useMessageComposerBindings.d.ts.map +1 -1
  996. package/dist/types/components/MessageComposer/hooks/useMessageComposerCommands.d.ts +2 -2
  997. package/dist/types/components/MessageComposer/hooks/useMessageComposerCommands.d.ts.map +1 -1
  998. package/dist/types/components/MessageComposer/hooks/useMessageComposerController.d.ts +1 -1
  999. package/dist/types/components/MessageComposer/hooks/useMessageComposerController.d.ts.map +1 -1
  1000. package/dist/types/components/MessageComposer/hooks/useMessageComposerHasSendableData.d.ts.map +1 -1
  1001. package/dist/types/components/MessageComposer/hooks/useMessageComposerSubmitFn.d.ts +7 -0
  1002. package/dist/types/components/MessageComposer/hooks/useMessageComposerSubmitFn.d.ts.map +1 -0
  1003. package/dist/types/components/MessageComposer/index.d.ts +2 -1
  1004. package/dist/types/components/MessageComposer/index.d.ts.map +1 -1
  1005. package/dist/types/components/MessageList/FloatingDateSeparator.d.ts +1 -1
  1006. package/dist/types/components/MessageList/FloatingDateSeparator.d.ts.map +1 -1
  1007. package/dist/types/components/MessageList/MessageList.d.ts +24 -25
  1008. package/dist/types/components/MessageList/MessageList.d.ts.map +1 -1
  1009. package/dist/types/components/MessageList/NewMessageNotification.d.ts.map +1 -1
  1010. package/dist/types/components/MessageList/ScrollToLatestMessageButton.d.ts +0 -1
  1011. package/dist/types/components/MessageList/ScrollToLatestMessageButton.d.ts.map +1 -1
  1012. package/dist/types/components/MessageList/UnreadMessagesNotification.d.ts +1 -4
  1013. package/dist/types/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
  1014. package/dist/types/components/MessageList/UnreadMessagesSeparator.d.ts.map +1 -1
  1015. package/dist/types/components/MessageList/VirtualizedMessageList.d.ts +23 -42
  1016. package/dist/types/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
  1017. package/dist/types/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
  1018. package/dist/types/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts +3 -3
  1019. package/dist/types/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts.map +1 -1
  1020. package/dist/types/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.d.ts +2 -2
  1021. package/dist/types/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.d.ts.map +1 -1
  1022. package/dist/types/components/MessageList/hooks/MessageList/useMessageListElements.d.ts +1 -3
  1023. package/dist/types/components/MessageList/hooks/MessageList/useMessageListElements.d.ts.map +1 -1
  1024. package/dist/types/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts +1 -0
  1025. package/dist/types/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts.map +1 -1
  1026. package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts +6 -25
  1027. package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts.map +1 -1
  1028. package/dist/types/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts +1 -1
  1029. package/dist/types/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts.map +1 -1
  1030. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.d.ts +2 -2
  1031. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.d.ts.map +1 -1
  1032. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts +1 -1
  1033. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts.map +1 -1
  1034. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts +1 -5
  1035. package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts.map +1 -1
  1036. package/dist/types/components/MessageList/hooks/useCanPaginateReplies.d.ts +32 -0
  1037. package/dist/types/components/MessageList/hooks/useCanPaginateReplies.d.ts.map +1 -0
  1038. package/dist/types/components/MessageList/hooks/useLastDeliveredData.d.ts +1 -0
  1039. package/dist/types/components/MessageList/hooks/useLastDeliveredData.d.ts.map +1 -1
  1040. package/dist/types/components/MessageList/hooks/useLastReadData.d.ts +1 -0
  1041. package/dist/types/components/MessageList/hooks/useLastReadData.d.ts.map +1 -1
  1042. package/dist/types/components/MessageList/hooks/useMarkRead.d.ts +5 -9
  1043. package/dist/types/components/MessageList/hooks/useMarkRead.d.ts.map +1 -1
  1044. package/dist/types/components/MessageList/hooks/useReceiptsByMessageId.d.ts +12 -0
  1045. package/dist/types/components/MessageList/hooks/useReceiptsByMessageId.d.ts.map +1 -0
  1046. package/dist/types/components/MessageList/hooks/useThreadHead.d.ts +9 -0
  1047. package/dist/types/components/MessageList/hooks/useThreadHead.d.ts.map +1 -0
  1048. package/dist/types/components/MessageList/messageSourceKey.d.ts +14 -0
  1049. package/dist/types/components/MessageList/messageSourceKey.d.ts.map +1 -0
  1050. package/dist/types/components/MessageList/renderMessages.d.ts +11 -9
  1051. package/dist/types/components/MessageList/renderMessages.d.ts.map +1 -1
  1052. package/dist/types/components/MessageList/utils.d.ts +22 -13
  1053. package/dist/types/components/MessageList/utils.d.ts.map +1 -1
  1054. package/dist/types/components/Modal/CloseButtonOnModalOverlay.d.ts.map +1 -1
  1055. package/dist/types/components/Notifications/Notification.d.ts.map +1 -1
  1056. package/dist/types/components/Notifications/NotificationList.d.ts.map +1 -1
  1057. package/dist/types/components/Notifications/hooks/useNotificationApi.d.ts +3 -0
  1058. package/dist/types/components/Notifications/hooks/useNotificationApi.d.ts.map +1 -1
  1059. package/dist/types/components/Notifications/hooks/useNotificationTarget.d.ts.map +1 -1
  1060. package/dist/types/components/Notifications/notificationTarget.d.ts.map +1 -1
  1061. package/dist/types/components/Poll/PollActions/AddCommentPrompt.d.ts.map +1 -1
  1062. package/dist/types/components/Poll/PollActions/EndPollAlert.d.ts.map +1 -1
  1063. package/dist/types/components/Poll/PollActions/PollActions.d.ts.map +1 -1
  1064. package/dist/types/components/Poll/PollActions/PollAnswerList.d.ts.map +1 -1
  1065. package/dist/types/components/Poll/PollActions/PollOptionsFullList.d.ts.map +1 -1
  1066. package/dist/types/components/Poll/PollActions/PollQuestion.d.ts.map +1 -1
  1067. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotes.d.ts +2 -2
  1068. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotes.d.ts.map +1 -1
  1069. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +2 -2
  1070. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts.map +1 -1
  1071. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesList.d.ts +2 -2
  1072. package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesList.d.ts.map +1 -1
  1073. package/dist/types/components/Poll/PollActions/PollResults/PollResults.d.ts.map +1 -1
  1074. package/dist/types/components/Poll/PollActions/SuggestPollOptionPrompt.d.ts.map +1 -1
  1075. package/dist/types/components/Poll/PollCreationDialog/MultipleAnswersField.d.ts.map +1 -1
  1076. package/dist/types/components/Poll/PollCreationDialog/NameField.d.ts.map +1 -1
  1077. package/dist/types/components/Poll/PollCreationDialog/OptionFieldSet.d.ts.map +1 -1
  1078. package/dist/types/components/Poll/PollCreationDialog/PollCreationDialog.d.ts.map +1 -1
  1079. package/dist/types/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts.map +1 -1
  1080. package/dist/types/components/Poll/PollCreationDialog/PollOptionReorderHandle.d.ts.map +1 -1
  1081. package/dist/types/components/Poll/PollHeader.d.ts.map +1 -1
  1082. package/dist/types/components/Poll/PollOptionList.d.ts.map +1 -1
  1083. package/dist/types/components/Poll/PollOptionSelector.d.ts +2 -2
  1084. package/dist/types/components/Poll/PollOptionSelector.d.ts.map +1 -1
  1085. package/dist/types/components/Poll/PollVote.d.ts +1 -1
  1086. package/dist/types/components/Poll/PollVote.d.ts.map +1 -1
  1087. package/dist/types/components/Poll/hooks/useManagePollVotesRealtime.d.ts +2 -2
  1088. package/dist/types/components/Poll/hooks/useManagePollVotesRealtime.d.ts.map +1 -1
  1089. package/dist/types/components/Poll/hooks/usePollAnswerPagination.d.ts +2 -2
  1090. package/dist/types/components/Poll/hooks/usePollAnswerPagination.d.ts.map +1 -1
  1091. package/dist/types/components/Poll/hooks/usePollOptionVotesPagination.d.ts +2 -2
  1092. package/dist/types/components/Poll/hooks/usePollOptionVotesPagination.d.ts.map +1 -1
  1093. package/dist/types/components/Reactions/MessageReactions.d.ts.map +1 -1
  1094. package/dist/types/components/Reactions/MessageReactionsDetail.d.ts +2 -2
  1095. package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
  1096. package/dist/types/components/Reactions/ReactionSelector.d.ts.map +1 -1
  1097. package/dist/types/components/Reactions/ReactionSelectorWithButton.d.ts +0 -5
  1098. package/dist/types/components/Reactions/ReactionSelectorWithButton.d.ts.map +1 -1
  1099. package/dist/types/components/Reactions/hooks/useFetchReactions.d.ts +2 -2
  1100. package/dist/types/components/Reactions/hooks/useFetchReactions.d.ts.map +1 -1
  1101. package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts +1 -3
  1102. package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts.map +1 -1
  1103. package/dist/types/components/Search/SearchBar/SearchBar.d.ts.map +1 -1
  1104. package/dist/types/components/Search/SearchContext.d.ts.map +1 -1
  1105. package/dist/types/components/Search/SearchResults/SearchResultItem.d.ts +20 -6
  1106. package/dist/types/components/Search/SearchResults/SearchResultItem.d.ts.map +1 -1
  1107. package/dist/types/components/Search/SearchResults/SearchResultsHeader.d.ts.map +1 -1
  1108. package/dist/types/components/Search/SearchResults/SearchSourceResultsEmpty.d.ts.map +1 -1
  1109. package/dist/types/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.d.ts.map +1 -1
  1110. package/dist/types/components/Search/SearchSourceResultsContext.d.ts.map +1 -1
  1111. package/dist/types/components/Search/hooks/index.d.ts +0 -1
  1112. package/dist/types/components/Search/hooks/index.d.ts.map +1 -1
  1113. package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts +6 -0
  1114. package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts.map +1 -1
  1115. package/dist/types/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
  1116. package/dist/types/components/TextareaComposer/SuggestionList/CommandItem.d.ts +2 -2
  1117. package/dist/types/components/TextareaComposer/SuggestionList/CommandItem.d.ts.map +1 -1
  1118. package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.d.ts.map +1 -1
  1119. package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.d.ts.map +1 -1
  1120. package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.d.ts.map +1 -1
  1121. package/dist/types/components/TextareaComposer/SuggestionList/SuggestionList.d.ts.map +1 -1
  1122. package/dist/types/components/TextareaComposer/TextareaComposer.d.ts.map +1 -1
  1123. package/dist/types/components/TextareaComposer/hooks/useTextareaPlaceholder.d.ts.map +1 -1
  1124. package/dist/types/components/Thread/Thread.d.ts +31 -27
  1125. package/dist/types/components/Thread/Thread.d.ts.map +1 -1
  1126. package/dist/types/components/Thread/ThreadHead.d.ts.map +1 -1
  1127. package/dist/types/components/Thread/ThreadHeader.d.ts +13 -6
  1128. package/dist/types/components/Thread/ThreadHeader.d.ts.map +1 -1
  1129. package/dist/types/components/Thread/ThreadStart.d.ts.map +1 -1
  1130. package/dist/types/components/Thread/index.d.ts +0 -1
  1131. package/dist/types/components/Thread/index.d.ts.map +1 -1
  1132. package/dist/types/components/Threads/ThreadContext.d.ts.map +1 -1
  1133. package/dist/types/components/Threads/ThreadList/ThreadList.d.ts.map +1 -1
  1134. package/dist/types/components/Threads/ThreadList/ThreadListEmptyPlaceholder.d.ts.map +1 -1
  1135. package/dist/types/components/Threads/ThreadList/ThreadListHeader.d.ts.map +1 -1
  1136. package/dist/types/components/Threads/ThreadList/ThreadListItemUI.d.ts.map +1 -1
  1137. package/dist/types/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.d.ts.map +1 -1
  1138. package/dist/types/components/Threads/ThreadList/useThreadHighlighting.d.ts +15 -0
  1139. package/dist/types/components/Threads/ThreadList/useThreadHighlighting.d.ts.map +1 -0
  1140. package/dist/types/components/Threads/ThreadList/utils.a11y.d.ts.map +1 -1
  1141. package/dist/types/components/Threads/hooks/useCloseThread.d.ts +9 -0
  1142. package/dist/types/components/Threads/hooks/useCloseThread.d.ts.map +1 -0
  1143. package/dist/types/components/Threads/index.d.ts +1 -0
  1144. package/dist/types/components/Threads/index.d.ts.map +1 -1
  1145. package/dist/types/components/TypingIndicator/TypingIndicator.d.ts +4 -5
  1146. package/dist/types/components/TypingIndicator/TypingIndicator.d.ts.map +1 -1
  1147. package/dist/types/components/TypingIndicator/TypingIndicatorHeader.d.ts +1 -1
  1148. package/dist/types/components/TypingIndicator/TypingIndicatorHeader.d.ts.map +1 -1
  1149. package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts +2 -2
  1150. package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts.map +1 -1
  1151. package/dist/types/components/TypingIndicator/utils/getTypingStatusMessage.d.ts +2 -3
  1152. package/dist/types/components/TypingIndicator/utils/getTypingStatusMessage.d.ts.map +1 -1
  1153. package/dist/types/components/VideoPlayer/VideoThumbnail.d.ts.map +1 -1
  1154. package/dist/types/components/index.d.ts +0 -2
  1155. package/dist/types/components/index.d.ts.map +1 -1
  1156. package/dist/types/context/AttachmentContext.d.ts +19 -0
  1157. package/dist/types/context/AttachmentContext.d.ts.map +1 -0
  1158. package/dist/types/context/ChannelInstanceContext.d.ts +16 -0
  1159. package/dist/types/context/ChannelInstanceContext.d.ts.map +1 -0
  1160. package/dist/types/context/ChannelListContext.d.ts +9 -18
  1161. package/dist/types/context/ChannelListContext.d.ts.map +1 -1
  1162. package/dist/types/context/ChatContext.d.ts +10 -23
  1163. package/dist/types/context/ChatContext.d.ts.map +1 -1
  1164. package/dist/types/context/ComponentContext.d.ts +30 -23
  1165. package/dist/types/context/ComponentContext.d.ts.map +1 -1
  1166. package/dist/types/context/DialogManagerContext.d.ts.map +1 -1
  1167. package/dist/types/context/MessageBounceContext.d.ts +1 -1
  1168. package/dist/types/context/MessageBounceContext.d.ts.map +1 -1
  1169. package/dist/types/context/MessageComposerContext.d.ts +7 -2
  1170. package/dist/types/context/MessageComposerContext.d.ts.map +1 -1
  1171. package/dist/types/context/MessageComposerControllerContext.d.ts +13 -0
  1172. package/dist/types/context/MessageComposerControllerContext.d.ts.map +1 -0
  1173. package/dist/types/context/MessageContext.d.ts +8 -21
  1174. package/dist/types/context/MessageContext.d.ts.map +1 -1
  1175. package/dist/types/context/MessageListContext.d.ts +2 -2
  1176. package/dist/types/context/MessageListContext.d.ts.map +1 -1
  1177. package/dist/types/context/MessageTranslationViewContext.d.ts.map +1 -1
  1178. package/dist/types/context/ModalContext.d.ts +4 -0
  1179. package/dist/types/context/ModalContext.d.ts.map +1 -1
  1180. package/dist/types/context/PollContext.d.ts.map +1 -1
  1181. package/dist/types/context/TranslationContext.d.ts +21 -11
  1182. package/dist/types/context/TranslationContext.d.ts.map +1 -1
  1183. package/dist/types/context/VirtualizedMessageListContext.d.ts.map +1 -1
  1184. package/dist/types/context/WithComponents.d.ts.map +1 -1
  1185. package/dist/types/context/WorkspaceNavigationContext.d.ts +128 -0
  1186. package/dist/types/context/WorkspaceNavigationContext.d.ts.map +1 -0
  1187. package/dist/types/context/index.d.ts +6 -4
  1188. package/dist/types/context/index.d.ts.map +1 -1
  1189. package/dist/types/context/requireContext.d.ts +10 -0
  1190. package/dist/types/context/requireContext.d.ts.map +1 -0
  1191. package/dist/types/context/useChannel.d.ts +3 -0
  1192. package/dist/types/context/useChannel.d.ts.map +1 -0
  1193. package/dist/types/context/useComponentContextIcons.d.ts +4 -6
  1194. package/dist/types/context/useComponentContextIcons.d.ts.map +1 -1
  1195. package/dist/types/hooks/index.d.ts +3 -0
  1196. package/dist/types/hooks/index.d.ts.map +1 -0
  1197. package/dist/types/hooks/useIsDmChannel.d.ts +13 -0
  1198. package/dist/types/hooks/useIsDmChannel.d.ts.map +1 -0
  1199. package/dist/types/hooks/useMessagePaginator.d.ts +6 -0
  1200. package/dist/types/hooks/useMessagePaginator.d.ts.map +1 -0
  1201. package/dist/types/i18n/Streami18n.d.ts +48 -848
  1202. package/dist/types/i18n/Streami18n.d.ts.map +1 -1
  1203. package/dist/types/i18n/TranslationBuilder/index.d.ts +6 -1
  1204. package/dist/types/i18n/TranslationBuilder/index.d.ts.map +1 -1
  1205. package/dist/types/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.d.ts.map +1 -1
  1206. package/dist/types/i18n/TranslationBuilder/notifications/translators.d.ts.map +1 -1
  1207. package/dist/types/i18n/TranslationBuilder/notifications/translatorsByNotificationType.d.ts +3 -1
  1208. package/dist/types/i18n/TranslationBuilder/notifications/translatorsByNotificationType.d.ts.map +1 -1
  1209. package/dist/types/i18n/index.d.ts +2 -2
  1210. package/dist/types/i18n/index.d.ts.map +1 -1
  1211. package/dist/types/i18n/keys.d.ts +583 -0
  1212. package/dist/types/i18n/keys.d.ts.map +1 -0
  1213. package/dist/types/i18n/runtimeDefaults.d.ts +37 -0
  1214. package/dist/types/i18n/runtimeDefaults.d.ts.map +1 -0
  1215. package/dist/types/i18n/types.d.ts +34 -104
  1216. package/dist/types/i18n/types.d.ts.map +1 -1
  1217. package/dist/types/i18n/useStreami18n.d.ts +19 -0
  1218. package/dist/types/i18n/useStreami18n.d.ts.map +1 -0
  1219. package/dist/types/i18n/utils.d.ts +18 -14
  1220. package/dist/types/i18n/utils.d.ts.map +1 -1
  1221. package/dist/types/plugins/ChannelDetail/AvatarWithChannelDetail.d.ts.map +1 -1
  1222. package/dist/types/plugins/ChannelDetail/ChannelDetail.d.ts.map +1 -1
  1223. package/dist/types/plugins/ChannelDetail/ChannelDetailEmptyList.d.ts.map +1 -1
  1224. package/dist/types/plugins/ChannelDetail/ChannelDetailSearchInput.d.ts.map +1 -1
  1225. package/dist/types/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.d.ts.map +1 -1
  1226. package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.d.ts.map +1 -1
  1227. package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.d.ts.map +1 -1
  1228. package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.d.ts.map +1 -1
  1229. package/dist/types/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.d.ts.map +1 -1
  1230. package/dist/types/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.d.ts.map +1 -1
  1231. package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.d.ts.map +1 -1
  1232. package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.d.ts.map +1 -1
  1233. package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.d.ts.map +1 -1
  1234. package/dist/types/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.d.ts.map +1 -1
  1235. package/dist/types/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.d.ts.map +1 -1
  1236. package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.d.ts.map +1 -1
  1237. package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.d.ts.map +1 -1
  1238. package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.d.ts.map +1 -1
  1239. package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.d.ts.map +1 -1
  1240. package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.d.ts.map +1 -1
  1241. package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.d.ts.map +1 -1
  1242. package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.d.ts.map +1 -1
  1243. package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.d.ts +5 -1
  1244. package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.d.ts.map +1 -1
  1245. package/dist/types/plugins/Emojis/EmojiPicker.d.ts +0 -4
  1246. package/dist/types/plugins/Emojis/EmojiPicker.d.ts.map +1 -1
  1247. package/dist/types/plugins/SlotGeometry/SlotGeometry.d.ts +72 -0
  1248. package/dist/types/plugins/SlotGeometry/SlotGeometry.d.ts.map +1 -0
  1249. package/dist/types/plugins/SlotGeometry/index.d.ts +3 -0
  1250. package/dist/types/plugins/SlotGeometry/index.d.ts.map +1 -0
  1251. package/dist/types/plugins/SlotLayout/ChannelSlot.d.ts +24 -0
  1252. package/dist/types/plugins/SlotLayout/ChannelSlot.d.ts.map +1 -0
  1253. package/dist/types/plugins/SlotLayout/ChatView.a11y.utility.d.ts.map +1 -0
  1254. package/dist/types/plugins/SlotLayout/ChatView.d.ts +113 -0
  1255. package/dist/types/plugins/SlotLayout/ChatView.d.ts.map +1 -0
  1256. package/dist/types/plugins/SlotLayout/ChatViewNavigationContext.d.ts +111 -0
  1257. package/dist/types/plugins/SlotLayout/ChatViewNavigationContext.d.ts.map +1 -0
  1258. package/dist/types/plugins/SlotLayout/ThreadListSlot.d.ts +8 -0
  1259. package/dist/types/plugins/SlotLayout/ThreadListSlot.d.ts.map +1 -0
  1260. package/dist/types/plugins/SlotLayout/ThreadSlot.d.ts +10 -0
  1261. package/dist/types/plugins/SlotLayout/ThreadSlot.d.ts.map +1 -0
  1262. package/dist/types/plugins/SlotLayout/hooks/index.d.ts +3 -0
  1263. package/dist/types/plugins/SlotLayout/hooks/index.d.ts.map +1 -0
  1264. package/dist/types/plugins/SlotLayout/hooks/useLayoutViewState.d.ts +5 -0
  1265. package/dist/types/plugins/SlotLayout/hooks/useLayoutViewState.d.ts.map +1 -0
  1266. package/dist/types/plugins/SlotLayout/hooks/useSlotEntity.d.ts +162 -0
  1267. package/dist/types/plugins/SlotLayout/hooks/useSlotEntity.d.ts.map +1 -0
  1268. package/dist/types/plugins/SlotLayout/index.d.ts +12 -0
  1269. package/dist/types/plugins/SlotLayout/index.d.ts.map +1 -0
  1270. package/dist/types/plugins/SlotLayout/layout/Slot.d.ts +8 -0
  1271. package/dist/types/plugins/SlotLayout/layout/Slot.d.ts.map +1 -0
  1272. package/dist/types/plugins/SlotLayout/layout/WorkspaceLayout.d.ts +11 -0
  1273. package/dist/types/plugins/SlotLayout/layout/WorkspaceLayout.d.ts.map +1 -0
  1274. package/dist/types/plugins/SlotLayout/layoutController/LayoutController.d.ts +25 -0
  1275. package/dist/types/plugins/SlotLayout/layoutController/LayoutController.d.ts.map +1 -0
  1276. package/dist/types/plugins/SlotLayout/layoutController/layoutControllerTypes.d.ts +121 -0
  1277. package/dist/types/plugins/SlotLayout/layoutController/layoutControllerTypes.d.ts.map +1 -0
  1278. package/dist/types/plugins/SlotLayout/layoutController/serialization.d.ts +6 -0
  1279. package/dist/types/plugins/SlotLayout/layoutController/serialization.d.ts.map +1 -0
  1280. package/dist/types/plugins/SlotLayout/slotBinding.d.ts +85 -0
  1281. package/dist/types/plugins/SlotLayout/slotBinding.d.ts.map +1 -0
  1282. package/dist/types/plugins/SlotLayout/slotRegistry.d.ts +60 -0
  1283. package/dist/types/plugins/SlotLayout/slotRegistry.d.ts.map +1 -0
  1284. package/dist/types/plugins/SlotLayout/workspaceNavigationAdapter.d.ts +26 -0
  1285. package/dist/types/plugins/SlotLayout/workspaceNavigationAdapter.d.ts.map +1 -0
  1286. package/dist/types/store/hooks/useStateStore.d.ts +1 -1
  1287. package/dist/types/store/hooks/useStateStore.d.ts.map +1 -1
  1288. package/dist/types/types/index.d.ts +0 -1
  1289. package/dist/types/types/index.d.ts.map +1 -1
  1290. package/dist/types/types/types.d.ts +0 -10
  1291. package/dist/types/types/types.d.ts.map +1 -1
  1292. package/dist/types/utils/getChannel.d.ts +2 -2
  1293. package/dist/types/utils/getChannel.d.ts.map +1 -1
  1294. package/dist/types/utils/useStableCallback.d.ts +1 -1
  1295. package/package.json +34 -16
  1296. package/dist/cjs/NotificationList.4ce251ea.js +0 -9552
  1297. package/dist/cjs/NotificationList.4ce251ea.js.map +0 -1
  1298. package/dist/cjs/useChannelHeaderOnlineStatus.64c443f5.js +0 -961
  1299. package/dist/cjs/useChannelHeaderOnlineStatus.64c443f5.js.map +0 -1
  1300. package/dist/cjs/useInertWhenHidden.1a2a6a2b.js +0 -6573
  1301. package/dist/cjs/useInertWhenHidden.1a2a6a2b.js.map +0 -1
  1302. package/dist/es/components/Channel/channelState.mjs +0 -195
  1303. package/dist/es/components/Channel/channelState.mjs.map +0 -1
  1304. package/dist/es/components/Channel/hooks/useCreateChannelStateContext.mjs +0 -86
  1305. package/dist/es/components/Channel/hooks/useCreateChannelStateContext.mjs.map +0 -1
  1306. package/dist/es/components/Channel/hooks/useCreateTypingContext.mjs +0 -10
  1307. package/dist/es/components/Channel/hooks/useCreateTypingContext.mjs.map +0 -1
  1308. package/dist/es/components/Channel/hooks/useEditMessageHandler.mjs +0 -13
  1309. package/dist/es/components/Channel/hooks/useEditMessageHandler.mjs.map +0 -1
  1310. package/dist/es/components/Channel/hooks/useIsMounted.mjs +0 -16
  1311. package/dist/es/components/Channel/hooks/useIsMounted.mjs.map +0 -1
  1312. package/dist/es/components/Channel/hooks/useMentionsHandlers.mjs +0 -18
  1313. package/dist/es/components/Channel/hooks/useMentionsHandlers.mjs.map +0 -1
  1314. package/dist/es/components/Channel/utils.mjs +0 -156
  1315. package/dist/es/components/Channel/utils.mjs.map +0 -1
  1316. package/dist/es/components/ChannelList/ChannelListUI.mjs +0 -35
  1317. package/dist/es/components/ChannelList/ChannelListUI.mjs.map +0 -1
  1318. package/dist/es/components/ChannelList/hooks/useChannelListShape.mjs +0 -310
  1319. package/dist/es/components/ChannelList/hooks/useChannelListShape.mjs.map +0 -1
  1320. package/dist/es/components/ChannelList/hooks/useConnectionRecoveredListener.mjs +0 -19
  1321. package/dist/es/components/ChannelList/hooks/useConnectionRecoveredListener.mjs.map +0 -1
  1322. package/dist/es/components/ChannelList/hooks/usePaginatedChannels.mjs +0 -110
  1323. package/dist/es/components/ChannelList/hooks/usePaginatedChannels.mjs.map +0 -1
  1324. package/dist/es/components/ChannelList/utils.mjs +0 -86
  1325. package/dist/es/components/ChannelList/utils.mjs.map +0 -1
  1326. package/dist/es/components/Chat/hooks/useChannelsQueryState.mjs +0 -16
  1327. package/dist/es/components/Chat/hooks/useChannelsQueryState.mjs.map +0 -1
  1328. package/dist/es/components/ChatView/ChatView.a11y.utility.mjs.map +0 -1
  1329. package/dist/es/components/ChatView/ChatView.mjs +0 -224
  1330. package/dist/es/components/ChatView/ChatView.mjs.map +0 -1
  1331. package/dist/es/components/MessageComposer/hooks/useSubmitHandler.mjs +0 -98
  1332. package/dist/es/components/MessageComposer/hooks/useSubmitHandler.mjs.map +0 -1
  1333. package/dist/es/components/MessageList/hooks/useReducedMotionPreference.mjs +0 -23
  1334. package/dist/es/components/MessageList/hooks/useReducedMotionPreference.mjs.map +0 -1
  1335. package/dist/es/components/Search/hooks/useSearchFocusedMessage.mjs +0 -13
  1336. package/dist/es/components/Search/hooks/useSearchFocusedMessage.mjs.map +0 -1
  1337. package/dist/es/components/Thread/LegacyThreadContext.mjs +0 -8
  1338. package/dist/es/components/Thread/LegacyThreadContext.mjs.map +0 -1
  1339. package/dist/es/components/UtilityComponents/NullComponent.mjs +0 -6
  1340. package/dist/es/components/UtilityComponents/NullComponent.mjs.map +0 -1
  1341. package/dist/es/components/Window/Window.mjs +0 -21
  1342. package/dist/es/components/Window/Window.mjs.map +0 -1
  1343. package/dist/es/context/ChannelActionContext.mjs +0 -20
  1344. package/dist/es/context/ChannelActionContext.mjs.map +0 -1
  1345. package/dist/es/context/ChannelStateContext.mjs +0 -24
  1346. package/dist/es/context/ChannelStateContext.mjs.map +0 -1
  1347. package/dist/es/context/TypingContext.mjs +0 -20
  1348. package/dist/es/context/TypingContext.mjs.map +0 -1
  1349. package/dist/es/i18n/TranslationBuilder/TranslationBuilder.mjs +0 -86
  1350. package/dist/es/i18n/TranslationBuilder/TranslationBuilder.mjs.map +0 -1
  1351. package/dist/es/i18n/de.mjs +0 -782
  1352. package/dist/es/i18n/de.mjs.map +0 -1
  1353. package/dist/es/i18n/en.mjs +0 -779
  1354. package/dist/es/i18n/en.mjs.map +0 -1
  1355. package/dist/es/i18n/es.mjs +0 -821
  1356. package/dist/es/i18n/es.mjs.map +0 -1
  1357. package/dist/es/i18n/fr.mjs +0 -822
  1358. package/dist/es/i18n/fr.mjs.map +0 -1
  1359. package/dist/es/i18n/hi.mjs +0 -786
  1360. package/dist/es/i18n/hi.mjs.map +0 -1
  1361. package/dist/es/i18n/it.mjs +0 -821
  1362. package/dist/es/i18n/it.mjs.map +0 -1
  1363. package/dist/es/i18n/ja.mjs +0 -760
  1364. package/dist/es/i18n/ja.mjs.map +0 -1
  1365. package/dist/es/i18n/ko.mjs +0 -760
  1366. package/dist/es/i18n/ko.mjs.map +0 -1
  1367. package/dist/es/i18n/nl.mjs +0 -786
  1368. package/dist/es/i18n/nl.mjs.map +0 -1
  1369. package/dist/es/i18n/pt.mjs +0 -819
  1370. package/dist/es/i18n/pt.mjs.map +0 -1
  1371. package/dist/es/i18n/ru.mjs +0 -868
  1372. package/dist/es/i18n/ru.mjs.map +0 -1
  1373. package/dist/es/i18n/tr.mjs +0 -781
  1374. package/dist/es/i18n/tr.mjs.map +0 -1
  1375. package/dist/es/utils/getChannelConfig.mjs +0 -11
  1376. package/dist/es/utils/getChannelConfig.mjs.map +0 -1
  1377. package/dist/types/components/Channel/channelState.d.ts +0 -90
  1378. package/dist/types/components/Channel/channelState.d.ts.map +0 -1
  1379. package/dist/types/components/Channel/hooks/useCreateChannelStateContext.d.ts +0 -6
  1380. package/dist/types/components/Channel/hooks/useCreateChannelStateContext.d.ts.map +0 -1
  1381. package/dist/types/components/Channel/hooks/useCreateTypingContext.d.ts +0 -3
  1382. package/dist/types/components/Channel/hooks/useCreateTypingContext.d.ts.map +0 -1
  1383. package/dist/types/components/Channel/hooks/useEditMessageHandler.d.ts +0 -5
  1384. package/dist/types/components/Channel/hooks/useEditMessageHandler.d.ts.map +0 -1
  1385. package/dist/types/components/Channel/hooks/useMentionsHandlers.d.ts +0 -10
  1386. package/dist/types/components/Channel/hooks/useMentionsHandlers.d.ts.map +0 -1
  1387. package/dist/types/components/Channel/utils.d.ts +0 -55
  1388. package/dist/types/components/Channel/utils.d.ts.map +0 -1
  1389. package/dist/types/components/ChannelList/ChannelListUI.d.ts +0 -18
  1390. package/dist/types/components/ChannelList/ChannelListUI.d.ts.map +0 -1
  1391. package/dist/types/components/ChannelList/hooks/useChannelListShape.d.ts +0 -61
  1392. package/dist/types/components/ChannelList/hooks/useChannelListShape.d.ts.map +0 -1
  1393. package/dist/types/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts +0 -2
  1394. package/dist/types/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts.map +0 -1
  1395. package/dist/types/components/ChannelList/hooks/usePaginatedChannels.d.ts +0 -29
  1396. package/dist/types/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +0 -1
  1397. package/dist/types/components/ChannelList/utils.d.ts +0 -46
  1398. package/dist/types/components/ChannelList/utils.d.ts.map +0 -1
  1399. package/dist/types/components/Chat/hooks/useChannelsQueryState.d.ts +0 -12
  1400. package/dist/types/components/Chat/hooks/useChannelsQueryState.d.ts.map +0 -1
  1401. package/dist/types/components/ChatView/ChatView.a11y.utility.d.ts.map +0 -1
  1402. package/dist/types/components/ChatView/ChatView.d.ts +0 -59
  1403. package/dist/types/components/ChatView/ChatView.d.ts.map +0 -1
  1404. package/dist/types/components/ChatView/index.d.ts +0 -2
  1405. package/dist/types/components/ChatView/index.d.ts.map +0 -1
  1406. package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts +0 -5
  1407. package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts.map +0 -1
  1408. package/dist/types/components/Search/hooks/useSearchFocusedMessage.d.ts +0 -2
  1409. package/dist/types/components/Search/hooks/useSearchFocusedMessage.d.ts.map +0 -1
  1410. package/dist/types/components/Thread/LegacyThreadContext.d.ts +0 -9
  1411. package/dist/types/components/Thread/LegacyThreadContext.d.ts.map +0 -1
  1412. package/dist/types/components/Window/Window.d.ts +0 -13
  1413. package/dist/types/components/Window/Window.d.ts.map +0 -1
  1414. package/dist/types/components/Window/index.d.ts +0 -2
  1415. package/dist/types/components/Window/index.d.ts.map +0 -1
  1416. package/dist/types/context/ChannelActionContext.d.ts +0 -46
  1417. package/dist/types/context/ChannelActionContext.d.ts.map +0 -1
  1418. package/dist/types/context/ChannelStateContext.d.ts +0 -51
  1419. package/dist/types/context/ChannelStateContext.d.ts.map +0 -1
  1420. package/dist/types/context/TypingContext.d.ts +0 -12
  1421. package/dist/types/context/TypingContext.d.ts.map +0 -1
  1422. package/dist/types/i18n/TranslationBuilder/TranslationBuilder.d.ts +0 -36
  1423. package/dist/types/i18n/TranslationBuilder/TranslationBuilder.d.ts.map +0 -1
  1424. package/dist/types/i18n/translations.d.ts +0 -14
  1425. package/dist/types/i18n/translations.d.ts.map +0 -1
  1426. package/dist/types/utils/getChannelConfig.d.ts +0 -8
  1427. package/dist/types/utils/getChannelConfig.d.ts.map +0 -1
  1428. /package/dist/types/{components/ChatView → plugins/SlotLayout}/ChatView.a11y.utility.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentContainer.mjs","names":[],"sources":["../../../../src/components/Attachment/AttachmentContainer.tsx"],"sourcesContent":["import React, {\n type PropsWithChildren,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport clsx from 'clsx';\nimport type {\n Attachment,\n LocalAttachment,\n SharedLocationResponse,\n VideoAttachment as VideoAttachmentType,\n} from 'stream-chat';\nimport {\n isAudioAttachment,\n isFileAttachment,\n isSharedLocationResponse,\n isVideoAttachment,\n isVoiceRecordingAttachment,\n} from 'stream-chat';\n\nimport { Audio as DefaultAudioAttachment } from './Audio';\nimport { AttachmentActions as DefaultAttachmentActions } from './AttachmentActions';\nimport { VoiceRecording as DefaultVoiceRecording } from './VoiceRecording';\nimport { type GalleryItem, toGalleryItemDescriptors } from '../Gallery';\nimport { ImageComponent as DefaultImage } from './Image';\nimport { Card as DefaultCard } from './LinkPreview/Card';\nimport { FileAttachment as DefaultFile } from './FileAttachment';\nimport { Giphy as DefaultGiphy } from './Giphy';\nimport { Geolocation as DefaultGeolocation } from './Geolocation';\nimport { ModalGallery as DefaultModalGallery } from './ModalGallery';\nimport { UnsupportedAttachment as DefaultUnsupportedAttachment } from './UnsupportedAttachment';\nimport {\n type AttachmentComponentType,\n type GalleryAttachment,\n type GeolocationContainerProps,\n getCssDimensionsVariables,\n isGalleryAttachmentType,\n isSvgAttachment,\n type RenderAttachmentProps,\n type RenderGalleryProps,\n type RenderMediaProps,\n SUPPORTED_VIDEO_FORMATS,\n} from './utils';\nimport { useChannelStateContext } from '../../context/ChannelStateContext';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport type { ImageAttachmentConfiguration } from '../../types/types';\nimport { VisibilityDisclaimer } from './VisibilityDisclaimer';\nimport { AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator } from './components';\nimport {\n getAttachmentPreviewUrl,\n hasPendingUploadState,\n} from './hooks/useAttachmentUploadState';\nimport { VideoAttachment } from './VideoAttachment';\nimport type { AttachmentProps } from './Attachment';\n\nexport type AttachmentContainerProps = {\n attachment: Attachment | GalleryAttachment | SharedLocationResponse;\n componentType: AttachmentComponentType;\n};\nexport const AttachmentWithinContainer = ({\n attachment,\n children,\n componentType,\n}: PropsWithChildren<AttachmentContainerProps>) => {\n const isGAT = isGalleryAttachmentType(attachment);\n let extra = '';\n\n if (!isGAT && !isSharedLocationResponse(attachment)) {\n extra =\n componentType === 'card' && !attachment?.image_url && !attachment?.thumb_url\n ? 'no-image'\n : attachment?.actions?.length\n ? 'actions'\n : '';\n }\n\n const classNames = clsx(\n 'str-chat__message-attachment str-chat__message-attachment-dynamic-size',\n {\n [`str-chat__message-attachment--${componentType}`]: componentType,\n [`str-chat__message-attachment--${(attachment as Attachment)?.type}`]: (\n attachment as Attachment\n )?.type,\n [`str-chat__message-attachment--${componentType}--${extra}`]:\n componentType && extra,\n 'str-chat__message-attachment--svg-image': isSvgAttachment(attachment),\n 'str-chat__message-attachment-with-actions': extra === 'actions',\n },\n );\n\n return <div className={classNames}>{children}</div>;\n};\n\nexport const AttachmentActionsContainer = ({\n actionHandler,\n attachment,\n AttachmentActions = DefaultAttachmentActions,\n attachmentActionsDefaultFocus,\n}: RenderAttachmentProps) => {\n if (!attachment.actions?.length) return null;\n\n const defaultFocusedActionValue =\n attachment.type && attachmentActionsDefaultFocus?.[attachment.type];\n\n return (\n <AttachmentActions\n {...attachment}\n actionHandler={actionHandler}\n actions={attachment.actions}\n defaultFocusedActionValue={defaultFocusedActionValue}\n id={(attachment as LocalAttachment).localMetadata?.id || ''}\n text={attachment.text || ''}\n />\n );\n};\n\nexport const MediaContainer = (props: RenderMediaProps) => {\n const { attachments: mediaAttachments } = props;\n if (!mediaAttachments.length) return null;\n\n if (mediaAttachments.length > 1) {\n return (\n <GalleryContainer\n {...props}\n attachment={{ items: mediaAttachments, type: 'gallery' }}\n />\n );\n }\n\n const mediaAttachment = mediaAttachments[0];\n const { attachments: _attachments, ...rest } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n if (isVideoAttachment(mediaAttachment, SUPPORTED_VIDEO_FORMATS)) {\n return <VideoContainer attachment={mediaAttachment} {...rest} />;\n }\n\n return <ImageContainer attachment={mediaAttachment} {...rest} />;\n};\n\nexport const CardContainer = (props: RenderAttachmentProps) => {\n const { attachment, Card = DefaultCard } = props;\n const componentType = 'card';\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <Card {...attachment} />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Card {...attachment} />\n </AttachmentWithinContainer>\n );\n};\n\nexport const GiphyContainer = (props: RenderAttachmentProps) => {\n const { attachment, Giphy = DefaultGiphy } = props;\n const componentType = 'giphy';\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <VisibilityDisclaimer />\n <Giphy attachment={attachment} />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Giphy attachment={attachment} />\n </AttachmentWithinContainer>\n );\n};\n\n/**\n * Whether there is anything to render the attachment from: a CDN url, or the local file while\n * its upload is in flight — or after it failed, since a failed message can be retried and the\n * user has to see what they are retrying.\n *\n * Deliberately non-reactive (payload only): `UploadManager` drops its record a microtask before\n * the resolved URL is written back, and gating on the live record would blink the attachment out\n * of the DOM in between.\n */\nconst hasRenderableSource = (attachment: Attachment | LocalAttachment) =>\n hasPendingUploadState(attachment) ||\n !!getAttachmentPreviewUrl(attachment, attachment.asset_url);\n\nexport const FileContainer = (props: RenderAttachmentProps) => {\n const { attachment } = props;\n\n // Audio and voice recordings render nothing without a source — `useAudioPlayer` needs one —\n // but their containers would still occupy layout, so they are filtered here too.\n if (isVoiceRecordingAttachment(attachment)) {\n return hasRenderableSource(attachment) ? (\n <VoiceRecordingContainer {...props} />\n ) : null;\n }\n\n if (isAudioAttachment(attachment)) {\n return hasRenderableSource(attachment) ? <AudioContainer {...props} /> : null;\n }\n\n if (\n !hasRenderableSource(attachment) ||\n !isFileAttachment(attachment, SUPPORTED_VIDEO_FORMATS)\n ) {\n return null;\n }\n\n return <OtherFilesContainer {...props} />;\n};\n\nexport const GalleryContainer = ({\n attachment,\n ModalGallery = DefaultModalGallery,\n}: RenderGalleryProps) => {\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const items = useMemo<GalleryItem[]>(\n () =>\n attachment.items.reduce<GalleryItem[]>((acc, attachment) => {\n // Falls back to the local blob preview while the upload is still in flight.\n const item = toGalleryItemDescriptors({\n ...attachment,\n image_url: getAttachmentPreviewUrl(attachment, attachment.image_url),\n });\n if (item) acc.push(item);\n return acc;\n }, []),\n [attachment.items],\n );\n return (\n <AttachmentWithinContainer attachment={attachment} componentType='gallery'>\n <ModalGallery items={items} key='gallery' />\n {/* One combined bar for the gallery — per-item overlays are not possible here,\n because ModalGallery receives positioned descriptors, not the attachments. */}\n <AttachmentUploadProgressIndicator\n attachments={attachment.items}\n variant='overlay'\n />\n </AttachmentWithinContainer>\n );\n};\n\nexport const ImageContainer = (props: RenderAttachmentProps) => {\n const { attachment, Image = DefaultImage } = props;\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const componentType = 'image';\n const imageElement = useRef<HTMLImageElement>(null);\n const { imageAttachmentSizeHandler } = useChannelStateContext();\n const [attachmentConfiguration, setAttachmentConfiguration] = useState<\n ImageAttachmentConfiguration | undefined\n >(undefined);\n\n useLayoutEffect(() => {\n if (imageElement.current && imageAttachmentSizeHandler) {\n const config = imageAttachmentSizeHandler(attachment, imageElement.current);\n setAttachmentConfiguration(config);\n }\n }, [imageElement, imageAttachmentSizeHandler, attachment]);\n\n // Falls back to the local blob preview while the upload is still in flight.\n const imgUrlFromAttachment =\n getAttachmentPreviewUrl(attachment, attachment.image_url, attachment.thumb_url) || '';\n\n const imageConfig: GalleryItem = {\n ...toGalleryItemDescriptors({\n ...attachment,\n image_url: attachmentConfiguration?.url || imgUrlFromAttachment,\n }),\n ref: imageElement,\n style: getCssDimensionsVariables(imgUrlFromAttachment),\n };\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <Image {...imageConfig} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Image {...imageConfig} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n </AttachmentWithinContainer>\n );\n};\n\nexport const OtherFilesContainer = ({\n attachment,\n File = DefaultFile,\n}: RenderAttachmentProps) => {\n // Same check as FileContainer, repeated because this is exported and used directly too.\n if (!hasRenderableSource(attachment)) return null;\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType='file'>\n <File attachment={attachment} />\n </AttachmentWithinContainer>\n );\n};\n\nexport const AudioContainer = ({\n attachment,\n Audio = DefaultAudioAttachment,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='audio'>\n <div className='str-chat__attachment'>\n <Audio attachment={attachment} />\n </div>\n </AttachmentWithinContainer>\n);\n\nexport const VoiceRecordingContainer = ({\n attachment,\n isQuoted,\n VoiceRecording = DefaultVoiceRecording,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='voiceRecording'>\n <div className='str-chat__attachment'>\n <VoiceRecording attachment={attachment} isQuoted={isQuoted} />\n </div>\n </AttachmentWithinContainer>\n);\n\nexport const VideoContainer = (\n props: Omit<AttachmentProps, 'attachments'> & { attachment: VideoAttachmentType },\n) => {\n const { attachment, Media } = props;\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const componentType = 'media';\n\n return attachment.actions?.length ? (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n ) : (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n </AttachmentWithinContainer>\n );\n};\n\nexport const GeolocationContainer = ({\n Geolocation = DefaultGeolocation,\n location,\n}: GeolocationContainerProps) => (\n <AttachmentWithinContainer attachment={location} componentType='geolocation'>\n <Geolocation location={location} />\n </AttachmentWithinContainer>\n);\n\nexport const UnsupportedAttachmentContainer = ({\n attachment,\n UnsupportedAttachment = DefaultUnsupportedAttachment,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='unsupported'>\n <UnsupportedAttachment attachment={attachment} />\n </AttachmentWithinContainer>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6DA,IAAa,6BAA6B,EACxC,YACA,UACA,oBACiD;CACjD,MAAM,QAAQ,wBAAwB,UAAU;CAChD,IAAI,QAAQ;CAEZ,IAAI,CAAC,SAAS,CAAC,yBAAyB,UAAU,GAChD,QACE,kBAAkB,UAAU,CAAC,YAAY,aAAa,CAAC,YAAY,YAC/D,aACA,YAAY,SAAS,SACnB,YACA;CAiBV,OAAO,oBAAC,OAAD;EAAK,WAdO,KACjB,0EACA;IACG,iCAAiC,kBAAkB;IACnD,iCAAkC,YAA2B,SAC5D,YACC;IACF,iCAAiC,cAAc,IAAI,UAClD,iBAAiB;GACnB,2CAA2C,gBAAgB,UAAU;GACrE,6CAA6C,UAAU;EACzD,CAGqB;EAAa;CAAc,CAAA;AACpD;AAEA,IAAa,8BAA8B,EACzC,eACA,YACA,mBAAA,sBAAoB,mBACpB,oCAC2B;CAC3B,IAAI,CAAC,WAAW,SAAS,QAAQ,OAAO;CAExC,MAAM,4BACJ,WAAW,QAAQ,gCAAgC,WAAW;CAEhE,OACE,oBAAC,qBAAD;EACE,GAAI;EACW;EACf,SAAS,WAAW;EACO;EAC3B,IAAK,WAA+B,eAAe,MAAM;EACzD,MAAM,WAAW,QAAQ;CAC1B,CAAA;AAEL;AAEA,IAAa,kBAAkB,UAA4B;CACzD,MAAM,EAAE,aAAa,qBAAqB;CAC1C,IAAI,CAAC,iBAAiB,QAAQ,OAAO;CAErC,IAAI,iBAAiB,SAAS,GAC5B,OACE,oBAAC,kBAAD;EACE,GAAI;EACJ,YAAY;GAAE,OAAO;GAAkB,MAAM;EAAU;CACxD,CAAA;CAIL,MAAM,kBAAkB,iBAAiB;CACzC,MAAM,EAAE,aAAa,cAAc,GAAG,SAAS;CAE/C,IAAI,kBAAkB,iBAAiB,uBAAuB,GAC5D,OAAO,oBAAC,gBAAD;EAAgB,YAAY;EAAiB,GAAI;CAAO,CAAA;CAGjE,OAAO,oBAAC,gBAAD;EAAgB,YAAY;EAAiB,GAAI;CAAO,CAAA;AACjE;AAEA,IAAa,iBAAiB,UAAiC;CAC7D,MAAM,EAAE,YAAY,MAAA,SAAO,SAAgB;CAC3C,MAAM,gBAAgB;CAEtB,IAAI,WAAW,WAAW,WAAW,QAAQ,QAC3C,OACE,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,QAAD,EAAM,GAAI,WAAa,CAAA,GACvB,oBAAC,4BAAD,EAA4B,GAAI,MAAQ,CAAA,CACrC;;CACoB,CAAA;CAI/B,OACE,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,oBAAC,QAAD,EAAM,GAAI,WAAa,CAAA;CACE,CAAA;AAE/B;AAEA,IAAa,kBAAkB,UAAiC;CAC9D,MAAM,EAAE,YAAY,OAAA,UAAQ,UAAiB;CAC7C,MAAM,gBAAgB;CAEtB,IAAI,WAAW,WAAW,WAAW,QAAQ,QAC3C,OACE,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,sBAAD,CAAuB,CAAA;IACvB,oBAAC,SAAD,EAAmB,WAAa,CAAA;IAChC,oBAAC,4BAAD,EAA4B,GAAI,MAAQ,CAAA;GACrC;;CACoB,CAAA;CAI/B,OACE,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,oBAAC,SAAD,EAAmB,WAAa,CAAA;CACP,CAAA;AAE/B;;;;;;;;;;AAWA,IAAM,uBAAuB,eAC3B,sBAAsB,UAAU,KAChC,CAAC,CAAC,wBAAwB,YAAY,WAAW,SAAS;AAE5D,IAAa,iBAAiB,UAAiC;CAC7D,MAAM,EAAE,eAAe;CAIvB,IAAI,2BAA2B,UAAU,GACvC,OAAO,oBAAoB,UAAU,IACnC,oBAAC,yBAAD,EAAyB,GAAI,MAAQ,CAAA,IACnC;CAGN,IAAI,kBAAkB,UAAU,GAC9B,OAAO,oBAAoB,UAAU,IAAI,oBAAC,gBAAD,EAAgB,GAAI,MAAQ,CAAA,IAAI;CAG3E,IACE,CAAC,oBAAoB,UAAU,KAC/B,CAAC,iBAAiB,YAAY,uBAAuB,GAErD,OAAO;CAGT,OAAO,oBAAC,qBAAD,EAAqB,GAAI,MAAQ,CAAA;AAC1C;AAEA,IAAa,oBAAoB,EAC/B,YACA,cAAA,iBAAe,mBACS;CACxB,MAAM,EAAE,mCAAA,sCAAoC,sCAC1C,oBAAoB;CActB,OACE,qBAAC,2BAAD;EAAuC;EAAY,eAAc;YAAjE,CACE,oBAAC,gBAAD,EAAqB,OAfX,cAEV,WAAW,MAAM,QAAuB,KAAK,eAAe;GAE1D,MAAM,OAAO,yBAAyB;IACpC,GAAG;IACH,WAAW,wBAAwB,YAAY,WAAW,SAAS;GACrE,CAAC;GACD,IAAI,MAAM,IAAI,KAAK,IAAI;GACvB,OAAO;EACT,GAAG,CAAC,CAAC,GACP,CAAC,WAAW,KAAK,CAIM,EAAsB,GAAX,SAAW,GAG3C,oBAAC,qCAAD;GACE,aAAa,WAAW;GACxB,SAAQ;EACT,CAAA,CACwB;;AAE/B;AAEA,IAAa,kBAAkB,UAAiC;CAC9D,MAAM,EAAE,YAAY,QAAQ,mBAAiB;CAC7C,MAAM,EAAE,mCAAA,sCAAoC,sCAC1C,oBAAoB;CACtB,MAAM,gBAAgB;CACtB,MAAM,eAAe,OAAyB,IAAI;CAClD,MAAM,EAAE,+BAA+B,uBAAuB;CAC9D,MAAM,CAAC,yBAAyB,8BAA8B,SAE5D,KAAA,CAAS;CAEX,sBAAsB;EACpB,IAAI,aAAa,WAAW,4BAE1B,2BADe,2BAA2B,YAAY,aAAa,OACxC,CAAM;CAErC,GAAG;EAAC;EAAc;EAA4B;CAAU,CAAC;CAGzD,MAAM,uBACJ,wBAAwB,YAAY,WAAW,WAAW,WAAW,SAAS,KAAK;CAErF,MAAM,cAA2B;EAC/B,GAAG,yBAAyB;GAC1B,GAAG;GACH,WAAW,yBAAyB,OAAO;EAC7C,CAAC;EACD,KAAK;EACL,OAAO,0BAA0B,oBAAoB;CACvD;CAEA,IAAI,WAAW,WAAW,WAAW,QAAQ,QAC3C,OACE,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,OAAD,EAAO,GAAI,YAAc,CAAA;IACzB,oBAAC,qCAAD;KAA+C;KAAY,SAAQ;IAAW,CAAA;IAC9E,oBAAC,4BAAD,EAA4B,GAAI,MAAQ,CAAA;GACrC;;CACoB,CAAA;CAI/B,OACE,qBAAC,2BAAD;EAAuC;EAA2B;YAAlE,CACE,oBAAC,OAAD,EAAO,GAAI,YAAc,CAAA,GACzB,oBAAC,qCAAD;GAA+C;GAAY,SAAQ;EAAW,CAAA,CACrD;;AAE/B;AAEA,IAAa,uBAAuB,EAClC,YACA,OAAO,qBACoB;CAE3B,IAAI,CAAC,oBAAoB,UAAU,GAAG,OAAO;CAE7C,OACE,oBAAC,2BAAD;EAAuC;EAAY,eAAc;YAC/D,oBAAC,MAAD,EAAkB,WAAa,CAAA;CACN,CAAA;AAE/B;AAEA,IAAa,kBAAkB,EAC7B,YACA,OAAA,UAAQ,YAER,oBAAC,2BAAD;CAAuC;CAAY,eAAc;WAC/D,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,SAAD,EAAmB,WAAa,CAAA;CAC7B,CAAA;AACoB,CAAA;AAG7B,IAAa,2BAA2B,EACtC,YACA,UACA,gBAAA,mBAAiB,qBAEjB,oBAAC,2BAAD;CAAuC;CAAY,eAAc;WAC/D,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,kBAAD;GAA4B;GAAsB;EAAW,CAAA;CAC1D,CAAA;AACoB,CAAA;AAG7B,IAAa,kBACX,UACG;CACH,MAAM,EAAE,YAAY,UAAU;CAC9B,MAAM,EAAE,mCAAA,sCAAoC,sCAC1C,oBAAoB;CACtB,MAAM,gBAAgB;CAEtB,OAAO,WAAW,SAAS,SACzB,oBAAC,2BAAD;EAAuC;EAA2B;YAChE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,iBAAD;KAA6B;KAAY,aAAa;IAAQ,CAAA;IAC9D,oBAAC,qCAAD;KAA+C;KAAY,SAAQ;IAAW,CAAA;IAC9E,oBAAC,4BAAD,EAA4B,GAAI,MAAQ,CAAA;GACrC;;CACoB,CAAA,IAE3B,qBAAC,2BAAD;EAAuC;EAA2B;YAAlE,CACE,oBAAC,iBAAD;GAA6B;GAAY,aAAa;EAAQ,CAAA,GAC9D,oBAAC,qCAAD;GAA+C;GAAY,SAAQ;EAAW,CAAA,CACrD;;AAE/B;AAEA,IAAa,wBAAwB,EACnC,aAAA,gBAAc,aACd,eAEA,oBAAC,2BAAD;CAA2B,YAAY;CAAU,eAAc;WAC7D,oBAAC,eAAD,EAAuB,SAAW,CAAA;AACT,CAAA;AAG7B,IAAa,kCAAkC,EAC7C,YACA,uBAAA,0BAAwB,4BAExB,oBAAC,2BAAD;CAAuC;CAAY,eAAc;WAC/D,oBAAC,yBAAD,EAAmC,WAAa,CAAA;AACvB,CAAA"}
1
+ {"version":3,"file":"AttachmentContainer.mjs","names":[],"sources":["../../../../src/components/Attachment/AttachmentContainer.tsx"],"sourcesContent":["import React, {\n type PropsWithChildren,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport clsx from 'clsx';\nimport type {\n Attachment,\n LocalAttachment,\n SharedLocationResponseData,\n VideoAttachment as VideoAttachmentType,\n} from 'stream-chat';\nimport {\n getAttachmentPreviewUrl,\n isAudioAttachment,\n isFileAttachment,\n isPendingUpload,\n isSharedLocationResponseData,\n isVideoAttachment,\n isVoiceRecordingAttachment,\n} from 'stream-chat';\n\nimport { Audio as DefaultAudioAttachment } from './Audio';\nimport { AttachmentActions as DefaultAttachmentActions } from './AttachmentActions';\nimport { VoiceRecording as DefaultVoiceRecording } from './VoiceRecording';\nimport { type GalleryItem, toGalleryItemDescriptors } from '../Gallery';\nimport { ImageComponent as DefaultImage } from './Image';\nimport { Card as DefaultCard } from './LinkPreview/Card';\nimport { FileAttachment as DefaultFile } from './FileAttachment';\nimport { Giphy as DefaultGiphy } from './Giphy';\nimport { Geolocation as DefaultGeolocation } from './Geolocation';\nimport { ModalGallery as DefaultModalGallery } from './ModalGallery';\nimport { UnsupportedAttachment as DefaultUnsupportedAttachment } from './UnsupportedAttachment';\nimport {\n type AttachmentComponentType,\n type GalleryAttachment,\n type GeolocationContainerProps,\n getCssDimensionsVariables,\n isGalleryAttachmentType,\n isSvgAttachment,\n type RenderAttachmentProps,\n type RenderGalleryProps,\n type RenderMediaProps,\n SUPPORTED_VIDEO_FORMATS,\n} from './utils';\nimport { VisibilityDisclaimer } from './VisibilityDisclaimer';\nimport { VideoAttachment } from './VideoAttachment';\nimport type { AttachmentProps } from './Attachment';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator } from './components';\n\n/**\n * Whether there is anything to render the attachment from: a CDN url, or the local file while\n * its upload is in flight — or after it failed, since a failed message can be retried and the\n * user has to see what they are retrying.\n *\n * Deliberately non-reactive (payload only): `UploadManager` drops its record a microtask before\n * the resolved URL is written back, and gating on the live record would blink the attachment out\n * of the DOM in between.\n */\nconst hasRenderableSource = (attachment: Attachment | LocalAttachment) =>\n isPendingUpload(attachment) ||\n !!getAttachmentPreviewUrl(attachment, attachment.asset_url);\n\nimport {\n type ImageAttachmentConfiguration,\n useAttachmentContext,\n} from '../../context/AttachmentContext';\n\nexport type AttachmentContainerProps = {\n attachment: Attachment | GalleryAttachment | SharedLocationResponseData;\n componentType: AttachmentComponentType;\n};\nexport const AttachmentWithinContainer = ({\n attachment,\n children,\n componentType,\n}: PropsWithChildren<AttachmentContainerProps>) => {\n let extra = '';\n let isSvg = false;\n\n if (!isSharedLocationResponseData(attachment)) {\n const isGAT = isGalleryAttachmentType(attachment);\n if (!isGAT) {\n extra =\n componentType === 'card' && !attachment?.image_url && !attachment?.thumb_url\n ? 'no-image'\n : attachment?.actions?.length\n ? 'actions'\n : '';\n isSvg = isSvgAttachment(attachment);\n }\n }\n\n const classNames = clsx(\n 'str-chat__message-attachment str-chat__message-attachment-dynamic-size',\n {\n [`str-chat__message-attachment--${componentType}`]: componentType,\n [`str-chat__message-attachment--${(attachment as Attachment)?.type}`]: (\n attachment as Attachment\n )?.type,\n [`str-chat__message-attachment--${componentType}--${extra}`]:\n componentType && extra,\n 'str-chat__message-attachment--svg-image': isSvg,\n 'str-chat__message-attachment-with-actions': extra === 'actions',\n },\n );\n\n return <div className={classNames}>{children}</div>;\n};\n\nexport const AttachmentActionsContainer = ({\n actionHandler,\n attachment,\n AttachmentActions = DefaultAttachmentActions,\n attachmentActionsDefaultFocus,\n}: RenderAttachmentProps) => {\n if (!attachment.actions?.length) return null;\n\n const defaultFocusedActionValue =\n attachment.type && attachmentActionsDefaultFocus?.[attachment.type];\n\n return (\n <AttachmentActions\n {...attachment}\n actionHandler={actionHandler}\n actions={attachment.actions}\n defaultFocusedActionValue={defaultFocusedActionValue}\n id={(attachment as LocalAttachment).localMetadata?.id || ''}\n text={attachment.text || ''}\n />\n );\n};\n\nexport const MediaContainer = (props: RenderMediaProps) => {\n const { attachments: mediaAttachments } = props;\n if (!mediaAttachments.length) return null;\n\n if (mediaAttachments.length > 1) {\n return (\n <GalleryContainer\n {...props}\n attachment={{ items: mediaAttachments, type: 'gallery' }}\n />\n );\n }\n\n const mediaAttachment = mediaAttachments[0];\n const { attachments: _attachments, ...rest } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n if (isVideoAttachment(mediaAttachment, SUPPORTED_VIDEO_FORMATS)) {\n return <VideoContainer attachment={mediaAttachment} {...rest} />;\n }\n\n return <ImageContainer attachment={mediaAttachment} {...rest} />;\n};\n\nexport const CardContainer = (props: RenderAttachmentProps) => {\n const { attachment, Card = DefaultCard } = props;\n const componentType = 'card';\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <Card {...attachment} />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Card {...attachment} />\n </AttachmentWithinContainer>\n );\n};\n\nexport const GiphyContainer = (props: RenderAttachmentProps) => {\n const { attachment, Giphy = DefaultGiphy } = props;\n const componentType = 'giphy';\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <VisibilityDisclaimer />\n <Giphy attachment={attachment} />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Giphy attachment={attachment} />\n </AttachmentWithinContainer>\n );\n};\n\nexport const FileContainer = (props: RenderAttachmentProps) => {\n const { attachment } = props;\n\n if (isVoiceRecordingAttachment(attachment)) {\n // Audio and voice recordings render nothing without a source — `useAudioPlayer` needs one —\n // but their containers would still occupy layout, so they are filtered here too.\n return hasRenderableSource(attachment) ? (\n <VoiceRecordingContainer {...props} />\n ) : null;\n }\n\n if (isAudioAttachment(attachment)) {\n return hasRenderableSource(attachment) ? <AudioContainer {...props} /> : null;\n }\n\n if (\n !hasRenderableSource(attachment) ||\n !isFileAttachment(attachment, SUPPORTED_VIDEO_FORMATS)\n ) {\n return null;\n }\n\n return <OtherFilesContainer {...props} />;\n};\n\nexport const GalleryContainer = ({\n attachment,\n ModalGallery = DefaultModalGallery,\n}: RenderGalleryProps) => {\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const items = useMemo<GalleryItem[]>(\n () =>\n attachment.items.reduce<GalleryItem[]>((acc, attachment) => {\n // Falls back to the local blob preview while the upload is still in flight.\n const item = toGalleryItemDescriptors({\n ...attachment,\n image_url: getAttachmentPreviewUrl(attachment, attachment.image_url),\n });\n if (item) acc.push(item);\n return acc;\n }, []),\n [attachment.items],\n );\n return (\n <AttachmentWithinContainer attachment={attachment} componentType='gallery'>\n <ModalGallery items={items} key='gallery' />\n {/* One combined bar for the gallery — per-item overlays are not possible here,\n because ModalGallery receives positioned descriptors, not the attachments. */}\n <AttachmentUploadProgressIndicator\n attachments={attachment.items}\n variant='overlay'\n />\n </AttachmentWithinContainer>\n );\n};\n\nexport const ImageContainer = (props: RenderAttachmentProps) => {\n const { attachment, Image = DefaultImage } = props;\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const componentType = 'image';\n const imageElement = useRef<HTMLImageElement>(null);\n const { imageAttachmentSizeHandler } = useAttachmentContext();\n const [attachmentConfiguration, setAttachmentConfiguration] = useState<\n ImageAttachmentConfiguration | undefined\n >(undefined);\n\n useLayoutEffect(() => {\n if (imageElement.current && imageAttachmentSizeHandler) {\n const config = imageAttachmentSizeHandler(attachment, imageElement.current);\n setAttachmentConfiguration(config);\n }\n }, [imageElement, imageAttachmentSizeHandler, attachment]);\n\n // Falls back to the local blob preview while the upload is still in flight.\n const imgUrlFromAttachment =\n getAttachmentPreviewUrl(attachment, attachment.image_url, attachment.thumb_url) || '';\n\n const imageConfig: GalleryItem = {\n ...toGalleryItemDescriptors({\n ...attachment,\n image_url: attachmentConfiguration?.url || imgUrlFromAttachment,\n }),\n ref: imageElement,\n style: getCssDimensionsVariables(imgUrlFromAttachment),\n };\n\n if (attachment.actions && attachment.actions.length) {\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <Image {...imageConfig} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n );\n }\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <Image {...imageConfig} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n </AttachmentWithinContainer>\n );\n};\n\nexport const OtherFilesContainer = ({\n attachment,\n File = DefaultFile,\n}: RenderAttachmentProps) => {\n // Same check as FileContainer, repeated because this is exported and used directly too.\n if (!hasRenderableSource(attachment)) return null;\n\n return (\n <AttachmentWithinContainer attachment={attachment} componentType='file'>\n <File attachment={attachment} />\n </AttachmentWithinContainer>\n );\n};\n\nexport const AudioContainer = ({\n attachment,\n Audio = DefaultAudioAttachment,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='audio'>\n <div className='str-chat__attachment'>\n <Audio attachment={attachment} />\n </div>\n </AttachmentWithinContainer>\n);\n\nexport const VoiceRecordingContainer = ({\n attachment,\n isQuoted,\n VoiceRecording = DefaultVoiceRecording,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='voiceRecording'>\n <div className='str-chat__attachment'>\n <VoiceRecording attachment={attachment} isQuoted={isQuoted} />\n </div>\n </AttachmentWithinContainer>\n);\n\nexport const VideoContainer = (\n props: Omit<AttachmentProps, 'attachments'> & { attachment: VideoAttachmentType },\n) => {\n const { attachment, Media } = props;\n const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n useComponentContext();\n const componentType = 'media';\n\n return attachment.actions?.length ? (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <div className='str-chat__attachment'>\n <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n <AttachmentActionsContainer {...props} />\n </div>\n </AttachmentWithinContainer>\n ) : (\n <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n </AttachmentWithinContainer>\n );\n};\n\nexport const GeolocationContainer = ({\n Geolocation = DefaultGeolocation,\n location,\n}: GeolocationContainerProps) => (\n <AttachmentWithinContainer attachment={location} componentType='geolocation'>\n <Geolocation location={location} />\n </AttachmentWithinContainer>\n);\n\nexport const UnsupportedAttachmentContainer = ({\n attachment,\n UnsupportedAttachment = DefaultUnsupportedAttachment,\n}: RenderAttachmentProps) => (\n <AttachmentWithinContainer attachment={attachment} componentType='unsupported'>\n <UnsupportedAttachment attachment={attachment} />\n </AttachmentWithinContainer>\n);\n"],"mappings":"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"}
@@ -1,16 +1,18 @@
1
- import { useComponentContext } from "../../context/ComponentContext.mjs";
2
1
  import { useStateStore } from "../../store/hooks/useStateStore.mjs";
3
- import { useMessageContext } from "../../context/MessageContext.mjs";
2
+ import { useComponentContext } from "../../context/ComponentContext.mjs";
3
+ import { MessageContext } from "../../context/MessageContext.mjs";
4
+ import { useThreadContext } from "../Threads/ThreadContext.mjs";
4
5
  import { PlayButton } from "../Button/PlayButton.mjs";
5
6
  import { FileSizeIndicator } from "./components/FileSizeIndicator.mjs";
6
- import { getAttachmentPreviewUrl, useAttachmentUploadState } from "./hooks/useAttachmentUploadState.mjs";
7
- import { AttachmentUploadProgressIndicator } from "./components/AttachmentUploadProgressIndicator.mjs";
8
7
  import { DownloadButton } from "./components/DownloadButton.mjs";
8
+ import { useAttachmentUploadState } from "./hooks/useAttachmentUploadState.mjs";
9
+ import { AttachmentUploadProgressIndicator } from "./components/AttachmentUploadProgressIndicator.mjs";
9
10
  import { useAudioPlayer } from "../AudioPlayback/WithAudioPlayback.mjs";
10
11
  import { FileIcon } from "../FileIcon/FileIcon.mjs";
11
12
  import { DurationDisplay } from "../AudioPlayback/components/DurationDisplay.mjs";
12
13
  import { ProgressBar } from "../AudioPlayback/components/ProgressBar.mjs";
13
- import "react";
14
+ import { useContext } from "react";
15
+ import { getAttachmentPreviewUrl } from "stream-chat";
14
16
  import { jsx, jsxs } from "react/jsx-runtime";
15
17
  //#region src/components/Attachment/Audio.tsx
16
18
  var AudioAttachmentUI = ({ attachment, audioPlayer }) => {
@@ -73,7 +75,9 @@ var audioPlayerStateSelector = (state) => ({
73
75
  * Audio attachment with play/pause button and progress bar
74
76
  */
75
77
  var Audio = (props) => {
76
- const { attachment: { asset_url, duration, file_size, mime_type, title, waveform_data } } = props;
78
+ const { attachment } = props;
79
+ const { asset_url, title } = attachment;
80
+ const { duration, file_size, mime_type, waveform_data } = attachment.custom ?? {};
77
81
  /**
78
82
  * Introducing message context. This could be breaking change, therefore the fallback to {} is provided.
79
83
  * If this component is used outside the message context, then there will be no audio player namespacing
@@ -83,18 +87,19 @@ var Audio = (props) => {
83
87
  * with the default SDK components, but can be done with custom API calls.In this case all the Audio
84
88
  * widgets will share the state.
85
89
  */
86
- const { message, threadList } = useMessageContext() ?? {};
90
+ const { message } = useContext(MessageContext) ?? {};
91
+ const threadInstance = useThreadContext();
87
92
  const audioPlayer = useAudioPlayer({
88
93
  durationSeconds: duration,
89
94
  fileSize: file_size,
90
95
  mimeType: mime_type,
91
- requester: message?.id && `${threadList ? message.parent_id ?? message.id : ""}${message.id}`,
92
- src: getAttachmentPreviewUrl(props.attachment, asset_url),
96
+ requester: message?.id && `${threadInstance ? message.parent_id ?? message.id : ""}${message.id}`,
97
+ src: getAttachmentPreviewUrl(attachment, asset_url),
93
98
  title,
94
99
  waveformData: waveform_data
95
100
  });
96
101
  return audioPlayer ? /* @__PURE__ */ jsx(AudioAttachmentUI, {
97
- attachment: props.attachment,
102
+ attachment,
98
103
  audioPlayer
99
104
  }) : null;
100
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Audio.mjs","names":[],"sources":["../../../../src/components/Attachment/Audio.tsx"],"sourcesContent":["import React from 'react';\nimport type { Attachment } from 'stream-chat';\n\nimport {\n AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator as DefaultFileSizeIndicator,\n DownloadButton,\n} from './components';\nimport {\n getAttachmentPreviewUrl,\n useAttachmentUploadState,\n} from './hooks/useAttachmentUploadState';\nimport type { AudioPlayerState } from '../AudioPlayback/AudioPlayer';\nimport { useAudioPlayer } from '../AudioPlayback/WithAudioPlayback';\nimport { useStateStore } from '../../store';\nimport { useComponentContext, useMessageContext } from '../../context';\nimport type { AudioPlayer } from '../AudioPlayback/AudioPlayer';\nimport { PlayButton } from '../Button/PlayButton';\nimport { FileIcon } from '../FileIcon';\nimport { DurationDisplay, ProgressBar } from '../AudioPlayback';\n\ntype AudioAttachmentUIProps = {\n audioPlayer: AudioPlayer;\n attachment?: Attachment;\n};\n\n// todo: finish creating a BaseAudioPlayer derived from VoiceRecordingPlayerUI and AudioAttachmentUI\nconst AudioAttachmentUI = ({ attachment, audioPlayer }: AudioAttachmentUIProps) => {\n const {\n AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator = DefaultFileSizeIndicator,\n } = useComponentContext();\n const { isUploading } = useAttachmentUploadState(attachment);\n const dataTestId = 'audio-widget';\n const rootClassName = 'str-chat__message-attachment-audio-widget';\n\n const { durationSeconds, isPlaying, progress, secondsElapsed } =\n useStateStore(audioPlayer?.state, audioPlayerStateSelector) ?? {};\n\n return (\n <div className={rootClassName} data-testid={dataTestId}>\n <div className='str-chat__message-attachment-audio-widget--play-controls'>\n <PlayButton isPlaying={!!isPlaying} onClick={audioPlayer.togglePlay} />\n </div>\n <div className='str-chat__message-attachment-audio-widget--data'>\n <div className='str-chat__message-attachment-audio-widget--text-first-row'>\n <div className='str-chat__message-attachment-audio-widget--title'>\n {audioPlayer.title}\n </div>\n </div>\n <div className='str-chat__message-attachment-audio-widget--text-second-row'>\n {/*\n While uploading, the upload progress takes this slot — ahead of both the duration and\n the file size. It has to outrank the duration: an audio attachment can carry one\n (`attachment.duration`, or the player reading it off the local blob), and showing it\n instead would leave an upload in flight with no indication at all.\n */}\n {isUploading ? (\n <AttachmentUploadProgressIndicator attachment={attachment} />\n ) : durationSeconds ? (\n <DurationDisplay\n duration={durationSeconds}\n isPlaying={!!isPlaying}\n secondsElapsed={secondsElapsed}\n />\n ) : (\n <FileSizeIndicator fileSize={audioPlayer.fileSize} />\n )}\n <ProgressBar\n durationSeconds={durationSeconds}\n progress={progress ?? 0}\n secondsElapsed={secondsElapsed}\n seek={audioPlayer.seek}\n />\n </div>\n </div>\n <FileIcon className='str-chat__file-icon' mimeType={audioPlayer.mimeType} />\n <DownloadButton assetUrl={audioPlayer.src} suggestedFileName={audioPlayer.title} />\n </div>\n );\n};\n\nexport type AudioProps = {\n attachment: Attachment;\n};\n\nconst audioPlayerStateSelector = (state: AudioPlayerState) => ({\n durationSeconds: state.durationSeconds,\n isPlaying: state.isPlaying,\n progress: state.progressPercent,\n secondsElapsed: state.secondsElapsed,\n});\n\n/**\n * Audio attachment with play/pause button and progress bar\n */\nexport const Audio = (props: AudioProps) => {\n const {\n attachment: { asset_url, duration, file_size, mime_type, title, waveform_data },\n } = props;\n\n /**\n * Introducing message context. This could be breaking change, therefore the fallback to {} is provided.\n * If this component is used outside the message context, then there will be no audio player namespacing\n * => scrolling away from the message in virtualized ML would create a new AudioPlayer instance.\n *\n * Edge case: the requester (message) has multiple attachments with the same assetURL - does not happen\n * with the default SDK components, but can be done with custom API calls.In this case all the Audio\n * widgets will share the state.\n */\n const { message, threadList } = useMessageContext() ?? {};\n\n const audioPlayer = useAudioPlayer({\n durationSeconds: duration,\n fileSize: file_size,\n mimeType: mime_type,\n requester:\n message?.id &&\n `${threadList ? (message.parent_id ?? message.id) : ''}${message.id}`,\n // Falls back to the local blob preview while the upload is still in flight.\n src: getAttachmentPreviewUrl(props.attachment, asset_url),\n title,\n waveformData: waveform_data,\n });\n\n return audioPlayer ? (\n <AudioAttachmentUI attachment={props.attachment} audioPlayer={audioPlayer} />\n ) : null;\n};\n"],"mappings":";;;;;;;;;;;;;;;AA2BA,IAAM,qBAAqB,EAAE,YAAY,kBAA0C;CACjF,MAAM,EACJ,mCAAA,sCAAoC,mCACpC,mBAAA,sBAAoB,sBAClB,oBAAoB;CACxB,MAAM,EAAE,gBAAgB,yBAAyB,UAAU;CAC3D,MAAM,aAAa;CACnB,MAAM,gBAAgB;CAEtB,MAAM,EAAE,iBAAiB,WAAW,UAAU,mBAC5C,cAAc,aAAa,OAAO,wBAAwB,KAAK,CAAC;CAElE,OACE,qBAAC,OAAD;EAAK,WAAW;EAAe,eAAa;YAA5C;GACE,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,YAAD;KAAY,WAAW,CAAC,CAAC;KAAW,SAAS,YAAY;IAAa,CAAA;GACnE,CAAA;GACL,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,OAAD;MAAK,WAAU;gBACZ,YAAY;KACV,CAAA;IACF,CAAA,GACL,qBAAC,OAAD;KAAK,WAAU;eAAf,CAOG,cACC,oBAAC,qCAAD,EAA+C,WAAa,CAAA,IAC1D,kBACF,oBAAC,iBAAD;MACE,UAAU;MACV,WAAW,CAAC,CAAC;MACG;KACjB,CAAA,IAED,oBAAC,qBAAD,EAAmB,UAAU,YAAY,SAAW,CAAA,GAEtD,oBAAC,aAAD;MACmB;MACjB,UAAU,YAAY;MACN;MAChB,MAAM,YAAY;KACnB,CAAA,CACE;MACF;;GACL,oBAAC,UAAD;IAAU,WAAU;IAAsB,UAAU,YAAY;GAAW,CAAA;GAC3E,oBAAC,gBAAD;IAAgB,UAAU,YAAY;IAAK,mBAAmB,YAAY;GAAQ,CAAA;EAC/E;;AAET;AAMA,IAAM,4BAA4B,WAA6B;CAC7D,iBAAiB,MAAM;CACvB,WAAW,MAAM;CACjB,UAAU,MAAM;CAChB,gBAAgB,MAAM;AACxB;;;;AAKA,IAAa,SAAS,UAAsB;CAC1C,MAAM,EACJ,YAAY,EAAE,WAAW,UAAU,WAAW,WAAW,OAAO,oBAC9D;;;;;;;;;;CAWJ,MAAM,EAAE,SAAS,eAAe,kBAAkB,KAAK,CAAC;CAExD,MAAM,cAAc,eAAe;EACjC,iBAAiB;EACjB,UAAU;EACV,UAAU;EACV,WACE,SAAS,MACT,GAAG,aAAc,QAAQ,aAAa,QAAQ,KAAM,KAAK,QAAQ;EAEnE,KAAK,wBAAwB,MAAM,YAAY,SAAS;EACxD;EACA,cAAc;CAChB,CAAC;CAED,OAAO,cACL,oBAAC,mBAAD;EAAmB,YAAY,MAAM;EAAyB;CAAc,CAAA,IAC1E;AACN"}
1
+ {"version":3,"file":"Audio.mjs","names":[],"sources":["../../../../src/components/Attachment/Audio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport type { Attachment, VoiceRecordingAttachment } from 'stream-chat';\n\nimport {\n AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator as DefaultFileSizeIndicator,\n DownloadButton,\n} from './components';\nimport type { AudioPlayerState } from '../AudioPlayback/AudioPlayer';\nimport { useAudioPlayer } from '../AudioPlayback/WithAudioPlayback';\nimport { useStateStore } from '../../store';\nimport { MessageContext, useComponentContext } from '../../context';\nimport type { AudioPlayer } from '../AudioPlayback/AudioPlayer';\nimport { PlayButton } from '../Button/PlayButton';\nimport { FileIcon } from '../FileIcon';\nimport { DurationDisplay, ProgressBar } from '../AudioPlayback';\nimport { useThreadContext } from '../Threads';\nimport { getAttachmentPreviewUrl } from 'stream-chat';\nimport { useAttachmentUploadState } from './hooks/useAttachmentUploadState';\n\ntype AudioAttachmentUIProps = {\n attachment?: Attachment;\n audioPlayer: AudioPlayer;\n};\n\n// todo: finish creating a BaseAudioPlayer derived from VoiceRecordingPlayerUI and AudioAttachmentUI\nconst AudioAttachmentUI = ({ attachment, audioPlayer }: AudioAttachmentUIProps) => {\n const {\n AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator = DefaultFileSizeIndicator,\n } = useComponentContext();\n const { isUploading } = useAttachmentUploadState(attachment);\n const dataTestId = 'audio-widget';\n const rootClassName = 'str-chat__message-attachment-audio-widget';\n\n const { durationSeconds, isPlaying, progress, secondsElapsed } =\n useStateStore(audioPlayer?.state, audioPlayerStateSelector) ?? {};\n\n return (\n <div className={rootClassName} data-testid={dataTestId}>\n <div className='str-chat__message-attachment-audio-widget--play-controls'>\n <PlayButton isPlaying={!!isPlaying} onClick={audioPlayer.togglePlay} />\n </div>\n <div className='str-chat__message-attachment-audio-widget--data'>\n <div className='str-chat__message-attachment-audio-widget--text-first-row'>\n <div className='str-chat__message-attachment-audio-widget--title'>\n {audioPlayer.title}\n </div>\n </div>\n <div className='str-chat__message-attachment-audio-widget--text-second-row'>\n {/*\n While uploading, the upload progress takes this slot — ahead of both the duration and\n the file size. It has to outrank the duration: an audio attachment can carry one\n (`attachment.duration`, or the player reading it off the local blob), and showing it\n would leave an uploading attachment with no upload indication at all.\n */}\n {isUploading ? (\n <AttachmentUploadProgressIndicator attachment={attachment} />\n ) : durationSeconds ? (\n <DurationDisplay\n duration={durationSeconds}\n isPlaying={!!isPlaying}\n secondsElapsed={secondsElapsed}\n />\n ) : (\n <FileSizeIndicator fileSize={audioPlayer.fileSize} />\n )}\n <ProgressBar\n durationSeconds={durationSeconds}\n progress={progress ?? 0}\n secondsElapsed={secondsElapsed}\n seek={audioPlayer.seek}\n />\n </div>\n </div>\n <FileIcon className='str-chat__file-icon' mimeType={audioPlayer.mimeType} />\n <DownloadButton assetUrl={audioPlayer.src} suggestedFileName={audioPlayer.title} />\n </div>\n );\n};\n\nexport type AudioProps = {\n attachment: Attachment;\n};\n\nconst audioPlayerStateSelector = (state: AudioPlayerState) => ({\n durationSeconds: state.durationSeconds,\n isPlaying: state.isPlaying,\n progress: state.progressPercent,\n secondsElapsed: state.secondsElapsed,\n});\n\n/**\n * Audio attachment with play/pause button and progress bar\n */\nexport const Audio = (props: AudioProps) => {\n const { attachment } = props;\n const { asset_url, title } = attachment;\n const { duration, file_size, mime_type, waveform_data } =\n (attachment as VoiceRecordingAttachment).custom ?? {};\n\n /**\n * Introducing message context. This could be breaking change, therefore the fallback to {} is provided.\n * If this component is used outside the message context, then there will be no audio player namespacing\n * => scrolling away from the message in virtualized ML would create a new AudioPlayer instance.\n *\n * Edge case: the requester (message) has multiple attachments with the same assetURL - does not happen\n * with the default SDK components, but can be done with custom API calls.In this case all the Audio\n * widgets will share the state.\n */\n // also rendered from composer previews, where there is no message\n const { message } = useContext(MessageContext) ?? {};\n const threadInstance = useThreadContext();\n\n const audioPlayer = useAudioPlayer({\n durationSeconds: duration,\n fileSize: file_size,\n mimeType: mime_type,\n requester:\n message?.id &&\n `${threadInstance ? (message.parent_id ?? message.id) : ''}${message.id}`,\n // Falls back to the local blob preview while the upload is still in flight.\n src: getAttachmentPreviewUrl(attachment, asset_url),\n title,\n waveformData: waveform_data,\n });\n\n return audioPlayer ? (\n <AudioAttachmentUI attachment={attachment} audioPlayer={audioPlayer} />\n ) : null;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAM,qBAAqB,EAAE,YAAY,kBAA0C;CACjF,MAAM,EACJ,mCAAA,sCAAoC,mCACpC,mBAAA,sBAAoB,sBAClB,oBAAoB;CACxB,MAAM,EAAE,gBAAgB,yBAAyB,UAAU;CAC3D,MAAM,aAAa;CACnB,MAAM,gBAAgB;CAEtB,MAAM,EAAE,iBAAiB,WAAW,UAAU,mBAC5C,cAAc,aAAa,OAAO,wBAAwB,KAAK,CAAC;CAElE,OACE,qBAAC,OAAD;EAAK,WAAW;EAAe,eAAa;YAA5C;GACE,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,YAAD;KAAY,WAAW,CAAC,CAAC;KAAW,SAAS,YAAY;IAAa,CAAA;GACnE,CAAA;GACL,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,OAAD;MAAK,WAAU;gBACZ,YAAY;KACV,CAAA;IACF,CAAA,GACL,qBAAC,OAAD;KAAK,WAAU;eAAf,CAOG,cACC,oBAAC,qCAAD,EAA+C,WAAa,CAAA,IAC1D,kBACF,oBAAC,iBAAD;MACE,UAAU;MACV,WAAW,CAAC,CAAC;MACG;KACjB,CAAA,IAED,oBAAC,qBAAD,EAAmB,UAAU,YAAY,SAAW,CAAA,GAEtD,oBAAC,aAAD;MACmB;MACjB,UAAU,YAAY;MACN;MAChB,MAAM,YAAY;KACnB,CAAA,CACE;MACF;;GACL,oBAAC,UAAD;IAAU,WAAU;IAAsB,UAAU,YAAY;GAAW,CAAA;GAC3E,oBAAC,gBAAD;IAAgB,UAAU,YAAY;IAAK,mBAAmB,YAAY;GAAQ,CAAA;EAC/E;;AAET;AAMA,IAAM,4BAA4B,WAA6B;CAC7D,iBAAiB,MAAM;CACvB,WAAW,MAAM;CACjB,UAAU,MAAM;CAChB,gBAAgB,MAAM;AACxB;;;;AAKA,IAAa,SAAS,UAAsB;CAC1C,MAAM,EAAE,eAAe;CACvB,MAAM,EAAE,WAAW,UAAU;CAC7B,MAAM,EAAE,UAAU,WAAW,WAAW,kBACrC,WAAwC,UAAU,CAAC;;;;;;;;;;CAYtD,MAAM,EAAE,YAAY,WAAW,cAAc,KAAK,CAAC;CACnD,MAAM,iBAAiB,iBAAiB;CAExC,MAAM,cAAc,eAAe;EACjC,iBAAiB;EACjB,UAAU;EACV,UAAU;EACV,WACE,SAAS,MACT,GAAG,iBAAkB,QAAQ,aAAa,QAAQ,KAAM,KAAK,QAAQ;EAEvE,KAAK,wBAAwB,YAAY,SAAS;EAClD;EACA,cAAc;CAChB,CAAC;CAED,OAAO,cACL,oBAAC,mBAAD;EAA+B;EAAyB;CAAc,CAAA,IACpE;AACN"}
@@ -1,24 +1,23 @@
1
1
  import { useComponentContext } from "../../context/ComponentContext.mjs";
2
2
  import { FileSizeIndicator } from "./components/FileSizeIndicator.mjs";
3
+ import { DownloadButton } from "./components/DownloadButton.mjs";
3
4
  import { useAttachmentUploadState } from "./hooks/useAttachmentUploadState.mjs";
4
5
  import { AttachmentUploadProgressIndicator } from "./components/AttachmentUploadProgressIndicator.mjs";
5
- import { DownloadButton } from "./components/DownloadButton.mjs";
6
6
  import { FileIcon } from "../FileIcon/FileIcon.mjs";
7
7
  import "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/components/Attachment/FileAttachment.tsx
10
10
  var FileAttachment = ({ attachment }) => {
11
11
  const { AttachmentFileIcon, AttachmentUploadProgressIndicator: AttachmentUploadProgressIndicator$1 = AttachmentUploadProgressIndicator, FileSizeIndicator: FileSizeIndicator$1 = FileSizeIndicator } = useComponentContext();
12
- const FileIconComponent = AttachmentFileIcon ?? FileIcon;
13
12
  const { isUploading } = useAttachmentUploadState(attachment);
14
13
  return /* @__PURE__ */ jsxs("div", {
15
14
  className: "str-chat__message-attachment-file--item",
16
15
  "data-testid": "attachment-file",
17
16
  children: [
18
- /* @__PURE__ */ jsx(FileIconComponent, {
17
+ /* @__PURE__ */ jsx(AttachmentFileIcon ?? FileIcon, {
19
18
  className: "str-chat__file-icon",
20
19
  fileName: attachment.title,
21
- mimeType: attachment.mime_type
20
+ mimeType: attachment.custom?.mime_type
22
21
  }),
23
22
  /* @__PURE__ */ jsxs("div", {
24
23
  className: "str-chat__message-attachment-file--item__info",
@@ -31,7 +30,7 @@ var FileAttachment = ({ attachment }) => {
31
30
  })
32
31
  }), /* @__PURE__ */ jsx("div", {
33
32
  className: "str-chat__message-attachment-file--item__data",
34
- children: isUploading ? /* @__PURE__ */ jsx(AttachmentUploadProgressIndicator$1, { attachment }) : /* @__PURE__ */ jsx(FileSizeIndicator$1, { fileSize: attachment.file_size })
33
+ children: isUploading ? /* @__PURE__ */ jsx(AttachmentUploadProgressIndicator$1, { attachment }) : /* @__PURE__ */ jsx(FileSizeIndicator$1, { fileSize: attachment.custom?.file_size })
35
34
  })]
36
35
  }),
37
36
  /* @__PURE__ */ jsx(DownloadButton, {
@@ -1 +1 @@
1
- {"version":3,"file":"FileAttachment.mjs","names":[],"sources":["../../../../src/components/Attachment/FileAttachment.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { FileIcon } from '../FileIcon';\nimport type { Attachment } from 'stream-chat';\n\nimport {\n AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator as DefaultFileSizeIndicator,\n DownloadButton,\n} from './components';\nimport { useAttachmentUploadState } from './hooks/useAttachmentUploadState';\n\nexport type FileAttachmentProps = {\n attachment: Attachment;\n};\n\nexport const FileAttachment = ({ attachment }: FileAttachmentProps) => {\n const {\n AttachmentFileIcon,\n AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator = DefaultFileSizeIndicator,\n } = useComponentContext();\n const FileIconComponent = AttachmentFileIcon ?? FileIcon;\n const { isUploading } = useAttachmentUploadState(attachment);\n return (\n <div\n className='str-chat__message-attachment-file--item'\n data-testid='attachment-file'\n >\n <FileIconComponent\n className='str-chat__file-icon'\n fileName={attachment.title}\n mimeType={attachment.mime_type}\n />\n <div className='str-chat__message-attachment-file--item__info'>\n <div className='str-chat__message-attachment-file--item__first-row'>\n <div\n className='str-chat__message-attachment-file--item__name'\n data-testid='file-title'\n >\n {attachment.title}\n </div>\n </div>\n <div className='str-chat__message-attachment-file--item__data'>\n {/* While uploading, the upload progress takes the place of the file size. */}\n {isUploading ? (\n <AttachmentUploadProgressIndicator attachment={attachment} />\n ) : (\n <FileSizeIndicator fileSize={attachment.file_size} />\n )}\n </div>\n </div>\n {/* DownloadButton renders nothing without an asset_url, which a pending upload lacks. */}\n <DownloadButton\n assetUrl={attachment.asset_url}\n suggestedFileName={attachment.title}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAgBA,IAAa,kBAAkB,EAAE,iBAAsC;CACrE,MAAM,EACJ,oBACA,mCAAA,sCAAoC,mCACpC,mBAAA,sBAAoB,sBAClB,oBAAoB;CACxB,MAAM,oBAAoB,sBAAsB;CAChD,MAAM,EAAE,gBAAgB,yBAAyB,UAAU;CAC3D,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd;GAIE,oBAAC,mBAAD;IACE,WAAU;IACV,UAAU,WAAW;IACrB,UAAU,WAAW;GACtB,CAAA;GACD,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,OAAD;MACE,WAAU;MACV,eAAY;gBAEX,WAAW;KACT,CAAA;IACF,CAAA,GACL,oBAAC,OAAD;KAAK,WAAU;eAEZ,cACC,oBAAC,qCAAD,EAA+C,WAAa,CAAA,IAE5D,oBAAC,qBAAD,EAAmB,UAAU,WAAW,UAAY,CAAA;IAEnD,CAAA,CACF;;GAEL,oBAAC,gBAAD;IACE,UAAU,WAAW;IACrB,mBAAmB,WAAW;GAC/B,CAAA;EACE;;AAET"}
1
+ {"version":3,"file":"FileAttachment.mjs","names":[],"sources":["../../../../src/components/Attachment/FileAttachment.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { FileIcon } from '../FileIcon';\nimport type { Attachment } from 'stream-chat';\n\nimport {\n AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator as DefaultFileSizeIndicator,\n DownloadButton,\n} from './components';\nimport { useAttachmentUploadState } from './hooks/useAttachmentUploadState';\n\nexport type FileAttachmentProps = {\n attachment: Attachment;\n};\n\nexport const FileAttachment = ({ attachment }: FileAttachmentProps) => {\n const {\n AttachmentFileIcon,\n AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator,\n FileSizeIndicator = DefaultFileSizeIndicator,\n } = useComponentContext();\n const { isUploading } = useAttachmentUploadState(attachment);\n const FileIconComponent = AttachmentFileIcon ?? FileIcon;\n return (\n <div\n className='str-chat__message-attachment-file--item'\n data-testid='attachment-file'\n >\n <FileIconComponent\n className='str-chat__file-icon'\n fileName={attachment.title}\n mimeType={attachment.custom?.mime_type}\n />\n <div className='str-chat__message-attachment-file--item__info'>\n <div className='str-chat__message-attachment-file--item__first-row'>\n <div\n className='str-chat__message-attachment-file--item__name'\n data-testid='file-title'\n >\n {attachment.title}\n </div>\n </div>\n <div className='str-chat__message-attachment-file--item__data'>\n {/* While uploading, the upload progress takes the place of the file size. */}\n {isUploading ? (\n <AttachmentUploadProgressIndicator attachment={attachment} />\n ) : (\n <FileSizeIndicator fileSize={attachment.custom?.file_size} />\n )}\n </div>\n </div>\n <DownloadButton\n assetUrl={attachment.asset_url}\n suggestedFileName={attachment.title}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAgBA,IAAa,kBAAkB,EAAE,iBAAsC;CACrE,MAAM,EACJ,oBACA,mCAAA,sCAAoC,mCACpC,mBAAA,sBAAoB,sBAClB,oBAAoB;CACxB,MAAM,EAAE,gBAAgB,yBAAyB,UAAU;CAE3D,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd;GAIE,oBANsB,sBAAsB,UAM5C;IACE,WAAU;IACV,UAAU,WAAW;IACrB,UAAU,WAAW,QAAQ;GAC9B,CAAA;GACD,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,OAAD;MACE,WAAU;MACV,eAAY;gBAEX,WAAW;KACT,CAAA;IACF,CAAA,GACL,oBAAC,OAAD;KAAK,WAAU;eAEZ,cACC,oBAAC,qCAAD,EAA+C,WAAa,CAAA,IAE5D,oBAAC,qBAAD,EAAmB,UAAU,WAAW,QAAQ,UAAY,CAAA;IAE3D,CAAA,CACF;;GACL,oBAAC,gBAAD;IACE,UAAU,WAAW;IACrB,mBAAmB,WAAW;GAC/B,CAAA;EACE;;AAET"}
@@ -1,23 +1,35 @@
1
1
  import { useChatContext } from "../../context/ChatContext.mjs";
2
- import { useComponentContextIcons } from "../../context/useComponentContextIcons.mjs";
3
2
  import { useTranslationContext } from "../../context/TranslationContext.mjs";
4
3
  import { Button } from "../Button/Button.mjs";
5
4
  import { ExternalLinkIcon } from "./icons.mjs";
5
+ import { useChannel } from "../../context/useChannel.mjs";
6
+ import { useComponentContextIcons } from "../../context/useComponentContextIcons.mjs";
6
7
  import { useEffect, useRef, useState } from "react";
8
+ import { convertTimestampToDate, nowNs, nsToMs } from "stream-chat";
7
9
  import { jsx, jsxs } from "react/jsx-runtime";
8
10
  //#region src/components/Attachment/Geolocation.tsx
11
+ /** `setTimeout` silently clamps a longer delay to 1 ms, so longer waits are armed in steps. */
12
+ var MAX_TIMEOUT_MS = 2 ** 31 - 1;
13
+ /** Whether a live location's expiry is a usable instant to schedule against. */
14
+ var isSchedulableExpiry = (endAt) => endAt != null && Number.isFinite(endAt);
9
15
  var Geolocation = ({ GeolocationAttachmentMapPlaceholder = DefaultGeolocationAttachmentMapPlaceholder, GeolocationMap, location }) => {
10
- const { channel, client } = useChatContext();
16
+ const { client } = useChatContext();
17
+ const channel = useChannel();
11
18
  const { t } = useTranslationContext();
12
- const [stoppedSharing, setStoppedSharing] = useState(!!location.end_at && new Date(location.end_at).getTime() < (/* @__PURE__ */ new Date()).getTime());
19
+ const [stoppedSharing, setStoppedSharing] = useState(isSchedulableExpiry(location.end_at) && location.end_at < nowNs());
13
20
  const timeoutRef = useRef(void 0);
14
21
  const isMyLocation = location.user_id === client.userID;
15
- const isLiveLocation = !!location.end_at;
22
+ const isLiveLocation = location.end_at != null;
23
+ const endAt = location.end_at;
16
24
  useEffect(() => {
17
- if (!location.end_at) return;
18
- clearTimeout(timeoutRef.current);
19
- timeoutRef.current = setTimeout(() => setStoppedSharing(true), new Date(location.end_at).getTime() - Date.now());
20
- }, [location.end_at]);
25
+ if (!isSchedulableExpiry(endAt)) return;
26
+ const arm = () => {
27
+ const remaining = Math.max(0, nsToMs(endAt - nowNs()));
28
+ timeoutRef.current = remaining > MAX_TIMEOUT_MS ? setTimeout(arm, MAX_TIMEOUT_MS) : setTimeout(() => setStoppedSharing(true), remaining);
29
+ };
30
+ arm();
31
+ return () => clearTimeout(timeoutRef.current);
32
+ }, [endAt]);
21
33
  return /* @__PURE__ */ jsxs("div", {
22
34
  className: "str-chat__message-attachment-geolocation",
23
35
  "data-testid": "attachment-geolocation",
@@ -29,40 +41,40 @@ var Geolocation = ({ GeolocationAttachmentMapPlaceholder = DefaultGeolocationAtt
29
41
  }) : /* @__PURE__ */ jsx(GeolocationAttachmentMapPlaceholder, { location })
30
42
  }), /* @__PURE__ */ jsx("div", {
31
43
  className: "str-chat__message-attachment-geolocation__status",
32
- children: isLiveLocation ? stoppedSharing ? t("Location sharing ended") : isMyLocation ? /* @__PURE__ */ jsxs("div", {
44
+ children: isLiveLocation ? stoppedSharing ? t("attachment.geolocation.locationSharingEnded.text", "Location sharing ended") : isMyLocation ? /* @__PURE__ */ jsxs("div", {
33
45
  className: "str-chat__message-attachment-geolocation__status--active",
34
46
  children: [/* @__PURE__ */ jsx(Button, {
35
47
  appearance: "outline",
36
48
  className: "str-chat__message-attachment-geolocation__stop-sharing-button",
37
- onClick: () => channel?.stopLiveLocationSharing(location),
49
+ onClick: () => channel?.stopLiveLocationSharing({ message_id: location.message_id }),
38
50
  size: "sm",
39
51
  variant: "secondary",
40
- children: t("Stop sharing")
52
+ children: t("attachment.geolocation.stopSharing.text", "Stop sharing")
41
53
  }), /* @__PURE__ */ jsx("div", {
42
54
  className: "str-chat__message-attachment-geolocation__status--active-until",
43
- children: t("Live until {{ timestamp }}", { timestamp: t("timestamp/LiveLocation", { timestamp: location.end_at }) })
55
+ children: t("attachment.geolocation.liveUntil.text", "Live until {{ timestamp }}", { timestamp: t("timestamp.LiveLocation", { timestamp: convertTimestampToDate(location.end_at) }) })
44
56
  })]
45
57
  }) : /* @__PURE__ */ jsxs("div", {
46
58
  className: "str-chat__message-attachment-geolocation__status--active",
47
59
  children: [/* @__PURE__ */ jsx("div", {
48
60
  className: "str-chat__message-attachment-geolocation__status--active-status",
49
- children: t("Live location")
61
+ children: t("common.liveLocation.text", "Live location")
50
62
  }), /* @__PURE__ */ jsx("div", {
51
63
  className: "str-chat__message-attachment-geolocation__status--active-until",
52
- children: t("Live until {{ timestamp }}", { timestamp: t("timestamp/LiveLocation", { timestamp: location.end_at }) })
64
+ children: t("attachment.geolocation.liveUntil.text", "Live until {{ timestamp }}", { timestamp: t("timestamp.LiveLocation", { timestamp: convertTimestampToDate(location.end_at) }) })
53
65
  })]
54
- }) : t("Current location")
66
+ }) : t("common.currentLocation.text", "Current location")
55
67
  })]
56
68
  });
57
69
  };
58
70
  var DefaultGeolocationAttachmentMapPlaceholder = ({ location }) => {
59
- const { t } = useTranslationContext();
60
71
  const { IconLocation } = useComponentContextIcons();
72
+ const { t } = useTranslationContext();
61
73
  return /* @__PURE__ */ jsxs("div", {
62
74
  className: "str-chat__message-attachment-geolocation__placeholder",
63
75
  "data-testid": "geolocation-attachment-map-placeholder",
64
76
  children: [/* @__PURE__ */ jsx(IconLocation, {}), /* @__PURE__ */ jsx("a", {
65
- "aria-label": t("Open location in a map"),
77
+ "aria-label": t("attachment.geolocation.openLocationMap.ariaLabel", "Open location in a map"),
66
78
  className: "str-chat__message-attachment-geolocation__placeholder-link",
67
79
  href: `https://maps.google.com?q=${[location.latitude, location.longitude].join()}`,
68
80
  rel: "noreferrer",
@@ -1 +1 @@
1
- {"version":3,"file":"Geolocation.mjs","names":[],"sources":["../../../../src/components/Attachment/Geolocation.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport { useEffect } from 'react';\nimport { useRef, useState } from 'react';\nimport React from 'react';\nimport type { Coords, SharedLocationResponse } from 'stream-chat';\nimport {\n useChatContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { ExternalLinkIcon } from './icons';\nimport { Button } from '../Button';\n\nexport type GeolocationMapProps = Coords;\n\nexport type GeolocationProps = {\n location: SharedLocationResponse;\n GeolocationAttachmentMapPlaceholder?: ComponentType<GeolocationAttachmentMapPlaceholderProps>;\n GeolocationMap?: ComponentType<GeolocationMapProps>;\n};\n\nexport const Geolocation = ({\n GeolocationAttachmentMapPlaceholder = DefaultGeolocationAttachmentMapPlaceholder,\n GeolocationMap,\n location,\n}: GeolocationProps) => {\n const { channel, client } = useChatContext();\n const { t } = useTranslationContext();\n\n const [stoppedSharing, setStoppedSharing] = useState(\n !!location.end_at && new Date(location.end_at).getTime() < new Date().getTime(),\n );\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const isMyLocation = location.user_id === client.userID;\n const isLiveLocation = !!location.end_at;\n\n useEffect(() => {\n if (!location.end_at) return;\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => setStoppedSharing(true),\n new Date(location.end_at).getTime() - Date.now(),\n );\n }, [location.end_at]);\n\n return (\n <div\n className='str-chat__message-attachment-geolocation'\n data-testid='attachment-geolocation'\n >\n <div className='str-chat__message-attachment-geolocation__location-preview'>\n {GeolocationMap ? (\n <GeolocationMap latitude={location.latitude} longitude={location.longitude} />\n ) : (\n <GeolocationAttachmentMapPlaceholder location={location} />\n )}\n </div>\n <div className='str-chat__message-attachment-geolocation__status'>\n {isLiveLocation ? (\n stoppedSharing ? (\n t('Location sharing ended')\n ) : isMyLocation ? (\n <div className='str-chat__message-attachment-geolocation__status--active'>\n <Button\n appearance='outline'\n className='str-chat__message-attachment-geolocation__stop-sharing-button'\n onClick={() => channel?.stopLiveLocationSharing(location)}\n size='sm'\n variant='secondary'\n >\n {t('Stop sharing')}\n </Button>\n <div className='str-chat__message-attachment-geolocation__status--active-until'>\n {t('Live until {{ timestamp }}', {\n timestamp: t('timestamp/LiveLocation', { timestamp: location.end_at }),\n })}\n </div>\n </div>\n ) : (\n <div className='str-chat__message-attachment-geolocation__status--active'>\n <div className='str-chat__message-attachment-geolocation__status--active-status'>\n {t('Live location')}\n </div>\n <div className='str-chat__message-attachment-geolocation__status--active-until'>\n {t('Live until {{ timestamp }}', {\n timestamp: t('timestamp/LiveLocation', { timestamp: location.end_at }),\n })}\n </div>\n </div>\n )\n ) : (\n t('Current location')\n )}\n </div>\n </div>\n );\n};\n\nexport type GeolocationAttachmentMapPlaceholderProps = {\n location: SharedLocationResponse;\n};\n\nconst DefaultGeolocationAttachmentMapPlaceholder = ({\n location,\n}: GeolocationAttachmentMapPlaceholderProps) => {\n const { t } = useTranslationContext();\n const { IconLocation } = useComponentContextIcons();\n\n return (\n <div\n className='str-chat__message-attachment-geolocation__placeholder'\n data-testid='geolocation-attachment-map-placeholder'\n >\n <IconLocation />\n <a\n aria-label={t('Open location in a map')}\n className='str-chat__message-attachment-geolocation__placeholder-link'\n href={`https://maps.google.com?q=${[location.latitude, location.longitude].join()}`}\n rel='noreferrer'\n target='_blank'\n >\n <ExternalLinkIcon />\n </a>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,IAAa,eAAe,EAC1B,sCAAsC,4CACtC,gBACA,eACsB;CACtB,MAAM,EAAE,SAAS,WAAW,eAAe;CAC3C,MAAM,EAAE,MAAM,sBAAsB;CAEpC,MAAM,CAAC,gBAAgB,qBAAqB,SAC1C,CAAC,CAAC,SAAS,UAAU,IAAI,KAAK,SAAS,MAAM,CAAC,CAAC,QAAQ,qBAAI,IAAI,KAAK,EAAA,CAAE,QAAQ,CAChF;CACA,MAAM,aAAa,OAAkD,KAAA,CAAS;CAE9E,MAAM,eAAe,SAAS,YAAY,OAAO;CACjD,MAAM,iBAAiB,CAAC,CAAC,SAAS;CAElC,gBAAgB;EACd,IAAI,CAAC,SAAS,QAAQ;EACtB,aAAa,WAAW,OAAO;EAC/B,WAAW,UAAU,iBACb,kBAAkB,IAAI,GAC5B,IAAI,KAAK,SAAS,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,CACjD;CACF,GAAG,CAAC,SAAS,MAAM,CAAC;CAEpB,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,oBAAC,OAAD;GAAK,WAAU;aACZ,iBACC,oBAAC,gBAAD;IAAgB,UAAU,SAAS;IAAU,WAAW,SAAS;GAAY,CAAA,IAE7E,oBAAC,qCAAD,EAA+C,SAAW,CAAA;EAEzD,CAAA,GACL,oBAAC,OAAD;GAAK,WAAU;aACZ,iBACC,iBACE,EAAE,wBAAwB,IACxB,eACF,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,QAAD;KACE,YAAW;KACX,WAAU;KACV,eAAe,SAAS,wBAAwB,QAAQ;KACxD,MAAK;KACL,SAAQ;eAEP,EAAE,cAAc;IACX,CAAA,GACR,oBAAC,OAAD;KAAK,WAAU;eACZ,EAAE,8BAA8B,EAC/B,WAAW,EAAE,0BAA0B,EAAE,WAAW,SAAS,OAAO,CAAC,EACvE,CAAC;IACE,CAAA,CACF;QAEL,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACZ,EAAE,eAAe;IACf,CAAA,GACL,oBAAC,OAAD;KAAK,WAAU;eACZ,EAAE,8BAA8B,EAC/B,WAAW,EAAE,0BAA0B,EAAE,WAAW,SAAS,OAAO,CAAC,EACvE,CAAC;IACE,CAAA,CACF;QAGP,EAAE,kBAAkB;EAEnB,CAAA,CACF;;AAET;AAMA,IAAM,8CAA8C,EAClD,eAC8C;CAC9C,MAAM,EAAE,MAAM,sBAAsB;CACpC,MAAM,EAAE,iBAAiB,yBAAyB;CAElD,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,oBAAC,cAAD,CAAe,CAAA,GACf,oBAAC,KAAD;GACE,cAAY,EAAE,wBAAwB;GACtC,WAAU;GACV,MAAM,6BAA6B,CAAC,SAAS,UAAU,SAAS,SAAS,CAAC,CAAC,KAAK;GAChF,KAAI;GACJ,QAAO;aAEP,oBAAC,kBAAD,CAAmB,CAAA;EAClB,CAAA,CACA;;AAET"}
1
+ {"version":3,"file":"Geolocation.mjs","names":[],"sources":["../../../../src/components/Attachment/Geolocation.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport { useEffect } from 'react';\nimport { useRef, useState } from 'react';\nimport React from 'react';\nimport type { Coords, SharedLocationResponseData } from 'stream-chat';\nimport {\n useChannel,\n useChatContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { ExternalLinkIcon } from './icons';\nimport { Button } from '../Button';\nimport { convertTimestampToDate, nowNs, nsToMs } from 'stream-chat';\n\nexport type GeolocationMapProps = Coords;\n\n/** `setTimeout` silently clamps a longer delay to 1 ms, so longer waits are armed in steps. */\nconst MAX_TIMEOUT_MS = 2 ** 31 - 1;\n\n/** Whether a live location's expiry is a usable instant to schedule against. */\nconst isSchedulableExpiry = (endAt?: number): endAt is number =>\n endAt != null && Number.isFinite(endAt);\n\nexport type GeolocationProps = {\n location: SharedLocationResponseData;\n GeolocationAttachmentMapPlaceholder?: ComponentType<GeolocationAttachmentMapPlaceholderProps>;\n GeolocationMap?: ComponentType<GeolocationMapProps>;\n};\n\nexport const Geolocation = ({\n GeolocationAttachmentMapPlaceholder = DefaultGeolocationAttachmentMapPlaceholder,\n GeolocationMap,\n location,\n}: GeolocationProps) => {\n const { client } = useChatContext();\n const channel = useChannel();\n const { t } = useTranslationContext();\n\n const [stoppedSharing, setStoppedSharing] = useState(\n isSchedulableExpiry(location.end_at) && location.end_at < nowNs(),\n );\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const isMyLocation = location.user_id === client.userID;\n const isLiveLocation = location.end_at != null;\n const endAt = location.end_at;\n\n useEffect(() => {\n if (!isSchedulableExpiry(endAt)) return;\n\n const arm = () => {\n // Both operands are wire timestamps, so the difference is in nanoseconds. Passing it raw\n // made `setTimeout` fire immediately and end sharing on mount.\n const remaining = Math.max(0, nsToMs(endAt - nowNs()));\n timeoutRef.current =\n remaining > MAX_TIMEOUT_MS\n ? // Wait the maximum, then re-arm. One call would be clamped to 1 ms, showing\n // \"sharing ended\" on mount for any share longer than ~24.9 days.\n setTimeout(arm, MAX_TIMEOUT_MS)\n : setTimeout(() => setStoppedSharing(true), remaining);\n };\n\n arm();\n return () => clearTimeout(timeoutRef.current);\n }, [endAt]);\n\n return (\n <div\n className='str-chat__message-attachment-geolocation'\n data-testid='attachment-geolocation'\n >\n <div className='str-chat__message-attachment-geolocation__location-preview'>\n {GeolocationMap ? (\n <GeolocationMap latitude={location.latitude} longitude={location.longitude} />\n ) : (\n <GeolocationAttachmentMapPlaceholder location={location} />\n )}\n </div>\n <div className='str-chat__message-attachment-geolocation__status'>\n {isLiveLocation ? (\n stoppedSharing ? (\n t(\n 'attachment.geolocation.locationSharingEnded.text',\n 'Location sharing ended',\n )\n ) : isMyLocation ? (\n <div className='str-chat__message-attachment-geolocation__status--active'>\n <Button\n appearance='outline'\n className='str-chat__message-attachment-geolocation__stop-sharing-button'\n onClick={() =>\n // The request shape, not the whole response: `stopLiveLocationSharing` stamps\n // `end_at` itself, and the response's timestamps are wire numbers a request\n // field cannot take.\n channel?.stopLiveLocationSharing({ message_id: location.message_id })\n }\n size='sm'\n variant='secondary'\n >\n {t('attachment.geolocation.stopSharing.text', 'Stop sharing')}\n </Button>\n <div className='str-chat__message-attachment-geolocation__status--active-until'>\n {t(\n 'attachment.geolocation.liveUntil.text',\n 'Live until {{ timestamp }}',\n {\n timestamp: t('timestamp.LiveLocation', {\n timestamp: convertTimestampToDate(location.end_at),\n }),\n },\n )}\n </div>\n </div>\n ) : (\n <div className='str-chat__message-attachment-geolocation__status--active'>\n <div className='str-chat__message-attachment-geolocation__status--active-status'>\n {t('common.liveLocation.text', 'Live location')}\n </div>\n <div className='str-chat__message-attachment-geolocation__status--active-until'>\n {t(\n 'attachment.geolocation.liveUntil.text',\n 'Live until {{ timestamp }}',\n {\n timestamp: t('timestamp.LiveLocation', {\n timestamp: convertTimestampToDate(location.end_at),\n }),\n },\n )}\n </div>\n </div>\n )\n ) : (\n t('common.currentLocation.text', 'Current location')\n )}\n </div>\n </div>\n );\n};\n\nexport type GeolocationAttachmentMapPlaceholderProps = {\n location: SharedLocationResponseData;\n};\n\nconst DefaultGeolocationAttachmentMapPlaceholder = ({\n location,\n}: GeolocationAttachmentMapPlaceholderProps) => {\n const { IconLocation } = useComponentContextIcons();\n const { t } = useTranslationContext();\n\n return (\n <div\n className='str-chat__message-attachment-geolocation__placeholder'\n data-testid='geolocation-attachment-map-placeholder'\n >\n <IconLocation />\n <a\n aria-label={t(\n 'attachment.geolocation.openLocationMap.ariaLabel',\n 'Open location in a map',\n )}\n className='str-chat__message-attachment-geolocation__placeholder-link'\n href={`https://maps.google.com?q=${[location.latitude, location.longitude].join()}`}\n rel='noreferrer'\n target='_blank'\n >\n <ExternalLinkIcon />\n </a>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAkBA,IAAM,iBAAiB,KAAK,KAAK;;AAGjC,IAAM,uBAAuB,UAC3B,SAAS,QAAQ,OAAO,SAAS,KAAK;AAQxC,IAAa,eAAe,EAC1B,sCAAsC,4CACtC,gBACA,eACsB;CACtB,MAAM,EAAE,WAAW,eAAe;CAClC,MAAM,UAAU,WAAW;CAC3B,MAAM,EAAE,MAAM,sBAAsB;CAEpC,MAAM,CAAC,gBAAgB,qBAAqB,SAC1C,oBAAoB,SAAS,MAAM,KAAK,SAAS,SAAS,MAAM,CAClE;CACA,MAAM,aAAa,OAAkD,KAAA,CAAS;CAE9E,MAAM,eAAe,SAAS,YAAY,OAAO;CACjD,MAAM,iBAAiB,SAAS,UAAU;CAC1C,MAAM,QAAQ,SAAS;CAEvB,gBAAgB;EACd,IAAI,CAAC,oBAAoB,KAAK,GAAG;EAEjC,MAAM,YAAY;GAGhB,MAAM,YAAY,KAAK,IAAI,GAAG,OAAO,QAAQ,MAAM,CAAC,CAAC;GACrD,WAAW,UACT,YAAY,iBAGR,WAAW,KAAK,cAAc,IAC9B,iBAAiB,kBAAkB,IAAI,GAAG,SAAS;EAC3D;EAEA,IAAI;EACJ,aAAa,aAAa,WAAW,OAAO;CAC9C,GAAG,CAAC,KAAK,CAAC;CAEV,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,oBAAC,OAAD;GAAK,WAAU;aACZ,iBACC,oBAAC,gBAAD;IAAgB,UAAU,SAAS;IAAU,WAAW,SAAS;GAAY,CAAA,IAE7E,oBAAC,qCAAD,EAA+C,SAAW,CAAA;EAEzD,CAAA,GACL,oBAAC,OAAD;GAAK,WAAU;aACZ,iBACC,iBACE,EACE,oDACA,wBACF,IACE,eACF,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,QAAD;KACE,YAAW;KACX,WAAU;KACV,eAIE,SAAS,wBAAwB,EAAE,YAAY,SAAS,WAAW,CAAC;KAEtE,MAAK;KACL,SAAQ;eAEP,EAAE,2CAA2C,cAAc;IACtD,CAAA,GACR,oBAAC,OAAD;KAAK,WAAU;eACZ,EACC,yCACA,8BACA,EACE,WAAW,EAAE,0BAA0B,EACrC,WAAW,uBAAuB,SAAS,MAAM,EACnD,CAAC,EACH,CACF;IACG,CAAA,CACF;QAEL,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,OAAD;KAAK,WAAU;eACZ,EAAE,4BAA4B,eAAe;IAC3C,CAAA,GACL,oBAAC,OAAD;KAAK,WAAU;eACZ,EACC,yCACA,8BACA,EACE,WAAW,EAAE,0BAA0B,EACrC,WAAW,uBAAuB,SAAS,MAAM,EACnD,CAAC,EACH,CACF;IACG,CAAA,CACF;QAGP,EAAE,+BAA+B,kBAAkB;EAElD,CAAA,CACF;;AAET;AAMA,IAAM,8CAA8C,EAClD,eAC8C;CAC9C,MAAM,EAAE,iBAAiB,yBAAyB;CAClD,MAAM,EAAE,MAAM,sBAAsB;CAEpC,OACE,qBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,oBAAC,cAAD,CAAe,CAAA,GACf,oBAAC,KAAD;GACE,cAAY,EACV,oDACA,wBACF;GACA,WAAU;GACV,MAAM,6BAA6B,CAAC,SAAS,UAAU,SAAS,SAAS,CAAC,CAAC,KAAK;GAChF,KAAI;GACJ,QAAO;aAEP,oBAAC,kBAAD,CAAmB,CAAA;EAClB,CAAA,CACA;;AAET"}
@@ -1,16 +1,16 @@
1
- import { useChannelStateContext } from "../../context/ChannelStateContext.mjs";
1
+ import { useAttachmentContext } from "../../context/AttachmentContext.mjs";
2
2
  import { useComponentContext } from "../../context/ComponentContext.mjs";
3
- import { useComponentContextIcons } from "../../context/useComponentContextIcons.mjs";
4
3
  import { useTranslationContext } from "../../context/TranslationContext.mjs";
5
4
  import { getGiphyDescriptiveTitle } from "./giphyAccessibility.mjs";
6
5
  import { BaseImage } from "../BaseImage/BaseImage.mjs";
7
6
  import { toGalleryItemDescriptors } from "../Gallery/GalleryContext.mjs";
7
+ import { useComponentContextIcons } from "../../context/useComponentContextIcons.mjs";
8
8
  import { useLayoutEffect, useMemo, useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import clsx from "clsx";
11
11
  //#region src/components/Attachment/Giphy.tsx
12
12
  var Giphy = ({ attachment }) => {
13
- const { giphyVersion: giphyVersionName, imageAttachmentSizeHandler } = useChannelStateContext();
13
+ const { giphyVersion: giphyVersionName, imageAttachmentSizeHandler } = useAttachmentContext();
14
14
  const { BaseImage: BaseImage$1 = BaseImage } = useComponentContext();
15
15
  const { t } = useTranslationContext();
16
16
  const usesDefaultBaseImage = BaseImage$1 === BaseImage;
@@ -22,7 +22,7 @@ var Giphy = ({ attachment }) => {
22
22
  const title = imageDescriptors && imageDescriptors.title;
23
23
  const resolvedImageUrl = attachmentConfiguration?.url || imageUrl;
24
24
  const descriptiveTitle = getGiphyDescriptiveTitle(title);
25
- const accessibleName = descriptiveTitle ? t("aria/Animated GIF: {{ title }}", { title: descriptiveTitle }) : t("aria/Animated GIF");
25
+ const accessibleName = descriptiveTitle ? t("attachment.giphy.animatedGif.withTitle.ariaLabel", "Animated GIF: {{ title }}", { title: descriptiveTitle }) : t("attachment.giphy.animatedGif.ariaLabel", "Animated GIF");
26
26
  const imageStyleVariables = useMemo(() => {
27
27
  const originalHeight = Number(dimensions?.height);
28
28
  const originalWidth = Number(dimensions?.width);
@@ -1 +1 @@
1
- {"version":3,"file":"Giphy.mjs","names":[],"sources":["../../../../src/components/Attachment/Giphy.tsx"],"sourcesContent":["import type { Attachment } from 'stream-chat';\nimport { BaseImage as DefaultBaseImage } from '../BaseImage';\nimport { toGalleryItemDescriptors } from '../Gallery';\nimport { getGiphyDescriptiveTitle } from './giphyAccessibility';\nimport clsx from 'clsx';\nimport {\n useChannelStateContext,\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { type CSSProperties, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport type { ImageAttachmentConfiguration } from '../../types/types';\n\nexport type GiphyAttachmentProps = {\n attachment: Attachment;\n};\n\nexport const Giphy = ({ attachment }: GiphyAttachmentProps) => {\n const { giphyVersion: giphyVersionName, imageAttachmentSizeHandler } =\n useChannelStateContext();\n const { BaseImage = DefaultBaseImage } = useComponentContext();\n const { t } = useTranslationContext();\n const usesDefaultBaseImage = BaseImage === DefaultBaseImage;\n const imageElement = useRef<HTMLImageElement>(null);\n const [attachmentConfiguration, setAttachmentConfiguration] = useState<\n ImageAttachmentConfiguration | undefined\n >(undefined);\n\n const imageDescriptors = useMemo(\n () => toGalleryItemDescriptors(attachment, { giphyVersionName }),\n [attachment, giphyVersionName],\n );\n const dimensions = imageDescriptors && imageDescriptors.dimensions;\n const imageUrl = imageDescriptors && imageDescriptors.imageUrl;\n const title = imageDescriptors && imageDescriptors.title;\n const resolvedImageUrl = attachmentConfiguration?.url || imageUrl;\n // For giphy attachments `imageDescriptors.alt`/`title` may both resolve to a raw\n // media URL (Giphy payloads rarely carry a human title), which is useless to\n // screen-reader users. Prefer a real, non-URL title; otherwise fall back to a\n // localized generic label instead of exposing the URL as the accessible name.\n const descriptiveTitle = getGiphyDescriptiveTitle(title);\n const accessibleName = descriptiveTitle\n ? t('aria/Animated GIF: {{ title }}', { title: descriptiveTitle })\n : t('aria/Animated GIF');\n const imageStyleVariables = useMemo(() => {\n const originalHeight = Number(dimensions?.height);\n const originalWidth = Number(dimensions?.width);\n\n return {\n '--original-height': String(originalHeight > 1 ? originalHeight : 1000000),\n '--original-width': String(originalWidth > 1 ? originalWidth : 1000000),\n } as CSSProperties;\n }, [dimensions?.height, dimensions?.width]);\n\n useLayoutEffect(() => {\n if (!imageElement.current || !imageAttachmentSizeHandler) return;\n\n const config = imageAttachmentSizeHandler(attachment, imageElement.current);\n setAttachmentConfiguration(config);\n }, [attachment, imageAttachmentSizeHandler]);\n\n if (!imageUrl) return null;\n\n return (\n <div className={clsx(`str-chat__message-attachment-giphy`)}>\n <BaseImage\n alt={accessibleName}\n height={dimensions?.height}\n ref={imageElement}\n src={resolvedImageUrl}\n style={imageStyleVariables}\n width={dimensions?.width}\n {...(usesDefaultBaseImage ? { showDownloadButtonOnError: false } : {})}\n />\n <GiphyBadge />\n </div>\n );\n};\n\nconst GiphyBadge = () => {\n const { IconGiphy } = useComponentContextIcons();\n return (\n <div className='str-chat__giphy-badge'>\n <IconGiphy />\n Giphy\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAkBA,IAAa,SAAS,EAAE,iBAAuC;CAC7D,MAAM,EAAE,cAAc,kBAAkB,+BACtC,uBAAuB;CACzB,MAAM,EAAE,WAAA,cAAY,cAAqB,oBAAoB;CAC7D,MAAM,EAAE,MAAM,sBAAsB;CACpC,MAAM,uBAAuB,gBAAc;CAC3C,MAAM,eAAe,OAAyB,IAAI;CAClD,MAAM,CAAC,yBAAyB,8BAA8B,SAE5D,KAAA,CAAS;CAEX,MAAM,mBAAmB,cACjB,yBAAyB,YAAY,EAAE,iBAAiB,CAAC,GAC/D,CAAC,YAAY,gBAAgB,CAC/B;CACA,MAAM,aAAa,oBAAoB,iBAAiB;CACxD,MAAM,WAAW,oBAAoB,iBAAiB;CACtD,MAAM,QAAQ,oBAAoB,iBAAiB;CACnD,MAAM,mBAAmB,yBAAyB,OAAO;CAKzD,MAAM,mBAAmB,yBAAyB,KAAK;CACvD,MAAM,iBAAiB,mBACnB,EAAE,kCAAkC,EAAE,OAAO,iBAAiB,CAAC,IAC/D,EAAE,mBAAmB;CACzB,MAAM,sBAAsB,cAAc;EACxC,MAAM,iBAAiB,OAAO,YAAY,MAAM;EAChD,MAAM,gBAAgB,OAAO,YAAY,KAAK;EAE9C,OAAO;GACL,qBAAqB,OAAO,iBAAiB,IAAI,iBAAiB,GAAO;GACzE,oBAAoB,OAAO,gBAAgB,IAAI,gBAAgB,GAAO;EACxE;CACF,GAAG,CAAC,YAAY,QAAQ,YAAY,KAAK,CAAC;CAE1C,sBAAsB;EACpB,IAAI,CAAC,aAAa,WAAW,CAAC,4BAA4B;EAG1D,2BADe,2BAA2B,YAAY,aAAa,OACxC,CAAM;CACnC,GAAG,CAAC,YAAY,0BAA0B,CAAC;CAE3C,IAAI,CAAC,UAAU,OAAO;CAEtB,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,oCAAoC;YAAzD,CACE,oBAAC,aAAD;GACE,KAAK;GACL,QAAQ,YAAY;GACpB,KAAK;GACL,KAAK;GACL,OAAO;GACP,OAAO,YAAY;GACnB,GAAK,uBAAuB,EAAE,2BAA2B,MAAM,IAAI,CAAC;EACrE,CAAA,GACD,oBAAC,YAAD,CAAa,CAAA,CACV;;AAET;AAEA,IAAM,mBAAmB;CACvB,MAAM,EAAE,cAAc,yBAAyB;CAC/C,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,WAAD,CAAY,CAAA,GAAC,OAEV;;AAET"}
1
+ {"version":3,"file":"Giphy.mjs","names":[],"sources":["../../../../src/components/Attachment/Giphy.tsx"],"sourcesContent":["import type { Attachment } from 'stream-chat';\nimport { BaseImage as DefaultBaseImage } from '../BaseImage';\nimport { toGalleryItemDescriptors } from '../Gallery';\nimport { getGiphyDescriptiveTitle } from './giphyAccessibility';\nimport clsx from 'clsx';\nimport {\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { type CSSProperties, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport {\n type ImageAttachmentConfiguration,\n useAttachmentContext,\n} from '../../context/AttachmentContext';\n\nexport type GiphyAttachmentProps = {\n attachment: Attachment;\n};\n\nexport const Giphy = ({ attachment }: GiphyAttachmentProps) => {\n const { giphyVersion: giphyVersionName, imageAttachmentSizeHandler } =\n useAttachmentContext();\n const { BaseImage = DefaultBaseImage } = useComponentContext();\n const { t } = useTranslationContext();\n const usesDefaultBaseImage = BaseImage === DefaultBaseImage;\n const imageElement = useRef<HTMLImageElement>(null);\n const [attachmentConfiguration, setAttachmentConfiguration] = useState<\n ImageAttachmentConfiguration | undefined\n >(undefined);\n\n const imageDescriptors = useMemo(\n () => toGalleryItemDescriptors(attachment, { giphyVersionName }),\n [attachment, giphyVersionName],\n );\n const dimensions = imageDescriptors && imageDescriptors.dimensions;\n const imageUrl = imageDescriptors && imageDescriptors.imageUrl;\n const title = imageDescriptors && imageDescriptors.title;\n const resolvedImageUrl = attachmentConfiguration?.url || imageUrl;\n // For giphy attachments `imageDescriptors.alt`/`title` may both resolve to a raw\n // media URL (Giphy payloads rarely carry a human title), which is useless to\n // screen-reader users. Prefer a real, non-URL title; otherwise fall back to a\n // localized generic label instead of exposing the URL as the accessible name.\n const descriptiveTitle = getGiphyDescriptiveTitle(title);\n const accessibleName = descriptiveTitle\n ? t('attachment.giphy.animatedGif.withTitle.ariaLabel', 'Animated GIF: {{ title }}', {\n title: descriptiveTitle,\n })\n : t('attachment.giphy.animatedGif.ariaLabel', 'Animated GIF');\n const imageStyleVariables = useMemo(() => {\n const originalHeight = Number(dimensions?.height);\n const originalWidth = Number(dimensions?.width);\n\n return {\n '--original-height': String(originalHeight > 1 ? originalHeight : 1000000),\n '--original-width': String(originalWidth > 1 ? originalWidth : 1000000),\n } as CSSProperties;\n }, [dimensions?.height, dimensions?.width]);\n\n useLayoutEffect(() => {\n if (!imageElement.current || !imageAttachmentSizeHandler) return;\n\n const config = imageAttachmentSizeHandler(attachment, imageElement.current);\n setAttachmentConfiguration(config);\n }, [attachment, imageAttachmentSizeHandler]);\n\n if (!imageUrl) return null;\n\n return (\n <div className={clsx(`str-chat__message-attachment-giphy`)}>\n <BaseImage\n alt={accessibleName}\n height={dimensions?.height}\n ref={imageElement}\n src={resolvedImageUrl}\n style={imageStyleVariables}\n width={dimensions?.width}\n {...(usesDefaultBaseImage ? { showDownloadButtonOnError: false } : {})}\n />\n <GiphyBadge />\n </div>\n );\n};\n\nconst GiphyBadge = () => {\n const { IconGiphy } = useComponentContextIcons();\n\n return (\n <div className='str-chat__giphy-badge'>\n <IconGiphy />\n Giphy\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAoBA,IAAa,SAAS,EAAE,iBAAuC;CAC7D,MAAM,EAAE,cAAc,kBAAkB,+BACtC,qBAAqB;CACvB,MAAM,EAAE,WAAA,cAAY,cAAqB,oBAAoB;CAC7D,MAAM,EAAE,MAAM,sBAAsB;CACpC,MAAM,uBAAuB,gBAAc;CAC3C,MAAM,eAAe,OAAyB,IAAI;CAClD,MAAM,CAAC,yBAAyB,8BAA8B,SAE5D,KAAA,CAAS;CAEX,MAAM,mBAAmB,cACjB,yBAAyB,YAAY,EAAE,iBAAiB,CAAC,GAC/D,CAAC,YAAY,gBAAgB,CAC/B;CACA,MAAM,aAAa,oBAAoB,iBAAiB;CACxD,MAAM,WAAW,oBAAoB,iBAAiB;CACtD,MAAM,QAAQ,oBAAoB,iBAAiB;CACnD,MAAM,mBAAmB,yBAAyB,OAAO;CAKzD,MAAM,mBAAmB,yBAAyB,KAAK;CACvD,MAAM,iBAAiB,mBACnB,EAAE,oDAAoD,6BAA6B,EACjF,OAAO,iBACT,CAAC,IACD,EAAE,0CAA0C,cAAc;CAC9D,MAAM,sBAAsB,cAAc;EACxC,MAAM,iBAAiB,OAAO,YAAY,MAAM;EAChD,MAAM,gBAAgB,OAAO,YAAY,KAAK;EAE9C,OAAO;GACL,qBAAqB,OAAO,iBAAiB,IAAI,iBAAiB,GAAO;GACzE,oBAAoB,OAAO,gBAAgB,IAAI,gBAAgB,GAAO;EACxE;CACF,GAAG,CAAC,YAAY,QAAQ,YAAY,KAAK,CAAC;CAE1C,sBAAsB;EACpB,IAAI,CAAC,aAAa,WAAW,CAAC,4BAA4B;EAG1D,2BADe,2BAA2B,YAAY,aAAa,OACxC,CAAM;CACnC,GAAG,CAAC,YAAY,0BAA0B,CAAC;CAE3C,IAAI,CAAC,UAAU,OAAO;CAEtB,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,oCAAoC;YAAzD,CACE,oBAAC,aAAD;GACE,KAAK;GACL,QAAQ,YAAY;GACpB,KAAK;GACL,KAAK;GACL,OAAO;GACP,OAAO,YAAY;GACnB,GAAK,uBAAuB,EAAE,2BAA2B,MAAM,IAAI,CAAC;EACrE,CAAA,GACD,oBAAC,YAAD,CAAa,CAAA,CACV;;AAET;AAEA,IAAM,mBAAmB;CACvB,MAAM,EAAE,cAAc,yBAAyB;CAE/C,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,WAAD,CAAY,CAAA,GAAC,OAEV;;AAET"}
@@ -1,8 +1,8 @@
1
- import { useChannelStateContext } from "../../../context/ChannelStateContext.mjs";
2
- import { useComponentContextIcons } from "../../../context/useComponentContextIcons.mjs";
1
+ import { useAttachmentContext } from "../../../context/AttachmentContext.mjs";
3
2
  import { BaseImage } from "../../BaseImage/BaseImage.mjs";
4
3
  import { SafeAnchor } from "../../SafeAnchor/SafeAnchor.mjs";
5
4
  import { UnableToRenderCard } from "./UnableToRenderCard.mjs";
5
+ import { useComponentContextIcons } from "../../../context/useComponentContextIcons.mjs";
6
6
  import React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import clsx from "clsx";
@@ -35,9 +35,9 @@ var CardHeader = (props) => {
35
35
  }) : null;
36
36
  };
37
37
  var CardContent = (props) => {
38
+ const { IconLink } = useComponentContextIcons();
38
39
  const { og_scrape_url, text, title, title_link } = props;
39
40
  const url = title_link || og_scrape_url;
40
- const { IconLink } = useComponentContextIcons();
41
41
  return /* @__PURE__ */ jsxs("div", {
42
42
  className: "str-chat__message-attachment-card--content",
43
43
  children: [
@@ -62,7 +62,7 @@ var CardContent = (props) => {
62
62
  };
63
63
  var UnMemoizedCard = (props) => {
64
64
  const { giphy, image_url, og_scrape_url, thumb_url, title, title_link, type } = props;
65
- const { giphyVersion: giphyVersionName } = useChannelStateContext("");
65
+ const { giphyVersion: giphyVersionName } = useAttachmentContext();
66
66
  const cardUrl = title_link || og_scrape_url;
67
67
  let image = thumb_url || image_url;
68
68
  const dimensions = {};
@@ -1 +1 @@
1
- {"version":3,"file":"Card.mjs","names":[],"sources":["../../../../../src/components/Attachment/LinkPreview/Card.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseImage } from '../../BaseImage';\nimport { SafeAnchor } from '../../SafeAnchor';\nimport { useChannelStateContext } from '../../../context/ChannelStateContext';\nimport { useComponentContextIcons } from '../../../context';\n\nimport type { Attachment } from 'stream-chat';\nimport type { RenderAttachmentProps } from '../utils';\nimport type { Dimensions } from '../../../types/types';\nimport { UnableToRenderCard } from './UnableToRenderCard';\nimport clsx from 'clsx';\n\ntype CardRootProps = {\n cardUrl: string | undefined;\n children: React.ReactNode;\n type?: CardProps['type'];\n};\n\nconst CardRoot = ({ cardUrl, children, type }: CardRootProps) => {\n const className = clsx(\n `str-chat__message-attachment-card str-chat__message-attachment-card--${type}`,\n );\n\n return cardUrl ? (\n <SafeAnchor\n className={className}\n href={cardUrl}\n rel='noopener noreferrer'\n target='_blank'\n >\n {children}\n </SafeAnchor>\n ) : (\n <div className={className}>{children}</div>\n );\n};\n\ntype CardHeaderProps = Pick<CardProps, 'title' | 'type' | 'image_url' | 'thumb_url'> & {\n dimensions: Dimensions;\n image?: string;\n};\n\nconst CardHeader = (props: CardHeaderProps) => {\n const { dimensions, image, image_url, thumb_url, title } = props;\n\n return image ? (\n <div\n className='str-chat__message-attachment-card--header str-chat__message-attachment-card-react--header'\n data-testid={'card-header'}\n >\n <BaseImage\n alt={title || image}\n data-testid='image-test'\n src={image_url ?? thumb_url}\n title={title || image}\n {...dimensions}\n />\n </div>\n ) : null;\n};\n\ntype CardContentProps = RenderAttachmentProps['attachment'];\n\nconst CardContent = (props: CardContentProps) => {\n const { og_scrape_url, text, title, title_link } = props;\n const url = title_link || og_scrape_url;\n const { IconLink } = useComponentContextIcons();\n\n return (\n <div className='str-chat__message-attachment-card--content'>\n {title && <div className='str-chat__message-attachment-card--title'>{title}</div>}\n {text && <div className='str-chat__message-attachment-card--text'>{text}</div>}\n {url && (\n <div\n className='str-chat__message-attachment-card--source-link'\n data-testid='card-source-link'\n >\n <IconLink />\n <div className='str-chat__message-attachment-card--url'>{url}</div>\n </div>\n )}\n </div>\n );\n};\n\nexport type CardProps = RenderAttachmentProps['attachment'] & {\n compact?: boolean;\n};\n\nconst UnMemoizedCard = (props: CardProps) => {\n const { giphy, image_url, og_scrape_url, thumb_url, title, title_link, type } = props;\n const { giphyVersion: giphyVersionName } = useChannelStateContext('');\n const cardUrl = title_link || og_scrape_url;\n\n let image = thumb_url || image_url;\n const dimensions: { height?: string; width?: string } = {};\n\n if (type === 'giphy' && typeof giphy !== 'undefined') {\n const giphyVersion =\n giphy[giphyVersionName as keyof NonNullable<Attachment['giphy']>];\n image = giphyVersion.url;\n dimensions.height = giphyVersion.height;\n dimensions.width = giphyVersion.width;\n }\n\n if (!title && !cardUrl && !image) {\n return <UnableToRenderCard />;\n }\n\n return (\n <CardRoot cardUrl={cardUrl} type={type}>\n <CardHeader {...props} dimensions={dimensions} image={image} />\n <CardContent {...props} />\n </CardRoot>\n );\n};\n\n/**\n * Simple Card Layout for displaying links\n */\nexport const Card = React.memo(UnMemoizedCard) as typeof UnMemoizedCard;\n"],"mappings":";;;;;;;;;AAkBA,IAAM,YAAY,EAAE,SAAS,UAAU,WAA0B;CAC/D,MAAM,YAAY,KAChB,wEAAwE,MAC1E;CAEA,OAAO,UACL,oBAAC,YAAD;EACa;EACX,MAAM;EACN,KAAI;EACJ,QAAO;EAEN;CACS,CAAA,IAEZ,oBAAC,OAAD;EAAgB;EAAY;CAAc,CAAA;AAE9C;AAOA,IAAM,cAAc,UAA2B;CAC7C,MAAM,EAAE,YAAY,OAAO,WAAW,WAAW,UAAU;CAE3D,OAAO,QACL,oBAAC,OAAD;EACE,WAAU;EACV,eAAa;YAEb,oBAAC,WAAD;GACE,KAAK,SAAS;GACd,eAAY;GACZ,KAAK,aAAa;GAClB,OAAO,SAAS;GAChB,GAAI;EACL,CAAA;CACE,CAAA,IACH;AACN;AAIA,IAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,eAAe,MAAM,OAAO,eAAe;CACnD,MAAM,MAAM,cAAc;CAC1B,MAAM,EAAE,aAAa,yBAAyB;CAE9C,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf;GACG,SAAS,oBAAC,OAAD;IAAK,WAAU;cAA4C;GAAW,CAAA;GAC/E,QAAQ,oBAAC,OAAD;IAAK,WAAU;cAA2C;GAAU,CAAA;GAC5E,OACC,qBAAC,OAAD;IACE,WAAU;IACV,eAAY;cAFd,CAIE,oBAAC,UAAD,CAAW,CAAA,GACX,oBAAC,OAAD;KAAK,WAAU;eAA0C;IAAS,CAAA,CAC/D;;EAEJ;;AAET;AAMA,IAAM,kBAAkB,UAAqB;CAC3C,MAAM,EAAE,OAAO,WAAW,eAAe,WAAW,OAAO,YAAY,SAAS;CAChF,MAAM,EAAE,cAAc,qBAAqB,uBAAuB,EAAE;CACpE,MAAM,UAAU,cAAc;CAE9B,IAAI,QAAQ,aAAa;CACzB,MAAM,aAAkD,CAAC;CAEzD,IAAI,SAAS,WAAW,OAAO,UAAU,aAAa;EACpD,MAAM,eACJ,MAAM;EACR,QAAQ,aAAa;EACrB,WAAW,SAAS,aAAa;EACjC,WAAW,QAAQ,aAAa;CAClC;CAEA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OACzB,OAAO,oBAAC,oBAAD,CAAqB,CAAA;CAG9B,OACE,qBAAC,UAAD;EAAmB;EAAe;YAAlC,CACE,oBAAC,YAAD;GAAY,GAAI;GAAmB;GAAmB;EAAQ,CAAA,GAC9D,oBAAC,aAAD,EAAa,GAAI,MAAQ,CAAA,CACjB;;AAEd;;;;AAKA,IAAa,OAAO,MAAM,KAAK,cAAc"}
1
+ {"version":3,"file":"Card.mjs","names":[],"sources":["../../../../../src/components/Attachment/LinkPreview/Card.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseImage } from '../../BaseImage';\nimport { SafeAnchor } from '../../SafeAnchor';\nimport { useAttachmentContext } from '../../../context/AttachmentContext';\n\nimport type { Attachment } from 'stream-chat';\nimport type { RenderAttachmentProps } from '../utils';\nimport type { Dimensions } from '../../../types/types';\nimport { UnableToRenderCard } from './UnableToRenderCard';\nimport clsx from 'clsx';\nimport { useComponentContextIcons } from '../../../context';\n\ntype CardRootProps = {\n cardUrl: string | undefined;\n children: React.ReactNode;\n type?: CardProps['type'];\n};\n\nconst CardRoot = ({ cardUrl, children, type }: CardRootProps) => {\n const className = clsx(\n `str-chat__message-attachment-card str-chat__message-attachment-card--${type}`,\n );\n\n return cardUrl ? (\n <SafeAnchor\n className={className}\n href={cardUrl}\n rel='noopener noreferrer'\n target='_blank'\n >\n {children}\n </SafeAnchor>\n ) : (\n <div className={className}>{children}</div>\n );\n};\n\ntype CardHeaderProps = Pick<CardProps, 'title' | 'type' | 'image_url' | 'thumb_url'> & {\n dimensions: Dimensions;\n image?: string;\n};\n\nconst CardHeader = (props: CardHeaderProps) => {\n const { dimensions, image, image_url, thumb_url, title } = props;\n\n return image ? (\n <div\n className='str-chat__message-attachment-card--header str-chat__message-attachment-card-react--header'\n data-testid={'card-header'}\n >\n <BaseImage\n alt={title || image}\n data-testid='image-test'\n src={image_url ?? thumb_url}\n title={title || image}\n {...dimensions}\n />\n </div>\n ) : null;\n};\n\ntype CardContentProps = RenderAttachmentProps['attachment'];\n\nconst CardContent = (props: CardContentProps) => {\n const { IconLink } = useComponentContextIcons();\n const { og_scrape_url, text, title, title_link } = props;\n const url = title_link || og_scrape_url;\n\n return (\n <div className='str-chat__message-attachment-card--content'>\n {title && <div className='str-chat__message-attachment-card--title'>{title}</div>}\n {text && <div className='str-chat__message-attachment-card--text'>{text}</div>}\n {url && (\n <div\n className='str-chat__message-attachment-card--source-link'\n data-testid='card-source-link'\n >\n <IconLink />\n <div className='str-chat__message-attachment-card--url'>{url}</div>\n </div>\n )}\n </div>\n );\n};\n\nexport type CardProps = RenderAttachmentProps['attachment'] & {\n compact?: boolean;\n};\n\nconst UnMemoizedCard = (props: CardProps) => {\n const { giphy, image_url, og_scrape_url, thumb_url, title, title_link, type } = props;\n const { giphyVersion: giphyVersionName } = useAttachmentContext();\n const cardUrl = title_link || og_scrape_url;\n\n let image = thumb_url || image_url;\n const dimensions: { height?: string; width?: string } = {};\n\n if (type === 'giphy' && typeof giphy !== 'undefined') {\n const giphyVersion =\n giphy[giphyVersionName as keyof NonNullable<Attachment['giphy']>];\n image = giphyVersion.url;\n dimensions.height = giphyVersion.height;\n dimensions.width = giphyVersion.width;\n }\n\n if (!title && !cardUrl && !image) {\n return <UnableToRenderCard />;\n }\n\n return (\n <CardRoot cardUrl={cardUrl} type={type}>\n <CardHeader {...props} dimensions={dimensions} image={image} />\n <CardContent {...props} />\n </CardRoot>\n );\n};\n\n/**\n * Simple Card Layout for displaying links\n */\nexport const Card = React.memo(UnMemoizedCard) as typeof UnMemoizedCard;\n"],"mappings":";;;;;;;;;AAkBA,IAAM,YAAY,EAAE,SAAS,UAAU,WAA0B;CAC/D,MAAM,YAAY,KAChB,wEAAwE,MAC1E;CAEA,OAAO,UACL,oBAAC,YAAD;EACa;EACX,MAAM;EACN,KAAI;EACJ,QAAO;EAEN;CACS,CAAA,IAEZ,oBAAC,OAAD;EAAgB;EAAY;CAAc,CAAA;AAE9C;AAOA,IAAM,cAAc,UAA2B;CAC7C,MAAM,EAAE,YAAY,OAAO,WAAW,WAAW,UAAU;CAE3D,OAAO,QACL,oBAAC,OAAD;EACE,WAAU;EACV,eAAa;YAEb,oBAAC,WAAD;GACE,KAAK,SAAS;GACd,eAAY;GACZ,KAAK,aAAa;GAClB,OAAO,SAAS;GAChB,GAAI;EACL,CAAA;CACE,CAAA,IACH;AACN;AAIA,IAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,aAAa,yBAAyB;CAC9C,MAAM,EAAE,eAAe,MAAM,OAAO,eAAe;CACnD,MAAM,MAAM,cAAc;CAE1B,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf;GACG,SAAS,oBAAC,OAAD;IAAK,WAAU;cAA4C;GAAW,CAAA;GAC/E,QAAQ,oBAAC,OAAD;IAAK,WAAU;cAA2C;GAAU,CAAA;GAC5E,OACC,qBAAC,OAAD;IACE,WAAU;IACV,eAAY;cAFd,CAIE,oBAAC,UAAD,CAAW,CAAA,GACX,oBAAC,OAAD;KAAK,WAAU;eAA0C;IAAS,CAAA,CAC/D;;EAEJ;;AAET;AAMA,IAAM,kBAAkB,UAAqB;CAC3C,MAAM,EAAE,OAAO,WAAW,eAAe,WAAW,OAAO,YAAY,SAAS;CAChF,MAAM,EAAE,cAAc,qBAAqB,qBAAqB;CAChE,MAAM,UAAU,cAAc;CAE9B,IAAI,QAAQ,aAAa;CACzB,MAAM,aAAkD,CAAC;CAEzD,IAAI,SAAS,WAAW,OAAO,UAAU,aAAa;EACpD,MAAM,eACJ,MAAM;EACR,QAAQ,aAAa;EACrB,WAAW,SAAS,aAAa;EACjC,WAAW,QAAQ,aAAa;CAClC;CAEA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OACzB,OAAO,oBAAC,oBAAD,CAAqB,CAAA;CAG9B,OACE,qBAAC,UAAD;EAAmB;EAAe;YAAlC,CACE,oBAAC,YAAD;GAAY,GAAI;GAAmB;GAAmB;EAAQ,CAAA,GAC9D,oBAAC,aAAD,EAAa,GAAI,MAAQ,CAAA,CACjB;;AAEd;;;;AAKA,IAAa,OAAO,MAAM,KAAK,cAAc"}
@@ -4,14 +4,14 @@ import { jsx } from "react/jsx-runtime";
4
4
  import clsx from "clsx";
5
5
  //#region src/components/Attachment/LinkPreview/UnableToRenderCard.tsx
6
6
  var UnableToRenderCard = ({ type }) => {
7
- const { t } = useTranslationContext("Card");
7
+ const { t } = useTranslationContext();
8
8
  return /* @__PURE__ */ jsx("div", {
9
9
  className: clsx("str-chat__message-attachment-card", { [`str-chat__message-attachment-card--${type}`]: type }),
10
10
  children: /* @__PURE__ */ jsx("div", {
11
11
  className: "str-chat__message-attachment-card--content",
12
12
  children: /* @__PURE__ */ jsx("div", {
13
13
  className: "str-chat__message-attachment-card--text",
14
- children: t("this content could not be displayed")
14
+ children: t("attachment.unableRenderCard.text", "this content could not be displayed")
15
15
  })
16
16
  })
17
17
  });
@@ -1 +1 @@
1
- {"version":3,"file":"UnableToRenderCard.mjs","names":[],"sources":["../../../../../src/components/Attachment/LinkPreview/UnableToRenderCard.tsx"],"sourcesContent":["import type { Attachment } from 'stream-chat';\nimport { useTranslationContext } from '../../../context';\nimport clsx from 'clsx';\nimport React from 'react';\n\nexport const UnableToRenderCard = ({ type }: { type?: Attachment['type'] }) => {\n const { t } = useTranslationContext('Card');\n\n return (\n <div\n className={clsx('str-chat__message-attachment-card', {\n [`str-chat__message-attachment-card--${type}`]: type,\n })}\n >\n <div className='str-chat__message-attachment-card--content'>\n <div className='str-chat__message-attachment-card--text'>\n {t('this content could not be displayed')}\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAKA,IAAa,sBAAsB,EAAE,WAA0C;CAC7E,MAAM,EAAE,MAAM,sBAAsB,MAAM;CAE1C,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,qCAAqC,GAClD,sCAAsC,SAAS,KAClD,CAAC;YAED,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,OAAD;IAAK,WAAU;cACZ,EAAE,qCAAqC;GACrC,CAAA;EACF,CAAA;CACF,CAAA;AAET"}
1
+ {"version":3,"file":"UnableToRenderCard.mjs","names":[],"sources":["../../../../../src/components/Attachment/LinkPreview/UnableToRenderCard.tsx"],"sourcesContent":["import type { Attachment } from 'stream-chat';\nimport { useTranslationContext } from '../../../context';\nimport clsx from 'clsx';\nimport React from 'react';\n\nexport const UnableToRenderCard = ({ type }: { type?: Attachment['type'] }) => {\n const { t } = useTranslationContext();\n\n return (\n <div\n className={clsx('str-chat__message-attachment-card', {\n [`str-chat__message-attachment-card--${type}`]: type,\n })}\n >\n <div className='str-chat__message-attachment-card--content'>\n <div className='str-chat__message-attachment-card--text'>\n {t('attachment.unableRenderCard.text', 'this content could not be displayed')}\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAKA,IAAa,sBAAsB,EAAE,WAA0C;CAC7E,MAAM,EAAE,MAAM,sBAAsB;CAEpC,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,qCAAqC,GAClD,sCAAsC,SAAS,KAClD,CAAC;YAED,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,OAAD;IAAK,WAAU;cACZ,EAAE,oCAAoC,qCAAqC;GACzE,CAAA;EACF,CAAA;CACF,CAAA;AAET"}