@zezosoft/zezo-ott-react-native-ui-kit 1.1.2 → 1.1.5
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/Auth/AuthProvider/AuthProvider.js +5 -2
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/One/ForgotPassword/ForgotPassword.js +232 -0
- package/lib/module/components/Auth/One/ForgotPassword/ForgotPassword.js.map +1 -0
- package/lib/module/components/Auth/One/Login/LoginWithEmail.js +324 -0
- package/lib/module/components/Auth/One/Login/LoginWithEmail.js.map +1 -0
- package/lib/module/components/Auth/{Login → One/Login}/LoginWithPhone.js +13 -11
- package/lib/module/components/Auth/One/Login/LoginWithPhone.js.map +1 -0
- package/lib/module/components/Auth/One/OTP/OTP.js +301 -0
- package/lib/module/components/Auth/One/OTP/OTP.js.map +1 -0
- package/lib/module/components/Auth/One/QrLogin/QrLogin.js +479 -0
- package/lib/module/components/Auth/One/QrLogin/QrLogin.js.map +1 -0
- package/lib/module/components/Auth/One/QrLogin/components/QrViewArea.js +295 -0
- package/lib/module/components/Auth/One/QrLogin/components/QrViewArea.js.map +1 -0
- package/lib/module/components/Auth/One/SignUp/SignUp.js +362 -0
- package/lib/module/components/Auth/One/SignUp/SignUp.js.map +1 -0
- package/lib/module/components/Auth/{SplashScreen → One/SplashScreen}/SplashScreen.js +8 -5
- package/lib/module/components/Auth/One/SplashScreen/SplashScreen.js.map +1 -0
- package/lib/module/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.js +80 -0
- package/lib/module/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.js.map +1 -0
- package/lib/module/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashLottie/SplashLottie.js +1 -1
- package/lib/module/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
- package/lib/module/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashVideo/SplashVideo.js +42 -21
- package/lib/module/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
- package/lib/module/components/Auth/One/index.js +25 -0
- package/lib/module/components/Auth/One/index.js.map +1 -0
- package/lib/module/components/Auth/Two/AuthHeader/AuthHeader.js +93 -0
- package/lib/module/components/Auth/Two/AuthHeader/AuthHeader.js.map +1 -0
- package/lib/module/components/Auth/{ForgotPassword → Two/ForgotPassword}/ForgotPassword.js +55 -28
- package/lib/module/components/Auth/Two/ForgotPassword/ForgotPassword.js.map +1 -0
- package/lib/module/components/Auth/Two/Login/AuthLoginShell.js +138 -0
- package/lib/module/components/Auth/Two/Login/AuthLoginShell.js.map +1 -0
- package/lib/module/components/Auth/Two/Login/LoginWithEmail.js +226 -0
- package/lib/module/components/Auth/Two/Login/LoginWithEmail.js.map +1 -0
- package/lib/module/components/Auth/Two/Login/LoginWithPhone.js +143 -0
- package/lib/module/components/Auth/Two/Login/LoginWithPhone.js.map +1 -0
- package/lib/module/components/Auth/{OTP → Two/OTP}/OTP.js +93 -63
- package/lib/module/components/Auth/Two/OTP/OTP.js.map +1 -0
- package/lib/module/components/Auth/Two/QrLogin/QrLogin.js +479 -0
- package/lib/module/components/Auth/Two/QrLogin/QrLogin.js.map +1 -0
- package/lib/module/components/Auth/Two/QrLogin/components/QrViewArea.js +295 -0
- package/lib/module/components/Auth/Two/QrLogin/components/QrViewArea.js.map +1 -0
- package/lib/module/components/Auth/Two/SignUp/SignUp.js +379 -0
- package/lib/module/components/Auth/Two/SignUp/SignUp.js.map +1 -0
- package/lib/module/components/Auth/Two/SplashScreen/SplashScreen.js +141 -0
- package/lib/module/components/Auth/Two/SplashScreen/SplashScreen.js.map +1 -0
- package/lib/module/components/Auth/{SplashScreen → Two/SplashScreen}/components/SplashImage/SplashImage.js +1 -1
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.js.map +1 -0
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.js +63 -0
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.js +157 -0
- package/lib/module/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
- package/lib/module/components/Auth/Two/index.js +29 -0
- package/lib/module/components/Auth/Two/index.js.map +1 -0
- package/lib/module/components/Auth/index.js +7 -22
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +7 -3
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayoutOne.js +52 -0
- package/lib/module/components/BackgroundLayout/BackgroundLayoutOne.js.map +1 -0
- package/lib/module/components/BottomSheet/BottomSheet.js +7 -3
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheetOne.js +170 -0
- package/lib/module/components/BottomSheet/BottomSheetOne.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +1 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +16 -6
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +88 -13
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/Category/CategroyTwo.js +287 -0
- package/lib/module/components/Content/Card/Category/CategroyTwo.js.map +1 -0
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +237 -108
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +191 -132
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Three.js +714 -0
- package/lib/module/components/Content/Card/Sliders/Styles/Three.js.map +1 -0
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +139 -92
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js +3 -1
- package/lib/module/components/Content/Card/Sliders/index.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +132 -48
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +127 -59
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +126 -50
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +139 -53
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +207 -115
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +119 -94
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +187 -171
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +145 -64
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/AdsPoster.js +162 -0
- package/lib/module/components/Content/Card/components/AdsPoster.js.map +1 -0
- package/lib/module/components/Content/Card/components/CardPoster.js +217 -135
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/NavigateToMore.js +26 -2
- package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -1
- package/lib/module/components/Content/Card/components/index.js +4 -0
- package/lib/module/components/Content/Card/components/index.js.map +1 -0
- package/lib/module/components/Content/Content.js +90 -33
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +41 -11
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/Content/types.js +4 -0
- package/lib/module/components/Content/types.js.map +1 -0
- package/lib/module/components/ContentView/MoreContentList.js +1 -0
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/{ContentView.js → One/ContentViewOne.js} +6 -5
- package/lib/module/components/ContentView/One/ContentViewOne.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/AboutSection.js +2 -2
- package/lib/module/components/ContentView/One/components/AboutSection.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/CastCard.js +2 -2
- package/lib/module/components/ContentView/One/components/CastCard.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/EpisodeCard.js +5 -6
- package/lib/module/components/ContentView/One/components/EpisodeCard.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/GenreTags.js +2 -2
- package/lib/module/components/ContentView/One/components/GenreTags.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/HeroBanner.js +45 -44
- package/lib/module/components/ContentView/One/components/HeroBanner.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/MiniInfo.js +50 -5
- package/lib/module/components/ContentView/One/components/MiniInfo.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/PlayButton.js +1 -1
- package/lib/module/components/ContentView/One/components/PlayButton.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/Title.js +1 -1
- package/lib/module/components/ContentView/One/components/Title.js.map +1 -0
- package/lib/module/components/ContentView/{components → One/components}/TrailerButton.js +2 -2
- package/lib/module/components/ContentView/One/components/TrailerButton.js.map +1 -0
- package/lib/module/components/ContentView/Two/ContentViewTwo.js +220 -0
- package/lib/module/components/ContentView/Two/ContentViewTwo.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/AboutSection.js +150 -0
- package/lib/module/components/ContentView/Two/components/AboutSection.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/Details.js +156 -0
- package/lib/module/components/ContentView/Two/components/Details.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/EpisodeCard.js +425 -0
- package/lib/module/components/ContentView/Two/components/EpisodeCard.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/GenreTags.js +86 -0
- package/lib/module/components/ContentView/Two/components/GenreTags.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/HeroBanner.js +339 -0
- package/lib/module/components/ContentView/Two/components/HeroBanner.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/LikeShareActions.js +88 -0
- package/lib/module/components/ContentView/Two/components/LikeShareActions.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/MoreLikeThisContentList .js +235 -0
- package/lib/module/components/ContentView/Two/components/MoreLikeThisContentList .js.map +1 -0
- package/lib/module/components/ContentView/Two/components/PlayOrTrailer.js +120 -0
- package/lib/module/components/ContentView/Two/components/PlayOrTrailer.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/SectionTabs.js +112 -0
- package/lib/module/components/ContentView/Two/components/SectionTabs.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/Title.js +146 -0
- package/lib/module/components/ContentView/Two/components/Title.js.map +1 -0
- package/lib/module/components/ContentView/Two/components/index.js +18 -0
- package/lib/module/components/ContentView/Two/components/index.js.map +1 -0
- package/lib/module/components/ContentView/index.js +6 -1
- package/lib/module/components/ContentView/index.js.map +1 -1
- package/lib/module/components/Headers/Four.js +68 -0
- package/lib/module/components/Headers/Four.js.map +1 -0
- package/lib/module/components/Headers/Three.js +75 -24
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/index.js +3 -1
- package/lib/module/components/Headers/index.js.map +1 -1
- package/lib/module/components/Input/Input.js +5 -1
- package/lib/module/components/Input/Input.js.map +1 -1
- package/lib/module/components/Input/InputThree.js +157 -0
- package/lib/module/components/Input/InputThree.js.map +1 -0
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
- package/lib/module/components/Input/PhoneNumberInputTwo.js +316 -0
- package/lib/module/components/Input/PhoneNumberInputTwo.js.map +1 -0
- package/lib/module/components/Loader/Loader.js +14 -6
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +42 -17
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/NewRelease/NewReleaseSheet.js +227 -0
- package/lib/module/components/NewRelease/NewReleaseSheet.js.map +1 -0
- package/lib/module/components/NewRelease/index.js +4 -0
- package/lib/module/components/NewRelease/index.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js +92 -17
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js +65 -2
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js +2 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js +4 -2
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +80 -46
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +78 -29
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js +21 -34
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/useReelsWatchProgress.js +58 -0
- package/lib/module/components/Reels/ReelsSeries/useReelsWatchProgress.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/utils/quality.js +44 -0
- package/lib/module/components/Reels/ReelsSeries/utils/quality.js.map +1 -0
- package/lib/module/components/Reels/index.js +1 -0
- package/lib/module/components/Reels/index.js.map +1 -1
- package/lib/module/components/Search/One.js +7 -4
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +59 -7
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +2 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +1 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +1 -0
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/common/AppStatusBar.js +2 -1
- package/lib/module/components/common/AppStatusBar.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/constants/dummySections.js +47 -5
- package/lib/module/constants/dummySections.js.map +1 -1
- package/lib/module/hooks/Images/index.js +5 -0
- package/lib/module/hooks/Images/index.js.map +1 -0
- package/lib/module/hooks/Images/useImageLoader.js +168 -0
- package/lib/module/hooks/Images/useImageLoader.js.map +1 -0
- package/lib/module/hooks/Images/useImageValidation.js +36 -0
- package/lib/module/hooks/Images/useImageValidation.js.map +1 -0
- package/lib/module/hooks/index.js +3 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useAdTracking.js +270 -0
- package/lib/module/hooks/useAdTracking.js.map +1 -0
- package/lib/module/hooks/useCards.js +164 -0
- package/lib/module/hooks/useCards.js.map +1 -0
- package/lib/module/hooks/usePaginatedSection.js +11 -6
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/hooks/useSplashCache.js +78 -60
- package/lib/module/hooks/useSplashCache.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +14 -2
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/index.js +0 -1
- package/lib/module/theme/hook/index.js.map +1 -1
- package/lib/module/theme/hook/useInternalTheme.js +21 -7
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
- package/lib/module/theme/themes.js +2 -0
- package/lib/module/theme/themes.js.map +1 -1
- package/lib/module/theme/utils/validateColor.js +84 -0
- package/lib/module/theme/utils/validateColor.js.map +1 -0
- package/lib/module/utils/colorUtils.js +68 -0
- package/lib/module/utils/colorUtils.js.map +1 -0
- package/lib/typescript/src/components/Auth/{ForgotPassword → One/ForgotPassword}/ForgotPassword.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/ForgotPassword/ForgotPassword.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{Login → One/Login}/LoginWithEmail.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/Login/LoginWithEmail.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{Login → One/Login}/LoginWithPhone.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/Login/LoginWithPhone.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{OTP → One/OTP}/OTP.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/OTP/OTP.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{QrLogin → One/QrLogin}/QrLogin.d.ts +3 -1
- package/lib/typescript/src/components/Auth/One/QrLogin/QrLogin.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{QrLogin → One/QrLogin}/components/QrViewArea.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/QrLogin/components/QrViewArea.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{SignUp → One/SignUp}/SignUp.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/SignUp/SignUp.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/{SplashScreen → One/SplashScreen}/SplashScreen.d.ts +1 -1
- package/lib/typescript/src/components/Auth/One/SplashScreen/SplashScreen.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.d.ts +14 -0
- package/lib/typescript/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/One/index.d.ts +234 -0
- package/lib/typescript/src/components/Auth/One/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/AuthHeader/AuthHeader.d.ts +16 -0
- package/lib/typescript/src/components/Auth/Two/AuthHeader/AuthHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/ForgotPassword/ForgotPassword.d.ts +53 -0
- package/lib/typescript/src/components/Auth/Two/ForgotPassword/ForgotPassword.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/Login/AuthLoginShell.d.ts +17 -0
- package/lib/typescript/src/components/Auth/Two/Login/AuthLoginShell.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/Login/LoginWithEmail.d.ts +52 -0
- package/lib/typescript/src/components/Auth/Two/Login/LoginWithEmail.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/Login/LoginWithPhone.d.ts +37 -0
- package/lib/typescript/src/components/Auth/Two/Login/LoginWithPhone.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/OTP/OTP.d.ts +63 -0
- package/lib/typescript/src/components/Auth/Two/OTP/OTP.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/QrLogin/QrLogin.d.ts +19 -0
- package/lib/typescript/src/components/Auth/Two/QrLogin/QrLogin.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/QrLogin/components/QrViewArea.d.ts +14 -0
- package/lib/typescript/src/components/Auth/Two/QrLogin/components/QrViewArea.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/SignUp/SignUp.d.ts +67 -0
- package/lib/typescript/src/components/Auth/Two/SignUp/SignUp.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/SplashScreen.d.ts +35 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/SplashScreen.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.d.ts +17 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.d.ts +20 -0
- package/lib/typescript/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Two/index.d.ts +220 -0
- package/lib/typescript/src/components/Auth/Two/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/index.d.ts +447 -232
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayoutOne.d.ts +7 -0
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayoutOne.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheetOne.d.ts +19 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetOne.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +1 -0
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +1 -0
- 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/Category/CategroyTwo.d.ts +26 -0
- package/lib/typescript/src/components/Content/Card/Category/CategroyTwo.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.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/Three.d.ts +19 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Three.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts +11 -0
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts +15 -3
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts +13 -5
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts +26 -0
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts +3 -0
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/index.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/index.d.ts +76 -6
- package/lib/typescript/src/components/Content/Card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +2 -51
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +2 -39
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/types.d.ts +149 -0
- package/lib/typescript/src/components/Content/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/One/ContentViewOne.d.ts +15 -0
- package/lib/typescript/src/components/ContentView/One/ContentViewOne.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/AboutSection.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/AboutSection.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/CastCard.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/CastCard.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/EpisodeCard.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/EpisodeCard.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/GenreTags.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/GenreTags.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/HeroBanner.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/HeroBanner.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/MiniInfo.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/MiniInfo.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/One/components/PlayButton.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/{components → One/components}/Title.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/One/components/Title.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/One/components/TrailerButton.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/ContentViewTwo.d.ts +18 -0
- package/lib/typescript/src/components/ContentView/Two/ContentViewTwo.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/AboutSection.d.ts +27 -0
- package/lib/typescript/src/components/ContentView/Two/components/AboutSection.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/Details.d.ts +15 -0
- package/lib/typescript/src/components/ContentView/Two/components/Details.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/EpisodeCard.d.ts +23 -0
- package/lib/typescript/src/components/ContentView/Two/components/EpisodeCard.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/GenreTags.d.ts +22 -0
- package/lib/typescript/src/components/ContentView/Two/components/GenreTags.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/HeroBanner.d.ts +8 -0
- package/lib/typescript/src/components/ContentView/Two/components/HeroBanner.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/LikeShareActions.d.ts +25 -0
- package/lib/typescript/src/components/ContentView/Two/components/LikeShareActions.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/MoreLikeThisContentList .d.ts +26 -0
- package/lib/typescript/src/components/ContentView/Two/components/MoreLikeThisContentList .d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/PlayOrTrailer.d.ts +21 -0
- package/lib/typescript/src/components/ContentView/Two/components/PlayOrTrailer.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/SectionTabs.d.ts +28 -0
- package/lib/typescript/src/components/ContentView/Two/components/SectionTabs.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/Title.d.ts +34 -0
- package/lib/typescript/src/components/ContentView/Two/components/Title.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/Two/components/index.d.ts +15 -0
- package/lib/typescript/src/components/ContentView/Two/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/index.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Four.d.ts +18 -0
- package/lib/typescript/src/components/Headers/Four.d.ts.map +1 -0
- package/lib/typescript/src/components/Headers/Three.d.ts +9 -1
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +1 -0
- package/lib/typescript/src/components/Headers/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/Input.d.ts +2 -0
- package/lib/typescript/src/components/Input/Input.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputThree.d.ts +22 -0
- package/lib/typescript/src/components/Input/InputThree.d.ts.map +1 -0
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/PhoneNumberInputTwo.d.ts +26 -0
- package/lib/typescript/src/components/Input/PhoneNumberInputTwo.d.ts.map +1 -0
- package/lib/typescript/src/components/Loader/Loader.d.ts +2 -0
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/NewRelease/NewReleaseSheet.d.ts +10 -0
- package/lib/typescript/src/components/NewRelease/NewReleaseSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/NewRelease/index.d.ts +2 -0
- package/lib/typescript/src/components/NewRelease/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts +2 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts +2 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +9 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +11 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -1
- 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 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +15 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/useReelsWatchProgress.d.ts +34 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/useReelsWatchProgress.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/utils/quality.d.ts +10 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/utils/quality.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/index.d.ts +1 -0
- package/lib/typescript/src/components/Reels/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +1 -0
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +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.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/common/AppStatusBar.d.ts +1 -0
- package/lib/typescript/src/components/common/AppStatusBar.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/dummySections.d.ts +8 -1
- package/lib/typescript/src/constants/dummySections.d.ts.map +1 -1
- package/lib/typescript/src/hooks/Images/index.d.ts +3 -0
- package/lib/typescript/src/hooks/Images/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts +36 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts +17 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +3 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useAdTracking.d.ts +39 -0
- package/lib/typescript/src/hooks/useAdTracking.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCards.d.ts +36 -0
- package/lib/typescript/src/hooks/useCards.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +12 -2
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
- package/lib/typescript/src/theme/ThemeProvider.d.ts +2 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/index.d.ts +0 -1
- package/lib/typescript/src/theme/hook/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/themes.d.ts +1 -0
- package/lib/typescript/src/theme/themes.d.ts.map +1 -1
- package/lib/typescript/src/theme/utils/validateColor.d.ts +21 -0
- package/lib/typescript/src/theme/utils/validateColor.d.ts.map +1 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts +40 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/lib/typescript/src/types/sections/index.d.ts +7 -4
- package/lib/typescript/src/types/sections/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/colorUtils.d.ts +19 -0
- package/lib/typescript/src/utils/colorUtils.d.ts.map +1 -0
- package/package.json +13 -4
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +6 -2
- package/src/components/Auth/One/ForgotPassword/ForgotPassword.tsx +324 -0
- package/src/components/Auth/One/Login/LoginWithEmail.tsx +455 -0
- package/src/components/Auth/{Login → One/Login}/LoginWithPhone.tsx +12 -12
- package/src/components/Auth/One/OTP/OTP.tsx +465 -0
- package/src/components/Auth/One/QrLogin/QrLogin.tsx +602 -0
- package/src/components/Auth/One/QrLogin/components/QrViewArea.tsx +423 -0
- package/src/components/Auth/One/SignUp/SignUp.tsx +479 -0
- package/src/components/Auth/{SplashScreen → One/SplashScreen}/SplashScreen.tsx +10 -6
- package/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.tsx +103 -0
- package/src/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashLottie/SplashLottie.tsx +1 -1
- package/src/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashVideo/SplashVideo.tsx +35 -25
- package/src/components/Auth/One/index.ts +24 -0
- package/src/components/Auth/Two/AuthHeader/AuthHeader.tsx +108 -0
- package/src/components/Auth/{ForgotPassword → Two/ForgotPassword}/ForgotPassword.tsx +62 -35
- package/src/components/Auth/Two/Login/AuthLoginShell.tsx +173 -0
- package/src/components/Auth/Two/Login/LoginWithEmail.tsx +279 -0
- package/src/components/Auth/Two/Login/LoginWithPhone.tsx +188 -0
- package/src/components/Auth/{OTP → Two/OTP}/OTP.tsx +92 -81
- package/src/components/Auth/Two/QrLogin/QrLogin.tsx +602 -0
- package/src/components/Auth/Two/QrLogin/components/QrViewArea.tsx +423 -0
- package/src/components/Auth/Two/SignUp/SignUp.tsx +472 -0
- package/src/components/Auth/Two/SplashScreen/SplashScreen.tsx +248 -0
- package/src/components/Auth/{SplashScreen → Two/SplashScreen}/components/SplashImage/SplashImage.tsx +1 -1
- package/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.tsx +77 -0
- package/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.tsx +178 -0
- package/src/components/Auth/Two/index.ts +28 -0
- package/src/components/Auth/index.ts +7 -22
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +2 -0
- package/src/components/BackgroundLayout/BackgroundLayoutOne.tsx +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +6 -1
- package/src/components/BottomSheet/BottomSheetOne.tsx +220 -0
- package/src/components/BottomSheet/index.ts +2 -0
- package/src/components/Button/PrimaryBtn.tsx +10 -2
- package/src/components/Content/Card/Category/Category.tsx +104 -10
- package/src/components/Content/Card/Category/CategroyTwo.tsx +429 -0
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +281 -136
- package/src/components/Content/Card/Sliders/Styles/One.tsx +248 -152
- package/src/components/Content/Card/Sliders/Styles/Three.tsx +935 -0
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +171 -102
- package/src/components/Content/Card/Sliders/index.ts +2 -0
- package/src/components/Content/Card/Styles/Five.tsx +162 -62
- package/src/components/Content/Card/Styles/Four.tsx +165 -85
- package/src/components/Content/Card/Styles/One.tsx +162 -71
- package/src/components/Content/Card/Styles/RotateInOut.tsx +158 -60
- package/src/components/Content/Card/Styles/Six.tsx +242 -142
- package/src/components/Content/Card/Styles/Three.tsx +160 -162
- package/src/components/Content/Card/Styles/TopTen.tsx +231 -191
- package/src/components/Content/Card/Styles/Two.tsx +183 -79
- package/src/components/Content/Card/components/AdsPoster.tsx +202 -0
- package/src/components/Content/Card/components/CardPoster.tsx +250 -151
- package/src/components/Content/Card/components/NavigateToMore.tsx +29 -1
- package/src/components/Content/Card/components/index.ts +1 -0
- package/src/components/Content/Content.tsx +103 -119
- package/src/components/Content/Sections.tsx +51 -45
- package/src/components/Content/types.ts +176 -0
- package/src/components/ContentView/MoreContentList.tsx +1 -0
- package/src/components/ContentView/{ContentView.tsx → One/ContentViewOne.tsx} +8 -7
- package/src/components/ContentView/{components → One/components}/AboutSection.tsx +3 -3
- package/src/components/ContentView/{components → One/components}/CastCard.tsx +3 -3
- package/src/components/ContentView/{components → One/components}/EpisodeCard.tsx +7 -8
- package/src/components/ContentView/{components → One/components}/GenreTags.tsx +3 -3
- package/src/components/ContentView/{components → One/components}/HeroBanner.tsx +44 -59
- package/src/components/ContentView/{components → One/components}/MiniInfo.tsx +69 -5
- package/src/components/ContentView/{components → One/components}/PlayButton.tsx +1 -1
- package/src/components/ContentView/{components → One/components}/Title.tsx +2 -2
- package/src/components/ContentView/{components → One/components}/TrailerButton.tsx +2 -2
- package/src/components/ContentView/Two/ContentViewTwo.tsx +343 -0
- package/src/components/ContentView/Two/components/AboutSection.tsx +216 -0
- package/src/components/ContentView/Two/components/Details.tsx +193 -0
- package/src/components/ContentView/Two/components/EpisodeCard.tsx +602 -0
- package/src/components/ContentView/Two/components/GenreTags.tsx +123 -0
- package/src/components/ContentView/Two/components/HeroBanner.tsx +402 -0
- package/src/components/ContentView/Two/components/LikeShareActions.tsx +125 -0
- package/src/components/ContentView/Two/components/MoreLikeThisContentList .tsx +305 -0
- package/src/components/ContentView/Two/components/PlayOrTrailer.tsx +133 -0
- package/src/components/ContentView/Two/components/SectionTabs.tsx +177 -0
- package/src/components/ContentView/Two/components/Title.tsx +226 -0
- package/src/components/ContentView/Two/components/index.ts +15 -0
- package/src/components/ContentView/index.ts +7 -1
- package/src/components/Headers/Four.tsx +83 -0
- package/src/components/Headers/Three.tsx +88 -25
- package/src/components/Headers/index.ts +2 -0
- package/src/components/Input/Input.ts +4 -0
- package/src/components/Input/InputThree.tsx +212 -0
- package/src/components/Input/PhoneNumberInput.tsx +4 -2
- package/src/components/Input/PhoneNumberInputTwo.tsx +418 -0
- package/src/components/Loader/Loader.tsx +25 -9
- package/src/components/Logo/Logo.tsx +53 -34
- package/src/components/NewRelease/NewReleaseSheet.tsx +250 -0
- package/src/components/NewRelease/index.ts +1 -0
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +92 -27
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +81 -1
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +4 -1
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +6 -3
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +88 -55
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +92 -30
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +35 -38
- package/src/components/Reels/ReelsSeries/types.ts +16 -0
- package/src/components/Reels/ReelsSeries/useReelsWatchProgress.ts +85 -0
- package/src/components/Reels/ReelsSeries/utils/quality.ts +48 -0
- package/src/components/Reels/index.ts +1 -0
- package/src/components/Search/One.tsx +8 -5
- package/src/components/Search/components/SearchCard.tsx +68 -11
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +1 -0
- package/src/components/User/WatchHistory/WatchHistory.tsx +1 -0
- package/src/components/User/WatchLater/WatchLater.tsx +1 -0
- package/src/components/common/AppStatusBar.tsx +7 -1
- package/src/components/index.ts +1 -0
- package/src/constants/dummySections.ts +54 -3
- package/src/hooks/Images/index.ts +2 -0
- package/src/hooks/Images/useImageLoader.ts +206 -0
- package/src/hooks/Images/useImageValidation.ts +36 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useAdTracking.ts +349 -0
- package/src/hooks/useCards.ts +228 -0
- package/src/hooks/usePaginatedSection.ts +26 -7
- package/src/hooks/useSplashCache.ts +88 -69
- package/src/theme/ThemeProvider.tsx +15 -2
- package/src/theme/hook/index.ts +0 -1
- package/src/theme/hook/useInternalTheme.ts +22 -13
- package/src/theme/themes.ts +3 -0
- package/src/theme/utils/validateColor.ts +127 -0
- package/src/types/content/content-view.types.ts +43 -1
- package/src/types/sections/index.ts +7 -4
- package/src/utils/colorUtils.ts +70 -0
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +0 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +0 -314
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +0 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +0 -1
- package/lib/module/components/Auth/OTP/OTP.js.map +0 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +0 -313
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +0 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +0 -243
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +0 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +0 -352
- package/lib/module/components/Auth/SignUp/SignUp.js.map +0 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +0 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +0 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +0 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +0 -1
- package/lib/module/components/ContentView/ContentView.js.map +0 -1
- package/lib/module/components/ContentView/components/AboutSection.js.map +0 -1
- package/lib/module/components/ContentView/components/CastCard.js.map +0 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +0 -1
- package/lib/module/components/ContentView/components/GenreTags.js.map +0 -1
- package/lib/module/components/ContentView/components/HeroBanner.js.map +0 -1
- package/lib/module/components/ContentView/components/MiniInfo.js.map +0 -1
- package/lib/module/components/ContentView/components/PlayButton.js.map +0 -1
- package/lib/module/components/ContentView/components/Title.js.map +0 -1
- package/lib/module/components/ContentView/components/TrailerButton.js.map +0 -1
- package/lib/module/theme/hook/useThemeStatusBar.js +0 -33
- package/lib/module/theme/hook/useThemeStatusBar.js.map +0 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +0 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +0 -15
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +0 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +0 -1
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts +0 -10
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +0 -1
- package/src/components/Auth/Login/LoginWithEmail.tsx +0 -441
- package/src/components/Auth/QrLogin/QrLogin.tsx +0 -342
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +0 -329
- package/src/components/Auth/SignUp/SignUp.tsx +0 -462
- package/src/theme/hook/useThemeStatusBar.ts +0 -42
- /package/lib/typescript/src/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashLottie/SplashLottie.d.ts +0 -0
- /package/lib/typescript/src/components/Auth/{SplashScreen → One/SplashScreen}/components/SplashVideo/SplashVideo.d.ts +0 -0
- /package/lib/typescript/src/components/Auth/{SplashScreen → Two/SplashScreen}/components/SplashImage/SplashImage.d.ts +0 -0
- /package/lib/typescript/src/components/ContentView/{components → One/components}/PlayButton.d.ts +0 -0
- /package/lib/typescript/src/components/ContentView/{components → One/components}/TrailerButton.d.ts +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
4
|
+
import { Dimensions } from 'react-native';
|
|
5
|
+
const CHECK_INTERVAL = 500;
|
|
6
|
+
const INITIAL_CHECK_DELAY = 100;
|
|
7
|
+
// Global set to track displayed ads - prevents duplicate tracking
|
|
8
|
+
const globalDisplayedAds = new Set();
|
|
9
|
+
// Lock to prevent race conditions when checking and adding ads
|
|
10
|
+
const trackingLock = new Map();
|
|
11
|
+
export const extractToken = trackingUrl => {
|
|
12
|
+
if (!trackingUrl) return '';
|
|
13
|
+
try {
|
|
14
|
+
const url = new URL(trackingUrl);
|
|
15
|
+
return url.searchParams.get('token') || '';
|
|
16
|
+
} catch {
|
|
17
|
+
const match = trackingUrl.match(/[?&]token=([^&]+)/);
|
|
18
|
+
return match?.[1] || '';
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Creates a unique ID for an ad to prevent duplicate tracking
|
|
24
|
+
* Priority: _id > token > mediaUrl > fallback
|
|
25
|
+
*/
|
|
26
|
+
export const createAdUniqueId = ad => {
|
|
27
|
+
// First try to use _id if available (most reliable)
|
|
28
|
+
if ('_id' in ad && ad._id) {
|
|
29
|
+
return `ad-${String(ad._id)}`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Then try token from tracking URL
|
|
33
|
+
const token = extractToken(ad.tracking?.impression);
|
|
34
|
+
if (token) {
|
|
35
|
+
return `ad-token-${token}`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Then use mediaUrl
|
|
39
|
+
const mediaUrl = ad.mediaUrl || '';
|
|
40
|
+
if (mediaUrl) {
|
|
41
|
+
return `ad-media-${mediaUrl}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Last resort: use a combination of available fields
|
|
45
|
+
const clickUrl = ad.tracking?.click || '';
|
|
46
|
+
if (clickUrl) {
|
|
47
|
+
return `ad-click-${clickUrl}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Fallback (should rarely happen)
|
|
51
|
+
return `ad-fallback-${Date.now()}-${Math.random()}`;
|
|
52
|
+
};
|
|
53
|
+
export const useAdTracking = options => {
|
|
54
|
+
const {
|
|
55
|
+
ad,
|
|
56
|
+
onDisplayAds,
|
|
57
|
+
isLoading = false,
|
|
58
|
+
screenDimensions: propScreenDimensions,
|
|
59
|
+
viewportOffsets: propViewportOffsets
|
|
60
|
+
} = options;
|
|
61
|
+
const viewRef = useRef(null);
|
|
62
|
+
const layoutRef = useRef(null);
|
|
63
|
+
const hasDisplayedRef = useRef(false);
|
|
64
|
+
const onDisplayAdsRef = useRef(onDisplayAds);
|
|
65
|
+
const adRef = useRef(ad);
|
|
66
|
+
const isLoadingRef = useRef(isLoading);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
onDisplayAdsRef.current = onDisplayAds;
|
|
69
|
+
adRef.current = ad;
|
|
70
|
+
isLoadingRef.current = isLoading;
|
|
71
|
+
}, [onDisplayAds, ad, isLoading]);
|
|
72
|
+
const adUniqueId = useMemo(() => createAdUniqueId(ad), [ad]);
|
|
73
|
+
const screenDimensions = useMemo(() => propScreenDimensions || Dimensions.get('window'), [propScreenDimensions]);
|
|
74
|
+
const viewportOffsets = useMemo(() => ({
|
|
75
|
+
top: propViewportOffsets?.top ?? 50,
|
|
76
|
+
bottom: propViewportOffsets?.bottom ?? 100,
|
|
77
|
+
left: propViewportOffsets?.left ?? 20,
|
|
78
|
+
right: propViewportOffsets?.right ?? 20
|
|
79
|
+
}), [propViewportOffsets?.top, propViewportOffsets?.bottom, propViewportOffsets?.left, propViewportOffsets?.right]);
|
|
80
|
+
const viewportBounds = useMemo(() => {
|
|
81
|
+
const {
|
|
82
|
+
width: screenWidth,
|
|
83
|
+
height: screenHeight
|
|
84
|
+
} = screenDimensions;
|
|
85
|
+
return {
|
|
86
|
+
left: viewportOffsets.left,
|
|
87
|
+
right: screenWidth - viewportOffsets.right,
|
|
88
|
+
top: viewportOffsets.top,
|
|
89
|
+
bottom: screenHeight - viewportOffsets.bottom
|
|
90
|
+
};
|
|
91
|
+
}, [screenDimensions, viewportOffsets]);
|
|
92
|
+
const checkVisibility = useCallback(() => {
|
|
93
|
+
const layout = layoutRef.current;
|
|
94
|
+
if (!layout) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
const {
|
|
98
|
+
x,
|
|
99
|
+
y,
|
|
100
|
+
width,
|
|
101
|
+
height
|
|
102
|
+
} = layout;
|
|
103
|
+
const isVisible = x + width > viewportBounds.left && x < viewportBounds.right && y + height > viewportBounds.top && y < viewportBounds.bottom;
|
|
104
|
+
return isVisible;
|
|
105
|
+
}, [viewportBounds]);
|
|
106
|
+
const measureInWindow = useCallback(() => {
|
|
107
|
+
const view = viewRef.current;
|
|
108
|
+
if (!view) return;
|
|
109
|
+
view.measureInWindow((x, y, width, height) => {
|
|
110
|
+
layoutRef.current = {
|
|
111
|
+
x,
|
|
112
|
+
y,
|
|
113
|
+
width,
|
|
114
|
+
height
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}, []);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Atomically checks and tracks ad display to prevent duplicate tracking
|
|
121
|
+
* Uses a lock mechanism to ensure only one instance can track the same ad
|
|
122
|
+
*/
|
|
123
|
+
const trackAdDisplay = useCallback(() => {
|
|
124
|
+
const currentOnDisplayAds = onDisplayAdsRef.current;
|
|
125
|
+
const currentIsLoading = isLoadingRef.current;
|
|
126
|
+
if (!currentOnDisplayAds || currentIsLoading) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Early return if already displayed by this instance
|
|
131
|
+
if (hasDisplayedRef.current) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Atomic check-and-set: if ad is already being tracked or displayed, return false
|
|
136
|
+
if (globalDisplayedAds.has(adUniqueId)) {
|
|
137
|
+
// Mark this instance as displayed to prevent further checks
|
|
138
|
+
hasDisplayedRef.current = true;
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Set lock to prevent other instances from tracking the same ad
|
|
143
|
+
if (trackingLock.get(adUniqueId) === true) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Acquire lock
|
|
148
|
+
trackingLock.set(adUniqueId, true);
|
|
149
|
+
try {
|
|
150
|
+
// Double-check after acquiring lock (another instance might have added it)
|
|
151
|
+
if (globalDisplayedAds.has(adUniqueId)) {
|
|
152
|
+
hasDisplayedRef.current = true;
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Mark as displayed in both local and global state
|
|
157
|
+
hasDisplayedRef.current = true;
|
|
158
|
+
globalDisplayedAds.add(adUniqueId);
|
|
159
|
+
|
|
160
|
+
// Call the tracking callback
|
|
161
|
+
currentOnDisplayAds(adRef.current);
|
|
162
|
+
return true;
|
|
163
|
+
} finally {
|
|
164
|
+
// Release lock after a short delay to ensure callback completes
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
trackingLock.delete(adUniqueId);
|
|
167
|
+
}, 100);
|
|
168
|
+
}
|
|
169
|
+
}, [adUniqueId]);
|
|
170
|
+
const checkAndTrackVisibility = useCallback(() => {
|
|
171
|
+
// Early exit if already displayed
|
|
172
|
+
if (hasDisplayedRef.current) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Early exit if ad is already tracked globally or locked
|
|
177
|
+
if (globalDisplayedAds.has(adUniqueId) || trackingLock.get(adUniqueId) === true) {
|
|
178
|
+
// Mark this instance as displayed to prevent further checks
|
|
179
|
+
hasDisplayedRef.current = true;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Check visibility before tracking
|
|
184
|
+
if (!checkVisibility()) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Attempt to track (will handle duplicate prevention internally)
|
|
189
|
+
trackAdDisplay();
|
|
190
|
+
}, [adUniqueId, checkVisibility, trackAdDisplay]);
|
|
191
|
+
const handleLayout = useCallback(() => {
|
|
192
|
+
const view = viewRef.current;
|
|
193
|
+
if (!view) return;
|
|
194
|
+
view.measureInWindow((x, y, width, height) => {
|
|
195
|
+
layoutRef.current = {
|
|
196
|
+
x,
|
|
197
|
+
y,
|
|
198
|
+
width,
|
|
199
|
+
height
|
|
200
|
+
};
|
|
201
|
+
requestAnimationFrame(() => {
|
|
202
|
+
checkAndTrackVisibility();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}, [checkAndTrackVisibility]);
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
if (isLoadingRef.current) {
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
let timeoutId = null;
|
|
211
|
+
let rafId = null;
|
|
212
|
+
rafId = requestAnimationFrame(() => {
|
|
213
|
+
timeoutId = setTimeout(() => {
|
|
214
|
+
measureInWindow();
|
|
215
|
+
requestAnimationFrame(() => {
|
|
216
|
+
checkAndTrackVisibility();
|
|
217
|
+
});
|
|
218
|
+
}, INITIAL_CHECK_DELAY);
|
|
219
|
+
});
|
|
220
|
+
return () => {
|
|
221
|
+
if (rafId !== null) {
|
|
222
|
+
cancelAnimationFrame(rafId);
|
|
223
|
+
}
|
|
224
|
+
if (timeoutId !== null) {
|
|
225
|
+
clearTimeout(timeoutId);
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}, [isLoading, checkAndTrackVisibility, measureInWindow]);
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
if (!onDisplayAdsRef.current || hasDisplayedRef.current || isLoadingRef.current) {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
let rafId = null;
|
|
234
|
+
let lastCheckTime = 0;
|
|
235
|
+
const checkWithThrottle = () => {
|
|
236
|
+
const now = Date.now();
|
|
237
|
+
if (now - lastCheckTime < CHECK_INTERVAL) {
|
|
238
|
+
rafId = requestAnimationFrame(checkWithThrottle);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
lastCheckTime = now;
|
|
242
|
+
if (hasDisplayedRef.current || !viewRef.current) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
measureInWindow();
|
|
246
|
+
requestAnimationFrame(() => {
|
|
247
|
+
if (!hasDisplayedRef.current) {
|
|
248
|
+
checkAndTrackVisibility();
|
|
249
|
+
}
|
|
250
|
+
if (!hasDisplayedRef.current) {
|
|
251
|
+
rafId = requestAnimationFrame(checkWithThrottle);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
rafId = requestAnimationFrame(checkWithThrottle);
|
|
256
|
+
return () => {
|
|
257
|
+
if (rafId !== null) {
|
|
258
|
+
cancelAnimationFrame(rafId);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}, [checkAndTrackVisibility, measureInWindow]);
|
|
262
|
+
return {
|
|
263
|
+
viewRef,
|
|
264
|
+
layoutRef,
|
|
265
|
+
hasDisplayed: hasDisplayedRef,
|
|
266
|
+
adUniqueId,
|
|
267
|
+
handleLayout
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
//# sourceMappingURL=useAdTracking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","useMemo","useCallback","useEffect","Dimensions","CHECK_INTERVAL","INITIAL_CHECK_DELAY","globalDisplayedAds","Set","trackingLock","Map","extractToken","trackingUrl","url","URL","searchParams","get","match","createAdUniqueId","ad","_id","String","token","tracking","impression","mediaUrl","clickUrl","click","Date","now","Math","random","useAdTracking","options","onDisplayAds","isLoading","screenDimensions","propScreenDimensions","viewportOffsets","propViewportOffsets","viewRef","layoutRef","hasDisplayedRef","onDisplayAdsRef","adRef","isLoadingRef","current","adUniqueId","top","bottom","left","right","viewportBounds","width","screenWidth","height","screenHeight","checkVisibility","layout","x","y","isVisible","measureInWindow","view","trackAdDisplay","currentOnDisplayAds","currentIsLoading","has","set","add","setTimeout","delete","checkAndTrackVisibility","handleLayout","requestAnimationFrame","undefined","timeoutId","rafId","cancelAnimationFrame","clearTimeout","lastCheckTime","checkWithThrottle","hasDisplayed"],"sourceRoot":"../../../src","sources":["hooks/useAdTracking.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC/D,SAAoBC,UAAU,QAAQ,cAAc;AAGpD,MAAMC,cAAc,GAAG,GAAG;AAC1B,MAAMC,mBAAmB,GAAG,GAAG;AAmC/B;AACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;AAC5C;AACA,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAkB,CAAC;AAE/C,OAAO,MAAMC,YAAY,GAAIC,WAAoB,IAAa;EAC5D,IAAI,CAACA,WAAW,EAAE,OAAO,EAAE;EAC3B,IAAI;IACF,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAACF,WAAW,CAAC;IAChC,OAAOC,GAAG,CAACE,YAAY,CAACC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;EAC5C,CAAC,CAAC,MAAM;IACN,MAAMC,KAA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,eAAe,CAACI,OAAO,IACvBD,YAAY,CAACC,OAAO,EACpB;MACA,OAAO6B,SAAS;IAClB;IAEA,IAAIE,KAAoB,GAAG,IAAI;IAC/B,IAAIG,aAAa,GAAG,CAAC;IAErB,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;MAC9B,MAAMpD,GAAG,GAAGD,IAAI,CAACC,GAAG,CAAC,CAAC;MAEtB,IAAIA,GAAG,GAAGmD,aAAa,GAAG3E,cAAc,EAAE;QACxCwE,KAAK,GAAGH,qBAAqB,CAACO,iBAAiB,CAAC;QAChD;MACF;MAEAD,aAAa,GAAGnD,GAAG;MAEnB,IAAIa,eAAe,CAACI,OAAO,IAAI,CAACN,OAAO,CAACM,OAAO,EAAE;QAC/C;MACF;MAEAgB,eAAe,CAAC,CAAC;MACjBY,qBAAqB,CAAC,MAAM;QAC1B,IAAI,CAAChC,eAAe,CAACI,OAAO,EAAE;UAC5B0B,uBAAuB,CAAC,CAAC;QAC3B;QACA,IAAI,CAAC9B,eAAe,CAACI,OAAO,EAAE;UAC5B+B,KAAK,GAAGH,qBAAqB,CAACO,iBAAiB,CAAC;QAClD;MACF,CAAC,CAAC;IACJ,CAAC;IAEDJ,KAAK,GAAGH,qBAAqB,CAACO,iBAAiB,CAAC;IAEhD,OAAO,MAAM;MACX,IAAIJ,KAAK,KAAK,IAAI,EAAE;QAClBC,oBAAoB,CAACD,KAAK,CAAC;MAC7B;IACF,CAAC;EACH,CAAC,EAAE,CAACL,uBAAuB,EAAEV,eAAe,CAAC,CAAC;EAE9C,OAAO;IACLtB,OAAO;IACPC,SAAS;IACTyC,YAAY,EAAExC,eAAe;IAC7BK,UAAU;IACV0B;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Global Card Hook (No duplicates + single data key)
|
|
5
|
+
*
|
|
6
|
+
* Provides a unified interface for managing card data with:
|
|
7
|
+
* - Automatic deduplication
|
|
8
|
+
* - Skeleton loading states
|
|
9
|
+
* - Pagination support
|
|
10
|
+
* - Optimized performance
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useMemo, useCallback } from 'react';
|
|
14
|
+
import { usePaginatedSection } from "./usePaginatedSection.js";
|
|
15
|
+
import { dummyContentData } from "../constants/dummySections.js";
|
|
16
|
+
// -----------------------------------------------------------
|
|
17
|
+
// Constants
|
|
18
|
+
// -----------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
const DEFAULT_INITIAL_SKELETON = 5;
|
|
21
|
+
const DEFAULT_PAGING_SKELETON = 3;
|
|
22
|
+
|
|
23
|
+
// -----------------------------------------------------------
|
|
24
|
+
// Helpers
|
|
25
|
+
// -----------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Normalizes different data source formats into a single array
|
|
29
|
+
*/
|
|
30
|
+
const normalize = src => {
|
|
31
|
+
if (!src) return [];
|
|
32
|
+
if (Array.isArray(src)) return src;
|
|
33
|
+
return src.data ?? [];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Removes duplicate items by _id using Map for O(n) performance
|
|
38
|
+
* Preserves order of first occurrence
|
|
39
|
+
* Handles both IContentData and IAdItem types
|
|
40
|
+
*/
|
|
41
|
+
const uniqueById = list => {
|
|
42
|
+
if (list.length === 0) return [];
|
|
43
|
+
const seen = new Map();
|
|
44
|
+
const result = [];
|
|
45
|
+
for (const item of list) {
|
|
46
|
+
// Handle ads - check for type property and use appropriate ID field
|
|
47
|
+
if ('type' in item && item.type === 'ads') {
|
|
48
|
+
const adItem = item;
|
|
49
|
+
// Ads might have _id (from IServeAd) or use mediaUrl as identifier
|
|
50
|
+
let id;
|
|
51
|
+
if ('_id' in adItem && adItem._id) {
|
|
52
|
+
id = String(adItem._id);
|
|
53
|
+
} else if ('mediaUrl' in adItem && adItem.mediaUrl) {
|
|
54
|
+
id = `ad-${adItem.mediaUrl}`;
|
|
55
|
+
} else {
|
|
56
|
+
id = `ad-${Math.random()}`;
|
|
57
|
+
}
|
|
58
|
+
if (!seen.has(id)) {
|
|
59
|
+
seen.set(id, adItem);
|
|
60
|
+
result.push(adItem);
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Handle content items
|
|
66
|
+
const contentItem = item;
|
|
67
|
+
if (!contentItem?._id) continue; // Skip items without valid IDs
|
|
68
|
+
|
|
69
|
+
const id = String(contentItem._id);
|
|
70
|
+
if (!seen.has(id)) {
|
|
71
|
+
seen.set(id, contentItem);
|
|
72
|
+
result.push(contentItem);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Creates skeleton items for loading states
|
|
80
|
+
* Memoized by count to avoid unnecessary recreations
|
|
81
|
+
* Returns IContentData[] for skeleton loading (ads don't need skeletons)
|
|
82
|
+
*/
|
|
83
|
+
const createSkeletonItems = (count, prefix) => {
|
|
84
|
+
if (count <= 0) return [];
|
|
85
|
+
return Array.from({
|
|
86
|
+
length: count
|
|
87
|
+
}, (_, i) => dummyContentData(`${prefix}-${i}`));
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// -----------------------------------------------------------
|
|
91
|
+
// Hook
|
|
92
|
+
// -----------------------------------------------------------
|
|
93
|
+
|
|
94
|
+
export function useCards({
|
|
95
|
+
sectionId,
|
|
96
|
+
data,
|
|
97
|
+
fetchMore,
|
|
98
|
+
loading = false,
|
|
99
|
+
initialSkeleton = DEFAULT_INITIAL_SKELETON,
|
|
100
|
+
pagingSkeleton = DEFAULT_PAGING_SKELETON,
|
|
101
|
+
adsRender = false
|
|
102
|
+
}) {
|
|
103
|
+
// Normalize input data
|
|
104
|
+
const baseItems = useMemo(() => normalize(data ?? {
|
|
105
|
+
data: []
|
|
106
|
+
}), [data]);
|
|
107
|
+
|
|
108
|
+
// Use pagination hook for data management
|
|
109
|
+
const {
|
|
110
|
+
data: list,
|
|
111
|
+
pagination,
|
|
112
|
+
loadMoreData,
|
|
113
|
+
isPaginating,
|
|
114
|
+
hasMore
|
|
115
|
+
} = usePaginatedSection(sectionId, fetchMore, baseItems, loading);
|
|
116
|
+
|
|
117
|
+
// Apply deduplication to the list (handles both content and ads)
|
|
118
|
+
const uniqueList = useMemo(() => uniqueById(list), [list]);
|
|
119
|
+
|
|
120
|
+
// Memoize skeleton items - only recreate when count changes
|
|
121
|
+
const initialSkeletonItems = useMemo(() => createSkeletonItems(initialSkeleton, 'sk'), [initialSkeleton]);
|
|
122
|
+
const pagingSkeletonItems = useMemo(() => createSkeletonItems(pagingSkeleton, 'pagination-skeleton'), [pagingSkeleton]);
|
|
123
|
+
|
|
124
|
+
// Filter ads if adsRender is false
|
|
125
|
+
const filteredList = useMemo(() => {
|
|
126
|
+
if (adsRender) return uniqueList;
|
|
127
|
+
return uniqueList.filter(item => item.type !== 'ads');
|
|
128
|
+
}, [uniqueList, adsRender]);
|
|
129
|
+
|
|
130
|
+
// Final data array for UI rendering
|
|
131
|
+
// Handles loading states and pagination skeletons
|
|
132
|
+
// Returns mixed array of IContentData | IAdItem (or only IContentData if adsRender is false)
|
|
133
|
+
const items = useMemo(() => {
|
|
134
|
+
// Show initial skeleton during initial load
|
|
135
|
+
if (loading) return initialSkeletonItems;
|
|
136
|
+
|
|
137
|
+
// Show data with pagination skeleton when loading more
|
|
138
|
+
if (isPaginating && filteredList.length > 0) {
|
|
139
|
+
return [...filteredList, ...pagingSkeletonItems];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Return filtered list (with or without ads based on adsRender)
|
|
143
|
+
return filteredList;
|
|
144
|
+
}, [loading, isPaginating, filteredList, initialSkeletonItems, pagingSkeletonItems]);
|
|
145
|
+
|
|
146
|
+
// Determine if section is empty (only when not loading and no data)
|
|
147
|
+
const isEmpty = useMemo(() => !loading && filteredList.length === 0, [loading, filteredList.length]);
|
|
148
|
+
|
|
149
|
+
// Memoize loadMore callback to prevent unnecessary re-renders
|
|
150
|
+
const handleLoadMore = useCallback(async page => {
|
|
151
|
+
if (page && hasMore && !isPaginating) {
|
|
152
|
+
await loadMoreData(page);
|
|
153
|
+
}
|
|
154
|
+
}, [loadMoreData, hasMore, isPaginating]);
|
|
155
|
+
return {
|
|
156
|
+
listData: items,
|
|
157
|
+
pagination,
|
|
158
|
+
isPaging: isPaginating,
|
|
159
|
+
hasMore,
|
|
160
|
+
loadMore: handleLoadMore,
|
|
161
|
+
isEmpty
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=useCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useCallback","usePaginatedSection","dummyContentData","DEFAULT_INITIAL_SKELETON","DEFAULT_PAGING_SKELETON","normalize","src","Array","isArray","data","uniqueById","list","length","seen","Map","result","item","type","adItem","id","_id","String","mediaUrl","Math","random","has","set","push","contentItem","createSkeletonItems","count","prefix","from","_","i","useCards","sectionId","fetchMore","loading","initialSkeleton","pagingSkeleton","adsRender","baseItems","pagination","loadMoreData","isPaginating","hasMore","uniqueList","initialSkeletonItems","pagingSkeletonItems","filteredList","filter","items","isEmpty","handleLoadMore","page","listData","isPaging","loadMore"],"sourceRoot":"../../../src","sources":["hooks/useCards.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAE5C,SAASC,mBAAmB,QAAQ,0BAAuB;AAE3D,SAASC,gBAAgB,QAAQ,+BAA4B;AA6B7D;AACA;AACA;;AAEA,MAAMC,wBAAwB,GAAG,CAAC;AAClC,MAAMC,uBAAuB,GAAG,CAAC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMC,SAAS,GAAIC,GAAe,IAAiC;EACjE,IAAI,CAACA,GAAG,EAAE,OAAO,EAAE;EACnB,IAAIC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;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -11,7 +11,7 @@ export function usePaginatedSection(sectionId, fetchFn, initialData = [], isLoad
|
|
|
11
11
|
hasNextPage: true,
|
|
12
12
|
nextPage: 2
|
|
13
13
|
});
|
|
14
|
-
const [
|
|
14
|
+
const [isPaginating, setIsPaginating] = useState(false);
|
|
15
15
|
|
|
16
16
|
// Sync initial data on mount or loading complete
|
|
17
17
|
React.useEffect(() => {
|
|
@@ -20,8 +20,8 @@ export function usePaginatedSection(sectionId, fetchFn, initialData = [], isLoad
|
|
|
20
20
|
}
|
|
21
21
|
}, [isLoading, initialData.length, initialData]);
|
|
22
22
|
const loadMoreData = useCallback(async page => {
|
|
23
|
-
if (!page ||
|
|
24
|
-
|
|
23
|
+
if (!page || isPaginating || !pagination.hasNextPage || !fetchFn) return;
|
|
24
|
+
setIsPaginating(true);
|
|
25
25
|
try {
|
|
26
26
|
const res = await fetchFn({
|
|
27
27
|
sectionId,
|
|
@@ -32,6 +32,11 @@ export function usePaginatedSection(sectionId, fetchFn, initialData = [], isLoad
|
|
|
32
32
|
});
|
|
33
33
|
if (!res || !res.data || !res.meta?.pagination) {
|
|
34
34
|
console.warn(`⚠️ Invalid response for section: ${sectionId}`, res);
|
|
35
|
+
// Stop further pagination attempts for this section
|
|
36
|
+
setPagination({
|
|
37
|
+
hasNextPage: false,
|
|
38
|
+
nextPage: null
|
|
39
|
+
});
|
|
35
40
|
return;
|
|
36
41
|
}
|
|
37
42
|
const {
|
|
@@ -50,13 +55,13 @@ export function usePaginatedSection(sectionId, fetchFn, initialData = [], isLoad
|
|
|
50
55
|
} catch (err) {
|
|
51
56
|
console.error(`❌ Error loading section [${sectionId}]:`, err);
|
|
52
57
|
} finally {
|
|
53
|
-
|
|
58
|
+
setIsPaginating(false);
|
|
54
59
|
}
|
|
55
|
-
}, [
|
|
60
|
+
}, [isPaginating, pagination.hasNextPage, fetchFn, sectionId]);
|
|
56
61
|
return {
|
|
57
62
|
data,
|
|
58
63
|
pagination,
|
|
59
|
-
|
|
64
|
+
isPaginating,
|
|
60
65
|
hasMore: pagination.hasNextPage,
|
|
61
66
|
loadMoreData
|
|
62
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useState","usePaginatedSection","sectionId","fetchFn","initialData","isLoading","data","setData","pagination","setPagination","hasNextPage","nextPage","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useState","usePaginatedSection","sectionId","fetchFn","initialData","isLoading","data","setData","pagination","setPagination","hasNextPage","nextPage","isPaginating","setIsPaginating","useEffect","length","loadMoreData","page","res","meta","console","warn","prev","existingIds","Set","map","item","_id","newItems","filter","has","err","error","hasMore"],"sourceRoot":"../../../src","sources":["hooks/usePaginatedSection.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAiBpD,OAAO,SAASC,mBAAmBA,CACjCC,SAAiB,EACjBC,OAA0B,EAC1BC,WAAgB,GAAG,EAAE,EACrBC,SAAmB,EACnB;EACA,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGP,QAAQ,CAAMI,WAAW,CAAC;EAClD,MAAM,CAACI,UAAU,EAAEC,aAAa,CAAC,GAAGT,QAAQ,CAGzC;IACDU,WAAW,EAAE,IAAI;IACjBC,QAAQ,EAAE;EACZ,CAAC,CAAC;EACF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;;EAEvD;EACAF,KAAK,CAACgB,SAAS,CAAC,MAAM;IACpB,IAAI,CAACT,SAAS,IAAID,WAAW,CAACW,MAAM,EAAE;MACpCR,OAAO,CAACH,WAAW,CAAC;IACtB;EACF,CAAC,EAAE,CAACC,SAAS,EAAED,WAAW,CAACW,MAAM,EAAEX,WAAW,CAAC,CAAC;EAEhD,MAAMY,YAAY,GAAGjB,WAAW,CAC9B,MAAOkB,IAAmB,IAAK;IAC7B,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