@oguzhnatly/react-native-image-manipulator 1.0.2 → 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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.0.5
2
+
3
+ - Typescript module declarations improved.
4
+
5
+ ## 1.0.4
6
+
7
+ - Typescript module declarations improved and Pod Errors fixed.
8
+
9
+ ## 1.0.3
10
+
11
+ - Errors fixed.
12
+
1
13
  ## 1.0.2
2
14
 
3
15
  - Typescript module declarations improved.
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.reactnativeimagemanipulator.RNImageManipulatorPackage;` to the imports at the top of the file
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`:
@@ -1,5 +1 @@
1
-
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="com.reactnativeimagemanipulator">
4
-
5
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.oguzhnatly.rnimagemanipulator"></manifest>
@@ -1,4 +1,4 @@
1
- package com.reactnativeimagemanipulator;
1
+ package com.oguzhnatly.rnimagemanipulator;
2
2
 
3
3
  import android.graphics.Bitmap;
4
4
  import android.graphics.Matrix;
@@ -1,5 +1,5 @@
1
1
 
2
- package com.reactnativeimagemanipulator;
2
+ package com.oguzhnatly.rnimagemanipulator;
3
3
 
4
4
  import java.util.Arrays;
5
5
  import java.util.Collections;
@@ -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,4 @@
1
+ import { NativeModules } from "react-native";
2
+ const { RNImageManipulator } = NativeModules;
3
+ export default RNImageManipulator;
4
+ //# sourceMappingURL=index.js.map
@@ -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,35 +1,26 @@
1
- declare module '@oguzhnatly/react-native-image-manipulator' {
2
- import React from 'react';
3
- import RNImageManipulator from './index';
4
-
5
- export type ImageResult = {
6
- uri: string;
7
- width: number;
8
- height: number;
9
- base64?: string;
10
- };
11
-
12
- export function manipulate(
13
- uri: string,
14
- actions: Array<{
15
- resize?: {width?: number; height?: number};
16
- rotate?: number;
17
- flip?: {vertical?: boolean; horizontal?: boolean};
18
- crop?: {
19
- originX?: number;
20
- originY?: number;
21
- width?: number;
22
- height?: number;
23
- };
24
- }>,
25
- saveOptions: {
26
- compress?: number;
27
- format?: 'jpeg' | 'png';
28
- base64?: boolean;
29
- },
30
- callback: (uri: string) => void,
31
- ): Promise<ImageResult>;
32
-
33
- export default RNImageManipulator;
34
- }
35
-
1
+ import {RNImageManipulatorResult as ImageResult} from './index';
2
+
3
+ export declare type RNImageManipulatorResult = ImageResult;
4
+
5
+ declare const RNImageManipulator: {
6
+ manipulate: (
7
+ uri: string,
8
+ actions: Array<{
9
+ resize?: {width?: number; height?: number};
10
+ rotate?: number;
11
+ flip?: {vertical?: boolean; horizontal?: boolean};
12
+ crop?: {
13
+ originX?: number;
14
+ originY?: number;
15
+ width?: number;
16
+ height?: number;
17
+ };
18
+ }>,
19
+ saveOptions: {
20
+ compress?: number;
21
+ format?: 'jpeg' | 'png';
22
+ base64?: boolean;
23
+ },
24
+ ) => Promise<RNImageManipulatorResult>;
25
+ };
26
+ export default RNImageManipulator;
package/index.ts CHANGED
@@ -2,4 +2,11 @@ import { NativeModules } from "react-native";
2
2
 
3
3
  const { RNImageManipulator } = NativeModules;
4
4
 
5
+ export type RNImageManipulatorResult = {
6
+ uri: string;
7
+ width: number;
8
+ height: number;
9
+ base64?: string;
10
+ };
11
+
5
12
  export default RNImageManipulator;
package/package.json CHANGED
@@ -1,10 +1,29 @@
1
1
  {
2
2
  "name": "@oguzhnatly/react-native-image-manipulator",
3
- "version": "1.0.2",
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
+ "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
+ "scripts": {
22
+ "build": "tsc"
23
+ },
24
+ "dependencies": {},
25
+ "devDependencies": {
26
+ "react-native": "^0.68.0",
27
+ "typescript": "^4.6.3"
28
+ }
10
29
  }
@@ -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 = package['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']
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
+ }