@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 30 Jul 2025 at 02:56 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { useState, useMemo } from 'react';
|
|
7
|
+
import FastImage from 'react-native-fast-image';
|
|
8
|
+
import { ActivityIndicator, View, StyleSheet } from 'react-native';
|
|
9
|
+
import Display from '../../../../../utils/Display';
|
|
10
|
+
|
|
11
|
+
type SplashImageProps = {
|
|
12
|
+
source: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
fullscreen: boolean;
|
|
16
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'center';
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const SplashImage: React.FC<SplashImageProps> = ({ fullscreen, height, resizeMode = 'contain', source, width }) => {
|
|
21
|
+
const [isLoading, setIsLoading] = useState(!!source);
|
|
22
|
+
|
|
23
|
+
const imageStyles = useMemo(
|
|
24
|
+
() => ({
|
|
25
|
+
width: fullscreen ? Display.fullWidth : width,
|
|
26
|
+
height: fullscreen ? Display.fullHeight : height,
|
|
27
|
+
flex: 1
|
|
28
|
+
}),
|
|
29
|
+
[fullscreen, width, height]
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const handleLoadEnd = useMemo(() => (source ? () => setIsLoading(false) : undefined), [source]);
|
|
33
|
+
const resolveUri = (src?: string): string => {
|
|
34
|
+
if (!src) return '';
|
|
35
|
+
if (src.startsWith('http') || src.startsWith('https') || src.startsWith('file://')) return src;
|
|
36
|
+
return `file://${src}`;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<View style={styles.container}>
|
|
41
|
+
{isLoading && <ActivityIndicator size="large" style={styles.loader} />}
|
|
42
|
+
<FastImage
|
|
43
|
+
source={{ uri: resolveUri(source) }}
|
|
44
|
+
onLoadEnd={handleLoadEnd}
|
|
45
|
+
style={imageStyles}
|
|
46
|
+
resizeMode={resizeMode}
|
|
47
|
+
onError={() => setIsLoading(false)}
|
|
48
|
+
/>
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
container: {
|
|
55
|
+
flex: 1,
|
|
56
|
+
width: Display.fullWidth,
|
|
57
|
+
height: Display.fullHeight,
|
|
58
|
+
justifyContent: 'center',
|
|
59
|
+
alignItems: 'center'
|
|
60
|
+
},
|
|
61
|
+
loader: {
|
|
62
|
+
position: 'absolute'
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export default React.memo(SplashImage);
|
package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.tsx
RENAMED
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import LottieView from 'lottie-react-native';
|
|
7
7
|
import { StyleSheet } from 'react-native';
|
|
8
|
-
import Display from '
|
|
9
|
-
import PlatformSelector from '../../../../utils/PlatformSelector';
|
|
8
|
+
import Display from '../../../../../utils/Display';
|
|
10
9
|
|
|
11
10
|
type ResizeMode = 'cover' | 'contain' | 'center';
|
|
12
11
|
|
|
13
12
|
interface IProps {
|
|
14
|
-
|
|
13
|
+
source: string;
|
|
15
14
|
width: number;
|
|
16
15
|
height: number;
|
|
17
16
|
fullscreen: boolean;
|
|
@@ -22,25 +21,11 @@ interface IProps {
|
|
|
22
21
|
const SplashLottie: React.FC<IProps> = ({
|
|
23
22
|
fullscreen,
|
|
24
23
|
height,
|
|
25
|
-
|
|
24
|
+
source,
|
|
26
25
|
resizeMode = 'contain',
|
|
27
26
|
width,
|
|
28
27
|
onAnimationFinish
|
|
29
28
|
}) => {
|
|
30
|
-
// Memoize the source configuration
|
|
31
|
-
const source = useMemo(() => {
|
|
32
|
-
if (!localSource) {
|
|
33
|
-
console.warn('SplashLottie: localSource is empty');
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return PlatformSelector.isAndroid()
|
|
38
|
-
? { uri: localSource }
|
|
39
|
-
: {
|
|
40
|
-
uri: localSource.startsWith('file://') ? localSource : `file://${localSource}`
|
|
41
|
-
};
|
|
42
|
-
}, [localSource]);
|
|
43
|
-
|
|
44
29
|
// Memoize the style object
|
|
45
30
|
const lottieStyle = useMemo(
|
|
46
31
|
() => ({
|
|
@@ -59,12 +44,15 @@ const SplashLottie: React.FC<IProps> = ({
|
|
|
59
44
|
|
|
60
45
|
return (
|
|
61
46
|
<LottieView
|
|
62
|
-
source={source}
|
|
47
|
+
source={{ uri: source }}
|
|
63
48
|
autoPlay
|
|
64
49
|
loop={false}
|
|
65
50
|
onAnimationFinish={onAnimationFinish}
|
|
66
51
|
style={lottieStyle}
|
|
67
52
|
resizeMode={resizeMode}
|
|
53
|
+
onAnimationFailure={(error) => {
|
|
54
|
+
console.error('Lottie animation failed to load:', error);
|
|
55
|
+
}}
|
|
68
56
|
hardwareAccelerationAndroid
|
|
69
57
|
cacheComposition
|
|
70
58
|
/>
|
package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.tsx
RENAMED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { useRef, useMemo, useCallback } from 'react';
|
|
6
6
|
import Video, { type VideoRef } from 'react-native-video';
|
|
7
|
-
import Display from '
|
|
7
|
+
import Display from '../../../../../utils/Display';
|
|
8
8
|
|
|
9
9
|
interface IProps {
|
|
10
|
-
localSource: string;
|
|
11
10
|
width: number;
|
|
12
11
|
height: number;
|
|
12
|
+
source: string;
|
|
13
13
|
fullscreen: boolean;
|
|
14
14
|
resizeMode?: 'cover' | 'contain' | 'stretch' | 'none';
|
|
15
15
|
onEnd?: () => void;
|
|
@@ -21,7 +21,7 @@ interface IProps {
|
|
|
21
21
|
const SplashVideo: React.FC<IProps> = ({
|
|
22
22
|
fullscreen,
|
|
23
23
|
height,
|
|
24
|
-
|
|
24
|
+
source,
|
|
25
25
|
resizeMode = 'cover',
|
|
26
26
|
width,
|
|
27
27
|
onEnd,
|
|
@@ -40,14 +40,6 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
40
40
|
[fullscreen, width, height]
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
// Memoize video source to prevent unnecessary recreations
|
|
44
|
-
const videoSource = useMemo(
|
|
45
|
-
() => ({
|
|
46
|
-
uri: `file://${localSource}`
|
|
47
|
-
}),
|
|
48
|
-
[localSource]
|
|
49
|
-
);
|
|
50
|
-
|
|
51
43
|
// Optimize event handlers with useCallback
|
|
52
44
|
const handleLoadStart = useCallback(() => {
|
|
53
45
|
onLoadStart?.();
|
|
@@ -69,11 +61,15 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
69
61
|
},
|
|
70
62
|
[onError]
|
|
71
63
|
);
|
|
72
|
-
|
|
64
|
+
const resolveUri = (src?: string): string => {
|
|
65
|
+
if (!src) return '';
|
|
66
|
+
if (src.startsWith('http') || src.startsWith('https') || src.startsWith('file://')) return src;
|
|
67
|
+
return `file://${src}`;
|
|
68
|
+
};
|
|
73
69
|
return (
|
|
74
70
|
<Video
|
|
75
71
|
ref={videoRef}
|
|
76
|
-
source={
|
|
72
|
+
source={{ uri: resolveUri(source) }}
|
|
77
73
|
style={videoStyle}
|
|
78
74
|
resizeMode={resizeMode}
|
|
79
75
|
paused={false}
|
|
@@ -81,7 +77,20 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
81
77
|
onLoad={handleLoad}
|
|
82
78
|
onError={handleError}
|
|
83
79
|
onEnd={onEnd}
|
|
84
|
-
|
|
80
|
+
controlsStyles={{
|
|
81
|
+
hideForward: true,
|
|
82
|
+
hideDuration: true,
|
|
83
|
+
hideFullscreen: true,
|
|
84
|
+
hidePlayPause: true,
|
|
85
|
+
hideNavigationBarOnFullScreenMode: true,
|
|
86
|
+
hideNotificationBarOnFullScreenMode: true,
|
|
87
|
+
hideNext: true,
|
|
88
|
+
hidePosition: true,
|
|
89
|
+
hidePrevious: true,
|
|
90
|
+
hideRewind: true,
|
|
91
|
+
hideSeekBar: true,
|
|
92
|
+
hideSettingButton: true
|
|
93
|
+
}}
|
|
85
94
|
ignoreSilentSwitch="obey"
|
|
86
95
|
playInBackground={false}
|
|
87
96
|
playWhenInactive={false}
|
|
@@ -8,13 +8,15 @@ import LoginWithEmail from './Login/LoginWithEmail';
|
|
|
8
8
|
import LoginWithPhone from './Login/LoginWithPhone';
|
|
9
9
|
import OTP from './OTP/OTP';
|
|
10
10
|
import SignUp from './SignUp/SignUp';
|
|
11
|
+
import { SplashScreen } from './SplashScreen/SplashScreen';
|
|
11
12
|
|
|
12
13
|
const Auth = {
|
|
13
14
|
LoginWithEmail,
|
|
14
15
|
LoginWithPhone,
|
|
15
16
|
SignUp,
|
|
16
17
|
OTP,
|
|
17
|
-
ForgotPassword
|
|
18
|
+
ForgotPassword,
|
|
19
|
+
SplashScreen
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
export { Auth };
|
|
@@ -1,93 +1,110 @@
|
|
|
1
1
|
import React, { useMemo, useCallback } from 'react';
|
|
2
|
-
import { View, StyleSheet, ImageBackground, type ViewStyle } from 'react-native';
|
|
2
|
+
import { View, StyleSheet, ImageBackground, type ViewStyle, type ImageStyle } from 'react-native';
|
|
3
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
4
4
|
import { useInitSplashCacheSync } from '../../hooks/useInitSplashCacheSync';
|
|
5
|
-
import {
|
|
5
|
+
import type { ITheme } from '../../theme/themes';
|
|
6
6
|
|
|
7
7
|
interface BackgroundLayoutProps {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
backgroundImage?: string;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
|
|
12
|
-
gradientSplit?: number;
|
|
9
|
+
backgroundImage?: string | null;
|
|
10
|
+
backgroundColor?: string | null;
|
|
11
|
+
gradientSplitBackground?: number;
|
|
13
12
|
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
|
14
13
|
innerContainerStyle?: ViewStyle;
|
|
14
|
+
theme: ITheme;
|
|
15
15
|
onImageError?: (error: Error) => void;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const BackgroundLayout: React.FC<BackgroundLayoutProps> = ({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
export const BackgroundLayout: React.FC<BackgroundLayoutProps> = (props) => {
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
backgroundImage: backgroundImageUri,
|
|
22
|
+
backgroundColor: bgColor,
|
|
23
|
+
gradientSplitBackground = 0.4,
|
|
24
|
+
resizeMode = 'cover',
|
|
25
|
+
innerContainerStyle,
|
|
26
|
+
onImageError,
|
|
27
|
+
theme
|
|
28
|
+
} = props;
|
|
29
|
+
|
|
29
30
|
const {
|
|
30
31
|
data: { localPathBackground }
|
|
31
32
|
} = useInitSplashCacheSync({
|
|
32
|
-
backgroundUrl:
|
|
33
|
+
backgroundUrl: backgroundImageUri || undefined
|
|
33
34
|
});
|
|
34
35
|
|
|
35
|
-
const
|
|
36
|
+
const resolvedImageUri = useMemo(() => {
|
|
37
|
+
if (!backgroundImageUri) return undefined;
|
|
38
|
+
const rawPath = localPathBackground || backgroundImageUri;
|
|
39
|
+
const isRemoteUrl = rawPath.startsWith('http://') || rawPath.startsWith('https://');
|
|
40
|
+
return isRemoteUrl ? rawPath : `file://${rawPath}`;
|
|
41
|
+
}, [backgroundImageUri, localPathBackground]);
|
|
36
42
|
|
|
37
43
|
const containerStyle = useMemo(
|
|
38
|
-
() => [styles.container, { backgroundColor:
|
|
39
|
-
[
|
|
44
|
+
() => [styles.container, { backgroundColor: bgColor ?? theme.colors.background }],
|
|
45
|
+
[bgColor, theme.colors.background]
|
|
40
46
|
);
|
|
41
47
|
|
|
42
|
-
const
|
|
48
|
+
const handleImageLoadError = useCallback(
|
|
43
49
|
(e: any) => {
|
|
44
|
-
console.warn('[BackgroundLayout] Image load failed:', e
|
|
50
|
+
console.warn('[BackgroundLayout] Image load failed:', e?.nativeEvent?.error);
|
|
45
51
|
onImageError?.(new Error('Background image failed to load'));
|
|
46
52
|
},
|
|
47
53
|
[onImageError]
|
|
48
54
|
);
|
|
55
|
+
|
|
49
56
|
const gradientLocations = useMemo(() => {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const baseSteps = [0, 0.
|
|
53
|
-
const locations = [0, ...baseSteps.map((step) => Math.min(1,
|
|
57
|
+
const gradientColors = theme.colors.backgroundLayoutGradient;
|
|
58
|
+
const count = gradientColors?.length ?? 0;
|
|
59
|
+
const baseSteps = [0, 0.3, 0.4, 1, 1];
|
|
60
|
+
const locations = [0, ...baseSteps.map((step) => Math.min(1, gradientSplitBackground + step))];
|
|
54
61
|
|
|
55
|
-
if (locations.length >
|
|
56
|
-
return locations.slice(0,
|
|
57
|
-
}
|
|
62
|
+
if (locations.length > count) {
|
|
63
|
+
return locations.slice(0, count);
|
|
64
|
+
}
|
|
65
|
+
if (locations.length < count) {
|
|
58
66
|
const last = locations[locations.length - 1] ?? 1;
|
|
59
|
-
return [...locations, ...Array(
|
|
67
|
+
return [...locations, ...Array(count - locations.length).fill(last)];
|
|
60
68
|
}
|
|
69
|
+
|
|
61
70
|
return locations;
|
|
62
|
-
}, [theme.colors.backgroundLayoutGradient,
|
|
71
|
+
}, [theme.colors.backgroundLayoutGradient, gradientSplitBackground]);
|
|
72
|
+
|
|
73
|
+
const renderChildren = (
|
|
74
|
+
<View style={[styles.innerContainer, innerContainerStyle, bgColor ? { backgroundColor: bgColor } : null]}>
|
|
75
|
+
{children}
|
|
76
|
+
</View>
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const showBackground = Boolean(backgroundImageUri && resolvedImageUri);
|
|
80
|
+
const showGradient = showBackground;
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
82
|
+
if (showBackground) {
|
|
83
|
+
return (
|
|
84
|
+
<View style={containerStyle}>
|
|
67
85
|
<ImageBackground
|
|
68
|
-
source={{
|
|
69
|
-
uri: bgImageSource.startsWith('http') ? bgImageSource : `file://${bgImageSource}`
|
|
70
|
-
}}
|
|
86
|
+
source={{ uri: resolvedImageUri }}
|
|
71
87
|
resizeMode={resizeMode}
|
|
72
|
-
style={styles.
|
|
73
|
-
|
|
88
|
+
style={[styles.imageContainer, { backgroundColor: theme.colors.background }]}
|
|
89
|
+
imageStyle={[styles.imageStyle, { backgroundColor: theme.colors.background }]}
|
|
90
|
+
onError={handleImageLoadError}
|
|
74
91
|
>
|
|
75
|
-
{
|
|
92
|
+
{showGradient && (
|
|
76
93
|
<LinearGradient
|
|
77
94
|
colors={theme.colors.backgroundLayoutGradient}
|
|
78
95
|
locations={gradientLocations}
|
|
79
96
|
start={{ x: 0.5, y: 0 }}
|
|
80
97
|
end={{ x: 0.5, y: 1 }}
|
|
81
|
-
style={styles.
|
|
98
|
+
style={styles.gradientOverlay}
|
|
82
99
|
/>
|
|
83
100
|
)}
|
|
84
|
-
|
|
101
|
+
{renderChildren}
|
|
85
102
|
</ImageBackground>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
</View>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return <View style={containerStyle}>{renderChildren}</View>;
|
|
91
108
|
};
|
|
92
109
|
|
|
93
110
|
const styles = StyleSheet.create({
|
|
@@ -96,12 +113,17 @@ const styles = StyleSheet.create({
|
|
|
96
113
|
width: '100%',
|
|
97
114
|
height: '100%'
|
|
98
115
|
},
|
|
99
|
-
|
|
116
|
+
imageContainer: {
|
|
100
117
|
flex: 1,
|
|
101
118
|
width: '100%',
|
|
102
119
|
height: '100%'
|
|
103
120
|
},
|
|
104
|
-
|
|
121
|
+
imageStyle: {
|
|
122
|
+
height: '60%',
|
|
123
|
+
width: '100%',
|
|
124
|
+
alignSelf: 'flex-start'
|
|
125
|
+
} as ImageStyle,
|
|
126
|
+
gradientOverlay: {
|
|
105
127
|
...StyleSheet.absoluteFillObject,
|
|
106
128
|
pointerEvents: 'none'
|
|
107
129
|
},
|
|
@@ -7,10 +7,12 @@ import React from 'react';
|
|
|
7
7
|
import { ScrollView, StyleSheet, View, type TextStyle, type ViewStyle } from 'react-native';
|
|
8
8
|
import Markdown from 'react-native-markdown-display';
|
|
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 { scale, moderateScale } from 'react-native-size-matters';
|
|
13
13
|
import type { AppTheme, ITheme } from '../../theme/themes';
|
|
14
|
+
import { ActivityIndicator } from 'react-native-paper';
|
|
15
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
14
16
|
|
|
15
17
|
type BlogViewProps = {
|
|
16
18
|
content: string;
|
|
@@ -29,6 +31,8 @@ type BlogViewProps = {
|
|
|
29
31
|
// Custom content
|
|
30
32
|
renderContent?: () => React.ReactNode;
|
|
31
33
|
renderEmpty?: () => React.ReactNode;
|
|
34
|
+
|
|
35
|
+
isLoading?: boolean;
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
export const BlogView: React.FC<BlogViewProps> = ({
|
|
@@ -43,7 +47,8 @@ export const BlogView: React.FC<BlogViewProps> = ({
|
|
|
43
47
|
headerComponent,
|
|
44
48
|
renderHeader,
|
|
45
49
|
renderContent,
|
|
46
|
-
renderEmpty
|
|
50
|
+
renderEmpty,
|
|
51
|
+
isLoading = false
|
|
47
52
|
}) => {
|
|
48
53
|
const { theme: appliedTheme } = useTheme(theme);
|
|
49
54
|
|
|
@@ -66,6 +71,14 @@ export const BlogView: React.FC<BlogViewProps> = ({
|
|
|
66
71
|
};
|
|
67
72
|
|
|
68
73
|
const renderFinalContent = () => {
|
|
74
|
+
if (isLoading) {
|
|
75
|
+
return (
|
|
76
|
+
<View style={styles.fullCenter}>
|
|
77
|
+
<ActivityIndicator size="large" color={appliedTheme.colors.primary} />
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
69
82
|
if (renderContent) return renderContent();
|
|
70
83
|
if (content) {
|
|
71
84
|
return <Markdown style={getMarkdownStyles(appliedTheme)}>{content}</Markdown>;
|
|
@@ -86,7 +99,7 @@ export const BlogView: React.FC<BlogViewProps> = ({
|
|
|
86
99
|
{scrollable ? (
|
|
87
100
|
<ScrollView
|
|
88
101
|
style={styles.flex}
|
|
89
|
-
contentContainerStyle={[styles.container, containerStyle, { paddingBottom: scale(40) }]}
|
|
102
|
+
contentContainerStyle={[styles.container, containerStyle, { paddingBottom: scale(40), flexGrow: 1 }]}
|
|
90
103
|
showsVerticalScrollIndicator={false}
|
|
91
104
|
keyboardShouldPersistTaps="handled"
|
|
92
105
|
>
|
|
@@ -107,19 +120,19 @@ const getMarkdownStyles = (theme: ITheme): { [key: string]: TextStyle } => {
|
|
|
107
120
|
text: { color: baseColor },
|
|
108
121
|
paragraph: { color: baseColor, marginBottom: scale(8) },
|
|
109
122
|
heading1: {
|
|
110
|
-
fontSize:
|
|
123
|
+
fontSize: RFValue(21),
|
|
111
124
|
fontWeight: 'bold',
|
|
112
125
|
color: baseColor,
|
|
113
126
|
marginBottom: scale(12)
|
|
114
127
|
},
|
|
115
128
|
heading2: {
|
|
116
|
-
fontSize:
|
|
129
|
+
fontSize: RFValue(19),
|
|
117
130
|
fontWeight: 'bold',
|
|
118
131
|
color: baseColor,
|
|
119
132
|
marginBottom: scale(10)
|
|
120
133
|
},
|
|
121
134
|
heading3: {
|
|
122
|
-
fontSize:
|
|
135
|
+
fontSize: RFValue(17),
|
|
123
136
|
fontWeight: 'bold',
|
|
124
137
|
color: baseColor,
|
|
125
138
|
marginBottom: scale(8)
|
|
@@ -138,7 +151,7 @@ const getMarkdownStyles = (theme: ITheme): { [key: string]: TextStyle } => {
|
|
|
138
151
|
borderRadius: scale(4),
|
|
139
152
|
marginVertical: scale(10),
|
|
140
153
|
fontStyle: 'italic',
|
|
141
|
-
fontSize:
|
|
154
|
+
fontSize: RFValue(15)
|
|
142
155
|
},
|
|
143
156
|
code_inline: {
|
|
144
157
|
backgroundColor: theme.colors.surfaceVariant,
|
|
@@ -147,6 +160,7 @@ const getMarkdownStyles = (theme: ITheme): { [key: string]: TextStyle } => {
|
|
|
147
160
|
paddingHorizontal: scale(4),
|
|
148
161
|
borderRadius: scale(4)
|
|
149
162
|
},
|
|
163
|
+
|
|
150
164
|
code_block: {
|
|
151
165
|
backgroundColor: theme.colors.surfaceVariant,
|
|
152
166
|
color: baseColor,
|
|
@@ -179,12 +193,18 @@ const styles = StyleSheet.create({
|
|
|
179
193
|
justifyContent: 'center',
|
|
180
194
|
paddingHorizontal: scale(16)
|
|
181
195
|
},
|
|
196
|
+
fullCenter: {
|
|
197
|
+
flex: 1,
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
justifyContent: 'center',
|
|
200
|
+
paddingHorizontal: scale(16)
|
|
201
|
+
},
|
|
182
202
|
emptyText: {
|
|
183
203
|
textAlign: 'center',
|
|
184
|
-
fontSize:
|
|
204
|
+
fontSize: RFValue(13)
|
|
185
205
|
},
|
|
186
206
|
headerTitle: {
|
|
187
|
-
fontSize:
|
|
207
|
+
fontSize: RFValue(15),
|
|
188
208
|
fontWeight: '600'
|
|
189
209
|
}
|
|
190
210
|
});
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
import { TouchableOpacity, StyleSheet, Alert, Platform, type ViewStyle, type StyleProp } from 'react-native';
|
|
7
7
|
import { ArrowLeft } from 'lucide-react-native';
|
|
8
8
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
|
-
import { useTheme } from '../../theme';
|
|
9
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
10
10
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
11
11
|
import { BlurView } from '@react-native-community/blur';
|
|
12
12
|
import type { AppTheme } from '../../theme/themes';
|
|
@@ -21,15 +21,11 @@ import {
|
|
|
21
21
|
import { Ellipsis } from 'lucide-react-native';
|
|
22
22
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
23
23
|
import { BlurView } from '@react-native-community/blur';
|
|
24
|
-
import { useTheme } from '../../theme';
|
|
24
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
25
25
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
26
26
|
import type { AppTheme } from '../../theme/themes';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
label: string;
|
|
30
|
-
icon: React.ComponentType<{ size?: number; color?: string }>;
|
|
31
|
-
onPress: () => void;
|
|
32
|
-
};
|
|
27
|
+
import type { MenuAction } from '../../types/content/content-view.types';
|
|
28
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
33
29
|
|
|
34
30
|
type MenuBtnProps = {
|
|
35
31
|
actions: MenuAction[];
|
|
@@ -127,6 +123,7 @@ const MenuBtn: React.FC<MenuBtnProps> = ({ actions, theme, style, enableBlur = f
|
|
|
127
123
|
console.error('Action failed:', error);
|
|
128
124
|
}
|
|
129
125
|
}}
|
|
126
|
+
disabled={action.isLoading || false}
|
|
130
127
|
style={({ pressed }) => [
|
|
131
128
|
styles.menuItem,
|
|
132
129
|
{
|
|
@@ -134,7 +131,7 @@ const MenuBtn: React.FC<MenuBtnProps> = ({ actions, theme, style, enableBlur = f
|
|
|
134
131
|
}
|
|
135
132
|
]}
|
|
136
133
|
>
|
|
137
|
-
{action
|
|
134
|
+
{action?.icon && (
|
|
138
135
|
<View style={styles.iconBox}>
|
|
139
136
|
<action.icon size={scale(18)} color={appliedTheme.colors.textPrimary} />
|
|
140
137
|
</View>
|
|
@@ -187,7 +184,7 @@ const styles = StyleSheet.create({
|
|
|
187
184
|
marginRight: scale(8)
|
|
188
185
|
},
|
|
189
186
|
label: {
|
|
190
|
-
fontSize:
|
|
187
|
+
fontSize: RFValue(12),
|
|
191
188
|
includeFontPadding: false
|
|
192
189
|
}
|
|
193
190
|
});
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
type TextStyle
|
|
15
15
|
} from 'react-native';
|
|
16
16
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
17
|
-
import { useTheme } from '../../theme/
|
|
17
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
18
18
|
import { Text } from '../Text';
|
|
19
19
|
import type { AppTheme } from '../../theme/themes';
|
|
20
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
20
21
|
|
|
21
22
|
type PrimaryBtnProps = {
|
|
22
23
|
title: string;
|
|
@@ -77,7 +78,7 @@ const styles = StyleSheet.create({
|
|
|
77
78
|
},
|
|
78
79
|
text: {
|
|
79
80
|
textAlign: 'center',
|
|
80
|
-
fontSize:
|
|
81
|
+
fontSize: RFValue(13),
|
|
81
82
|
fontWeight: '600'
|
|
82
83
|
},
|
|
83
84
|
row: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Pressable, View, type GestureResponderEvent, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
-
import { useTheme } from '../../theme';
|
|
3
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
4
4
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
5
5
|
import { Text } from '../Text';
|
|
6
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
6
7
|
|
|
7
8
|
type TextButtonProps = {
|
|
8
9
|
title: string;
|
|
@@ -89,7 +90,7 @@ const styles = StyleSheet.create({
|
|
|
89
90
|
paddingHorizontal: scale(6)
|
|
90
91
|
},
|
|
91
92
|
text: {
|
|
92
|
-
fontSize:
|
|
93
|
+
fontSize: RFValue(10)
|
|
93
94
|
},
|
|
94
95
|
row: {
|
|
95
96
|
flexDirection: 'row',
|
|
@@ -15,10 +15,11 @@ import {
|
|
|
15
15
|
type ListRenderItemInfo
|
|
16
16
|
} from 'react-native';
|
|
17
17
|
import { Text } from '../../../Text';
|
|
18
|
-
import { useTheme } from '../../../../theme';
|
|
18
|
+
import { useTheme } from '../../../../theme/hook/useTheme';
|
|
19
19
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
20
20
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
21
21
|
import type { AppTheme } from '../../../../theme/themes';
|
|
22
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
22
23
|
|
|
23
24
|
export type ICategory = {
|
|
24
25
|
_id: string;
|
|
@@ -246,7 +247,7 @@ const styles = StyleSheet.create({
|
|
|
246
247
|
paddingVertical: verticalScale(6)
|
|
247
248
|
},
|
|
248
249
|
tabText: {
|
|
249
|
-
fontSize:
|
|
250
|
+
fontSize: RFValue(10),
|
|
250
251
|
textTransform: 'capitalize',
|
|
251
252
|
fontWeight: '500',
|
|
252
253
|
lineHeight: scale(13)
|