@umituz/react-native-onboarding 2.8.1 → 2.10.0
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/README.md +0 -0
- package/package.json +1 -1
- package/src/domain/entities/OnboardingOptions.ts +0 -0
- package/src/domain/entities/OnboardingQuestion.ts +0 -0
- package/src/domain/entities/OnboardingSlide.ts +0 -0
- package/src/domain/entities/OnboardingUserData.ts +0 -0
- package/src/index.ts +0 -0
- package/src/infrastructure/hooks/useOnboardingAnswers.ts +0 -0
- package/src/infrastructure/hooks/useOnboardingNavigation.ts +0 -0
- package/src/infrastructure/services/OnboardingSlideService.ts +0 -0
- package/src/infrastructure/services/OnboardingValidationService.ts +0 -0
- package/src/infrastructure/storage/OnboardingStore.ts +4 -4
- package/src/infrastructure/utils/gradientUtils.ts +0 -0
- package/src/presentation/components/OnboardingFooter.tsx +0 -0
- package/src/presentation/components/OnboardingHeader.tsx +0 -0
- package/src/presentation/components/OnboardingScreenContent.tsx +0 -0
- package/src/presentation/components/OnboardingSlide.tsx +0 -0
- package/src/presentation/components/QuestionRenderer.tsx +0 -0
- package/src/presentation/components/QuestionSlide.tsx +0 -0
- package/src/presentation/components/QuestionSlideHeader.tsx +0 -0
- package/src/presentation/components/questions/MultipleChoiceQuestion.tsx +0 -0
- package/src/presentation/components/questions/RatingQuestion.tsx +0 -0
- package/src/presentation/components/questions/SingleChoiceQuestion.tsx +0 -0
- package/src/presentation/components/questions/TextInputQuestion.tsx +0 -0
- package/src/presentation/hooks/useOnboardingScreenState.ts +0 -0
- package/src/presentation/screens/OnboardingScreen.tsx +5 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-onboarding",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Advanced onboarding flow for React Native apps with personalization questions, theme-aware colors, animations, and customizable slides. SOLID, DRY, KISS principles applied.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/index.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -63,7 +63,7 @@ export const useOnboardingStore = create<OnboardingStore>((set, get) => ({
|
|
|
63
63
|
isOnboardingComplete: isComplete,
|
|
64
64
|
userData,
|
|
65
65
|
loading: false,
|
|
66
|
-
error: completionResult.success ? null :
|
|
66
|
+
error: completionResult.success ? null : "Failed to load onboarding status",
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
69
|
|
|
@@ -82,7 +82,7 @@ export const useOnboardingStore = create<OnboardingStore>((set, get) => ({
|
|
|
82
82
|
isOnboardingComplete: result.success,
|
|
83
83
|
userData,
|
|
84
84
|
loading: false,
|
|
85
|
-
error: result.success ? null :
|
|
85
|
+
error: result.success ? null : "Failed to complete onboarding",
|
|
86
86
|
});
|
|
87
87
|
},
|
|
88
88
|
|
|
@@ -101,7 +101,7 @@ export const useOnboardingStore = create<OnboardingStore>((set, get) => ({
|
|
|
101
101
|
isOnboardingComplete: result.success,
|
|
102
102
|
userData,
|
|
103
103
|
loading: false,
|
|
104
|
-
error: result.success ? null :
|
|
104
|
+
error: result.success ? null : "Failed to skip onboarding",
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
107
|
|
|
@@ -118,7 +118,7 @@ export const useOnboardingStore = create<OnboardingStore>((set, get) => ({
|
|
|
118
118
|
currentStep: 0,
|
|
119
119
|
userData: { answers: {} },
|
|
120
120
|
loading: false,
|
|
121
|
-
error: result.success ? null :
|
|
121
|
+
error: result.success ? null : "Failed to reset onboarding",
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
124
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -96,6 +96,11 @@ export const OnboardingScreen: React.FC<OnboardingScreenProps> = ({
|
|
|
96
96
|
globalUseGradient,
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
// Early return if no slides - prevents rendering empty/broken screen
|
|
100
|
+
if (filteredSlides.length === 0) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
99
104
|
return (
|
|
100
105
|
<OnboardingScreenContent
|
|
101
106
|
containerStyle={[styles.container, containerStyle]}
|