@umituz/react-native-splash 1.5.3 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-splash",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Generic splash screen for React Native apps with animations, gradients, and customizable branding. SOLID, DRY, KISS principles applied.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -28,10 +28,10 @@ export const adjustColorBrightness = (hex: string, percent: number): string => {
28
28
  /**
29
29
  * Get default gradient colors based on theme
30
30
  */
31
- export const getDefaultGradient = (isDark: boolean): string[] => {
31
+ export const getDefaultGradient = (isDark: boolean): readonly string[] => {
32
32
  return isDark
33
- ? ["#1E1B4B", "#312E81", "#4C1D95", "#6B21A8"] // Dark indigo to purple
34
- : ["#6366F1", "#8B5CF6", "#A855F7", "#EC4899"]; // Indigo to pink
33
+ ? (["#1E1B4B", "#312E81", "#4C1D95", "#6B21A8"] as const) // Dark indigo to purple
34
+ : (["#6366F1", "#8B5CF6", "#A855F7", "#EC4899"] as const); // Indigo to pink
35
35
  };
36
36
 
37
37
  /**
@@ -40,17 +40,17 @@ export const getDefaultGradient = (isDark: boolean): string[] => {
40
40
  export const generateGradientFromColor = (
41
41
  backgroundColor: string,
42
42
  isDark: boolean,
43
- ): string[] => {
43
+ ): readonly string[] => {
44
44
  return isDark
45
- ? [
45
+ ? ([
46
46
  backgroundColor,
47
47
  adjustColorBrightness(backgroundColor, -20),
48
48
  adjustColorBrightness(backgroundColor, -30),
49
- ]
50
- : [
49
+ ] as const)
50
+ : ([
51
51
  backgroundColor,
52
52
  adjustColorBrightness(backgroundColor, 10),
53
53
  adjustColorBrightness(backgroundColor, 20),
54
- ];
54
+ ] as const);
55
55
  };
56
56