@droppii-org/chat-mobile 0.2.7 → 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.
- package/lib/module/components/AttachmentPreview.js +250 -0
- package/lib/module/components/AttachmentPreview.js.map +1 -0
- package/lib/module/components/MediaViewer/index.js +2 -0
- package/lib/module/components/MediaViewer/index.js.map +1 -0
- package/lib/module/components/MediaViewerModal.js +57 -0
- package/lib/module/components/MediaViewerModal.js.map +1 -0
- package/lib/module/components/MergedImageGrid.js +173 -0
- package/lib/module/components/MergedImageGrid.js.map +1 -0
- package/lib/module/components/ThreadCard/thread-card.utils.js +80 -4
- package/lib/module/components/ThreadCard/thread-card.utils.js.map +1 -1
- package/lib/module/components/messages/fileMessage/index.js +26 -0
- package/lib/module/components/messages/fileMessage/index.js.map +1 -0
- package/lib/module/components/messages/imageMessage/index.js +118 -0
- package/lib/module/components/messages/imageMessage/index.js.map +1 -0
- package/lib/module/components/messages/linkMessage/index.js +122 -0
- package/lib/module/components/messages/linkMessage/index.js.map +1 -0
- package/lib/module/components/messages/mergedMessage/index.js +37 -0
- package/lib/module/components/messages/mergedMessage/index.js.map +1 -0
- package/lib/module/components/messages/styles.js +41 -0
- package/lib/module/components/messages/styles.js.map +1 -0
- package/lib/module/components/messages/textMessage/index.js +38 -0
- package/lib/module/components/messages/textMessage/index.js.map +1 -0
- package/lib/module/components/messages/types.js +14 -0
- package/lib/module/components/messages/types.js.map +1 -0
- package/lib/module/components/messages/videoMessage/index.js +110 -0
- package/lib/module/components/messages/videoMessage/index.js.map +1 -0
- package/lib/module/config/api-endpoints.js +66 -0
- package/lib/module/config/api-endpoints.js.map +1 -0
- package/lib/module/config/attachment-priority.js +81 -0
- package/lib/module/config/attachment-priority.js.map +1 -0
- package/lib/module/config/configuration.js +50 -0
- package/lib/module/config/configuration.js.map +1 -0
- package/lib/module/config/index.js +22 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/core/index.js +19 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/useChatListener.js +0 -14
- package/lib/module/core/useChatListener.js.map +1 -1
- package/lib/module/hooks/message/useSendMessage.js +10 -5
- package/lib/module/hooks/message/useSendMessage.js.map +1 -1
- package/lib/module/hooks/useChatMessages.js +0 -3
- package/lib/module/hooks/useChatMessages.js.map +1 -1
- package/lib/module/hooks/useImageAttachment.js +263 -0
- package/lib/module/hooks/useImageAttachment.js.map +1 -0
- package/lib/module/hooks/useMediaViewer.js +24 -0
- package/lib/module/hooks/useMediaViewer.js.map +1 -0
- package/lib/module/hooks/useSendAttachment.js +182 -0
- package/lib/module/hooks/useSendAttachment.js.map +1 -0
- package/lib/module/hooks/useVideoAttachment.js +251 -0
- package/lib/module/hooks/useVideoAttachment.js.map +1 -0
- package/lib/module/index.js +13 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/MediaView/VideoPlayer.js +177 -0
- package/lib/module/screens/MediaView/VideoPlayer.js.map +1 -0
- package/lib/module/screens/MediaView/index.js +264 -0
- package/lib/module/screens/MediaView/index.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatComposer.js +190 -196
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +94 -63
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +5 -13
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
- package/lib/module/screens/chat-detail/components/ChatInputActions.js +51 -0
- package/lib/module/screens/chat-detail/components/ChatInputActions.js.map +1 -0
- package/lib/module/screens/chat-detail/components/ChatMessageInput.js +93 -0
- package/lib/module/screens/chat-detail/components/ChatMessageInput.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js +221 -0
- package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js +114 -0
- package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useChatComposerState.js +26 -0
- package/lib/module/screens/chat-detail/hooks/useChatComposerState.js.map +1 -0
- package/lib/module/screens/chat-detail/index.js +0 -1
- package/lib/module/screens/chat-detail/index.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +33 -13
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/messageTypes.js +15 -0
- package/lib/module/screens/chat-detail/legend/messageTypes.js.map +1 -0
- package/lib/module/screens/inbox/MessagesTab.js.map +1 -1
- package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js +61 -0
- package/lib/module/services/attachmentHandlers/fileAttachmentHandler.js.map +1 -0
- package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js +54 -0
- package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js.map +1 -0
- package/lib/module/services/attachmentHandlers/index.js +12 -0
- package/lib/module/services/attachmentHandlers/index.js.map +1 -0
- package/lib/module/services/attachmentHandlers/videoAttachmentHandler.js +85 -0
- package/lib/module/services/attachmentHandlers/videoAttachmentHandler.js.map +1 -0
- package/lib/module/services/attachmentOrchestrator.js +225 -0
- package/lib/module/services/attachmentOrchestrator.js.map +1 -0
- package/lib/module/services/auth.js +35 -0
- package/lib/module/services/auth.js.map +1 -0
- package/lib/module/services/endpoints.js +20 -1
- package/lib/module/services/endpoints.js.map +1 -1
- package/lib/module/services/imageUpload.js +126 -0
- package/lib/module/services/imageUpload.js.map +1 -0
- package/lib/module/translation/resources/i18n.js +22 -8
- package/lib/module/translation/resources/i18n.js.map +1 -1
- package/lib/module/types/attachment.js +2 -0
- package/lib/module/types/attachment.js.map +1 -0
- package/lib/module/types/attachmentHandler.js +20 -0
- package/lib/module/types/attachmentHandler.js.map +1 -0
- package/lib/module/types/imageUpload.js +2 -0
- package/lib/module/types/imageUpload.js.map +1 -0
- package/lib/module/types/message.js +1 -0
- package/lib/module/types/message.js.map +1 -1
- package/lib/module/utils/chatImageDimens.js +148 -0
- package/lib/module/utils/chatImageDimens.js.map +1 -0
- package/lib/module/utils/device.js +65 -0
- package/lib/module/utils/device.js.map +1 -0
- package/lib/module/utils/imageUrlOptimizer.js +41 -0
- package/lib/module/utils/imageUrlOptimizer.js.map +1 -0
- package/lib/module/utils/imageUtils.js +69 -0
- package/lib/module/utils/imageUtils.js.map +1 -0
- package/lib/module/utils/resolveMessageType.js +3 -0
- package/lib/module/utils/resolveMessageType.js.map +1 -1
- package/lib/module/utils/ui.js +17 -0
- package/lib/module/utils/ui.js.map +1 -0
- package/lib/module/utils/url.js +1 -1
- package/lib/module/utils/url.js.map +1 -1
- package/lib/module/utils/videoThumbnail.js +62 -0
- package/lib/module/utils/videoThumbnail.js.map +1 -0
- package/lib/typescript/src/components/AttachmentPreview.d.ts +28 -0
- package/lib/typescript/src/components/AttachmentPreview.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaViewer/index.d.ts +1 -0
- package/lib/typescript/src/components/MediaViewer/index.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaViewerModal.d.ts +10 -0
- package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -0
- package/lib/typescript/src/components/MergedImageGrid.d.ts +16 -0
- package/lib/typescript/src/components/MergedImageGrid.d.ts.map +1 -0
- package/lib/typescript/src/components/ThreadCard/thread-card.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/fileMessage/index.d.ts +3 -0
- package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/imageMessage/index.d.ts +3 -0
- package/lib/typescript/src/components/messages/imageMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/linkMessage/index.d.ts +9 -0
- package/lib/typescript/src/components/messages/linkMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/mergedMessage/index.d.ts +3 -0
- package/lib/typescript/src/components/messages/mergedMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/styles.d.ts +36 -0
- package/lib/typescript/src/components/messages/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/textMessage/index.d.ts +9 -0
- package/lib/typescript/src/components/messages/textMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/types.d.ts +10 -0
- package/lib/typescript/src/components/messages/types.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/videoMessage/index.d.ts +3 -0
- package/lib/typescript/src/components/messages/videoMessage/index.d.ts.map +1 -0
- package/lib/typescript/src/config/api-endpoints.d.ts +40 -0
- package/lib/typescript/src/config/api-endpoints.d.ts.map +1 -0
- package/lib/typescript/src/config/attachment-priority.d.ts +31 -0
- package/lib/typescript/src/config/attachment-priority.d.ts.map +1 -0
- package/lib/typescript/src/config/configuration.d.ts +30 -0
- package/lib/typescript/src/config/configuration.d.ts.map +1 -0
- package/lib/typescript/src/config/index.d.ts +15 -0
- package/lib/typescript/src/config/index.d.ts.map +1 -0
- package/lib/typescript/src/core/index.d.ts +13 -1
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useChatMessages.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useImageAttachment.d.ts +20 -0
- package/lib/typescript/src/hooks/useImageAttachment.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useMediaViewer.d.ts +13 -0
- package/lib/typescript/src/hooks/useMediaViewer.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSendAttachment.d.ts +59 -0
- package/lib/typescript/src/hooks/useSendAttachment.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useVideoAttachment.d.ts +29 -0
- package/lib/typescript/src/hooks/useVideoAttachment.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +14 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/MediaView/VideoPlayer.d.ts +12 -0
- package/lib/typescript/src/screens/MediaView/VideoPlayer.d.ts.map +1 -0
- package/lib/typescript/src/screens/MediaView/index.d.ts +11 -0
- package/lib/typescript/src/screens/MediaView/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/components/ChatInputActions.d.ts +8 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatInputActions.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatMessageInput.d.ts +15 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatMessageInput.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts +23 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts +15 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts +13 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/index.d.ts +0 -2
- package/lib/typescript/src/screens/chat-detail/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +3 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/messageTypes.d.ts +13 -0
- package/lib/typescript/src/screens/chat-detail/legend/messageTypes.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/types.d.ts +4 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts +22 -0
- package/lib/typescript/src/services/attachmentHandlers/fileAttachmentHandler.d.ts.map +1 -0
- package/lib/typescript/src/services/attachmentHandlers/imageAttachmentHandler.d.ts +3 -0
- package/lib/typescript/src/services/attachmentHandlers/imageAttachmentHandler.d.ts.map +1 -0
- package/lib/typescript/src/services/attachmentHandlers/index.d.ts +5 -0
- package/lib/typescript/src/services/attachmentHandlers/index.d.ts.map +1 -0
- package/lib/typescript/src/services/attachmentHandlers/videoAttachmentHandler.d.ts +31 -0
- package/lib/typescript/src/services/attachmentHandlers/videoAttachmentHandler.d.ts.map +1 -0
- package/lib/typescript/src/services/attachmentOrchestrator.d.ts +5 -0
- package/lib/typescript/src/services/attachmentOrchestrator.d.ts.map +1 -0
- package/lib/typescript/src/services/auth.d.ts +19 -0
- package/lib/typescript/src/services/auth.d.ts.map +1 -0
- package/lib/typescript/src/services/endpoints.d.ts +11 -1
- package/lib/typescript/src/services/endpoints.d.ts.map +1 -1
- package/lib/typescript/src/services/imageUpload.d.ts +7 -0
- package/lib/typescript/src/services/imageUpload.d.ts.map +1 -0
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
- package/lib/typescript/src/types/attachment.d.ts +72 -0
- package/lib/typescript/src/types/attachment.d.ts.map +1 -0
- package/lib/typescript/src/types/attachmentHandler.d.ts +13 -0
- package/lib/typescript/src/types/attachmentHandler.d.ts.map +1 -0
- package/lib/typescript/src/types/imageUpload.d.ts +26 -0
- package/lib/typescript/src/types/imageUpload.d.ts.map +1 -0
- package/lib/typescript/src/types/message.d.ts +1 -0
- package/lib/typescript/src/types/message.d.ts.map +1 -1
- package/lib/typescript/src/utils/chatImageDimens.d.ts +34 -0
- package/lib/typescript/src/utils/chatImageDimens.d.ts.map +1 -0
- package/lib/typescript/src/utils/device.d.ts +7 -0
- package/lib/typescript/src/utils/device.d.ts.map +1 -0
- package/lib/typescript/src/utils/imageUrlOptimizer.d.ts +12 -0
- package/lib/typescript/src/utils/imageUrlOptimizer.d.ts.map +1 -0
- package/lib/typescript/src/utils/imageUtils.d.ts +9 -0
- package/lib/typescript/src/utils/imageUtils.d.ts.map +1 -0
- package/lib/typescript/src/utils/resolveMessageType.d.ts.map +1 -1
- package/lib/typescript/src/utils/ui.d.ts +13 -0
- package/lib/typescript/src/utils/ui.d.ts.map +1 -0
- package/lib/typescript/src/utils/videoThumbnail.d.ts +16 -0
- package/lib/typescript/src/utils/videoThumbnail.d.ts.map +1 -0
- package/package.json +15 -3
- package/src/components/AttachmentPreview.tsx +304 -0
- package/src/components/MediaViewer/index.tsx +0 -0
- package/src/components/MediaViewerModal.tsx +70 -0
- package/src/components/MergedImageGrid.tsx +238 -0
- package/src/components/ThreadCard/thread-card.utils.ts +95 -4
- package/src/components/messages/fileMessage/index.tsx +30 -0
- package/src/components/messages/imageMessage/index.tsx +137 -0
- package/src/components/messages/linkMessage/index.tsx +162 -0
- package/src/components/messages/mergedMessage/index.tsx +45 -0
- package/src/components/messages/styles.ts +39 -0
- package/src/components/messages/textMessage/index.tsx +53 -0
- package/src/components/messages/types.ts +22 -0
- package/src/components/messages/videoMessage/index.tsx +120 -0
- package/src/config/api-endpoints.ts +72 -0
- package/src/config/attachment-priority.ts +93 -0
- package/src/config/configuration.ts +50 -0
- package/src/config/index.ts +19 -0
- package/src/core/index.ts +25 -1
- package/src/core/useChatListener.ts +0 -21
- package/src/hooks/message/useSendMessage.ts +12 -5
- package/src/hooks/useChatMessages.ts +0 -4
- package/src/hooks/useImageAttachment.ts +348 -0
- package/src/hooks/useMediaViewer.ts +32 -0
- package/src/hooks/useSendAttachment.ts +295 -0
- package/src/hooks/useVideoAttachment.ts +334 -0
- package/src/index.tsx +13 -1
- package/src/screens/MediaView/VideoPlayer.tsx +211 -0
- package/src/screens/MediaView/index.tsx +327 -0
- package/src/screens/chat-detail/ChatComposer.tsx +206 -271
- package/src/screens/chat-detail/ChatDetail.tsx +142 -89
- package/src/screens/chat-detail/ChatListLegend.tsx +9 -11
- package/src/screens/chat-detail/components/ChatInputActions.tsx +71 -0
- package/src/screens/chat-detail/components/ChatMessageInput.tsx +127 -0
- package/src/screens/chat-detail/hooks/useAttachmentSendHandler.ts +291 -0
- package/src/screens/chat-detail/hooks/useChatComposerAnimation.ts +184 -0
- package/src/screens/chat-detail/hooks/useChatComposerState.ts +40 -0
- package/src/screens/chat-detail/index.ts +0 -2
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +47 -24
- package/src/screens/chat-detail/legend/messageTypes.tsx +13 -0
- package/src/screens/chat-detail/types.ts +5 -1
- package/src/screens/inbox/MessagesTab.tsx +1 -1
- package/src/services/attachmentHandlers/fileAttachmentHandler.ts +78 -0
- package/src/services/attachmentHandlers/imageAttachmentHandler.ts +54 -0
- package/src/services/attachmentHandlers/index.ts +10 -0
- package/src/services/attachmentHandlers/videoAttachmentHandler.ts +114 -0
- package/src/services/attachmentOrchestrator.ts +300 -0
- package/src/services/auth.ts +34 -0
- package/src/services/endpoints.ts +24 -1
- package/src/services/imageUpload.ts +162 -0
- package/src/translation/resources/i18n.ts +22 -8
- package/src/types/attachment.ts +85 -0
- package/src/types/attachmentHandler.ts +31 -0
- package/src/types/imageUpload.ts +28 -0
- package/src/types/message.ts +1 -0
- package/src/utils/chatImageDimens.ts +178 -0
- package/src/utils/device.ts +73 -0
- package/src/utils/imageUrlOptimizer.ts +56 -0
- package/src/utils/imageUtils.ts +76 -0
- package/src/utils/resolveMessageType.ts +2 -0
- package/src/utils/ui.ts +19 -0
- package/src/utils/url.ts +1 -1
- package/src/utils/videoThumbnail.ts +85 -0
- package/lib/module/screens/chat-detail/ChatList.js +0 -147
- package/lib/module/screens/chat-detail/ChatList.js.map +0 -1
- package/lib/module/screens/chat-detail/ChatTextBubble.js +0 -62
- package/lib/module/screens/chat-detail/ChatTextBubble.js.map +0 -1
- package/lib/module/screens/chat-detail/legend/message-types.js +0 -244
- package/lib/module/screens/chat-detail/legend/message-types.js.map +0 -1
- package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js +0 -24
- package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js.map +0 -1
- package/lib/module/screens/chat-detail/messages/types.js +0 -4
- package/lib/module/screens/chat-detail/messages/types.js.map +0 -1
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts +0 -3
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts.map +0 -1
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts +0 -3
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts.map +0 -1
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts +0 -13
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts.map +0 -1
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts +0 -3
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts.map +0 -1
- package/lib/typescript/src/screens/chat-detail/messages/types.d.ts +0 -13
- package/lib/typescript/src/screens/chat-detail/messages/types.d.ts.map +0 -1
- package/src/screens/chat-detail/ChatList.tsx +0 -190
- package/src/screens/chat-detail/ChatTextBubble.tsx +0 -73
- package/src/screens/chat-detail/legend/message-types.tsx +0 -304
- package/src/screens/chat-detail/messages/ChatMessageBubble.tsx +0 -23
- package/src/screens/chat-detail/messages/types.ts +0 -14
|
@@ -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,
|
|
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,13 +1,15 @@
|
|
|
1
1
|
import type { DMessageItem } from '../../../types/chat';
|
|
2
|
+
import type { MediaItem } from '../../../hooks/useMediaViewer';
|
|
2
3
|
interface LegendChatMessageProps {
|
|
3
4
|
message: DMessageItem;
|
|
4
5
|
isOutgoing: boolean;
|
|
5
6
|
createdAtTime: number;
|
|
7
|
+
onMediaPress?: (items: MediaItem[], index?: number) => void;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* Dispatcher component - renders the appropriate message component
|
|
9
11
|
* based on message type. Extensible for new message types.
|
|
10
12
|
*/
|
|
11
|
-
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
13
|
+
export declare const LegendChatMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onMediaPress, }: LegendChatMessageProps) => import("react").JSX.Element>;
|
|
12
14
|
export {};
|
|
13
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":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,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,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MediaItem } from '../../hooks/useMediaViewer';
|
|
2
3
|
import type { DConversationItem, DMessageItem } from '../../types/chat';
|
|
3
4
|
import type { IUrlMetadata } from '../../types/common';
|
|
4
5
|
import type { PeerType } from '@droppii/openim-rn-client-sdk';
|
|
@@ -48,10 +49,11 @@ export interface ChatAttachmentPanelProps {
|
|
|
48
49
|
export interface ChatComposerProps {
|
|
49
50
|
value?: string;
|
|
50
51
|
placeholder?: string;
|
|
51
|
-
onChangeText?: (text
|
|
52
|
+
onChangeText?: (text?: string) => void;
|
|
52
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,6 +75,7 @@ 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
80
|
export interface ChatDetailProps extends Omit<ChatDetailHeaderProps, 'title' | 'subtitle' | 'avatarUri' | 'avatarFullName' | 'peerType' | 'applicationType' | 'showAddMember'> {
|
|
78
81
|
conversationId: string;
|
|
@@ -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,CAAC;
|
|
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,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MA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,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 @@
|
|
|
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
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;
|
|
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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AAED,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,eAAe,GACf,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ImageFile {
|
|
2
|
+
path: string;
|
|
3
|
+
filename: string;
|
|
4
|
+
size: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
mime: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UploadedImage {
|
|
10
|
+
url: string;
|
|
11
|
+
name: string;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
size: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ImageUploadConfig {
|
|
17
|
+
maxConcurrent?: number;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
retryAttempts?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface UploadProgress {
|
|
22
|
+
completed: number;
|
|
23
|
+
total: number;
|
|
24
|
+
percentage: number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=imageUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageUpload.d.ts","sourceRoot":"","sources":["../../../../src/types/imageUpload.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/message.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/message.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat-specific image dimensions for optimal display and memory usage
|
|
3
|
+
* Responsive to device type (tablet/mobile) and pixel ratio
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CHAT_IMAGE_VIEW_SOURCE {
|
|
6
|
+
MessageListThumbnail = "MessageListThumbnail",
|
|
7
|
+
MessageDetailBubble = "MessageDetailBubble",
|
|
8
|
+
ImagePreviewSmall = "ImagePreviewSmall",
|
|
9
|
+
ImagePreviewMedium = "ImagePreviewMedium",
|
|
10
|
+
ImagePreviewLarge = "ImagePreviewLarge"
|
|
11
|
+
}
|
|
12
|
+
interface ImageDimension {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
declare class ChatImageDimens {
|
|
17
|
+
private static instance;
|
|
18
|
+
private static factor;
|
|
19
|
+
private static regexCDN;
|
|
20
|
+
private static dimens;
|
|
21
|
+
constructor(factor: number);
|
|
22
|
+
private calculateDimensions;
|
|
23
|
+
static getInstance(): ChatImageDimens;
|
|
24
|
+
static updateFactor(factor: number): void;
|
|
25
|
+
static getDimensions(source: CHAT_IMAGE_VIEW_SOURCE): ImageDimension;
|
|
26
|
+
static getOptimizedImageUrl(url: string | undefined, source: CHAT_IMAGE_VIEW_SOURCE): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get optimized image URL with custom dimensions (generic approach)
|
|
29
|
+
* Useful for dynamic sizing based on actual content
|
|
30
|
+
*/
|
|
31
|
+
static getOptimizedImageUrlWithDimensions(url: string | undefined, width: number, height: number): string;
|
|
32
|
+
}
|
|
33
|
+
export default ChatImageDimens;
|
|
34
|
+
//# sourceMappingURL=chatImageDimens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatImageDimens.d.ts","sourceRoot":"","sources":["../../../../src/utils/chatImageDimens.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,oBAAY,sBAAsB;IAChC,oBAAoB,yBAAyB;IAC7C,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,iBAAiB,sBAAsB;CACxC;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAsDD,cAAM,eAAe;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAa;IAClC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAuC;IAC9D,OAAO,CAAC,MAAM,CAAC,MAAM,CAE4B;gBAErC,MAAM,EAAE,MAAM;IAK1B,OAAO,CAAC,mBAAmB;WAeb,WAAW;WAOX,YAAY,CAAC,MAAM,EAAE,MAAM;WAO3B,aAAa,CAAC,MAAM,EAAE,sBAAsB,GAAG,cAAc;WAO7D,oBAAoB,CAChC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,sBAAsB,GAC7B,MAAM;IAaT;;;OAGG;WACW,kCAAkC,CAC9C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,MAAM;CA6BV;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const DeviceUtils: {
|
|
2
|
+
openImagePicker: (multiple?: boolean) => Promise<(import("react-native-image-crop-picker").Image & any[]) | (import("react-native-image-crop-picker").Video & any[]) | import("react-native-image-crop-picker").ImageOrVideo[]>;
|
|
3
|
+
openVideoPicker: (multiple?: boolean) => Promise<(import("react-native-image-crop-picker").Video & any[]) | import("react-native-image-crop-picker").Video[]>;
|
|
4
|
+
};
|
|
5
|
+
export default DeviceUtils;
|
|
6
|
+
export { DeviceUtils };
|
|
7
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../src/utils/device.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW;iCACmB,OAAO;iCAkCP,OAAO;CAgC1C,CAAC;AAEF,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimize image URLs for chat by resizing and converting to WebP
|
|
3
|
+
* Reduces memory usage and improves loading performance
|
|
4
|
+
*/
|
|
5
|
+
interface OptimizeImageUrlOptions {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
convertToWebp?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const optimizeImageUrl: (url: string | undefined, options?: OptimizeImageUrlOptions) => string;
|
|
11
|
+
export default optimizeImageUrl;
|
|
12
|
+
//# sourceMappingURL=imageUrlOptimizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageUrlOptimizer.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageUrlOptimizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAOD,eAAO,MAAM,gBAAgB,GAC3B,KAAK,MAAM,GAAG,SAAS,EACvB,UAAS,uBAA4B,KACpC,MAkCF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ImageFile } from '../types/imageUpload';
|
|
2
|
+
export declare const generateUUID: () => string;
|
|
3
|
+
export declare const isVideoFile: (filename: string | undefined) => boolean;
|
|
4
|
+
export declare const isVideoFromPicker: (pickedItem: any) => boolean;
|
|
5
|
+
export declare const getMimeType: (fileName: string) => string;
|
|
6
|
+
export declare const formatFileSize: (bytes: number) => string;
|
|
7
|
+
export declare const validateImageFile: (file: ImageFile) => string | null;
|
|
8
|
+
export declare const getImageUploadEndpoint: (baseUrl: string) => string;
|
|
9
|
+
//# sourceMappingURL=imageUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,eAAO,MAAM,YAAY,QAAO,MAE/B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,OAI1D,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,YAAY,GAAG,KAAG,OAInD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MA6B9C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAM9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,KAAG,MAAM,GAAG,IAa5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,MAExD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMessageType.d.ts","sourceRoot":"","sources":["../../../../src/utils/resolveMessageType.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAA4B,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgB9E,eAAO,MAAM,sBAAsB,GACjC,SAAS,YAAY,KACpB,
|
|
1
|
+
{"version":3,"file":"resolveMessageType.d.ts","sourceRoot":"","sources":["../../../../src/utils/resolveMessageType.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAA4B,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgB9E,eAAO,MAAM,sBAAsB,GACjC,SAAS,YAAY,KACpB,gBA8BF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface ToastConfig {
|
|
2
|
+
title?: string;
|
|
3
|
+
message?: string;
|
|
4
|
+
theme?: 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
}
|
|
6
|
+
declare const UIUtils: {
|
|
7
|
+
toast: {
|
|
8
|
+
open: (config: ToastConfig) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default UIUtils;
|
|
12
|
+
export { UIUtils };
|
|
13
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/utils/ui.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACnD;AAED,QAAA,MAAM,OAAO;;uBAEM,WAAW;;CAK7B,CAAC;AAEF,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface ThumbnailOptions {
|
|
2
|
+
time?: number;
|
|
3
|
+
quality?: number;
|
|
4
|
+
}
|
|
5
|
+
interface ThumbnailResult {
|
|
6
|
+
path: string;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const VideoThumbnailUtil: {
|
|
11
|
+
generateThumbnail: (videoPath: string, options?: ThumbnailOptions) => Promise<ThumbnailResult | null>;
|
|
12
|
+
cleanupThumbnail: (thumbnailPath: string) => Promise<void>;
|
|
13
|
+
batchGenerateThumbnails: (videoPaths: string[], options?: ThumbnailOptions) => Promise<ThumbnailResult[]>;
|
|
14
|
+
};
|
|
15
|
+
export default VideoThumbnailUtil;
|
|
16
|
+
//# sourceMappingURL=videoThumbnail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoThumbnail.d.ts","sourceRoot":"","sources":["../../../../src/utils/videoThumbnail.ts"],"names":[],"mappings":"AAGA,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB;mCAEhB,MAAM,YACR,gBAAgB,KACxB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;sCAoCM,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;0CAWhD,MAAM,EAAE,YACX,gBAAgB,KACxB,OAAO,CAAC,eAAe,EAAE,CAAC;CAe9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droppii-org/chat-mobile",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Droppii chat mobile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"example": "yarn workspace @droppii-org/chat-mobile-example",
|
|
60
60
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
61
61
|
"prepare": "bob build",
|
|
62
|
+
"postinstall": "patch-package",
|
|
62
63
|
"typecheck": "tsc -p tsconfig.build.json 2>&1 | grep -E 'src/.*error' || echo 'Typecheck passed (external dependency warnings ignored)'",
|
|
63
64
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
64
65
|
"test": "jest",
|
|
@@ -71,10 +72,17 @@
|
|
|
71
72
|
"@legendapp/list": "^3.0.6",
|
|
72
73
|
"axios": "^1.16.1",
|
|
73
74
|
"lodash": "^4.18.1",
|
|
75
|
+
"react-native-blob-util": "^0.24.10",
|
|
76
|
+
"react-native-create-thumbnail": "^2.2.0",
|
|
74
77
|
"react-native-fs": "^2.20.0",
|
|
75
78
|
"react-native-gifted-chat": "^3.3.3",
|
|
79
|
+
"react-native-image-crop-picker": "^0.51.1",
|
|
76
80
|
"react-native-permissions": "^5.6.0",
|
|
77
|
-
"react-native-
|
|
81
|
+
"react-native-photo-view": "git+ssh://git@github.com/droppii/react-native-photo-view.git",
|
|
82
|
+
"react-native-snap-carousel": "3.9.0",
|
|
83
|
+
"react-native-tab-view": "^4.3.1",
|
|
84
|
+
"react-native-video": "6.19.2",
|
|
85
|
+
"uuid": "^9.0.0"
|
|
78
86
|
},
|
|
79
87
|
"devDependencies": {
|
|
80
88
|
"@commitlint/config-conventional": "^20.5.0",
|
|
@@ -93,15 +101,19 @@
|
|
|
93
101
|
"@types/lodash": "^4",
|
|
94
102
|
"@types/react": "^19.2.0",
|
|
95
103
|
"@types/react-native": "^0.73.0",
|
|
104
|
+
"@types/react-native-photo-view": "^1.5.4",
|
|
105
|
+
"@types/react-native-snap-carousel": "^3.8.5",
|
|
96
106
|
"@types/react-query": "^1.2.9",
|
|
97
107
|
"commitlint": "^20.5.0",
|
|
98
108
|
"del-cli": "^7.0.0",
|
|
109
|
+
"deprecated-react-native-prop-types": "5.0.0",
|
|
99
110
|
"eslint": "^9.39.4",
|
|
100
111
|
"eslint-config-prettier": "^10.1.8",
|
|
101
112
|
"eslint-plugin-ft-flow": "^3.0.11",
|
|
102
113
|
"eslint-plugin-prettier": "^5.5.5",
|
|
103
114
|
"jest": "^30.3.0",
|
|
104
115
|
"lefthook": "^2.1.4",
|
|
116
|
+
"patch-package": "^8.0.1",
|
|
105
117
|
"prettier": "^3.8.1",
|
|
106
118
|
"react-native": "^0.86.0",
|
|
107
119
|
"react-native-builder-bob": "^0.41.0",
|
|
@@ -209,4 +221,4 @@
|
|
|
209
221
|
],
|
|
210
222
|
"version": "0.62.0"
|
|
211
223
|
}
|
|
212
|
-
}
|
|
224
|
+
}
|