@umituz/react-native-onboarding 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-onboarding",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Generic onboarding flow for React Native apps with gradient backgrounds, animations, and customizable slides. SOLID, DRY, KISS principles applied.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -55,10 +55,15 @@ export { OnboardingHeader, type OnboardingHeaderProps } from "./presentation/com
55
55
  export { OnboardingFooter, type OnboardingFooterProps } from "./presentation/components/OnboardingFooter";
56
56
 
57
57
  // Export OnboardingSlide component
58
- // Note: We export it with the same name as the type, which TypeScript allows
59
- // because one is a type (from domain) and one is a value (component)
60
- // Users can import both:
61
- // import type { OnboardingSlide } from '@umituz/react-native-onboarding'; // type
62
- // import { OnboardingSlide } from '@umituz/react-native-onboarding'; // component
63
- export { OnboardingSlide, type OnboardingSlideProps } from "./presentation/components/OnboardingSlide";
58
+ // Note: TypeScript doesn't allow exporting both a type and a value with the same name in the same scope
59
+ // So we export the component with a different name, and users can import the type separately
60
+ import { OnboardingSlide as OnboardingSlideComponent } from "./presentation/components/OnboardingSlide";
61
+ export { OnboardingSlideComponent };
62
+ export type { OnboardingSlideProps } from "./presentation/components/OnboardingSlide";
63
+
64
+ // For backward compatibility, export component as OnboardingSlide
65
+ // Users should import type as: import type { OnboardingSlide } from '@umituz/react-native-onboarding'
66
+ // And component as: import { OnboardingSlideComponent } from '@umituz/react-native-onboarding'
67
+ // Or use the alias: import { OnboardingSlideComponent as OnboardingSlide } from '@umituz/react-native-onboarding'
68
+ export { OnboardingSlideComponent as OnboardingSlide };
64
69