@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.
Files changed (26) hide show
  1. package/README.md +0 -0
  2. package/package.json +1 -1
  3. package/src/domain/entities/OnboardingOptions.ts +0 -0
  4. package/src/domain/entities/OnboardingQuestion.ts +0 -0
  5. package/src/domain/entities/OnboardingSlide.ts +0 -0
  6. package/src/domain/entities/OnboardingUserData.ts +0 -0
  7. package/src/index.ts +0 -0
  8. package/src/infrastructure/hooks/useOnboardingAnswers.ts +0 -0
  9. package/src/infrastructure/hooks/useOnboardingNavigation.ts +0 -0
  10. package/src/infrastructure/services/OnboardingSlideService.ts +0 -0
  11. package/src/infrastructure/services/OnboardingValidationService.ts +0 -0
  12. package/src/infrastructure/storage/OnboardingStore.ts +4 -4
  13. package/src/infrastructure/utils/gradientUtils.ts +0 -0
  14. package/src/presentation/components/OnboardingFooter.tsx +0 -0
  15. package/src/presentation/components/OnboardingHeader.tsx +0 -0
  16. package/src/presentation/components/OnboardingScreenContent.tsx +0 -0
  17. package/src/presentation/components/OnboardingSlide.tsx +0 -0
  18. package/src/presentation/components/QuestionRenderer.tsx +0 -0
  19. package/src/presentation/components/QuestionSlide.tsx +0 -0
  20. package/src/presentation/components/QuestionSlideHeader.tsx +0 -0
  21. package/src/presentation/components/questions/MultipleChoiceQuestion.tsx +0 -0
  22. package/src/presentation/components/questions/RatingQuestion.tsx +0 -0
  23. package/src/presentation/components/questions/SingleChoiceQuestion.tsx +0 -0
  24. package/src/presentation/components/questions/TextInputQuestion.tsx +0 -0
  25. package/src/presentation/hooks/useOnboardingScreenState.ts +0 -0
  26. 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.8.1",
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
@@ -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 : completionResult.error?.message || 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 : result.error?.message || 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 : result.error?.message || 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 : result.error?.message || 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
@@ -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]}