@zezosoft/zezo-ott-react-native-ui-kit 1.1.5 → 1.1.7
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/lib/module/components/Content/Card/Sliders/Styles/Three.js +5 -4
- package/lib/module/components/Content/Card/Sliders/Styles/Three.js.map +1 -1
- package/lib/module/components/Headers/Four.js +1 -1
- package/lib/module/components/Headers/Three.js +2 -1
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Three.d.ts.map +1 -1
- package/package.json +2 -14
- package/src/Styles/globalStyles.ts +0 -70
- package/src/assets/animations/135037-payment-processing-error.json +0 -1347
- package/src/assets/animations/7227-vui-animation.json +0 -3377
- package/src/assets/animations/Failed.json +0 -2103
- package/src/assets/animations/Pending.json +0 -522
- package/src/assets/animations/Successful.json +0 -2289
- package/src/assets/animations/heart.json +0 -788
- package/src/assets/animations/succesfull-payment.json +0 -2379
- package/src/assets/animations/voice-icon.json +0 -542
- package/src/assets/img/back.png +0 -0
- package/src/assets/img/bottom-panel.png +0 -0
- package/src/assets/img/camera.png +0 -0
- package/src/assets/img/camera2.png +0 -0
- package/src/assets/img/home.png +0 -0
- package/src/assets/img/lock.png +0 -0
- package/src/assets/img/play.png +0 -0
- package/src/assets/img/profile.jpg +0 -0
- package/src/assets/img/qr-code.png +0 -0
- package/src/assets/img/shadow.png +0 -0
- package/src/assets/img/shadow2.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/svg/Account.svg +0 -4
- package/src/assets/svg/Favourite.svg +0 -14
- package/src/assets/svg/Upcoming.svg +0 -4
- package/src/assets/svg/content-error.svg +0 -28
- package/src/assets/svg/download.svg +0 -3
- package/src/assets/svg/eye-off.svg +0 -10
- package/src/assets/svg/favorites.svg +0 -3
- package/src/assets/svg/h.svg +0 -4
- package/src/assets/svg/home.svg +0 -5
- package/src/assets/svg/home1.svg +0 -3
- package/src/assets/svg/menu-bar.svg +0 -4
- package/src/assets/svg/my-space.svg +0 -14
- package/src/assets/svg/play-icon-with-bg.svg +0 -5
- package/src/assets/svg/profile.svg +0 -4
- package/src/assets/svg/search.svg +0 -5
- package/src/assets/svg/search1.svg +0 -4
- package/src/assets/svg/server-error.svg +0 -139
- package/src/components/Account/Account.tsx +0 -367
- package/src/components/Account/index.ts +0 -1
- package/src/components/Alert/AlertDialog.tsx +0 -247
- package/src/components/Alert/UAAlert.tsx +0 -170
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +0 -419
- package/src/components/Auth/One/ForgotPassword/ForgotPassword.tsx +0 -324
- package/src/components/Auth/One/Login/LoginWithEmail.tsx +0 -455
- package/src/components/Auth/One/Login/LoginWithPhone.tsx +0 -306
- package/src/components/Auth/One/OTP/OTP.tsx +0 -465
- package/src/components/Auth/One/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/One/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/One/SignUp/SignUp.tsx +0 -479
- package/src/components/Auth/One/SplashScreen/SplashScreen.tsx +0 -249
- package/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.tsx +0 -103
- package/src/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -174
- package/src/components/Auth/One/index.ts +0 -24
- package/src/components/Auth/Two/AuthHeader/AuthHeader.tsx +0 -108
- package/src/components/Auth/Two/ForgotPassword/ForgotPassword.tsx +0 -335
- package/src/components/Auth/Two/Login/AuthLoginShell.tsx +0 -173
- package/src/components/Auth/Two/Login/LoginWithEmail.tsx +0 -279
- package/src/components/Auth/Two/Login/LoginWithPhone.tsx +0 -188
- package/src/components/Auth/Two/OTP/OTP.tsx +0 -465
- package/src/components/Auth/Two/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/Two/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/Two/SignUp/SignUp.tsx +0 -472
- package/src/components/Auth/Two/SplashScreen/SplashScreen.tsx +0 -248
- package/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.tsx +0 -92
- package/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -178
- package/src/components/Auth/Two/index.ts +0 -28
- package/src/components/Auth/index.ts +0 -11
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +0 -174
- package/src/components/BackgroundLayout/BackgroundLayoutOne.tsx +0 -56
- package/src/components/BlogView/BlogView.tsx +0 -276
- package/src/components/BlogView/index.ts +0 -8
- package/src/components/BlurView/BlurView.tsx +0 -199
- package/src/components/BlurView/index.ts +0 -7
- package/src/components/BottomSheet/BottomSheet.tsx +0 -200
- package/src/components/BottomSheet/BottomSheetOne.tsx +0 -220
- package/src/components/BottomSheet/index.ts +0 -4
- package/src/components/Button/BackBtn.tsx +0 -168
- package/src/components/Button/MenuBtn.tsx +0 -229
- package/src/components/Button/PrimaryBtn.tsx +0 -134
- package/src/components/Button/SecondaryBtn.tsx +0 -132
- package/src/components/Button/TextButton.tsx +0 -145
- package/src/components/Button/index.ts +0 -18
- package/src/components/Content/Card/Category/Category.tsx +0 -436
- package/src/components/Content/Card/Category/CategroyTwo.tsx +0 -429
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +0 -624
- package/src/components/Content/Card/Sliders/Styles/One.tsx +0 -490
- package/src/components/Content/Card/Sliders/Styles/Three.tsx +0 -935
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +0 -391
- package/src/components/Content/Card/Sliders/index.ts +0 -17
- package/src/components/Content/Card/Styles/Five.tsx +0 -385
- package/src/components/Content/Card/Styles/Four.tsx +0 -379
- package/src/components/Content/Card/Styles/One.tsx +0 -386
- package/src/components/Content/Card/Styles/RotateInOut.tsx +0 -413
- package/src/components/Content/Card/Styles/Six.tsx +0 -392
- package/src/components/Content/Card/Styles/Three.tsx +0 -314
- package/src/components/Content/Card/Styles/TopTen.tsx +0 -412
- package/src/components/Content/Card/Styles/Two.tsx +0 -416
- package/src/components/Content/Card/components/AdsPoster.tsx +0 -202
- package/src/components/Content/Card/components/CardPoster.tsx +0 -377
- package/src/components/Content/Card/components/NavigateToMore.tsx +0 -97
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +0 -129
- package/src/components/Content/Card/components/ShowAllButton.tsx +0 -92
- package/src/components/Content/Card/components/ThumbnailCard.tsx +0 -234
- package/src/components/Content/Card/components/index.ts +0 -1
- package/src/components/Content/Card/index.ts +0 -30
- package/src/components/Content/Content.tsx +0 -315
- package/src/components/Content/Sections.tsx +0 -238
- package/src/components/Content/types.ts +0 -176
- package/src/components/ContentView/MoreContentList.tsx +0 -327
- package/src/components/ContentView/One/ContentViewOne.tsx +0 -243
- package/src/components/ContentView/One/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/One/components/CastCard.tsx +0 -265
- package/src/components/ContentView/One/components/EpisodeCard.tsx +0 -535
- package/src/components/ContentView/One/components/GenreTags.tsx +0 -132
- package/src/components/ContentView/One/components/HeroBanner.tsx +0 -357
- package/src/components/ContentView/One/components/MiniInfo.tsx +0 -356
- package/src/components/ContentView/One/components/PlayButton.tsx +0 -56
- package/src/components/ContentView/One/components/Title.tsx +0 -149
- package/src/components/ContentView/One/components/TrailerButton.tsx +0 -76
- package/src/components/ContentView/Two/ContentViewTwo.tsx +0 -343
- package/src/components/ContentView/Two/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/Two/components/Details.tsx +0 -193
- package/src/components/ContentView/Two/components/EpisodeCard.tsx +0 -602
- package/src/components/ContentView/Two/components/GenreTags.tsx +0 -123
- package/src/components/ContentView/Two/components/HeroBanner.tsx +0 -402
- package/src/components/ContentView/Two/components/LikeShareActions.tsx +0 -125
- package/src/components/ContentView/Two/components/MoreLikeThisContentList .tsx +0 -305
- package/src/components/ContentView/Two/components/PlayOrTrailer.tsx +0 -133
- package/src/components/ContentView/Two/components/SectionTabs.tsx +0 -177
- package/src/components/ContentView/Two/components/Title.tsx +0 -226
- package/src/components/ContentView/Two/components/index.ts +0 -15
- package/src/components/ContentView/index.ts +0 -13
- package/src/components/Fallbacks/NoContentFallback.tsx +0 -176
- package/src/components/Fallbacks/NotFoundFallback.tsx +0 -94
- package/src/components/Fallbacks/index.ts +0 -2
- package/src/components/Headers/AppHeader.tsx +0 -150
- package/src/components/Headers/Four.tsx +0 -83
- package/src/components/Headers/One.tsx +0 -115
- package/src/components/Headers/Three.tsx +0 -135
- package/src/components/Headers/Two.tsx +0 -100
- package/src/components/Headers/index.ts +0 -18
- package/src/components/Input/Input.ts +0 -20
- package/src/components/Input/InputOne.tsx +0 -259
- package/src/components/Input/InputThree.tsx +0 -212
- package/src/components/Input/InputTwo.tsx +0 -212
- package/src/components/Input/PhoneNumberInput.tsx +0 -431
- package/src/components/Input/PhoneNumberInputTwo.tsx +0 -418
- package/src/components/Keyboard/HideKeyboard.tsx +0 -88
- package/src/components/Loader/Loader.tsx +0 -44
- package/src/components/Logo/Logo.tsx +0 -145
- package/src/components/NewRelease/NewReleaseSheet.tsx +0 -250
- package/src/components/NewRelease/index.ts +0 -1
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +0 -221
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +0 -314
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +0 -196
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +0 -95
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +0 -163
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +0 -210
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +0 -146
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +0 -154
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +0 -264
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +0 -494
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +0 -184
- package/src/components/Reels/ReelsSeries/components/Episodes.tsx +0 -154
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +0 -41
- package/src/components/Reels/ReelsSeries/components/Like.tsx +0 -40
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +0 -79
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +0 -332
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +0 -187
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +0 -80
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +0 -2
- package/src/components/Reels/ReelsSeries/types.ts +0 -54
- package/src/components/Reels/ReelsSeries/useReelsWatchProgress.ts +0 -85
- package/src/components/Reels/ReelsSeries/utils/quality.ts +0 -48
- package/src/components/Reels/index.ts +0 -9
- package/src/components/Reels/utils/Controls/gestureUtils.ts +0 -42
- package/src/components/Reels/utils/Controls/index.ts +0 -4
- package/src/components/Reels/utils/Controls/overlayUtils.ts +0 -35
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +0 -25
- package/src/components/Reels/utils/Controls/videoRef.ts +0 -4
- package/src/components/Reels/utils/index.ts +0 -1
- package/src/components/Reels/utils/timeoutUtils.ts +0 -29
- package/src/components/Search/One.tsx +0 -256
- package/src/components/Search/components/RecentSearchesSection.tsx +0 -181
- package/src/components/Search/components/SearchCard.tsx +0 -275
- package/src/components/Search/index.ts +0 -16
- package/src/components/Settings/AppSettings.tsx +0 -428
- package/src/components/Settings/index.ts +0 -1
- package/src/components/Subscription/SubOne.tsx +0 -874
- package/src/components/Subscription/index.ts +0 -12
- package/src/components/TabBar/One.tsx +0 -148
- package/src/components/TabBar/Three.tsx +0 -169
- package/src/components/TabBar/Two.tsx +0 -189
- package/src/components/TabBar/index.ts +0 -20
- package/src/components/Text/Text.tsx +0 -85
- package/src/components/Text/index.ts +0 -5
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +0 -468
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +0 -278
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +0 -494
- package/src/components/User/WatchHistory/WatchHistory.tsx +0 -227
- package/src/components/User/WatchLater/WatchLater.tsx +0 -397
- package/src/components/User/components/UserAvatar.tsx +0 -120
- package/src/components/User/components/UserSection.tsx +0 -228
- package/src/components/User/index.ts +0 -18
- package/src/components/View/View.tsx +0 -37
- package/src/components/View/index.ts +0 -5
- package/src/components/common/AppStatusBar.tsx +0 -57
- package/src/components/index.ts +0 -29
- package/src/components/layout/SafeAreaWrapper.tsx +0 -45
- package/src/components/layout/index.ts +0 -1
- package/src/constants/dummySections.ts +0 -98
- package/src/hooks/Images/index.ts +0 -2
- package/src/hooks/Images/useImageLoader.ts +0 -206
- package/src/hooks/Images/useImageValidation.ts +0 -36
- package/src/hooks/index.ts +0 -17
- package/src/hooks/useAdTracking.ts +0 -349
- package/src/hooks/useCards.ts +0 -228
- package/src/hooks/useDebounce.ts +0 -35
- package/src/hooks/useKeyboard.ts +0 -43
- package/src/hooks/useNavigationMode.ts +0 -46
- package/src/hooks/usePaginatedSection.ts +0 -101
- package/src/hooks/usePrevious.ts +0 -28
- package/src/hooks/useSafeCallback.ts +0 -43
- package/src/hooks/useSkeletonItems.ts +0 -30
- package/src/hooks/useSplashCache.ts +0 -186
- package/src/hooks/useThemeColors.ts +0 -51
- package/src/index.tsx +0 -8
- package/src/store/RecentSearchesStore.ts +0 -78
- package/src/store/splashStore.ts +0 -91
- package/src/store/themeStore.ts +0 -43
- package/src/theme/ThemeProvider.tsx +0 -112
- package/src/theme/hook/index.ts +0 -1
- package/src/theme/hook/useInternalTheme.ts +0 -98
- package/src/theme/index.ts +0 -7
- package/src/theme/themes.ts +0 -336
- package/src/theme/utils/validateColor.ts +0 -127
- package/src/types/content/content-view.types.ts +0 -206
- package/src/types/hook/index.ts +0 -5
- package/src/types/hook/usePaginatedSetion.ts +0 -19
- package/src/types/index.ts +0 -7
- package/src/types/sections/index.ts +0 -84
- package/src/utils/Display.ts +0 -14
- package/src/utils/Formater.ts +0 -14
- package/src/utils/PlatformSelector.ts +0 -29
- package/src/utils/SizeMatters.ts +0 -7
- package/src/utils/Spacing.ts +0 -27
- package/src/utils/colorUtils.ts +0 -70
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import React, { useMemo, useCallback, memo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
ImageBackground,
|
|
6
|
-
type ViewStyle,
|
|
7
|
-
type ImageStyle,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
10
|
-
import type { ThemeOverride } from '../../theme/themes';
|
|
11
|
-
import { useSplashCache } from '../../hooks/useSplashCache';
|
|
12
|
-
import { useInternalTheme } from '../../theme/hook';
|
|
13
|
-
import { AppStatusBar } from '../common/AppStatusBar';
|
|
14
|
-
|
|
15
|
-
interface BackgroundLayoutProps {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
backgroundImage?: string | null;
|
|
18
|
-
backgroundColor?: string | null;
|
|
19
|
-
gradientSplitBackground?: number;
|
|
20
|
-
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
|
21
|
-
innerContainerStyle?: ViewStyle;
|
|
22
|
-
theme?: ThemeOverride;
|
|
23
|
-
onImageError?: (error: Error) => void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const BackgroundLayoutComponent: React.FC<BackgroundLayoutProps> = (props) => {
|
|
27
|
-
const {
|
|
28
|
-
children,
|
|
29
|
-
backgroundImage: backgroundImageUri,
|
|
30
|
-
backgroundColor: bgColor,
|
|
31
|
-
gradientSplitBackground = 0.4,
|
|
32
|
-
resizeMode = 'cover',
|
|
33
|
-
innerContainerStyle,
|
|
34
|
-
onImageError,
|
|
35
|
-
theme: themeOverride,
|
|
36
|
-
} = props;
|
|
37
|
-
|
|
38
|
-
const { theme } = useInternalTheme(themeOverride);
|
|
39
|
-
const {
|
|
40
|
-
data: { backgroundPath: localPathBackground },
|
|
41
|
-
} = useSplashCache({
|
|
42
|
-
backgroundUrl: backgroundImageUri || undefined,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const resolvedImageUri = useMemo(() => {
|
|
46
|
-
if (!backgroundImageUri) return undefined;
|
|
47
|
-
const rawPath = localPathBackground || backgroundImageUri;
|
|
48
|
-
const isRemoteUrl =
|
|
49
|
-
rawPath.startsWith('http://') || rawPath.startsWith('https://');
|
|
50
|
-
return isRemoteUrl ? rawPath : `file://${rawPath}`;
|
|
51
|
-
}, [backgroundImageUri, localPathBackground]);
|
|
52
|
-
|
|
53
|
-
const backgroundColor = useMemo(
|
|
54
|
-
() => bgColor ?? theme.colors.background,
|
|
55
|
-
[bgColor, theme.colors.background]
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
const containerStyle = useMemo(
|
|
59
|
-
() => [styles.container, { backgroundColor }],
|
|
60
|
-
[backgroundColor]
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const handleImageLoadError = useCallback(
|
|
64
|
-
(e: any) => {
|
|
65
|
-
console.warn(
|
|
66
|
-
'[BackgroundLayout] Image load failed:',
|
|
67
|
-
e?.nativeEvent?.error
|
|
68
|
-
);
|
|
69
|
-
onImageError?.(new Error('Background image failed to load'));
|
|
70
|
-
},
|
|
71
|
-
[onImageError]
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
const gradientLocations = useMemo(() => {
|
|
75
|
-
const gradientColors = theme.colors.backgroundLayoutGradient;
|
|
76
|
-
const count = gradientColors?.length ?? 0;
|
|
77
|
-
const baseSteps = [0, 0.3, 0.4, 1, 1];
|
|
78
|
-
const locations = [
|
|
79
|
-
0,
|
|
80
|
-
...baseSteps.map((step) => Math.min(1, gradientSplitBackground + step)),
|
|
81
|
-
];
|
|
82
|
-
|
|
83
|
-
if (locations.length > count) {
|
|
84
|
-
return locations.slice(0, count);
|
|
85
|
-
}
|
|
86
|
-
if (locations.length < count) {
|
|
87
|
-
const last = locations[locations.length - 1] ?? 1;
|
|
88
|
-
return [...locations, ...Array(count - locations.length).fill(last)];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return locations;
|
|
92
|
-
}, [theme.colors.backgroundLayoutGradient, gradientSplitBackground]);
|
|
93
|
-
|
|
94
|
-
const imageContainerStyle = useMemo(
|
|
95
|
-
() => [styles.imageContainer, { backgroundColor: theme.colors.background }],
|
|
96
|
-
[theme.colors.background]
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
const imageStyle = useMemo(
|
|
100
|
-
() => [styles.imageStyle, { backgroundColor: theme.colors.background }],
|
|
101
|
-
[theme.colors.background]
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
const innerContainerStyleMemo = useMemo(
|
|
105
|
-
() => [
|
|
106
|
-
styles.innerContainer,
|
|
107
|
-
innerContainerStyle,
|
|
108
|
-
bgColor ? { backgroundColor: bgColor } : null,
|
|
109
|
-
],
|
|
110
|
-
[innerContainerStyle, bgColor]
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
const showBackground = Boolean(backgroundImageUri && resolvedImageUri);
|
|
114
|
-
|
|
115
|
-
if (showBackground) {
|
|
116
|
-
return (
|
|
117
|
-
<View style={containerStyle}>
|
|
118
|
-
<AppStatusBar theme={themeOverride} transparent />
|
|
119
|
-
<ImageBackground
|
|
120
|
-
source={{ uri: resolvedImageUri }}
|
|
121
|
-
resizeMode={resizeMode}
|
|
122
|
-
style={imageContainerStyle}
|
|
123
|
-
imageStyle={imageStyle}
|
|
124
|
-
onError={handleImageLoadError}
|
|
125
|
-
>
|
|
126
|
-
<LinearGradient
|
|
127
|
-
colors={theme.colors.backgroundLayoutGradient}
|
|
128
|
-
locations={gradientLocations}
|
|
129
|
-
start={{ x: 0.5, y: 0 }}
|
|
130
|
-
end={{ x: 0.5, y: 1 }}
|
|
131
|
-
style={styles.gradientOverlay}
|
|
132
|
-
/>
|
|
133
|
-
<View style={innerContainerStyleMemo}>{children}</View>
|
|
134
|
-
</ImageBackground>
|
|
135
|
-
</View>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<View style={containerStyle}>
|
|
141
|
-
<View style={innerContainerStyleMemo}>{children}</View>
|
|
142
|
-
</View>
|
|
143
|
-
);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
export const BackgroundLayout = memo(BackgroundLayoutComponent);
|
|
147
|
-
|
|
148
|
-
const styles = StyleSheet.create({
|
|
149
|
-
container: {
|
|
150
|
-
flex: 1,
|
|
151
|
-
width: '100%',
|
|
152
|
-
height: '100%',
|
|
153
|
-
},
|
|
154
|
-
imageContainer: {
|
|
155
|
-
flex: 1,
|
|
156
|
-
width: '100%',
|
|
157
|
-
height: '100%',
|
|
158
|
-
},
|
|
159
|
-
imageStyle: {
|
|
160
|
-
height: '60%',
|
|
161
|
-
width: '100%',
|
|
162
|
-
alignSelf: 'flex-start',
|
|
163
|
-
} as ImageStyle,
|
|
164
|
-
gradientOverlay: {
|
|
165
|
-
...StyleSheet.absoluteFillObject,
|
|
166
|
-
pointerEvents: 'none',
|
|
167
|
-
},
|
|
168
|
-
innerContainer: {
|
|
169
|
-
flex: 1,
|
|
170
|
-
width: '100%',
|
|
171
|
-
justifyContent: 'center',
|
|
172
|
-
alignItems: 'center',
|
|
173
|
-
},
|
|
174
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { memo, useRef, useEffect } from 'react';
|
|
2
|
-
import { View, StyleSheet, Animated, ImageBackground } from 'react-native';
|
|
3
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
-
|
|
5
|
-
const IMAGE_URL =
|
|
6
|
-
'https://res.cloudinary.com/dm4uaqlio/image/upload/v1704380994/869671_zohjp9.png';
|
|
7
|
-
|
|
8
|
-
interface IProps {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const BackgroundLayoutOne: React.FC<IProps> = ({ children }) => {
|
|
13
|
-
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
14
|
-
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
Animated.timing(fadeAnim, {
|
|
17
|
-
toValue: 1,
|
|
18
|
-
duration: 400,
|
|
19
|
-
useNativeDriver: true,
|
|
20
|
-
}).start();
|
|
21
|
-
}, [fadeAnim]);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<View style={styles.root}>
|
|
25
|
-
<ImageBackground
|
|
26
|
-
source={{ uri: IMAGE_URL }}
|
|
27
|
-
resizeMode="cover"
|
|
28
|
-
style={StyleSheet.absoluteFillObject}
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
|
-
<Animated.View
|
|
32
|
-
style={[StyleSheet.absoluteFillObject, { opacity: fadeAnim }]}
|
|
33
|
-
>
|
|
34
|
-
<LinearGradient
|
|
35
|
-
colors={['rgba(0,0,0,0.85)', 'rgba(0,0,0,0.6)', 'rgba(0,0,0,0.85)']}
|
|
36
|
-
style={StyleSheet.absoluteFillObject}
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
<View style={styles.content}>{children}</View>
|
|
40
|
-
</Animated.View>
|
|
41
|
-
</View>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default memo(BackgroundLayoutOne);
|
|
46
|
-
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
root: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
backgroundColor: '#000',
|
|
51
|
-
},
|
|
52
|
-
content: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
width: '100%',
|
|
55
|
-
},
|
|
56
|
-
});
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import React, { useMemo, useCallback } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
ScrollView,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
View,
|
|
6
|
-
type TextStyle,
|
|
7
|
-
type ViewStyle,
|
|
8
|
-
ActivityIndicator,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
import Markdown from 'react-native-markdown-display';
|
|
11
|
-
import { Text } from '../Text';
|
|
12
|
-
import { useInternalTheme } from '../../theme/hook/useInternalTheme';
|
|
13
|
-
import AppHeader from '../Headers/AppHeader';
|
|
14
|
-
import { scale, moderateScale } from 'react-native-size-matters';
|
|
15
|
-
import type { ITheme, ThemeOverride } from '../../theme/themes';
|
|
16
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
17
|
-
|
|
18
|
-
type BlogViewProps = {
|
|
19
|
-
content: string;
|
|
20
|
-
containerStyle?: ViewStyle;
|
|
21
|
-
scrollable?: boolean;
|
|
22
|
-
emptyText?: string;
|
|
23
|
-
theme?: ThemeOverride;
|
|
24
|
-
|
|
25
|
-
// Header customization
|
|
26
|
-
headerTitle?: string;
|
|
27
|
-
onBackPress?: () => void;
|
|
28
|
-
onRightPress?: () => void;
|
|
29
|
-
headerComponent?: React.ReactNode;
|
|
30
|
-
renderHeader?: () => React.ReactNode;
|
|
31
|
-
|
|
32
|
-
// Custom content
|
|
33
|
-
renderContent?: () => React.ReactNode;
|
|
34
|
-
renderEmpty?: () => React.ReactNode;
|
|
35
|
-
|
|
36
|
-
isLoading?: boolean;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const BlogView: React.FC<BlogViewProps> = ({
|
|
40
|
-
content,
|
|
41
|
-
containerStyle,
|
|
42
|
-
scrollable = true,
|
|
43
|
-
emptyText = 'No content available.',
|
|
44
|
-
theme,
|
|
45
|
-
headerTitle = 'Blog',
|
|
46
|
-
onBackPress = () => {},
|
|
47
|
-
onRightPress,
|
|
48
|
-
headerComponent,
|
|
49
|
-
renderHeader,
|
|
50
|
-
renderContent,
|
|
51
|
-
renderEmpty,
|
|
52
|
-
isLoading = false,
|
|
53
|
-
}) => {
|
|
54
|
-
const { theme: appliedTheme, isDarkMode } = useInternalTheme(theme);
|
|
55
|
-
|
|
56
|
-
// Memoize markdown styles
|
|
57
|
-
const markdownStyles = useMemo(
|
|
58
|
-
() => getMarkdownStyles(appliedTheme, isDarkMode),
|
|
59
|
-
[appliedTheme, isDarkMode]
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
// Memoize header title style
|
|
63
|
-
const headerTitleStyle = useMemo(
|
|
64
|
-
() => ({
|
|
65
|
-
...styles.headerTitle,
|
|
66
|
-
color: appliedTheme.colors.onBackground,
|
|
67
|
-
}),
|
|
68
|
-
[appliedTheme.colors.onBackground]
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
// Memoize empty text style
|
|
72
|
-
const emptyTextStyle = useMemo(
|
|
73
|
-
() => [styles.emptyText, { color: appliedTheme.colors.onSurfaceVariant }],
|
|
74
|
-
[appliedTheme.colors.onSurfaceVariant]
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
// Memoize container style
|
|
78
|
-
const containerStyleMemo = useMemo(
|
|
79
|
-
() => [styles.flex, { backgroundColor: appliedTheme.colors.background }],
|
|
80
|
-
[appliedTheme.colors.background]
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
// Memoize scroll content style
|
|
84
|
-
const scrollContentStyle = useMemo(
|
|
85
|
-
() => [
|
|
86
|
-
styles.container,
|
|
87
|
-
containerStyle,
|
|
88
|
-
{ paddingBottom: scale(40), flexGrow: 1 },
|
|
89
|
-
],
|
|
90
|
-
[containerStyle]
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
const renderFinalHeader = useCallback(() => {
|
|
94
|
-
if (renderHeader) return renderHeader();
|
|
95
|
-
if (headerComponent) return headerComponent;
|
|
96
|
-
return (
|
|
97
|
-
<AppHeader
|
|
98
|
-
onBackPress={onBackPress}
|
|
99
|
-
onRightPress={onRightPress}
|
|
100
|
-
title={headerTitle}
|
|
101
|
-
titleAlign="left"
|
|
102
|
-
theme={theme}
|
|
103
|
-
titleStyle={headerTitleStyle}
|
|
104
|
-
/>
|
|
105
|
-
);
|
|
106
|
-
}, [
|
|
107
|
-
renderHeader,
|
|
108
|
-
headerComponent,
|
|
109
|
-
onBackPress,
|
|
110
|
-
onRightPress,
|
|
111
|
-
headerTitle,
|
|
112
|
-
theme,
|
|
113
|
-
headerTitleStyle,
|
|
114
|
-
]);
|
|
115
|
-
|
|
116
|
-
const renderFinalContent = useCallback(() => {
|
|
117
|
-
if (isLoading) {
|
|
118
|
-
return (
|
|
119
|
-
<View style={styles.fullCenter}>
|
|
120
|
-
<ActivityIndicator size="large" color={appliedTheme.colors.primary} />
|
|
121
|
-
</View>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (renderContent) return renderContent();
|
|
126
|
-
if (content) {
|
|
127
|
-
return <Markdown style={markdownStyles}>{content}</Markdown>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (renderEmpty) return renderEmpty();
|
|
131
|
-
|
|
132
|
-
return (
|
|
133
|
-
<View style={styles.center}>
|
|
134
|
-
<Text style={emptyTextStyle}>{emptyText}</Text>
|
|
135
|
-
</View>
|
|
136
|
-
);
|
|
137
|
-
}, [
|
|
138
|
-
isLoading,
|
|
139
|
-
renderContent,
|
|
140
|
-
content,
|
|
141
|
-
markdownStyles,
|
|
142
|
-
renderEmpty,
|
|
143
|
-
emptyText,
|
|
144
|
-
emptyTextStyle,
|
|
145
|
-
appliedTheme.colors.primary,
|
|
146
|
-
]);
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
<View style={containerStyleMemo}>
|
|
150
|
-
{renderFinalHeader()}
|
|
151
|
-
{scrollable ? (
|
|
152
|
-
<ScrollView
|
|
153
|
-
style={styles.flex}
|
|
154
|
-
contentContainerStyle={scrollContentStyle}
|
|
155
|
-
showsVerticalScrollIndicator={false}
|
|
156
|
-
keyboardShouldPersistTaps="handled"
|
|
157
|
-
>
|
|
158
|
-
{renderFinalContent()}
|
|
159
|
-
</ScrollView>
|
|
160
|
-
) : (
|
|
161
|
-
<View style={[styles.container, containerStyle]}>
|
|
162
|
-
{renderFinalContent()}
|
|
163
|
-
</View>
|
|
164
|
-
)}
|
|
165
|
-
</View>
|
|
166
|
-
);
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export default React.memo(BlogView);
|
|
170
|
-
|
|
171
|
-
const getMarkdownStyles = (
|
|
172
|
-
theme: ITheme,
|
|
173
|
-
isDarkMode: boolean
|
|
174
|
-
): { [key: string]: TextStyle } => {
|
|
175
|
-
const baseColor = theme.colors.textPrimary;
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
body: { color: baseColor, fontSize: moderateScale(14) },
|
|
179
|
-
text: { color: baseColor },
|
|
180
|
-
paragraph: { color: baseColor, marginBottom: scale(8) },
|
|
181
|
-
heading1: {
|
|
182
|
-
fontSize: RFValue(21),
|
|
183
|
-
fontWeight: 'bold',
|
|
184
|
-
color: baseColor,
|
|
185
|
-
marginBottom: scale(12),
|
|
186
|
-
},
|
|
187
|
-
heading2: {
|
|
188
|
-
fontSize: RFValue(19),
|
|
189
|
-
fontWeight: 'bold',
|
|
190
|
-
color: baseColor,
|
|
191
|
-
marginBottom: scale(10),
|
|
192
|
-
},
|
|
193
|
-
heading3: {
|
|
194
|
-
fontSize: RFValue(17),
|
|
195
|
-
fontWeight: 'bold',
|
|
196
|
-
color: baseColor,
|
|
197
|
-
marginBottom: scale(8),
|
|
198
|
-
},
|
|
199
|
-
strong: { fontWeight: 'bold', color: baseColor },
|
|
200
|
-
listItem: { color: baseColor, marginBottom: scale(6) },
|
|
201
|
-
bullet_list: { color: baseColor },
|
|
202
|
-
ordered_list: { color: baseColor },
|
|
203
|
-
link: { color: theme.colors.primary },
|
|
204
|
-
blockquote: {
|
|
205
|
-
backgroundColor: isDarkMode
|
|
206
|
-
? theme.colors.surfaceVariant
|
|
207
|
-
: theme.colors.surface,
|
|
208
|
-
color: theme.colors.onSurface,
|
|
209
|
-
borderLeftWidth: scale(1.5),
|
|
210
|
-
borderLeftColor: theme.colors.primary,
|
|
211
|
-
paddingHorizontal: scale(12),
|
|
212
|
-
borderRadius: scale(4),
|
|
213
|
-
marginVertical: scale(10),
|
|
214
|
-
fontStyle: 'italic',
|
|
215
|
-
fontSize: RFValue(15),
|
|
216
|
-
},
|
|
217
|
-
code_inline: {
|
|
218
|
-
backgroundColor: theme.colors.surfaceVariant,
|
|
219
|
-
color: baseColor,
|
|
220
|
-
fontFamily: 'monospace',
|
|
221
|
-
paddingHorizontal: scale(4),
|
|
222
|
-
borderRadius: scale(4),
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
code_block: {
|
|
226
|
-
backgroundColor: theme.colors.surfaceVariant,
|
|
227
|
-
color: baseColor,
|
|
228
|
-
fontFamily: 'monospace',
|
|
229
|
-
padding: scale(8),
|
|
230
|
-
borderRadius: scale(6),
|
|
231
|
-
},
|
|
232
|
-
fence: {
|
|
233
|
-
backgroundColor: theme.colors.surfaceVariant,
|
|
234
|
-
color: baseColor,
|
|
235
|
-
},
|
|
236
|
-
hr: {
|
|
237
|
-
borderBottomColor: theme.colors.outline,
|
|
238
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
239
|
-
marginVertical: scale(16),
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
const styles = StyleSheet.create({
|
|
245
|
-
flex: {
|
|
246
|
-
flex: 1,
|
|
247
|
-
},
|
|
248
|
-
container: {
|
|
249
|
-
padding: scale(16),
|
|
250
|
-
},
|
|
251
|
-
center: {
|
|
252
|
-
flex: 1,
|
|
253
|
-
alignItems: 'center',
|
|
254
|
-
justifyContent: 'center',
|
|
255
|
-
paddingHorizontal: scale(16),
|
|
256
|
-
},
|
|
257
|
-
fullCenter: {
|
|
258
|
-
flex: 1,
|
|
259
|
-
alignItems: 'center',
|
|
260
|
-
justifyContent: 'center',
|
|
261
|
-
paddingHorizontal: scale(16),
|
|
262
|
-
},
|
|
263
|
-
emptyText: {
|
|
264
|
-
textAlign: 'center',
|
|
265
|
-
fontSize: RFValue(13),
|
|
266
|
-
},
|
|
267
|
-
headerTitle: {
|
|
268
|
-
fontSize: RFValue(15),
|
|
269
|
-
fontWeight: '600',
|
|
270
|
-
},
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
export namespace BlogView {
|
|
274
|
-
export type Props = BlogViewProps;
|
|
275
|
-
export type Content = Props['content'];
|
|
276
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Thu 06 Nov 2025 at 05:00 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { View, StyleSheet, type ViewStyle, type StyleProp } from 'react-native';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* BlurView Props - Same as @react-native-community/blur
|
|
11
|
-
*/
|
|
12
|
-
export interface BlurViewProps {
|
|
13
|
-
/** Style of the BlurView container */
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
|
|
16
|
-
/** The blur type (tint) - exactly matches community lib */
|
|
17
|
-
blurType?:
|
|
18
|
-
| 'dark'
|
|
19
|
-
| 'light'
|
|
20
|
-
| 'xlight'
|
|
21
|
-
| 'extraDark'
|
|
22
|
-
| 'regular'
|
|
23
|
-
| 'prominent'
|
|
24
|
-
| 'chromeMaterial'
|
|
25
|
-
| 'material'
|
|
26
|
-
| 'thickMaterial'
|
|
27
|
-
| 'thinMaterial'
|
|
28
|
-
| 'ultraThinMaterial'
|
|
29
|
-
| 'chromeMaterialDark'
|
|
30
|
-
| 'materialDark'
|
|
31
|
-
| 'thickMaterialDark'
|
|
32
|
-
| 'thinMaterialDark'
|
|
33
|
-
| 'ultraThinMaterialDark'
|
|
34
|
-
| 'chromeMaterialLight'
|
|
35
|
-
| 'materialLight'
|
|
36
|
-
| 'thickMaterialLight'
|
|
37
|
-
| 'thinMaterialLight'
|
|
38
|
-
| 'ultraThinMaterialLight';
|
|
39
|
-
|
|
40
|
-
/** The blur intensity amount (0-100) - exactly matches community lib */
|
|
41
|
-
blurAmount?: number;
|
|
42
|
-
|
|
43
|
-
/** Fallback color for reduced transparency - exactly matches community lib */
|
|
44
|
-
reducedTransparencyFallbackColor?: string;
|
|
45
|
-
|
|
46
|
-
/** iOS only: Overlay color - exactly matches community lib */
|
|
47
|
-
overlayColor?: string;
|
|
48
|
-
|
|
49
|
-
/** Android only: Downsample factor (higher = more blur but lower quality) */
|
|
50
|
-
downsampleFactor?: number;
|
|
51
|
-
|
|
52
|
-
/** Android only: Blur radius */
|
|
53
|
-
blurRadius?: number;
|
|
54
|
-
|
|
55
|
-
/** Child components */
|
|
56
|
-
children?: React.ReactNode;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Custom BlurView - 100% Compatible with @react-native-community/blur
|
|
61
|
-
*
|
|
62
|
-
* ✅ Same API as @react-native-community/blur
|
|
63
|
-
* ✅ Works on iOS, Android, and Web
|
|
64
|
-
* ✅ Drop-in replacement - just change the import
|
|
65
|
-
* 🚫 Simulates blur (no live backdrop) using semi-transparent layers
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```tsx
|
|
69
|
-
* <BlurView
|
|
70
|
-
* style={styles.blur}
|
|
71
|
-
* blurType="light"
|
|
72
|
-
* blurAmount={10}
|
|
73
|
-
* reducedTransparencyFallbackColor="white"
|
|
74
|
-
* />
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
const BlurView: React.FC<BlurViewProps> = ({
|
|
78
|
-
style,
|
|
79
|
-
blurType = 'light',
|
|
80
|
-
blurAmount = 100,
|
|
81
|
-
reducedTransparencyFallbackColor,
|
|
82
|
-
overlayColor,
|
|
83
|
-
children,
|
|
84
|
-
}) => {
|
|
85
|
-
// Clamp blur amount to 0-100 range (same as community lib)
|
|
86
|
-
const intensity = Math.max(0, Math.min(100, blurAmount));
|
|
87
|
-
|
|
88
|
-
// Get tint style based on blur type
|
|
89
|
-
const tintStyle = getBlurTintStyle(
|
|
90
|
-
blurType,
|
|
91
|
-
intensity,
|
|
92
|
-
reducedTransparencyFallbackColor,
|
|
93
|
-
overlayColor
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
// Platform-specific rendering
|
|
97
|
-
return (
|
|
98
|
-
<View style={[styles.container, style]}>
|
|
99
|
-
{/* Background blur layer */}
|
|
100
|
-
<View style={[StyleSheet.absoluteFillObject, tintStyle]} />
|
|
101
|
-
|
|
102
|
-
{/* Content layer */}
|
|
103
|
-
<View pointerEvents="box-none" style={styles.content}>
|
|
104
|
-
{children}
|
|
105
|
-
</View>
|
|
106
|
-
</View>
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Get blur tint style based on blurType
|
|
112
|
-
* Matches the exact behavior of @react-native-community/blur
|
|
113
|
-
*/
|
|
114
|
-
function getBlurTintStyle(
|
|
115
|
-
blurType: string,
|
|
116
|
-
intensity: number,
|
|
117
|
-
fallbackColor?: string,
|
|
118
|
-
overlayColor?: string
|
|
119
|
-
): ViewStyle {
|
|
120
|
-
// If overlayColor is provided, use it (iOS behavior)
|
|
121
|
-
if (overlayColor) {
|
|
122
|
-
return { backgroundColor: overlayColor };
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Calculate opacity based on intensity (0-100)
|
|
126
|
-
// Higher intensity = more opaque = stronger blur effect
|
|
127
|
-
const opacity = Math.min(0.95, intensity / 100);
|
|
128
|
-
const lightOpacity = opacity * 0.7;
|
|
129
|
-
const darkOpacity = opacity * 0.8;
|
|
130
|
-
|
|
131
|
-
// Match exact blur types from @react-native-community/blur
|
|
132
|
-
switch (blurType) {
|
|
133
|
-
// Dark blur types
|
|
134
|
-
case 'dark':
|
|
135
|
-
return { backgroundColor: `rgba(0, 0, 0, ${darkOpacity})` };
|
|
136
|
-
case 'extraDark':
|
|
137
|
-
return {
|
|
138
|
-
backgroundColor: `rgba(0, 0, 0, ${Math.min(0.98, darkOpacity * 1.2)})`,
|
|
139
|
-
};
|
|
140
|
-
case 'materialDark':
|
|
141
|
-
case 'thickMaterialDark':
|
|
142
|
-
case 'chromeMaterialDark':
|
|
143
|
-
return { backgroundColor: `rgba(28, 28, 30, ${darkOpacity})` };
|
|
144
|
-
case 'thinMaterialDark':
|
|
145
|
-
return { backgroundColor: `rgba(28, 28, 30, ${darkOpacity * 0.7})` };
|
|
146
|
-
case 'ultraThinMaterialDark':
|
|
147
|
-
return { backgroundColor: `rgba(28, 28, 30, ${darkOpacity * 0.5})` };
|
|
148
|
-
|
|
149
|
-
// Light blur types
|
|
150
|
-
case 'light':
|
|
151
|
-
return {
|
|
152
|
-
backgroundColor:
|
|
153
|
-
fallbackColor || `rgba(255, 255, 255, ${lightOpacity})`,
|
|
154
|
-
};
|
|
155
|
-
case 'xlight':
|
|
156
|
-
return { backgroundColor: `rgba(255, 255, 255, ${lightOpacity * 0.6})` };
|
|
157
|
-
case 'materialLight':
|
|
158
|
-
case 'chromeMaterialLight':
|
|
159
|
-
return { backgroundColor: `rgba(255, 255, 255, ${lightOpacity})` };
|
|
160
|
-
case 'thickMaterialLight':
|
|
161
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity})` };
|
|
162
|
-
case 'thinMaterialLight':
|
|
163
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity * 0.7})` };
|
|
164
|
-
case 'ultraThinMaterialLight':
|
|
165
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity * 0.5})` };
|
|
166
|
-
|
|
167
|
-
// Regular/prominent types
|
|
168
|
-
case 'regular':
|
|
169
|
-
case 'prominent':
|
|
170
|
-
return { backgroundColor: `rgba(255, 255, 255, ${lightOpacity * 0.8})` };
|
|
171
|
-
case 'material':
|
|
172
|
-
case 'chromeMaterial':
|
|
173
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity})` };
|
|
174
|
-
case 'thickMaterial':
|
|
175
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity * 1.1})` };
|
|
176
|
-
case 'thinMaterial':
|
|
177
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity * 0.7})` };
|
|
178
|
-
case 'ultraThinMaterial':
|
|
179
|
-
return { backgroundColor: `rgba(242, 242, 247, ${lightOpacity * 0.5})` };
|
|
180
|
-
|
|
181
|
-
// Default
|
|
182
|
-
default:
|
|
183
|
-
return {
|
|
184
|
-
backgroundColor:
|
|
185
|
-
fallbackColor || `rgba(255, 255, 255, ${lightOpacity})`,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const styles = StyleSheet.create({
|
|
191
|
-
container: {
|
|
192
|
-
overflow: 'hidden',
|
|
193
|
-
},
|
|
194
|
-
content: {
|
|
195
|
-
flex: 1,
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
export default BlurView;
|