@umituz/react-native-ai-generation-content 1.17.175 → 1.17.176

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.175",
3
+ "version": "1.17.176",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -65,9 +65,21 @@ function defaultExtractImageResult(result: unknown): string | undefined {
65
65
  console.log("[ImageExtractor] Data keys:", Object.keys(data));
66
66
  }
67
67
 
68
+ // Direct string values
68
69
  if (typeof data.image === "string") return data.image;
69
70
  if (typeof data.imageUrl === "string") return data.imageUrl;
70
71
  if (typeof data.output === "string") return data.output;
72
+
73
+ // Object with url property (birefnet, rembg format: data.image.url)
74
+ const imageObj = data.image as Record<string, unknown> | undefined;
75
+ if (imageObj && typeof imageObj === "object" && typeof imageObj.url === "string") {
76
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
77
+ console.log("[ImageExtractor] Found data.image.url:", imageObj.url);
78
+ }
79
+ return imageObj.url;
80
+ }
81
+
82
+ // Array format (flux, etc: data.images[0].url)
71
83
  if (Array.isArray(data.images) && typeof data.images[0]?.url === "string") {
72
84
  if (typeof __DEV__ !== "undefined" && __DEV__) {
73
85
  console.log("[ImageExtractor] Found images[0].url:", data.images[0].url);