@droppii-org/chat-mobile 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/lib/module/components/AttachmentPreview.js +250 -0
  2. package/lib/module/components/AttachmentPreview.js.map +1 -0
  3. package/lib/module/components/MediaViewer/index.js +2 -0
  4. package/lib/module/components/MediaViewer/index.js.map +1 -0
  5. package/lib/module/components/MediaViewerModal.js +57 -0
  6. package/lib/module/components/MediaViewerModal.js.map +1 -0
  7. package/lib/module/components/MergedImageGrid.js +173 -0
  8. package/lib/module/components/MergedImageGrid.js.map +1 -0
  9. package/lib/module/components/ThreadCard/AvatarSection.js +4 -4
  10. package/lib/module/components/ThreadCard/AvatarSection.js.map +1 -1
  11. package/lib/module/components/ThreadCard/NamePrefixIcon.js +13 -16
  12. package/lib/module/components/ThreadCard/NamePrefixIcon.js.map +1 -1
  13. package/lib/module/components/ThreadCard/ThreadCard.js +13 -33
  14. package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
  15. package/lib/module/components/ThreadCard/thread-card.utils.js +80 -4
  16. package/lib/module/components/ThreadCard/thread-card.utils.js.map +1 -1
  17. package/lib/module/components/messages/fileMessage/index.js +26 -0
  18. package/lib/module/components/messages/fileMessage/index.js.map +1 -0
  19. package/lib/module/components/messages/imageMessage/index.js +118 -0
  20. package/lib/module/components/messages/imageMessage/index.js.map +1 -0
  21. package/lib/module/components/messages/linkMessage/index.js +122 -0
  22. package/lib/module/components/messages/linkMessage/index.js.map +1 -0
  23. package/lib/module/components/messages/mergedMessage/index.js +37 -0
  24. package/lib/module/components/messages/mergedMessage/index.js.map +1 -0
  25. package/lib/module/components/messages/styles.js +41 -0
  26. package/lib/module/components/messages/styles.js.map +1 -0
  27. package/lib/module/components/messages/textMessage/index.js +38 -0
  28. package/lib/module/components/messages/textMessage/index.js.map +1 -0
  29. package/lib/module/components/messages/types.js +14 -0
  30. package/lib/module/components/messages/types.js.map +1 -0
  31. package/lib/module/components/messages/videoMessage/index.js +110 -0
  32. package/lib/module/components/messages/videoMessage/index.js.map +1 -0
  33. package/lib/module/config/api-endpoints.js +66 -0
  34. package/lib/module/config/api-endpoints.js.map +1 -0
  35. package/lib/module/config/attachment-priority.js +81 -0
  36. package/lib/module/config/attachment-priority.js.map +1 -0
  37. package/lib/module/config/configuration.js +50 -0
  38. package/lib/module/config/configuration.js.map +1 -0
  39. package/lib/module/config/index.js +22 -0
  40. package/lib/module/config/index.js.map +1 -0
  41. package/lib/module/context/ChatContext.js +7 -6
  42. package/lib/module/context/ChatContext.js.map +1 -1
  43. package/lib/module/core/index.js +19 -1
  44. package/lib/module/core/index.js.map +1 -1
  45. package/lib/module/core/useChatListener.js +0 -14
  46. package/lib/module/core/useChatListener.js.map +1 -1
  47. package/lib/module/hooks/message/useSendMessage.js +106 -0
  48. package/lib/module/hooks/message/useSendMessage.js.map +1 -0
  49. package/lib/module/hooks/useChatMessages.js +36 -121
  50. package/lib/module/hooks/useChatMessages.js.map +1 -1
  51. package/lib/module/hooks/useConversationList.js +29 -17
  52. package/lib/module/hooks/useConversationList.js.map +1 -1
  53. package/lib/module/hooks/useImageAttachment.js +263 -0
  54. package/lib/module/hooks/useImageAttachment.js.map +1 -0
  55. package/lib/module/hooks/useLinkPreview/useLinkPreview.js +3 -2
  56. package/lib/module/hooks/useLinkPreview/useLinkPreview.js.map +1 -1
  57. package/lib/module/hooks/useMediaViewer.js +24 -0
  58. package/lib/module/hooks/useMediaViewer.js.map +1 -0
  59. package/lib/module/hooks/useSendAttachment.js +182 -0
  60. package/lib/module/hooks/useSendAttachment.js.map +1 -0
  61. package/lib/module/hooks/useVideoAttachment.js +251 -0
  62. package/lib/module/hooks/useVideoAttachment.js.map +1 -0
  63. package/lib/module/index.js +13 -1
  64. package/lib/module/index.js.map +1 -1
  65. package/lib/module/screens/MediaView/VideoPlayer.js +177 -0
  66. package/lib/module/screens/MediaView/VideoPlayer.js.map +1 -0
  67. package/lib/module/screens/MediaView/index.js +264 -0
  68. package/lib/module/screens/MediaView/index.js.map +1 -0
  69. package/lib/module/screens/chat-detail/ChatComposer.js +190 -196
  70. package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
  71. package/lib/module/screens/chat-detail/ChatDetail.js +106 -71
  72. package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
  73. package/lib/module/screens/chat-detail/ChatDetailHeader.js +5 -8
  74. package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
  75. package/lib/module/screens/chat-detail/ChatLinkPreview.js +1 -1
  76. package/lib/module/screens/chat-detail/ChatLinkPreview.js.map +1 -1
  77. package/lib/module/screens/chat-detail/ChatListLegend.js +5 -15
  78. package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
  79. package/lib/module/screens/chat-detail/components/ChatInputActions.js +51 -0
  80. package/lib/module/screens/chat-detail/components/ChatInputActions.js.map +1 -0
  81. package/lib/module/screens/chat-detail/components/ChatMessageInput.js +93 -0
  82. package/lib/module/screens/chat-detail/components/ChatMessageInput.js.map +1 -0
  83. package/lib/module/screens/chat-detail/conversationHeader.utils.js +7 -9
  84. package/lib/module/screens/chat-detail/conversationHeader.utils.js.map +1 -1
  85. package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js +221 -0
  86. package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js.map +1 -0
  87. package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js +114 -0
  88. package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js.map +1 -0
  89. package/lib/module/screens/chat-detail/hooks/useChatComposerState.js +26 -0
  90. package/lib/module/screens/chat-detail/hooks/useChatComposerState.js.map +1 -0
  91. package/lib/module/screens/chat-detail/index.js +0 -1
  92. package/lib/module/screens/chat-detail/index.js.map +1 -1
  93. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +32 -25
  94. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
  95. package/lib/module/screens/chat-detail/legend/messageTypes.js +15 -0
  96. package/lib/module/screens/chat-detail/legend/messageTypes.js.map +1 -0
  97. package/lib/module/screens/inbox/MessagesTab.js.map +1 -1
  98. package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js +61 -0
  99. package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js.map +1 -0
  100. package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js +54 -0
  101. package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js.map +1 -0
  102. package/lib/module/services/attachmentHandlers/index.js +12 -0
  103. package/lib/module/services/attachmentHandlers/index.js.map +1 -0
  104. package/lib/module/services/attachmentHandlers/videoAttachmentHandler.js +85 -0
  105. package/lib/module/services/attachmentHandlers/videoAttachmentHandler.js.map +1 -0
  106. package/lib/module/services/attachmentOrchestrator.js +225 -0
  107. package/lib/module/services/attachmentOrchestrator.js.map +1 -0
  108. package/lib/module/services/auth.js +35 -0
  109. package/lib/module/services/auth.js.map +1 -0
  110. package/lib/module/services/endpoints.js +20 -1
  111. package/lib/module/services/endpoints.js.map +1 -1
  112. package/lib/module/services/imageUpload.js +126 -0
  113. package/lib/module/services/imageUpload.js.map +1 -0
  114. package/lib/module/store/conversation.js +1 -1
  115. package/lib/module/store/conversation.js.map +1 -1
  116. package/lib/module/store/message.js +45 -0
  117. package/lib/module/store/message.js.map +1 -0
  118. package/lib/module/translation/resources/i18n.js +22 -2
  119. package/lib/module/translation/resources/i18n.js.map +1 -1
  120. package/lib/module/types/attachment.js +2 -0
  121. package/lib/module/types/attachment.js.map +1 -0
  122. package/lib/module/types/attachmentHandler.js +20 -0
  123. package/lib/module/types/attachmentHandler.js.map +1 -0
  124. package/lib/module/types/chat.js +2 -7
  125. package/lib/module/types/chat.js.map +1 -1
  126. package/lib/module/types/imageUpload.js +2 -0
  127. package/lib/module/types/imageUpload.js.map +1 -0
  128. package/lib/module/types/message.js +1 -0
  129. package/lib/module/types/message.js.map +1 -1
  130. package/lib/module/utils/chatImageDimens.js +148 -0
  131. package/lib/module/utils/chatImageDimens.js.map +1 -0
  132. package/lib/module/utils/conversation.js +34 -13
  133. package/lib/module/utils/conversation.js.map +1 -1
  134. package/lib/module/utils/device.js +65 -0
  135. package/lib/module/utils/device.js.map +1 -0
  136. package/lib/module/utils/imageUrlOptimizer.js +41 -0
  137. package/lib/module/utils/imageUrlOptimizer.js.map +1 -0
  138. package/lib/module/utils/imageUtils.js +69 -0
  139. package/lib/module/utils/imageUtils.js.map +1 -0
  140. package/lib/module/utils/legendListMessage.js +0 -3
  141. package/lib/module/utils/legendListMessage.js.map +1 -1
  142. package/lib/module/utils/message.js +5 -8
  143. package/lib/module/utils/message.js.map +1 -1
  144. package/lib/module/utils/resolveMessageType.js +3 -0
  145. package/lib/module/utils/resolveMessageType.js.map +1 -1
  146. package/lib/module/utils/ui.js +17 -0
  147. package/lib/module/utils/ui.js.map +1 -0
  148. package/lib/module/utils/url.js +3 -3
  149. package/lib/module/utils/url.js.map +1 -1
  150. package/lib/module/utils/videoThumbnail.js +62 -0
  151. package/lib/module/utils/videoThumbnail.js.map +1 -0
  152. package/lib/typescript/src/components/AttachmentPreview.d.ts +28 -0
  153. package/lib/typescript/src/components/AttachmentPreview.d.ts.map +1 -0
  154. package/lib/typescript/src/components/MediaViewer/index.d.ts +1 -0
  155. package/lib/typescript/src/components/MediaViewer/index.d.ts.map +1 -0
  156. package/lib/typescript/src/components/MediaViewerModal.d.ts +10 -0
  157. package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -0
  158. package/lib/typescript/src/components/MergedImageGrid.d.ts +16 -0
  159. package/lib/typescript/src/components/MergedImageGrid.d.ts.map +1 -0
  160. package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts +2 -2
  161. package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts.map +1 -1
  162. package/lib/typescript/src/components/ThreadCard/NamePrefixIcon.d.ts +3 -4
  163. package/lib/typescript/src/components/ThreadCard/NamePrefixIcon.d.ts.map +1 -1
  164. package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
  165. package/lib/typescript/src/components/ThreadCard/thread-card.utils.d.ts.map +1 -1
  166. package/lib/typescript/src/components/messages/fileMessage/index.d.ts +3 -0
  167. package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -0
  168. package/lib/typescript/src/components/messages/imageMessage/index.d.ts +3 -0
  169. package/lib/typescript/src/components/messages/imageMessage/index.d.ts.map +1 -0
  170. package/lib/typescript/src/components/messages/linkMessage/index.d.ts +9 -0
  171. package/lib/typescript/src/components/messages/linkMessage/index.d.ts.map +1 -0
  172. package/lib/typescript/src/components/messages/mergedMessage/index.d.ts +3 -0
  173. package/lib/typescript/src/components/messages/mergedMessage/index.d.ts.map +1 -0
  174. package/lib/typescript/src/components/messages/styles.d.ts +36 -0
  175. package/lib/typescript/src/components/messages/styles.d.ts.map +1 -0
  176. package/lib/typescript/src/components/messages/textMessage/index.d.ts +9 -0
  177. package/lib/typescript/src/components/messages/textMessage/index.d.ts.map +1 -0
  178. package/lib/typescript/src/components/messages/types.d.ts +10 -0
  179. package/lib/typescript/src/components/messages/types.d.ts.map +1 -0
  180. package/lib/typescript/src/components/messages/videoMessage/index.d.ts +3 -0
  181. package/lib/typescript/src/components/messages/videoMessage/index.d.ts.map +1 -0
  182. package/lib/typescript/src/config/api-endpoints.d.ts +40 -0
  183. package/lib/typescript/src/config/api-endpoints.d.ts.map +1 -0
  184. package/lib/typescript/src/config/attachment-priority.d.ts +31 -0
  185. package/lib/typescript/src/config/attachment-priority.d.ts.map +1 -0
  186. package/lib/typescript/src/config/configuration.d.ts +30 -0
  187. package/lib/typescript/src/config/configuration.d.ts.map +1 -0
  188. package/lib/typescript/src/config/index.d.ts +15 -0
  189. package/lib/typescript/src/config/index.d.ts.map +1 -0
  190. package/lib/typescript/src/context/ChatContext.d.ts +1 -1
  191. package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
  192. package/lib/typescript/src/core/index.d.ts +13 -1
  193. package/lib/typescript/src/core/index.d.ts.map +1 -1
  194. package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
  195. package/lib/typescript/src/hooks/message/useSendMessage.d.ts +12 -0
  196. package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -0
  197. package/lib/typescript/src/hooks/useChatMessages.d.ts +0 -1
  198. package/lib/typescript/src/hooks/useChatMessages.d.ts.map +1 -1
  199. package/lib/typescript/src/hooks/useConversationList.d.ts +2 -1
  200. package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
  201. package/lib/typescript/src/hooks/useImageAttachment.d.ts +20 -0
  202. package/lib/typescript/src/hooks/useImageAttachment.d.ts.map +1 -0
  203. package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts.map +1 -1
  204. package/lib/typescript/src/hooks/useMediaViewer.d.ts +13 -0
  205. package/lib/typescript/src/hooks/useMediaViewer.d.ts.map +1 -0
  206. package/lib/typescript/src/hooks/useSendAttachment.d.ts +59 -0
  207. package/lib/typescript/src/hooks/useSendAttachment.d.ts.map +1 -0
  208. package/lib/typescript/src/hooks/useVideoAttachment.d.ts +29 -0
  209. package/lib/typescript/src/hooks/useVideoAttachment.d.ts.map +1 -0
  210. package/lib/typescript/src/index.d.ts +14 -1
  211. package/lib/typescript/src/index.d.ts.map +1 -1
  212. package/lib/typescript/src/screens/MediaView/VideoPlayer.d.ts +12 -0
  213. package/lib/typescript/src/screens/MediaView/VideoPlayer.d.ts.map +1 -0
  214. package/lib/typescript/src/screens/MediaView/index.d.ts +11 -0
  215. package/lib/typescript/src/screens/MediaView/index.d.ts.map +1 -0
  216. package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +1 -1
  217. package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
  218. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
  219. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
  220. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
  221. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
  222. package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +1 -1
  223. package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
  224. package/lib/typescript/src/screens/chat-detail/components/ChatInputActions.d.ts +8 -0
  225. package/lib/typescript/src/screens/chat-detail/components/ChatInputActions.d.ts.map +1 -0
  226. package/lib/typescript/src/screens/chat-detail/components/ChatMessageInput.d.ts +15 -0
  227. package/lib/typescript/src/screens/chat-detail/components/ChatMessageInput.d.ts.map +1 -0
  228. package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts +1 -1
  229. package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts.map +1 -1
  230. package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts +23 -0
  231. package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts.map +1 -0
  232. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts +15 -0
  233. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts.map +1 -0
  234. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts +13 -0
  235. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts.map +1 -0
  236. package/lib/typescript/src/screens/chat-detail/index.d.ts +0 -2
  237. package/lib/typescript/src/screens/chat-detail/index.d.ts.map +1 -1
  238. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +3 -3
  239. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
  240. package/lib/typescript/src/screens/chat-detail/legend/messageTypes.d.ts +13 -0
  241. package/lib/typescript/src/screens/chat-detail/legend/messageTypes.d.ts.map +1 -0
  242. package/lib/typescript/src/screens/chat-detail/types.d.ts +10 -8
  243. package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
  244. package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts +22 -0
  245. package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts.map +1 -0
  246. package/lib/typescript/src/services/attachmentHandlers/imageAttachmentHandler.d.ts +3 -0
  247. package/lib/typescript/src/services/attachmentHandlers/imageAttachmentHandler.d.ts.map +1 -0
  248. package/lib/typescript/src/services/attachmentHandlers/index.d.ts +5 -0
  249. package/lib/typescript/src/services/attachmentHandlers/index.d.ts.map +1 -0
  250. package/lib/typescript/src/services/attachmentHandlers/videoAttachmentHandler.d.ts +31 -0
  251. package/lib/typescript/src/services/attachmentHandlers/videoAttachmentHandler.d.ts.map +1 -0
  252. package/lib/typescript/src/services/attachmentOrchestrator.d.ts +5 -0
  253. package/lib/typescript/src/services/attachmentOrchestrator.d.ts.map +1 -0
  254. package/lib/typescript/src/services/auth.d.ts +19 -0
  255. package/lib/typescript/src/services/auth.d.ts.map +1 -0
  256. package/lib/typescript/src/services/endpoints.d.ts +11 -1
  257. package/lib/typescript/src/services/endpoints.d.ts.map +1 -1
  258. package/lib/typescript/src/services/imageUpload.d.ts +7 -0
  259. package/lib/typescript/src/services/imageUpload.d.ts.map +1 -0
  260. package/lib/typescript/src/store/message.d.ts +3 -0
  261. package/lib/typescript/src/store/message.d.ts.map +1 -0
  262. package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
  263. package/lib/typescript/src/types/attachment.d.ts +72 -0
  264. package/lib/typescript/src/types/attachment.d.ts.map +1 -0
  265. package/lib/typescript/src/types/attachmentHandler.d.ts +13 -0
  266. package/lib/typescript/src/types/attachmentHandler.d.ts.map +1 -0
  267. package/lib/typescript/src/types/chat.d.ts +28 -27
  268. package/lib/typescript/src/types/chat.d.ts.map +1 -1
  269. package/lib/typescript/src/types/common.d.ts +1 -0
  270. package/lib/typescript/src/types/common.d.ts.map +1 -1
  271. package/lib/typescript/src/types/imageUpload.d.ts +26 -0
  272. package/lib/typescript/src/types/imageUpload.d.ts.map +1 -0
  273. package/lib/typescript/src/types/message.d.ts +1 -0
  274. package/lib/typescript/src/types/message.d.ts.map +1 -1
  275. package/lib/typescript/src/utils/chatImageDimens.d.ts +34 -0
  276. package/lib/typescript/src/utils/chatImageDimens.d.ts.map +1 -0
  277. package/lib/typescript/src/utils/conversation.d.ts +3 -2
  278. package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
  279. package/lib/typescript/src/utils/device.d.ts +7 -0
  280. package/lib/typescript/src/utils/device.d.ts.map +1 -0
  281. package/lib/typescript/src/utils/imageUrlOptimizer.d.ts +12 -0
  282. package/lib/typescript/src/utils/imageUrlOptimizer.d.ts.map +1 -0
  283. package/lib/typescript/src/utils/imageUtils.d.ts +9 -0
  284. package/lib/typescript/src/utils/imageUtils.d.ts.map +1 -0
  285. package/lib/typescript/src/utils/legendListMessage.d.ts +0 -2
  286. package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -1
  287. package/lib/typescript/src/utils/message.d.ts.map +1 -1
  288. package/lib/typescript/src/utils/resolveMessageType.d.ts.map +1 -1
  289. package/lib/typescript/src/utils/ui.d.ts +13 -0
  290. package/lib/typescript/src/utils/ui.d.ts.map +1 -0
  291. package/lib/typescript/src/utils/url.d.ts +1 -1
  292. package/lib/typescript/src/utils/url.d.ts.map +1 -1
  293. package/lib/typescript/src/utils/videoThumbnail.d.ts +16 -0
  294. package/lib/typescript/src/utils/videoThumbnail.d.ts.map +1 -0
  295. package/package.json +15 -3
  296. package/src/components/AttachmentPreview.tsx +304 -0
  297. package/src/components/MediaViewer/index.tsx +0 -0
  298. package/src/components/MediaViewerModal.tsx +70 -0
  299. package/src/components/MergedImageGrid.tsx +238 -0
  300. package/src/components/ThreadCard/AvatarSection.tsx +5 -8
  301. package/src/components/ThreadCard/NamePrefixIcon.tsx +27 -38
  302. package/src/components/ThreadCard/ThreadCard.tsx +16 -30
  303. package/src/components/ThreadCard/thread-card.utils.ts +95 -4
  304. package/src/components/messages/fileMessage/index.tsx +30 -0
  305. package/src/components/messages/imageMessage/index.tsx +137 -0
  306. package/src/components/messages/linkMessage/index.tsx +162 -0
  307. package/src/components/messages/mergedMessage/index.tsx +45 -0
  308. package/src/components/messages/styles.ts +39 -0
  309. package/src/components/messages/textMessage/index.tsx +53 -0
  310. package/src/components/messages/types.ts +22 -0
  311. package/src/components/messages/videoMessage/index.tsx +120 -0
  312. package/src/config/api-endpoints.ts +72 -0
  313. package/src/config/attachment-priority.ts +93 -0
  314. package/src/config/configuration.ts +50 -0
  315. package/src/config/index.ts +19 -0
  316. package/src/context/ChatContext.tsx +12 -4
  317. package/src/core/index.ts +25 -1
  318. package/src/core/useChatListener.ts +0 -21
  319. package/src/hooks/message/useSendMessage.ts +143 -0
  320. package/src/hooks/useChatMessages.ts +69 -161
  321. package/src/hooks/useConversationList.ts +34 -16
  322. package/src/hooks/useImageAttachment.ts +348 -0
  323. package/src/hooks/useLinkPreview/useLinkPreview.ts +3 -2
  324. package/src/hooks/useMediaViewer.ts +32 -0
  325. package/src/hooks/useSendAttachment.ts +295 -0
  326. package/src/hooks/useVideoAttachment.ts +334 -0
  327. package/src/index.tsx +13 -1
  328. package/src/screens/MediaView/VideoPlayer.tsx +211 -0
  329. package/src/screens/MediaView/index.tsx +327 -0
  330. package/src/screens/chat-detail/ChatComposer.tsx +206 -271
  331. package/src/screens/chat-detail/ChatDetail.tsx +164 -104
  332. package/src/screens/chat-detail/ChatDetailHeader.tsx +4 -10
  333. package/src/screens/chat-detail/ChatLinkPreview.tsx +1 -1
  334. package/src/screens/chat-detail/ChatListLegend.tsx +10 -13
  335. package/src/screens/chat-detail/components/ChatInputActions.tsx +71 -0
  336. package/src/screens/chat-detail/components/ChatMessageInput.tsx +127 -0
  337. package/src/screens/chat-detail/conversationHeader.utils.ts +11 -14
  338. package/src/screens/chat-detail/hooks/useAttachmentSendHandler.ts +291 -0
  339. package/src/screens/chat-detail/hooks/useChatComposerAnimation.ts +184 -0
  340. package/src/screens/chat-detail/hooks/useChatComposerState.ts +40 -0
  341. package/src/screens/chat-detail/index.ts +0 -2
  342. package/src/screens/chat-detail/legend/LegendChatMessage.tsx +44 -39
  343. package/src/screens/chat-detail/legend/messageTypes.tsx +13 -0
  344. package/src/screens/chat-detail/types.ts +11 -9
  345. package/src/screens/inbox/MessagesTab.tsx +1 -1
  346. package/src/services/attachmentHandlers/fileAttachmentHandler.ts +78 -0
  347. package/src/services/attachmentHandlers/imageAttachmentHandler.ts +54 -0
  348. package/src/services/attachmentHandlers/index.ts +10 -0
  349. package/src/services/attachmentHandlers/videoAttachmentHandler.ts +114 -0
  350. package/src/services/attachmentOrchestrator.ts +300 -0
  351. package/src/services/auth.ts +34 -0
  352. package/src/services/endpoints.ts +24 -1
  353. package/src/services/imageUpload.ts +162 -0
  354. package/src/store/conversation.ts +1 -1
  355. package/src/store/message.ts +44 -0
  356. package/src/translation/resources/i18n.ts +22 -2
  357. package/src/types/attachment.ts +85 -0
  358. package/src/types/attachmentHandler.ts +31 -0
  359. package/src/types/chat.ts +31 -30
  360. package/src/types/common.ts +1 -0
  361. package/src/types/imageUpload.ts +28 -0
  362. package/src/types/message.ts +1 -0
  363. package/src/utils/chatImageDimens.ts +178 -0
  364. package/src/utils/conversation.ts +44 -17
  365. package/src/utils/device.ts +73 -0
  366. package/src/utils/imageUrlOptimizer.ts +56 -0
  367. package/src/utils/imageUtils.ts +76 -0
  368. package/src/utils/legendListMessage.ts +0 -5
  369. package/src/utils/message.ts +10 -12
  370. package/src/utils/resolveMessageType.ts +2 -0
  371. package/src/utils/ui.ts +19 -0
  372. package/src/utils/url.ts +3 -3
  373. package/src/utils/videoThumbnail.ts +85 -0
  374. package/lib/module/screens/chat-detail/ChatList.js +0 -147
  375. package/lib/module/screens/chat-detail/ChatList.js.map +0 -1
  376. package/lib/module/screens/chat-detail/ChatTextBubble.js +0 -62
  377. package/lib/module/screens/chat-detail/ChatTextBubble.js.map +0 -1
  378. package/lib/module/screens/chat-detail/legend/message-types.js +0 -122
  379. package/lib/module/screens/chat-detail/legend/message-types.js.map +0 -1
  380. package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js +0 -24
  381. package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js.map +0 -1
  382. package/lib/module/screens/chat-detail/messages/types.js +0 -4
  383. package/lib/module/screens/chat-detail/messages/types.js.map +0 -1
  384. package/lib/typescript/src/screens/chat-detail/ChatList.d.ts +0 -3
  385. package/lib/typescript/src/screens/chat-detail/ChatList.d.ts.map +0 -1
  386. package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts +0 -3
  387. package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts.map +0 -1
  388. package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts +0 -12
  389. package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts.map +0 -1
  390. package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts +0 -3
  391. package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts.map +0 -1
  392. package/lib/typescript/src/screens/chat-detail/messages/types.d.ts +0 -13
  393. package/lib/typescript/src/screens/chat-detail/messages/types.d.ts.map +0 -1
  394. package/src/screens/chat-detail/ChatList.tsx +0 -190
  395. package/src/screens/chat-detail/ChatTextBubble.tsx +0 -73
  396. package/src/screens/chat-detail/legend/message-types.tsx +0 -149
  397. package/src/screens/chat-detail/messages/ChatMessageBubble.tsx +0 -23
  398. package/src/screens/chat-detail/messages/types.ts +0 -14
