@oguzhnatly/react-native-image-manipulator 1.0.1 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.2
2
+
3
+ - Typescript module declarations improved.
4
+
1
5
  ## 1.0.1
2
6
 
3
7
  - Typescript module declaration added.
package/index.d.ts CHANGED
@@ -1 +1,35 @@
1
- declare module 'RNImageManipulator';
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
+
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oguzhnatly/react-native-image-manipulator",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "ImageManipulator for react native without Expo and Unimodules. Based on Expo ImageManipulator",
5
5
  "main": "index.js",
6
6
  "author": "oguzhnatly",