@umituz/react-native-onboarding 1.0.3 → 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 +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-onboarding",
3
- "version": "1.0.3",
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
  // =============================================================================
@@ -56,14 +58,17 @@ export { OnboardingFooter, type OnboardingFooterProps } from "./presentation/com
56
58
 
57
59
  // Export OnboardingSlide component
58
60
  // 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
61
+ // So we export the component, and the type is exported above as OnboardingSlideType
60
62
  import { OnboardingSlide as OnboardingSlideComponent } from "./presentation/components/OnboardingSlide";
61
63
  export { OnboardingSlideComponent };
62
64
  export type { OnboardingSlideProps } from "./presentation/components/OnboardingSlide";
63
65
 
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'
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'
68
69
  export { OnboardingSlideComponent as OnboardingSlide };
69
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 };
74
+