@umituz/react-native-ai-generation-content 1.27.5 → 1.27.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.27.5",
3
+ "version": "1.27.6",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -198,7 +198,8 @@ export interface ScenarioData {
198
198
  readonly icon?: string;
199
199
  readonly imageUrl?: string;
200
200
  readonly previewImageUrl?: string;
201
- readonly aiPrompt: string;
201
+ /** AI prompt - optional if prompt comes from wizard data */
202
+ readonly aiPrompt?: string;
202
203
  readonly storyTemplate?: string;
203
204
  readonly requiresPhoto?: boolean;
204
205
  readonly hidden?: boolean;
@@ -3,6 +3,8 @@
3
3
  * Provides save to gallery and share functionality for generated media
4
4
  */
5
5
 
6
+ declare const __DEV__: boolean;
7
+
6
8
  export interface MediaActionResult {
7
9
  readonly success: boolean;
8
10
  readonly error?: string;
@@ -85,12 +87,8 @@ export const saveMediaToGallery = async (
85
87
  return { success: true };
86
88
  } catch (error) {
87
89
  // Debug logging in development
88
- try {
89
- if ((global as Record<string, unknown>).__DEV__) {
90
- console.error("[MediaActions] Save failed:", error);
91
- }
92
- } catch {
93
- // Ignore if __DEV__ check fails
90
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
91
+ console.error("[MediaActions] Save failed:", error);
94
92
  }
95
93
  const errorMsg = translations?.saveFailed || "Failed to save media";
96
94
  toast?.show({
@@ -139,12 +137,8 @@ export const shareMedia = async (
139
137
  return { success: true };
140
138
  } catch (error) {
141
139
  // Debug logging in development
142
- try {
143
- if ((global as Record<string, unknown>).__DEV__) {
144
- console.error("[MediaActions] Share failed:", error);
145
- }
146
- } catch {
147
- // Ignore if __DEV__ check fails
140
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
141
+ console.error("[MediaActions] Share failed:", error);
148
142
  }
149
143
  const errorMsg = translations?.shareFailed || "Failed to share media";
150
144
  toast?.show({