@umituz/react-native-ai-generation-content 1.25.2 → 1.25.3
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.25.
|
|
3
|
+
"version": "1.25.3",
|
|
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",
|
|
@@ -25,7 +25,7 @@ import { buildFlowStepsFromWizard } from "../../infrastructure/builders/dynamic-
|
|
|
25
25
|
export interface GenericWizardFlowProps {
|
|
26
26
|
readonly featureConfig: WizardFeatureConfig;
|
|
27
27
|
readonly onStepChange?: (stepId: string, stepType: StepType | string) => void;
|
|
28
|
-
readonly onGenerationStart?: (data: Record<string, unknown
|
|
28
|
+
readonly onGenerationStart?: (data: Record<string, unknown>, proceedToGenerating: () => void) => void;
|
|
29
29
|
readonly onBack?: () => void;
|
|
30
30
|
readonly t: (key: string) => string;
|
|
31
31
|
readonly translations?: Record<string, string>;
|
|
@@ -104,12 +104,21 @@ export const GenericWizardFlow: React.FC<GenericWizardFlowProps> = ({
|
|
|
104
104
|
// Check if this is the last step before generating
|
|
105
105
|
if (flow.currentStepIndex === flowSteps.length - 2) {
|
|
106
106
|
// Next step is GENERATING
|
|
107
|
+
// Notify parent and provide callback to proceed to generating
|
|
108
|
+
// Parent will call proceedToGenerating() after feature gate passes
|
|
107
109
|
if (onGenerationStart) {
|
|
108
|
-
onGenerationStart(flow.customData)
|
|
110
|
+
onGenerationStart(flow.customData, () => {
|
|
111
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
112
|
+
console.log("[GenericWizardFlow] Proceeding to GENERATING step");
|
|
113
|
+
}
|
|
114
|
+
flow.nextStep();
|
|
115
|
+
});
|
|
109
116
|
}
|
|
117
|
+
// DON'T call flow.nextStep() here - parent will call it via proceedToGenerating callback
|
|
118
|
+
return;
|
|
110
119
|
}
|
|
111
120
|
|
|
112
|
-
// Move to next step
|
|
121
|
+
// Move to next step (for all non-generation steps)
|
|
113
122
|
flow.nextStep();
|
|
114
123
|
},
|
|
115
124
|
[flow, flowSteps.length, onGenerationStart],
|