diff --git a/docusaurus/docs/reactnative/basics/installation.mdx b/docusaurus/docs/reactnative/basics/installation.mdx index 68a1756164..642becf202 100644 --- a/docusaurus/docs/reactnative/basics/installation.mdx +++ b/docusaurus/docs/reactnative/basics/installation.mdx @@ -56,7 +56,7 @@ Stream Chat React Native SDK requires installing some peer dependencies to provi ```bash title="Terminal" -yarn add @react-native-camera-roll/camera-roll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-fs react-native-gesture-handler react-native-image-crop-picker react-native-image-resizer react-native-reanimated react-native-svg +yarn add @react-native-camera-roll/camera-roll @react-native-community/netinfo @stream-io/flat-list-mvcp react-native-fs react-native-gesture-handler react-native-image-crop-picker @bam.tech/react-native-image-resizer react-native-reanimated react-native-svg ``` @@ -88,7 +88,7 @@ values={[ - [`react-native-fs`](https://github.com/itinance/react-native-fs) to perform file operations like save, delete, etc. - [`react-native-gesture-handler`](https://github.com/software-mansion/react-native-gesture-handler) to handle gestures within the SDK. - [`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) to capture images to attach them in the message. -- [`react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) to compress image uploads. +- [`@bam.tech/react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) to compress image uploads. - [`react-native-reanimated`](https://github.com/software-mansion/react-native-reanimated) to compress image uploads. - [`react-native-svg`](https://github.com/react-native-svg/react-native-svg) for SVG support. diff --git a/docusaurus/docs/reactnative/basics/overview.mdx b/docusaurus/docs/reactnative/basics/overview.mdx index f9c5d14c51..8ed5cac1d9 100644 --- a/docusaurus/docs/reactnative/basics/overview.mdx +++ b/docusaurus/docs/reactnative/basics/overview.mdx @@ -66,7 +66,7 @@ The SDK tries to keep the list of external dependencies to a minimum, these are - [`react-native-fs`](https://github.com/itinance/react-native-fs) to perform file operations like save, delete, etc. - [`react-native-gesture-handler`](https://github.com/software-mansion/react-native-gesture-handler) to handle gestures within the SDK. - [`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) to capture images to attach them in the message. -- [`react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) to compress image uploads. +- [`@bam.tech/react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) to compress image uploads. - [`react-native-reanimated`](https://github.com/software-mansion/react-native-reanimated) to compress image uploads. - [`react-native-svg`](https://github.com/react-native-svg/react-native-svg) for SVG support. - [`stream-chat`](https://github.com/GetStream/stream-chat-js) for Chat Client. diff --git a/docusaurus/docs/reactnative/customization/native-handlers.mdx b/docusaurus/docs/reactnative/customization/native-handlers.mdx index 5650d74374..c39889a204 100644 --- a/docusaurus/docs/reactnative/customization/native-handlers.mdx +++ b/docusaurus/docs/reactnative/customization/native-handlers.mdx @@ -42,9 +42,9 @@ There are the handlers registered as they interact with different native API pac An `async` function that compresses an image and returns the local `uri` of the compressed image. -| React Native CLI | Expo | -| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| [`react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) | [`expo-image-manipulator`](https://docs.expo.io/versions/latest/sdk/imagemanipulator/) | +| React Native CLI | Expo | +| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| [`@bam.tech/react-native-image-resizer`](https://github.com/bamlab/react-native-image-resizer) | [`expo-image-manipulator`](https://docs.expo.io/versions/latest/sdk/imagemanipulator/) | ### `setClipboardString` diff --git a/examples/SampleApp/ios/Podfile.lock b/examples/SampleApp/ios/Podfile.lock index 21809564f8..a81afb09c5 100644 --- a/examples/SampleApp/ios/Podfile.lock +++ b/examples/SampleApp/ios/Podfile.lock @@ -1030,7 +1030,7 @@ PODS: - React-Core - react-native-document-picker (9.0.1): - React-Core - - react-native-image-resizer (1.4.5): + - react-native-image-resizer (3.0.10): - React-Core - react-native-netinfo (11.3.0): - React-Core @@ -1316,7 +1316,7 @@ DEPENDENCIES: - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)" - react-native-document-picker (from `../node_modules/react-native-document-picker`) - - react-native-image-resizer (from `../node_modules/react-native-image-resizer`) + - "react-native-image-resizer (from `../node_modules/@bam.tech/react-native-image-resizer`)" - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-quick-sqlite (from `../node_modules/react-native-quick-sqlite`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) @@ -1445,7 +1445,7 @@ EXTERNAL SOURCES: react-native-document-picker: :path: "../node_modules/react-native-document-picker" react-native-image-resizer: - :path: "../node_modules/react-native-image-resizer" + :path: "../node_modules/@bam.tech/react-native-image-resizer" react-native-netinfo: :path: "../node_modules/@react-native-community/netinfo" react-native-quick-sqlite: @@ -1576,7 +1576,7 @@ SPEC CHECKSUMS: React-Mapbuffer: 30d796a057e4e077d44b4c2ba17869fb8c1064eb react-native-cameraroll: 4701ae7c3dbcd3f5e9e150ca17f250a276154b35 react-native-document-picker: 2b8f18667caee73a96708a82b284a4f40b30a156 - react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f + react-native-image-resizer: fd0c333eca55147bd55c5e054cac95dcd0da6814 react-native-netinfo: 299dad906cdbf3b67bcc6f693c807f98bdd127cc react-native-quick-sqlite: 2b225dadc63b670f027111e58f6f169773f6d755 react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b diff --git a/examples/SampleApp/package.json b/examples/SampleApp/package.json index 97e46633f2..ce14e2de16 100644 --- a/examples/SampleApp/package.json +++ b/examples/SampleApp/package.json @@ -22,6 +22,7 @@ "clean-all": "yarn clean && rm -rf node_modules && rm -rf ios/Pods && rm -rf vendor && bundle install && yarn install && cd ios && bundle exec pod install && cd -" }, "dependencies": { + "@bam.tech/react-native-image-resizer": "^3.0.10", "@notifee/react-native": "^7.7.1", "@react-native-async-storage/async-storage": "^1.21.0", "@react-native-camera-roll/camera-roll": "^5.3.1", @@ -42,7 +43,6 @@ "react-native-gesture-handler": "^2.14.0", "react-native-haptic-feedback": "2.0.3", "react-native-image-crop-picker": "0.39.0", - "react-native-image-resizer": "1.4.5", "react-native-markdown-package": "1.8.2", "react-native-quick-sqlite": "8.0.2", "react-native-reanimated": "^3.7.0", diff --git a/examples/SampleApp/yarn.lock b/examples/SampleApp/yarn.lock index 3277db9cc4..45ab37e464 100644 --- a/examples/SampleApp/yarn.lock +++ b/examples/SampleApp/yarn.lock @@ -1161,6 +1161,11 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@bam.tech/react-native-image-resizer@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@bam.tech/react-native-image-resizer/-/react-native-image-resizer-3.0.10.tgz#03395a29cb61cd819ce1e7730fb137ab6e75618a" + integrity sha512-IVIBRkgy8eq4g51RjAzh7zk8KpGhiQH6GqLC7SgAUJ0plh2bdqG2l8+D+Q/A0uFe85YutUmHyFioyDEsRGXaCQ== + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -6191,11 +6196,6 @@ react-native-image-crop-picker@0.39.0: resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.39.0.tgz#9cb8e8ffb0e8ab06f7b3227cadf077169e225eba" integrity sha512-4aANbQMrmU6zN/4b0rVBA7SbaZ3aa5JESm3Xk751sINybZMt1yz/9h95LkO7U0pbslHDo3ofXjG75PmQRP6a/w== -react-native-image-resizer@1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/react-native-image-resizer/-/react-native-image-resizer-1.4.5.tgz#5a520aa8baa07638b1894a1d87d4d9a0945c8d58" - integrity sha512-33EgL3C9pyvjKpullAB6fWyD5QhoYEpNNB9rxNvUsrpAnL2mHBW7PTrUCCZudJeB6Weg7nbweKrSw1nnto5aqg== - react-native-lightbox@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/react-native-lightbox/-/react-native-lightbox-0.7.0.tgz#e52b4d7fcc141f59d7b23f0180de535e35b20ec9" diff --git a/examples/TypeScriptMessaging/ios/Podfile.lock b/examples/TypeScriptMessaging/ios/Podfile.lock index 0832de1860..1bffe224c2 100644 --- a/examples/TypeScriptMessaging/ios/Podfile.lock +++ b/examples/TypeScriptMessaging/ios/Podfile.lock @@ -953,7 +953,7 @@ PODS: - React-Core - react-native-flipper (0.212.0): - React-Core - - react-native-image-resizer (1.4.5): + - react-native-image-resizer (3.0.10): - React-Core - react-native-netinfo (11.3.2): - React-Core @@ -1236,7 +1236,7 @@ DEPENDENCIES: - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)" - react-native-document-picker (from `../node_modules/react-native-document-picker`) - react-native-flipper (from `../node_modules/react-native-flipper`) - - react-native-image-resizer (from `../node_modules/react-native-image-resizer`) + - "react-native-image-resizer (from `../node_modules/@bam.tech/react-native-image-resizer`)" - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-quick-sqlite (from `../node_modules/react-native-quick-sqlite`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) @@ -1356,7 +1356,7 @@ EXTERNAL SOURCES: react-native-flipper: :path: "../node_modules/react-native-flipper" react-native-image-resizer: - :path: "../node_modules/react-native-image-resizer" + :path: "../node_modules/@bam.tech/react-native-image-resizer" react-native-netinfo: :path: "../node_modules/@react-native-community/netinfo" react-native-quick-sqlite: @@ -1475,7 +1475,7 @@ SPEC CHECKSUMS: react-native-cameraroll: 755bcc628148a90a7c9cf3f817a252be3a601bc5 react-native-document-picker: 2b8f18667caee73a96708a82b284a4f40b30a156 react-native-flipper: 9c1957af24b76493ba74f46d000a5c1d485e7731 - react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f + react-native-image-resizer: fd0c333eca55147bd55c5e054cac95dcd0da6814 react-native-netinfo: 076df4f9b07f6670acf4ce9a75aac8d34c2e2ccc react-native-quick-sqlite: 2b225dadc63b670f027111e58f6f169773f6d755 react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b @@ -1517,4 +1517,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 90406e1e85c82b37484f5d746afa45c0637bb4b3 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/examples/TypeScriptMessaging/package.json b/examples/TypeScriptMessaging/package.json index f1faa99d1c..d9a49ca307 100644 --- a/examples/TypeScriptMessaging/package.json +++ b/examples/TypeScriptMessaging/package.json @@ -12,6 +12,7 @@ "clean-all": "yarn clean && rm -rf node_modules && rm -rf ios/Pods && rm -rf vendor && bundle install && yarn install && cd ios && bundle exec pod install && cd -" }, "dependencies": { + "@bam.tech/react-native-image-resizer": "^3.0.10", "@react-native-camera-roll/camera-roll": "^5.3.1", "@react-native-clipboard/clipboard": "^1.10.0", "@react-native-community/masked-view": "0.1.11", @@ -26,7 +27,6 @@ "react-native-gesture-handler": "^2.14.0", "react-native-haptic-feedback": "^2.0.3", "react-native-image-crop-picker": "^0.39.0", - "react-native-image-resizer": "^1.4.5", "react-native-quick-sqlite": "^8.0.2", "react-native-reanimated": "^3.7.0", "react-native-safe-area-context": "^4.8.2", diff --git a/examples/TypeScriptMessaging/yarn.lock b/examples/TypeScriptMessaging/yarn.lock index f8d3d27f4c..d11e2accf0 100644 --- a/examples/TypeScriptMessaging/yarn.lock +++ b/examples/TypeScriptMessaging/yarn.lock @@ -1479,6 +1479,11 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@bam.tech/react-native-image-resizer@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@bam.tech/react-native-image-resizer/-/react-native-image-resizer-3.0.10.tgz#03395a29cb61cd819ce1e7730fb137ab6e75618a" + integrity sha512-IVIBRkgy8eq4g51RjAzh7zk8KpGhiQH6GqLC7SgAUJ0plh2bdqG2l8+D+Q/A0uFe85YutUmHyFioyDEsRGXaCQ== + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -6313,11 +6318,6 @@ react-native-image-crop-picker@^0.39.0: resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.39.0.tgz#9cb8e8ffb0e8ab06f7b3227cadf077169e225eba" integrity sha512-4aANbQMrmU6zN/4b0rVBA7SbaZ3aa5JESm3Xk751sINybZMt1yz/9h95LkO7U0pbslHDo3ofXjG75PmQRP6a/w== -react-native-image-resizer@^1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/react-native-image-resizer/-/react-native-image-resizer-1.4.5.tgz#5a520aa8baa07638b1894a1d87d4d9a0945c8d58" - integrity sha512-33EgL3C9pyvjKpullAB6fWyD5QhoYEpNNB9rxNvUsrpAnL2mHBW7PTrUCCZudJeB6Weg7nbweKrSw1nnto5aqg== - react-native-lightbox@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/react-native-lightbox/-/react-native-lightbox-0.7.0.tgz#e52b4d7fcc141f59d7b23f0180de535e35b20ec9" diff --git a/package/native-package/package.json b/package/native-package/package.json index dc7c005537..38be5f6391 100644 --- a/package/native-package/package.json +++ b/package/native-package/package.json @@ -14,16 +14,16 @@ "stream-chat-react-native-core": "5.31.1" }, "peerDependencies": { + "@bam.tech/react-native-image-resizer": ">=3.0.10", "@react-native-camera-roll/camera-roll": ">=5.0.0", "@react-native-clipboard/clipboard": "^1.11.1", "react-native": ">=0.73.6", + "react-native-audio-recorder-player": ">=3.6.4", "react-native-document-picker": ">=9.0.1", "react-native-fs": ">=2.16.6", "react-native-haptic-feedback": ">=1.11.0", "react-native-image-crop-picker": ">=0.33.2", - "react-native-image-resizer": ">=1.4.2", "react-native-share": ">=4.1.0", - "react-native-audio-recorder-player": ">=3.6.4", "react-native-video": ">=5.2.1" }, "peerDependenciesMeta": { @@ -51,10 +51,10 @@ "postpack": "rm README.md" }, "devDependencies": { + "@bam.tech/react-native-image-resizer": "^3.0.10", "@react-native-camera-roll/camera-roll": "^5.0.2", "react-native": ">=0.73.6", "react-native-fs": ">=2.16.6", - "react-native-image-crop-picker": "^0.38.0", - "react-native-image-resizer": ">=1.4.2" + "react-native-image-crop-picker": "^0.38.0" } } diff --git a/package/native-package/src/handlers/compressImage.ts b/package/native-package/src/handlers/compressImage.ts index 4a2beec5b1..2a85c0686a 100644 --- a/package/native-package/src/handlers/compressImage.ts +++ b/package/native-package/src/handlers/compressImage.ts @@ -1,5 +1,5 @@ // @ts-ignore this module does not have a type declaration -import ImageResizer from 'react-native-image-resizer'; +import ImageResizer from '@bam.tech/react-native-image-resizer'; type CompressImageParams = { compressImageQuality: number; diff --git a/package/native-package/yarn.lock b/package/native-package/yarn.lock index 544e474866..22438b98b2 100644 --- a/package/native-package/yarn.lock +++ b/package/native-package/yarn.lock @@ -914,6 +914,11 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@bam.tech/react-native-image-resizer@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@bam.tech/react-native-image-resizer/-/react-native-image-resizer-3.0.10.tgz#03395a29cb61cd819ce1e7730fb137ab6e75618a" + integrity sha512-IVIBRkgy8eq4g51RjAzh7zk8KpGhiQH6GqLC7SgAUJ0plh2bdqG2l8+D+Q/A0uFe85YutUmHyFioyDEsRGXaCQ== + "@gorhom/bottom-sheet@4.4.8": version "4.4.8" resolved "https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-4.4.8.tgz#cfc1b342e9151acecbb846bd67638211382a350e" @@ -1258,11 +1263,6 @@ prompts "^2.4.2" semver "^7.5.2" -"@react-native-community/netinfo@>=2.0.7": - version "9.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-9.3.10.tgz#9b6cc2aec9329b5ccf35e866094c43aa420d927a" - integrity sha512-OwnqoJUp/4sa9e3ju+wQavAa8l0fiA3DheeLMKzKxtKeAe0CA7bNxWRM752JvRQ6A/igPnt1V0zSlu5owvQEuA== - "@react-native/assets-registry@0.74.84": version "0.74.84" resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.84.tgz#aa472f82c1b7d8a30098c8ba22fad7b3dbb5be5f" @@ -3648,11 +3648,6 @@ react-native-image-crop-picker@^0.38.0: resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.38.1.tgz#5973b4a8b55835b987e6be2064de411e849ac005" integrity sha512-cF5UQnWplzHCeiCO+aiGS/0VomWaLmFf3nSsgTMPfY+8+99h8N/eHQvVdSF7RsGw50B8394wGeGyqHjjp8YRWw== -react-native-image-resizer@>=1.4.2: - version "1.4.5" - resolved "https://registry.yarnpkg.com/react-native-image-resizer/-/react-native-image-resizer-1.4.5.tgz#5a520aa8baa07638b1894a1d87d4d9a0945c8d58" - integrity sha512-33EgL3C9pyvjKpullAB6fWyD5QhoYEpNNB9rxNvUsrpAnL2mHBW7PTrUCCZudJeB6Weg7nbweKrSw1nnto5aqg== - react-native-lightbox@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/react-native-lightbox/-/react-native-lightbox-0.7.0.tgz#e52b4d7fcc141f59d7b23f0180de535e35b20ec9"