stream-chat-expo 9.5.2 → 9.6.0-beta.2
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 +1 -1
- package/package.json +2 -2
- package/src/index.js +9 -2
- package/types/index.d.ts +29 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://www.npmjs.com/package/stream-chat-react-native)
|
|
11
11
|
[](https://github.com/GetStream/stream-chat-react-native/actions)
|
|
12
12
|
[](https://getstream.io/chat/docs/sdk/reactnative)
|
|
13
|
-

|
|
14
14
|
|
|
15
15
|
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@3x.png?auto=format,enhance" width="50%" />
|
|
16
16
|
|
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": "9.
|
|
4
|
+
"version": "9.6.0-beta.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"types": "types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"mime": "^4.0.7",
|
|
30
|
-
"stream-chat-react-native-core": "9.
|
|
30
|
+
"stream-chat-react-native-core": "9.6.0-beta.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"expo": ">=52.0.0",
|
package/src/index.js
CHANGED
|
@@ -24,7 +24,10 @@ import {
|
|
|
24
24
|
Video,
|
|
25
25
|
} from './optionalDependencies';
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The default native handlers this package registers with the core SDK.
|
|
29
|
+
*/
|
|
30
|
+
export const defaultNativeHandlers = {
|
|
28
31
|
Audio,
|
|
29
32
|
compressImage,
|
|
30
33
|
deleteFile,
|
|
@@ -39,13 +42,17 @@ registerNativeHandlers({
|
|
|
39
42
|
pickDocument,
|
|
40
43
|
pickImage,
|
|
41
44
|
saveFile,
|
|
42
|
-
SDK: 'stream-chat-expo',
|
|
43
45
|
setClipboardString,
|
|
44
46
|
shareImage,
|
|
45
47
|
Sound,
|
|
46
48
|
takePhoto,
|
|
47
49
|
triggerHaptic,
|
|
48
50
|
Video,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
registerNativeHandlers({
|
|
54
|
+
...defaultNativeHandlers,
|
|
55
|
+
SDK: 'stream-chat-expo',
|
|
49
56
|
});
|
|
50
57
|
|
|
51
58
|
export * from 'stream-chat-react-native-core';
|
package/types/index.d.ts
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
+
import { registerNativeHandlers } from 'stream-chat-react-native-core';
|
|
2
|
+
|
|
1
3
|
export * from 'stream-chat-react-native-core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The default native handlers this package registers with the core SDK.
|
|
7
|
+
*
|
|
8
|
+
* Exposed so integrators can compose or wrap a single handler (for example to
|
|
9
|
+
* force `takePhoto` to capture images only) without reimplementing it or
|
|
10
|
+
* reaching into internal module paths. Register your override *after* importing
|
|
11
|
+
* this package so it takes precedence.
|
|
12
|
+
*
|
|
13
|
+
* Example:
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { registerNativeHandlers, defaultNativeHandlers } from 'stream-chat-expo';
|
|
17
|
+
*
|
|
18
|
+
* const localTakePhoto = defaultNativeHandlers.takePhoto;
|
|
19
|
+
*
|
|
20
|
+
* registerNativeHandlers({
|
|
21
|
+
* takePhoto: localTakePhoto
|
|
22
|
+
* ? (options) => {
|
|
23
|
+
* console.log('[#3379 demo] wrapped takePhoto — forcing mediaType "image"', options);
|
|
24
|
+
* return localTakePhoto({ ...options, mediaType: 'image' });
|
|
25
|
+
* }
|
|
26
|
+
* : undefined,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const defaultNativeHandlers: Parameters<typeof registerNativeHandlers>[0];
|