@oguzhnatly/react-native-image-manipulator 1.0.1 → 1.0.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/CHANGELOG.md +12 -0
- package/README.md +6 -2
- package/android/src/main/AndroidManifest.xml +1 -5
- package/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java +1 -1
- package/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorPackage.java +1 -1
- package/index.d.ts +30 -1
- package/{index.js → index.ts} +0 -0
- package/package.json +18 -2
- package/react-native-image-manipulator.podspec +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
### OR
|
|
5
5
|
`$ yarn add @oguzhnatly/react-native-image-manipulator`
|
|
6
6
|
|
|
7
|
+
### Pod installation
|
|
8
|
+
|
|
9
|
+
`$ cd ios && pod install`
|
|
10
|
+
|
|
7
11
|
### Mostly automatic installation
|
|
8
12
|
|
|
9
|
-
`$ react-native link react-native-image-manipulator`
|
|
13
|
+
`$ react-native link @oguzhnatly/react-native-image-manipulator`
|
|
10
14
|
|
|
11
15
|
### Manual installation
|
|
12
16
|
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
|
|
22
26
|
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
|
|
23
27
|
|
|
24
|
-
- Add `import com.
|
|
28
|
+
- Add `import com.oguzhnatly.rnimagemanipulator.RNImageManipulatorPackage;` to the imports at the top of the file
|
|
25
29
|
- Add `new RNImageManipulatorPackage()` to the list returned by the `getPackages()` method
|
|
26
30
|
|
|
27
31
|
2. Append the following lines to `android/settings.gradle`:
|
package/index.d.ts
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '@oguzhnatly/react-native-image-manipulator' {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export type ImageResult = {
|
|
5
|
+
uri: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
base64?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function manipulate(
|
|
12
|
+
uri: string,
|
|
13
|
+
actions: Array<{
|
|
14
|
+
resize?: {width?: number; height?: number};
|
|
15
|
+
rotate?: number;
|
|
16
|
+
flip?: {vertical?: boolean; horizontal?: boolean};
|
|
17
|
+
crop?: {
|
|
18
|
+
originX?: number;
|
|
19
|
+
originY?: number;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
};
|
|
23
|
+
}>,
|
|
24
|
+
saveOptions: {
|
|
25
|
+
compress?: number;
|
|
26
|
+
format?: 'jpeg' | 'png';
|
|
27
|
+
base64?: boolean;
|
|
28
|
+
},
|
|
29
|
+
): Promise<ImageResult>;
|
|
30
|
+
}
|
package/{index.js → index.ts}
RENAMED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oguzhnatly/react-native-image-manipulator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "ImageManipulator for react native without Expo and Unimodules. Based on Expo ImageManipulator",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "oguzhnatly",
|
|
7
7
|
"homepage": "https://github.com/oguzhnatly/react-native-image-manipulator",
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"typings": "index.d.ts"
|
|
9
|
+
"typings": "index.d.ts",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"react-native",
|
|
12
|
+
"react",
|
|
13
|
+
"rotate",
|
|
14
|
+
"flip",
|
|
15
|
+
"image",
|
|
16
|
+
"manipulator",
|
|
17
|
+
"react-native-rotate-image",
|
|
18
|
+
"react-native-flip-image",
|
|
19
|
+
"react-native-image-manipulator"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"react-native": "^0.68.0",
|
|
24
|
+
"typescript": "^4.6.3"
|
|
25
|
+
}
|
|
10
26
|
}
|
|
@@ -3,7 +3,7 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name =
|
|
6
|
+
s.name = "react-native-image-manipulator"
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = package['description']
|
|
9
9
|
s.license = package['license']
|