@@ -0,0 +1,15 @@
1
+ import { TextInput, type NativeSyntheticEvent, type TextInputContentSizeChangeEventData } from 'react-native';
2
+ export interface ChatMessageInputProps {
3
+ value?: string;
4
+ placeholder?: string;
5
+ onChangeText: (text?: string) => void;
6
+ onFocus: () => void;
7
+ onBlur: () => void;
8
+ onContentSizeChange: (event: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => void;
9
+ isInputFocused: boolean;
10
+ isMultilineInput: boolean;
11
+ onEmojiPress?: () => void;
12
+ inputRef: React.RefObject<TextInput>;
13
+ }
14
+ export declare const ChatMessageInput: import("react").MemoExoticComponent<({ value, placeholder, onChangeText, onFocus, onBlur, onContentSizeChange, isInputFocused, isMultilineInput, onEmojiPress, inputRef, }: ChatMessageInputProps) => import("react").JSX.Element>;
15
+ //# sourceMappingURL=ChatMessageInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageInput.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/components/ChatMessageInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EACT,KAAK,oBAAoB,EACzB,KAAK,mCAAmC,EACzC,MAAM,cAAc,CAAC;AAQtB,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,mBAAmB,EAAE,CACnB,KAAK,EAAE,oBAAoB,CAAC,mCAAmC,CAAC,KAC7D,IAAI,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,gBAAgB,8KAYxB,qBAAqB,iCA6DzB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { DConversationItem } from '../../types/chat';
1
+ import { type DConversationItem } from '../../types/chat';
2
2
  export declare const getConversationTitle: (conversation?: DConversationItem) => string;
3
3
  export declare const getConversationAvatarUri: (conversation?: DConversationItem) => string | null;
4
4
  export declare const getConversationSubtitle: (conversation?: DConversationItem) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,eAAO,MAAM,oBAAoB,GAC/B,eAAe,iBAAiB,KAC/B,MAWF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,IAEX,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,SAmBX,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,eAAe,iBAAiB,KAC/B,OAEF,CAAC"}
1
+ {"version":3,"file":"conversationHeader.utils.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/conversationHeader.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,eAAO,MAAM,oBAAoB,GAC/B,eAAe,iBAAiB,KAC/B,MAMF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,IAEX,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,iBAAiB,KAC/B,MAAM,GAAG,SAqBX,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,eAAe,iBAAiB,KAC/B,OAEF,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { DMessageItem } from '../../../types/chat';
2
+ interface AttachmentItem {
3
+ image: any;
4
+ uploadedUrl?: string;
5
+ uploadProgress?: number;
6
+ error?: any;
7
+ isUploading?: boolean;
8
+ }
9
+ interface UseAttachmentSendHandlerProps {
10
+ selectedImages: AttachmentItem[];
11
+ sendAttachments: (items: any[], _: any, onMessageSent?: (message: DMessageItem) => void) => Promise<boolean>;
12
+ clearAllImages: () => void;
13
+ onSend?: () => void;
14
+ onMessageSent?: (message: DMessageItem) => void;
15
+ textMessage?: string;
16
+ urlMetadata?: any;
17
+ onSendText?: (text: string, urlMetadata?: any) => void;
18
+ }
19
+ export declare const useAttachmentSendHandler: ({ selectedImages, sendAttachments, clearAllImages, onSend, onMessageSent, textMessage, urlMetadata, onSendText, }: UseAttachmentSendHandlerProps) => {
20
+ handleSend: () => Promise<void>;
21
+ };
22
+ export {};
23
+ //# sourceMappingURL=useAttachmentSendHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAttachmentSendHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useAttachmentSendHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,UAAU,cAAc;IACtB,KAAK,EAAE,GAAG,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,6BAA6B;IACrC,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,eAAe,EAAE,CACf,KAAK,EAAE,GAAG,EAAE,EACZ,CAAC,EAAE,GAAG,EACN,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,KAC5C,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,wBAAwB,GAAI,mHAStC,6BAA6B;;CA0P/B,CAAC"}
@@ -0,0 +1,15 @@
1
+ interface UseChatComposerAnimationProps {
2
+ isAttachmentOpen: boolean;
3
+ panelHeight: number;
4
+ onAttachmentOpenChange: (isOpen: boolean) => void;
5
+ }
6
+ interface UseChatComposerAnimationReturn {
7
+ attachmentHeightSV: any;
8
+ accessorySlotStyle: any;
9
+ toggleAttachmentVisibility: () => void;
10
+ openAttachment: () => void;
11
+ closeAttachment: () => void;
12
+ }
13
+ export declare const useChatComposerAnimation: ({ isAttachmentOpen, panelHeight, onAttachmentOpenChange, }: UseChatComposerAnimationProps) => UseChatComposerAnimationReturn;
14
+ export {};
15
+ //# sourceMappingURL=useChatComposerAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatComposerAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerAnimation.ts"],"names":[],"mappings":"AAiBA,UAAU,6BAA6B;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,UAAU,8BAA8B;IACtC,kBAAkB,EAAE,GAAG,CAAC;IACxB,kBAAkB,EAAE,GAAG,CAAC;IACxB,0BAA0B,EAAE,MAAM,IAAI,CAAC;IACvC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB,GAAI,4DAItC,6BAA6B,KAAG,8BAoJlC,CAAC"}
@@ -0,0 +1,13 @@
1
+ interface UseChatComposerStateReturn {
2
+ isAttachmentOpen: boolean;
3
+ setIsAttachmentOpen: (open: boolean) => void;
4
+ isInputFocused: boolean;
5
+ setIsInputFocused: (focused: boolean) => void;
6
+ isInputWrapped: boolean;
7
+ setIsInputWrapped: (wrapped: boolean) => void;
8
+ isMultilineInput: boolean;
9
+ inputRef: React.RefObject<any>;
10
+ }
11
+ export declare const useChatComposerState: (value: string) => UseChatComposerStateReturn;
12
+ export {};
13
+ //# sourceMappingURL=useChatComposerState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatComposerState.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerState.ts"],"names":[],"mappings":"AAEA,UAAU,0BAA0B;IAClC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,KACZ,0BAwBF,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export { default as ChatDetail } from './ChatDetail';
2
2
  export { default as ChatDetailHeader } from './ChatDetailHeader';
3
- export { ChatList } from './ChatList';
4
3
  export { ChatComposer } from './ChatComposer';
5
4
  export { ChatQuickActions } from './ChatQuickActions';
6
5
  export { ChatAttachmentPanel } from './ChatAttachmentPanel';
@@ -9,6 +8,5 @@ export { getConversationTitle, getConversationAvatarUri, getConversationSubtitle
9
8
  export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatAttachmentAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatAttachmentPanelProps, } from './types';
10
9
  export type { DGiftedChatMessage } from '../../utils/giftedChatMessage';
11
10
  export { DChatMessageType, CUSTOM_MESSAGE_DATA_TYPE, } from '../../types/message';
12
- export type { ChatMessageBubbleProps } from './messages/types';
13
11
  export { mapOpenIMMessageToGiftedChat, mapOpenIMMessagesToGiftedChat, } from '../../utils/giftedChatMessage';
14
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import type { DMessageItem } from '../../../types/chat';
2
- import type { DChatMessageType } from '../../../types/message';
2
+ import type { MediaItem } from '../../../hooks/useMediaViewer';
3
3
  interface LegendChatMessageProps {
4
4
  message: DMessageItem;
5
- messageType: DChatMessageType;
6
5
  isOutgoing: boolean;
7
6
  createdAtTime: number;
7
+ onMediaPress?: (items: MediaItem[], index?: number) => void;
8
8
  }
9
9
  /**
10
10
  * Dispatcher component - renders the appropriate message component
11
11
  * based on message type. Extensible for new message types.
12
12
  */
13
- export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, messageType, isOutgoing, createdAtTime, }: LegendChatMessageProps) => import("react").JSX.Element>;
13
+ export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, }: LegendChatMessageProps) => import("react").JSX.Element>;
14
14
  export {};
