@umituz/react-native-ai-generation-content 1.75.0 → 1.75.2

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.75.0",
3
+ "version": "1.75.2",
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",
@@ -70,7 +70,22 @@ export const createFlowStore = (config: FlowStoreConfig) => {
70
70
  nextStep: () => {
71
71
  const { stepDefinitions, currentStepIndex, completedSteps, currentStepId } = get();
72
72
  const nextIndex = currentStepIndex + 1;
73
- if (nextIndex >= stepDefinitions.length) return;
73
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
74
+ console.log("[FlowStore] nextStep called", {
75
+ currentStepIndex,
76
+ nextIndex,
77
+ totalSteps: stepDefinitions.length,
78
+ currentStepId,
79
+ nextStepId: stepDefinitions[nextIndex]?.id,
80
+ nextStepType: stepDefinitions[nextIndex]?.type,
81
+ });
82
+ }
83
+ if (nextIndex >= stepDefinitions.length) {
84
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
85
+ console.log("[FlowStore] nextStep BLOCKED - already at last step");
86
+ }
87
+ return;
88
+ }
74
89
  set({
75
90
  currentStepId: stepDefinitions[nextIndex].id,
76
91
  currentStepIndex: nextIndex,
@@ -89,6 +89,13 @@ export const WizardFlowContent: React.FC<WizardFlowContentProps> = (props) => {
89
89
  [featureConfig, skipResultStep],
90
90
  );
91
91
 
92
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
93
+ console.log("[WizardFlowContent] flowSteps built", {
94
+ totalSteps: flowSteps.length,
95
+ steps: flowSteps.map((s, i) => `${i}: ${s.id} (${s.type})`),
96
+ });
97
+ }
98
+
92
99
  const flow = useFlow({ steps: flowSteps, initialStepIndex: 0 });
93
100
  const {
94
101
  currentStep,
@@ -26,6 +26,13 @@ export function renderPhotoUploadStep({
26
26
  t,
27
27
  creditCost,
28
28
  }: PhotoUploadStepProps): React.ReactElement {
29
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
30
+ console.log("[renderPhotoUploadStep] Rendering", {
31
+ stepId: step.id,
32
+ hasOnPhotoContinue: !!onPhotoContinue,
33
+ creditCost,
34
+ });
35
+ }
29
36
  const wizardConfig = getWizardStepConfig(step.config);
30
37
  const titleKey = wizardConfig?.titleKey ?? `wizard.steps.${step.id}.title`;
31
38
  const subtitleKey = wizardConfig?.subtitleKey ?? `wizard.steps.${step.id}.subtitle`;
@@ -96,6 +96,15 @@ export function useWizardFlowHandlers(props: UseWizardFlowHandlersProps) {
96
96
 
97
97
  const handleNextStep = useCallback(() => {
98
98
  const nextStepDef = flowSteps[currentStepIndex + 1];
99
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
100
+ console.log("[handleNextStep] Called", {
101
+ currentStepIndex,
102
+ nextStepType: nextStepDef?.type,
103
+ nextStepId: nextStepDef?.id,
104
+ totalSteps: flowSteps.length,
105
+ hasOnGenerationStart: !!onGenerationStart,
106
+ });
107
+ }
99
108
  if (nextStepDef?.type === StepType.GENERATING && onGenerationStart) {
100
109
  onGenerationStart(customData, nextStep);
101
110
  return;
@@ -105,10 +114,13 @@ export function useWizardFlowHandlers(props: UseWizardFlowHandlersProps) {
105
114
 
106
115
  const handlePhotoContinue = useCallback(
107
116
  (stepId: string, image: UploadedImage) => {
117
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
118
+ console.log("[handlePhotoContinue] Called", { stepId, hasImage: !!image, currentStepIndex });
119
+ }
108
120
  setCustomData(stepId, image);
109
121
  handleNextStep();
110
122
  },
111
- [setCustomData, handleNextStep],
123
+ [setCustomData, handleNextStep, currentStepIndex],
112
124
  );
113
125
 
114
126
  const handleSubmitRating = useCallback(
@@ -89,7 +89,23 @@ export const GenericPhotoUploadScreen: React.FC<PhotoUploadScreenProps> = ({
89
89
  });
90
90
 
91
91
  const handleContinuePress = () => {
92
- if (!canContinue || !image) return;
92
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
93
+ console.log("[GenericPhotoUploadScreen] handleContinuePress called", {
94
+ canContinue,
95
+ hasImage: !!image,
96
+ imageUri: image?.uri?.substring(0, 50),
97
+ stepId,
98
+ });
99
+ }
100
+ if (!canContinue || !image) {
101
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
102
+ console.log("[GenericPhotoUploadScreen] BLOCKED - canContinue:", canContinue, "image:", !!image);
103
+ }
104
+ return;
105
+ }
106
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
107
+ console.log("[GenericPhotoUploadScreen] Calling onContinue with image");
108
+ }
93
109
  onContinue(image);
94
110
  };
95
111