@zezosoft/zezo-ott-react-native-ui-kit 0.1.0 → 1.0.1
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/LICENSE +0 -0
- package/README.md +46 -15
- package/lib/module/Styles/globalStyles.js +76 -0
- package/lib/module/Styles/globalStyles.js.map +1 -0
- package/lib/module/assets/animations/135037-payment-processing-error.json +0 -0
- package/lib/module/assets/animations/7227-vui-animation.json +0 -0
- package/lib/module/assets/animations/succesfull-payment.json +0 -0
- package/lib/module/assets/animations/voice-icon.json +0 -0
- package/lib/module/assets/img/back.png +0 -0
- package/lib/module/assets/img/bottom-panel.png +0 -0
- package/lib/module/assets/img/camera.png +0 -0
- package/lib/module/assets/img/camera2.png +0 -0
- package/lib/module/assets/img/h.svg +0 -0
- package/lib/module/assets/img/home.png +0 -0
- package/lib/module/assets/img/lock.png +0 -0
- package/lib/module/assets/img/play.png +0 -0
- package/lib/module/assets/img/profile.jpg +0 -0
- package/lib/module/assets/img/qr-code.png +0 -0
- package/lib/module/assets/img/shadow.png +0 -0
- package/lib/module/assets/img/shadow2.png +0 -0
- package/lib/module/assets/img/user.png +0 -0
- package/lib/module/assets/svg/Account.svg +4 -0
- package/lib/module/assets/svg/Favourite.svg +14 -0
- package/lib/module/assets/svg/Upcoming.svg +4 -0
- package/lib/module/assets/svg/content-error.svg +0 -0
- package/lib/module/assets/svg/download.svg +0 -0
- package/lib/module/assets/svg/eye-off.svg +10 -0
- package/lib/module/assets/svg/favorites.svg +0 -0
- package/lib/module/assets/svg/home.svg +0 -0
- package/lib/module/assets/svg/home1.svg +3 -0
- package/lib/module/assets/svg/menu-bar.svg +0 -0
- package/lib/module/assets/svg/my-space.svg +0 -0
- package/lib/module/assets/svg/play-icon-with-bg.svg +0 -0
- package/lib/module/assets/svg/profile.svg +4 -0
- package/lib/module/assets/svg/search.svg +0 -0
- package/lib/module/assets/svg/search1.svg +4 -0
- package/lib/module/assets/svg/server-error.svg +0 -0
- package/lib/module/components/Account/Account.js +255 -0
- package/lib/module/components/Account/Account.js.map +1 -0
- package/lib/module/components/Account/index.js +4 -0
- package/lib/module/components/Account/index.js.map +1 -0
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +217 -0
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -0
- package/lib/module/components/Auth/Login/LoginWithEmail.js +306 -0
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -0
- package/lib/module/components/Auth/Login/LoginWithPhone.js +208 -0
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -0
- package/lib/module/components/Auth/OTP/OTP.js +274 -0
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -0
- package/lib/module/components/Auth/SignUp/SignUp.js +344 -0
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -0
- 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/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +57 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +82 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
- package/lib/module/components/Auth/index.js +23 -0
- package/lib/module/components/Auth/index.js.map +1 -0
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +124 -0
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -0
- package/lib/module/components/BlogView/BlogView.js +211 -0
- package/lib/module/components/BlogView/BlogView.js.map +1 -0
- package/lib/module/components/BlogView/index.js +10 -0
- package/lib/module/components/BlogView/index.js.map +1 -0
- package/lib/module/components/Button/BackBtn.js +72 -0
- package/lib/module/components/Button/BackBtn.js.map +1 -0
- package/lib/module/components/Button/MenuBtn.js +169 -0
- package/lib/module/components/Button/MenuBtn.js.map +1 -0
- package/lib/module/components/Button/PrimaryBtn.js +83 -0
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -0
- package/lib/module/components/Button/TextButton.js +89 -0
- package/lib/module/components/Button/TextButton.js.map +1 -0
- package/lib/module/components/Button/index.js +17 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Content/Card/Category/Category.js +182 -0
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -0
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +355 -0
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -0
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +315 -0
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -0
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +199 -0
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -0
- package/lib/module/components/{Section → Content}/Card/Sliders/index.js +4 -2
- package/lib/module/components/Content/Card/Sliders/index.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Five.js +198 -0
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Four.js +204 -0
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/One.js +200 -0
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +216 -0
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Six.js +209 -0
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Three.js +214 -0
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/TopTen.js +287 -0
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -0
- package/lib/module/components/Content/Card/Styles/Two.js +217 -0
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -0
- package/lib/module/components/Content/Card/components/CardPoster.js +183 -0
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -0
- package/lib/module/components/Content/Card/components/NavigateToMore.js +57 -0
- package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -0
- package/lib/module/components/Content/Card/components/NoContentFallback.js +116 -0
- package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -0
- package/lib/module/components/Content/Card/components/ShowAllButton.js +71 -0
- package/lib/module/components/Content/Card/components/ShowAllButton.js.map +1 -0
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +129 -0
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -0
- package/lib/module/components/Content/Card/index.js +32 -0
- package/lib/module/components/Content/Card/index.js.map +1 -0
- package/lib/module/components/Content/Content.js +127 -0
- package/lib/module/components/Content/Content.js.map +1 -0
- package/lib/module/components/Content/Sections.js +145 -0
- package/lib/module/components/Content/Sections.js.map +1 -0
- package/lib/module/components/ContentView/ContentView.js +128 -0
- package/lib/module/components/ContentView/ContentView.js.map +1 -0
- 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 +115 -0
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -0
- package/lib/module/components/ContentView/components/CastCard.js +191 -0
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -0
- package/lib/module/components/ContentView/components/EpisodeCard.js +393 -0
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -0
- package/lib/module/components/ContentView/components/GenreTags.js +78 -0
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -0
- package/lib/module/components/ContentView/components/HeroBanner.js +223 -0
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -0
- package/lib/module/components/ContentView/components/PlayButton.js +40 -0
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -0
- package/lib/module/components/ContentView/components/Title.js +104 -0
- package/lib/module/components/ContentView/components/Title.js.map +1 -0
- package/lib/module/components/ContentView/components/TrailerButton.js +53 -0
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -0
- package/lib/module/components/ContentView/index.js +10 -0
- package/lib/module/components/ContentView/index.js.map +1 -0
- package/lib/module/components/Headers/AppHeader.js +96 -0
- package/lib/module/components/Headers/AppHeader.js.map +1 -0
- package/lib/module/components/Headers/One.js +31 -28
- package/lib/module/components/Headers/One.js.map +1 -1
- package/lib/module/components/Headers/Three.js +11 -14
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +12 -10
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Headers/index.js +4 -4
- package/lib/module/components/Headers/index.js.map +1 -1
- package/lib/module/components/Icons/AlertIcon.js.map +1 -1
- package/lib/module/components/Icons/DeviceIcon.js.map +1 -1
- package/lib/module/components/Icons/ForgotPasswordMessageIcon.js.map +1 -1
- package/lib/module/components/Icons/ForgotPasswordMessageIconTwo.js.map +1 -1
- package/lib/module/components/Icons/NewIndex.js +13 -1
- package/lib/module/components/Icons/NewIndex.js.map +1 -1
- package/lib/module/components/Icons/ResendOTP.js.map +1 -1
- package/lib/module/components/Input/Input.js +17 -0
- package/lib/module/components/Input/Input.js.map +1 -0
- package/lib/module/components/Input/InputOne.js +126 -0
- package/lib/module/components/Input/InputOne.js.map +1 -0
- package/lib/module/components/Input/InputTwo.js +153 -0
- package/lib/module/components/Input/InputTwo.js.map +1 -0
- package/lib/module/components/Input/PhoneNumberInput.js +285 -0
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -0
- package/lib/module/components/Keyboard/HideKeyboard.js +69 -0
- package/lib/module/components/Keyboard/HideKeyboard.js.map +1 -0
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +43 -5
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Search/One.js +193 -0
- package/lib/module/components/Search/One.js.map +1 -0
- package/lib/module/components/Search/components/RecentSearchesSection.js +161 -0
- package/lib/module/components/Search/components/RecentSearchesSection.js.map +1 -0
- package/lib/module/components/Search/components/SearchCard.js +182 -0
- package/lib/module/components/Search/components/SearchCard.js.map +1 -0
- package/lib/module/components/Search/index.js +14 -0
- package/lib/module/components/Search/index.js.map +1 -0
- package/lib/module/components/Settings/AppSettings.js +226 -0
- package/lib/module/components/Settings/AppSettings.js.map +1 -0
- package/lib/module/components/Settings/index.js +4 -0
- package/lib/module/components/Settings/index.js.map +1 -0
- package/lib/module/components/Subscription/SubOne.js +333 -0
- package/lib/module/components/Subscription/SubOne.js.map +1 -0
- package/lib/module/components/Subscription/index.js +13 -0
- package/lib/module/components/Subscription/index.js.map +1 -0
- package/lib/module/components/TabBar/One.js +146 -0
- package/lib/module/components/TabBar/One.js.map +1 -0
- package/lib/module/components/TabBar/Three.js +131 -0
- package/lib/module/components/TabBar/Three.js.map +1 -0
- package/lib/module/components/TabBar/Two.js +133 -0
- package/lib/module/components/TabBar/Two.js.map +1 -0
- package/lib/module/components/TabBar/index.js +17 -0
- package/lib/module/components/TabBar/index.js.map +1 -0
- package/lib/module/components/Text/Text.js +43 -0
- package/lib/module/components/Text/Text.js.map +1 -0
- package/lib/module/components/Text/index.js +8 -0
- package/lib/module/components/Text/index.js.map +1 -0
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +315 -0
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js +117 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -0
- package/lib/module/components/User/WatchLater/WatchLater.js +275 -0
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -0
- package/lib/module/components/User/components/UserAvatar.js +44 -0
- package/lib/module/components/User/components/UserAvatar.js.map +1 -0
- package/lib/module/components/User/components/UserSection.js +164 -0
- package/lib/module/components/User/components/UserSection.js.map +1 -0
- package/lib/module/components/User/index.js +12 -0
- package/lib/module/components/User/index.js.map +1 -0
- package/lib/module/components/View/View.js +24 -0
- package/lib/module/components/View/View.js.map +1 -0
- package/lib/module/components/View/index.js +8 -0
- package/lib/module/components/View/index.js.map +1 -0
- package/lib/module/components/index.js +18 -5
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/SafeAreaWrapper.js +34 -0
- package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -0
- package/lib/module/components/layout/index.js +4 -0
- package/lib/module/components/layout/index.js.map +1 -0
- package/lib/module/constants/dummySections.js +38 -0
- package/lib/module/constants/dummySections.js.map +1 -0
- package/lib/module/hooks/useDebounce.js +11 -0
- package/lib/module/hooks/useDebounce.js.map +1 -0
- package/lib/module/hooks/useInitSplashCacheSync.js +116 -0
- package/lib/module/hooks/useInitSplashCacheSync.js.map +1 -0
- package/lib/module/hooks/useKeyboard.js +31 -0
- package/lib/module/hooks/useKeyboard.js.map +1 -0
- package/lib/module/hooks/usePaginatedSection.js +64 -0
- package/lib/module/hooks/usePaginatedSection.js.map +1 -0
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/store/RecentSearchesStore.js +65 -0
- package/lib/module/store/RecentSearchesStore.js.map +1 -0
- package/lib/module/store/splashStore.js +69 -0
- package/lib/module/store/splashStore.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +90 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- 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 +10 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/themes.js +124 -90
- package/lib/module/theme/themes.js.map +1 -1
- package/lib/module/types/content/content-view.types.js +4 -0
- package/lib/module/types/content/content-view.types.js.map +1 -0
- package/lib/module/types/content/index.js +2 -0
- package/lib/module/types/content/index.js.map +1 -0
- package/lib/module/types/hook/index.js +2 -0
- package/lib/module/types/hook/index.js.map +1 -0
- package/lib/module/types/hook/usePaginatedSetion.js +4 -0
- package/lib/module/types/hook/usePaginatedSetion.js.map +1 -0
- package/lib/module/types/index.js +0 -3
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/sections/index.js +4 -0
- package/lib/module/types/sections/index.js.map +1 -0
- package/lib/module/utils/Display.js +22 -0
- package/lib/module/utils/Display.js.map +1 -0
- package/lib/module/utils/PlatformSelector.js +31 -0
- package/lib/module/utils/PlatformSelector.js.map +1 -0
- package/lib/module/utils/SizeMatters.js +9 -0
- package/lib/module/utils/SizeMatters.js.map +1 -0
- package/lib/typescript/src/Styles/globalStyles.d.ts +71 -0
- package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -0
- package/lib/typescript/src/components/Account/Account.d.ts +56 -0
- package/lib/typescript/src/components/Account/Account.d.ts.map +1 -0
- package/lib/typescript/src/components/Account/index.d.ts +2 -0
- package/lib/typescript/src/components/Account/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts +51 -0
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts +69 -0
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts +57 -0
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +62 -0
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts +65 -0
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -0
- 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/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts +16 -0
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts +17 -0
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts +19 -0
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/index.d.ts +230 -0
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -0
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +16 -0
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -0
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +29 -0
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -0
- package/lib/typescript/src/components/BlogView/index.d.ts +7 -0
- package/lib/typescript/src/components/BlogView/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/BackBtn.d.ts +18 -0
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/MenuBtn.d.ts +17 -0
- package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +20 -0
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/TextButton.d.ts +17 -0
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +38 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts +26 -0
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts +49 -0
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts +20 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts +18 -0
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts +22 -0
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts +36 -0
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts +37 -0
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts +37 -0
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts +37 -0
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts +32 -0
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts +37 -0
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts +33 -0
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts +36 -0
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +24 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts +17 -0
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts +18 -0
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/ShowAllButton.d.ts +20 -0
- package/lib/typescript/src/components/Content/Card/components/ShowAllButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +19 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/index.d.ts +237 -0
- package/lib/typescript/src/components/Content/Card/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Content.d.ts +59 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Sections.d.ts +45 -0
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +15 -0
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -0
- 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 +24 -0
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +32 -0
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +22 -0
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +22 -0
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +8 -0
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +15 -0
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/Title.d.ts +24 -0
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +18 -0
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/index.d.ts +7 -0
- package/lib/typescript/src/components/ContentView/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Headers/AppHeader.d.ts +20 -0
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/Headers/One.d.ts +4 -3
- package/lib/typescript/src/components/Headers/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +4 -3
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +4 -3
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +2 -2
- package/lib/typescript/src/components/Icons/AlertIcon.d.ts +1 -1
- package/lib/typescript/src/components/Icons/AlertIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Icons/DeviceIcon.d.ts +1 -1
- package/lib/typescript/src/components/Icons/DeviceIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIconTwo.d.ts.map +1 -1
- package/lib/typescript/src/components/Icons/NewIndex.d.ts +6 -0
- package/lib/typescript/src/components/Icons/NewIndex.d.ts.map +1 -1
- package/lib/typescript/src/components/Icons/ResendOTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/Input.d.ts +11 -0
- package/lib/typescript/src/components/Input/Input.d.ts.map +1 -0
- package/lib/typescript/src/components/Input/InputOne.d.ts +21 -0
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -0
- package/lib/typescript/src/components/Input/InputTwo.d.ts +25 -0
- package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -0
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts +26 -0
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -0
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts +15 -0
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/components/Logo/Logo.d.ts +3 -0
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts +46 -0
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/components/RecentSearchesSection.d.ts +16 -0
- package/lib/typescript/src/components/Search/components/RecentSearchesSection.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +32 -0
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/index.d.ts +11 -0
- package/lib/typescript/src/components/Search/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Settings/AppSettings.d.ts +53 -0
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -0
- package/lib/typescript/src/components/Settings/index.d.ts +2 -0
- package/lib/typescript/src/components/Settings/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Subscription/SubOne.d.ts +40 -0
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -0
- package/lib/typescript/src/components/Subscription/index.d.ts +30 -0
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -0
- package/lib/typescript/src/components/TabBar/One.d.ts +33 -0
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -0
- package/lib/typescript/src/components/TabBar/Three.d.ts +24 -0
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -0
- package/lib/typescript/src/components/TabBar/Two.d.ts +24 -0
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -0
- package/lib/typescript/src/components/TabBar/index.d.ts +14 -0
- package/lib/typescript/src/components/TabBar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Text/Text.d.ts +19 -0
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/Text/index.d.ts +6 -0
- package/lib/typescript/src/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +69 -0
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -0
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +49 -0
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -0
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +46 -0
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -0
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +10 -0
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -0
- package/lib/typescript/src/components/User/components/UserSection.d.ts +30 -0
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -0
- package/lib/typescript/src/components/User/index.d.ts +9 -0
- package/lib/typescript/src/components/User/index.d.ts.map +1 -0
- package/lib/typescript/src/components/View/View.d.ts +12 -0
- package/lib/typescript/src/components/View/View.d.ts.map +1 -0
- package/lib/typescript/src/components/View/index.d.ts +6 -0
- package/lib/typescript/src/components/View/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +15 -2
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts +13 -0
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -0
- package/lib/typescript/src/components/layout/index.d.ts +2 -0
- package/lib/typescript/src/components/layout/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/dummySections.d.ts +3 -0
- package/lib/typescript/src/constants/dummySections.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts +2 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +22 -0
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useKeyboard.d.ts +9 -0
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +12 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/store/RecentSearchesStore.d.ts +26 -0
- package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -0
- package/lib/typescript/src/store/splashStore.d.ts +29 -0
- package/lib/typescript/src/store/splashStore.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts +23 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
- 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 +7 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/themes.d.ts +38 -25
- package/lib/typescript/src/theme/themes.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +139 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -0
- package/lib/typescript/src/types/{content.types.d.ts → content/index.d.ts} +89 -69
- package/lib/typescript/src/types/content/index.d.ts.map +1 -0
- package/lib/typescript/src/types/hook/index.d.ts +6 -0
- package/lib/typescript/src/types/hook/index.d.ts.map +1 -0
- package/lib/typescript/src/types/hook/usePaginatedSetion.d.ts +16 -0
- package/lib/typescript/src/types/hook/usePaginatedSetion.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +7 -2
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/sections/index.d.ts +62 -0
- package/lib/typescript/src/types/sections/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/Display.d.ts +8 -0
- package/lib/typescript/src/utils/Display.d.ts.map +1 -0
- package/lib/typescript/src/utils/PlatformSelector.d.ts +22 -0
- package/lib/typescript/src/utils/PlatformSelector.d.ts.map +1 -0
- package/lib/typescript/src/utils/SizeMatters.d.ts +7 -0
- package/lib/typescript/src/utils/SizeMatters.d.ts.map +1 -0
- package/package.json +74 -125
- package/src/Styles/globalStyles.ts +75 -0
- package/src/assets/animations/135037-payment-processing-error.json +0 -0
- package/src/assets/animations/7227-vui-animation.json +0 -0
- package/src/assets/animations/succesfull-payment.json +0 -0
- package/src/assets/animations/voice-icon.json +0 -0
- package/src/assets/img/back.png +0 -0
- package/src/assets/img/bottom-panel.png +0 -0
- package/src/assets/img/camera.png +0 -0
- package/src/assets/img/camera2.png +0 -0
- package/src/assets/img/h.svg +0 -0
- package/src/assets/img/home.png +0 -0
- package/src/assets/img/lock.png +0 -0
- package/src/assets/img/play.png +0 -0
- package/src/assets/img/profile.jpg +0 -0
- package/src/assets/img/qr-code.png +0 -0
- package/src/assets/img/shadow.png +0 -0
- package/src/assets/img/shadow2.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/svg/Account.svg +4 -0
- package/src/assets/svg/Favourite.svg +14 -0
- package/src/assets/svg/Upcoming.svg +4 -0
- package/src/assets/svg/content-error.svg +0 -0
- package/src/assets/svg/download.svg +0 -0
- package/src/assets/svg/eye-off.svg +10 -0
- package/src/assets/svg/favorites.svg +0 -0
- package/src/assets/svg/home.svg +0 -0
- package/src/assets/svg/home1.svg +3 -0
- package/src/assets/svg/menu-bar.svg +0 -0
- package/src/assets/svg/my-space.svg +0 -0
- package/src/assets/svg/play-icon-with-bg.svg +0 -0
- package/src/assets/svg/profile.svg +4 -0
- package/src/assets/svg/search.svg +0 -0
- package/src/assets/svg/search1.svg +4 -0
- package/src/assets/svg/server-error.svg +0 -0
- package/src/components/Account/Account.tsx +289 -0
- package/src/components/Account/index.ts +1 -0
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +273 -0
- package/src/components/Auth/Login/LoginWithEmail.tsx +376 -0
- package/src/components/Auth/Login/LoginWithPhone.tsx +263 -0
- package/src/components/Auth/OTP/OTP.tsx +357 -0
- package/src/components/Auth/SignUp/SignUp.tsx +401 -0
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +166 -0
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +66 -0
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +71 -0
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +103 -0
- package/src/components/Auth/index.ts +22 -0
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +136 -0
- package/src/components/BlogView/BlogView.tsx +215 -0
- package/src/components/BlogView/index.ts +8 -0
- package/src/components/Button/BackBtn.tsx +83 -0
- package/src/components/Button/MenuBtn.tsx +190 -0
- package/src/components/Button/PrimaryBtn.tsx +89 -0
- package/src/components/Button/TextButton.tsx +108 -0
- package/src/components/Button/index.ts +16 -0
- package/src/components/Content/Card/Category/Category.tsx +263 -0
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +413 -0
- package/src/components/Content/Card/Sliders/Styles/One.tsx +321 -0
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +210 -0
- package/src/components/{Section → Content}/Card/Sliders/index.ts +3 -1
- package/src/components/Content/Card/Styles/Five.tsx +241 -0
- package/src/components/Content/Card/Styles/Four.tsx +246 -0
- package/src/components/Content/Card/Styles/One.tsx +242 -0
- package/src/components/Content/Card/Styles/RotateInOut.tsx +280 -0
- package/src/components/Content/Card/Styles/Six.tsx +249 -0
- package/src/components/Content/Card/Styles/Three.tsx +279 -0
- package/src/components/Content/Card/Styles/TopTen.tsx +338 -0
- package/src/components/Content/Card/Styles/Two.tsx +290 -0
- package/src/components/Content/Card/components/CardPoster.tsx +217 -0
- package/src/components/Content/Card/components/NavigateToMore.tsx +59 -0
- package/src/components/Content/Card/components/NoContentFallback.tsx +130 -0
- package/src/components/Content/Card/components/ShowAllButton.tsx +83 -0
- package/src/components/Content/Card/components/ThumbnailCard.tsx +151 -0
- package/src/components/Content/Card/index.ts +30 -0
- package/src/components/Content/Content.tsx +218 -0
- package/src/components/Content/Sections.tsx +169 -0
- package/src/components/ContentView/ContentView.tsx +137 -0
- package/src/components/ContentView/MoreContentList.tsx +238 -0
- package/src/components/ContentView/components/AboutSection.tsx +139 -0
- package/src/components/ContentView/components/CastCard.tsx +213 -0
- package/src/components/ContentView/components/EpisodeCard.tsx +454 -0
- package/src/components/ContentView/components/GenreTags.tsx +93 -0
- package/src/components/ContentView/components/HeroBanner.tsx +245 -0
- package/src/components/ContentView/components/PlayButton.tsx +37 -0
- package/src/components/ContentView/components/Title.tsx +121 -0
- package/src/components/ContentView/components/TrailerButton.tsx +53 -0
- package/src/components/ContentView/index.ts +7 -0
- package/src/components/Headers/AppHeader.tsx +108 -0
- package/src/components/Headers/One.tsx +34 -28
- package/src/components/Headers/Three.tsx +14 -24
- package/src/components/Headers/Two.tsx +16 -23
- package/src/components/Headers/index.ts +2 -2
- package/src/components/Icons/AlertIcon.tsx +2 -13
- package/src/components/Icons/DeviceIcon.tsx +1 -7
- package/src/components/Icons/DoneIcon/DoneIcon.tsx +0 -0
- package/src/components/Icons/ForgotPasswordMessageIcon.tsx +3 -24
- package/src/components/Icons/ForgotPasswordMessageIconTwo.tsx +2 -16
- package/src/components/Icons/NewIndex.ts +12 -0
- package/src/components/Icons/ResendOTP.tsx +2 -12
- package/src/components/Input/Input.ts +16 -0
- package/src/components/Input/InputOne.tsx +162 -0
- package/src/components/Input/InputTwo.tsx +189 -0
- package/src/components/Input/PhoneNumberInput.tsx +383 -0
- package/src/components/Keyboard/HideKeyboard.tsx +82 -0
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Logo/Logo.tsx +70 -26
- package/src/components/Search/One.tsx +229 -0
- package/src/components/Search/components/RecentSearchesSection.tsx +154 -0
- package/src/components/Search/components/SearchCard.tsx +194 -0
- package/src/components/Search/index.ts +16 -0
- package/src/components/Settings/AppSettings.tsx +288 -0
- package/src/components/Settings/index.ts +1 -0
- package/src/components/Subscription/SubOne.tsx +337 -0
- package/src/components/Subscription/index.ts +12 -0
- package/src/components/TabBar/One.tsx +202 -0
- package/src/components/TabBar/Three.tsx +148 -0
- package/src/components/TabBar/Two.tsx +153 -0
- package/src/components/TabBar/index.ts +20 -0
- package/src/components/Text/Text.tsx +57 -0
- package/src/components/Text/index.ts +5 -0
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +374 -0
- package/src/components/User/WatchHistory/WatchHistory.tsx +173 -0
- package/src/components/User/WatchLater/WatchLater.tsx +293 -0
- package/src/components/User/components/UserAvatar.tsx +43 -0
- package/src/components/User/components/UserSection.tsx +182 -0
- package/src/components/User/index.ts +9 -0
- package/src/components/View/View.tsx +19 -0
- package/src/components/View/index.ts +5 -0
- package/src/components/index.ts +15 -2
- package/src/components/layout/SafeAreaWrapper.tsx +39 -0
- package/src/components/layout/index.ts +1 -0
- package/src/constants/dummySections.ts +45 -0
- package/src/hooks/useDebounce.ts +13 -0
- package/src/hooks/useInitSplashCacheSync.ts +146 -0
- package/src/hooks/useKeyboard.ts +34 -0
- package/src/hooks/usePaginatedSection.ts +78 -0
- package/src/index.ts +3 -1
- package/src/store/RecentSearchesStore.ts +74 -0
- package/src/store/splashStore.ts +91 -0
- package/src/theme/ThemeProvider.tsx +107 -0
- package/src/theme/hook/useTheme.ts +41 -0
- package/src/theme/index.ts +7 -0
- package/src/theme/themes.ts +210 -123
- package/src/types/content/content-view.types.ts +148 -0
- package/src/types/{content.types.ts → content/index.ts} +108 -77
- package/src/types/hook/index.ts +5 -0
- package/src/types/hook/usePaginatedSetion.ts +19 -0
- package/src/types/index.ts +7 -2
- package/src/types/sections/index.ts +81 -0
- package/src/utils/Display.ts +14 -0
- package/src/utils/PlatformSelector.ts +29 -0
- package/src/utils/SizeMatters.ts +7 -0
- package/lib/module/assets/img/profile.png +0 -0
- package/lib/module/components/Button/Button.js +0 -22
- package/lib/module/components/Button/Button.js.map +0 -1
- package/lib/module/components/Button/styles.js +0 -23
- package/lib/module/components/Button/styles.js.map +0 -1
- package/lib/module/components/Section/Card/Sliders/Styles/One.js +0 -123
- package/lib/module/components/Section/Card/Sliders/Styles/One.js.map +0 -1
- package/lib/module/components/Section/Card/Sliders/index.js.map +0 -1
- package/lib/module/components/Section/Card/Styles/One.js +0 -92
- package/lib/module/components/Section/Card/Styles/One.js.map +0 -1
- package/lib/module/components/Section/Card/index.js +0 -14
- package/lib/module/components/Section/Card/index.js.map +0 -1
- package/lib/module/components/Section/SectionType.js +0 -98
- package/lib/module/components/Section/SectionType.js.map +0 -1
- package/lib/module/components/Section/Sections.js +0 -72
- package/lib/module/components/Section/Sections.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/sample.test.js +0 -8
- package/lib/module/sample.test.js.map +0 -1
- package/lib/module/theme/useAppTheme.js +0 -14
- package/lib/module/theme/useAppTheme.js.map +0 -1
- package/lib/module/types/content.types.js +0 -2
- package/lib/module/types/content.types.js.map +0 -1
- package/lib/module/types/sections.types.js +0 -4
- package/lib/module/types/sections.types.js.map +0 -1
- package/lib/typescript/package.json +0 -1
- package/lib/typescript/src/components/Button/Button.d.ts +0 -9
- package/lib/typescript/src/components/Button/Button.d.ts.map +0 -1
- package/lib/typescript/src/components/Button/styles.d.ts +0 -20
- package/lib/typescript/src/components/Button/styles.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/Card/Sliders/Styles/One.d.ts +0 -18
- package/lib/typescript/src/components/Section/Card/Sliders/Styles/One.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/Card/Sliders/index.d.ts +0 -7
- package/lib/typescript/src/components/Section/Card/Sliders/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/Card/Styles/One.d.ts +0 -19
- package/lib/typescript/src/components/Section/Card/Styles/One.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/Card/index.d.ts +0 -7
- package/lib/typescript/src/components/Section/Card/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/SectionType.d.ts +0 -26
- package/lib/typescript/src/components/Section/SectionType.d.ts.map +0 -1
- package/lib/typescript/src/components/Section/Sections.d.ts +0 -27
- package/lib/typescript/src/components/Section/Sections.d.ts.map +0 -1
- package/lib/typescript/src/sample.test.d.ts +0 -1
- package/lib/typescript/src/sample.test.d.ts.map +0 -1
- package/lib/typescript/src/theme/useAppTheme.d.ts +0 -46
- package/lib/typescript/src/theme/useAppTheme.d.ts.map +0 -1
- package/lib/typescript/src/types/content.types.d.ts.map +0 -1
- package/lib/typescript/src/types/sections.types.d.ts +0 -41
- package/lib/typescript/src/types/sections.types.d.ts.map +0 -1
- package/src/assets/img/profile.png +0 -0
- package/src/components/Button/Button.tsx +0 -32
- package/src/components/Button/styles.ts +0 -21
- package/src/components/Section/Card/Sliders/Styles/One.tsx +0 -147
- package/src/components/Section/Card/Styles/One.tsx +0 -112
- package/src/components/Section/Card/index.ts +0 -13
- package/src/components/Section/SectionType.tsx +0 -127
- package/src/components/Section/Sections.tsx +0 -120
- package/src/sample.test.ts +0 -5
- package/src/theme/useAppTheme.ts +0 -13
- package/src/types/sections.types.ts +0 -56
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Tue 29 Jul 2025 at 05:37 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import RNFS from 'react-native-fs';
|
|
8
|
+
import CryptoJS from 'crypto-js';
|
|
9
|
+
import { MMKV } from 'react-native-mmkv';
|
|
10
|
+
import { useSplashStore } from '../store/splashStore';
|
|
11
|
+
|
|
12
|
+
const mmkvStorage = new MMKV();
|
|
13
|
+
const inFlightDownloadsMap = new Map<string, Promise<string | null>>();
|
|
14
|
+
|
|
15
|
+
const SUPPORTED_FILE_TYPES = ['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 (
|
|
28
|
+
url: string,
|
|
29
|
+
extension: string,
|
|
30
|
+
mmkvKey: string,
|
|
31
|
+
forceDownload: boolean
|
|
32
|
+
): Promise<string | null> => {
|
|
33
|
+
if (!url?.trim()) return null;
|
|
34
|
+
|
|
35
|
+
const ext = extension.replace(/^\./, '').trim() || 'mp4';
|
|
36
|
+
const hash = CryptoJS.MD5(`${url}|${mmkvKey}|${ext}`).toString();
|
|
37
|
+
const localPath = `${RNFS.CachesDirectoryPath}/splash_${hash}.${ext}`;
|
|
38
|
+
|
|
39
|
+
if (inFlightDownloadsMap.has(hash)) {
|
|
40
|
+
return inFlightDownloadsMap.get(hash)!;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const downloadTask = (async () => {
|
|
44
|
+
try {
|
|
45
|
+
const previousHash = mmkvStorage.getString(mmkvKey);
|
|
46
|
+
|
|
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
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!forceDownload) {
|
|
56
|
+
const exists = await RNFS.exists(localPath);
|
|
57
|
+
if (exists && previousHash === hash) {
|
|
58
|
+
return localPath;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
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 {}
|
|
75
|
+
|
|
76
|
+
return null;
|
|
77
|
+
})();
|
|
78
|
+
|
|
79
|
+
inFlightDownloadsMap.set(hash, downloadTask);
|
|
80
|
+
return downloadTask;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type UseSplashCacheSyncOptions = {
|
|
84
|
+
logoUrl?: string;
|
|
85
|
+
backgroundUrl?: string;
|
|
86
|
+
forceDownload?: boolean;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const useInitSplashCacheSync = ({
|
|
90
|
+
logoUrl,
|
|
91
|
+
backgroundUrl,
|
|
92
|
+
forceDownload = false
|
|
93
|
+
}: UseSplashCacheSyncOptions) => {
|
|
94
|
+
const [splashSyncState, setSplashSyncState] = useState({
|
|
95
|
+
isReady: false,
|
|
96
|
+
error: null as Error | null
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const setSplashLogoPath = useSplashStore((s) => s.setLogoPath);
|
|
100
|
+
const setSplashBackgroundPath = useSplashStore((s) => s.setBackdropPath);
|
|
101
|
+
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
let isMounted = true;
|
|
104
|
+
|
|
105
|
+
const syncSplashAssets = async () => {
|
|
106
|
+
try {
|
|
107
|
+
const [logoPath, backgroundPath] = await Promise.all([
|
|
108
|
+
logoUrl
|
|
109
|
+
? cacheSplashAsset(logoUrl, extractFileExtension(logoUrl), 'splash_logo', forceDownload)
|
|
110
|
+
: Promise.resolve(null),
|
|
111
|
+
backgroundUrl
|
|
112
|
+
? cacheSplashAsset(backgroundUrl, extractFileExtension(backgroundUrl), 'splash_background', forceDownload)
|
|
113
|
+
: Promise.resolve(null)
|
|
114
|
+
]);
|
|
115
|
+
|
|
116
|
+
if (!isMounted) return;
|
|
117
|
+
|
|
118
|
+
if (logoPath) setSplashLogoPath?.(logoPath);
|
|
119
|
+
if (backgroundPath) setSplashBackgroundPath?.(backgroundPath);
|
|
120
|
+
|
|
121
|
+
setSplashSyncState({ isReady: true, error: null });
|
|
122
|
+
} catch (err) {
|
|
123
|
+
if (isMounted) {
|
|
124
|
+
setSplashSyncState({ isReady: true, error: err as Error });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
syncSplashAssets();
|
|
130
|
+
return () => {
|
|
131
|
+
isMounted = false;
|
|
132
|
+
};
|
|
133
|
+
}, [logoUrl, backgroundUrl, forceDownload, setSplashLogoPath, setSplashBackgroundPath]);
|
|
134
|
+
|
|
135
|
+
const splashLogoLocalPath = useSplashStore((s) => s.logo.localPath);
|
|
136
|
+
const splashBackgroundLocalPath = useSplashStore((s) => s.backdrop.localPath);
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
state: splashSyncState,
|
|
140
|
+
isLoading: !splashSyncState.isReady && !splashSyncState.error,
|
|
141
|
+
data: {
|
|
142
|
+
localPathLogo: splashLogoLocalPath,
|
|
143
|
+
localPathBackground: splashBackgroundLocalPath
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Sat 14 Jun 2025 at 03:01 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { Keyboard, Platform } from 'react-native';
|
|
8
|
+
|
|
9
|
+
export const useKeyboard = () => {
|
|
10
|
+
const [isKeyboardOpen, setKeyboardOpen] = useState(false);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
|
|
14
|
+
const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';
|
|
15
|
+
|
|
16
|
+
const showListener = Keyboard.addListener(showEvent, () => {
|
|
17
|
+
setKeyboardOpen(true);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const hideListener = Keyboard.addListener(hideEvent, () => {
|
|
21
|
+
setKeyboardOpen(false);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return () => {
|
|
25
|
+
showListener.remove();
|
|
26
|
+
hideListener.remove();
|
|
27
|
+
};
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
isKeyboardOpen,
|
|
32
|
+
hideKeyboard: () => Keyboard.dismiss()
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 25 Jun 2025 at 12:00 PM
|
|
4
|
+
*/
|
|
5
|
+
import React, { useCallback, useState } from 'react';
|
|
6
|
+
import type { MoreFetchData } from '../types';
|
|
7
|
+
|
|
8
|
+
export function usePaginatedSection<T>(
|
|
9
|
+
sectionId: string,
|
|
10
|
+
fetchFn?: MoreFetchData<T>,
|
|
11
|
+
initialData: T[] = [],
|
|
12
|
+
isLoading?: boolean
|
|
13
|
+
) {
|
|
14
|
+
const [data, setData] = useState<T[]>(initialData);
|
|
15
|
+
const [pagination, setPagination] = useState<{
|
|
16
|
+
hasNextPage: boolean;
|
|
17
|
+
nextPage: number | null;
|
|
18
|
+
}>({
|
|
19
|
+
hasNextPage: true,
|
|
20
|
+
nextPage: 2
|
|
21
|
+
});
|
|
22
|
+
const [loading, setLoading] = useState(false);
|
|
23
|
+
|
|
24
|
+
// Sync initial data on mount or loading complete
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (!isLoading && initialData.length) {
|
|
27
|
+
setData(initialData);
|
|
28
|
+
}
|
|
29
|
+
}, [isLoading, initialData]);
|
|
30
|
+
|
|
31
|
+
const loadMoreData = useCallback(
|
|
32
|
+
async (page: number | null) => {
|
|
33
|
+
if (!page || loading || !pagination.hasNextPage || !fetchFn) return;
|
|
34
|
+
|
|
35
|
+
setLoading(true);
|
|
36
|
+
try {
|
|
37
|
+
const res = await fetchFn({
|
|
38
|
+
sectionId,
|
|
39
|
+
meta: {
|
|
40
|
+
hasNextPage: pagination.hasNextPage,
|
|
41
|
+
nextPage: page
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (!res || !res.data || !res.meta?.pagination) {
|
|
46
|
+
console.warn(`⚠️ Invalid response for section: ${sectionId}`, res);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const { hasNextPage, nextPage } = res.meta.pagination;
|
|
51
|
+
|
|
52
|
+
setData((prev) => {
|
|
53
|
+
const existingIds = new Set((prev as any[]).map((item: any) => item._id));
|
|
54
|
+
const newItems = res.data.filter((item: any) => !existingIds.has(item._id));
|
|
55
|
+
return [...prev, ...newItems];
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
setPagination({
|
|
59
|
+
hasNextPage,
|
|
60
|
+
nextPage
|
|
61
|
+
});
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.error(`❌ Error loading section [${sectionId}]:`, err);
|
|
64
|
+
} finally {
|
|
65
|
+
setLoading(false);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[loading, pagination.hasNextPage, fetchFn, sectionId]
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
data,
|
|
73
|
+
pagination,
|
|
74
|
+
loading,
|
|
75
|
+
hasMore: pagination.hasNextPage,
|
|
76
|
+
loadMoreData
|
|
77
|
+
};
|
|
78
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Thu 04 Jul 2025 at 07:30 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { create } from 'zustand';
|
|
7
|
+
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
8
|
+
import { MMKV } from 'react-native-mmkv';
|
|
9
|
+
|
|
10
|
+
const mmkv = new MMKV();
|
|
11
|
+
|
|
12
|
+
// Define store state type
|
|
13
|
+
type RecentSearchesState = {
|
|
14
|
+
recentSearches: string[];
|
|
15
|
+
pillMaxCount: number;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
addSearchTerm: (term: string, limit?: number) => void;
|
|
18
|
+
removeSearchTerm: (term: string) => void;
|
|
19
|
+
clearSearches: () => void;
|
|
20
|
+
setPillMaxCount: (count: number) => void;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const useRecentSearchesStore = create<RecentSearchesState>()(
|
|
24
|
+
persist(
|
|
25
|
+
(set, get) => ({
|
|
26
|
+
recentSearches: [],
|
|
27
|
+
pillMaxCount: 20,
|
|
28
|
+
isLoading: true,
|
|
29
|
+
|
|
30
|
+
addSearchTerm: (term, limit) => {
|
|
31
|
+
const trimmed = term.trim();
|
|
32
|
+
if (!trimmed) return;
|
|
33
|
+
|
|
34
|
+
const maxCount = limit ?? get().pillMaxCount;
|
|
35
|
+
const current = get().recentSearches;
|
|
36
|
+
const updated = [trimmed, ...current.filter((t) => t !== trimmed)].slice(0, maxCount);
|
|
37
|
+
set({ recentSearches: updated });
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
removeSearchTerm: (term) =>
|
|
41
|
+
set((state) => ({
|
|
42
|
+
recentSearches: state.recentSearches.filter((t) => t !== term)
|
|
43
|
+
})),
|
|
44
|
+
|
|
45
|
+
clearSearches: () => set({ recentSearches: [] }),
|
|
46
|
+
|
|
47
|
+
setPillMaxCount: (count) => set({ pillMaxCount: count })
|
|
48
|
+
}),
|
|
49
|
+
{
|
|
50
|
+
name: 'recent-searches-storage',
|
|
51
|
+
storage: createJSONStorage(() => ({
|
|
52
|
+
getItem: (name) => mmkv.getString(name) ?? null,
|
|
53
|
+
setItem: (name, value) => mmkv.set(name, value),
|
|
54
|
+
removeItem: (name) => mmkv.delete(name)
|
|
55
|
+
})),
|
|
56
|
+
partialize: (state) => ({
|
|
57
|
+
recentSearches: state.recentSearches,
|
|
58
|
+
pillMaxCount: state.pillMaxCount
|
|
59
|
+
}),
|
|
60
|
+
onRehydrateStorage: () => (state) => {
|
|
61
|
+
const hasData = (state?.recentSearches?.length ?? 0) > 0 || (state?.pillMaxCount ?? 20) !== 20;
|
|
62
|
+
|
|
63
|
+
if (hasData) {
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
useRecentSearchesStore.setState({ isLoading: false });
|
|
66
|
+
console.log('🔄 Zustand store rehydrated');
|
|
67
|
+
}, 50);
|
|
68
|
+
} else {
|
|
69
|
+
useRecentSearchesStore.setState({ isLoading: false });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Thu 12 Jun 2025 at 07:57 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { create } from 'zustand';
|
|
7
|
+
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
8
|
+
import { MMKV } from 'react-native-mmkv'; // Updated import
|
|
9
|
+
|
|
10
|
+
const mmkv = new MMKV(); // Initialize MMKV instance
|
|
11
|
+
|
|
12
|
+
interface ImageState {
|
|
13
|
+
localPath: string | null;
|
|
14
|
+
lastUpdated: number | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type SplashState = {
|
|
18
|
+
logo: ImageState;
|
|
19
|
+
backdrop: ImageState;
|
|
20
|
+
setLogoPath: (path: string | null) => void;
|
|
21
|
+
clearLogoPath: () => void;
|
|
22
|
+
setBackdropPath: (path: string | null) => void;
|
|
23
|
+
clearBackdropPath: () => void;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const useSplashStore = create<SplashState>()(
|
|
27
|
+
persist(
|
|
28
|
+
(set) => ({
|
|
29
|
+
logo: {
|
|
30
|
+
localPath: null,
|
|
31
|
+
lastUpdated: null
|
|
32
|
+
},
|
|
33
|
+
backdrop: {
|
|
34
|
+
localPath: null,
|
|
35
|
+
lastUpdated: null
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
setLogoPath: (path) =>
|
|
39
|
+
set((state) => ({
|
|
40
|
+
logo: {
|
|
41
|
+
...state.logo,
|
|
42
|
+
localPath: path,
|
|
43
|
+
lastUpdated: Date.now()
|
|
44
|
+
}
|
|
45
|
+
})),
|
|
46
|
+
|
|
47
|
+
clearLogoPath: () =>
|
|
48
|
+
set(() => ({
|
|
49
|
+
logo: {
|
|
50
|
+
localPath: null,
|
|
51
|
+
lastUpdated: null
|
|
52
|
+
}
|
|
53
|
+
})),
|
|
54
|
+
|
|
55
|
+
setBackdropPath: (path) =>
|
|
56
|
+
set((state) => ({
|
|
57
|
+
backdrop: {
|
|
58
|
+
...state.backdrop,
|
|
59
|
+
localPath: path,
|
|
60
|
+
lastUpdated: Date.now()
|
|
61
|
+
}
|
|
62
|
+
})),
|
|
63
|
+
|
|
64
|
+
clearBackdropPath: () =>
|
|
65
|
+
set(() => ({
|
|
66
|
+
backdrop: {
|
|
67
|
+
localPath: null,
|
|
68
|
+
lastUpdated: null
|
|
69
|
+
}
|
|
70
|
+
}))
|
|
71
|
+
}),
|
|
72
|
+
{
|
|
73
|
+
name: 'splash-storage',
|
|
74
|
+
storage: createJSONStorage(() => ({
|
|
75
|
+
getItem: (name) => mmkv.getString(name) || null, // Updated to use MMKV getString
|
|
76
|
+
setItem: (name, value) => mmkv.set(name, value), // Updated to use MMKV set
|
|
77
|
+
removeItem: (name) => mmkv.delete(name) // Updated to use MMKV delete
|
|
78
|
+
})),
|
|
79
|
+
partialize: (state) => ({
|
|
80
|
+
logo: {
|
|
81
|
+
localPath: state.logo.localPath,
|
|
82
|
+
lastUpdated: state.logo.lastUpdated
|
|
83
|
+
},
|
|
84
|
+
backdrop: {
|
|
85
|
+
localPath: state.backdrop.localPath,
|
|
86
|
+
lastUpdated: state.backdrop.lastUpdated
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
);
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Sat 26 Jul 2025 at 02:11 PM
|
|
4
|
+
*/
|
|
5
|
+
import React, { createContext, useMemo, useState, useCallback, useEffect, useContext, type ReactNode } from 'react';
|
|
6
|
+
import { View, useColorScheme, StatusBar } from 'react-native';
|
|
7
|
+
import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';
|
|
8
|
+
import { LightTheme, DarkTheme, type ITheme, type AppTheme } from './themes';
|
|
9
|
+
|
|
10
|
+
type ThemeContextType = {
|
|
11
|
+
theme: ITheme;
|
|
12
|
+
isDarkMode: boolean;
|
|
13
|
+
toggleTheme: () => void;
|
|
14
|
+
setThemeOverride: (override?: Partial<AppTheme>) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const ThemeContext = createContext<ThemeContextType | null>(null);
|
|
18
|
+
|
|
19
|
+
export const useThemeContext = () => {
|
|
20
|
+
const ctx = useContext(ThemeContext);
|
|
21
|
+
if (!ctx) throw new Error('useTheme must be used within ZezoUIProvider');
|
|
22
|
+
return ctx;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type ZezoUIProviderProps = {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
theme?: Partial<AppTheme> & { dark?: boolean };
|
|
28
|
+
autoSwitchTheme?: boolean;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const getIsDarkMode = (
|
|
32
|
+
autoSwitchTheme: boolean | undefined,
|
|
33
|
+
systemScheme: 'dark' | 'light' | null,
|
|
34
|
+
userDark?: boolean
|
|
35
|
+
): boolean => {
|
|
36
|
+
if (autoSwitchTheme) return systemScheme === 'dark';
|
|
37
|
+
return userDark ?? false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const ZezoUIProvider: React.FC<ZezoUIProviderProps> = ({ children, theme, autoSwitchTheme }) => {
|
|
41
|
+
const systemScheme = useColorScheme() ?? null;
|
|
42
|
+
|
|
43
|
+
const [overrideTheme, setOverrideTheme] = useState<Partial<AppTheme> | undefined>(theme);
|
|
44
|
+
|
|
45
|
+
// ✅ Sync prop to state if changed externally
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (theme) {
|
|
48
|
+
setOverrideTheme(theme);
|
|
49
|
+
}
|
|
50
|
+
}, [theme]);
|
|
51
|
+
|
|
52
|
+
// ✅ This prioritizes externally passed theme.dark
|
|
53
|
+
const isDarkMode = useMemo(() => {
|
|
54
|
+
if (theme?.dark !== undefined) return theme.dark;
|
|
55
|
+
return getIsDarkMode(autoSwitchTheme, systemScheme, overrideTheme?.dark);
|
|
56
|
+
}, [theme?.dark, autoSwitchTheme, systemScheme, overrideTheme?.dark]);
|
|
57
|
+
|
|
58
|
+
const baseTheme = useMemo<ITheme>(() => (isDarkMode ? DarkTheme : LightTheme), [isDarkMode]);
|
|
59
|
+
|
|
60
|
+
const mergedTheme = useMemo<ITheme>(() => {
|
|
61
|
+
return {
|
|
62
|
+
...baseTheme,
|
|
63
|
+
...overrideTheme,
|
|
64
|
+
dark: isDarkMode,
|
|
65
|
+
colors: {
|
|
66
|
+
...baseTheme.colors,
|
|
67
|
+
...(overrideTheme?.colors ?? {})
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}, [baseTheme, overrideTheme, isDarkMode]);
|
|
71
|
+
|
|
72
|
+
const toggleTheme = useCallback(() => {
|
|
73
|
+
if (autoSwitchTheme || theme?.dark !== undefined) return;
|
|
74
|
+
setOverrideTheme((prev) => ({
|
|
75
|
+
...prev,
|
|
76
|
+
dark: !getIsDarkMode(false, null, prev?.dark)
|
|
77
|
+
}));
|
|
78
|
+
}, [autoSwitchTheme, theme?.dark]);
|
|
79
|
+
|
|
80
|
+
const setThemeOverride = useCallback((override?: Partial<AppTheme>) => {
|
|
81
|
+
setOverrideTheme(override);
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
// ✅ Update StatusBar only when required
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
StatusBar.setBarStyle(isDarkMode ? 'light-content' : 'dark-content', true);
|
|
87
|
+
StatusBar.setBackgroundColor(mergedTheme.colors.background, true);
|
|
88
|
+
}, [isDarkMode, mergedTheme.colors.background]);
|
|
89
|
+
|
|
90
|
+
const contextValue = useMemo(
|
|
91
|
+
() => ({
|
|
92
|
+
theme: mergedTheme,
|
|
93
|
+
isDarkMode,
|
|
94
|
+
toggleTheme,
|
|
95
|
+
setThemeOverride
|
|
96
|
+
}),
|
|
97
|
+
[mergedTheme, isDarkMode, toggleTheme, setThemeOverride]
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
|
|
102
|
+
<ThemeContext.Provider value={contextValue}>
|
|
103
|
+
<View style={{ flex: 1, backgroundColor: mergedTheme.colors.background }}>{children}</View>
|
|
104
|
+
</ThemeContext.Provider>
|
|
105
|
+
</SafeAreaProvider>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Sat 26 Jul 2025 at 02:11 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
|
+
import { useThemeContext } from '../ThemeProvider';
|
|
8
|
+
import { DarkTheme, LightTheme, type AppTheme, type ITheme } from '../themes';
|
|
9
|
+
|
|
10
|
+
export const useTheme = (override?: Partial<AppTheme>): { theme: ITheme } => {
|
|
11
|
+
const { theme: contextTheme, isDarkMode, setThemeOverride } = useThemeContext();
|
|
12
|
+
|
|
13
|
+
const isOverrideDark = override?.dark ?? contextTheme.dark ?? isDarkMode;
|
|
14
|
+
|
|
15
|
+
const baseTheme = useMemo(() => {
|
|
16
|
+
return isOverrideDark ? DarkTheme : LightTheme;
|
|
17
|
+
}, [isOverrideDark]);
|
|
18
|
+
|
|
19
|
+
const finalTheme = useMemo<ITheme>(() => {
|
|
20
|
+
return {
|
|
21
|
+
...baseTheme,
|
|
22
|
+
...override,
|
|
23
|
+
dark: isOverrideDark,
|
|
24
|
+
colors: {
|
|
25
|
+
...baseTheme.colors,
|
|
26
|
+
...(override?.colors ?? {})
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}, [baseTheme, override, isOverrideDark]);
|
|
30
|
+
|
|
31
|
+
// 🔄 Push override only once (optional)
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
if (override) {
|
|
34
|
+
setThemeOverride(override);
|
|
35
|
+
} else {
|
|
36
|
+
setThemeOverride(undefined);
|
|
37
|
+
}
|
|
38
|
+
}, [override, setThemeOverride]);
|
|
39
|
+
|
|
40
|
+
return useMemo(() => ({ theme: finalTheme }), [finalTheme]);
|
|
41
|
+
};
|