react-native-gifted-chat 3.2.2 → 3.3.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.
Files changed (42) hide show
  1. package/README.md +450 -156
  2. package/package.json +9 -8
  3. package/src/Bubble/index.tsx +34 -2
  4. package/src/Bubble/types.ts +17 -4
  5. package/src/Composer.tsx +1 -2
  6. package/src/Day/index.tsx +2 -2
  7. package/src/Day/types.ts +3 -2
  8. package/src/GiftedAvatar.tsx +1 -1
  9. package/src/GiftedChat/index.tsx +109 -23
  10. package/src/GiftedChat/types.ts +9 -3
  11. package/src/InputToolbar.tsx +62 -8
  12. package/src/Message/index.tsx +181 -21
  13. package/src/Message/types.ts +4 -0
  14. package/src/MessageReply.tsx +160 -0
  15. package/src/MessageText.tsx +2 -2
  16. package/src/MessagesContainer/components/DayAnimated/index.tsx +5 -1
  17. package/src/MessagesContainer/components/Item/index.tsx +82 -47
  18. package/src/MessagesContainer/index.tsx +30 -19
  19. package/src/MessagesContainer/styles.ts +2 -0
  20. package/src/MessagesContainer/types.ts +30 -3
  21. package/src/Models.ts +3 -0
  22. package/src/Reply/index.ts +1 -0
  23. package/src/Reply/types.ts +80 -0
  24. package/src/ReplyPreview.tsx +132 -0
  25. package/src/Send.tsx +8 -3
  26. package/src/SystemMessage.tsx +22 -16
  27. package/src/__tests__/MessageReply.test.tsx +54 -0
  28. package/src/__tests__/ReplyPreview.test.tsx +41 -0
  29. package/src/__tests__/__snapshots__/GiftedChat.test.tsx.snap +69 -42
  30. package/src/__tests__/__snapshots__/InputToolbar.test.tsx.snap +11 -15
  31. package/src/__tests__/__snapshots__/MessageImage.test.tsx.snap +24 -18
  32. package/src/__tests__/__snapshots__/MessageReply.test.tsx.snap +181 -0
  33. package/src/__tests__/__snapshots__/ReplyPreview.test.tsx.snap +403 -0
  34. package/src/__tests__/__snapshots__/Send.test.tsx.snap +3 -0
  35. package/src/__tests__/__snapshots__/SystemMessage.test.tsx.snap +36 -25
  36. package/src/components/MessageReply.tsx +156 -0
  37. package/src/components/ReplyPreview.tsx +230 -0
  38. package/src/index.ts +6 -1
  39. package/src/types.ts +17 -16
  40. package/src/utils.ts +11 -3
  41. package/CHANGELOG.md +0 -364
  42. package/src/reanimatedCompat.ts +0 -27
@@ -1,27 +0,0 @@
1
- /**
2
- * Compatibility layer for react-native-reanimated v3 and v4
3
- *
4
- * In v3, types are exported from 'react-native-reanimated/lib/typescript/hook/commonTypes'
5
- * In v4, the type structure changed - we define a compatible type that works with both
6
- */
7
-
8
- import type { NativeScrollEvent } from 'react-native'
9
-
10
- /**
11
- * Compatible type for scroll events from useAnimatedScrollHandler
12
- * Works with both react-native-reanimated v3 and v4
13
- */
14
- export type ReanimatedScrollEvent = Readonly<{
15
- contentOffset: {
16
- x: number
17
- y: number
18
- }
19
- contentSize: {
20
- height: number
21
- width: number
22
- }
23
- layoutMeasurement: {
24
- height: number
25
- width: number
26
- }
27
- }> & Readonly<NativeScrollEvent>