@zezosoft/zezo-ott-react-native-ui-kit 1.1.0 → 1.1.2
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/Styles/globalStyles.js +0 -5
- package/lib/module/Styles/globalStyles.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +64 -40
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +5 -2
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +17 -11
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +12 -6
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +7 -4
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +133 -86
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +174 -109
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +19 -13
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +54 -36
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +29 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +13 -7
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +33 -21
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +26 -20
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +36 -20
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +152 -0
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +4 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/Button/BackBtn.js +46 -16
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +19 -13
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +19 -13
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +19 -13
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +70 -37
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +40 -32
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +109 -48
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +4 -11
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +105 -43
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +18 -17
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +78 -28
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Content.js +44 -25
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +37 -29
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +70 -41
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +74 -40
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/AboutSection.js +40 -19
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +6 -7
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +2 -2
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +25 -13
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +39 -11
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +84 -77
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/ContentView/components/PlayButton.js +11 -7
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +12 -12
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +12 -7
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/Fallbacks/NoContentFallback.js +27 -22
- package/lib/module/components/Fallbacks/NoContentFallback.js.map +1 -1
- package/lib/module/components/Fallbacks/NotFoundFallback.js +6 -4
- package/lib/module/components/Fallbacks/NotFoundFallback.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +22 -13
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/Three.js +6 -5
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +19 -14
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +46 -31
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Loader/Loader.js +2 -2
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +17 -14
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js +134 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js +154 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js +173 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js +77 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js +132 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js +165 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js +106 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js +124 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +102 -64
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +241 -232
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js +153 -0
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/{Model → components}/Episodes.js +46 -36
- package/lib/module/components/Reels/ReelsSeries/components/Episodes.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js +35 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js +37 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js +55 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js +268 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js +143 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js +56 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js +5 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js +30 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/index.js +7 -0
- package/lib/module/components/Reels/utils/Controls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js +28 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js +27 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js +5 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js.map +1 -0
- package/lib/module/components/Reels/utils/index.js +4 -0
- package/lib/module/components/Reels/utils/index.js.map +1 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js +24 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js.map +1 -0
- package/lib/module/components/Search/One.js +2 -1
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +15 -19
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +97 -62
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +313 -254
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/Text/Text.js +15 -12
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +25 -23
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +23 -18
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +38 -24
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +21 -14
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +30 -21
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +38 -19
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +37 -17
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/View/View.js +7 -4
- package/lib/module/components/View/View.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/index.js +17 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useDebounce.js +25 -6
- package/lib/module/hooks/useDebounce.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -4
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +10 -4
- package/lib/module/hooks/useNavigationMode.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +1 -1
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/hooks/usePrevious.js +30 -0
- package/lib/module/hooks/usePrevious.js.map +1 -0
- package/lib/module/hooks/useSafeCallback.js +33 -0
- package/lib/module/hooks/useSafeCallback.js.map +1 -0
- package/lib/module/hooks/useSkeletonItems.js +33 -0
- package/lib/module/hooks/useSkeletonItems.js.map +1 -0
- package/lib/module/hooks/useSplashCache.js +2 -1
- package/lib/module/hooks/useSplashCache.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +33 -0
- package/lib/module/hooks/useThemeColors.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +24 -15
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useInternalTheme.js +18 -11
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
- package/lib/module/theme/hook/useThemeStatusBar.js +10 -4
- package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -1
- package/lib/module/theme/themes.js +3 -3
- package/lib/typescript/src/Styles/globalStyles.d.ts +0 -5
- package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +0 -15
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +18 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +3 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/BackBtn.d.ts +5 -3
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts +2 -2
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +4 -2
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +2 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +2 -2
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts +2 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts +2 -2
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +2 -2
- package/lib/typescript/src/components/Input/Input.d.ts +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +2 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts +60 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts +16 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts +15 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/{Model → components}/Episodes.d.ts +3 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Episodes.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts +11 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts +10 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts +3 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts +10 -0
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts +5 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts +12 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts +24 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts +3 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts +2 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts +14 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -5
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/index.d.ts +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts +2 -2
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -2
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/View/View.d.ts +2 -0
- package/lib/typescript/src/components/View/View.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +14 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts +12 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts +15 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts +11 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts +27 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Styles/globalStyles.ts +0 -5
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +288 -212
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +11 -4
- package/src/components/Auth/Login/LoginWithEmail.tsx +266 -238
- package/src/components/Auth/Login/LoginWithPhone.tsx +18 -6
- package/src/components/Auth/OTP/OTP.tsx +21 -5
- package/src/components/Auth/QrLogin/QrLogin.tsx +225 -185
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +282 -166
- package/src/components/Auth/SignUp/SignUp.tsx +312 -293
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +186 -131
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +32 -15
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +11 -5
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +34 -18
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +43 -37
- package/src/components/BlogView/BlogView.tsx +66 -30
- package/src/components/BottomSheet/BottomSheet.tsx +195 -0
- package/src/components/BottomSheet/index.ts +2 -0
- package/src/components/Button/BackBtn.tsx +87 -24
- package/src/components/Button/PrimaryBtn.tsx +42 -25
- package/src/components/Button/SecondaryBtn.tsx +41 -25
- package/src/components/Button/TextButton.tsx +54 -32
- package/src/components/Content/Card/Category/Category.tsx +94 -56
- package/src/components/Content/Card/Sliders/Styles/One.tsx +63 -47
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +131 -51
- package/src/components/Content/Card/Styles/RotateInOut.tsx +7 -9
- package/src/components/Content/Card/components/CardPoster.tsx +136 -55
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +58 -38
- package/src/components/Content/Card/components/ThumbnailCard.tsx +122 -47
- package/src/components/Content/Content.tsx +164 -97
- package/src/components/Content/Sections.tsx +99 -43
- package/src/components/ContentView/ContentView.tsx +194 -128
- package/src/components/ContentView/MoreContentList.tsx +215 -151
- package/src/components/ContentView/components/AboutSection.tsx +132 -93
- package/src/components/ContentView/components/CastCard.tsx +148 -138
- package/src/components/ContentView/components/EpisodeCard.tsx +160 -155
- package/src/components/ContentView/components/GenreTags.tsx +68 -53
- package/src/components/ContentView/components/HeroBanner.tsx +326 -284
- package/src/components/ContentView/components/MiniInfo.tsx +181 -159
- package/src/components/ContentView/components/PlayButton.tsx +27 -16
- package/src/components/ContentView/components/Title.tsx +89 -72
- package/src/components/ContentView/components/TrailerButton.tsx +35 -22
- package/src/components/Fallbacks/NoContentFallback.tsx +107 -103
- package/src/components/Fallbacks/NotFoundFallback.tsx +12 -4
- package/src/components/Headers/AppHeader.tsx +42 -26
- package/src/components/Headers/Three.tsx +12 -8
- package/src/components/Headers/Two.tsx +31 -10
- package/src/components/Input/InputOne.tsx +136 -108
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Logo/Logo.tsx +43 -27
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +156 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +234 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +196 -0
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +92 -0
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +163 -0
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +210 -0
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +143 -0
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +154 -0
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +142 -74
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +349 -250
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +184 -0
- package/src/components/Reels/ReelsSeries/{Model → components}/Episodes.tsx +54 -33
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +41 -0
- package/src/components/Reels/ReelsSeries/components/Like.tsx +40 -0
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +79 -0
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +332 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +190 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +80 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +2 -0
- package/src/components/Reels/ReelsSeries/types.ts +13 -2
- package/src/components/Reels/utils/Controls/gestureUtils.ts +42 -0
- package/src/components/Reels/utils/Controls/index.ts +4 -0
- package/src/components/Reels/utils/Controls/overlayUtils.ts +35 -0
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +25 -0
- package/src/components/Reels/utils/Controls/videoRef.ts +4 -0
- package/src/components/Reels/utils/index.ts +1 -0
- package/src/components/Reels/utils/timeoutUtils.ts +29 -0
- package/src/components/Search/One.tsx +2 -4
- package/src/components/Search/components/SearchCard.tsx +19 -13
- package/src/components/Settings/AppSettings.tsx +217 -128
- package/src/components/Subscription/SubOne.tsx +394 -317
- package/src/components/Text/Text.tsx +33 -22
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +129 -102
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +36 -17
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +194 -140
- package/src/components/User/WatchHistory/WatchHistory.tsx +63 -36
- package/src/components/User/WatchLater/WatchLater.tsx +119 -81
- package/src/components/User/components/UserAvatar.tsx +49 -15
- package/src/components/User/components/UserSection.tsx +71 -37
- package/src/components/View/View.tsx +10 -2
- package/src/components/index.ts +1 -1
- package/src/hooks/index.ts +14 -0
- package/src/hooks/useDebounce.ts +25 -6
- package/src/hooks/useKeyboard.ts +12 -5
- package/src/hooks/useNavigationMode.ts +16 -5
- package/src/hooks/usePaginatedSection.ts +1 -1
- package/src/hooks/usePrevious.ts +28 -0
- package/src/hooks/useSafeCallback.ts +43 -0
- package/src/hooks/useSkeletonItems.ts +30 -0
- package/src/hooks/useSplashCache.ts +2 -1
- package/src/hooks/useThemeColors.ts +51 -0
- package/src/theme/ThemeProvider.tsx +33 -11
- package/src/theme/hook/useInternalTheme.ts +19 -13
- package/src/theme/hook/useThemeStatusBar.ts +14 -5
- package/src/theme/themes.ts +3 -3
- package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +0 -212
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js +0 -182
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js +0 -203
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts +0 -9
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts +0 -13
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts +0 -18
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts.map +0 -1
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +0 -242
- package/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.tsx +0 -209
- package/src/components/Reels/ReelsSeries/ReelSeriesOverlay.tsx +0 -185
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* @author Naresh Dhamu
|
|
5
5
|
* @LastModified Mon 30 Jun 2025 at 11:30 PM
|
|
6
6
|
*/
|
|
7
|
-
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
7
|
+
import React, { memo, useCallback, useMemo, useState, useRef } from 'react';
|
|
8
|
+
import { InteractionManager } from 'react-native';
|
|
9
|
+
import { useSkeletonItems } from "../../../../../hooks/useSkeletonItems.js";
|
|
8
10
|
import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
9
11
|
import Carousel from 'react-native-reanimated-carousel';
|
|
10
12
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
@@ -20,6 +22,36 @@ import RentOrBuyIcon from "../../components/RentOrBuyIcon.js";
|
|
|
20
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
23
|
const FULL_WIDTH = Display.fullWidth;
|
|
22
24
|
const FULL_HEIGHT = FULL_WIDTH * (9 / 16);
|
|
25
|
+
|
|
26
|
+
// Memoized carousel item component for better performance
|
|
27
|
+
|
|
28
|
+
const CarouselItem = /*#__PURE__*/memo(({
|
|
29
|
+
item,
|
|
30
|
+
onPressItem,
|
|
31
|
+
appliedTheme,
|
|
32
|
+
gradientConfig
|
|
33
|
+
}) => /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
34
|
+
activeOpacity: 0.85,
|
|
35
|
+
onPress: () => onPressItem?.(item),
|
|
36
|
+
style: styles.itemWrapper,
|
|
37
|
+
accessibilityRole: "button",
|
|
38
|
+
accessibilityLabel: `View ${item.name}`,
|
|
39
|
+
children: [/*#__PURE__*/_jsx(RentOrBuyIcon, {
|
|
40
|
+
theme: appliedTheme,
|
|
41
|
+
content_offering_type: item.content_offering_type
|
|
42
|
+
}), /*#__PURE__*/_jsx(ThumbnailCard, {
|
|
43
|
+
thumbnailUri: item.thumbnail,
|
|
44
|
+
theme: appliedTheme,
|
|
45
|
+
isLoading: false,
|
|
46
|
+
wrapperStyle: styles.image,
|
|
47
|
+
resizeMode: FastImage.resizeMode.cover
|
|
48
|
+
}), /*#__PURE__*/_jsx(LinearGradient, {
|
|
49
|
+
colors: gradientConfig.colors,
|
|
50
|
+
start: gradientConfig.start,
|
|
51
|
+
end: gradientConfig.end,
|
|
52
|
+
style: styles.gradientBottomOverlay
|
|
53
|
+
})]
|
|
54
|
+
}));
|
|
23
55
|
const SliderTwo = ({
|
|
24
56
|
data,
|
|
25
57
|
onPressItem,
|
|
@@ -35,7 +67,47 @@ const SliderTwo = ({
|
|
|
35
67
|
const contentData = useMemo(() => data?.data ?? [], [data]);
|
|
36
68
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
37
69
|
const gradientColors = useMemo(() => [appliedTheme.colors.primary, appliedTheme.colors.primary], [appliedTheme.colors.primary]);
|
|
38
|
-
|
|
70
|
+
// Debounce snap handler to prevent stuttering
|
|
71
|
+
const snapTimeoutRef = useRef(null);
|
|
72
|
+
const handleSnapToItem = useCallback(i => {
|
|
73
|
+
if (snapTimeoutRef.current) {
|
|
74
|
+
clearTimeout(snapTimeoutRef.current);
|
|
75
|
+
}
|
|
76
|
+
snapTimeoutRef.current = setTimeout(() => {
|
|
77
|
+
InteractionManager.runAfterInteractions(() => {
|
|
78
|
+
setActiveIndex(i);
|
|
79
|
+
});
|
|
80
|
+
}, 50);
|
|
81
|
+
}, []);
|
|
82
|
+
|
|
83
|
+
// Memoize skeleton items
|
|
84
|
+
const skeletonItems = useSkeletonItems(skeletonCount);
|
|
85
|
+
|
|
86
|
+
// Memoize indicator array
|
|
87
|
+
const indicatorArray = useMemo(() => Array.from({
|
|
88
|
+
length: contentData.length
|
|
89
|
+
}, (_, i) => i), [contentData.length]);
|
|
90
|
+
|
|
91
|
+
// Memoize carousel data
|
|
92
|
+
const carouselData = useMemo(() => isLoading ? skeletonItems : contentData, [isLoading, skeletonItems, contentData]);
|
|
93
|
+
|
|
94
|
+
// Memoize gradient configuration
|
|
95
|
+
const gradientConfig = useMemo(() => ({
|
|
96
|
+
colors: ['transparent', 'rgba(0,0,0,0.7)'],
|
|
97
|
+
start: {
|
|
98
|
+
x: 0.5,
|
|
99
|
+
y: 0
|
|
100
|
+
},
|
|
101
|
+
end: {
|
|
102
|
+
x: 0.5,
|
|
103
|
+
y: 1
|
|
104
|
+
}
|
|
105
|
+
}), []);
|
|
106
|
+
|
|
107
|
+
// Memoize pan gesture handler for smooth scrolling
|
|
108
|
+
const configurePanGesture = useCallback(gesture => {
|
|
109
|
+
gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5]);
|
|
110
|
+
}, []);
|
|
39
111
|
const renderSkeletonItem = useCallback(() => /*#__PURE__*/_jsx(View, {
|
|
40
112
|
style: styles.itemWrapper,
|
|
41
113
|
children: /*#__PURE__*/_jsx(SkeletonPlaceholder, {
|
|
@@ -49,34 +121,34 @@ const SliderTwo = ({
|
|
|
49
121
|
}), [appliedTheme.colors]);
|
|
50
122
|
const renderCarouselItem = useCallback(({
|
|
51
123
|
item
|
|
52
|
-
}) => /*#__PURE__*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
124
|
+
}) => /*#__PURE__*/_jsx(CarouselItem, {
|
|
125
|
+
item: item,
|
|
126
|
+
onPressItem: onPressItem,
|
|
127
|
+
appliedTheme: appliedTheme,
|
|
128
|
+
gradientConfig: gradientConfig
|
|
129
|
+
}), [appliedTheme, onPressItem, gradientConfig]);
|
|
130
|
+
|
|
131
|
+
// Memoize renderItem to prevent switching functions
|
|
132
|
+
const renderItem = useMemo(() => isLoading ? renderSkeletonItem : renderCarouselItem, [isLoading, renderSkeletonItem, renderCarouselItem]);
|
|
133
|
+
|
|
134
|
+
// Memoize carousel props for smooth scrolling
|
|
135
|
+
const carouselProps = useMemo(() => ({
|
|
136
|
+
width: FULL_WIDTH,
|
|
137
|
+
height: FULL_HEIGHT,
|
|
138
|
+
autoPlay: !isLoading && contentData.length > 1,
|
|
139
|
+
loop: !isLoading && contentData.length > 1,
|
|
140
|
+
scrollAnimationDuration: 300,
|
|
141
|
+
// Reduced for smoother scrolling
|
|
142
|
+
autoPlayInterval: 3000,
|
|
143
|
+
windowSize: 2,
|
|
144
|
+
// Reduced window size for better performance
|
|
145
|
+
enabled: true
|
|
146
|
+
}), [isLoading, contentData.length]);
|
|
147
|
+
|
|
148
|
+
// Memoize inactive indicator style
|
|
149
|
+
const inactiveIndicatorStyle = useMemo(() => [styles.inactiveIndicator, {
|
|
150
|
+
backgroundColor: appliedTheme.colors.onSurface
|
|
151
|
+
}], [appliedTheme.colors.onSurface]);
|
|
80
152
|
const renderIndicator = useCallback((_, i) => /*#__PURE__*/_jsx(View, {
|
|
81
153
|
style: styles.indicatorWrapper,
|
|
82
154
|
children: isLoading ? /*#__PURE__*/_jsx(SkeletonPlaceholder, {
|
|
@@ -100,11 +172,9 @@ const SliderTwo = ({
|
|
|
100
172
|
colors: gradientColors,
|
|
101
173
|
style: styles.activeIndicator
|
|
102
174
|
}) : /*#__PURE__*/_jsx(View, {
|
|
103
|
-
style:
|
|
104
|
-
backgroundColor: appliedTheme.colors.onSurface
|
|
105
|
-
}]
|
|
175
|
+
style: inactiveIndicatorStyle
|
|
106
176
|
})
|
|
107
|
-
}, i), [isLoading, appliedTheme.colors.skeletonBaseColor, appliedTheme.colors.skeletonHighlightColor,
|
|
177
|
+
}, i), [isLoading, appliedTheme.colors.skeletonBaseColor, appliedTheme.colors.skeletonHighlightColor, inactiveIndicatorStyle, activeIndex, gradientColors]);
|
|
108
178
|
if (!data || !isLoading && contentData.length === 0) {
|
|
109
179
|
return /*#__PURE__*/_jsx(View, {
|
|
110
180
|
style: [styles.container, styles.emptyState],
|
|
@@ -119,25 +189,16 @@ const SliderTwo = ({
|
|
|
119
189
|
accessibilityLabel: accessibilityLabel,
|
|
120
190
|
accessibilityHint: accessibilityHint,
|
|
121
191
|
children: [/*#__PURE__*/_jsx(Carousel, {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
loop: !isLoading && contentData.length > 1,
|
|
126
|
-
scrollAnimationDuration: 1000,
|
|
127
|
-
autoPlayInterval: 3000,
|
|
128
|
-
data: isLoading ? Array.from({
|
|
129
|
-
length: skeletonCount
|
|
130
|
-
}) : contentData,
|
|
131
|
-
renderItem: isLoading ? renderSkeletonItem : renderCarouselItem,
|
|
192
|
+
...carouselProps,
|
|
193
|
+
data: carouselData,
|
|
194
|
+
renderItem: renderItem,
|
|
132
195
|
onSnapToItem: handleSnapToItem,
|
|
133
|
-
onConfigurePanGesture:
|
|
196
|
+
onConfigurePanGesture: configurePanGesture
|
|
134
197
|
}), /*#__PURE__*/_jsx(View, {
|
|
135
198
|
style: styles.indicatorContainer,
|
|
136
199
|
children: /*#__PURE__*/_jsx(View, {
|
|
137
200
|
style: styles.indicator,
|
|
138
|
-
children:
|
|
139
|
-
length: contentData.length
|
|
140
|
-
}, renderIndicator)
|
|
201
|
+
children: indicatorArray.map(i => renderIndicator(0, i))
|
|
141
202
|
})
|
|
142
203
|
})]
|
|
143
204
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useCallback","useMemo","useState","View","TouchableOpacity","StyleSheet","Carousel","scale","verticalScale","FastImage","LinearGradient","SkeletonPlaceholder","Text","useInternalTheme","Display","ThumbnailCard","RFValue","RentOrBuyIcon","jsx","_jsx","jsxs","_jsxs","FULL_WIDTH","fullWidth","FULL_HEIGHT","
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useMemo","useState","useRef","InteractionManager","useSkeletonItems","View","TouchableOpacity","StyleSheet","Carousel","scale","verticalScale","FastImage","LinearGradient","SkeletonPlaceholder","Text","useInternalTheme","Display","ThumbnailCard","RFValue","RentOrBuyIcon","jsx","_jsx","jsxs","_jsxs","FULL_WIDTH","fullWidth","FULL_HEIGHT","CarouselItem","item","onPressItem","appliedTheme","gradientConfig","activeOpacity","onPress","style","styles","itemWrapper","accessibilityRole","accessibilityLabel","name","children","theme","content_offering_type","thumbnailUri","thumbnail","isLoading","wrapperStyle","image","resizeMode","cover","colors","start","end","gradientBottomOverlay","SliderTwo","data","skeletonCount","accessibilityHint","contentData","activeIndex","setActiveIndex","gradientColors","primary","snapTimeoutRef","handleSnapToItem","i","current","clearTimeout","setTimeout","runAfterInteractions","skeletonItems","indicatorArray","Array","from","length","_","carouselData","x","y","configurePanGesture","gesture","activeOffsetX","failOffsetY","renderSkeletonItem","backgroundColor","skeletonBaseColor","highlightColor","skeletonHighlightColor","Item","width","height","renderCarouselItem","renderItem","carouselProps","autoPlay","loop","scrollAnimationDuration","autoPlayInterval","windowSize","enabled","inactiveIndicatorStyle","inactiveIndicator","onSurface","renderIndicator","indicatorWrapper","speed","borderRadius","activeIndicator","container","emptyState","emptyText","onSnapToItem","onConfigurePanGesture","indicatorContainer","indicator","map","create","flex","marginVertical","overflow","position","bottom","left","right","zIndex","alignItems","justifyContent","marginTop","flexDirection","gap","padding","fontSize","fontWeight","color","textAlign"],"sourceRoot":"../../../../../../../src","sources":["components/Content/Card/Sliders/Styles/Two.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AAC3E,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,gBAAgB,QAAQ,0CAAuC;AACxE,SACEC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,QAEL,cAAc;AACrB,OAAOC,QAAQ,MAAM,kCAAkC;AACvD,SAASC,KAAK,EAAEC,aAAa,QAAQ,2BAA2B;AAChE,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,OAAOC,cAAc,MAAM,8BAA8B;AACzD,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,SAASC,IAAI,QAAQ,2BAAkB;AACvC,SAASC,gBAAgB,QAAQ,+CAA4C;AAC7E,OAAOC,OAAO,MAAM,iCAA8B;AAClD,SAASC,aAAa,QAAQ,mCAAgC;AAE9D,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,OAAOC,aAAa,MAAM,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAI3D,MAAMC,UAAU,GAAGR,OAAO,CAACS,SAAS;AACpC,MAAMC,WAAW,GAAGF,UAAU,IAAI,CAAC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,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDnB,eAAe,EAAE;IACflB,KAAK,EAAEhF,KAAK,CAAC,EAAE,CAAC;IAChBiF,MAAM,EAAEjF,KAAK,CAAC,CAAC,CAAC;IAChBiG,YAAY,EAAEjG,KAAK,CAAC,EAAE;EACxB,CAAC;EACD4F,iBAAiB,EAAE;IACjBZ,KAAK,EAAEhF,KAAK,CAAC,CAAC,CAAC;IACfiF,MAAM,EAAEjF,KAAK,CAAC,CAAC,CAAC;IAChBiG,YAAY,EAAEjG,KAAK,CAAC,EAAE;EACxB,CAAC;EACDoG,UAAU,EAAE;IACVqB,OAAO,EAAEzH,KAAK,CAAC,EAAE,CAAC;IAClBoH,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDhB,SAAS,EAAE;IACTqB,QAAQ,EAAEjH,OAAO,CAAC,EAAE,CAAC;IACrBkH,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,4BAAexI,IAAI,CAACwD,SAAS,CAAC","ignoreList":[]}
|
|
@@ -16,6 +16,7 @@ import { useInternalTheme } from "../../../../theme/hook/useInternalTheme.js";
|
|
|
16
16
|
import CardPoster from "../components/CardPoster.js";
|
|
17
17
|
import NavigateToMore from "../components/NavigateToMore.js";
|
|
18
18
|
import { usePaginatedSection } from "../../../../hooks/usePaginatedSection.js";
|
|
19
|
+
import { useSkeletonItems } from "../../../../hooks/useSkeletonItems.js";
|
|
19
20
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
20
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
22
|
const {
|
|
@@ -103,19 +104,11 @@ const RotateCarousel = ({
|
|
|
103
104
|
} = usePaginatedSection(section_id, moreFetchData, initialData?.data || [], isLoading);
|
|
104
105
|
|
|
105
106
|
// Memoized skeleton items
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
return Array.from({
|
|
109
|
-
length: count
|
|
110
|
-
}, (_, i) => ({
|
|
111
|
-
_id: `skeleton-${i}`,
|
|
112
|
-
isSkeleton: true
|
|
113
|
-
}));
|
|
114
|
-
}, [isLoading, isPaginating, skeletonCount]);
|
|
107
|
+
const skeletonCountMemo = useMemo(() => isLoading ? skeletonCount : isPaginating ? 1 : 0, [isLoading, isPaginating, skeletonCount]);
|
|
108
|
+
const skeletonItems = useSkeletonItems(skeletonCountMemo);
|
|
115
109
|
|
|
116
110
|
// Optimized finalData to avoid unnecessary spread
|
|
117
111
|
const finalData = useMemo(() => isLoading ? skeletonItems : skeletonItems.length > 0 ? [...data, ...skeletonItems] : data, [isLoading, data, skeletonItems]);
|
|
118
|
-
|
|
119
112
|
// Debounced loadMoreData to prevent excessive calls
|
|
120
113
|
const debouncedLoadMore = useMemo(() => debounce(nextPage => {
|
|
121
114
|
return loadMoreData(nextPage);
|
|
@@ -200,7 +193,7 @@ const RotateCarousel = ({
|
|
|
200
193
|
data: finalData,
|
|
201
194
|
vertical: false,
|
|
202
195
|
renderItem: renderItem,
|
|
203
|
-
firstItem:
|
|
196
|
+
firstItem: 2,
|
|
204
197
|
inactiveSlideOpacity: 0.6,
|
|
205
198
|
inactiveSlideScale: 0.9,
|
|
206
199
|
sliderWidth: width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useCallback","useMemo","useRef","View","StyleSheet","Dimensions","TouchableOpacity","SkeletonPlaceholder","FastImage","Carousel","moderateScale","verticalScale","debounce","useInternalTheme","CardPoster","NavigateToMore","usePaginatedSection","RFValue","jsx","_jsx","jsxs","_jsxs","width","height","get","DEFAULT_ITEM_WIDTH","DEFAULT_ITEM_HEIGHT","DEFAULT_BORDER_RADIUS","staticStyles","create","root","marginVertical","navigateToMoreContainer","paddingHorizontal","marginBottom","title","fontSize","fontWeight","marginHorizontal","RotateCarousel","section_id","type","data","initialData","moreFetchData","onPressMore","onPressItem","renderItemImage","itemWidth","itemHeight","borderRadius","skeletonCount","containerStyle","titleStyle","itemStyle","isLoading","theme","appliedTheme","carouselRef","styles","item","overflow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","image","backgroundColor","colors","skeletonBaseColor","skeleton","marginRight","loading","isPaginating","pagination","loadMoreData","
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useMemo","useRef","View","StyleSheet","Dimensions","TouchableOpacity","SkeletonPlaceholder","FastImage","Carousel","moderateScale","verticalScale","debounce","useInternalTheme","CardPoster","NavigateToMore","usePaginatedSection","useSkeletonItems","RFValue","jsx","_jsx","jsxs","_jsxs","width","height","get","DEFAULT_ITEM_WIDTH","DEFAULT_ITEM_HEIGHT","DEFAULT_BORDER_RADIUS","staticStyles","create","root","marginVertical","navigateToMoreContainer","paddingHorizontal","marginBottom","title","fontSize","fontWeight","marginHorizontal","RotateCarousel","section_id","type","data","initialData","moreFetchData","onPressMore","onPressItem","renderItemImage","itemWidth","itemHeight","borderRadius","skeletonCount","containerStyle","titleStyle","itemStyle","isLoading","theme","appliedTheme","carouselRef","styles","item","overflow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","image","backgroundColor","colors","skeletonBaseColor","skeleton","marginRight","loading","isPaginating","pagination","loadMoreData","skeletonCountMemo","skeletonItems","finalData","length","debouncedLoadMore","nextPage","handleItemPress","handlePressMore","name","renderItem","index","style","children","highlightColor","skeletonHighlightColor","Item","_id","activeOpacity","disabled","onPress","content_offering_type","posterUri","poster","posterWrapperStyle","resizeMode","cover","testID","marginLeft","color","textPrimary","showAllProps","iconColor","ref","vertical","firstItem","inactiveSlideOpacity","inactiveSlideScale","sliderWidth","onSnapToItem","hasNextPage"],"sourceRoot":"../../../../../../src","sources":["components/Content/Card/Styles/RotateInOut.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACjE,SACEC,IAAI,EAC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AAExB,YAAY,CAACI,uBAAwB;MACrD2E,YAAY,EAAE;QAAEC,SAAS,EAAEnD,YAAY,CAACY,MAAM,CAACqC,WAAW;QAAElD;MAAM;IAAE,CACrE,CACF,eACDrC,IAAA,CAACX,QAAQ;MACPqG,GAAG,EAAEnD,WAAY;MACjBhB,IAAI,EAAEqC,SAAiB;MACvB+B,QAAQ,EAAE,KAAM;MAChBxB,UAAU,EAAEA,UAAW;MACvByB,SAAS,EAAE,CAAE;MACbC,oBAAoB,EAAE,GAAI;MAC1BC,kBAAkB,EAAE,GAAI;MACxBC,WAAW,EAAE5F,KAAM;MACnB0B,SAAS,EAAEA,SAAU;MACrBmE,YAAY,EAAG5B,KAAK,IAAK;QACvB,IAAIhC,SAAS,IAAI,CAACoB,UAAU,EAAEyC,WAAW,IAAI,CAACzC,UAAU,EAAEO,QAAQ,EAChE;QACF,IAAIK,KAAK,IAAIR,SAAS,CAACC,MAAM,GAAG,CAAC,EAAE;UACjCC,iBAAiB,CAACN,UAAU,CAACO,QAAQ,CAAC;QACxC;MACF;IAAE,CACH,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;AAED,4BAAepF,IAAI,CAACyC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @lastModified Sat 25 Oct 2025 at 04:01 PM
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, { useState, useEffect, useMemo } from 'react';
|
|
8
|
+
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
9
9
|
import { View, StyleSheet } from 'react-native';
|
|
10
10
|
import FastImage from 'react-native-fast-image';
|
|
11
11
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
@@ -14,6 +14,8 @@ import { Text } from "../../../Text/index.js";
|
|
|
14
14
|
import { ImageOff } from 'lucide-react-native';
|
|
15
15
|
import RentOrBuyIcon from "./RentOrBuyIcon.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
// Module-level cache to track successfully loaded images
|
|
18
|
+
const loadedImageCache = new Set();
|
|
17
19
|
const CardPoster = ({
|
|
18
20
|
content_offering_type,
|
|
19
21
|
posterUri,
|
|
@@ -31,19 +33,45 @@ const CardPoster = ({
|
|
|
31
33
|
const cleaned = posterUri.trim();
|
|
32
34
|
return (cleaned.startsWith('http://') || cleaned.startsWith('https://')) && /\.(jpg|jpeg|png|webp|gif|bmp)$/i.test(cleaned);
|
|
33
35
|
}, [posterUri]);
|
|
36
|
+
|
|
37
|
+
// Reset image loading state when isLoading prop changes
|
|
34
38
|
useEffect(() => {
|
|
35
|
-
if (
|
|
39
|
+
if (isLoading) {
|
|
36
40
|
setImageLoading(true);
|
|
37
41
|
setImageError(false);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
}
|
|
43
|
+
}, [isLoading]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (hasValidPoster) {
|
|
46
|
+
// Check if this image was already loaded successfully before
|
|
47
|
+
const isAlreadyLoaded = loadedImageCache.has(posterUri);
|
|
48
|
+
if (isAlreadyLoaded) {
|
|
49
|
+
// Image was loaded before, skip loading state
|
|
50
|
+
setImageLoading(false);
|
|
51
|
+
setImageError(false);
|
|
52
|
+
} else {
|
|
53
|
+
// Image not loaded before, show loading
|
|
54
|
+
setImageLoading(true);
|
|
55
|
+
setImageError(false);
|
|
56
|
+
FastImage.preload([{
|
|
57
|
+
uri: posterUri
|
|
58
|
+
}]);
|
|
59
|
+
}
|
|
41
60
|
} else {
|
|
42
61
|
setImageLoading(false);
|
|
43
62
|
setImageError(true);
|
|
44
63
|
}
|
|
45
64
|
}, [posterUri, hasValidPoster]);
|
|
46
|
-
const showSkeleton = isLoading || imageLoading && !imageError && hasValidPoster;
|
|
65
|
+
const showSkeleton = useMemo(() => isLoading || imageLoading && !imageError && hasValidPoster, [isLoading, imageLoading, imageError, hasValidPoster]);
|
|
66
|
+
|
|
67
|
+
// Memoize theme colors
|
|
68
|
+
const themeColors = useMemo(() => ({
|
|
69
|
+
background: theme.colors.background,
|
|
70
|
+
skeletonBaseColor: theme.colors.skeletonBaseColor,
|
|
71
|
+
skeletonHighlightColor: theme.colors.skeletonHighlightColor,
|
|
72
|
+
error: theme.colors.error,
|
|
73
|
+
errorContainer: theme.colors.errorContainer
|
|
74
|
+
}), [theme.colors]);
|
|
47
75
|
const fallbackImageStyle = useMemo(() => ({
|
|
48
76
|
width: '100%',
|
|
49
77
|
aspectRatio: 2 / 3,
|
|
@@ -52,60 +80,94 @@ const CardPoster = ({
|
|
|
52
80
|
top: 0,
|
|
53
81
|
left: 0
|
|
54
82
|
}), [borderRadius]);
|
|
83
|
+
|
|
84
|
+
// Memoize FastImage source
|
|
85
|
+
const imageSource = useMemo(() => ({
|
|
86
|
+
uri: posterUri,
|
|
87
|
+
cache: FastImage.cacheControl.immutable,
|
|
88
|
+
priority: FastImage.priority.normal
|
|
89
|
+
}), [posterUri]);
|
|
90
|
+
|
|
91
|
+
// Memoize callback handlers
|
|
92
|
+
const handleLoadStart = useCallback(() => {
|
|
93
|
+
// Only set loading if image is not already in cache
|
|
94
|
+
if (!loadedImageCache.has(posterUri)) {
|
|
95
|
+
setImageLoading(true);
|
|
96
|
+
setImageError(false);
|
|
97
|
+
}
|
|
98
|
+
}, [posterUri]);
|
|
99
|
+
const handleLoad = useCallback(() => {
|
|
100
|
+
setImageLoading(false);
|
|
101
|
+
setImageError(false);
|
|
102
|
+
// Add to cache when successfully loaded
|
|
103
|
+
loadedImageCache.add(posterUri);
|
|
104
|
+
}, [posterUri]);
|
|
105
|
+
const handleError = useCallback(() => {
|
|
106
|
+
setImageLoading(false);
|
|
107
|
+
setImageError(true);
|
|
108
|
+
}, []);
|
|
109
|
+
|
|
110
|
+
// Memoize wrapper style
|
|
111
|
+
const wrapperStyle = useMemo(() => [styles.posterWrapper, {
|
|
112
|
+
borderRadius,
|
|
113
|
+
backgroundColor: themeColors.background
|
|
114
|
+
}, posterWrapperStyle], [borderRadius, themeColors.background, posterWrapperStyle]);
|
|
115
|
+
|
|
116
|
+
// Memoize skeleton wrapper style
|
|
117
|
+
const skeletonWrapperStyle = useMemo(() => [styles.skeletonWrapper, {
|
|
118
|
+
borderRadius
|
|
119
|
+
}], [borderRadius]);
|
|
120
|
+
|
|
121
|
+
// Memoize skeleton item style
|
|
122
|
+
const skeletonItemStyle = useMemo(() => [styles.skeleton, {
|
|
123
|
+
borderRadius
|
|
124
|
+
}], [borderRadius]);
|
|
125
|
+
|
|
126
|
+
// Memoize image style array
|
|
127
|
+
const imageStyleArray = useMemo(() => [fallbackImageStyle, showSkeleton ? styles.hidden : styles.visible, imageStyle], [fallbackImageStyle, showSkeleton, imageStyle]);
|
|
128
|
+
|
|
129
|
+
// Memoize fallback wrapper style
|
|
130
|
+
const fallbackWrapperStyle = useMemo(() => [styles.fallbackWrapper, {
|
|
131
|
+
borderRadius,
|
|
132
|
+
backgroundColor: themeColors.background,
|
|
133
|
+
borderColor: themeColors.error
|
|
134
|
+
}], [borderRadius, themeColors.background, themeColors.error]);
|
|
135
|
+
|
|
136
|
+
// Memoize fallback inner style
|
|
137
|
+
const fallbackInnerStyle = useMemo(() => [styles.fallback, {
|
|
138
|
+
backgroundColor: themeColors.errorContainer
|
|
139
|
+
}], [themeColors.errorContainer]);
|
|
55
140
|
return /*#__PURE__*/_jsxs(View, {
|
|
56
|
-
style:
|
|
57
|
-
borderRadius,
|
|
58
|
-
backgroundColor: theme.colors.background
|
|
59
|
-
}, posterWrapperStyle],
|
|
141
|
+
style: wrapperStyle,
|
|
60
142
|
children: [!showSkeleton && content_offering_type && /*#__PURE__*/_jsx(RentOrBuyIcon, {
|
|
61
143
|
theme: theme,
|
|
62
144
|
content_offering_type: content_offering_type
|
|
63
145
|
}, posterUri), showSkeleton && /*#__PURE__*/_jsx(View, {
|
|
64
|
-
style:
|
|
65
|
-
borderRadius
|
|
66
|
-
}],
|
|
146
|
+
style: skeletonWrapperStyle,
|
|
67
147
|
children: /*#__PURE__*/_jsx(SkeletonPlaceholder, {
|
|
68
|
-
backgroundColor:
|
|
69
|
-
highlightColor:
|
|
148
|
+
backgroundColor: themeColors.skeletonBaseColor,
|
|
149
|
+
highlightColor: themeColors.skeletonHighlightColor,
|
|
70
150
|
children: /*#__PURE__*/_jsx(SkeletonPlaceholder.Item, {
|
|
71
|
-
style:
|
|
72
|
-
borderRadius
|
|
73
|
-
}]
|
|
151
|
+
style: skeletonItemStyle
|
|
74
152
|
})
|
|
75
153
|
})
|
|
76
154
|
}), hasValidPoster && /*#__PURE__*/_jsx(FastImage, {
|
|
77
|
-
source:
|
|
78
|
-
|
|
79
|
-
cache: FastImage.cacheControl.immutable,
|
|
80
|
-
priority: FastImage.priority.normal
|
|
81
|
-
},
|
|
82
|
-
style: [fallbackImageStyle, showSkeleton ? styles.hidden : styles.visible, imageStyle],
|
|
155
|
+
source: imageSource,
|
|
156
|
+
style: imageStyleArray,
|
|
83
157
|
resizeMode: resizeMode,
|
|
84
|
-
onLoadStart:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
onLoad: () => setImageLoading(false),
|
|
89
|
-
onError: () => {
|
|
90
|
-
setImageLoading(false);
|
|
91
|
-
setImageError(true);
|
|
92
|
-
}
|
|
158
|
+
onLoadStart: handleLoadStart,
|
|
159
|
+
onLoad: handleLoad,
|
|
160
|
+
onError: handleError
|
|
93
161
|
}), !showSkeleton && (!hasValidPoster || imageError) && /*#__PURE__*/_jsx(View, {
|
|
94
|
-
style:
|
|
95
|
-
borderRadius,
|
|
96
|
-
backgroundColor: theme.colors.background,
|
|
97
|
-
borderColor: theme.colors.error
|
|
98
|
-
}],
|
|
162
|
+
style: fallbackWrapperStyle,
|
|
99
163
|
children: /*#__PURE__*/_jsxs(View, {
|
|
100
|
-
style:
|
|
101
|
-
backgroundColor: theme.colors.errorContainer
|
|
102
|
-
}],
|
|
164
|
+
style: fallbackInnerStyle,
|
|
103
165
|
children: [/*#__PURE__*/_jsx(ImageOff, {
|
|
104
166
|
size: scale(18),
|
|
105
|
-
color:
|
|
167
|
+
color: themeColors.error
|
|
106
168
|
}), /*#__PURE__*/_jsx(Text, {
|
|
107
169
|
style: styles.fallbackText,
|
|
108
|
-
color:
|
|
170
|
+
color: themeColors.error,
|
|
109
171
|
children: "Image Failed"
|
|
110
172
|
})]
|
|
111
173
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useEffect","useMemo","View","StyleSheet","FastImage","SkeletonPlaceholder","scale","Text","ImageOff","RentOrBuyIcon","jsx","_jsx","jsxs","_jsxs","CardPoster","content_offering_type","posterUri","theme","isLoading","borderRadius","posterWrapperStyle","imageStyle","resizeMode","cover","imageLoading","setImageLoading","imageError","setImageError","hasValidPoster","cleaned","trim","startsWith","test","preload","uri","showSkeleton","fallbackImageStyle","width","aspectRatio","position","top","left","
|
|
1
|
+
{"version":3,"names":["React","useState","useEffect","useMemo","useCallback","View","StyleSheet","FastImage","SkeletonPlaceholder","scale","Text","ImageOff","RentOrBuyIcon","jsx","_jsx","jsxs","_jsxs","loadedImageCache","Set","CardPoster","content_offering_type","posterUri","theme","isLoading","borderRadius","posterWrapperStyle","imageStyle","resizeMode","cover","imageLoading","setImageLoading","imageError","setImageError","hasValidPoster","cleaned","trim","startsWith","test","isAlreadyLoaded","has","preload","uri","showSkeleton","themeColors","background","colors","skeletonBaseColor","skeletonHighlightColor","error","errorContainer","fallbackImageStyle","width","aspectRatio","position","top","left","imageSource","cache","cacheControl","immutable","priority","normal","handleLoadStart","handleLoad","add","handleError","wrapperStyle","styles","posterWrapper","backgroundColor","skeletonWrapperStyle","skeletonWrapper","skeletonItemStyle","skeleton","imageStyleArray","hidden","visible","fallbackWrapperStyle","fallbackWrapper","borderColor","fallbackInnerStyle","fallback","style","children","highlightColor","Item","source","onLoadStart","onLoad","onError","size","color","fallbackText","memo","create","overflow","opacity","borderWidth","alignItems","justifyContent","marginTop","fontSize"],"sourceRoot":"../../../../../../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