hnc-rn-image-overlay 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +12 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hnc-rn-image-overlay",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Native module to add overlay and text watermark to images for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -1,24 +1,19 @@
1
- import { NativeModules } from 'react-native';
1
+ import { NativeModules } from "react-native";
2
2
 
3
3
  interface ImageOverlayModuleInterface {
4
- /**
5
- * Add overlay and text watermark to an image
6
- * @param imagePath - Absolute path to the input image
7
- * @param textLines - Array of text strings to render on the overlay
8
- * @returns Promise that resolves to the output image path
9
- */
10
- addOverlayAndText(
11
- imagePath: string,
12
- textLines: string[]
13
- ): Promise<string>;
4
+ /**
5
+ * Add overlay and text watermark to an image
6
+ * @param imagePath - Absolute path to the input image
7
+ * @param textLines - Array of text strings to render on the overlay
8
+ * @returns Promise that resolves to the output image path
9
+ */
10
+ addOverlayAndText(imagePath: string, textLines: string[]): Promise<string>;
14
11
  }
15
12
 
16
- const { ImageOverlayModule } = NativeModules;
13
+ const { ImageOverlay } = NativeModules;
17
14
 
18
- if (!ImageOverlayModule) {
19
- throw new Error(
20
- 'ImageOverlayModule is not available. Make sure you have linked the library properly and rebuilt your app.'
21
- );
15
+ if (!ImageOverlay) {
16
+ throw new Error("ImageOverlayModule is not available. Make sure you have linked the library properly and rebuilt your app.");
22
17
  }
23
18
 
24
- export default ImageOverlayModule as ImageOverlayModuleInterface;
19
+ export default ImageOverlay as ImageOverlayModuleInterface;