stream-chat-expo 5.15.0-beta.2 → 5.15.0-beta.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-expo",
3
3
  "description": "The official Expo SDK for Stream Chat, a service for building chat applications",
4
- "version": "5.15.0-beta.2",
4
+ "version": "5.15.0-beta.4",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -10,7 +10,7 @@
10
10
  "main": "src/index.js",
11
11
  "types": "types/index.d.ts",
12
12
  "dependencies": {
13
- "stream-chat-react-native-core": "5.15.0-beta.2"
13
+ "stream-chat-react-native-core": "5.15.0-beta.4"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@react-native-community/netinfo": ">=6.0.0",
@@ -4,8 +4,12 @@ try {
4
4
  const audioVideoPackage = require('expo-av');
5
5
  VideoComponent = audioVideoPackage.Video;
6
6
  AudioComponent = audioVideoPackage.Audio;
7
- } catch (_) {
8
- console.warn(
7
+ } catch (e) {
8
+ // do nothing
9
+ }
10
+
11
+ if (!VideoComponent || !AudioComponent) {
12
+ console.log(
9
13
  'Audio Video library is currently not installed. To allow in-app audio or video playback, install the "expo-av" package.',
10
14
  );
11
15
  }
@@ -1,9 +1,15 @@
1
1
  let DocumentPicker;
2
2
 
3
3
  try {
4
- DocumentPicker = require('expo-document-picker').default;
5
- } catch (error) {
6
- console.log('expo-document-picker is not installed');
4
+ DocumentPicker = require('expo-document-picker');
5
+ } catch (e) {
6
+ // do nothing
7
+ }
8
+
9
+ if (!DocumentPicker) {
10
+ console.log(
11
+ 'expo-document-picker is not installed. Install this library if you want to enable file picker support.',
12
+ );
7
13
  }
8
14
 
9
15
  export const pickDocument = DocumentPicker
@@ -1,10 +1,15 @@
1
1
  let Clipboard: { setString: (string: string) => void } | undefined;
2
2
 
3
3
  try {
4
- Clipboard = require('expo-clipboard').default;
4
+ Clipboard = require('expo-clipboard');
5
5
  } catch (e) {
6
6
  // do nothing
7
- console.log('expo-clipboard is not installed');
7
+ }
8
+
9
+ if (!Clipboard) {
10
+ console.log(
11
+ 'expo-clipboard is not installed. Install this library if you want to enable copy to clipboard support.',
12
+ );
8
13
  }
9
14
 
10
15
  export const setClipboardString = Clipboard
@@ -2,8 +2,14 @@ let Sharing;
2
2
 
3
3
  try {
4
4
  Sharing = require('expo-sharing').default;
5
- } catch (error) {
6
- console.log('expo-sharing is not installed');
5
+ } catch (e) {
6
+ // do nothing
7
+ }
8
+
9
+ if (!Sharing) {
10
+ console.log(
11
+ 'expo-sharing is not installed. Installing this package will allow your users to share attachments from the gallery using the native sharing interface on their devices.',
12
+ );
7
13
  }
8
14
 
9
15
  export const shareImage = Sharing
@@ -1,9 +1,15 @@
1
1
  let Haptics;
2
2
 
3
3
  try {
4
- Haptics = require('expo-haptics').default;
5
- } catch (error) {
6
- console.log('expo-haptics is not installed');
4
+ Haptics = require('expo-haptics');
5
+ } catch (e) {
6
+ // do nothing
7
+ }
8
+
9
+ if (!Haptics) {
10
+ console.log(
11
+ 'expo-haptics is not installed. Installing this package will enable haptic feedback when scaling images in the image gallery if the scaling hits the higher or lower limits for its value.',
12
+ );
7
13
  }
8
14
 
9
15
  type HapticFeedbackTypes =
@@ -39,4 +45,5 @@ export const triggerHaptic = Haptics
39
45
  Haptics.selectionAsync();
40
46
  }
41
47
  }
42
- : () => {};
48
+ : // eslint-disable-next-line @typescript-eslint/no-empty-function
49
+ () => {};