@oguzhnatly/react-native-image-manipulator 1.0.4 → 1.0.5
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 +4 -0
- package/build/index.d.ts +29 -0
- package/build/index.js +4 -0
- package/build/index.js.map +1 -0
- package/index.d.ts +7 -11
- package/index.ts +7 -0
- package/package.json +6 -3
- package/tsconfig.json +25 -0
package/CHANGELOG.md
CHANGED
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare type RNImageManipulatorResult = {
|
|
2
|
+
uri: string;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
base64?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const RNImageManipulator: {
|
|
8
|
+
manipulate: (
|
|
9
|
+
uri: string,
|
|
10
|
+
actions: Array<{
|
|
11
|
+
resize?: {width?: number; height?: number};
|
|
12
|
+
rotate?: number;
|
|
13
|
+
flip?: {vertical?: boolean; horizontal?: boolean};
|
|
14
|
+
crop?: {
|
|
15
|
+
originX?: number;
|
|
16
|
+
originY?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
};
|
|
20
|
+
}>,
|
|
21
|
+
saveOptions: {
|
|
22
|
+
compress?: number;
|
|
23
|
+
format?: 'jpeg' | 'png';
|
|
24
|
+
base64?: boolean;
|
|
25
|
+
},
|
|
26
|
+
) => Promise<RNImageManipulatorResult>;
|
|
27
|
+
};
|
|
28
|
+
export default RNImageManipulator;
|
|
29
|
+
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,EAAE,kBAAkB,EAAE,GAAG,aAAa,CAAC;AAS7C,eAAe,kBAAkB,CAAC","sourcesContent":["import { NativeModules } from \"react-native\";\n\nconst { RNImageManipulator } = NativeModules;\n\nexport type RNImageManipulatorResult = {\n uri: string;\n width: number;\n height: number;\n base64?: string;\n};\n\nexport default RNImageManipulator;\n"]}
|
package/index.d.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import {RNImageManipulatorResult as ImageResult} from './index';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
uri: string;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
base64?: string;
|
|
9
|
-
};
|
|
3
|
+
export declare type RNImageManipulatorResult = ImageResult;
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
declare const RNImageManipulator: {
|
|
6
|
+
manipulate: (
|
|
12
7
|
uri: string,
|
|
13
8
|
actions: Array<{
|
|
14
9
|
resize?: {width?: number; height?: number};
|
|
@@ -26,5 +21,6 @@ declare module '@oguzhnatly/react-native-image-manipulator' {
|
|
|
26
21
|
format?: 'jpeg' | 'png';
|
|
27
22
|
base64?: boolean;
|
|
28
23
|
},
|
|
29
|
-
)
|
|
30
|
-
}
|
|
24
|
+
) => Promise<RNImageManipulatorResult>;
|
|
25
|
+
};
|
|
26
|
+
export default RNImageManipulator;
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oguzhnatly/react-native-image-manipulator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "ImageManipulator for react native without Expo and Unimodules. Based on Expo ImageManipulator",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "build/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": "build/index.d.ts",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react-native",
|
|
12
12
|
"react",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"react-native-flip-image",
|
|
19
19
|
"react-native-image-manipulator"
|
|
20
20
|
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc"
|
|
23
|
+
},
|
|
21
24
|
"dependencies": {},
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"react-native": "^0.68.0",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
5
|
+
"jsx": "react-native",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"typeRoots": [
|
|
10
|
+
"./ts-declarations",
|
|
11
|
+
"node_modules/@types"
|
|
12
|
+
],
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"inlineSources": true,
|
|
16
|
+
"strictNullChecks": true,
|
|
17
|
+
"strictPropertyInitialization": true,
|
|
18
|
+
"strictFunctionTypes": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noImplicitThis": true,
|
|
21
|
+
"noImplicitReturns": true,
|
|
22
|
+
"outDir": "./build"
|
|
23
|
+
},
|
|
24
|
+
"include": ["."]
|
|
25
|
+
}
|