@umituz/react-native-ai-generation-content 1.22.3 → 1.22.5
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.22.
|
|
3
|
+
"version": "1.22.5",
|
|
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",
|
|
@@ -82,6 +82,7 @@ export interface CoupleFutureWizardTranslations {
|
|
|
82
82
|
/** Wizard data providers */
|
|
83
83
|
export interface CoupleFutureWizardData {
|
|
84
84
|
readonly scenarios: readonly WizardScenarioData[];
|
|
85
|
+
readonly selectedScenario?: WizardScenarioData;
|
|
85
86
|
readonly visualStyles?: readonly WizardVisualStyleOption[];
|
|
86
87
|
readonly surprisePrompts?: readonly string[];
|
|
87
88
|
}
|
|
@@ -90,6 +91,7 @@ export interface CoupleFutureWizardData {
|
|
|
90
91
|
export interface CoupleFutureWizardCallbacks extends FlowCallbacks {
|
|
91
92
|
readonly onScenarioSelect?: (scenario: WizardScenarioData) => void;
|
|
92
93
|
readonly onPartnerUpload?: (partnerId: "A" | "B", image: FlowUploadedImageData) => void;
|
|
94
|
+
readonly onBackToScenarioSelection?: () => void;
|
|
93
95
|
readonly requireFeature?: (callback: () => void) => boolean;
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Complete wizard component for couple future generation flow
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useCallback, useMemo } from "react";
|
|
6
|
+
import React, { useCallback, useMemo, useEffect } from "react";
|
|
7
7
|
import { View, StyleSheet } from "react-native";
|
|
8
8
|
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import { useFlow, resetFlowStore } from "../../../../infrastructure/flow";
|
|
@@ -40,6 +40,16 @@ export const CoupleFutureWizard: React.FC<CoupleFutureWizardProps> = ({
|
|
|
40
40
|
|
|
41
41
|
const flow = useFlow({ steps: stepDefinitions });
|
|
42
42
|
|
|
43
|
+
// Auto-advance flow if scenario is pre-selected (from CategoryNavigationContainer)
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const isAtScenarioSelectionStep = flow.currentStep?.type === StepType.SCENARIO_SELECTION;
|
|
46
|
+
const hasPreSelectedScenario = data.selectedScenario && !flow.selectedCategory;
|
|
47
|
+
|
|
48
|
+
if (isAtScenarioSelectionStep && hasPreSelectedScenario) {
|
|
49
|
+
flow.nextStep();
|
|
50
|
+
}
|
|
51
|
+
}, [flow, data.selectedScenario]);
|
|
52
|
+
|
|
43
53
|
const handleScenarioSelect = useCallback(
|
|
44
54
|
(scenario: WizardScenarioData) => {
|
|
45
55
|
flow.setCategory(scenario);
|