@umituz/react-native-ai-generation-content 1.17.153 → 1.17.155

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.153",
3
+ "version": "1.17.155",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -3,6 +3,7 @@
3
3
  * Uses ONLY configured app services - no alternatives
4
4
  */
5
5
 
6
+ import { ImageTransformService } from "@umituz/react-native-image";
6
7
  import { getAuthService, getCreditService, getPaywallService, isAppServicesConfigured } from "../config/app-services.config";
7
8
 
8
9
  declare const __DEV__: boolean;
@@ -17,7 +18,16 @@ export interface FeatureUtilsConfig {
17
18
  }
18
19
 
19
20
  export async function prepareImage(uri: string): Promise<string> {
20
- return uri;
21
+ const result = await ImageTransformService.resize(uri, undefined, undefined, {
22
+ base64: true,
23
+ compress: 0.9,
24
+ });
25
+
26
+ if (!result.base64) {
27
+ throw new Error("Failed to convert image to base64");
28
+ }
29
+
30
+ return result.base64;
21
31
  }
22
32
 
23
33
  export function createDevCallbacks(featureName: string) {