@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Pressable","Edit3","SkeletonPlaceholder","moderateScale","scale","verticalScale","UserAvatar","Text","
|
|
1
|
+
{"version":3,"names":["React","View","Pressable","Edit3","SkeletonPlaceholder","moderateScale","scale","verticalScale","UserAvatar","Text","useInternalTheme","RFValue","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","UserSection","userInfo","isLoading","renderUserInfo","theme","avatarComponent","skeletonProps","userInfoTextStyle","appliedTheme","style","styles","userInfoContainer","children","backgroundColor","colors","skeletonBaseColor","highlightColor","skeletonHighlightColor","borderRadius","skeletonWrapper","skeletonAvatar","skeletonName","skeletonEmail","avatarWrapper","avatarUri","onEditPress","onPress","editButton","borderColor","primary","surfaceVariant","shadowColor","surface","android_ripple","color","surfaceDisabled","size","name","userName","onBackground","nameStyle","emailOrPhone","userEmail","emailStyle","alignItems","justifyContent","paddingVertical","height","position","bottom","right","padding","width","overflow","borderWidth","elevation","shadowOffset","shadowOpacity","shadowRadius","editLabel","fontSize","marginTop","fontWeight","lineHeight","marginBottom","opacity"],"sourceRoot":"../../../../../src","sources":["components/User/components/UserSection.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,SAAS,QAAwC,cAAc;AAC9E,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,O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dhamu
|
|
5
|
+
* @lastModified Wed 22 Oct 2025 at 11:22 AM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
|
+
import { StatusBar, Platform } from 'react-native';
|
|
10
|
+
import Color from 'color';
|
|
11
|
+
import { useInternalTheme } from "../../theme/hook/index.js";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
export const AppStatusBar = ({
|
|
14
|
+
backgroundColor,
|
|
15
|
+
barStyle,
|
|
16
|
+
translucent = true,
|
|
17
|
+
hidden = false,
|
|
18
|
+
theme: overrideTheme
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
theme
|
|
22
|
+
} = useInternalTheme(overrideTheme);
|
|
23
|
+
const resolvedBackground = useMemo(() => {
|
|
24
|
+
if (backgroundColor) return backgroundColor;
|
|
25
|
+
return theme.colors.background;
|
|
26
|
+
}, [backgroundColor, theme]);
|
|
27
|
+
|
|
28
|
+
// 🌗 Auto bar style
|
|
29
|
+
const resolvedBarStyle = useMemo(() => {
|
|
30
|
+
if (barStyle) return barStyle;
|
|
31
|
+
const isDarkBg = Color(resolvedBackground).isDark();
|
|
32
|
+
return isDarkBg ? 'light-content' : 'dark-content';
|
|
33
|
+
}, [barStyle, resolvedBackground]);
|
|
34
|
+
return /*#__PURE__*/_jsx(StatusBar, {
|
|
35
|
+
translucent: translucent,
|
|
36
|
+
hidden: hidden,
|
|
37
|
+
barStyle: resolvedBarStyle,
|
|
38
|
+
backgroundColor: Platform.OS === 'android' ? resolvedBackground : 'transparent'
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=AppStatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StatusBar","Platform","Color","useInternalTheme","jsx","_jsx","AppStatusBar","backgroundColor","barStyle","translucent","hidden","theme","overrideTheme","resolvedBackground","colors","background","resolvedBarStyle","isDarkBg","isDark","OS"],"sourceRoot":"../../../../src","sources":["components/common/AppStatusBar.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,SAAS,EAAEC,QAAQ,QAA6B,cAAc;AACvE,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,gBAAgB,QAAQ,2BAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUpD,OAAO,MAAMC,YAAyC,GAAGA,CAAC;EACxDC,eAAe;EACfC,QAAQ;EACRC,WAAW,GAAG,IAAI;EAClBC,MAAM,GAAG,KAAK;EACdC,KAAK,EAAEC;AACT,CAAC,KAAK;EACJ,MAAM;IAAED;EAAM,CAAC,GAAGR,gBAAgB,CAACS,aAAa,CAAC;EAEjD,MAAMC,kBAAkB,GAAGd,OAAO,CAAC,MAAM;IACvC,IAAIQ,eAAe,EAAE,OAAOA,eAAe;IAC3C,OAAOI,KAAK,CAACG,MAAM,CAACC,UAAU;EAChC,CAAC,EAAE,CAACR,eAAe,EAAEI,KAAK,CAAC,CAAC;;EAE5B;EACA,MAAMK,gBAAgC,GAAGjB,OAAO,CAAC,MAAM;IACrD,IAAIS,QAAQ,EAAE,OAAOA,QAAQ;IAC7B,MAAMS,QAAQ,GAAGf,KAAK,CAACW,kBAAkB,CAAC,CAACK,MAAM,CAAC,CAAC;IACnD,OAAOD,QAAQ,GAAG,eAAe,GAAG,cAAc;EACpD,CAAC,EAAE,CAACT,QAAQ,EAAEK,kBAAkB,CAAC,CAAC;EAElC,oBACER,IAAA,CAACL,SAAS;IACRS,WAAW,EAAEA,WAAY;IACzBC,MAAM,EAAEA,MAAO;IACfF,QAAQ,EAAEQ,gBAAiB;IAC3BT,eAAe,EACbN,QAAQ,CAACkB,EAAE,KAAK,SAAS,GAAGN,kBAAkB,GAAG;EAClD,CACF,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
5
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
6
|
-
import {
|
|
6
|
+
import { useInternalTheme } from "../../theme/hook/useInternalTheme.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export const SafeAreaWrapper = ({
|
|
9
9
|
children,
|
|
@@ -14,7 +14,7 @@ export const SafeAreaWrapper = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
16
|
theme: appliedTheme
|
|
17
|
-
} =
|
|
17
|
+
} = useInternalTheme(theme);
|
|
18
18
|
const containerStyle = useMemo(() => {
|
|
19
19
|
return [styles.container, {
|
|
20
20
|
backgroundColor: appliedTheme?.colors?.background || fallbackBackground
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","StyleSheet","SafeAreaView","
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","SafeAreaView","useInternalTheme","jsx","_jsx","SafeAreaWrapper","children","style","theme","edges","fallbackBackground","appliedTheme","containerStyle","styles","container","backgroundColor","colors","background","create","flex"],"sourceRoot":"../../../../src","sources":["components/layout/SafeAreaWrapper.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,UAAU,QAAwB,cAAc;AACzD,SAASC,YAAY,QAAQ,gCAAgC;AAE7D,SAASC,gBAAgB,QAAQ,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUrE,OAAO,MAAMC,eAA+C,GAAGA,CAAC;EAC9DC,QAAQ;EACRC,KAAK;EACLC,KAAK;EACLC,KAAK,GAAG,CAAC,KAAK,CAAC;EACfC,kBAAkB,GAAG;AACvB,CAAC,KAAK;EACJ,MAAM;IAAEF,KAAK,EAAEG;EAAa,CAAC,GAAGT,gBAAgB,CAACM,KAAK,CAAC;EAEvD,MAAMI,cAAc,GAAGb,OAAO,CAAC,MAAM;IACnC,OAAO,CACLc,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEJ,YAAY,EAAEK,MAAM,EAAEC,UAAU,IAAIP;IACvD,CAAC,EACDH,KAAK,CACN;EACH,CAAC,EAAE,CAACI,YAAY,CAACK,MAAM,CAACC,UAAU,EAAEP,kBAAkB,EAAEH,KAAK,CAAC,CAAC;EAE/D,oBACEH,IAAA,CAACH,YAAY;IAACQ,KAAK,EAAEA,KAAM;IAACF,KAAK,EAAEK,cAAe;IAAAN,QAAA,EAC/CA;EAAQ,CACG,CAAC;AAEnB,CAAC;AAED,MAAMO,MAAM,GAAGb,UAAU,CAACkB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author Naresh
|
|
5
|
+
* @lastModified Fri 17 Oct 2025 at 09:55 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 storage = new MMKV();
|
|
14
|
+
const activeDownloads = new Map();
|
|
15
|
+
const SUPPORTED_EXTENSIONS = ['json', 'mp4', 'jpg', 'jpeg', 'png', 'webp'];
|
|
16
|
+
const getFileExtension = url => {
|
|
17
|
+
try {
|
|
18
|
+
const cleanUrl = url.split('?')[0];
|
|
19
|
+
const ext = cleanUrl?.substring(cleanUrl?.lastIndexOf('.') + 1).toLowerCase();
|
|
20
|
+
return SUPPORTED_EXTENSIONS.includes(ext) ? ext : 'png';
|
|
21
|
+
} catch {
|
|
22
|
+
return 'png';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const downloadAndCacheAsset = async (url, extension, cacheKey, force) => {
|
|
26
|
+
if (!url?.trim()) return null;
|
|
27
|
+
const ext = extension.replace(/^\./, '') || 'png';
|
|
28
|
+
const hash = CryptoJS.MD5(`${url}|${cacheKey}|${ext}`).toString();
|
|
29
|
+
const localFile = `${RNFS.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
30
|
+
if (activeDownloads.has(hash)) {
|
|
31
|
+
return activeDownloads.get(hash);
|
|
32
|
+
}
|
|
33
|
+
const task = (async () => {
|
|
34
|
+
try {
|
|
35
|
+
const savedHash = storage.getString(cacheKey);
|
|
36
|
+
if (savedHash && savedHash !== hash) {
|
|
37
|
+
const oldFile = `${RNFS.CachesDirectoryPath}/splash_${savedHash}.${ext}`;
|
|
38
|
+
if (await RNFS.exists(oldFile)) {
|
|
39
|
+
await RNFS.unlink(oldFile).catch(() => {});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!force) {
|
|
43
|
+
const exists = await RNFS.exists(localFile);
|
|
44
|
+
if (exists && savedHash === hash) {
|
|
45
|
+
return localFile;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const {
|
|
49
|
+
statusCode
|
|
50
|
+
} = await RNFS.downloadFile({
|
|
51
|
+
fromUrl: url,
|
|
52
|
+
toFile: localFile,
|
|
53
|
+
cacheable: true,
|
|
54
|
+
readTimeout: 15000,
|
|
55
|
+
connectionTimeout: 10000
|
|
56
|
+
}).promise;
|
|
57
|
+
if (statusCode === 200) {
|
|
58
|
+
storage.set(cacheKey, hash);
|
|
59
|
+
return localFile;
|
|
60
|
+
}
|
|
61
|
+
} catch {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
})();
|
|
66
|
+
activeDownloads.set(hash, task);
|
|
67
|
+
return task;
|
|
68
|
+
};
|
|
69
|
+
export const useSplashCache = ({
|
|
70
|
+
logoUrl,
|
|
71
|
+
backgroundUrl,
|
|
72
|
+
forceDownload = false
|
|
73
|
+
}) => {
|
|
74
|
+
const [state, setState] = useState({
|
|
75
|
+
isReady: false,
|
|
76
|
+
error: null
|
|
77
|
+
});
|
|
78
|
+
const setLogo = useSplashStore(s => s.setLogoPath);
|
|
79
|
+
const setBackground = useSplashStore(s => s.setBackdropPath);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
let mounted = true;
|
|
82
|
+
const syncAssets = async () => {
|
|
83
|
+
try {
|
|
84
|
+
const [logoPath, bgPath] = await Promise.all([logoUrl ? downloadAndCacheAsset(logoUrl, getFileExtension(logoUrl), 'splash_logo', forceDownload) : Promise.resolve(null), backgroundUrl ? downloadAndCacheAsset(backgroundUrl, getFileExtension(backgroundUrl), 'splash_background', forceDownload) : Promise.resolve(null)]);
|
|
85
|
+
if (!mounted) return;
|
|
86
|
+
if (logoPath) setLogo?.(logoPath);
|
|
87
|
+
if (bgPath) setBackground?.(bgPath);
|
|
88
|
+
setState({
|
|
89
|
+
isReady: true,
|
|
90
|
+
error: null
|
|
91
|
+
});
|
|
92
|
+
} catch (err) {
|
|
93
|
+
if (mounted) {
|
|
94
|
+
setState({
|
|
95
|
+
isReady: true,
|
|
96
|
+
error: err
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
syncAssets();
|
|
102
|
+
return () => {
|
|
103
|
+
mounted = false;
|
|
104
|
+
};
|
|
105
|
+
}, [logoUrl, backgroundUrl, forceDownload, setLogo, setBackground]);
|
|
106
|
+
const logoPath = useSplashStore(s => s.logo.localPath);
|
|
107
|
+
const bgPath = useSplashStore(s => s.backdrop.localPath);
|
|
108
|
+
return {
|
|
109
|
+
state,
|
|
110
|
+
isLoading: !state.isReady && !state.error,
|
|
111
|
+
data: {
|
|
112
|
+
logoPath,
|
|
113
|
+
backgroundPath: bgPath
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=useSplashCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","RNFS","CryptoJS","MMKV","useSplashStore","storage","activeDownloads","Map","SUPPORTED_EXTENSIONS","getFileExtension","url","cleanUrl","split","ext","substring","lastIndexOf","toLowerCase","includes","downloadAndCacheAsset","extension","cacheKey","force","trim","replace","hash","MD5","toString","localFile","CachesDirectoryPath","has","get","task","savedHash","getString","oldFile","exists","unlink","catch","statusCode","downloadFile","fromUrl","toFile","cacheable","readTimeout","connectionTimeout","promise","set","useSplashCache","logoUrl","backgroundUrl","forceDownload","state","setState","isReady","error","setLogo","s","setLogoPath","setBackground","setBackdropPath","mounted","syncAssets","logoPath","bgPath","Promise","all","resolve","err","logo","localPath","backdrop","isLoading","data","backgroundPath"],"sourceRoot":"../../../src","sources":["hooks/useSplashCache.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,OAAO,GAAG,IAAIF,IAAI,CAAC,CAAC;AAC1B,MAAMG,eAAe,GAAG,IAAIC,GAAG,CAAiC,CAAC;AAEjE,MAAMC,oBAAoB,GAAG,CAC3B,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,KAAK,EACL,MAAM,CACE;AAEV,MAAMC,gBAAgB,GAAIC,GAAW,IAAa;EAChD,IAAI;IACF,MAAMC,QAAQ,GAAGD,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClC,MAAMC,GAAG,GAAGF,QAAQ,EAChBG,SAAS,CAACH,QAAQ,EAAEI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAC1CC,WAAW,CAAC,CAAC;IAChB,OAAOR,oBAAoB,CAACS,QAAQ,CAACJ,GAAU,CAAC,GAAIA,GAAG,GAAc,KA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JSONStorage","MMKV","mmkv","useRecentSearchesStore","set","get","recentSearches","pillMaxCount","isLoading","addSearchTerm","term","limit","trimmed","trim","maxCount","current","updated","filter","t","slice","removeSearchTerm","state","clearSearches","setPillMaxCount","count","name","storage","getItem","getString","setItem","value","removeItem","delete","partialize","onRehydrateStorage","hasData","length","setTimeout","setState"
|
|
1
|
+
{"version":3,"names":["create","persist","createJSONStorage","MMKV","mmkv","useRecentSearchesStore","set","get","recentSearches","pillMaxCount","isLoading","addSearchTerm","term","limit","trimmed","trim","maxCount","current","updated","filter","t","slice","removeSearchTerm","state","clearSearches","setPillMaxCount","count","name","storage","getItem","getString","setItem","value","removeItem","delete","partialize","onRehydrateStorage","hasData","length","setTimeout","setState"],"sourceRoot":"../../../src","sources":["store/RecentSearchesStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,oBAAoB;AAC/D,SAASC,IAAI,QAAQ,mBAAmB;AAExC,MAAMC,IAAI,GAAG,IAAID,IAAI,CAAC,CAAC;;AAEvB;;AAWA,OAAO,MAAME,sBAAsB,GAAGL,MAAM,CAAsB,CAAC,CACjEC,OAAO,CACL,CAACK,GAAG,EAAEC,GAAG,MAAM;EACbC,cAAc,EAAE,EAAE;EAClBC,YAAY,EAAE,EAAE;EAChBC,SAAS,EAAE,IAAI;EAEfC,aAAa,EAAEA,CAACC,IAAI,EAAEC,KAAK,KAAK;IAC9B,MAAMC,OAAO,GAAGF,IAAI,CAACG,IAAI,CAAC,CAAC;IAC3B,IAAI,CAACD,OAAO,EAAE;IAEd,MAAME,QAAQ,GAAGH,KAAK,IAAIN,GAAG,CAAC,CAAC,CAACE,YAAY;IAC5C,MAAMQ,OAAO,GAAGV,GAAG,CAAC,CAAC,CAACC,cAAc;IACpC,MAAMU,OAAO,GAAG,CACdJ,OAAO,EACP,GAAGG,OAAO,CAACE,MAAM,CAAEC,CAAC,IAAKA,C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;QACflC,sBAAsB,CAACmC,QAAQ,CAAC;UAAE9B,SAAS,EAAE;QAAM,CAAC,CAAC;MACvD,CAAC,EAAE,EAAE,CAAC;IACR,CAAC,MAAM;MACLL,sBAAsB,CAACmC,QAAQ,CAAC;QAAE9B,SAAS,EAAE;MAAM,CAAC,CAAC;IACvD;EACF;AACF,CACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -7,10 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { create } from 'zustand';
|
|
9
9
|
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
10
|
-
import { MMKV } from 'react-native-mmkv';
|
|
11
|
-
|
|
12
|
-
const mmkv = new MMKV(); // Initialize MMKV instance
|
|
13
|
-
|
|
10
|
+
import { MMKV } from 'react-native-mmkv';
|
|
11
|
+
const mmkv = new MMKV();
|
|
14
12
|
export const useSplashStore = create()(persist(set => ({
|
|
15
13
|
logo: {
|
|
16
14
|
localPath: null,
|
|
@@ -50,10 +48,8 @@ export const useSplashStore = create()(persist(set => ({
|
|
|
50
48
|
name: 'splash-storage',
|
|
51
49
|
storage: createJSONStorage(() => ({
|
|
52
50
|
getItem: name => mmkv.getString(name) || null,
|
|
53
|
-
// Updated to use MMKV getString
|
|
54
51
|
setItem: (name, value) => mmkv.set(name, value),
|
|
55
|
-
|
|
56
|
-
removeItem: name => mmkv.delete(name) // Updated to use MMKV delete
|
|
52
|
+
removeItem: name => mmkv.delete(name)
|
|
57
53
|
})),
|
|
58
54
|
partialize: state => ({
|
|
59
55
|
logo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","persist","createJSONStorage","MMKV","mmkv","useSplashStore","set","logo","localPath","lastUpdated","backdrop","setLogoPath","path","state","Date","now","clearLogoPath","setBackdropPath","clearBackdropPath","name","storage","getItem","getString","setItem","value","removeItem","delete","partialize"],"sourceRoot":"../../../src","sources":["store/splashStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,oBAAoB;AAC/D,SAASC,IAAI,QAAQ,mBAAmB,
|
|
1
|
+
{"version":3,"names":["create","persist","createJSONStorage","MMKV","mmkv","useSplashStore","set","logo","localPath","lastUpdated","backdrop","setLogoPath","path","state","Date","now","clearLogoPath","setBackdropPath","clearBackdropPath","name","storage","getItem","getString","setItem","value","removeItem","delete","partialize"],"sourceRoot":"../../../src","sources":["store/splashStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,oBAAoB;AAC/D,SAASC,IAAI,QAAQ,mBAAmB;AAExC,MAAMC,IAAI,GAAG,IAAID,IAAI,CAAC,CAAC;AAgBvB,OAAO,MAAME,cAAc,GAAGL,MAAM,CAAc,CAAC,CACjDC,OAAO,CACJK,GAAG,KAAM;EACRC,IAAI,EAAE;IACJC,SAAS,EAAE,IAAI;IACfC,WAAW,EAAE;EACf,CAAC;EACDC,QAAQ,EAAE;IACRF,SAAS,EAAE,IAAI;IACfC,WAAW,EAAE;EACf,CAAC;EAEDE,WAAW,EAAGC,IAAI,IAChBN,GAAG,CAAEO,KAAK,KAAM;IACdN,IAAI,EAAE;MACJ,GAAGM,KAAK,CAACN,IAAI;MACbC,SAAS,EAAEI,IAAI;MACfH,WAAW,EAAEK,IAAI,CAACC,GAAG,CAAC;IACxB;EACF,CAAC,CAAC,CAAC;EAELC,aAAa,EAAEA,CAAA,KACbV,GAAG,CAAC,OAAO;IACTC,IAAI,EAAE;MACJC,SAAS,EAAE,IAAI;MACfC,WAAW,EAAE;IACf;EACF,CAAC,CAAC,CAAC;EAELQ,eAAe,EAAGL,IAAI,IACpBN,GAAG,CAAEO,KAAK,KAAM;IACdH,QAAQ,EAAE;MACR,GAAGG,KAAK,CAACH,QAAQ;MACjBF,SAAS,EAAEI,IAAI;MACfH,WAAW,EAAEK,IAAI,CAACC,GAAG,CAAC;IACxB;EACF,CAAC,CAAC,CAAC;EAELG,iBAAiB,EAAEA,CAAA,KACjBZ,GAAG,CAAC,OAAO;IACTI,QAAQ,EAAE;MACRF,SAAS,EAAE,IAAI;MACfC,WAAW,EAAE;IACf;EACF,CAAC,CAAC;AACN,CAAC,CAAC,EACF;EACEU,IAAI,EAAE,gBAAgB;EACtBC,OAAO,EAAElB,iBAAiB,CAAC,OAAO;IAChCmB,OAAO,EAAGF,IAAI,IAAKf,IAAI,CAACkB,SAAS,CAACH,IAAI,CAAC,IAAI,IAAI;IAC/CI,OAAO,EAAEA,CAACJ,IAAI,EAAEK,KAAK,KAAKpB,IAAI,CAACE,GAAG,CAACa,IAAI,EAAEK,KAAK,CAAC;IAC/CC,UAAU,EAAGN,IAAI,IAAKf,IAAI,CAACsB,MAAM,CAACP,IAAI;EACxC,CAAC,CAAC,CAAC;EACHQ,UAAU,EAAGd,KAAK,KAAM;IACtBN,IAAI,EAAE;MACJC,SAAS,EAAEK,KAAK,CAACN,IAAI,CAACC,SAAS;MAC/BC,WAAW,EAAEI,KAAK,CAACN,IAAI,CAACE;IAC1B,CAAC;IACDC,QAAQ,EAAE;MACRF,SAAS,EAAEK,KAAK,CAACH,QAAQ,CAACF,SAAS;MACnCC,WAAW,EAAEI,KAAK,CAACH,QAAQ,CAACD;IAC9B;EACF,CAAC;AACH,CACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { Appearance } from 'react-native';
|
|
5
|
+
import { MMKV } from 'react-native-mmkv';
|
|
6
|
+
const storage = new MMKV({
|
|
7
|
+
id: 'theme_store'
|
|
8
|
+
});
|
|
9
|
+
const getInitialIsDarkMode = () => {
|
|
10
|
+
const storedMode = storage.getString('themeMode');
|
|
11
|
+
if (storedMode === 'dark') return true;
|
|
12
|
+
if (storedMode === 'light') return false;
|
|
13
|
+
return Appearance.getColorScheme() === 'dark';
|
|
14
|
+
};
|
|
15
|
+
export const useInternalThemeStore = create(set => ({
|
|
16
|
+
isDarkMode: getInitialIsDarkMode(),
|
|
17
|
+
setTheme: mode => {
|
|
18
|
+
let isDark;
|
|
19
|
+
if (mode === 'dark') {
|
|
20
|
+
isDark = true;
|
|
21
|
+
} else if (mode === 'light') {
|
|
22
|
+
isDark = false;
|
|
23
|
+
} else {
|
|
24
|
+
const systemColorScheme = Appearance.getColorScheme();
|
|
25
|
+
isDark = systemColorScheme === 'dark';
|
|
26
|
+
}
|
|
27
|
+
storage.set('themeMode', mode);
|
|
28
|
+
set({
|
|
29
|
+
isDarkMode: isDark
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
Appearance.addChangeListener(() => {
|
|
34
|
+
const storedMode = storage.getString('themeMode');
|
|
35
|
+
if (!storedMode || storedMode === 'system') {
|
|
36
|
+
useInternalThemeStore.getState().setTheme('system');
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=themeStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["create","Appearance","MMKV","storage","id","getInitialIsDarkMode","storedMode","getString","getColorScheme","useInternalThemeStore","set","isDarkMode","setTheme","mode","isDark","systemColorScheme","addChangeListener","getState"],"sourceRoot":"../../../src","sources":["store/themeStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,UAAU,QAA8B,cAAc;AAC/D,SAASC,IAAI,QAAQ,mBAAmB;AAExC,MAAMC,OAAO,GAAG,IAAID,IAAI,CAAC;EAAEE,EAAE,EAAE;AAAc,CAAC,CAAC;AAO/C,MAAMC,oBAAoB,GAAGA,CAAA,KAAe;EAC1C,MAAMC,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAC,WAAW,CAIxC;EACR,IAAID,UAAU,KAAK,MAAM,EAAE,OAAO,IAAI;EACtC,IAAIA,UAAU,KAAK,OAAO,EAAE,OAAO,KAAK;EACxC,OAAOL,UAAU,CAACO,cAAc,CAAC,CAAC,KAAK,MAAM;AAC/C,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAAGT,MAAM,CAAcU,GAAG,KAAM;EAChEC,UAAU,EAAEN,oBAAoB,CAAC,CAAC;EAElCO,QAAQ,EAAGC,IAAI,IAAK;IAClB,IAAIC,MAAe;IAEnB,IAAID,IAAI,KAAK,MAAM,EAAE;MACnBC,MAAM,GAAG,IAAI;IACf,CAAC,MAAM,IAAID,IAAI,KAAK,OAAO,EAAE;MAC3BC,MAAM,GAAG,KAAK;IAChB,CAAC,MAAM;MACL,MAAMC,iBAAkC,GAAGd,UAAU,CAACO,cAAc,CAAC,CAAC;MACtEM,MAAM,GAAGC,iBAAiB,KAAK,MAAM;IACvC;IAEAZ,OAAO,CAACO,GAAG,CAAC,WAAW,EAAEG,IAAI,CAAC;IAE9BH,GAAG,CAAC;MAAEC,UAAU,EAAEG;IAAO,CAAC,CAAC;EAC7B;AACF,CAAC,CAAC,CAAC;AAEHb,UAAU,CAACe,iBAAiB,CAAC,MAAM;EACjC,MAAMV,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAC,WAAW,CAIxC;EACR,IAAI,CAACD,UAAU,IAAIA,UAAU,KAAK,QAAQ,EAAE;IAC1CG,qBAAqB,CAACQ,QAAQ,CAAC,CAAC,CAACL,QAAQ,CAAC,QAAQ,CAAC;EACrD;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,93 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified
|
|
5
|
+
* @lastModified Wed 22 Oct 2025 at 11:29 AM
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
import
|
|
7
|
+
|
|
8
|
+
import React, { createContext, useContext } from 'react';
|
|
9
|
+
import { View } from 'react-native';
|
|
9
10
|
import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';
|
|
10
|
-
import { LightTheme, DarkTheme } from "./themes.js";
|
|
11
11
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
12
|
-
import {
|
|
12
|
+
import { AppStatusBar } from "../components/common/AppStatusBar.js";
|
|
13
|
+
import { useInternalTheme } from "./hook/useInternalTheme.js";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
const ThemeContext = /*#__PURE__*/createContext(null);
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom hook to access ZezoUI theme context.
|
|
19
|
+
*/
|
|
20
|
+
export const useTheme = () => {
|
|
15
21
|
const ctx = useContext(ThemeContext);
|
|
16
|
-
if (!ctx)
|
|
22
|
+
if (!ctx) {
|
|
23
|
+
throw new Error('useTheme must be used within ZezoUIProvider');
|
|
24
|
+
}
|
|
17
25
|
return ctx;
|
|
18
26
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
27
|
+
/**
|
|
28
|
+
* ZezoUIProvider — Wraps your app with theming, safe area, and gesture support.
|
|
29
|
+
*/
|
|
23
30
|
export const ZezoUIProvider = ({
|
|
24
31
|
children,
|
|
25
|
-
theme,
|
|
26
|
-
|
|
32
|
+
theme: overrideTheme,
|
|
33
|
+
isDark
|
|
27
34
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// ✅ Sync prop to state if changed externally
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (theme) {
|
|
34
|
-
setOverrideTheme(theme);
|
|
35
|
-
}
|
|
36
|
-
}, [theme]);
|
|
37
|
-
|
|
38
|
-
// ✅ This prioritizes externally passed theme.dark
|
|
39
|
-
const isDarkMode = useMemo(() => {
|
|
40
|
-
if (theme?.dark !== undefined) return theme.dark;
|
|
41
|
-
return getIsDarkMode(autoSwitchTheme, colorScheme || 'dark', overrideTheme?.dark);
|
|
42
|
-
}, [theme?.dark, autoSwitchTheme, colorScheme, overrideTheme?.dark]);
|
|
43
|
-
const baseTheme = useMemo(() => isDarkMode ? DarkTheme : LightTheme, [isDarkMode]);
|
|
44
|
-
const mergedTheme = useMemo(() => {
|
|
45
|
-
return {
|
|
46
|
-
...baseTheme,
|
|
47
|
-
...overrideTheme,
|
|
48
|
-
dark: isDarkMode,
|
|
49
|
-
colors: {
|
|
50
|
-
...baseTheme.colors,
|
|
51
|
-
...(overrideTheme?.colors ?? {})
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}, [baseTheme, overrideTheme, isDarkMode]);
|
|
55
|
-
const toggleTheme = useCallback(() => {
|
|
56
|
-
if (autoSwitchTheme || theme?.dark !== undefined) return;
|
|
57
|
-
setOverrideTheme(prev => ({
|
|
58
|
-
...prev,
|
|
59
|
-
dark: !getIsDarkMode(false, null, prev?.dark)
|
|
60
|
-
}));
|
|
61
|
-
}, [autoSwitchTheme, theme?.dark]);
|
|
62
|
-
const setThemeOverride = useCallback(override => {
|
|
63
|
-
setOverrideTheme(override);
|
|
64
|
-
}, []);
|
|
65
|
-
|
|
66
|
-
// ✅ Update StatusBar only when required
|
|
67
|
-
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
StatusBar.setBarStyle(isDarkMode ? 'light-content' : 'dark-content', true);
|
|
70
|
-
if (Platform.OS === 'android') {
|
|
71
|
-
StatusBar.setBackgroundColor(mergedTheme.colors.background, true);
|
|
72
|
-
}
|
|
73
|
-
}, [isDarkMode, mergedTheme.colors.background]);
|
|
74
|
-
const contextValue = useMemo(() => ({
|
|
75
|
-
theme: mergedTheme,
|
|
35
|
+
const {
|
|
36
|
+
theme: finalTheme,
|
|
76
37
|
isDarkMode,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
38
|
+
setTheme,
|
|
39
|
+
themeFull
|
|
40
|
+
} = useInternalTheme(overrideTheme, isDark);
|
|
80
41
|
return /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
42
|
+
style: {
|
|
43
|
+
flex: 1
|
|
44
|
+
},
|
|
81
45
|
children: /*#__PURE__*/_jsx(SafeAreaProvider, {
|
|
82
46
|
initialMetrics: initialWindowMetrics,
|
|
83
|
-
children: /*#__PURE__*/
|
|
84
|
-
value:
|
|
85
|
-
|
|
47
|
+
children: /*#__PURE__*/_jsxs(ThemeContext.Provider, {
|
|
48
|
+
value: {
|
|
49
|
+
theme: themeFull,
|
|
50
|
+
isDarkMode,
|
|
51
|
+
setTheme,
|
|
52
|
+
finalTheme
|
|
53
|
+
},
|
|
54
|
+
children: [/*#__PURE__*/_jsx(AppStatusBar, {
|
|
55
|
+
theme: overrideTheme
|
|
56
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
86
57
|
style: {
|
|
87
58
|
flex: 1,
|
|
88
|
-
backgroundColor:
|
|
59
|
+
backgroundColor: finalTheme.colors.background
|
|
89
60
|
},
|
|
90
61
|
children: children
|
|
91
|
-
})
|
|
62
|
+
})]
|
|
92
63
|
})
|
|
93
64
|
})
|
|
94
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","View","SafeAreaProvider","initialWindowMetrics","GestureHandlerRootView","AppStatusBar","useInternalTheme","jsx","_jsx","jsxs","_jsxs","ThemeContext","useTheme","ctx","Error","ZezoUIProvider","children","theme","overrideTheme","isDark","finalTheme","isDarkMode","setTheme","themeFull","style","flex","initialMetrics","Provider","value","backgroundColor","colors","background"],"sourceRoot":"../../../src","sources":["theme/ThemeProvider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAwB,OAAO;AACxE,SAASC,IAAI,QAAQ,cAAc;AACnC,SACEC,gBAAgB,EAChBC,oBAAoB,QACf,gCAAgC;AACvC,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,YAAY,QAAQ,sCAAmC;AAEhE,SAASC,gBAAgB,QAAQ,4B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
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["theme/hook/index.ts"],"mappings":";;AAAA,cAAc,uBAAoB;AAClC,cAAc,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author Naresh Dhamu
|
|
5
|
+
* @lastModified Sun 19 Oct 2025 at 08:29 PM
|
|
6
|
+
*/
|
|
7
|
+
import { useMemo, useEffect } from 'react';
|
|
8
|
+
import { DarkTheme, LightTheme } from "../themes.js";
|
|
9
|
+
import { useInternalThemeStore } from "../../store/themeStore.js";
|
|
10
|
+
export const useInternalTheme = (override, isDark) => {
|
|
11
|
+
const {
|
|
12
|
+
isDarkMode: storeDarkMode,
|
|
13
|
+
setTheme
|
|
14
|
+
} = useInternalThemeStore();
|
|
15
|
+
const isDarkMode = isDark !== undefined ? isDark : storeDarkMode;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (isDark !== undefined) {
|
|
18
|
+
setTheme(isDark ? 'dark' : 'light');
|
|
19
|
+
}
|
|
20
|
+
}, [isDark, setTheme]);
|
|
21
|
+
const selectedOverride = useMemo(() => {
|
|
22
|
+
if (!override) return {};
|
|
23
|
+
const colors = isDarkMode ? override.dark : override.light;
|
|
24
|
+
return colors ?? {};
|
|
25
|
+
}, [override, isDarkMode]);
|
|
26
|
+
const baseTheme = useMemo(() => isDarkMode ? DarkTheme : LightTheme, [isDarkMode]);
|
|
27
|
+
const finalTheme = useMemo(() => {
|
|
28
|
+
return {
|
|
29
|
+
...baseTheme,
|
|
30
|
+
colors: {
|
|
31
|
+
...baseTheme.colors,
|
|
32
|
+
...selectedOverride
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}, [baseTheme, selectedOverride]);
|
|
36
|
+
return useMemo(() => ({
|
|
37
|
+
theme: finalTheme,
|
|
38
|
+
isDarkMode,
|
|
39
|
+
setTheme,
|
|
40
|
+
themeFull: {
|
|
41
|
+
light: override?.light ?? LightTheme.colors,
|
|
42
|
+
dark: override?.dark ?? DarkTheme.colors
|
|
43
|
+
}
|
|
44
|
+
}), [finalTheme, isDarkMode, override?.dark, override?.light, setTheme]);
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=useInternalTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useEffect","DarkTheme","LightTheme","useInternalThemeStore","useInternalTheme","override","isDark","isDarkMode","storeDarkMode","setTheme","undefined","selectedOverride","colors","dark","light","baseTheme","finalTheme","theme","themeFull"],"sourceRoot":"../../../../src","sources":["theme/hook/useInternalTheme.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,SAAS,QAAQ,OAAO;AAC1C,SACEC,SAAS,EACTC,UAAU,QAIL,cAAW;AAClB,SAASC,qBAAqB,QAAQ,2BAAwB;AAE9D,OAAO,MAAMC,gBAAgB,GAAGA,CAC9BC,QAAwB,EACxBC,MAAgB,KACW;EAC3B,MAAM;IAAEC,UAAU,EAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGN,qBAAqB,CAAC,CAAC;EAEvE,MAAMI,UAAU,GAAGD,MAAM,KAAKI,SAAS,GAAGJ,MAAM,GAAGE,aAAa;EAEhER,SAAS,CAAC,MAAM;IACd,IAAIM,MAAM,KAAKI,SAAS,EAAE;MACxBD,QAAQ,CAACH,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC;EACF,CAAC,EAAE,CAACA,MAAM,EAAEG,QAAQ,CAAC,CAAC;EAEtB,MAAME,gBAAgB,GAAGZ,OAAO,CAAC,MAAM;IACrC,IAAI,CAACM,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxB,MAAMO,MAAM,GAAGL,UAAU,GAAGF,QAAQ,CAACQ,IAAI,GAAGR,QAAQ,CAACS,KAAK;IAC1D,OAAOF,MAAM,IAAI,CAAC,CAAC;EACrB,CAAC,EAAE,CAACP,QAAQ,EAAEE,UAAU,CAAC,CAAC;EAC1B,MAAMQ,SAAS,GAAGhB,OAAO,CACvB,MAAOQ,UAAU,GAAGN,SAAS,GAAGC,UAAW,EAC3C,CAACK,UAAU,CACb,CAAC;EAED,MAAMS,UAAU,GAAGjB,OAAO,CAAS,MAAM;IACvC,OAAO;MACL,GAAGgB,SAAS;MACZH,MAAM,EAAE;QACN,GAAGG,SAAS,CAACH,MAAM;QACnB,GAAGD;MACL;IACF,CAAC;EACH,CAAC,EAAE,CAACI,SAAS,EAAEJ,gBAAgB,CAAC,CAAC;EAEjC,OAAOZ,OAAO,CACZ,OAAO;IACLkB,KAAK,EAAED,UAAU;IACjBT,UAAU;IACVE,QAAQ;IACRS,SAAS,EAAE;MACTJ,KAAK,EAAGT,QAAQ,EAAES,KAAK,IAAyBZ,UAAU,CAACU,MAAM;MACjEC,IAAI,EAAGR,QAAQ,EAAEQ,IAAI,IAAyBZ,SAAS,CAACW;IAC1D;EACF,CAAC,CAAC,EACF,CAACI,UAAU,EAAET,UAAU,EAAEF,QAAQ,EAAEQ,IAAI,EAAER,QAAQ,EAAES,KAAK,EAAEL,QAAQ,CACpE,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author Naresh Dhamu
|
|
5
|
+
* @lastModified Wed 22 Oct 2025 at 10:29 AM
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Automatically syncs StatusBar color & style with current theme.
|
|
9
|
+
*/
|
|
10
|
+
import { useEffect } from 'react';
|
|
11
|
+
import { StatusBar, Platform } from 'react-native';
|
|
12
|
+
import Color from 'color';
|
|
13
|
+
export const useThemeStatusBar = ({
|
|
14
|
+
theme,
|
|
15
|
+
backgroundColor,
|
|
16
|
+
barStyle
|
|
17
|
+
}) => {
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const bgColor = backgroundColor ?? theme.colors.background;
|
|
20
|
+
const contentStyle = barStyle ?? (Color(bgColor).isDark() ? 'light-content' : 'dark-content');
|
|
21
|
+
StatusBar.setBarStyle(contentStyle, true);
|
|
22
|
+
if (Platform.OS === 'android') {
|
|
23
|
+
StatusBar.setBackgroundColor(bgColor, true);
|
|
24
|
+
}
|
|
25
|
+
}, [theme, backgroundColor, barStyle]);
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useThemeStatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","StatusBar","Platform","Color","useThemeStatusBar","theme","backgroundColor","barStyle","bgColor","colors","background","contentStyle","isDark","setBarStyle","OS","setBackgroundColor"],"sourceRoot":"../../../../src","sources":["theme/hook/useThemeStatusBar.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,SAAS,EAAEC,QAAQ,QAA6B,cAAc;AACvE,OAAOC,KAAK,MAAM,OAAO;AASzB,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,KAAK;EACLC,eAAe;EACfC;AACwB,CAAC,KAAK;EAC9BP,SAAS,CAAC,MAAM;IACd,MAAMQ,OAAO,GAAGF,eAAe,IAAID,KAAK,CAACI,MAAM,CAACC,UAAU;IAC1D,MAAMC,YAA4B,GAChCJ,QAAQ,KAAKJ,KAAK,CAACK,OAAO,CAAC,CAACI,MAAM,CAAC,CAAC,GAAG,eAAe,GAAG,cAAc,CAAC;IAC1EX,SAAS,CAACY,WAAW,CAACF,YAAY,EAAE,IAAI,CAAC;IACzC,IAAIT,QAAQ,CAACY,EAAE,KAAK,SAAS,EAAE;MAC7Bb,SAAS,CAACc,kBAAkB,CAACP,OAAO,EAAE,IAAI,CAAC;IAC7C;EACF,CAAC,EAAE,CAACH,KAAK,EAAEC,eAAe,EAAEC,QAAQ,CAAC,CAAC;AACxC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,cAAc,oBAAiB;AAC/B,cAAc,aAAU","ignoreList":[]}
|