@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,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified Tue 29 Jul 2025 at 05:37 PM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { useEffect, useState } from 'react';
|
|
9
|
-
import RNFS from 'react-native-fs';
|
|
10
|
-
import CryptoJS from 'crypto-js';
|
|
11
|
-
import { MMKV } from 'react-native-mmkv';
|
|
12
|
-
import { useSplashStore } from "../store/splashStore.js";
|
|
13
|
-
const mmkvStorage = new MMKV();
|
|
14
|
-
const inFlightDownloadsMap = new Map();
|
|
15
|
-
const SUPPORTED_FILE_TYPES = ['json', 'mp4', 'jpg', 'jpeg', 'png', 'webp'];
|
|
16
|
-
const extractFileExtension = url => {
|
|
17
|
-
try {
|
|
18
|
-
const cleanUrl = url.split('?')[0];
|
|
19
|
-
const ext = cleanUrl?.substring(cleanUrl.lastIndexOf('.') + 1).toLowerCase() || '';
|
|
20
|
-
return SUPPORTED_FILE_TYPES.includes(ext) ? ext : 'png';
|
|
21
|
-
} catch {
|
|
22
|
-
return 'png';
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const cacheSplashAsset = async (url, extension, mmkvKey, forceDownload) => {
|
|
26
|
-
if (!url?.trim()) return null;
|
|
27
|
-
const ext = extension.replace(/^\./, '').trim() || 'mp4';
|
|
28
|
-
const hash = CryptoJS.MD5(`${url}|${mmkvKey}|${ext}`).toString();
|
|
29
|
-
const localPath = `${RNFS?.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
30
|
-
if (inFlightDownloadsMap.has(hash)) {
|
|
31
|
-
return inFlightDownloadsMap.get(hash);
|
|
32
|
-
}
|
|
33
|
-
const downloadTask = (async () => {
|
|
34
|
-
try {
|
|
35
|
-
const previousHash = mmkvStorage.getString(mmkvKey);
|
|
36
|
-
if (previousHash && previousHash !== hash) {
|
|
37
|
-
const oldPath = `${RNFS?.CachesDirectoryPath}/splash_${previousHash}.${ext}`;
|
|
38
|
-
const exists = await RNFS?.exists(oldPath);
|
|
39
|
-
if (exists) {
|
|
40
|
-
await RNFS?.unlink(oldPath).catch(() => {});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (!forceDownload) {
|
|
44
|
-
const exists = await RNFS?.exists(localPath);
|
|
45
|
-
if (exists && previousHash === hash) {
|
|
46
|
-
return localPath;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const {
|
|
50
|
-
statusCode
|
|
51
|
-
} = await RNFS?.downloadFile({
|
|
52
|
-
fromUrl: url,
|
|
53
|
-
toFile: localPath,
|
|
54
|
-
cacheable: true,
|
|
55
|
-
readTimeout: 15000,
|
|
56
|
-
connectionTimeout: 10000
|
|
57
|
-
}).promise;
|
|
58
|
-
if (statusCode === 200) {
|
|
59
|
-
mmkvStorage.set(mmkvKey, hash);
|
|
60
|
-
return localPath;
|
|
61
|
-
}
|
|
62
|
-
} catch {}
|
|
63
|
-
return null;
|
|
64
|
-
})();
|
|
65
|
-
inFlightDownloadsMap.set(hash, downloadTask);
|
|
66
|
-
return downloadTask;
|
|
67
|
-
};
|
|
68
|
-
export const useInitSplashCacheSync = ({
|
|
69
|
-
logoUrl,
|
|
70
|
-
backgroundUrl,
|
|
71
|
-
forceDownload = false
|
|
72
|
-
}) => {
|
|
73
|
-
const [splashSyncState, setSplashSyncState] = useState({
|
|
74
|
-
isReady: false,
|
|
75
|
-
error: null
|
|
76
|
-
});
|
|
77
|
-
const setSplashLogoPath = useSplashStore(s => s.setLogoPath);
|
|
78
|
-
const setSplashBackgroundPath = useSplashStore(s => s.setBackdropPath);
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
let isMounted = true;
|
|
81
|
-
const syncSplashAssets = async () => {
|
|
82
|
-
try {
|
|
83
|
-
const [logoPath, backgroundPath] = await Promise.all([logoUrl ? cacheSplashAsset(logoUrl, extractFileExtension(logoUrl), 'splash_logo', forceDownload) : Promise.resolve(null), backgroundUrl ? cacheSplashAsset(backgroundUrl, extractFileExtension(backgroundUrl), 'splash_background', forceDownload) : Promise.resolve(null)]);
|
|
84
|
-
if (!isMounted) return;
|
|
85
|
-
if (logoPath) setSplashLogoPath?.(logoPath);
|
|
86
|
-
if (backgroundPath) setSplashBackgroundPath?.(backgroundPath);
|
|
87
|
-
setSplashSyncState({
|
|
88
|
-
isReady: true,
|
|
89
|
-
error: null
|
|
90
|
-
});
|
|
91
|
-
} catch (err) {
|
|
92
|
-
if (isMounted) {
|
|
93
|
-
setSplashSyncState({
|
|
94
|
-
isReady: true,
|
|
95
|
-
error: err
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
syncSplashAssets();
|
|
101
|
-
return () => {
|
|
102
|
-
isMounted = false;
|
|
103
|
-
};
|
|
104
|
-
}, [logoUrl, backgroundUrl, forceDownload, setSplashLogoPath, setSplashBackgroundPath]);
|
|
105
|
-
const splashLogoLocalPath = useSplashStore(s => s.logo.localPath);
|
|
106
|
-
const splashBackgroundLocalPath = useSplashStore(s => s.backdrop.localPath);
|
|
107
|
-
return {
|
|
108
|
-
state: splashSyncState,
|
|
109
|
-
isLoading: !splashSyncState.isReady && !splashSyncState.error,
|
|
110
|
-
data: {
|
|
111
|
-
localPathLogo: splashLogoLocalPath,
|
|
112
|
-
localPathBackground: splashBackgroundLocalPath
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
//# sourceMappingURL=useInitSplashCacheSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","RNFS","CryptoJS","MMKV","useSplashStore","mmkvStorage","inFlightDownloadsMap","Map","SUPPORTED_FILE_TYPES","extractFileExtension","url","cleanUrl","split","ext","substring","lastIndexOf","toLowerCase","includes","cacheSplashAsset","extension","mmkvKey","forceDownload","trim","replace","hash","MD5","toString","localPath","CachesDirectoryPath","has","get","downloadTask","previousHash","getString","oldPath","exists","unlink","catch","statusCode","downloadFile","fromUrl","toFile","cacheable","readTimeout","connectionTimeout","promise","set","useInitSplashCacheSync","logoUrl","backgroundUrl","splashSyncState","setSplashSyncState","isReady","error","setSplashLogoPath","s","setLogoPath","setSplashBackgroundPath","setBackdropPath","isMounted","syncSplashAssets","logoPath","backgroundPath","Promise","all","resolve","err","splashLogoLocalPath","logo","splashBackgroundLocalPath","backdrop","state","isLoading","data","localPathLogo","localPathBackground"],"sourceRoot":"../../../src","sources":["hooks/useInitSplashCacheSync.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,IAAI,QAAQ,mBAAmB;AACxC,SAASC,cAAc,QAAQ,yBAAsB;AAErD,MAAMC,WAAW,GAAG,IAAIF,IAAI,CAAC,CAAC;AAC9B,MAAMG,oBAAoB,GAAG,IAAIC,GAAG,CAAiC,CAAC;AAEtE,MAAMC,oBAAoB,GAAG,CAC3B,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,KAAK,EACL,MAAM,CACE;AAEV,MAAMC,oBAAoB,GAAIC,GAAW,IAAa;EACpD,IAAI;IACF,MAAMC,QAAQ,GAAGD,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC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GjE,cAAc,CAAEmD,CAAC,IAAKA,CAAC,CAACe,QAAQ,CAAC3C,SAAS,CAAC;EAE7E,OAAO;IACL4C,KAAK,EAAErB,eAAe;IACtBsB,SAAS,EAAE,CAACtB,eAAe,CAACE,OAAO,IAAI,CAACF,eAAe,CAACG,KAAK;IAC7DoB,IAAI,EAAE;MACJC,aAAa,EAAEP,mBAAmB;MAClCQ,mBAAmB,EAAEN;IACvB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified Sat 26 Jul 2025 at 02:11 PM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React, { useMemo } from 'react';
|
|
9
|
-
import { useThemeContext } from "../ThemeProvider.js";
|
|
10
|
-
import { DarkTheme, LightTheme } from "../themes.js";
|
|
11
|
-
export const useTheme = override => {
|
|
12
|
-
const {
|
|
13
|
-
theme: contextTheme,
|
|
14
|
-
isDarkMode,
|
|
15
|
-
setThemeOverride
|
|
16
|
-
} = useThemeContext();
|
|
17
|
-
const isOverrideDark = override?.dark ?? contextTheme.dark ?? isDarkMode;
|
|
18
|
-
const baseTheme = useMemo(() => {
|
|
19
|
-
return isOverrideDark ? DarkTheme : LightTheme;
|
|
20
|
-
}, [isOverrideDark]);
|
|
21
|
-
const finalTheme = useMemo(() => {
|
|
22
|
-
return {
|
|
23
|
-
...baseTheme,
|
|
24
|
-
...override,
|
|
25
|
-
dark: isOverrideDark,
|
|
26
|
-
colors: {
|
|
27
|
-
...baseTheme.colors,
|
|
28
|
-
...(override?.colors ?? {})
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}, [baseTheme, override, isOverrideDark]);
|
|
32
|
-
|
|
33
|
-
// 🔄 Push override only once (optional)
|
|
34
|
-
React.useEffect(() => {
|
|
35
|
-
if (override) {
|
|
36
|
-
setThemeOverride(override);
|
|
37
|
-
} else {
|
|
38
|
-
setThemeOverride(undefined);
|
|
39
|
-
}
|
|
40
|
-
}, [override, setThemeOverride]);
|
|
41
|
-
return useMemo(() => ({
|
|
42
|
-
theme: finalTheme
|
|
43
|
-
}), [finalTheme]);
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=useTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useThemeContext","DarkTheme","LightTheme","useTheme","override","theme","contextTheme","isDarkMode","setThemeOverride","isOverrideDark","dark","baseTheme","finalTheme","colors","useEffect","undefined"],"sourceRoot":"../../../../src","sources":["theme/hook/useTheme.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,qBAAkB;AAClD,SAASC,SAAS,EAAEC,UAAU,QAAoC,cAAW;AAE7E,OAAO,MAAMC,QAAQ,GAAIC,QAA4B,IAAwB;EAC3E,MAAM;IACJC,KAAK,EAAEC,YAAY;IACnBC,UAAU;IACVC;EACF,CAAC,GAAGR,eAAe,CAAC,CAAC;EAErB,MAAMS,cAAc,GAAGL,QAAQ,EAAEM,IAAI,IAAIJ,YAAY,CAACI,IAAI,IAAIH,UAAU;EAExE,MAAMI,SAAS,GAAGZ,OAAO,CAAC,MAAM;IAC9B,OAAOU,cAAc,GAAGR,SAAS,GAAGC,UAAU;EAChD,CAAC,EAAE,CAACO,cAAc,CAAC,CAAC;EAEpB,MAAMG,UAAU,GAAGb,OAAO,CAAS,MAAM;IACvC,OAAO;MACL,GAAGY,SAAS;MACZ,GAAGP,QAAQ;MACXM,IAAI,EAAED,cAAc;MACpBI,MAAM,EAAE;QACN,GAAGF,SAAS,CAACE,MAAM;QACnB,IAAIT,QAAQ,EAAES,MAAM,IAAI,CAAC,CAAC;MAC5B;IACF,CAAC;EACH,CAAC,EAAE,CAACF,SAAS,EAAEP,QAAQ,EAAEK,cAAc,CAAC,CAAC;;EAEzC;EACAX,KAAK,CAACgB,SAAS,CAAC,MAAM;IACpB,IAAIV,QAAQ,EAAE;MACZI,gBAAgB,CAACJ,QAAQ,CAAC;IAC5B,CAAC,MAAM;MACLI,gBAAgB,CAACO,SAAS,CAAC;IAC7B;EACF,CAAC,EAAE,CAACX,QAAQ,EAAEI,gBAAgB,CAAC,CAAC;EAEhC,OAAOT,OAAO,CAAC,OAAO;IAAEM,KAAK,EAAEO;EAAW,CAAC,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;AAC7D,CAAC","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Tue 29 Jul 2025 at 05:37 PM
|
|
4
|
-
*/
|
|
5
|
-
type UseSplashCacheSyncOptions = {
|
|
6
|
-
logoUrl?: string;
|
|
7
|
-
backgroundUrl?: string;
|
|
8
|
-
forceDownload?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const useInitSplashCacheSync: ({ logoUrl, backgroundUrl, forceDownload, }: UseSplashCacheSyncOptions) => {
|
|
11
|
-
state: {
|
|
12
|
-
isReady: boolean;
|
|
13
|
-
error: Error | null;
|
|
14
|
-
};
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
data: {
|
|
17
|
-
localPathLogo: string | null;
|
|
18
|
-
localPathBackground: string | null;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=useInitSplashCacheSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInitSplashCacheSync.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInitSplashCacheSync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2FH,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,4CAIpC,yBAAyB;;;eAGT,KAAK,GAAG,IAAI;;;;;;;CAkE9B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Sat 26 Jul 2025 at 02:11 PM
|
|
4
|
-
*/
|
|
5
|
-
import { type AppTheme, type ITheme } from '../themes';
|
|
6
|
-
export declare const useTheme: (override?: Partial<AppTheme>) => {
|
|
7
|
-
theme: ITheme;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../../src/theme/hook/useTheme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAyB,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAE9E,eAAO,MAAM,QAAQ,GAAI,WAAW,OAAO,CAAC,QAAQ,CAAC,KAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAmCtE,CAAC"}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Tue 29 Jul 2025 at 05:37 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 mmkvStorage = new MMKV();
|
|
13
|
-
const inFlightDownloadsMap = new Map<string, Promise<string | null>>();
|
|
14
|
-
|
|
15
|
-
const SUPPORTED_FILE_TYPES = [
|
|
16
|
-
'json',
|
|
17
|
-
'mp4',
|
|
18
|
-
'jpg',
|
|
19
|
-
'jpeg',
|
|
20
|
-
'png',
|
|
21
|
-
'webp',
|
|
22
|
-
] as const;
|
|
23
|
-
|
|
24
|
-
const extractFileExtension = (url: string): string => {
|
|
25
|
-
try {
|
|
26
|
-
const cleanUrl = url.split('?')[0];
|
|
27
|
-
const ext =
|
|
28
|
-
cleanUrl?.substring(cleanUrl.lastIndexOf('.') + 1).toLowerCase() || '';
|
|
29
|
-
return SUPPORTED_FILE_TYPES.includes(
|
|
30
|
-
ext as (typeof SUPPORTED_FILE_TYPES)[number]
|
|
31
|
-
)
|
|
32
|
-
? ext
|
|
33
|
-
: 'png';
|
|
34
|
-
} catch {
|
|
35
|
-
return 'png';
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const cacheSplashAsset = async (
|
|
40
|
-
url: string,
|
|
41
|
-
extension: string,
|
|
42
|
-
mmkvKey: string,
|
|
43
|
-
forceDownload: boolean
|
|
44
|
-
): Promise<string | null> => {
|
|
45
|
-
if (!url?.trim()) return null;
|
|
46
|
-
|
|
47
|
-
const ext = extension.replace(/^\./, '').trim() || 'mp4';
|
|
48
|
-
const hash = CryptoJS.MD5(`${url}|${mmkvKey}|${ext}`).toString();
|
|
49
|
-
const localPath = `${RNFS?.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
50
|
-
|
|
51
|
-
if (inFlightDownloadsMap.has(hash)) {
|
|
52
|
-
return inFlightDownloadsMap.get(hash)!;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const downloadTask = (async () => {
|
|
56
|
-
try {
|
|
57
|
-
const previousHash = mmkvStorage.getString(mmkvKey);
|
|
58
|
-
|
|
59
|
-
if (previousHash && previousHash !== hash) {
|
|
60
|
-
const oldPath = `${RNFS?.CachesDirectoryPath}/splash_${previousHash}.${ext}`;
|
|
61
|
-
const exists = await RNFS?.exists(oldPath);
|
|
62
|
-
if (exists) {
|
|
63
|
-
await RNFS?.unlink(oldPath).catch(() => {});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (!forceDownload) {
|
|
68
|
-
const exists = await RNFS?.exists(localPath);
|
|
69
|
-
if (exists && previousHash === hash) {
|
|
70
|
-
return localPath;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const { statusCode } = await RNFS?.downloadFile({
|
|
75
|
-
fromUrl: url,
|
|
76
|
-
toFile: localPath,
|
|
77
|
-
cacheable: true,
|
|
78
|
-
readTimeout: 15000,
|
|
79
|
-
connectionTimeout: 10000,
|
|
80
|
-
}).promise;
|
|
81
|
-
|
|
82
|
-
if (statusCode === 200) {
|
|
83
|
-
mmkvStorage.set(mmkvKey, hash);
|
|
84
|
-
return localPath;
|
|
85
|
-
}
|
|
86
|
-
} catch {}
|
|
87
|
-
|
|
88
|
-
return null;
|
|
89
|
-
})();
|
|
90
|
-
|
|
91
|
-
inFlightDownloadsMap.set(hash, downloadTask);
|
|
92
|
-
return downloadTask;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
type UseSplashCacheSyncOptions = {
|
|
96
|
-
logoUrl?: string;
|
|
97
|
-
backgroundUrl?: string;
|
|
98
|
-
forceDownload?: boolean;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const useInitSplashCacheSync = ({
|
|
102
|
-
logoUrl,
|
|
103
|
-
backgroundUrl,
|
|
104
|
-
forceDownload = false,
|
|
105
|
-
}: UseSplashCacheSyncOptions) => {
|
|
106
|
-
const [splashSyncState, setSplashSyncState] = useState({
|
|
107
|
-
isReady: false,
|
|
108
|
-
error: null as Error | null,
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
const setSplashLogoPath = useSplashStore((s) => s.setLogoPath);
|
|
112
|
-
const setSplashBackgroundPath = useSplashStore((s) => s.setBackdropPath);
|
|
113
|
-
|
|
114
|
-
useEffect(() => {
|
|
115
|
-
let isMounted = true;
|
|
116
|
-
|
|
117
|
-
const syncSplashAssets = async () => {
|
|
118
|
-
try {
|
|
119
|
-
const [logoPath, backgroundPath] = await Promise.all([
|
|
120
|
-
logoUrl
|
|
121
|
-
? cacheSplashAsset(
|
|
122
|
-
logoUrl,
|
|
123
|
-
extractFileExtension(logoUrl),
|
|
124
|
-
'splash_logo',
|
|
125
|
-
forceDownload
|
|
126
|
-
)
|
|
127
|
-
: Promise.resolve(null),
|
|
128
|
-
backgroundUrl
|
|
129
|
-
? cacheSplashAsset(
|
|
130
|
-
backgroundUrl,
|
|
131
|
-
extractFileExtension(backgroundUrl),
|
|
132
|
-
'splash_background',
|
|
133
|
-
forceDownload
|
|
134
|
-
)
|
|
135
|
-
: Promise.resolve(null),
|
|
136
|
-
]);
|
|
137
|
-
|
|
138
|
-
if (!isMounted) return;
|
|
139
|
-
|
|
140
|
-
if (logoPath) setSplashLogoPath?.(logoPath);
|
|
141
|
-
if (backgroundPath) setSplashBackgroundPath?.(backgroundPath);
|
|
142
|
-
|
|
143
|
-
setSplashSyncState({ isReady: true, error: null });
|
|
144
|
-
} catch (err) {
|
|
145
|
-
if (isMounted) {
|
|
146
|
-
setSplashSyncState({ isReady: true, error: err as Error });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
syncSplashAssets();
|
|
152
|
-
return () => {
|
|
153
|
-
isMounted = false;
|
|
154
|
-
};
|
|
155
|
-
}, [
|
|
156
|
-
logoUrl,
|
|
157
|
-
backgroundUrl,
|
|
158
|
-
forceDownload,
|
|
159
|
-
setSplashLogoPath,
|
|
160
|
-
setSplashBackgroundPath,
|
|
161
|
-
]);
|
|
162
|
-
|
|
163
|
-
const splashLogoLocalPath = useSplashStore((s) => s.logo.localPath);
|
|
164
|
-
const splashBackgroundLocalPath = useSplashStore((s) => s.backdrop.localPath);
|
|
165
|
-
|
|
166
|
-
return {
|
|
167
|
-
state: splashSyncState,
|
|
168
|
-
isLoading: !splashSyncState.isReady && !splashSyncState.error,
|
|
169
|
-
data: {
|
|
170
|
-
localPathLogo: splashLogoLocalPath,
|
|
171
|
-
localPathBackground: splashBackgroundLocalPath,
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Sat 26 Jul 2025 at 02:11 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo } from 'react';
|
|
7
|
-
import { useThemeContext } from '../ThemeProvider';
|
|
8
|
-
import { DarkTheme, LightTheme, type AppTheme, type ITheme } from '../themes';
|
|
9
|
-
|
|
10
|
-
export const useTheme = (override?: Partial<AppTheme>): { theme: ITheme } => {
|
|
11
|
-
const {
|
|
12
|
-
theme: contextTheme,
|
|
13
|
-
isDarkMode,
|
|
14
|
-
setThemeOverride,
|
|
15
|
-
} = useThemeContext();
|
|
16
|
-
|
|
17
|
-
const isOverrideDark = override?.dark ?? contextTheme.dark ?? isDarkMode;
|
|
18
|
-
|
|
19
|
-
const baseTheme = useMemo(() => {
|
|
20
|
-
return isOverrideDark ? DarkTheme : LightTheme;
|
|
21
|
-
}, [isOverrideDark]);
|
|
22
|
-
|
|
23
|
-
const finalTheme = useMemo<ITheme>(() => {
|
|
24
|
-
return {
|
|
25
|
-
...baseTheme,
|
|
26
|
-
...override,
|
|
27
|
-
dark: isOverrideDark,
|
|
28
|
-
colors: {
|
|
29
|
-
...baseTheme.colors,
|
|
30
|
-
...(override?.colors ?? {}),
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}, [baseTheme, override, isOverrideDark]);
|
|
34
|
-
|
|
35
|
-
// 🔄 Push override only once (optional)
|
|
36
|
-
React.useEffect(() => {
|
|
37
|
-
if (override) {
|
|
38
|
-
setThemeOverride(override);
|
|
39
|
-
} else {
|
|
40
|
-
setThemeOverride(undefined);
|
|
41
|
-
}
|
|
42
|
-
}, [override, setThemeOverride]);
|
|
43
|
-
|
|
44
|
-
return useMemo(() => ({ theme: finalTheme }), [finalTheme]);
|
|
45
|
-
};
|