stream-chat-react-native 6.6.6-beta.3 → 6.6.7-beta.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native",
3
3
  "description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4
- "version": "6.6.6-beta.3",
4
+ "version": "6.6.7-beta.1",
5
5
  "homepage": "https://www.npmjs.com/package/stream-chat-react-native",
6
6
  "author": {
7
7
  "company": "Stream.io Inc",
@@ -20,7 +20,7 @@
20
20
  "types": "types/index.d.ts",
21
21
  "dependencies": {
22
22
  "es6-symbol": "^3.1.3",
23
- "stream-chat-react-native-core": "6.6.6-beta.3"
23
+ "stream-chat-react-native-core": "6.6.7-beta.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@react-native-camera-roll/camera-roll": ">=7.8.0",
@@ -30,6 +30,7 @@
30
30
  "react-native-audio-recorder-player": ">=3.6.4",
31
31
  "react-native-blob-util": ">=0.19.9",
32
32
  "react-native-document-picker": ">=9.3.0",
33
+ "@react-native-documents/picker": ">=10.1.1",
33
34
  "react-native-haptic-feedback": ">=2.2.0",
34
35
  "react-native-image-picker": ">=7.1.2",
35
36
  "react-native-share": ">=10.2.1",
@@ -51,6 +52,9 @@
51
52
  "react-native-document-picker": {
52
53
  "optional": true
53
54
  },
55
+ "@react-native-documents/picker": {
56
+ "optional": true
57
+ },
54
58
  "react-native-haptic-feedback": {
55
59
  "optional": true
56
60
  },
@@ -72,11 +76,14 @@
72
76
  "postpack": "rm README.md"
73
77
  },
74
78
  "devDependencies": {
75
- "react-native": ">=0.67.0"
79
+ "react-native": "0.78.0"
76
80
  },
77
81
  "codegenConfig": {
78
82
  "name": "StreamChatReactNativeSpec",
79
83
  "type": "modules",
80
84
  "jsSrcsDir": "src/native"
85
+ },
86
+ "resolutions": {
87
+ "@types/react": "^19.0.0"
81
88
  }
82
89
  }
@@ -10,17 +10,41 @@ type ResponseValue = {
10
10
  uri: string;
11
11
  };
12
12
 
13
- let DocumentPicker:
13
+ type DocumentPickerType =
14
14
  | {
15
15
  pick: (opts?: { allowMultiSelection: boolean; type: string[] }) => Promise<ResponseValue[]>;
16
16
  types: { allFiles: string };
17
17
  }
18
18
  | undefined;
19
19
 
20
+ let DocumentPicker: DocumentPickerType;
21
+
22
+ let OldDocumentPicker: DocumentPickerType;
23
+ let NewDocumentPicker: DocumentPickerType;
24
+
25
+ try {
26
+ NewDocumentPicker = require('@react-native-documents/picker');
27
+ } catch (err) {
28
+ // we log below
29
+ }
30
+
20
31
  try {
21
- DocumentPicker = require('react-native-document-picker').default;
32
+ OldDocumentPicker = require('react-native-document-picker').default;
22
33
  } catch (err) {
23
- console.log('react-native-document-picker is not installed');
34
+ // we log below
35
+ }
36
+
37
+ if (NewDocumentPicker) {
38
+ DocumentPicker = NewDocumentPicker;
39
+ } else if (OldDocumentPicker) {
40
+ DocumentPicker = OldDocumentPicker;
41
+ console.log(
42
+ "You're using the react-native-document-picker library, which is no longer supported and has moved to @react-native-documents/picker. Things might not work as intended. Please migrate to the new library as soon as possible !",
43
+ );
44
+ } else {
45
+ console.log(
46
+ 'Neither react-native-document-picker nor @react-native-documents/picker are installed.',
47
+ );
24
48
  }
25
49
 
26
50
  export const pickDocument = DocumentPicker