@zezosoft/zezo-ott-react-native-ui-kit 1.0.4 → 1.0.6
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/assets/animations/Failed.json +2103 -0
- package/lib/module/assets/animations/Pending.json +522 -0
- package/lib/module/assets/animations/Successful.json +2289 -0
- package/lib/module/components/Account/Account.js +4 -4
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Alert/AlertDialog.js +208 -0
- package/lib/module/components/Alert/AlertDialog.js.map +1 -0
- package/lib/module/components/Alert/UAAlert.js +5 -1
- package/lib/module/components/Alert/UAAlert.js.map +1 -1
- package/lib/module/components/Alert/index.js +1 -0
- package/lib/module/components/Alert/index.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +240 -0
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -0
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +4 -8
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +7 -7
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +6 -6
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +5 -5
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +8 -9
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +2 -2
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +9 -9
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +62 -73
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +82 -41
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/Auth/index.js +2 -0
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +8 -4
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +8 -7
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/Button/BackBtn.js +2 -2
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/MenuBtn.js +2 -2
- package/lib/module/components/Button/MenuBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +2 -2
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +91 -0
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -0
- package/lib/module/components/Button/TextButton.js +2 -2
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Button/index.js +2 -0
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +3 -3
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +11 -6
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +9 -6
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +7 -3
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +5 -3
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +5 -3
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +11 -6
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +5 -3
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +9 -4
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +5 -3
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +5 -3
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +5 -3
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +13 -28
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/NoContentFallback.js +2 -2
- package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +116 -0
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -0
- package/lib/module/components/Content/Card/components/ShowAllButton.js +3 -1
- package/lib/module/components/Content/Card/components/ShowAllButton.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +1 -2
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +6 -5
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +4 -2
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +21 -16
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +29 -8
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +5 -5
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +2 -2
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/One.js +2 -2
- package/lib/module/components/Headers/One.js.map +1 -1
- package/lib/module/components/Headers/Three.js +2 -2
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +2 -2
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +2 -2
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Input/InputTwo.js +2 -2
- package/lib/module/components/Input/InputTwo.js.map +1 -1
- package/lib/module/components/Input/PhoneNumberInput.js +5 -4
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +7 -7
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +0 -4
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +1 -1
- package/lib/module/components/Search/One.js +4 -4
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +2 -2
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +4 -4
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +11 -10
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/TabBar/One.js +8 -5
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +2 -2
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +8 -5
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/Text/Text.js +3 -2
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +4 -3
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +17 -20
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +4 -3
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +6 -3
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +41 -11
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +3 -3
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/common/AppStatusBar.js +41 -0
- package/lib/module/components/common/AppStatusBar.js.map +1 -0
- package/lib/module/components/layout/SafeAreaWrapper.js +2 -2
- package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -1
- package/lib/module/hooks/useSplashCache.js +117 -0
- package/lib/module/hooks/useSplashCache.js.map +1 -0
- package/lib/module/store/RecentSearchesStore.js +0 -1
- package/lib/module/store/RecentSearchesStore.js.map +1 -1
- package/lib/module/store/splashStore.js +3 -7
- package/lib/module/store/splashStore.js.map +1 -1
- package/lib/module/store/themeStore.js +39 -0
- package/lib/module/store/themeStore.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +40 -69
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/index.js +5 -0
- package/lib/module/theme/hook/index.js.map +1 -0
- package/lib/module/theme/hook/useInternalTheme.js +46 -0
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -0
- package/lib/module/theme/hook/useThemeStatusBar.js +27 -0
- package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -0
- package/lib/module/theme/index.js +1 -2
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/themes.js +6 -4
- package/lib/module/theme/themes.js.map +1 -1
- package/lib/typescript/src/components/Account/Account.d.ts +2 -2
- package/lib/typescript/src/components/Account/Account.d.ts.map +1 -1
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts +18 -0
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert/UAAlert.d.ts +2 -2
- package/lib/typescript/src/components/Alert/UAAlert.d.ts.map +1 -1
- package/lib/typescript/src/components/Alert/index.d.ts +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +35 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts +2 -2
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts +2 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts +2 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +2 -2
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +2 -2
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +2 -2
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts +2 -2
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +6 -5
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts +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 +7 -5
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +2 -2
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -2
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/BackBtn.d.ts +2 -2
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/MenuBtn.d.ts +2 -2
- package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -2
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +21 -0
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +13 -2
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -2
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +14 -0
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/ShowAllButton.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/ShowAllButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/index.d.ts +10 -10
- package/lib/typescript/src/components/Content/Content.d.ts +2 -2
- 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.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts +2 -2
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +3 -3
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -2
- package/lib/typescript/src/components/ContentView/components/TrailerButton.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/One.d.ts +2 -2
- package/lib/typescript/src/components/Headers/One.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/Input/InputOne.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputTwo.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts +2 -2
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +2 -2
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts +2 -2
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -2
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +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 +2 -2
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/One.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Three.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -0
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +2 -2
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +4 -4
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +2 -2
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +2 -2
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +6 -2
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts +2 -2
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/common/AppStatusBar.d.ts +17 -0
- package/lib/typescript/src/components/common/AppStatusBar.d.ts.map +1 -0
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts +2 -2
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useSplashCache.d.ts +22 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -0
- package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -1
- package/lib/typescript/src/store/themeStore.d.ts +7 -0
- package/lib/typescript/src/store/themeStore.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts +17 -10
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/index.d.ts +3 -0
- package/lib/typescript/src/theme/hook/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts +3 -0
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -0
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts +10 -0
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +1 -6
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/themes.d.ts +14 -2
- package/lib/typescript/src/theme/themes.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +4 -3
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/animations/Failed.json +2103 -0
- package/src/assets/animations/Pending.json +522 -0
- package/src/assets/animations/Successful.json +2289 -0
- package/src/components/Account/Account.tsx +6 -6
- package/src/components/Alert/AlertDialog.tsx +247 -0
- package/src/components/Alert/UAAlert.tsx +5 -3
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +294 -0
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +6 -8
- package/src/components/Auth/Login/LoginWithEmail.tsx +9 -9
- package/src/components/Auth/Login/LoginWithPhone.tsx +8 -8
- package/src/components/Auth/OTP/OTP.tsx +7 -7
- package/src/components/Auth/QrLogin/QrLogin.tsx +8 -12
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +4 -4
- package/src/components/Auth/SignUp/SignUp.tsx +11 -11
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +87 -91
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +90 -40
- package/src/components/Auth/index.ts +2 -0
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +8 -6
- package/src/components/BlogView/BlogView.tsx +13 -8
- package/src/components/Button/BackBtn.tsx +4 -4
- package/src/components/Button/MenuBtn.tsx +4 -4
- package/src/components/Button/PrimaryBtn.tsx +4 -4
- package/src/components/Button/SecondaryBtn.tsx +116 -0
- package/src/components/Button/TextButton.tsx +2 -2
- package/src/components/Button/index.ts +2 -0
- package/src/components/Content/Card/Category/Category.tsx +5 -5
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +10 -5
- package/src/components/Content/Card/Sliders/Styles/One.tsx +10 -5
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +9 -4
- package/src/components/Content/Card/Styles/Five.tsx +6 -5
- package/src/components/Content/Card/Styles/Four.tsx +6 -5
- package/src/components/Content/Card/Styles/One.tsx +12 -6
- package/src/components/Content/Card/Styles/RotateInOut.tsx +6 -5
- package/src/components/Content/Card/Styles/Six.tsx +10 -5
- package/src/components/Content/Card/Styles/Three.tsx +6 -5
- package/src/components/Content/Card/Styles/TopTen.tsx +6 -5
- package/src/components/Content/Card/Styles/Two.tsx +6 -5
- package/src/components/Content/Card/components/CardPoster.tsx +24 -51
- package/src/components/Content/Card/components/NoContentFallback.tsx +4 -4
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +109 -0
- package/src/components/Content/Card/components/ShowAllButton.tsx +6 -1
- package/src/components/Content/Card/components/ThumbnailCard.tsx +1 -2
- package/src/components/Content/Content.tsx +2 -2
- package/src/components/Content/Sections.tsx +2 -2
- package/src/components/ContentView/ContentView.tsx +6 -5
- package/src/components/ContentView/MoreContentList.tsx +6 -4
- package/src/components/ContentView/components/EpisodeCard.tsx +25 -17
- package/src/components/ContentView/components/HeroBanner.tsx +26 -3
- package/src/components/ContentView/components/TrailerButton.tsx +6 -5
- package/src/components/Headers/AppHeader.tsx +4 -4
- package/src/components/Headers/One.tsx +4 -4
- package/src/components/Headers/Three.tsx +4 -4
- package/src/components/Headers/Two.tsx +4 -4
- package/src/components/Input/InputOne.tsx +4 -4
- package/src/components/Input/InputTwo.tsx +4 -4
- package/src/components/Input/PhoneNumberInput.tsx +5 -5
- package/src/components/Logo/Logo.tsx +9 -11
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +1 -8
- package/src/components/Search/One.tsx +10 -9
- package/src/components/Search/components/SearchCard.tsx +4 -4
- package/src/components/Settings/AppSettings.tsx +6 -6
- package/src/components/Subscription/SubOne.tsx +19 -18
- package/src/components/TabBar/One.tsx +10 -6
- package/src/components/TabBar/Three.tsx +4 -4
- package/src/components/TabBar/Two.tsx +9 -6
- package/src/components/Text/Text.tsx +5 -2
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +6 -5
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +20 -26
- package/src/components/User/WatchHistory/WatchHistory.tsx +6 -5
- package/src/components/User/WatchLater/WatchLater.tsx +8 -6
- package/src/components/User/components/UserAvatar.tsx +46 -7
- package/src/components/User/components/UserSection.tsx +5 -5
- package/src/components/common/AppStatusBar.tsx +51 -0
- package/src/components/layout/SafeAreaWrapper.tsx +4 -4
- package/src/hooks/useSplashCache.ts +166 -0
- package/src/store/RecentSearchesStore.ts +0 -1
- package/src/store/splashStore.ts +5 -5
- package/src/store/themeStore.ts +53 -0
- package/src/theme/ThemeProvider.tsx +40 -102
- package/src/theme/hook/index.ts +2 -0
- package/src/theme/hook/useInternalTheme.ts +61 -0
- package/src/theme/hook/useThemeStatusBar.ts +33 -0
- package/src/theme/index.ts +1 -7
- package/src/theme/themes.ts +20 -6
- package/src/types/content/content-view.types.ts +4 -3
- package/lib/module/hooks/useInitSplashCacheSync.js +0 -116
- package/lib/module/hooks/useInitSplashCacheSync.js.map +0 -1
- package/lib/module/theme/hook/useTheme.js +0 -45
- package/lib/module/theme/hook/useTheme.js.map +0 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +0 -22
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +0 -1
- package/lib/typescript/src/theme/hook/useTheme.d.ts +0 -9
- package/lib/typescript/src/theme/hook/useTheme.d.ts.map +0 -1
- package/src/hooks/useInitSplashCacheSync.ts +0 -174
- package/src/theme/hook/useTheme.ts +0 -45
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { StyleSheet, type ViewStyle } from 'react-native';
|
|
3
3
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
4
|
+
import type { ThemeOverride } from '../../theme/themes';
|
|
5
|
+
import { useInternalTheme } from '../../theme/hook/useInternalTheme';
|
|
6
6
|
|
|
7
7
|
type SafeAreaWrapperProps = {
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
style?: ViewStyle;
|
|
10
|
-
theme?:
|
|
10
|
+
theme?: ThemeOverride;
|
|
11
11
|
edges?: ('top' | 'right' | 'bottom' | 'left')[];
|
|
12
12
|
fallbackBackground?: string;
|
|
13
13
|
};
|
|
@@ -19,7 +19,7 @@ export const SafeAreaWrapper: React.FC<SafeAreaWrapperProps> = ({
|
|
|
19
19
|
edges = ['top'],
|
|
20
20
|
fallbackBackground = '#fff',
|
|
21
21
|
}) => {
|
|
22
|
-
const { theme: appliedTheme } =
|
|
22
|
+
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
23
23
|
|
|
24
24
|
const containerStyle = useMemo(() => {
|
|
25
25
|
return [
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh
|
|
3
|
+
* @lastModified Fri 17 Oct 2025 at 09:55 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import RNFS from 'react-native-fs';
|
|
8
|
+
import CryptoJS from 'crypto-js';
|
|
9
|
+
import { MMKV } from 'react-native-mmkv';
|
|
10
|
+
import { useSplashStore } from '../store/splashStore';
|
|
11
|
+
|
|
12
|
+
const storage = new MMKV();
|
|
13
|
+
const activeDownloads = new Map<string, Promise<string | null>>();
|
|
14
|
+
|
|
15
|
+
const SUPPORTED_EXTENSIONS = [
|
|
16
|
+
'json',
|
|
17
|
+
'mp4',
|
|
18
|
+
'jpg',
|
|
19
|
+
'jpeg',
|
|
20
|
+
'png',
|
|
21
|
+
'webp',
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
const getFileExtension = (url: string): string => {
|
|
25
|
+
try {
|
|
26
|
+
const cleanUrl = url.split('?')[0];
|
|
27
|
+
const ext = cleanUrl
|
|
28
|
+
?.substring(cleanUrl?.lastIndexOf('.') + 1)
|
|
29
|
+
.toLowerCase();
|
|
30
|
+
return SUPPORTED_EXTENSIONS.includes(ext as any) ? (ext as string) : 'png';
|
|
31
|
+
} catch {
|
|
32
|
+
return 'png';
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const downloadAndCacheAsset = async (
|
|
37
|
+
url: string,
|
|
38
|
+
extension: string,
|
|
39
|
+
cacheKey: string,
|
|
40
|
+
force: boolean
|
|
41
|
+
): Promise<string | null> => {
|
|
42
|
+
if (!url?.trim()) return null;
|
|
43
|
+
|
|
44
|
+
const ext = extension.replace(/^\./, '') || 'png';
|
|
45
|
+
const hash = CryptoJS.MD5(`${url}|${cacheKey}|${ext}`).toString();
|
|
46
|
+
const localFile = `${RNFS.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
47
|
+
|
|
48
|
+
if (activeDownloads.has(hash)) {
|
|
49
|
+
return activeDownloads.get(hash)!;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const task = (async () => {
|
|
53
|
+
try {
|
|
54
|
+
const savedHash = storage.getString(cacheKey);
|
|
55
|
+
|
|
56
|
+
if (savedHash && savedHash !== hash) {
|
|
57
|
+
const oldFile = `${RNFS.CachesDirectoryPath}/splash_${savedHash}.${ext}`;
|
|
58
|
+
if (await RNFS.exists(oldFile)) {
|
|
59
|
+
await RNFS.unlink(oldFile).catch(() => {});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (!force) {
|
|
64
|
+
const exists = await RNFS.exists(localFile);
|
|
65
|
+
if (exists && savedHash === hash) {
|
|
66
|
+
return localFile;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const { statusCode } = await RNFS.downloadFile({
|
|
71
|
+
fromUrl: url,
|
|
72
|
+
toFile: localFile,
|
|
73
|
+
cacheable: true,
|
|
74
|
+
readTimeout: 15000,
|
|
75
|
+
connectionTimeout: 10000,
|
|
76
|
+
}).promise;
|
|
77
|
+
|
|
78
|
+
if (statusCode === 200) {
|
|
79
|
+
storage.set(cacheKey, hash);
|
|
80
|
+
return localFile;
|
|
81
|
+
}
|
|
82
|
+
} catch {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return null;
|
|
87
|
+
})();
|
|
88
|
+
|
|
89
|
+
activeDownloads.set(hash, task);
|
|
90
|
+
return task;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
type SplashCacheOptions = {
|
|
94
|
+
logoUrl?: string;
|
|
95
|
+
backgroundUrl?: string;
|
|
96
|
+
forceDownload?: boolean;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const useSplashCache = ({
|
|
100
|
+
logoUrl,
|
|
101
|
+
backgroundUrl,
|
|
102
|
+
forceDownload = false,
|
|
103
|
+
}: SplashCacheOptions) => {
|
|
104
|
+
const [state, setState] = useState({
|
|
105
|
+
isReady: false,
|
|
106
|
+
error: null as Error | null,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const setLogo = useSplashStore((s) => s.setLogoPath);
|
|
110
|
+
const setBackground = useSplashStore((s) => s.setBackdropPath);
|
|
111
|
+
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
let mounted = true;
|
|
114
|
+
|
|
115
|
+
const syncAssets = async () => {
|
|
116
|
+
try {
|
|
117
|
+
const [logoPath, bgPath] = await Promise.all([
|
|
118
|
+
logoUrl
|
|
119
|
+
? downloadAndCacheAsset(
|
|
120
|
+
logoUrl,
|
|
121
|
+
getFileExtension(logoUrl),
|
|
122
|
+
'splash_logo',
|
|
123
|
+
forceDownload
|
|
124
|
+
)
|
|
125
|
+
: Promise.resolve(null),
|
|
126
|
+
backgroundUrl
|
|
127
|
+
? downloadAndCacheAsset(
|
|
128
|
+
backgroundUrl,
|
|
129
|
+
getFileExtension(backgroundUrl),
|
|
130
|
+
'splash_background',
|
|
131
|
+
forceDownload
|
|
132
|
+
)
|
|
133
|
+
: Promise.resolve(null),
|
|
134
|
+
]);
|
|
135
|
+
|
|
136
|
+
if (!mounted) return;
|
|
137
|
+
|
|
138
|
+
if (logoPath) setLogo?.(logoPath);
|
|
139
|
+
if (bgPath) setBackground?.(bgPath);
|
|
140
|
+
|
|
141
|
+
setState({ isReady: true, error: null });
|
|
142
|
+
} catch (err) {
|
|
143
|
+
if (mounted) {
|
|
144
|
+
setState({ isReady: true, error: err as Error });
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
syncAssets();
|
|
150
|
+
return () => {
|
|
151
|
+
mounted = false;
|
|
152
|
+
};
|
|
153
|
+
}, [logoUrl, backgroundUrl, forceDownload, setLogo, setBackground]);
|
|
154
|
+
|
|
155
|
+
const logoPath = useSplashStore((s) => s.logo.localPath);
|
|
156
|
+
const bgPath = useSplashStore((s) => s.backdrop.localPath);
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
state,
|
|
160
|
+
isLoading: !state.isReady && !state.error,
|
|
161
|
+
data: {
|
|
162
|
+
logoPath,
|
|
163
|
+
backgroundPath: bgPath,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
};
|
|
@@ -68,7 +68,6 @@ export const useRecentSearchesStore = create<RecentSearchesState>()(
|
|
|
68
68
|
if (hasData) {
|
|
69
69
|
setTimeout(() => {
|
|
70
70
|
useRecentSearchesStore.setState({ isLoading: false });
|
|
71
|
-
console.log('🔄 Zustand store rehydrated');
|
|
72
71
|
}, 50);
|
|
73
72
|
} else {
|
|
74
73
|
useRecentSearchesStore.setState({ isLoading: false });
|
package/src/store/splashStore.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { create } from 'zustand';
|
|
7
7
|
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
8
|
-
import { MMKV } from 'react-native-mmkv';
|
|
8
|
+
import { MMKV } from 'react-native-mmkv';
|
|
9
9
|
|
|
10
|
-
const mmkv = new MMKV();
|
|
10
|
+
const mmkv = new MMKV();
|
|
11
11
|
|
|
12
12
|
interface ImageState {
|
|
13
13
|
localPath: string | null;
|
|
@@ -72,9 +72,9 @@ export const useSplashStore = create<SplashState>()(
|
|
|
72
72
|
{
|
|
73
73
|
name: 'splash-storage',
|
|
74
74
|
storage: createJSONStorage(() => ({
|
|
75
|
-
getItem: (name) => mmkv.getString(name) || null,
|
|
76
|
-
setItem: (name, value) => mmkv.set(name, value),
|
|
77
|
-
removeItem: (name) => mmkv.delete(name),
|
|
75
|
+
getItem: (name) => mmkv.getString(name) || null,
|
|
76
|
+
setItem: (name, value) => mmkv.set(name, value),
|
|
77
|
+
removeItem: (name) => mmkv.delete(name),
|
|
78
78
|
})),
|
|
79
79
|
partialize: (state) => ({
|
|
80
80
|
logo: {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { create } from 'zustand';
|
|
2
|
+
import { Appearance, type ColorSchemeName } from 'react-native';
|
|
3
|
+
import { MMKV } from 'react-native-mmkv';
|
|
4
|
+
|
|
5
|
+
const storage = new MMKV({ id: 'theme_store' });
|
|
6
|
+
|
|
7
|
+
interface ThemeState {
|
|
8
|
+
isDarkMode: boolean;
|
|
9
|
+
setTheme: (mode: 'dark' | 'light' | 'system') => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const getInitialIsDarkMode = (): boolean => {
|
|
13
|
+
const storedMode = storage.getString('themeMode') as
|
|
14
|
+
| 'dark'
|
|
15
|
+
| 'light'
|
|
16
|
+
| 'system'
|
|
17
|
+
| null;
|
|
18
|
+
if (storedMode === 'dark') return true;
|
|
19
|
+
if (storedMode === 'light') return false;
|
|
20
|
+
return Appearance.getColorScheme() === 'dark';
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const useInternalThemeStore = create<ThemeState>((set) => ({
|
|
24
|
+
isDarkMode: getInitialIsDarkMode(),
|
|
25
|
+
|
|
26
|
+
setTheme: (mode) => {
|
|
27
|
+
let isDark: boolean;
|
|
28
|
+
|
|
29
|
+
if (mode === 'dark') {
|
|
30
|
+
isDark = true;
|
|
31
|
+
} else if (mode === 'light') {
|
|
32
|
+
isDark = false;
|
|
33
|
+
} else {
|
|
34
|
+
const systemColorScheme: ColorSchemeName = Appearance.getColorScheme();
|
|
35
|
+
isDark = systemColorScheme === 'dark';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
storage.set('themeMode', mode);
|
|
39
|
+
|
|
40
|
+
set({ isDarkMode: isDark });
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
Appearance.addChangeListener(() => {
|
|
45
|
+
const storedMode = storage.getString('themeMode') as
|
|
46
|
+
| 'dark'
|
|
47
|
+
| 'light'
|
|
48
|
+
| 'system'
|
|
49
|
+
| null;
|
|
50
|
+
if (!storedMode || storedMode === 'system') {
|
|
51
|
+
useInternalThemeStore.getState().setTheme('system');
|
|
52
|
+
}
|
|
53
|
+
});
|
|
@@ -1,135 +1,73 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified
|
|
3
|
+
* @lastModified Wed 22 Oct 2025 at 11:29 AM
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
useState,
|
|
9
|
-
useCallback,
|
|
10
|
-
useEffect,
|
|
11
|
-
useContext,
|
|
12
|
-
type ReactNode,
|
|
13
|
-
} from 'react';
|
|
14
|
-
import { View, StatusBar, Platform, Appearance } from 'react-native';
|
|
5
|
+
|
|
6
|
+
import React, { createContext, useContext, type ReactNode } from 'react';
|
|
7
|
+
import { View } from 'react-native';
|
|
15
8
|
import {
|
|
16
9
|
SafeAreaProvider,
|
|
17
10
|
initialWindowMetrics,
|
|
18
11
|
} from 'react-native-safe-area-context';
|
|
19
|
-
import { LightTheme, DarkTheme, type ITheme, type AppTheme } from './themes';
|
|
20
12
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
13
|
+
import { AppStatusBar } from '../components/common/AppStatusBar';
|
|
14
|
+
|
|
15
|
+
import { useInternalTheme } from './hook/useInternalTheme';
|
|
16
|
+
import { type ITheme, type ThemeOverride } from './themes';
|
|
21
17
|
|
|
22
18
|
type ThemeContextType = {
|
|
23
|
-
theme:
|
|
19
|
+
theme: {
|
|
20
|
+
dark: ITheme['colors'];
|
|
21
|
+
light: ITheme['colors'];
|
|
22
|
+
};
|
|
24
23
|
isDarkMode: boolean;
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
setTheme: (mode: 'light' | 'dark' | 'system') => void;
|
|
25
|
+
finalTheme: ITheme;
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
const ThemeContext = createContext<ThemeContextType | null>(null);
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Custom hook to access ZezoUI theme context.
|
|
32
|
+
*/
|
|
33
|
+
export const useTheme = (): ThemeContextType => {
|
|
32
34
|
const ctx = useContext(ThemeContext);
|
|
33
|
-
if (!ctx)
|
|
35
|
+
if (!ctx) {
|
|
36
|
+
throw new Error('useTheme must be used within ZezoUIProvider');
|
|
37
|
+
}
|
|
34
38
|
return ctx;
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
type ZezoUIProviderProps = {
|
|
38
42
|
children: ReactNode;
|
|
39
|
-
theme?:
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const getIsDarkMode = (
|
|
44
|
-
autoSwitchTheme: boolean | undefined,
|
|
45
|
-
colorScheme: 'dark' | 'light' | null,
|
|
46
|
-
userDark?: boolean
|
|
47
|
-
): boolean => {
|
|
48
|
-
if (autoSwitchTheme) return colorScheme === 'dark';
|
|
49
|
-
return userDark ?? false;
|
|
43
|
+
theme?: ThemeOverride;
|
|
44
|
+
isDark?: boolean;
|
|
50
45
|
};
|
|
51
46
|
|
|
47
|
+
/**
|
|
48
|
+
* ZezoUIProvider — Wraps your app with theming, safe area, and gesture support.
|
|
49
|
+
*/
|
|
52
50
|
export const ZezoUIProvider: React.FC<ZezoUIProviderProps> = ({
|
|
53
51
|
children,
|
|
54
|
-
theme,
|
|
55
|
-
|
|
52
|
+
theme: overrideTheme,
|
|
53
|
+
isDark,
|
|
56
54
|
}) => {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
useEffect(() => {
|
|
64
|
-
if (theme) {
|
|
65
|
-
setOverrideTheme(theme);
|
|
66
|
-
}
|
|
67
|
-
}, [theme]);
|
|
68
|
-
|
|
69
|
-
// ✅ This prioritizes externally passed theme.dark
|
|
70
|
-
const isDarkMode = useMemo(() => {
|
|
71
|
-
if (theme?.dark !== undefined) return theme.dark;
|
|
72
|
-
return getIsDarkMode(
|
|
73
|
-
autoSwitchTheme,
|
|
74
|
-
colorScheme || 'dark',
|
|
75
|
-
overrideTheme?.dark
|
|
76
|
-
);
|
|
77
|
-
}, [theme?.dark, autoSwitchTheme, colorScheme, overrideTheme?.dark]);
|
|
78
|
-
|
|
79
|
-
const baseTheme = useMemo<ITheme>(
|
|
80
|
-
() => (isDarkMode ? DarkTheme : LightTheme),
|
|
81
|
-
[isDarkMode]
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const mergedTheme = useMemo<ITheme>(() => {
|
|
85
|
-
return {
|
|
86
|
-
...baseTheme,
|
|
87
|
-
...overrideTheme,
|
|
88
|
-
dark: isDarkMode,
|
|
89
|
-
colors: {
|
|
90
|
-
...baseTheme.colors,
|
|
91
|
-
...(overrideTheme?.colors ?? {}),
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}, [baseTheme, overrideTheme, isDarkMode]);
|
|
95
|
-
|
|
96
|
-
const toggleTheme = useCallback(() => {
|
|
97
|
-
if (autoSwitchTheme || theme?.dark !== undefined) return;
|
|
98
|
-
setOverrideTheme((prev) => ({
|
|
99
|
-
...prev,
|
|
100
|
-
dark: !getIsDarkMode(false, null, prev?.dark),
|
|
101
|
-
}));
|
|
102
|
-
}, [autoSwitchTheme, theme?.dark]);
|
|
103
|
-
|
|
104
|
-
const setThemeOverride = useCallback((override?: Partial<AppTheme>) => {
|
|
105
|
-
setOverrideTheme(override);
|
|
106
|
-
}, []);
|
|
107
|
-
|
|
108
|
-
// ✅ Update StatusBar only when required
|
|
109
|
-
|
|
110
|
-
useEffect(() => {
|
|
111
|
-
StatusBar.setBarStyle(isDarkMode ? 'light-content' : 'dark-content', true);
|
|
112
|
-
|
|
113
|
-
if (Platform.OS === 'android') {
|
|
114
|
-
StatusBar.setBackgroundColor(mergedTheme.colors.background, true);
|
|
115
|
-
}
|
|
116
|
-
}, [isDarkMode, mergedTheme.colors.background]);
|
|
117
|
-
const contextValue = useMemo(
|
|
118
|
-
() => ({
|
|
119
|
-
theme: mergedTheme,
|
|
120
|
-
isDarkMode,
|
|
121
|
-
toggleTheme,
|
|
122
|
-
setThemeOverride,
|
|
123
|
-
}),
|
|
124
|
-
[mergedTheme, isDarkMode, toggleTheme, setThemeOverride]
|
|
125
|
-
);
|
|
55
|
+
const {
|
|
56
|
+
theme: finalTheme,
|
|
57
|
+
isDarkMode,
|
|
58
|
+
setTheme,
|
|
59
|
+
themeFull,
|
|
60
|
+
} = useInternalTheme(overrideTheme, isDark);
|
|
126
61
|
|
|
127
62
|
return (
|
|
128
|
-
<GestureHandlerRootView>
|
|
63
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
129
64
|
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
|
|
130
|
-
<ThemeContext.Provider
|
|
65
|
+
<ThemeContext.Provider
|
|
66
|
+
value={{ theme: themeFull, isDarkMode, setTheme, finalTheme }}
|
|
67
|
+
>
|
|
68
|
+
<AppStatusBar theme={overrideTheme} />
|
|
131
69
|
<View
|
|
132
|
-
style={{ flex: 1, backgroundColor:
|
|
70
|
+
style={{ flex: 1, backgroundColor: finalTheme.colors.background }}
|
|
133
71
|
>
|
|
134
72
|
{children}
|
|
135
73
|
</View>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Sun 19 Oct 2025 at 08:29 PM
|
|
4
|
+
*/
|
|
5
|
+
import { useMemo, useEffect } from 'react';
|
|
6
|
+
import {
|
|
7
|
+
DarkTheme,
|
|
8
|
+
LightTheme,
|
|
9
|
+
type ITheme,
|
|
10
|
+
type ThemeOverride,
|
|
11
|
+
type useInternalThemeReturn,
|
|
12
|
+
} from '../themes';
|
|
13
|
+
import { useInternalThemeStore } from '../../store/themeStore';
|
|
14
|
+
|
|
15
|
+
export const useInternalTheme = (
|
|
16
|
+
override?: ThemeOverride,
|
|
17
|
+
isDark?: boolean
|
|
18
|
+
): useInternalThemeReturn => {
|
|
19
|
+
const { isDarkMode: storeDarkMode, setTheme } = useInternalThemeStore();
|
|
20
|
+
|
|
21
|
+
const isDarkMode = isDark !== undefined ? isDark : storeDarkMode;
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (isDark !== undefined) {
|
|
25
|
+
setTheme(isDark ? 'dark' : 'light');
|
|
26
|
+
}
|
|
27
|
+
}, [isDark, setTheme]);
|
|
28
|
+
|
|
29
|
+
const selectedOverride = useMemo(() => {
|
|
30
|
+
if (!override) return {};
|
|
31
|
+
const colors = isDarkMode ? override.dark : override.light;
|
|
32
|
+
return colors ?? {};
|
|
33
|
+
}, [override, isDarkMode]);
|
|
34
|
+
const baseTheme = useMemo(
|
|
35
|
+
() => (isDarkMode ? DarkTheme : LightTheme),
|
|
36
|
+
[isDarkMode]
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const finalTheme = useMemo<ITheme>(() => {
|
|
40
|
+
return {
|
|
41
|
+
...baseTheme,
|
|
42
|
+
colors: {
|
|
43
|
+
...baseTheme.colors,
|
|
44
|
+
...selectedOverride,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}, [baseTheme, selectedOverride]);
|
|
48
|
+
|
|
49
|
+
return useMemo(
|
|
50
|
+
() => ({
|
|
51
|
+
theme: finalTheme,
|
|
52
|
+
isDarkMode,
|
|
53
|
+
setTheme,
|
|
54
|
+
themeFull: {
|
|
55
|
+
light: (override?.light as ITheme['colors']) ?? LightTheme.colors,
|
|
56
|
+
dark: (override?.dark as ITheme['colors']) ?? DarkTheme.colors,
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
[finalTheme, isDarkMode, override?.dark, override?.light, setTheme]
|
|
60
|
+
);
|
|
61
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 22 Oct 2025 at 10:29 AM
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Automatically syncs StatusBar color & style with current theme.
|
|
7
|
+
*/
|
|
8
|
+
import { useEffect } from 'react';
|
|
9
|
+
import { StatusBar, Platform, type StatusBarStyle } from 'react-native';
|
|
10
|
+
import Color from 'color';
|
|
11
|
+
import type { ITheme } from '../themes';
|
|
12
|
+
|
|
13
|
+
interface UseThemeStatusBarOptions {
|
|
14
|
+
theme: ITheme;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
barStyle?: StatusBarStyle;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const useThemeStatusBar = ({
|
|
20
|
+
theme,
|
|
21
|
+
backgroundColor,
|
|
22
|
+
barStyle,
|
|
23
|
+
}: UseThemeStatusBarOptions) => {
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const bgColor = backgroundColor ?? theme.colors.background;
|
|
26
|
+
const contentStyle: StatusBarStyle =
|
|
27
|
+
barStyle ?? (Color(bgColor).isDark() ? 'light-content' : 'dark-content');
|
|
28
|
+
StatusBar.setBarStyle(contentStyle, true);
|
|
29
|
+
if (Platform.OS === 'android') {
|
|
30
|
+
StatusBar.setBackgroundColor(bgColor, true);
|
|
31
|
+
}
|
|
32
|
+
}, [theme, backgroundColor, barStyle]);
|
|
33
|
+
};
|
package/src/theme/index.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type { BaseColors, ITheme } from './themes';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* @author Naresh Dhamu
|
|
5
3
|
* @lastModified Sat 14 Jun 2025 at 11:47 AM
|
|
6
4
|
*/
|
|
7
|
-
export type AppTheme = Omit<ITheme, 'colors'> & {
|
|
8
|
-
dark?: boolean;
|
|
9
|
-
colors?: Partial<BaseColors>;
|
|
10
|
-
};
|
|
11
5
|
|
|
12
6
|
export * from './ThemeProvider';
|
|
13
|
-
export * from './
|
|
7
|
+
export * from './themes';
|
package/src/theme/themes.ts
CHANGED
|
@@ -82,21 +82,34 @@ export type BaseColors = {
|
|
|
82
82
|
switchThumbColor: string;
|
|
83
83
|
switchTrackColorDisabled: string;
|
|
84
84
|
switchThumbColorDisabled: string;
|
|
85
|
+
|
|
86
|
+
premiumIcon: string;
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
export interface ITheme {
|
|
88
|
-
dark: boolean;
|
|
89
|
-
|
|
90
90
|
colors: BaseColors;
|
|
91
91
|
}
|
|
92
|
+
|
|
92
93
|
export type AppTheme = Omit<ITheme, 'colors'> & {
|
|
93
|
-
dark?: boolean;
|
|
94
94
|
colors?: Partial<BaseColors>;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
// New type for override object
|
|
98
|
+
export type ThemeOverride = {
|
|
99
|
+
light?: Partial<BaseColors>;
|
|
100
|
+
dark?: Partial<BaseColors>;
|
|
101
|
+
};
|
|
102
|
+
export interface useInternalThemeReturn {
|
|
103
|
+
theme: ITheme;
|
|
104
|
+
themeFull: {
|
|
105
|
+
light: ITheme['colors'];
|
|
106
|
+
dark: ITheme['colors'];
|
|
107
|
+
};
|
|
108
|
+
isDarkMode: boolean;
|
|
109
|
+
setTheme: (mode: 'dark' | 'light' | 'system') => void;
|
|
110
|
+
}
|
|
99
111
|
|
|
112
|
+
export const LightTheme: ITheme = {
|
|
100
113
|
colors: {
|
|
101
114
|
primary: 'rgba(244, 197, 66, 1)',
|
|
102
115
|
onPrimary: 'rgba(255, 255, 255, 1)',
|
|
@@ -194,11 +207,11 @@ export const LightTheme: ITheme = {
|
|
|
194
207
|
switchThumbColor: 'white',
|
|
195
208
|
switchTrackColorDisabled: '#D5D5D5',
|
|
196
209
|
switchThumbColorDisabled: 'white',
|
|
210
|
+
premiumIcon: '#CA091E',
|
|
197
211
|
},
|
|
198
212
|
};
|
|
199
213
|
|
|
200
214
|
export const DarkTheme: ITheme = {
|
|
201
|
-
dark: true,
|
|
202
215
|
colors: {
|
|
203
216
|
primary: 'rgba(244, 197, 66, 1)',
|
|
204
217
|
onPrimary: 'rgba(15, 23, 42, 1)',
|
|
@@ -295,5 +308,6 @@ export const DarkTheme: ITheme = {
|
|
|
295
308
|
switchThumbColor: 'white',
|
|
296
309
|
switchTrackColorDisabled: '#D5D5D5',
|
|
297
310
|
switchThumbColorDisabled: 'white',
|
|
311
|
+
premiumIcon: '#CA091E',
|
|
298
312
|
},
|
|
299
313
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
7
7
|
import type { ImageStyle as FastImageStyle } from 'react-native-fast-image';
|
|
8
|
-
import type {
|
|
8
|
+
import type { ThemeOverride } from '../../theme/themes';
|
|
9
9
|
import type { IContentData } from '../../types';
|
|
10
10
|
import type { IGetSectionData, ISectionItem } from '../../types/sections';
|
|
11
11
|
import type { MoreFetchData } from '../../types/hook/usePaginatedSetion';
|
|
@@ -121,7 +121,7 @@ export type SkeletonOverrides = Partial<{
|
|
|
121
121
|
export type HeroBannerProps = {
|
|
122
122
|
backgroundImage: IContentData['thumbnail'];
|
|
123
123
|
title: IContentData['name'];
|
|
124
|
-
theme
|
|
124
|
+
theme?: ThemeOverride;
|
|
125
125
|
isLoading?: boolean;
|
|
126
126
|
onPressPlay?: ({ is_trailer }: { is_trailer: boolean }) => void;
|
|
127
127
|
onBackPress?: () => void;
|
|
@@ -129,13 +129,14 @@ export type HeroBannerProps = {
|
|
|
129
129
|
renderButtons?: RenderButtons;
|
|
130
130
|
renderSkeletons?: SkeletonOverrides;
|
|
131
131
|
menuActions?: MenuAction[];
|
|
132
|
+
content_offering_type?: IContentData['content_offering_type'];
|
|
132
133
|
};
|
|
133
134
|
|
|
134
135
|
// 🟧 Final Component Props
|
|
135
136
|
export type ComponentProps = {
|
|
136
137
|
content: IContentData;
|
|
137
138
|
seasons?: IContentData['seasons'];
|
|
138
|
-
theme?:
|
|
139
|
+
theme?: ThemeOverride;
|
|
139
140
|
isLoading?: boolean;
|
|
140
141
|
seasonsIsLoading?: boolean;
|
|
141
142
|
recommendedContent?: ISectionItem | null;
|