movius-chats 1.4.0 → 1.4.4
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 +44 -44
- package/lib/commonjs/index.js +4 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/assets/Icons/MessageTailReceivedIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/MessageTailSentIcon.d.ts +5 -0
- package/lib/typescript/components/VoiceRecorder/AnimatedHoldMic.d.ts +10 -0
- package/lib/typescript/components/VoiceRecorder/LockSlideColumn.d.ts +11 -0
- package/lib/typescript/components/VoiceRecorder/LongPressRecording.d.ts +2 -1
- package/lib/typescript/components/VoiceRecorder/NormalRecording.d.ts +2 -0
- package/lib/typescript/components/VoiceRecorder/recordingContainerStyle.d.ts +4 -0
- package/lib/typescript/types/index.d.ts +57 -21
- package/lib/typescript/utils/bubbleTheme.d.ts +151 -0
- package/package.json +6 -7
- package/src/assets/Icons/MessageTailReceivedIcon.tsx +28 -0
- package/src/assets/Icons/MessageTailSentIcon.tsx +28 -0
- package/src/components/AudioPlayer/AudioPlayer.tsx +126 -171
- package/src/components/ChatBubble/ChatBubble.tsx +13 -13
- package/src/components/ChatBubble/MediaGrid.tsx +1 -1
- package/src/components/ChatBubble/MessageContent.tsx +48 -8
- package/src/components/ChatBubble/MessageStatus.tsx +23 -12
- package/src/components/ChatInput/ChatInput.tsx +122 -38
- package/src/components/TypingComponent/TypingIndicator.tsx +4 -4
- package/src/components/VoiceRecorder/AnimatedHoldMic.tsx +47 -0
- package/src/components/VoiceRecorder/LockSlideColumn.tsx +114 -0
- package/src/components/VoiceRecorder/LongPressRecording.tsx +13 -105
- package/src/components/VoiceRecorder/NormalRecording.tsx +57 -30
- package/src/components/VoiceRecorder/recordingContainerStyle.ts +19 -0
- package/src/hooks/useVoiceRecorder.ts +56 -54
- package/src/types/index.ts +57 -23
- package/src/utils/bubbleTheme.ts +167 -0
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ module.exports = {
|
|
|
101
101
|
|
|
102
102
|
**React Native CLI:**
|
|
103
103
|
|
|
104
|
-
```bash
|
|
104
|
+
```bash
|
|
105
105
|
cd ios && pod install && cd ..
|
|
106
106
|
npx react-native run-ios
|
|
107
107
|
npx react-native run-android
|
|
@@ -109,7 +109,7 @@ npx react-native run-android
|
|
|
109
109
|
|
|
110
110
|
**Expo development build:**
|
|
111
111
|
|
|
112
|
-
```bash
|
|
112
|
+
```bash
|
|
113
113
|
npx expo prebuild
|
|
114
114
|
npx expo run:ios # or run:android
|
|
115
115
|
```
|
|
@@ -143,8 +143,8 @@ export default function MyChatScreen() {
|
|
|
143
143
|
return (
|
|
144
144
|
<SafeAreaView style={{ flex: 1 }}>
|
|
145
145
|
<View style={{ flex: 1 }}>
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
<ChatScreen
|
|
147
|
+
messages={messages}
|
|
148
148
|
currentUserId={currentUserId}
|
|
149
149
|
onSendMessage={({ text, senderId }) => {
|
|
150
150
|
setMessages((prev) => [
|
|
@@ -162,7 +162,7 @@ export default function MyChatScreen() {
|
|
|
162
162
|
]);
|
|
163
163
|
}}
|
|
164
164
|
keyboardVerticalOffset={Platform.OS === 'ios' ? insets.top + 44 : 0}
|
|
165
|
-
|
|
165
|
+
showAvatars
|
|
166
166
|
showBubbleTail
|
|
167
167
|
showMessageStatus
|
|
168
168
|
showAttachmentsButton
|
|
@@ -313,20 +313,20 @@ When any preview is present, the send button appears regardless of text content.
|
|
|
313
313
|
All keys are optional. Pass a `theme` object to `ChatScreen`:
|
|
314
314
|
|
|
315
315
|
```ts
|
|
316
|
-
theme?: {
|
|
316
|
+
theme?: {
|
|
317
317
|
fontFamily?: string; // applied to every Text element in the package
|
|
318
318
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
colors?: {
|
|
320
|
+
sentMessageTailColor?: string;
|
|
321
|
+
receivedMessageTailColor?: string;
|
|
322
|
+
timestamp?: string;
|
|
323
323
|
inputsIconsColor?: string; // emoji, clip, camera icons
|
|
324
324
|
sendIconsColor?: string; // send / mic icons
|
|
325
|
-
|
|
325
|
+
placeholderTextColor?: string;
|
|
326
326
|
inputTextColor?: string;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
audioPlayIconColor?: string;
|
|
328
|
+
audioPauseIconColor?: string;
|
|
329
|
+
videoPlayIconColor?: string;
|
|
330
330
|
sentIconColor?: string;
|
|
331
331
|
deliveredIconColor?: string;
|
|
332
332
|
readIconColor?: string;
|
|
@@ -337,40 +337,40 @@ theme?: {
|
|
|
337
337
|
inputIconSize?: string | number; // number = px, string = twrnc class e.g. "h-8 w-8"
|
|
338
338
|
};
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
340
|
+
bubbleStyle?: {
|
|
341
|
+
sent?: ViewStyle;
|
|
342
|
+
received?: ViewStyle;
|
|
343
|
+
avatarTextStyle?: TextStyle;
|
|
344
|
+
userNameStyle?: TextStyle;
|
|
345
|
+
avatarImageStyle?: ImageStyle;
|
|
346
|
+
typingContainerStyle?: ViewStyle;
|
|
347
|
+
additionalTypingUsersContainerStyle?: ViewStyle;
|
|
348
|
+
additionalTypingUsersTextStyle?: TextStyle;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
messageStyle?: {
|
|
352
|
+
sentTextStyle?: TextStyle;
|
|
353
|
+
receivedTextStyle?: TextStyle;
|
|
354
|
+
audioPlayButtonStyle?: ViewStyle;
|
|
355
|
+
audioKnobStyle?: ViewStyle;
|
|
356
|
+
progressBarStyle?: ViewStyle;
|
|
357
|
+
activeProgressBarStyle?: ViewStyle;
|
|
358
|
+
audioDurationStyle?: TextStyle;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
inputStyles?: {
|
|
362
362
|
inputSectionContainerStyle?: ViewStyle; // outer row (input + send button)
|
|
363
363
|
inputContainerStyle?: ViewStyle; // the pill/rounded box
|
|
364
364
|
sendButtonStyle?: ViewStyle; // the round send/mic button
|
|
365
365
|
};
|
|
366
366
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
367
|
+
filePreviewStyle?: {
|
|
368
|
+
root?: ViewStyle;
|
|
369
|
+
container?: ViewStyle;
|
|
370
|
+
iconContainer?: ViewStyle;
|
|
371
|
+
nameContainer?: ViewStyle;
|
|
372
|
+
text?: TextStyle;
|
|
373
|
+
};
|
|
374
374
|
}
|
|
375
375
|
```
|
|
376
376
|
|
|
@@ -690,7 +690,7 @@ When `renderCustomInput` is provided the default `ChatInput` is not mounted. Pre
|
|
|
690
690
|
|
|
691
691
|
By default tapping a file-attachment chip in a bubble calls `Linking.openURL`. For Expo apps that need to share or download local files, supply `onFileAttachmentPress`:
|
|
692
692
|
|
|
693
|
-
```bash
|
|
693
|
+
```bash
|
|
694
694
|
yarn add expo-sharing
|
|
695
695
|
```
|
|
696
696
|
|