@zezosoft/zezo-ott-react-native-ui-kit 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/module/components/Account/Account.js +7 -6
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +39 -27
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +39 -25
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +34 -25
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +61 -42
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +41 -26
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +132 -0
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +61 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -0
- package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.js +8 -17
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
- package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.js +25 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
- package/lib/module/components/Auth/index.js +3 -1
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +77 -57
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +28 -9
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/Button/BackBtn.js +1 -1
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/MenuBtn.js +5 -3
- package/lib/module/components/Button/MenuBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +3 -2
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +3 -2
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +3 -2
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +10 -7
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +6 -4
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +3 -2
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +7 -6
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +9 -7
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +33 -70
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +6 -5
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +7 -5
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +6 -5
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +10 -12
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +8 -6
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +17 -9
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/NavigateToMore.js +4 -3
- package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -1
- package/lib/module/components/Content/Card/components/NoContentFallback.js +5 -4
- package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +2 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Content.js +21 -7
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +1 -1
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +8 -6
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +211 -0
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -0
- package/lib/module/components/ContentView/components/AboutSection.js +5 -4
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +5 -4
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +23 -3
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +2 -1
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +14 -5
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +4 -3
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/index.js +1 -0
- package/lib/module/components/ContentView/index.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +20 -25
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/One.js +1 -1
- package/lib/module/components/Headers/Three.js +5 -3
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +5 -3
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +6 -4
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Input/InputTwo.js +5 -4
- package/lib/module/components/Input/InputTwo.js.map +1 -1
- package/lib/module/components/Input/PhoneNumberInput.js +12 -11
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
- package/lib/module/components/Keyboard/HideKeyboard.js +40 -12
- package/lib/module/components/Keyboard/HideKeyboard.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +2 -1
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Search/One.js +6 -4
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/RecentSearchesSection.js +10 -9
- package/lib/module/components/Search/components/RecentSearchesSection.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +6 -5
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +5 -4
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +16 -15
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/TabBar/One.js +5 -3
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +18 -14
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +4 -2
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/Text/Text.js +4 -4
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +7 -6
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +6 -7
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +12 -9
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +1 -1
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +5 -4
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/SafeAreaWrapper.js +12 -11
- package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -1
- package/lib/module/hooks/useInitSplashCacheSync.js +67 -63
- package/lib/module/hooks/useInitSplashCacheSync.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -9
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +10 -3
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +55 -52
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useTheme.js +45 -0
- package/lib/module/theme/hook/useTheme.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/themes.js +1 -1
- package/lib/typescript/src/components/Account/Account.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts +9 -6
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts +6 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts +6 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +7 -3
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts +6 -2
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +34 -0
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashImage/SplashImage.d.ts +2 -3
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.d.ts +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.d.ts +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/index.d.ts +49 -11
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +5 -4
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +1 -0
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/MenuBtn.d.ts +1 -8
- package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +1 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts +27 -0
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/index.d.ts +1 -0
- package/lib/typescript/src/components/ContentView/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +1 -0
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +1 -0
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts +1 -1
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/RecentSearchesSection.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/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.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +0 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts +2 -4
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +1 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/theme/ThemeProvider.d.ts +8 -4
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useTheme.d.ts +9 -0
- package/lib/typescript/src/theme/hook/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +1 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +7 -3
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/Account/Account.tsx +7 -6
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +51 -32
- package/src/components/Auth/Login/LoginWithEmail.tsx +45 -26
- package/src/components/Auth/Login/LoginWithPhone.tsx +38 -24
- package/src/components/Auth/OTP/OTP.tsx +96 -61
- package/src/components/Auth/SignUp/SignUp.tsx +49 -31
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +166 -0
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +66 -0
- package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.tsx +7 -19
- package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.tsx +23 -14
- package/src/components/Auth/index.ts +3 -1
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +72 -50
- package/src/components/BlogView/BlogView.tsx +29 -9
- package/src/components/Button/BackBtn.tsx +1 -1
- package/src/components/Button/MenuBtn.tsx +6 -9
- package/src/components/Button/PrimaryBtn.tsx +3 -2
- package/src/components/Button/TextButton.tsx +3 -2
- package/src/components/Content/Card/Category/Category.tsx +3 -2
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +15 -8
- package/src/components/Content/Card/Sliders/Styles/One.tsx +4 -3
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +3 -2
- package/src/components/Content/Card/Sliders/index.ts +1 -1
- package/src/components/Content/Card/Styles/Five.tsx +7 -6
- package/src/components/Content/Card/Styles/Four.tsx +7 -6
- package/src/components/Content/Card/Styles/One.tsx +44 -111
- package/src/components/Content/Card/Styles/RotateInOut.tsx +5 -5
- package/src/components/Content/Card/Styles/Six.tsx +7 -5
- package/src/components/Content/Card/Styles/Three.tsx +5 -5
- package/src/components/Content/Card/Styles/TopTen.tsx +10 -14
- package/src/components/Content/Card/Styles/Two.tsx +9 -7
- package/src/components/Content/Card/components/CardPoster.tsx +24 -11
- package/src/components/Content/Card/components/NavigateToMore.tsx +4 -3
- package/src/components/Content/Card/components/NoContentFallback.tsx +5 -4
- package/src/components/Content/Card/components/ThumbnailCard.tsx +2 -1
- package/src/components/Content/Content.tsx +38 -7
- package/src/components/Content/Sections.tsx +1 -1
- package/src/components/ContentView/ContentView.tsx +6 -6
- package/src/components/ContentView/MoreContentList.tsx +238 -0
- package/src/components/ContentView/components/AboutSection.tsx +5 -4
- package/src/components/ContentView/components/CastCard.tsx +5 -4
- package/src/components/ContentView/components/EpisodeCard.tsx +30 -4
- package/src/components/ContentView/components/GenreTags.tsx +2 -1
- package/src/components/ContentView/components/HeroBanner.tsx +10 -6
- package/src/components/ContentView/components/Title.tsx +4 -3
- package/src/components/ContentView/index.ts +1 -0
- package/src/components/Headers/AppHeader.tsx +20 -34
- package/src/components/Headers/One.tsx +1 -1
- package/src/components/Headers/Three.tsx +4 -3
- package/src/components/Headers/Two.tsx +4 -3
- package/src/components/Input/InputOne.tsx +6 -4
- package/src/components/Input/InputTwo.tsx +5 -4
- package/src/components/Input/PhoneNumberInput.tsx +12 -11
- package/src/components/Keyboard/HideKeyboard.tsx +41 -15
- package/src/components/Logo/Logo.tsx +2 -1
- package/src/components/Search/One.tsx +6 -5
- package/src/components/Search/components/RecentSearchesSection.tsx +10 -9
- package/src/components/Search/components/SearchCard.tsx +6 -5
- package/src/components/Settings/AppSettings.tsx +14 -13
- package/src/components/Subscription/SubOne.tsx +16 -15
- package/src/components/TabBar/One.tsx +6 -3
- package/src/components/TabBar/Three.tsx +28 -14
- package/src/components/TabBar/Two.tsx +4 -2
- package/src/components/Text/Text.tsx +4 -4
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +7 -6
- package/src/components/User/WatchHistory/WatchHistory.tsx +5 -7
- package/src/components/User/WatchLater/WatchLater.tsx +12 -9
- package/src/components/User/components/UserAvatar.tsx +1 -1
- package/src/components/User/components/UserSection.tsx +5 -4
- package/src/components/index.ts +0 -1
- package/src/components/layout/SafeAreaWrapper.tsx +16 -9
- package/src/hooks/useInitSplashCacheSync.ts +74 -87
- package/src/hooks/useKeyboard.ts +9 -8
- package/src/hooks/usePaginatedSection.ts +7 -3
- package/src/theme/ThemeProvider.tsx +59 -55
- package/src/theme/hook/useTheme.ts +41 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/themes.ts +1 -1
- package/src/types/content/content-view.types.ts +4 -2
- package/lib/module/components/SplashScreen/SplashScreen.js +0 -109
- package/lib/module/components/SplashScreen/SplashScreen.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js +0 -68
- package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashLottie/SplashLottie.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashVideo/SplashVideo.js.map +0 -1
- package/lib/module/components/SplashScreen/index.js +0 -9
- package/lib/module/components/SplashScreen/index.js.map +0 -1
- package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts +0 -32
- package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashImage/SplashImage.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/index.d.ts +0 -6
- package/lib/typescript/src/components/SplashScreen/index.d.ts.map +0 -1
- package/src/components/SplashScreen/SplashScreen.tsx +0 -131
- package/src/components/SplashScreen/components/SplashImage/SplashImage.tsx +0 -84
- package/src/components/SplashScreen/index.ts +0 -6
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @author
|
|
3
|
-
* @lastModified
|
|
2
|
+
* @author Naresh Desai
|
|
3
|
+
* @lastModified Sat 26 Jul 2025 at 12:37 PM
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { View, Pressable, StyleSheet, Platform } from 'react-native';
|
|
7
7
|
import { BlurView } from '@react-native-community/blur';
|
|
8
8
|
import { createBottomTabNavigator, type BottomTabBarProps } from '@react-navigation/bottom-tabs';
|
|
9
9
|
import { scale } from 'react-native-size-matters';
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import type { AppTheme, ITheme } from '../../theme/themes';
|
|
12
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
12
13
|
|
|
13
14
|
export interface ITab {
|
|
14
15
|
key: string;
|
|
@@ -39,7 +40,15 @@ const CustomTabBar: React.FC<
|
|
|
39
40
|
}
|
|
40
41
|
> = ({ state, navigation, tabs, onTabPress, theme }) => (
|
|
41
42
|
<View style={styles.bottomWrapper}>
|
|
42
|
-
<View
|
|
43
|
+
<View
|
|
44
|
+
style={[
|
|
45
|
+
styles.bottomBox,
|
|
46
|
+
{
|
|
47
|
+
borderColor: theme.colors.border,
|
|
48
|
+
backgroundColor: Platform.OS === 'android' ? theme.colors.backdrop : 'transparent'
|
|
49
|
+
}
|
|
50
|
+
]}
|
|
51
|
+
>
|
|
43
52
|
{Platform.OS !== 'web' && (
|
|
44
53
|
<BlurView
|
|
45
54
|
style={StyleSheet.absoluteFill}
|
|
@@ -53,7 +62,8 @@ const CustomTabBar: React.FC<
|
|
|
53
62
|
const isFocused = state.index === index;
|
|
54
63
|
const iconColor = isFocused ? theme.colors.buttonText : theme.colors.textPrimary;
|
|
55
64
|
const bgColor = isFocused ? theme.colors.button : theme.colors.blueBackground;
|
|
56
|
-
const
|
|
65
|
+
const isBorderColor = isFocused ? theme.colors.button : theme.colors.border;
|
|
66
|
+
|
|
57
67
|
return (
|
|
58
68
|
<Pressable
|
|
59
69
|
key={tab.key}
|
|
@@ -65,7 +75,7 @@ const CustomTabBar: React.FC<
|
|
|
65
75
|
styles.icon,
|
|
66
76
|
{
|
|
67
77
|
backgroundColor: bgColor,
|
|
68
|
-
borderColor:
|
|
78
|
+
borderColor: isBorderColor
|
|
69
79
|
}
|
|
70
80
|
]}
|
|
71
81
|
>
|
|
@@ -87,7 +97,10 @@ const TabBarThree: React.FC<TabBarThreeProps> = ({ tabs, theme, onTabPress }) =>
|
|
|
87
97
|
const { theme: appliedTheme } = useTheme(theme);
|
|
88
98
|
|
|
89
99
|
return (
|
|
90
|
-
<Tab.Navigator
|
|
100
|
+
<Tab.Navigator
|
|
101
|
+
screenOptions={{ headerShown: false, tabBarShowLabel: false, tabBarHideOnKeyboard: true }}
|
|
102
|
+
tabBar={renderTabBar(tabs, onTabPress, appliedTheme)}
|
|
103
|
+
>
|
|
91
104
|
{tabs.map((tab) => (
|
|
92
105
|
<Tab.Screen key={tab.key} name={tab.key} component={tab.screenComponent} />
|
|
93
106
|
))}
|
|
@@ -97,18 +110,19 @@ const TabBarThree: React.FC<TabBarThreeProps> = ({ tabs, theme, onTabPress }) =>
|
|
|
97
110
|
|
|
98
111
|
const styles = StyleSheet.create({
|
|
99
112
|
bottomWrapper: {
|
|
100
|
-
width: '100%',
|
|
101
|
-
paddingHorizontal: scale(16),
|
|
102
113
|
position: 'absolute',
|
|
103
|
-
bottom: scale(20)
|
|
114
|
+
bottom: scale(20),
|
|
115
|
+
left: 0,
|
|
116
|
+
right: 0,
|
|
117
|
+
alignItems: 'center'
|
|
104
118
|
},
|
|
105
119
|
bottomBox: {
|
|
106
|
-
|
|
120
|
+
marginHorizontal: scale(16),
|
|
121
|
+
alignSelf: 'center',
|
|
107
122
|
height: BOTTOM_BAR_HEIGHT,
|
|
108
|
-
borderRadius: scale(
|
|
123
|
+
borderRadius: scale(BOTTOM_BAR_HEIGHT / 2),
|
|
109
124
|
overflow: 'hidden',
|
|
110
125
|
borderWidth: Platform.select({ ios: scale(1), android: scale(1.5) }),
|
|
111
|
-
backgroundColor: 'transparent',
|
|
112
126
|
alignItems: 'center',
|
|
113
127
|
justifyContent: 'center'
|
|
114
128
|
},
|
|
@@ -117,7 +131,7 @@ const styles = StyleSheet.create({
|
|
|
117
131
|
justifyContent: 'space-between',
|
|
118
132
|
alignItems: 'center',
|
|
119
133
|
width: '100%',
|
|
120
|
-
paddingHorizontal: scale(
|
|
134
|
+
paddingHorizontal: scale(12)
|
|
121
135
|
},
|
|
122
136
|
icon: {
|
|
123
137
|
width: ICON_BOX_SIZE,
|
|
@@ -6,9 +6,10 @@ import React, { useState } from 'react';
|
|
|
6
6
|
import { View, Pressable, StyleSheet, Platform } from 'react-native';
|
|
7
7
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
8
8
|
import { scale } from 'react-native-size-matters';
|
|
9
|
-
import { useTheme } from '@zezosoft/zezo-ott-react-native-ui-kit';
|
|
10
9
|
import { Text } from '../Text';
|
|
11
10
|
import type { AppTheme, ITheme } from '../../theme/themes';
|
|
11
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
12
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
12
13
|
|
|
13
14
|
export type ITab = {
|
|
14
15
|
key: string;
|
|
@@ -83,6 +84,7 @@ const TabBarTwo = ({ tabs, theme, onTabPress }: TabBarTwoProps) => {
|
|
|
83
84
|
screenOptions={{
|
|
84
85
|
headerShown: false,
|
|
85
86
|
tabBarShowLabel: false,
|
|
87
|
+
tabBarHideOnKeyboard: true,
|
|
86
88
|
tabBarStyle: {
|
|
87
89
|
position: 'absolute',
|
|
88
90
|
bottom: scale(20),
|
|
@@ -145,7 +147,7 @@ const styles = StyleSheet.create({
|
|
|
145
147
|
},
|
|
146
148
|
label: {
|
|
147
149
|
marginTop: scale(4),
|
|
148
|
-
fontSize:
|
|
150
|
+
fontSize: RFValue(10),
|
|
149
151
|
textAlign: 'center'
|
|
150
152
|
}
|
|
151
153
|
});
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { Text as RNText, type TextProps as RNTextProps, type TextStyle } from 'react-native';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
9
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
10
10
|
|
|
11
11
|
export interface TextProps extends RNTextProps {
|
|
12
12
|
children: React.ReactNode;
|
|
@@ -21,7 +21,7 @@ export interface TextProps extends RNTextProps {
|
|
|
21
21
|
|
|
22
22
|
const Text: React.FC<TextProps> = ({
|
|
23
23
|
children,
|
|
24
|
-
size =
|
|
24
|
+
size = 10,
|
|
25
25
|
color,
|
|
26
26
|
weight = '500',
|
|
27
27
|
align = 'left',
|
|
@@ -41,7 +41,7 @@ const Text: React.FC<TextProps> = ({
|
|
|
41
41
|
style={[
|
|
42
42
|
{
|
|
43
43
|
color: color ?? theme.colors.textPrimary,
|
|
44
|
-
fontSize:
|
|
44
|
+
fontSize: RFValue(size),
|
|
45
45
|
fontWeight: weight,
|
|
46
46
|
textAlign: align,
|
|
47
47
|
fontFamily
|
|
@@ -7,10 +7,11 @@ import React from 'react';
|
|
|
7
7
|
import { View, StyleSheet, FlatList, TouchableOpacity, type StyleProp, type ViewStyle, Alert } from 'react-native';
|
|
8
8
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
9
9
|
import { Text } from '../../Text';
|
|
10
|
-
import { useTheme } from '../../../theme';
|
|
10
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
11
11
|
import AppHeader from '../../Headers/AppHeader';
|
|
12
12
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
13
13
|
import type { AppTheme } from '../../../theme/themes';
|
|
14
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
14
15
|
|
|
15
16
|
type IUserLocation = {
|
|
16
17
|
country: string | null;
|
|
@@ -318,13 +319,13 @@ const styles = StyleSheet.create({
|
|
|
318
319
|
marginBottom: scale(4)
|
|
319
320
|
},
|
|
320
321
|
deviceName: {
|
|
321
|
-
fontSize:
|
|
322
|
+
fontSize: RFValue(12),
|
|
322
323
|
fontWeight: '600',
|
|
323
324
|
flexShrink: 1,
|
|
324
325
|
maxWidth: '80%'
|
|
325
326
|
},
|
|
326
327
|
deviceMeta: {
|
|
327
|
-
fontSize:
|
|
328
|
+
fontSize: RFValue(9),
|
|
328
329
|
marginTop: scale(2),
|
|
329
330
|
flexShrink: 1
|
|
330
331
|
},
|
|
@@ -337,7 +338,7 @@ const styles = StyleSheet.create({
|
|
|
337
338
|
alignItems: 'center'
|
|
338
339
|
},
|
|
339
340
|
logoutText: {
|
|
340
|
-
fontSize:
|
|
341
|
+
fontSize: RFValue(10),
|
|
341
342
|
fontWeight: '600'
|
|
342
343
|
},
|
|
343
344
|
badge: {
|
|
@@ -346,7 +347,7 @@ const styles = StyleSheet.create({
|
|
|
346
347
|
borderRadius: scale(6)
|
|
347
348
|
},
|
|
348
349
|
badgeText: {
|
|
349
|
-
fontSize:
|
|
350
|
+
fontSize: RFValue(9),
|
|
350
351
|
fontWeight: '500',
|
|
351
352
|
maxWidth: scale(100),
|
|
352
353
|
flexShrink: 1
|
|
@@ -357,7 +358,7 @@ const styles = StyleSheet.create({
|
|
|
357
358
|
justifyContent: 'center'
|
|
358
359
|
},
|
|
359
360
|
emptyText: {
|
|
360
|
-
fontSize:
|
|
361
|
+
fontSize: RFValue(11),
|
|
361
362
|
textAlign: 'center'
|
|
362
363
|
},
|
|
363
364
|
skeletonLine: {
|
|
@@ -9,13 +9,14 @@ import { FlatGrid } from 'react-native-super-grid';
|
|
|
9
9
|
import { scale } from 'react-native-size-matters';
|
|
10
10
|
import { Search } from 'lucide-react-native';
|
|
11
11
|
|
|
12
|
-
import { useTheme } from '../../../theme';
|
|
12
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
13
13
|
|
|
14
14
|
import AppHeader from '../../Headers/AppHeader';
|
|
15
15
|
import { Text } from '../../Text';
|
|
16
16
|
import CardPoster from '../../Content/Card/components/CardPoster';
|
|
17
17
|
import type { IContentData } from '../../../types';
|
|
18
18
|
import type { AppTheme } from '../../../theme/themes';
|
|
19
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
19
20
|
|
|
20
21
|
export interface IHistoryItem {
|
|
21
22
|
_id: string;
|
|
@@ -119,7 +120,6 @@ export const WatchHistory: React.FC<WatchHistoryProps> = ({
|
|
|
119
120
|
titleAlign="left"
|
|
120
121
|
theme={appliedTheme}
|
|
121
122
|
titleStyle={{
|
|
122
|
-
...styles.title,
|
|
123
123
|
color: appliedTheme.colors.onBackground
|
|
124
124
|
}}
|
|
125
125
|
onRightPress={onSearchPress}
|
|
@@ -134,7 +134,7 @@ export const WatchHistory: React.FC<WatchHistoryProps> = ({
|
|
|
134
134
|
data={listData}
|
|
135
135
|
keyExtractor={(item, index) => item._id || `item-${index}`}
|
|
136
136
|
style={listStyle}
|
|
137
|
-
contentContainerStyle={contentContainerStyle}
|
|
137
|
+
contentContainerStyle={[contentContainerStyle, { paddingBottom: scale(50) }]}
|
|
138
138
|
renderItem={renderGridItem}
|
|
139
139
|
onEndReached={onEndReached}
|
|
140
140
|
onEndReachedThreshold={onEndReachedThreshold ?? 0.5}
|
|
@@ -154,16 +154,14 @@ const styles = StyleSheet.create({
|
|
|
154
154
|
container: {
|
|
155
155
|
flex: 1
|
|
156
156
|
},
|
|
157
|
-
|
|
158
|
-
fontSize: scale(15)
|
|
159
|
-
},
|
|
157
|
+
|
|
160
158
|
noData: {
|
|
161
159
|
flex: 1,
|
|
162
160
|
alignItems: 'center',
|
|
163
161
|
justifyContent: 'center'
|
|
164
162
|
},
|
|
165
163
|
noDataText: {
|
|
166
|
-
fontSize:
|
|
164
|
+
fontSize: RFValue(12),
|
|
167
165
|
opacity: 0.5
|
|
168
166
|
}
|
|
169
167
|
});
|
|
@@ -19,7 +19,7 @@ import { scale } from 'react-native-size-matters';
|
|
|
19
19
|
import { Search } from 'lucide-react-native';
|
|
20
20
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
21
21
|
|
|
22
|
-
import { useTheme } from '../../../theme';
|
|
22
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
23
23
|
|
|
24
24
|
import AppHeader from '../../Headers/AppHeader';
|
|
25
25
|
import { Text } from '../../Text';
|
|
@@ -27,6 +27,7 @@ import { ThumbnailCard } from '../../Content/Card/components/ThumbnailCard';
|
|
|
27
27
|
import CardPoster from '../../Content/Card/components/CardPoster';
|
|
28
28
|
import type { IContentData } from '../../../types';
|
|
29
29
|
import type { AppTheme, ITheme } from '../../../theme/themes';
|
|
30
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
30
31
|
|
|
31
32
|
type IWatchLaterItem = {
|
|
32
33
|
_id: string;
|
|
@@ -158,7 +159,7 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
|
|
|
158
159
|
<Text numberOfLines={1} style={styles.detailedTitle}>
|
|
159
160
|
{item?.content?.name}
|
|
160
161
|
</Text>
|
|
161
|
-
<Text numberOfLines={
|
|
162
|
+
<Text numberOfLines={5} style={[styles.detailedDesc, { color: appliedTheme.colors.textSecondary }]}>
|
|
162
163
|
{item?.content?.description}
|
|
163
164
|
</Text>
|
|
164
165
|
</View>
|
|
@@ -239,14 +240,14 @@ const styles = StyleSheet.create({
|
|
|
239
240
|
justifyContent: 'center'
|
|
240
241
|
},
|
|
241
242
|
noDataText: {
|
|
242
|
-
fontSize:
|
|
243
|
+
fontSize: RFValue(13),
|
|
243
244
|
opacity: 0.5
|
|
244
245
|
},
|
|
245
246
|
contentContainerFlatStyle: {
|
|
246
|
-
paddingBottom: scale(
|
|
247
|
+
paddingBottom: scale(50)
|
|
247
248
|
},
|
|
248
249
|
thumbnailWrapper: {
|
|
249
|
-
width: scale(
|
|
250
|
+
width: scale(150),
|
|
250
251
|
aspectRatio: 16 / 9,
|
|
251
252
|
borderRadius: scale(6),
|
|
252
253
|
overflow: 'hidden',
|
|
@@ -271,14 +272,16 @@ const styles = StyleSheet.create({
|
|
|
271
272
|
},
|
|
272
273
|
detailedInfo: {
|
|
273
274
|
flex: 1,
|
|
274
|
-
marginLeft: scale(
|
|
275
|
+
marginLeft: scale(5)
|
|
275
276
|
},
|
|
276
277
|
detailedTitle: {
|
|
277
|
-
fontSize:
|
|
278
|
-
fontWeight: '
|
|
278
|
+
fontSize: RFValue(11),
|
|
279
|
+
fontWeight: '500'
|
|
279
280
|
},
|
|
280
281
|
detailedDesc: {
|
|
281
|
-
fontSize:
|
|
282
|
+
fontSize: RFValue(9),
|
|
283
|
+
textAlign: 'auto',
|
|
284
|
+
fontWeight: '400',
|
|
282
285
|
marginTop: scale(1)
|
|
283
286
|
}
|
|
284
287
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Image, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { scale } from 'react-native-size-matters';
|
|
4
|
-
import { useTheme } from '../../../theme';
|
|
4
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
5
5
|
import type { AppTheme } from '../../../theme/themes';
|
|
6
6
|
|
|
7
7
|
const fallbackAvatar = require('../../../assets/img/profile.jpg');
|
|
@@ -9,8 +9,9 @@ import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
|
9
9
|
import { moderateScale, scale, verticalScale } from 'react-native-size-matters';
|
|
10
10
|
import UserAvatar from './UserAvatar';
|
|
11
11
|
import { Text } from '../../Text';
|
|
12
|
-
import { useTheme } from '../../../theme';
|
|
12
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
13
13
|
import type { AppTheme } from '../../../theme/themes';
|
|
14
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
14
15
|
|
|
15
16
|
export interface UserInfo {
|
|
16
17
|
name: string;
|
|
@@ -143,19 +144,19 @@ const styles = {
|
|
|
143
144
|
justifyContent: 'center'
|
|
144
145
|
} as ViewStyle,
|
|
145
146
|
editLabel: {
|
|
146
|
-
fontSize:
|
|
147
|
+
fontSize: RFValue(8),
|
|
147
148
|
marginTop: verticalScale(1),
|
|
148
149
|
fontWeight: '500',
|
|
149
150
|
lineHeight: moderateScale(12)
|
|
150
151
|
} as TextStyle,
|
|
151
152
|
userName: {
|
|
152
|
-
fontSize:
|
|
153
|
+
fontSize: RFValue(15),
|
|
153
154
|
fontWeight: '600',
|
|
154
155
|
marginTop: verticalScale(10),
|
|
155
156
|
marginBottom: verticalScale(2)
|
|
156
157
|
} as TextStyle,
|
|
157
158
|
userEmail: {
|
|
158
|
-
fontSize:
|
|
159
|
+
fontSize: RFValue(13),
|
|
159
160
|
opacity: 0.7
|
|
160
161
|
} as TextStyle,
|
|
161
162
|
skeletonWrapper: {
|
package/src/components/index.ts
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Wed 25 Jun 2025 at 02:34 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
7
2
|
import { StyleSheet, type ViewStyle } from 'react-native';
|
|
8
3
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
9
|
-
import { useTheme } from '../../theme';
|
|
10
4
|
import type { AppTheme } from '../../theme/themes';
|
|
5
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
11
6
|
|
|
12
7
|
type SafeAreaWrapperProps = {
|
|
13
8
|
children: React.ReactNode;
|
|
14
9
|
style?: ViewStyle;
|
|
15
10
|
theme?: AppTheme;
|
|
11
|
+
edges?: ('top' | 'right' | 'bottom' | 'left')[];
|
|
12
|
+
fallbackBackground?: string;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
|
-
export const SafeAreaWrapper: React.FC<SafeAreaWrapperProps> = ({
|
|
15
|
+
export const SafeAreaWrapper: React.FC<SafeAreaWrapperProps> = ({
|
|
16
|
+
children,
|
|
17
|
+
style,
|
|
18
|
+
theme,
|
|
19
|
+
edges = ['top'],
|
|
20
|
+
fallbackBackground = '#fff'
|
|
21
|
+
}) => {
|
|
19
22
|
const { theme: appliedTheme } = useTheme(theme);
|
|
20
23
|
|
|
24
|
+
const containerStyle = useMemo(() => {
|
|
25
|
+
return [styles.container, { backgroundColor: appliedTheme?.colors?.background || fallbackBackground }, style];
|
|
26
|
+
}, [appliedTheme.colors.background, fallbackBackground, style]);
|
|
27
|
+
|
|
21
28
|
return (
|
|
22
|
-
<SafeAreaView
|
|
29
|
+
<SafeAreaView edges={edges} style={containerStyle}>
|
|
23
30
|
{children}
|
|
24
31
|
</SafeAreaView>
|
|
25
32
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified
|
|
3
|
+
* @lastModified Tue 29 Jul 2025 at 05:37 PM
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
@@ -9,59 +9,75 @@ import CryptoJS from 'crypto-js';
|
|
|
9
9
|
import { MMKV } from 'react-native-mmkv';
|
|
10
10
|
import { useSplashStore } from '../store/splashStore';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const mmkvStorage = new MMKV();
|
|
13
|
+
const inFlightDownloadsMap = new Map<string, Promise<string | null>>();
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const SUPPORTED_FILE_TYPES = ['json', 'mp4', 'jpg', 'jpeg', 'png', 'webp'] as const;
|
|
16
|
+
|
|
17
|
+
const extractFileExtension = (url: string): string => {
|
|
18
|
+
try {
|
|
19
|
+
const cleanUrl = url.split('?')[0];
|
|
20
|
+
const ext = cleanUrl?.substring(cleanUrl.lastIndexOf('.') + 1).toLowerCase() || '';
|
|
21
|
+
return SUPPORTED_FILE_TYPES.includes(ext as (typeof SUPPORTED_FILE_TYPES)[number]) ? ext : 'png';
|
|
22
|
+
} catch {
|
|
23
|
+
return 'png';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const cacheSplashAsset = async (
|
|
16
28
|
url: string,
|
|
17
29
|
extension: string,
|
|
18
|
-
|
|
30
|
+
mmkvKey: string,
|
|
19
31
|
forceDownload: boolean
|
|
20
32
|
): Promise<string | null> => {
|
|
21
33
|
if (!url?.trim()) return null;
|
|
22
34
|
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
35
|
+
const ext = extension.replace(/^\./, '').trim() || 'mp4';
|
|
36
|
+
const hash = CryptoJS.MD5(`${url}|${mmkvKey}|${ext}`).toString();
|
|
37
|
+
const localPath = `${RNFS.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
26
38
|
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
39
|
+
if (inFlightDownloadsMap.has(hash)) {
|
|
40
|
+
return inFlightDownloadsMap.get(hash)!;
|
|
29
41
|
}
|
|
30
42
|
|
|
31
|
-
const
|
|
32
|
-
|
|
43
|
+
const downloadTask = (async () => {
|
|
44
|
+
try {
|
|
45
|
+
const previousHash = mmkvStorage.getString(mmkvKey);
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
if (previousHash && previousHash !== hash) {
|
|
48
|
+
const oldPath = `${RNFS.CachesDirectoryPath}/splash_${previousHash}.${ext}`;
|
|
49
|
+
const exists = await RNFS.exists(oldPath);
|
|
50
|
+
if (exists) {
|
|
51
|
+
await RNFS.unlink(oldPath).catch(() => {});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
39
54
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
if (!forceDownload) {
|
|
56
|
+
const exists = await RNFS.exists(localPath);
|
|
57
|
+
if (exists && previousHash === hash) {
|
|
58
|
+
return localPath;
|
|
59
|
+
}
|
|
44
60
|
}
|
|
45
|
-
}
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
const { statusCode } = await RNFS.downloadFile({
|
|
63
|
+
fromUrl: url,
|
|
64
|
+
toFile: localPath,
|
|
65
|
+
cacheable: true,
|
|
66
|
+
readTimeout: 15000,
|
|
67
|
+
connectionTimeout: 10000
|
|
68
|
+
}).promise;
|
|
69
|
+
|
|
70
|
+
if (statusCode === 200) {
|
|
71
|
+
mmkvStorage.set(mmkvKey, hash);
|
|
72
|
+
return localPath;
|
|
73
|
+
}
|
|
74
|
+
} catch {}
|
|
59
75
|
|
|
60
76
|
return null;
|
|
61
77
|
})();
|
|
62
78
|
|
|
63
|
-
|
|
64
|
-
return
|
|
79
|
+
inFlightDownloadsMap.set(hash, downloadTask);
|
|
80
|
+
return downloadTask;
|
|
65
81
|
};
|
|
66
82
|
|
|
67
83
|
type UseSplashCacheSyncOptions = {
|
|
@@ -70,90 +86,61 @@ type UseSplashCacheSyncOptions = {
|
|
|
70
86
|
forceDownload?: boolean;
|
|
71
87
|
};
|
|
72
88
|
|
|
73
|
-
// Helper to extract extension from URL
|
|
74
|
-
const SUPPORTED_EXTENSIONS = ['json', 'mp4', 'jpg', 'jpeg', 'png', 'webp'] as const;
|
|
75
|
-
|
|
76
|
-
const extractExtensionFromUrl = (url: string): string => {
|
|
77
|
-
try {
|
|
78
|
-
const cleanUrl = url.split('?')[0];
|
|
79
|
-
const ext =
|
|
80
|
-
cleanUrl
|
|
81
|
-
?.substring(cleanUrl.lastIndexOf('.') + 1)
|
|
82
|
-
.trim()
|
|
83
|
-
.toLowerCase() || '';
|
|
84
|
-
|
|
85
|
-
return SUPPORTED_EXTENSIONS.includes(ext as any) ? ext : 'png';
|
|
86
|
-
} catch {
|
|
87
|
-
return 'png';
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
89
|
export const useInitSplashCacheSync = ({
|
|
92
90
|
logoUrl,
|
|
93
91
|
backgroundUrl,
|
|
94
92
|
forceDownload = false
|
|
95
|
-
}: UseSplashCacheSyncOptions)
|
|
96
|
-
|
|
97
|
-
isLoading: boolean;
|
|
98
|
-
data: {
|
|
99
|
-
localPathLogo: string | null;
|
|
100
|
-
localPathBackground: string | null;
|
|
101
|
-
};
|
|
102
|
-
} => {
|
|
103
|
-
const [state, setState] = useState({
|
|
93
|
+
}: UseSplashCacheSyncOptions) => {
|
|
94
|
+
const [splashSyncState, setSplashSyncState] = useState({
|
|
104
95
|
isReady: false,
|
|
105
96
|
error: null as Error | null
|
|
106
97
|
});
|
|
107
98
|
|
|
108
|
-
const
|
|
109
|
-
const
|
|
99
|
+
const setSplashLogoPath = useSplashStore((s) => s.setLogoPath);
|
|
100
|
+
const setSplashBackgroundPath = useSplashStore((s) => s.setBackdropPath);
|
|
110
101
|
|
|
111
102
|
useEffect(() => {
|
|
112
103
|
let isMounted = true;
|
|
113
104
|
|
|
114
|
-
const
|
|
105
|
+
const syncSplashAssets = async () => {
|
|
115
106
|
try {
|
|
116
|
-
const [logoPath,
|
|
107
|
+
const [logoPath, backgroundPath] = await Promise.all([
|
|
117
108
|
logoUrl
|
|
118
|
-
?
|
|
109
|
+
? cacheSplashAsset(logoUrl, extractFileExtension(logoUrl), 'splash_logo', forceDownload)
|
|
119
110
|
: Promise.resolve(null),
|
|
120
111
|
backgroundUrl
|
|
121
|
-
?
|
|
122
|
-
backgroundUrl,
|
|
123
|
-
extractExtensionFromUrl(backgroundUrl),
|
|
124
|
-
'backgroundImage',
|
|
125
|
-
forceDownload
|
|
126
|
-
)
|
|
112
|
+
? cacheSplashAsset(backgroundUrl, extractFileExtension(backgroundUrl), 'splash_background', forceDownload)
|
|
127
113
|
: Promise.resolve(null)
|
|
128
114
|
]);
|
|
129
115
|
|
|
130
116
|
if (!isMounted) return;
|
|
131
117
|
|
|
132
|
-
if (logoPath)
|
|
133
|
-
if (
|
|
118
|
+
if (logoPath) setSplashLogoPath?.(logoPath);
|
|
119
|
+
if (backgroundPath) setSplashBackgroundPath?.(backgroundPath);
|
|
134
120
|
|
|
135
|
-
|
|
121
|
+
setSplashSyncState({ isReady: true, error: null });
|
|
136
122
|
} catch (err) {
|
|
137
123
|
if (isMounted) {
|
|
138
|
-
|
|
124
|
+
setSplashSyncState({ isReady: true, error: err as Error });
|
|
139
125
|
}
|
|
140
126
|
}
|
|
141
127
|
};
|
|
142
128
|
|
|
143
|
-
|
|
144
|
-
|
|
129
|
+
syncSplashAssets();
|
|
145
130
|
return () => {
|
|
146
131
|
isMounted = false;
|
|
147
132
|
};
|
|
148
|
-
}, [logoUrl, backgroundUrl, forceDownload,
|
|
149
|
-
|
|
150
|
-
const
|
|
133
|
+
}, [logoUrl, backgroundUrl, forceDownload, setSplashLogoPath, setSplashBackgroundPath]);
|
|
134
|
+
|
|
135
|
+
const splashLogoLocalPath = useSplashStore((s) => s.logo.localPath);
|
|
136
|
+
const splashBackgroundLocalPath = useSplashStore((s) => s.backdrop.localPath);
|
|
137
|
+
|
|
151
138
|
return {
|
|
152
|
-
state,
|
|
153
|
-
isLoading: !
|
|
139
|
+
state: splashSyncState,
|
|
140
|
+
isLoading: !splashSyncState.isReady && !splashSyncState.error,
|
|
154
141
|
data: {
|
|
155
|
-
localPathLogo,
|
|
156
|
-
localPathBackground
|
|
142
|
+
localPathLogo: splashLogoLocalPath,
|
|
143
|
+
localPathBackground: splashBackgroundLocalPath
|
|
157
144
|
}
|
|
158
145
|
};
|
|
159
146
|
};
|