@umituz/react-native-ai-generation-content 1.27.19 → 1.27.20

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.19",
3
+ "version": "1.27.20",
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",
@@ -34,7 +34,7 @@ export interface TextToImageGenerationState {
34
34
  export interface UseGenerationReturn {
35
35
  generationState: TextToImageGenerationState;
36
36
  totalCost: number;
37
- handleGenerate: (options?: { skipAuthCheck?: boolean }) => Promise<TextToImageGenerationResult | null>;
37
+ handleGenerate: () => Promise<TextToImageGenerationResult | null>;
38
38
  }
39
39
 
40
40
  const DEFAULT_ALERT_MESSAGES: AlertMessages = {
@@ -92,8 +92,7 @@ export function useGeneration(options: UseGenerationOptions): UseGenerationRetur
92
92
  },
93
93
  });
94
94
 
95
- const handleGenerate = useCallback(async (options?: { skipAuthCheck?: boolean }): Promise<TextToImageGenerationResult | null> => {
96
- const { skipAuthCheck = false } = options ?? {};
95
+ const handleGenerate = useCallback(async (): Promise<TextToImageGenerationResult | null> => {
97
96
  const trimmedPrompt = formState.prompt.trim();
98
97
 
99
98
  if (!trimmedPrompt) {
@@ -104,17 +103,14 @@ export function useGeneration(options: UseGenerationOptions): UseGenerationRetur
104
103
  return { success: false, error: "Prompt is required" };
105
104
  }
106
105
 
107
- // Auth check BEFORE generation (skip if retrying after successful auth)
108
- if (!skipAuthCheck && !callbacks.isAuthenticated()) {
106
+ // Auth check BEFORE generation
107
+ if (!callbacks.isAuthenticated()) {
109
108
  if (typeof __DEV__ !== "undefined" && __DEV__) {
110
109
  console.log("[TextToImage] Auth required");
111
110
  }
112
- // Pass retry callback to resume generation after auth (skip auth check on retry)
111
+ // Pass retry callback to resume generation after auth
113
112
  callbacks.onAuthRequired?.(() => {
114
- if (typeof __DEV__ !== "undefined" && __DEV__) {
115
- console.log("[TextToImage] Retrying generation after auth (skipping auth check)");
116
- }
117
- void handleGenerate({ skipAuthCheck: true });
113
+ void handleGenerate();
118
114
  });
119
115
  return { success: false, error: "Authentication required" };
120
116
  }