@umituz/react-native-ai-generation-content 1.57.3 → 1.57.4

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.57.3",
3
+ "version": "1.57.4",
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",
@@ -71,12 +71,42 @@ export const ImageToVideoWizardFlow: React.FC<ImageToVideoWizardFlowProps> = (pr
71
71
 
72
72
  const handleGenerationStart = useCallback(
73
73
  (_data: Record<string, unknown>, proceed: () => void) => {
74
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
75
+ console.log("[ImageToVideoWizardFlow] handleGenerationStart:", {
76
+ isOffline,
77
+ isAuthenticated,
78
+ hasPremium,
79
+ creditBalance,
80
+ creditCost,
81
+ });
82
+ }
74
83
  // Network check - must be online to generate
75
- if (isOffline) { onNetworkError?.(); return; }
84
+ if (isOffline) {
85
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
86
+ console.log("[ImageToVideoWizardFlow] Blocked: offline");
87
+ }
88
+ onNetworkError?.();
89
+ return;
90
+ }
76
91
  // Auth check - must be authenticated
77
- if (!isAuthenticated) { onShowAuthModal(proceed); return; }
92
+ if (!isAuthenticated) {
93
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
94
+ console.log("[ImageToVideoWizardFlow] Blocked: not authenticated, showing auth modal");
95
+ }
96
+ onShowAuthModal(proceed);
97
+ return;
98
+ }
78
99
  // Credit check - must have enough credits
79
- if (!hasPremium && isCreditsLoaded && creditBalance < creditCost) { onShowPaywall(); return; }
100
+ if (!hasPremium && isCreditsLoaded && creditBalance < creditCost) {
101
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
102
+ console.log("[ImageToVideoWizardFlow] Blocked: insufficient credits, showing paywall");
103
+ }
104
+ onShowPaywall();
105
+ return;
106
+ }
107
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
108
+ console.log("[ImageToVideoWizardFlow] All checks passed, proceeding");
109
+ }
80
110
  proceed();
81
111
  },
82
112
  [isOffline, isAuthenticated, hasPremium, creditBalance, creditCost, isCreditsLoaded, onNetworkError, onShowAuthModal, onShowPaywall],