stream-chat-react-native-core 4.5.0 → 4.6.0
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/README.md +3 -3
- package/lib/commonjs/components/Attachment/FileIcon.js +9 -1
- package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +232 -48
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +39 -21
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +129 -44
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +25 -9
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +15 -8
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.md +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.md +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.md +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.md +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +10 -7
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +16 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.md +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.md +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.md +1 -1
- package/lib/commonjs/icons/Recorder.js +47 -0
- package/lib/commonjs/icons/Recorder.js.map +1 -0
- package/lib/commonjs/icons/Video.js +82 -0
- package/lib/commonjs/icons/Video.js.map +1 -0
- package/lib/commonjs/icons/index.js +26 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/FileIcon.js +9 -1
- package/lib/module/components/Attachment/FileIcon.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +232 -48
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +39 -21
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +129 -44
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +25 -9
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +15 -8
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.md +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.md +1 -1
- package/lib/module/contexts/chatContext/ChatContext.md +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.md +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +10 -7
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +16 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.md +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.md +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +1 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.md +1 -1
- package/lib/module/icons/Recorder.js +47 -0
- package/lib/module/icons/Recorder.js.map +1 -0
- package/lib/module/icons/Video.js +82 -0
- package/lib/module/icons/Video.js.map +1 -0
- package/lib/module/icons/index.js +26 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +6 -6
- package/lib/typescript/components/Channel/Channel.d.ts +2 -2
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts +2 -2
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +9 -8
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +2 -2
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +6 -6
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +2 -2
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +10 -21
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +6 -6
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +20 -20
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +2 -1
- package/lib/typescript/icons/Recorder.d.ts +3 -0
- package/lib/typescript/icons/Video.d.ts +3 -0
- package/lib/typescript/icons/index.d.ts +2 -0
- package/lib/typescript/native.d.ts +3 -14
- package/lib/typescript/types/types.d.ts +24 -0
- package/package.json +1 -1
- package/src/components/Attachment/FileIcon.tsx +45 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +210 -60
- package/src/components/Channel/Channel.tsx +2 -2
- package/src/components/Chat/Chat.tsx +1 -1
- package/src/components/Message/Message.tsx +2 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +23 -12
- package/src/components/Message/MessageSimple/utils/renderText.md +1 -1
- package/src/components/MessageInput/FileUploadPreview.tsx +1 -1
- package/src/components/MessageInput/MessageInput.tsx +106 -19
- package/src/components/Reply/Reply.tsx +31 -14
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +12 -0
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +12 -8
- package/src/contexts/channelContext/ChannelContext.md +1 -1
- package/src/contexts/channelContext/ChannelContext.tsx +2 -2
- package/src/contexts/channelsContext/ChannelsContext.md +1 -1
- package/src/contexts/channelsContext/ChannelsContext.tsx +6 -6
- package/src/contexts/chatContext/ChatContext.md +1 -1
- package/src/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
- package/src/contexts/keyboardContext/KeyboardContext.md +1 -1
- package/src/contexts/messageContext/MessageContext.md +1 -1
- package/src/contexts/messageContext/MessageContext.tsx +2 -2
- package/src/contexts/messageInputContext/MessageInputContext.md +1 -1
- package/src/contexts/messageInputContext/MessageInputContext.tsx +23 -30
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +17 -1
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +6 -6
- package/src/contexts/messagesContext/MessagesContext.md +1 -1
- package/src/contexts/messagesContext/MessagesContext.tsx +20 -20
- package/src/contexts/overlayContext/OverlayContext.md +1 -1
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.md +1 -1
- package/src/contexts/suggestionsContext/SuggestionsContext.md +1 -1
- package/src/contexts/themeContext/utils/theme.ts +3 -1
- package/src/contexts/typingContext/TypingContext.md +1 -1
- package/src/icons/Recorder.tsx +16 -0
- package/src/icons/Video.tsx +37 -0
- package/src/icons/index.ts +2 -0
- package/src/native.ts +4 -14
- package/src/types/types.ts +27 -0
- package/src/version.json +1 -1
|
@@ -44,22 +44,22 @@ export declare type MessageContentType = 'attachments' | 'files' | 'gallery' | '
|
|
|
44
44
|
export declare type MessagesContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
45
45
|
/**
|
|
46
46
|
* UI component for Attachment.
|
|
47
|
-
* Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
47
|
+
* Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)
|
|
48
48
|
*/
|
|
49
49
|
Attachment: React.ComponentType<AttachmentProps<StreamChatGenerics>>;
|
|
50
50
|
/**
|
|
51
51
|
* UI component to display AttachmentActions. e.g., send, shuffle, cancel in case of giphy
|
|
52
|
-
* Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
52
|
+
* Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)
|
|
53
53
|
*/
|
|
54
54
|
AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;
|
|
55
55
|
/**
|
|
56
56
|
* UI component to display generic media type e.g. giphy, url preview etc
|
|
57
|
-
* Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
57
|
+
* Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)
|
|
58
58
|
*/
|
|
59
59
|
Card: React.ComponentType<CardProps<StreamChatGenerics>>;
|
|
60
60
|
/**
|
|
61
61
|
* UI component for DateHeader
|
|
62
|
-
* Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
62
|
+
* Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)
|
|
63
63
|
**/
|
|
64
64
|
DateHeader: React.ComponentType<DateHeaderProps>;
|
|
65
65
|
/** Should keyboard be dismissed when messaged is touched */
|
|
@@ -67,28 +67,28 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
67
67
|
enableMessageGroupingByUser: boolean;
|
|
68
68
|
/**
|
|
69
69
|
* UI component to display File type attachment.
|
|
70
|
-
* Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
70
|
+
* Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachment.tsx)
|
|
71
71
|
*/
|
|
72
72
|
FileAttachment: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;
|
|
73
73
|
/**
|
|
74
74
|
* UI component to display group of File type attachments or multiple file attachments (in single message).
|
|
75
|
-
* Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
75
|
+
* Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachmentGroup.tsx)
|
|
76
76
|
*/
|
|
77
77
|
FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<StreamChatGenerics>>;
|
|
78
78
|
/**
|
|
79
79
|
* UI component for attachment icon for type 'file' attachment.
|
|
80
|
-
* Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/
|
|
80
|
+
* Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx
|
|
81
81
|
*/
|
|
82
82
|
FileAttachmentIcon: React.ComponentType<FileIconProps>;
|
|
83
83
|
FlatList: typeof FlatList;
|
|
84
84
|
/**
|
|
85
85
|
* UI component to display image attachments
|
|
86
|
-
* Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
86
|
+
* Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)
|
|
87
87
|
*/
|
|
88
88
|
Gallery: React.ComponentType<GalleryProps<StreamChatGenerics>>;
|
|
89
89
|
/**
|
|
90
90
|
* UI component for Giphy
|
|
91
|
-
* Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
91
|
+
* Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Giphy.tsx)
|
|
92
92
|
*/
|
|
93
93
|
Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;
|
|
94
94
|
/**
|
|
@@ -101,30 +101,30 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
101
101
|
initialScrollToFirstUnreadMessage: boolean;
|
|
102
102
|
/**
|
|
103
103
|
* UI component for Message Date Separator Component
|
|
104
|
-
* Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
104
|
+
* Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/InlineDateSeparator.tsx)
|
|
105
105
|
*/
|
|
106
106
|
InlineDateSeparator: React.ComponentType<InlineDateSeparatorProps>;
|
|
107
107
|
/**
|
|
108
108
|
* UI component for InlineUnreadIndicator
|
|
109
|
-
* Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
109
|
+
* Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)
|
|
110
110
|
**/
|
|
111
111
|
InlineUnreadIndicator: React.ComponentType;
|
|
112
112
|
Message: React.ComponentType<MessageProps<StreamChatGenerics>>;
|
|
113
113
|
/**
|
|
114
114
|
* UI component for MessageAvatar
|
|
115
|
-
* Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
115
|
+
* Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)
|
|
116
116
|
**/
|
|
117
117
|
MessageAvatar: React.ComponentType<MessageAvatarProps<StreamChatGenerics>>;
|
|
118
118
|
/**
|
|
119
119
|
* UI component for MessageContent
|
|
120
|
-
* Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
120
|
+
* Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageContent.tsx)
|
|
121
121
|
*/
|
|
122
122
|
MessageContent: React.ComponentType<MessageContentProps<StreamChatGenerics>>;
|
|
123
123
|
/** Order to render the message content */
|
|
124
124
|
messageContentOrder: MessageContentType[];
|
|
125
125
|
/**
|
|
126
126
|
* UI component for MessageDeleted
|
|
127
|
-
* Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
127
|
+
* Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageDeleted.tsx)
|
|
128
128
|
*/
|
|
129
129
|
MessageDeleted: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;
|
|
130
130
|
/**
|
|
@@ -138,22 +138,22 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
138
138
|
MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;
|
|
139
139
|
/**
|
|
140
140
|
* UI component for MessageReplies
|
|
141
|
-
* Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
141
|
+
* Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)
|
|
142
142
|
*/
|
|
143
143
|
MessageReplies: React.ComponentType<MessageRepliesProps<StreamChatGenerics>>;
|
|
144
144
|
/**
|
|
145
145
|
* UI Component for MessageRepliesAvatars
|
|
146
|
-
* Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
146
|
+
* Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageRepliesAvatars.tsx)
|
|
147
147
|
*/
|
|
148
148
|
MessageRepliesAvatars: React.ComponentType<MessageRepliesAvatarsProps<StreamChatGenerics>>;
|
|
149
149
|
/**
|
|
150
150
|
* UI component for MessageSimple
|
|
151
|
-
* Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
151
|
+
* Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageSimple.tsx)
|
|
152
152
|
*/
|
|
153
153
|
MessageSimple: React.ComponentType<MessageSimpleProps<StreamChatGenerics>>;
|
|
154
154
|
/**
|
|
155
155
|
* UI component for MessageStatus (delivered/read)
|
|
156
|
-
* Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
156
|
+
* Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageStatus.tsx)
|
|
157
157
|
*/
|
|
158
158
|
MessageStatus: React.ComponentType<MessageStatusProps<StreamChatGenerics>>;
|
|
159
159
|
/**
|
|
@@ -167,7 +167,7 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
167
167
|
OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;
|
|
168
168
|
/**
|
|
169
169
|
* UI component for ReactionList
|
|
170
|
-
* Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/
|
|
170
|
+
* Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)
|
|
171
171
|
*/
|
|
172
172
|
ReactionList: React.ComponentType<ReactionListProps<StreamChatGenerics>>;
|
|
173
173
|
removeMessage: (message: {
|
|
@@ -208,7 +208,7 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
|
|
|
208
208
|
}) => void;
|
|
209
209
|
/**
|
|
210
210
|
* Custom UI component to display enriched url preview.
|
|
211
|
-
* Defaults to https://github.com/GetStream/stream-chat-react-native/blob/
|
|
211
|
+
* Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx
|
|
212
212
|
*/
|
|
213
213
|
UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;
|
|
214
214
|
/**
|
|
@@ -74,6 +74,7 @@ export declare type MarkdownStyle = Partial<{
|
|
|
74
74
|
export declare type Theme = {
|
|
75
75
|
attachmentPicker: {
|
|
76
76
|
bottomSheetContentContainer: ViewStyle;
|
|
77
|
+
durationText: TextStyle;
|
|
77
78
|
errorButtonText: TextStyle;
|
|
78
79
|
errorContainer: ViewStyle;
|
|
79
80
|
errorText: TextStyle;
|
|
@@ -385,7 +386,7 @@ export declare type Theme = {
|
|
|
385
386
|
eyeIcon: IconProps;
|
|
386
387
|
/**
|
|
387
388
|
* Available options for styling text:
|
|
388
|
-
* https://github.com/andangrd/react-native-markdown-package/blob/
|
|
389
|
+
* https://github.com/andangrd/react-native-markdown-package/blob/main/styles.js
|
|
389
390
|
*/
|
|
390
391
|
markdown: MarkdownStyle;
|
|
391
392
|
messageUser: TextStyle;
|
|
@@ -68,11 +68,13 @@ export * from './ThumbsUpReaction';
|
|
|
68
68
|
export * from './Time';
|
|
69
69
|
export * from './TXT';
|
|
70
70
|
export * from './Unknown';
|
|
71
|
+
export * from './Recorder';
|
|
71
72
|
export * from './Unpin';
|
|
72
73
|
export * from './User';
|
|
73
74
|
export * from './UserAdd';
|
|
74
75
|
export * from './UserDelete';
|
|
75
76
|
export * from './UserMinus';
|
|
77
|
+
export * from './Video';
|
|
76
78
|
export * from './Warning';
|
|
77
79
|
export * from './WutReaction';
|
|
78
80
|
export * from './XLS';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FlatList as DefaultFlatList } from 'react-native';
|
|
2
2
|
import type { NetInfoSubscription } from '@react-native-community/netinfo';
|
|
3
|
+
import type { Asset, File } from './types/types';
|
|
3
4
|
declare type CompressImage = ({ compressImageQuality, height, uri, width, }: {
|
|
4
5
|
compressImageQuality: number;
|
|
5
6
|
height: number;
|
|
@@ -11,15 +12,8 @@ declare type DeleteFile = ({ uri }: {
|
|
|
11
12
|
uri: string;
|
|
12
13
|
}) => Promise<boolean> | never;
|
|
13
14
|
export declare let deleteFile: DeleteFile;
|
|
14
|
-
declare type GetLocalAssetUri = (uriOrAssetId: string) =>
|
|
15
|
+
declare type GetLocalAssetUri = (uriOrAssetId: string) => never;
|
|
15
16
|
export declare let getLocalAssetUri: GetLocalAssetUri;
|
|
16
|
-
export declare type Asset = {
|
|
17
|
-
height: number;
|
|
18
|
-
source: 'camera' | 'picker';
|
|
19
|
-
uri: string;
|
|
20
|
-
width: number;
|
|
21
|
-
id?: string;
|
|
22
|
-
};
|
|
23
17
|
declare type GetPhotos = ({ after, first }: {
|
|
24
18
|
first: number;
|
|
25
19
|
after?: string;
|
|
@@ -41,12 +35,7 @@ declare type PickDocument = ({ maxNumberOfFiles }: {
|
|
|
41
35
|
maxNumberOfFiles?: number;
|
|
42
36
|
}) => Promise<{
|
|
43
37
|
cancelled: boolean;
|
|
44
|
-
docs?:
|
|
45
|
-
name: string;
|
|
46
|
-
size?: number | string;
|
|
47
|
-
type?: string;
|
|
48
|
-
uri?: string;
|
|
49
|
-
}[];
|
|
38
|
+
docs?: File[];
|
|
50
39
|
}> | never;
|
|
51
40
|
export declare let pickDocument: PickDocument;
|
|
52
41
|
declare type SaveFileOptions = {
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import type { ExtendableGenerics, LiteralStringForUnion } from 'stream-chat';
|
|
2
|
+
export declare type Asset = {
|
|
3
|
+
duration: number | null;
|
|
4
|
+
filename: string;
|
|
5
|
+
fileSize: string;
|
|
6
|
+
height: number;
|
|
7
|
+
playableDuration: number | null;
|
|
8
|
+
source: 'camera' | 'picker';
|
|
9
|
+
type: string;
|
|
10
|
+
uri: string;
|
|
11
|
+
width: number;
|
|
12
|
+
id?: string;
|
|
13
|
+
size?: number | string;
|
|
14
|
+
};
|
|
15
|
+
export declare type File = {
|
|
16
|
+
name: string;
|
|
17
|
+
duration?: string | null;
|
|
18
|
+
size?: number | string;
|
|
19
|
+
type?: string;
|
|
20
|
+
uri?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type DefaultAttachmentType = UnknownType & {
|
|
23
|
+
file_size?: number | string;
|
|
24
|
+
mime_type?: string;
|
|
25
|
+
};
|
|
2
26
|
interface DefaultUserType extends UnknownType {
|
|
3
27
|
image?: string;
|
|
4
28
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.6.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -19,6 +19,7 @@ import { SEVEN_Z } from '../../icons/SEVEN_Z';
|
|
|
19
19
|
import { TAR } from '../../icons/TAR';
|
|
20
20
|
import { TXT } from '../../icons/TXT';
|
|
21
21
|
import type { IconProps } from '../../icons/utils/base';
|
|
22
|
+
import { Video } from '../../icons/Video';
|
|
22
23
|
import { XLS } from '../../icons/XLS';
|
|
23
24
|
import { XLSX } from '../../icons/XLSX';
|
|
24
25
|
import { ZIP } from '../../icons/ZIP';
|
|
@@ -320,6 +321,46 @@ const zipFileTypes = [
|
|
|
320
321
|
'application/zip',
|
|
321
322
|
];
|
|
322
323
|
|
|
324
|
+
const videoFileTypes = [
|
|
325
|
+
'video/3g2',
|
|
326
|
+
'video/3gp',
|
|
327
|
+
'video/aaf',
|
|
328
|
+
'video/asf',
|
|
329
|
+
'video/avchd',
|
|
330
|
+
'video/avi',
|
|
331
|
+
'video/drc',
|
|
332
|
+
'video/flv',
|
|
333
|
+
'video/m2v',
|
|
334
|
+
'video/m3u8',
|
|
335
|
+
'video/m4p',
|
|
336
|
+
'video/m4v',
|
|
337
|
+
'video/mkv',
|
|
338
|
+
'video/mng',
|
|
339
|
+
'video/mov',
|
|
340
|
+
'video/mp2',
|
|
341
|
+
'video/mp4',
|
|
342
|
+
'video/mpe',
|
|
343
|
+
'video/mpeg',
|
|
344
|
+
'video/mpg',
|
|
345
|
+
'video/mpv',
|
|
346
|
+
'video/mxf',
|
|
347
|
+
'video/nsv',
|
|
348
|
+
'video/ogg',
|
|
349
|
+
'video/ogv',
|
|
350
|
+
'video/qt',
|
|
351
|
+
'video/rm',
|
|
352
|
+
'video/rmvb',
|
|
353
|
+
'video/roq',
|
|
354
|
+
'video/svi',
|
|
355
|
+
'video/vob',
|
|
356
|
+
'video/webm',
|
|
357
|
+
'video/wmv',
|
|
358
|
+
'video/yuv',
|
|
359
|
+
'video/quicktime',
|
|
360
|
+
'video/webm',
|
|
361
|
+
'video/x-flv',
|
|
362
|
+
];
|
|
363
|
+
|
|
323
364
|
const mimeTypeToIconMap: Record<string, React.FC<IconProps>> = {
|
|
324
365
|
'application/pdf': PDF, // .pdf
|
|
325
366
|
'application/rtf': RTF, // .rtf
|
|
@@ -371,6 +412,10 @@ for (const type of zipFileTypes) {
|
|
|
371
412
|
mimeTypeToIconMap[type] = ZIP;
|
|
372
413
|
}
|
|
373
414
|
|
|
415
|
+
for (const type of videoFileTypes) {
|
|
416
|
+
mimeTypeToIconMap[type] = Video;
|
|
417
|
+
}
|
|
418
|
+
|
|
374
419
|
function mimeTypeToIcon(mimeType?: string): React.FC<IconProps> {
|
|
375
420
|
if (!mimeType) return GenericFile;
|
|
376
421
|
|