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

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.20",
3
+ "version": "1.27.21",
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",
@@ -103,26 +103,8 @@ export function useGeneration(options: UseGenerationOptions): UseGenerationRetur
103
103
  return { success: false, error: "Prompt is required" };
104
104
  }
105
105
 
106
- // Auth check BEFORE generation
107
- if (!callbacks.isAuthenticated()) {
108
- if (typeof __DEV__ !== "undefined" && __DEV__) {
109
- console.log("[TextToImage] Auth required");
110
- }
111
- // Pass retry callback to resume generation after auth
112
- callbacks.onAuthRequired?.(() => {
113
- void handleGenerate();
114
- });
115
- return { success: false, error: "Authentication required" };
116
- }
117
-
118
- // Credit check BEFORE generation
119
- if (!callbacks.canAfford(totalCost)) {
120
- if (typeof __DEV__ !== "undefined" && __DEV__) {
121
- console.log("[TextToImage] Insufficient credits", { totalCost });
122
- }
123
- callbacks.onCreditsRequired?.(totalCost);
124
- return { success: false, error: "Insufficient credits" };
125
- }
106
+ // Auth and credit checks should be handled by useFeatureGate before calling this
107
+ // Only keeping prompt validation here
126
108
 
127
109
  const request: TextToImageGenerationRequest = {
128
110
  prompt: trimmedPrompt,
@@ -144,7 +126,7 @@ export function useGeneration(options: UseGenerationOptions): UseGenerationRetur
144
126
 
145
127
  // Return result based on orchestrator state
146
128
  return null; // Result handled via callbacks
147
- }, [formState, generate, callbacks, totalCost]);
129
+ }, [formState, generate, callbacks]);
148
130
 
149
131
  return {
150
132
  generationState: {