15
15
  //# sourceMappingURL=LegendChatMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatMessage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAS/D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAeD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6FAMzB,sBAAsB,iCAsB1B,CAAC"}
1
+ {"version":3,"file":"LegendChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatMessage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAQ/D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D;AAgBD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8FAMzB,sBAAsB,iCAyB1B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Message type components - re-exports from components/messages
3
+ * Stateless message components live in components/messages
4
+ */
5
+ export type { BaseLegendMessageProps } from '../../../components/messages/types';
6
+ export { formatMessageTime } from '../../../components/messages/types';
7
+ export { TextMessage } from '../../../components/messages/textMessage';
8
+ export { ImageMessage } from '../../../components/messages/imageMessage';
9
+ export { VideoMessage } from '../../../components/messages/videoMessage';
10
+ export { FileMessage } from '../../../components/messages/fileMessage';
11
+ export { MergedMessage } from '../../../components/messages/mergedMessage';
12
+ export { messageStyles } from '../../../components/messages/styles';
13
+ //# sourceMappingURL=messageTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/messageTypes.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { DChatType, DChatCategory } from '../../types/chat';
2
+ import type { MediaItem } from '../../hooks/useMediaViewer';
3
3
  import type { DConversationItem, DMessageItem } from '../../types/chat';
4
+ import type { IUrlMetadata } from '../../types/common';
5
+ import type { PeerType } from '@droppii/openim-rn-client-sdk';
4
6
  export type DChatActionIconProvider = 'MaterialCommunityIcons' | 'DroppiiNew';
5
7
  export interface DChatActionItem {
6
8
  id: string;
@@ -18,8 +20,7 @@ export interface ChatDetailHeaderProps {
18
20
  subtitle?: string;
19
21
  avatarUri?: string | null;
20
22
  avatarFullName?: string;
21
- chatType?: DChatType;
22
- chatCategory?: DChatCategory;
23
+ peerType?: PeerType;
23
24
  applicationType?: DConversationItem['applicationType'];
24
25
  showAddMember?: boolean;
25
26
  onBack?: () => void;
@@ -48,10 +49,11 @@ export interface ChatAttachmentPanelProps {
48
49
  export interface ChatComposerProps {
49
50
  value?: string;
50
51
  placeholder?: string;
51
- onChangeText?: (text: string) => void;
52
- onSend?: () => void;
52
+ onChangeText?: (text?: string) => void;
53
+ onSend?: (urlMetadata?: IUrlMetadata) => void;
53
54
  onPressAttach?: () => void;
54
55
  onPressEmoji?: () => void;
56
+ onMessageSent?: (message: DMessageItem) => void;
55
57
  showQuickActions?: boolean;
56
58
  quickActions?: DChatQuickAction[];
57
59
  attachmentActions?: DChatAttachmentAction[];
@@ -73,16 +75,16 @@ export interface ChatListProps {
73
75
  onLoadNewer?: () => void;
74
76
  isLoadingNewer?: boolean;
75
77
  hasMoreNewer?: boolean;
78
+ onMediaPress?: (items: MediaItem[], index?: number) => void;
76
79
  }
77
- export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'chatType' | 'chatCategory' | 'applicationType' | 'showAddMember'> {
80
+ export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'peerType' | 'applicationType' | 'showAddMember'> {
78
81
  conversationId: string;
79
82
  enabled?: boolean;
80
83
  title?: string;
81
84
  subtitle?: string;
82
85
  avatarUri?: string | null;
83
86
  avatarFullName?: string;
84
- chatType?: DChatType;
85
- chatCategory?: DChatCategory;
87
+ peerType?: PeerType;
86
88
  applicationType?: DConversationItem['applicationType'];
87
89
  showAddMember?: boolean;
88
90
  getSubtitle?: (conversation: DConversationItem) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CA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CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACxD,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7D,iBAAiB,CAAC,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAC;IAC1D,kBAAkB,CAAC,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IACjE,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,22 @@
1
+ import type { Attachment } from '../../types/attachment';
2
+ import type { IAttachmentHandler } from '../../types/attachmentHandler';
3
+ interface FileElem {
4
+ uuid: string;
5
+ fileName: string;
6
+ fileSize: number;
7
+ fileType: string;
8
+ url: string;
9
+ }
10
+ export declare class FileAttachmentHandler implements IAttachmentHandler {
11
+ private static readonly MAX_FILE_SIZE;
12
+ validate(attachment: Attachment): {
13
+ valid: true;
14
+ } | {
15
+ valid: false;
16
+ reason: string;
17
+ };
18
+ buildPayload(attachment: Attachment, uploadedUrl: string): Promise<FileElem>;
19
+ }
20
+ declare const _default: FileAttachmentHandler;
21
+ export default _default;
22
+ //# sourceMappingURL=fileAttachmentHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileAttachmentHandler.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/fileAttachmentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,qBAAsB,YAAW,kBAAkB;IAC9D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAqB;IAE1D,QAAQ,CACN,UAAU,EAAE,UAAU,GACrB;QAAE,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAkC/C,YAAY,CAChB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,QAAQ,CAAC;CAsBrB;;AAED,wBAA2C"}
@@ -0,0 +1,3 @@
1
+ import type { IAttachmentHandler } from '../../types/attachmentHandler';
2
+ export declare const ImageAttachmentHandler: IAttachmentHandler;
3
+ //# sourceMappingURL=imageAttachmentHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageAttachmentHandler.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/imageAttachmentHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,eAAO,MAAM,sBAAsB,EAAE,kBAiDpC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function initializeAttachmentHandlers(): void;
2
+ export { ImageAttachmentHandler } from './imageAttachmentHandler';
3
+ export { default as VideoAttachmentHandler } from './videoAttachmentHandler';
4
+ export { default as FileAttachmentHandler } from './fileAttachmentHandler';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/index.ts"],"names":[],"mappings":"AAGA,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAED,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Attachment } from '../../types/attachment';
2
+ import type { IAttachmentHandler } from '../../types/attachmentHandler';
3
+ interface VideoPicInfo {
4
+ videoUUID: string;
5
+ videoType: string;
6
+ videoSize: number;
7
+ duration: number;
8
+ snapshotWidth: number;
9
+ snapshotHeight: number;
10
+ videoUrl: string;
11
+ videoPath: string;
12
+ snapshotPath: string;
13
+ snapshotUUID: string;
14
+ snapshotSize: number;
15
+ snapshotUrl: string;
16
+ snapShotType: string;
17
+ }
18
+ export declare class VideoAttachmentHandler implements IAttachmentHandler {
19
+ private static readonly MAX_VIDEO_SIZE;
20
+ private static readonly SUPPORTED_TYPES;
21
+ validate(attachment: Attachment): {
22
+ valid: true;
23
+ } | {
24
+ valid: false;
25
+ reason: string;
26
+ };
27
+ buildPayload(attachment: Attachment, uploadedUrl: string): Promise<VideoPicInfo>;
28
+ }
29
+ declare const _default: VideoAttachmentHandler;
30
+ export default _default;
31
+ //# sourceMappingURL=videoAttachmentHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoAttachmentHandler.d.ts","sourceRoot":"","sources":["../../../../../src/services/attachmentHandlers/videoAttachmentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,UAAU,YAAY;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,sBAAuB,YAAW,kBAAkB;IAC/D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAqB;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAoC;IAE3E,QAAQ,CACN,UAAU,EAAE,UAAU,GACrB;QAAE,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAqC/C,YAAY,CAChB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;CA8CzB;;AAED,wBAA4C"}
@@ -0,0 +1,5 @@
1
+ import type { Attachment, AttachmentSendOptions, AttachmentSendResult } from '../types/attachment';
2
+ export declare namespace AttachmentOrchestratorService {
3
+ function sendPreparedAttachments(attachments: Attachment[], uploadedUrls: Record<string, string>, options?: AttachmentSendOptions, onMessageSent?: (message: any) => void): Promise<AttachmentSendResult>;
4
+ }
5
+ //# sourceMappingURL=attachmentOrchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../../src/services/attachmentOrchestrator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAQ7B,yBAAiB,6BAA6B,CAAC;IAC7C,SAAsB,uBAAuB,CAC3C,WAAW,EAAE,UAAU,EAAE,EACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,GAAE,qBAAkD,EAC3D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GACrC,OAAO,CAAC,oBAAoB,CAAC,CA+F/B;CAyLF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Auth token management
3
+ * Consumer app calls setAuthToken() once at startup
4
+ * Library services call getAuthToken() internally
5
+ */
6
+ /**
7
+ * Set auth token (call once at app startup)
8
+ */
9
+ export declare const setAuthToken: (token: string) => void;
10
+ /**
11
+ * Get auth token (called internally by library services)
12
+ * @throws Error if token not set
13
+ */
14
+ export declare const getAuthToken: () => string;
15
+ /**
16
+ * Clear token (logout)
17
+ */
18
+ export declare const clearAuthToken: () => void;
19
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/services/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,SAEzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAO,MAO/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,YAE1B,CAAC"}
@@ -1,6 +1,16 @@
1
+ /**
2
+ * @deprecated Use config/api-endpoints.ts instead
3
+ * This file is kept for backward compatibility only.
4
+ * All endpoints should be managed through config/api-endpoints.ts
5
+ */
6
+ import { getApiEndpoint, setApiEndpoint, getAllApiEndpoints } from '../config/api-endpoints';
1
7
  export declare const ENDPOINTS: {
2
8
  chatService: {
3
- urlMetadata: string;
9
+ readonly urlMetadata: string;
10
+ };
11
+ uploaderService: {
12
+ readonly uploadImage: string;
4
13
  };
5
14
  };
15
+ export { getApiEndpoint, setApiEndpoint, getAllApiEndpoints };
6
16
  //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;CAIrB,CAAC"}
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,SAAS;;;;;;;CAWrB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ImageFile, UploadedImage, ImageUploadConfig } from '../types/imageUpload';
2
+ export declare namespace ImageUploadAPI {
3
+ const uploadImageFile: (file: ImageFile, onProgress?: (progress: number) => void) => Promise<UploadedImage>;
4
+ const uploadImageQueue: (files: ImageFile[], config?: ImageUploadConfig, onProgress?: (completed: number, total: number) => void) => Promise<UploadedImage[]>;
5
+ const cleanupImageFile: (filePath: string) => Promise<void>;
6
+ }
7
+ //# sourceMappingURL=imageUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageUpload.d.ts","sourceRoot":"","sources":["../../../../src/services/imageUpload.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B,yBAAiB,cAAc,CAAC;IACvB,MAAM,eAAe,GAC1B,MAAM,SAAS,EACf,aAAa,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,KACtC,OAAO,CAAC,aAAa,CA6FvB,CAAC;IAEK,MAAM,gBAAgB,GAC3B,OAAO,SAAS,EAAE,EAClB,SAAQ,iBAAsB,EAC9B,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,KACtD,OAAO,CAAC,aAAa,EAAE,CAqCzB,CAAC;IAEK,MAAM,gBAAgB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,IAAI,CAMrE,CAAC;CACH"}
@@ -0,0 +1,3 @@
1
+ import type { MessageStore } from '../types/chat';
2
+ export declare const useMessageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MessageStore>>;
3
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/store/message.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,eAAe,CAAC;AAGhE,eAAO,MAAM,eAAe,2EAsCzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;AAKA,wBAEE"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;AAyBA,wBAEE"}
@@ -0,0 +1,72 @@
1
+ export type AttachmentType = 'image' | 'video' | 'file' | 'audio';
2
+ export interface BaseAttachment {
3
+ id: string;
4
+ type: AttachmentType;
5
+ sourceFile: {
6
+ path: string;
7
+ filename: string;
8
+ size: number;
9
+ mimeType: string;
10
+ };
11
+ }
12
+ export interface ImageAttachment extends BaseAttachment {
13
+ type: 'image';
14
+ metadata: {
15
+ width: number;
16
+ height: number;
17
+ orientation?: 'portrait' | 'landscape' | 'square';
18
+ };
19
+ }
20
+ export interface VideoAttachment extends BaseAttachment {
21
+ type: 'video';
22
+ metadata: {
23
+ width: number;
24
+ height: number;
25
+ duration: number;
26
+ thumbnail?: {
27
+ url: string;
28
+ width: number;
29
+ height: number;
30
+ size?: number;
31
+ };
32
+ };
33
+ }
34
+ export interface FileAttachment extends BaseAttachment {
35
+ type: 'file';
36
+ metadata: {
37
+ extension: string;
38
+ category: 'document' | 'spreadsheet' | 'presentation' | 'other';
39
+ };
40
+ }
41
+ export interface AudioAttachment extends BaseAttachment {
42
+ type: 'audio';
43
+ metadata: {
44
+ duration: number;
45
+ bitrate?: number;
46
+ };
47
+ }
48
+ export type Attachment = ImageAttachment | VideoAttachment | FileAttachment | AudioAttachment;
49
+ export interface AttachmentUploadStatus {
50
+ attachmentId: string;
51
+ state: 'pending' | 'uploading' | 'uploaded' | 'failed' | 'cancelled';
52
+ progress: number;
53
+ uploadedUrl?: string;
54
+ error?: string;
55
+ uploadedAt?: number;
56
+ }
57
+ export type BatchStrategy = 'individual' | 'merged' | 'grouped';
58
+ export interface AttachmentSendOptions {
59
+ strategy: BatchStrategy;
60
+ includeCaption?: string;
61
+ uploadConcurrency?: number;
62
+ retryFailedUploads?: boolean;
63
+ maxRetries?: number;
64
+ }
65
+ export interface AttachmentSendResult {
66
+ success: boolean;
67
+ sentAttachmentIds: string[];
68
+ failedAttachmentIds: string[];
69
+ mergedMessageId?: string;
70
+ errors: Record<string, string>;
71
+ }
72
+ //# sourceMappingURL=attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../src/types/attachment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;KACnD,CA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AAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC"}
@@ -0,0 +1,13 @@
1
+ import type { Attachment } from './attachment';
2
+ export interface IAttachmentHandler {
3
+ validate(attachment: Attachment): {
4
+ valid: true;
5
+ } | {
6
+ valid: false;
7
+ reason: string;
8
+ };
9
+ prepare?(attachment: Attachment): Promise<Attachment>;
10
+ buildPayload(attachment: Attachment, uploadedUrl: string): Promise<unknown>;
11
+ }
12
+ export declare function getAttachmentHandler(type: Attachment['type']): IAttachmentHandler;
13
+ //# sourceMappingURL=attachmentHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachmentHandler.d.ts","sourceRoot":"","sources":["../../../../src/types/attachmentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM/C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CACN,UAAU,EAAE,UAAU,GACrB;QAAE,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAEtD,OAAO,CAAC,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtD,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7E;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,GACvB,kBAAkB,CAYpB"}
@@ -1,5 +1,6 @@
1
- import { type MessageItem, type SessionType, type MessageReceiveOptType, type GroupAtType } from '@droppii/openim-rn-client-sdk';
1
+ import { type MessageItem, type ConversationItem, PeerType } from '@droppii/openim-rn-client-sdk';
2
2
  import type { PropsWithChildren } from 'react';
3
+ import type { IUrlMetadata } from './common';
3
4
  export declare const EventProvider: {
4
5
  readonly ga: "ga";
5
6
  readonly appsflyer: "appsflyer";
@@ -8,14 +9,15 @@ export declare const EventProvider: {
8
9
  type LogGA = (event: string, params?: any, provider?: `${keyof typeof EventProvider}`) => void;
9
10
  export interface ChatContextType {
10
11
  logGA?: LogGA;
12
+ applicationType: DChatApplicationType;
11
13
  }
12
14
  export type ChatProviderProps = PropsWithChildren<{
13
- enabled?: boolean;
14
15
  logGA?: LogGA;
16
+ applicationType: DChatApplicationType;
15
17
  }>;
16
18
  export declare enum DChatApplicationType {
17
- BIZ = "BIZ",
18
- MALL = "MALL"
19
+ DROPPII = "DROPPII",
20
+ OBEFE = "OBEFE"
19
21
  }
20
22
  export declare enum DChatCategory {
21
23
  BIZ_BIZ = "BIZ_BIZ",
@@ -24,10 +26,6 @@ export declare enum DChatCategory {
24
26
  BIZ_BOT_PDP = "BIZ_BOT_PDP",
25
27
  BIZ_BOT_CRM = "BIZ_BOT_CRM"
26
28
  }
27
- export declare enum DChatType {
28
- SINGLE = "SINGLE",
29
- GROUP = "GROUP"
30
- }
31
29
  export declare enum DMemberRole {
32
30
  AGENT = "AGENT",
33
31
  MEMBER = "MEMBER"
@@ -45,33 +43,16 @@ export interface DConversationPeer {
45
43
  user: DConversationPeerUser | null;
46
44
  group: null;
47
45
  }
48
- export interface DConversationItem {
46
+ export interface DConversationItem extends ConversationItem {
49
47
  conversationId: string;
50
48
  chatCategory: DChatCategory;
51
- chatType: DChatType;
49
+ chatType: PeerType;
52
50
  applicationType: string;
53
51
  memberRole: DMemberRole;
54
52
  pinnedAt: string | null;
55
53
  isMuted: boolean;
56
54
  peer: DConversationPeerUser;
57
55
  lastMessage?: DMessageItem;
58
- unreadCount?: number;
59
- conversationType?: SessionType;
60
- userID?: string;
61
- groupID?: string;
62
- showName?: string;
63
- faceURL?: string;
64
- recvMsgOpt?: MessageReceiveOptType;
65
- groupAtType?: GroupAtType;
66
- latestMsgSendTime?: number;
67
- draftText?: string;
68
- draftTextTime?: number;
69
- isPinned?: boolean;
70
- isNotInGroup?: boolean;
71
- isPrivateChat?: boolean;
72
- isMsgDestruct?: boolean;
73
- attachedInfo?: string;
74
- ex?: string;
75
56
  }
76
57
  export interface DConversationQueryParams {
77
58
  applicationType: string;
@@ -107,5 +88,25 @@ export interface DMessagePushInfoEx {
107
88
  title: string;
108
89
  desc: string;
109
90
  }
91
+ export interface IMessageItemEx {
92
+ applicationType: DChatApplicationType;
93
+ sessionId?: string;
94
+ messageInfo?: {
95
+ type: 'MESSAGE_INFO';
96
+ data: 'rich_text';
97
+ content: string;
98
+ };
99
+ urlMetadata?: IUrlMetadata;
100
+ }
101
+ export interface MessageStore {
102
+ messages: DMessageItem[];
103
+ hasMoreEarlier: boolean;
104
+ hasMoreNewer: boolean;
105
+ setMessages: (messages: DMessageItem[], hasMore: boolean) => void;
106
+ pushNewMessage: (message: MessageItem) => void;
107
+ updateOneMessage: (message: MessageItem) => void;
108
+ deleteOneMessage: (clientMsgID: string) => void;
109
+ reset: () => void;
110
+ }
110
111
  export {};
111
112
  //# sourceMappingURL=chat.d.ts.map