@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,250 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
|
-
import { scale } from 'react-native-size-matters';
|
|
5
|
-
import FastImage from 'react-native-fast-image';
|
|
6
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
7
|
-
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
8
|
-
import { Text } from '../Text';
|
|
9
|
-
import type { ThemeOverride } from '../../theme';
|
|
10
|
-
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
11
|
-
import { useInternalTheme } from '../../theme/hook';
|
|
12
|
-
import { Button } from '../Button';
|
|
13
|
-
import { BottomSheetOne } from '../BottomSheet';
|
|
14
|
-
import { CirclePlay } from 'lucide-react-native';
|
|
15
|
-
|
|
16
|
-
interface NewReleaseSheetSkeletonProps {
|
|
17
|
-
baseColor: string;
|
|
18
|
-
highlightColor: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const NewReleaseSheetSkeleton = ({
|
|
22
|
-
baseColor,
|
|
23
|
-
highlightColor,
|
|
24
|
-
}: NewReleaseSheetSkeletonProps) => (
|
|
25
|
-
<SkeletonPlaceholder
|
|
26
|
-
backgroundColor={baseColor}
|
|
27
|
-
highlightColor={highlightColor}
|
|
28
|
-
>
|
|
29
|
-
<SkeletonPlaceholder.Item alignItems="center">
|
|
30
|
-
<SkeletonPlaceholder.Item {...styles.skeletonHeader} />
|
|
31
|
-
<SkeletonPlaceholder.Item {...styles.skeletonPoster} />
|
|
32
|
-
<SkeletonPlaceholder.Item {...styles.skeletonTitle} />
|
|
33
|
-
<SkeletonPlaceholder.Item {...styles.skeletonDescription} />
|
|
34
|
-
<SkeletonPlaceholder.Item {...styles.skeletonButton} />
|
|
35
|
-
</SkeletonPlaceholder.Item>
|
|
36
|
-
</SkeletonPlaceholder>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
interface NewReleaseSheetContentProps {
|
|
40
|
-
data: IContentData;
|
|
41
|
-
theme?: ThemeOverride;
|
|
42
|
-
onPressWatchNow?: (data: IContentData) => void;
|
|
43
|
-
onClose: () => void;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const NewReleaseSheetContent = ({
|
|
47
|
-
data,
|
|
48
|
-
theme,
|
|
49
|
-
onPressWatchNow,
|
|
50
|
-
onClose,
|
|
51
|
-
}: NewReleaseSheetContentProps) => {
|
|
52
|
-
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
53
|
-
|
|
54
|
-
const handleWatchNow = () => {
|
|
55
|
-
onClose();
|
|
56
|
-
onPressWatchNow?.(data);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<>
|
|
61
|
-
<Text style={styles.header} color={appliedTheme.colors.newRelease}>
|
|
62
|
-
New Release
|
|
63
|
-
</Text>
|
|
64
|
-
<FastImage
|
|
65
|
-
source={{ uri: data.poster }}
|
|
66
|
-
style={styles.poster}
|
|
67
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
68
|
-
/>
|
|
69
|
-
<Text style={styles.title} color={appliedTheme.colors.white}>
|
|
70
|
-
{data.name}
|
|
71
|
-
</Text>
|
|
72
|
-
<Text
|
|
73
|
-
numberOfLines={3}
|
|
74
|
-
style={styles.description}
|
|
75
|
-
color={appliedTheme.colors.white}
|
|
76
|
-
>
|
|
77
|
-
{data.description}
|
|
78
|
-
</Text>
|
|
79
|
-
<Button.Primary
|
|
80
|
-
containerStyle={{
|
|
81
|
-
...styles.button,
|
|
82
|
-
backgroundColor: appliedTheme.colors.button,
|
|
83
|
-
alignSelf: 'center',
|
|
84
|
-
}}
|
|
85
|
-
theme={theme}
|
|
86
|
-
title="Watch Now"
|
|
87
|
-
titleStyle={{
|
|
88
|
-
...styles.buttonTitle,
|
|
89
|
-
color: appliedTheme.colors.buttonText,
|
|
90
|
-
}}
|
|
91
|
-
onPress={handleWatchNow}
|
|
92
|
-
leftIcon={
|
|
93
|
-
<CirclePlay size={25} color={appliedTheme.colors.buttonText} />
|
|
94
|
-
}
|
|
95
|
-
/>
|
|
96
|
-
</>
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
interface Props {
|
|
101
|
-
theme?: ThemeOverride;
|
|
102
|
-
data?: IContentData | null;
|
|
103
|
-
onPressWatchNow?: (data: IContentData) => void;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export const NewReleaseSheet = ({ theme, data, onPressWatchNow }: Props) => {
|
|
107
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
108
|
-
const [hasOpened, setHasOpened] = useState(false);
|
|
109
|
-
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
110
|
-
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
if (data && !hasOpened) {
|
|
113
|
-
const timer = setTimeout(() => {
|
|
114
|
-
setIsVisible(true);
|
|
115
|
-
setHasOpened(true);
|
|
116
|
-
}, 1500);
|
|
117
|
-
|
|
118
|
-
return () => clearTimeout(timer);
|
|
119
|
-
}
|
|
120
|
-
return undefined;
|
|
121
|
-
}, [data, hasOpened]);
|
|
122
|
-
|
|
123
|
-
const isLoading = !data;
|
|
124
|
-
const showSheet = isVisible && !!data;
|
|
125
|
-
|
|
126
|
-
const handleClose = () => {
|
|
127
|
-
setIsVisible(false);
|
|
128
|
-
setHasOpened(true);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<BottomSheetOne
|
|
133
|
-
key="new-release-sheet"
|
|
134
|
-
theme={appliedTheme}
|
|
135
|
-
visible={showSheet}
|
|
136
|
-
onClose={() => setIsVisible(false)}
|
|
137
|
-
height="70%"
|
|
138
|
-
showCloseButton
|
|
139
|
-
scrollable={false}
|
|
140
|
-
backgroundImage={!isLoading ? data?.poster : undefined}
|
|
141
|
-
>
|
|
142
|
-
<SafeAreaView style={styles.safeArea}>
|
|
143
|
-
<View style={styles.container}>
|
|
144
|
-
{isLoading ? (
|
|
145
|
-
<NewReleaseSheetSkeleton
|
|
146
|
-
baseColor={appliedTheme.colors.skeletonBaseColor}
|
|
147
|
-
highlightColor={appliedTheme.colors.skeletonHighlightColor}
|
|
148
|
-
/>
|
|
149
|
-
) : (
|
|
150
|
-
data && (
|
|
151
|
-
<NewReleaseSheetContent
|
|
152
|
-
data={data}
|
|
153
|
-
theme={theme}
|
|
154
|
-
onPressWatchNow={onPressWatchNow}
|
|
155
|
-
onClose={handleClose}
|
|
156
|
-
/>
|
|
157
|
-
)
|
|
158
|
-
)}
|
|
159
|
-
</View>
|
|
160
|
-
</SafeAreaView>
|
|
161
|
-
</BottomSheetOne>
|
|
162
|
-
);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const styles = StyleSheet.create({
|
|
166
|
-
safeArea: {
|
|
167
|
-
flex: 1,
|
|
168
|
-
},
|
|
169
|
-
container: {
|
|
170
|
-
flex: 1,
|
|
171
|
-
alignItems: 'center',
|
|
172
|
-
overflow: 'hidden',
|
|
173
|
-
paddingHorizontal: scale(8),
|
|
174
|
-
},
|
|
175
|
-
header: {
|
|
176
|
-
marginTop: scale(4),
|
|
177
|
-
paddingHorizontal: scale(8),
|
|
178
|
-
fontSize: RFValue(15),
|
|
179
|
-
textAlign: 'center',
|
|
180
|
-
},
|
|
181
|
-
poster: {
|
|
182
|
-
width: scale(170),
|
|
183
|
-
aspectRatio: 2 / 3,
|
|
184
|
-
borderRadius: scale(12),
|
|
185
|
-
marginTop: scale(10),
|
|
186
|
-
elevation: 12,
|
|
187
|
-
},
|
|
188
|
-
title: {
|
|
189
|
-
marginTop: scale(12),
|
|
190
|
-
paddingHorizontal: scale(10),
|
|
191
|
-
fontSize: RFValue(17),
|
|
192
|
-
fontWeight: '700',
|
|
193
|
-
textAlign: 'center',
|
|
194
|
-
},
|
|
195
|
-
description: {
|
|
196
|
-
marginTop: scale(10),
|
|
197
|
-
paddingHorizontal: scale(14),
|
|
198
|
-
fontSize: RFValue(12),
|
|
199
|
-
textAlign: 'center',
|
|
200
|
-
opacity: 0.8,
|
|
201
|
-
lineHeight: RFValue(15),
|
|
202
|
-
},
|
|
203
|
-
button: {
|
|
204
|
-
marginTop: scale(20),
|
|
205
|
-
marginBottom: scale(14),
|
|
206
|
-
width: scale(170),
|
|
207
|
-
minWidth: scale(170),
|
|
208
|
-
maxWidth: '100%',
|
|
209
|
-
height: scale(41),
|
|
210
|
-
borderRadius: scale(27),
|
|
211
|
-
},
|
|
212
|
-
buttonTitle: {
|
|
213
|
-
fontSize: RFValue(14),
|
|
214
|
-
fontWeight: '700',
|
|
215
|
-
},
|
|
216
|
-
// Skeleton – matches content layout (poster 170 × 2/3, title/desc/button)
|
|
217
|
-
skeletonHeader: {
|
|
218
|
-
width: scale(100),
|
|
219
|
-
height: scale(16),
|
|
220
|
-
borderRadius: scale(4),
|
|
221
|
-
marginTop: scale(4),
|
|
222
|
-
},
|
|
223
|
-
skeletonPoster: {
|
|
224
|
-
width: scale(170),
|
|
225
|
-
height: scale(255),
|
|
226
|
-
borderRadius: scale(12),
|
|
227
|
-
marginTop: scale(10),
|
|
228
|
-
},
|
|
229
|
-
skeletonTitle: {
|
|
230
|
-
width: scale(140),
|
|
231
|
-
height: scale(20),
|
|
232
|
-
borderRadius: scale(4),
|
|
233
|
-
marginTop: scale(12),
|
|
234
|
-
},
|
|
235
|
-
skeletonDescription: {
|
|
236
|
-
width: scale(170),
|
|
237
|
-
height: scale(42),
|
|
238
|
-
borderRadius: scale(6),
|
|
239
|
-
marginTop: scale(10),
|
|
240
|
-
},
|
|
241
|
-
skeletonButton: {
|
|
242
|
-
width: scale(170),
|
|
243
|
-
height: scale(41),
|
|
244
|
-
borderRadius: scale(27),
|
|
245
|
-
marginTop: scale(20),
|
|
246
|
-
marginBottom: scale(14),
|
|
247
|
-
},
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
// rgb(215, 10, 132)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './NewReleaseSheet';
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { ChevronRight, ListVideo } from 'lucide-react-native';
|
|
4
|
-
import { moderateScale, verticalScale } from 'react-native-size-matters';
|
|
5
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
6
|
-
import { Slider } from 'react-native-awesome-slider';
|
|
7
|
-
import { useSharedValue, withTiming } from 'react-native-reanimated';
|
|
8
|
-
import type { ISeriesItem } from '../types';
|
|
9
|
-
import type { ITheme } from '../../../../theme';
|
|
10
|
-
|
|
11
|
-
interface BottomControlsProps {
|
|
12
|
-
series: ISeriesItem;
|
|
13
|
-
episodeIndex: number;
|
|
14
|
-
videoCurrentTime: number;
|
|
15
|
-
videoDuration: number;
|
|
16
|
-
isFullScreen: boolean;
|
|
17
|
-
onEpisodesPress?: () => void;
|
|
18
|
-
theme: ITheme;
|
|
19
|
-
onSeek?: (time: number) => void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const BottomControls: React.FC<BottomControlsProps> = ({
|
|
23
|
-
series,
|
|
24
|
-
episodeIndex,
|
|
25
|
-
videoCurrentTime,
|
|
26
|
-
videoDuration,
|
|
27
|
-
onEpisodesPress,
|
|
28
|
-
isFullScreen,
|
|
29
|
-
theme,
|
|
30
|
-
onSeek,
|
|
31
|
-
}) => {
|
|
32
|
-
const truncatedTitle =
|
|
33
|
-
series.title.length <= 25
|
|
34
|
-
? series.title
|
|
35
|
-
: series.title.slice(0, 25) + '...';
|
|
36
|
-
|
|
37
|
-
const progress = useSharedValue(videoCurrentTime);
|
|
38
|
-
const minimumValue = useSharedValue(0);
|
|
39
|
-
const maximumValue = useSharedValue(videoDuration > 0 ? videoDuration : 1);
|
|
40
|
-
const isScrubbing = useSharedValue(false);
|
|
41
|
-
const thumbScale = useSharedValue(1);
|
|
42
|
-
const scrubTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
43
|
-
|
|
44
|
-
// Keep slider in sync with video time
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (!isScrubbing.value) {
|
|
47
|
-
progress.value = videoCurrentTime;
|
|
48
|
-
}
|
|
49
|
-
}, [videoCurrentTime, progress, isScrubbing]);
|
|
50
|
-
|
|
51
|
-
// Update duration when it changes
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
maximumValue.value = videoDuration > 0 ? videoDuration : 1;
|
|
54
|
-
}, [videoDuration, maximumValue]);
|
|
55
|
-
|
|
56
|
-
// Cleanup timeout on unmount
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
return () => {
|
|
59
|
-
if (scrubTimeoutRef.current) {
|
|
60
|
-
clearTimeout(scrubTimeoutRef.current);
|
|
61
|
-
scrubTimeoutRef.current = null;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}, []);
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<View
|
|
68
|
-
style={[
|
|
69
|
-
styles.container,
|
|
70
|
-
{ bottom: isFullScreen ? verticalScale(5) : verticalScale(0) },
|
|
71
|
-
]}
|
|
72
|
-
>
|
|
73
|
-
{/* Series Info Section */}
|
|
74
|
-
<View style={styles.seriesInfo}>
|
|
75
|
-
<Text style={styles.seriesTitle}>{truncatedTitle}</Text>
|
|
76
|
-
<Text numberOfLines={2} style={styles.seriesDescription}>
|
|
77
|
-
{series.description}
|
|
78
|
-
</Text>
|
|
79
|
-
</View>
|
|
80
|
-
|
|
81
|
-
{/* Episodes Selector Button */}
|
|
82
|
-
<TouchableOpacity
|
|
83
|
-
style={styles.episodesButton}
|
|
84
|
-
onPress={onEpisodesPress}
|
|
85
|
-
activeOpacity={0.7}
|
|
86
|
-
>
|
|
87
|
-
<View style={styles.episodesButtonContent}>
|
|
88
|
-
<ListVideo
|
|
89
|
-
color={'#fff'}
|
|
90
|
-
width={moderateScale(20)}
|
|
91
|
-
height={moderateScale(20)}
|
|
92
|
-
/>
|
|
93
|
-
<Text style={styles.episodesText}>
|
|
94
|
-
{episodeIndex + 1} / {series.episodes.length} Episodes
|
|
95
|
-
</Text>
|
|
96
|
-
</View>
|
|
97
|
-
<ChevronRight color={'#fff'} size={moderateScale(22)} />
|
|
98
|
-
</TouchableOpacity>
|
|
99
|
-
|
|
100
|
-
{/* Video Progress Bar */}
|
|
101
|
-
<View style={styles.progressBarContainer}>
|
|
102
|
-
<Slider
|
|
103
|
-
progress={progress}
|
|
104
|
-
minimumValue={minimumValue}
|
|
105
|
-
maximumValue={maximumValue}
|
|
106
|
-
isScrubbing={isScrubbing}
|
|
107
|
-
thumbScaleValue={thumbScale}
|
|
108
|
-
sliderHeight={verticalScale(2)}
|
|
109
|
-
disable={videoDuration <= 0}
|
|
110
|
-
disableTapEvent={false}
|
|
111
|
-
theme={{
|
|
112
|
-
minimumTrackTintColor: theme.colors.primary,
|
|
113
|
-
maximumTrackTintColor: 'rgba(255, 255, 255, 0.3)',
|
|
114
|
-
cacheTrackTintColor: 'rgba(255, 255, 255, 0.3)',
|
|
115
|
-
disableMinTrackTintColor: 'rgba(255, 255, 255, 0.5)',
|
|
116
|
-
bubbleBackgroundColor: 'transparent',
|
|
117
|
-
heartbeatColor: theme.colors.primary,
|
|
118
|
-
}}
|
|
119
|
-
containerStyle={styles.progressBarWrapper}
|
|
120
|
-
renderThumb={() => <View style={styles.sliderThumb} />}
|
|
121
|
-
bubbleWidth={0}
|
|
122
|
-
bubbleMaxWidth={0}
|
|
123
|
-
onSlidingStart={() => {
|
|
124
|
-
if (scrubTimeoutRef.current) {
|
|
125
|
-
clearTimeout(scrubTimeoutRef.current);
|
|
126
|
-
scrubTimeoutRef.current = null;
|
|
127
|
-
}
|
|
128
|
-
isScrubbing.value = true;
|
|
129
|
-
thumbScale.value = withTiming(1.4, { duration: 120 });
|
|
130
|
-
}}
|
|
131
|
-
onSlidingComplete={(value) => {
|
|
132
|
-
progress.value = value;
|
|
133
|
-
thumbScale.value = withTiming(1, { duration: 120 });
|
|
134
|
-
onSeek?.(value);
|
|
135
|
-
|
|
136
|
-
// Give the video a brief moment to seek before
|
|
137
|
-
// re-syncing slider with currentTime to avoid jumps
|
|
138
|
-
scrubTimeoutRef.current = setTimeout(() => {
|
|
139
|
-
isScrubbing.value = false;
|
|
140
|
-
scrubTimeoutRef.current = null;
|
|
141
|
-
}, 400);
|
|
142
|
-
}}
|
|
143
|
-
/>
|
|
144
|
-
</View>
|
|
145
|
-
</View>
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export default BottomControls;
|
|
150
|
-
|
|
151
|
-
const styles = StyleSheet.create({
|
|
152
|
-
container: {
|
|
153
|
-
position: 'absolute',
|
|
154
|
-
bottom: 0,
|
|
155
|
-
width: '100%',
|
|
156
|
-
zIndex: 10,
|
|
157
|
-
paddingHorizontal: moderateScale(8),
|
|
158
|
-
},
|
|
159
|
-
seriesInfo: {
|
|
160
|
-
marginBottom: verticalScale(10),
|
|
161
|
-
},
|
|
162
|
-
seriesTitle: {
|
|
163
|
-
fontSize: RFValue(13),
|
|
164
|
-
fontWeight: '500',
|
|
165
|
-
color: '#fff',
|
|
166
|
-
},
|
|
167
|
-
seriesDescription: {
|
|
168
|
-
fontSize: RFValue(10),
|
|
169
|
-
color: '#fff',
|
|
170
|
-
marginTop: 2.5,
|
|
171
|
-
opacity: 0.9,
|
|
172
|
-
},
|
|
173
|
-
episodesButton: {
|
|
174
|
-
flexDirection: 'row',
|
|
175
|
-
justifyContent: 'space-between',
|
|
176
|
-
alignItems: 'center',
|
|
177
|
-
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
178
|
-
borderRadius: moderateScale(8),
|
|
179
|
-
paddingHorizontal: moderateScale(12),
|
|
180
|
-
paddingVertical: verticalScale(8),
|
|
181
|
-
},
|
|
182
|
-
episodesButtonContent: {
|
|
183
|
-
flexDirection: 'row',
|
|
184
|
-
alignItems: 'center',
|
|
185
|
-
},
|
|
186
|
-
episodesText: {
|
|
187
|
-
fontSize: RFValue(13),
|
|
188
|
-
color: '#fff',
|
|
189
|
-
marginLeft: moderateScale(10),
|
|
190
|
-
},
|
|
191
|
-
progressBarContainer: {
|
|
192
|
-
marginVertical: verticalScale(10),
|
|
193
|
-
marginHorizontal: moderateScale(5),
|
|
194
|
-
},
|
|
195
|
-
progressBarWrapper: {
|
|
196
|
-
height: verticalScale(2),
|
|
197
|
-
backgroundColor: 'rgba(255, 255, 255, 0.3)',
|
|
198
|
-
borderRadius: moderateScale(1),
|
|
199
|
-
position: 'relative',
|
|
200
|
-
},
|
|
201
|
-
progressBarFill: {
|
|
202
|
-
height: '100%',
|
|
203
|
-
// backgroundColor: '#fff',
|
|
204
|
-
borderRadius: moderateScale(1),
|
|
205
|
-
},
|
|
206
|
-
progressBarKnob: {
|
|
207
|
-
position: 'absolute',
|
|
208
|
-
top: -verticalScale(2),
|
|
209
|
-
width: moderateScale(7),
|
|
210
|
-
height: moderateScale(7),
|
|
211
|
-
borderRadius: moderateScale(5),
|
|
212
|
-
backgroundColor: '#fff',
|
|
213
|
-
transform: [{ translateX: -moderateScale(3.5) }],
|
|
214
|
-
},
|
|
215
|
-
sliderThumb: {
|
|
216
|
-
width: moderateScale(7),
|
|
217
|
-
height: moderateScale(7),
|
|
218
|
-
borderRadius: moderateScale(3.5),
|
|
219
|
-
backgroundColor: '#fff',
|
|
220
|
-
},
|
|
221
|
-
});
|