@umituz/react-native-onboarding 1.0.2 → 1.0.4

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 +17 -7
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.4",
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
@@ -30,7 +30,9 @@
30
30
  // DOMAIN LAYER - Entities and Interfaces
31
31
  // =============================================================================
32
32
 
33
- export type { OnboardingSlide } from "./domain/entities/OnboardingSlide";
33
+ // Export type with a different name to avoid conflict with component
34
+ export type { OnboardingSlide as OnboardingSlideType } from "./domain/entities/OnboardingSlide";
35
+ // Re-export as OnboardingSlide for backward compatibility (after component export)
34
36
  export type { OnboardingOptions } from "./domain/entities/OnboardingOptions";
35
37
 
36
38
  // =============================================================================
@@ -55,10 +57,18 @@ export { OnboardingHeader, type OnboardingHeaderProps } from "./presentation/com
55
57
  export { OnboardingFooter, type OnboardingFooterProps } from "./presentation/components/OnboardingFooter";
56
58
 
57
59
  // 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";
60
+ // Note: TypeScript doesn't allow exporting both a type and a value with the same name in the same scope
61
+ // So we export the component, and the type is exported above as OnboardingSlideType
62
+ import { OnboardingSlide as OnboardingSlideComponent } from "./presentation/components/OnboardingSlide";
63
+ export { OnboardingSlideComponent };
64
+ export type { OnboardingSlideProps } from "./presentation/components/OnboardingSlide";
65
+
66
+ // Export component as OnboardingSlide for backward compatibility
67
+ // Users can import type as: import type { OnboardingSlideType } from '@umituz/react-native-onboarding'
68
+ // And component as: import { OnboardingSlide } from '@umituz/react-native-onboarding'
69
+ export { OnboardingSlideComponent as OnboardingSlide };
70
+
71
+ // Re-export type as OnboardingSlide for backward compatibility (after component export)
72
+ // This works because TypeScript allows type and value with same name in different declarations
73
+ export type { OnboardingSlideType as OnboardingSlide };
64
74