@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.
Files changed (351) hide show
  1. package/README.md +1 -1
  2. package/lib/module/components/Account/Account.js +7 -6
  3. package/lib/module/components/Account/Account.js.map +1 -1
  4. package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +39 -27
  5. package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
  6. package/lib/module/components/Auth/Login/LoginWithEmail.js +39 -25
  7. package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
  8. package/lib/module/components/Auth/Login/LoginWithPhone.js +34 -25
  9. package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
  10. package/lib/module/components/Auth/OTP/OTP.js +61 -42
  11. package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
  12. package/lib/module/components/Auth/SignUp/SignUp.js +41 -26
  13. package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
  14. package/lib/module/components/Auth/SplashScreen/SplashScreen.js +132 -0
  15. package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -0
  16. package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +61 -0
  17. package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -0
  18. package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.js +8 -17
  19. package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
  20. package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.js +25 -11
  21. package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
  22. package/lib/module/components/Auth/index.js +3 -1
  23. package/lib/module/components/Auth/index.js.map +1 -1
  24. package/lib/module/components/BackgroundLayout/BackgroundLayout.js +77 -57
  25. package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
  26. package/lib/module/components/BlogView/BlogView.js +28 -9
  27. package/lib/module/components/BlogView/BlogView.js.map +1 -1
  28. package/lib/module/components/Button/BackBtn.js +1 -1
  29. package/lib/module/components/Button/BackBtn.js.map +1 -1
  30. package/lib/module/components/Button/MenuBtn.js +5 -3
  31. package/lib/module/components/Button/MenuBtn.js.map +1 -1
  32. package/lib/module/components/Button/PrimaryBtn.js +3 -2
  33. package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
  34. package/lib/module/components/Button/TextButton.js +3 -2
  35. package/lib/module/components/Button/TextButton.js.map +1 -1
  36. package/lib/module/components/Content/Card/Category/Category.js +3 -2
  37. package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
  38. package/lib/module/components/Content/Card/NowWatching/NowWatching.js +10 -7
  39. package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
  40. package/lib/module/components/Content/Card/Sliders/Styles/One.js +6 -4
  41. package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
  42. package/lib/module/components/Content/Card/Sliders/Styles/Two.js +3 -2
  43. package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
  44. package/lib/module/components/Content/Card/Sliders/index.js +1 -1
  45. package/lib/module/components/Content/Card/Sliders/index.js.map +1 -1
  46. package/lib/module/components/Content/Card/Styles/Five.js +7 -6
  47. package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
  48. package/lib/module/components/Content/Card/Styles/Four.js +9 -7
  49. package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
  50. package/lib/module/components/Content/Card/Styles/One.js +33 -70
  51. package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
  52. package/lib/module/components/Content/Card/Styles/RotateInOut.js +6 -5
  53. package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
  54. package/lib/module/components/Content/Card/Styles/Six.js +7 -5
  55. package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
  56. package/lib/module/components/Content/Card/Styles/Three.js +6 -5
  57. package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
  58. package/lib/module/components/Content/Card/Styles/TopTen.js +10 -12
  59. package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
  60. package/lib/module/components/Content/Card/Styles/Two.js +8 -6
  61. package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
  62. package/lib/module/components/Content/Card/components/CardPoster.js +17 -9
  63. package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
  64. package/lib/module/components/Content/Card/components/NavigateToMore.js +4 -3
  65. package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -1
  66. package/lib/module/components/Content/Card/components/NoContentFallback.js +5 -4
  67. package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -1
  68. package/lib/module/components/Content/Card/components/ThumbnailCard.js +2 -1
  69. package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
  70. package/lib/module/components/Content/Content.js +21 -7
  71. package/lib/module/components/Content/Content.js.map +1 -1
  72. package/lib/module/components/Content/Sections.js +1 -1
  73. package/lib/module/components/Content/Sections.js.map +1 -1
  74. package/lib/module/components/ContentView/ContentView.js +8 -6
  75. package/lib/module/components/ContentView/ContentView.js.map +1 -1
  76. package/lib/module/components/ContentView/MoreContentList.js +211 -0
  77. package/lib/module/components/ContentView/MoreContentList.js.map +1 -0
  78. package/lib/module/components/ContentView/components/AboutSection.js +5 -4
  79. package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
  80. package/lib/module/components/ContentView/components/CastCard.js +5 -4
  81. package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
  82. package/lib/module/components/ContentView/components/EpisodeCard.js +23 -3
  83. package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
  84. package/lib/module/components/ContentView/components/GenreTags.js +2 -1
  85. package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
  86. package/lib/module/components/ContentView/components/HeroBanner.js +14 -5
  87. package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
  88. package/lib/module/components/ContentView/components/Title.js +4 -3
  89. package/lib/module/components/ContentView/components/Title.js.map +1 -1
  90. package/lib/module/components/ContentView/index.js +1 -0
  91. package/lib/module/components/ContentView/index.js.map +1 -1
  92. package/lib/module/components/Headers/AppHeader.js +20 -25
  93. package/lib/module/components/Headers/AppHeader.js.map +1 -1
  94. package/lib/module/components/Headers/One.js +1 -1
  95. package/lib/module/components/Headers/Three.js +5 -3
  96. package/lib/module/components/Headers/Three.js.map +1 -1
  97. package/lib/module/components/Headers/Two.js +5 -3
  98. package/lib/module/components/Headers/Two.js.map +1 -1
  99. package/lib/module/components/Input/InputOne.js +6 -4
  100. package/lib/module/components/Input/InputOne.js.map +1 -1
  101. package/lib/module/components/Input/InputTwo.js +5 -4
  102. package/lib/module/components/Input/InputTwo.js.map +1 -1
  103. package/lib/module/components/Input/PhoneNumberInput.js +12 -11
  104. package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
  105. package/lib/module/components/Keyboard/HideKeyboard.js +40 -12
  106. package/lib/module/components/Keyboard/HideKeyboard.js.map +1 -1
  107. package/lib/module/components/Logo/Logo.js +2 -1
  108. package/lib/module/components/Logo/Logo.js.map +1 -1
  109. package/lib/module/components/Search/One.js +6 -4
  110. package/lib/module/components/Search/One.js.map +1 -1
  111. package/lib/module/components/Search/components/RecentSearchesSection.js +10 -9
  112. package/lib/module/components/Search/components/RecentSearchesSection.js.map +1 -1
  113. package/lib/module/components/Search/components/SearchCard.js +6 -5
  114. package/lib/module/components/Search/components/SearchCard.js.map +1 -1
  115. package/lib/module/components/Settings/AppSettings.js +5 -4
  116. package/lib/module/components/Settings/AppSettings.js.map +1 -1
  117. package/lib/module/components/Subscription/SubOne.js +16 -15
  118. package/lib/module/components/Subscription/SubOne.js.map +1 -1
  119. package/lib/module/components/TabBar/One.js +5 -3
  120. package/lib/module/components/TabBar/One.js.map +1 -1
  121. package/lib/module/components/TabBar/Three.js +18 -14
  122. package/lib/module/components/TabBar/Three.js.map +1 -1
  123. package/lib/module/components/TabBar/Two.js +4 -2
  124. package/lib/module/components/TabBar/Two.js.map +1 -1
  125. package/lib/module/components/Text/Text.js +4 -4
  126. package/lib/module/components/Text/Text.js.map +1 -1
  127. package/lib/module/components/User/DeviceSessions/DeviceSessions.js +7 -6
  128. package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
  129. package/lib/module/components/User/WatchHistory/WatchHistory.js +6 -7
  130. package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
  131. package/lib/module/components/User/WatchLater/WatchLater.js +12 -9
  132. package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
  133. package/lib/module/components/User/components/UserAvatar.js +1 -1
  134. package/lib/module/components/User/components/UserAvatar.js.map +1 -1
  135. package/lib/module/components/User/components/UserSection.js +5 -4
  136. package/lib/module/components/User/components/UserSection.js.map +1 -1
  137. package/lib/module/components/index.js +0 -1
  138. package/lib/module/components/index.js.map +1 -1
  139. package/lib/module/components/layout/SafeAreaWrapper.js +12 -11
  140. package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -1
  141. package/lib/module/hooks/useInitSplashCacheSync.js +67 -63
  142. package/lib/module/hooks/useInitSplashCacheSync.js.map +1 -1
  143. package/lib/module/hooks/useKeyboard.js +7 -9
  144. package/lib/module/hooks/useKeyboard.js.map +1 -1
  145. package/lib/module/hooks/usePaginatedSection.js +10 -3
  146. package/lib/module/hooks/usePaginatedSection.js.map +1 -1
  147. package/lib/module/theme/ThemeProvider.js +55 -52
  148. package/lib/module/theme/ThemeProvider.js.map +1 -1
  149. package/lib/module/theme/hook/useTheme.js +45 -0
  150. package/lib/module/theme/hook/useTheme.js.map +1 -0
  151. package/lib/module/theme/index.js +1 -0
  152. package/lib/module/theme/index.js.map +1 -1
  153. package/lib/module/theme/themes.js +1 -1
  154. package/lib/typescript/src/components/Account/Account.d.ts.map +1 -1
  155. package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts +9 -6
  156. package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
  157. package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts +6 -2
  158. package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
  159. package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts +6 -2
  160. package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
  161. package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +7 -3
  162. package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
  163. package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts +6 -2
  164. package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
  165. package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +34 -0
  166. package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -0
  167. package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashImage/SplashImage.d.ts +2 -3
  168. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
  169. package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.d.ts +1 -1
  170. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
  171. package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.d.ts +1 -1
  172. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
  173. package/lib/typescript/src/components/Auth/index.d.ts +49 -11
  174. package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
  175. package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +5 -4
  176. package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
  177. package/lib/typescript/src/components/BlogView/BlogView.d.ts +1 -0
  178. package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
  179. package/lib/typescript/src/components/Button/MenuBtn.d.ts +1 -8
  180. package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -1
  181. package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
  182. package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
  183. package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
  184. package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
  185. package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
  186. package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
  187. package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts +1 -1
  188. package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
  189. package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
  190. package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
  191. package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
  192. package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
  193. package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
  194. package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
  195. package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
  196. package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -0
  197. package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
  198. package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -1
  199. package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -1
  200. package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
  201. package/lib/typescript/src/components/Content/Content.d.ts +1 -0
  202. package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
  203. package/lib/typescript/src/components/ContentView/MoreContentList.d.ts +27 -0
  204. package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -0
  205. package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
  206. package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
  207. package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
  208. package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
  209. package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
  210. package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
  211. package/lib/typescript/src/components/ContentView/index.d.ts +1 -0
  212. package/lib/typescript/src/components/ContentView/index.d.ts.map +1 -1
  213. package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
  214. package/lib/typescript/src/components/Headers/Three.d.ts +1 -0
  215. package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
  216. package/lib/typescript/src/components/Headers/Two.d.ts +1 -0
  217. package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
  218. package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
  219. package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -1
  220. package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
  221. package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts +1 -1
  222. package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts.map +1 -1
  223. package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
  224. package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
  225. package/lib/typescript/src/components/Search/components/RecentSearchesSection.d.ts.map +1 -1
  226. package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
  227. package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
  228. package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
  229. package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
  230. package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
  231. package/lib/typescript/src/components/TabBar/Three.d.ts +2 -2
  232. package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
  233. package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
  234. package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
  235. package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
  236. package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
  237. package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
  238. package/lib/typescript/src/components/index.d.ts +0 -1
  239. package/lib/typescript/src/components/index.d.ts.map +1 -1
  240. package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts +2 -4
  241. package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -1
  242. package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +1 -1
  243. package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +1 -1
  244. package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
  245. package/lib/typescript/src/hooks/usePaginatedSection.d.ts +1 -0
  246. package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
  247. package/lib/typescript/src/theme/ThemeProvider.d.ts +8 -4
  248. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
  249. package/lib/typescript/src/theme/hook/useTheme.d.ts +9 -0
  250. package/lib/typescript/src/theme/hook/useTheme.d.ts.map +1 -0
  251. package/lib/typescript/src/theme/index.d.ts +1 -0
  252. package/lib/typescript/src/theme/index.d.ts.map +1 -1
  253. package/lib/typescript/src/types/content/content-view.types.d.ts +7 -3
  254. package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
  255. package/package.json +3 -2
  256. package/src/components/Account/Account.tsx +7 -6
  257. package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +51 -32
  258. package/src/components/Auth/Login/LoginWithEmail.tsx +45 -26
  259. package/src/components/Auth/Login/LoginWithPhone.tsx +38 -24
  260. package/src/components/Auth/OTP/OTP.tsx +96 -61
  261. package/src/components/Auth/SignUp/SignUp.tsx +49 -31
  262. package/src/components/Auth/SplashScreen/SplashScreen.tsx +166 -0
  263. package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +66 -0
  264. package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.tsx +7 -19
  265. package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.tsx +23 -14
  266. package/src/components/Auth/index.ts +3 -1
  267. package/src/components/BackgroundLayout/BackgroundLayout.tsx +72 -50
  268. package/src/components/BlogView/BlogView.tsx +29 -9
  269. package/src/components/Button/BackBtn.tsx +1 -1
  270. package/src/components/Button/MenuBtn.tsx +6 -9
  271. package/src/components/Button/PrimaryBtn.tsx +3 -2
  272. package/src/components/Button/TextButton.tsx +3 -2
  273. package/src/components/Content/Card/Category/Category.tsx +3 -2
  274. package/src/components/Content/Card/NowWatching/NowWatching.tsx +15 -8
  275. package/src/components/Content/Card/Sliders/Styles/One.tsx +4 -3
  276. package/src/components/Content/Card/Sliders/Styles/Two.tsx +3 -2
  277. package/src/components/Content/Card/Sliders/index.ts +1 -1
  278. package/src/components/Content/Card/Styles/Five.tsx +7 -6
  279. package/src/components/Content/Card/Styles/Four.tsx +7 -6
  280. package/src/components/Content/Card/Styles/One.tsx +44 -111
  281. package/src/components/Content/Card/Styles/RotateInOut.tsx +5 -5
  282. package/src/components/Content/Card/Styles/Six.tsx +7 -5
  283. package/src/components/Content/Card/Styles/Three.tsx +5 -5
  284. package/src/components/Content/Card/Styles/TopTen.tsx +10 -14
  285. package/src/components/Content/Card/Styles/Two.tsx +9 -7
  286. package/src/components/Content/Card/components/CardPoster.tsx +24 -11
  287. package/src/components/Content/Card/components/NavigateToMore.tsx +4 -3
  288. package/src/components/Content/Card/components/NoContentFallback.tsx +5 -4
  289. package/src/components/Content/Card/components/ThumbnailCard.tsx +2 -1
  290. package/src/components/Content/Content.tsx +38 -7
  291. package/src/components/Content/Sections.tsx +1 -1
  292. package/src/components/ContentView/ContentView.tsx +6 -6
  293. package/src/components/ContentView/MoreContentList.tsx +238 -0
  294. package/src/components/ContentView/components/AboutSection.tsx +5 -4
  295. package/src/components/ContentView/components/CastCard.tsx +5 -4
  296. package/src/components/ContentView/components/EpisodeCard.tsx +30 -4
  297. package/src/components/ContentView/components/GenreTags.tsx +2 -1
  298. package/src/components/ContentView/components/HeroBanner.tsx +10 -6
  299. package/src/components/ContentView/components/Title.tsx +4 -3
  300. package/src/components/ContentView/index.ts +1 -0
  301. package/src/components/Headers/AppHeader.tsx +20 -34
  302. package/src/components/Headers/One.tsx +1 -1
  303. package/src/components/Headers/Three.tsx +4 -3
  304. package/src/components/Headers/Two.tsx +4 -3
  305. package/src/components/Input/InputOne.tsx +6 -4
  306. package/src/components/Input/InputTwo.tsx +5 -4
  307. package/src/components/Input/PhoneNumberInput.tsx +12 -11
  308. package/src/components/Keyboard/HideKeyboard.tsx +41 -15
  309. package/src/components/Logo/Logo.tsx +2 -1
  310. package/src/components/Search/One.tsx +6 -5
  311. package/src/components/Search/components/RecentSearchesSection.tsx +10 -9
  312. package/src/components/Search/components/SearchCard.tsx +6 -5
  313. package/src/components/Settings/AppSettings.tsx +14 -13
  314. package/src/components/Subscription/SubOne.tsx +16 -15
  315. package/src/components/TabBar/One.tsx +6 -3
  316. package/src/components/TabBar/Three.tsx +28 -14
  317. package/src/components/TabBar/Two.tsx +4 -2
  318. package/src/components/Text/Text.tsx +4 -4
  319. package/src/components/User/DeviceSessions/DeviceSessions.tsx +7 -6
  320. package/src/components/User/WatchHistory/WatchHistory.tsx +5 -7
  321. package/src/components/User/WatchLater/WatchLater.tsx +12 -9
  322. package/src/components/User/components/UserAvatar.tsx +1 -1
  323. package/src/components/User/components/UserSection.tsx +5 -4
  324. package/src/components/index.ts +0 -1
  325. package/src/components/layout/SafeAreaWrapper.tsx +16 -9
  326. package/src/hooks/useInitSplashCacheSync.ts +74 -87
  327. package/src/hooks/useKeyboard.ts +9 -8
  328. package/src/hooks/usePaginatedSection.ts +7 -3
  329. package/src/theme/ThemeProvider.tsx +59 -55
  330. package/src/theme/hook/useTheme.ts +41 -0
  331. package/src/theme/index.ts +1 -0
  332. package/src/theme/themes.ts +1 -1
  333. package/src/types/content/content-view.types.ts +4 -2
  334. package/lib/module/components/SplashScreen/SplashScreen.js +0 -109
  335. package/lib/module/components/SplashScreen/SplashScreen.js.map +0 -1
  336. package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js +0 -68
  337. package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js.map +0 -1
  338. package/lib/module/components/SplashScreen/components/SplashLottie/SplashLottie.js.map +0 -1
  339. package/lib/module/components/SplashScreen/components/SplashVideo/SplashVideo.js.map +0 -1
  340. package/lib/module/components/SplashScreen/index.js +0 -9
  341. package/lib/module/components/SplashScreen/index.js.map +0 -1
  342. package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts +0 -32
  343. package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts.map +0 -1
  344. package/lib/typescript/src/components/SplashScreen/components/SplashImage/SplashImage.d.ts.map +0 -1
  345. package/lib/typescript/src/components/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +0 -1
  346. package/lib/typescript/src/components/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +0 -1
  347. package/lib/typescript/src/components/SplashScreen/index.d.ts +0 -6
  348. package/lib/typescript/src/components/SplashScreen/index.d.ts.map +0 -1
  349. package/src/components/SplashScreen/SplashScreen.tsx +0 -131
  350. package/src/components/SplashScreen/components/SplashImage/SplashImage.tsx +0 -84
  351. package/src/components/SplashScreen/index.ts +0 -6
@@ -7,26 +7,31 @@ import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
7
7
  import HideKeyboard from '../../Keyboard/HideKeyboard';
8
8
  import { useKeyboard } from '../../../hooks/useKeyboard';
9
9
  import BackBtn from '../../Button/BackBtn';
10
- import { useTheme } from '../../../theme';
10
+ import { useTheme } from '../../../theme/hook/useTheme';
11
11
  import { Logo } from '../../Logo/Logo';
12
12
  import { Button } from '../../Button';
13
13
  import Display from '../../../utils/Display';
14
14
  import { Text } from '../../Text';
15
15
  import type { AppTheme } from '../../../theme/themes';
16
+ import { RFValue } from 'react-native-responsive-fontsize';
16
17
 
17
18
  type OTPProps = {
18
19
  title?: string;
19
20
  onSubmit?: (values: { otp: string }) => Promise<void> | void;
20
- onBackPress?: () => void;
21
+ onTopBackBtnPress?: () => void;
21
22
  containerStyle?: ViewStyle;
22
23
  titleStyle?: TextStyle;
23
24
  formStyle?: ViewStyle;
24
25
  backBtnStyle?: ViewStyle;
25
- backgroundImage?: string;
26
+ backgroundImage?: {
27
+ source?: string | null;
28
+ onImageError?: (error: Error) => void;
29
+ gradientSplitBackground?: number;
30
+ resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
31
+ };
26
32
  loading?: boolean;
27
33
  logoUri?: string;
28
34
  theme?: AppTheme;
29
- gradientEnabled?: boolean;
30
35
  otpDigitCount?: number;
31
36
  keyboardType?: KeyboardTypeOptions;
32
37
  phoneNumber?: string;
@@ -74,7 +79,7 @@ const DEFAULT_TEXT = {
74
79
  const OTP: React.FC<OTPProps> = ({
75
80
  title,
76
81
  onSubmit,
77
- onBackPress,
82
+ onTopBackBtnPress,
78
83
  containerStyle,
79
84
  titleStyle,
80
85
  formStyle,
@@ -82,8 +87,7 @@ const OTP: React.FC<OTPProps> = ({
82
87
  backgroundImage,
83
88
  loading = false,
84
89
  logoUri,
85
- theme,
86
- gradientEnabled = true,
90
+ theme: overrideTheme,
87
91
  otpDigitCount = 4,
88
92
  keyboardType = 'number-pad',
89
93
  phoneNumber,
@@ -100,7 +104,7 @@ const OTP: React.FC<OTPProps> = ({
100
104
  cellStyle,
101
105
  focusCellStyle
102
106
  }) => {
103
- const { theme: appliedTheme } = useTheme(theme);
107
+ const { theme: resolvedTheme } = useTheme(overrideTheme);
104
108
  const { isKeyboardOpen } = useKeyboard();
105
109
  const [otp, setOtp] = useState('');
106
110
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -122,22 +126,31 @@ const OTP: React.FC<OTPProps> = ({
122
126
  justifyContent: 'center',
123
127
  alignItems: 'center'
124
128
  },
125
- content: {
129
+ topBackBtnWrapper: {
130
+ position: 'absolute',
131
+ top: verticalScale(6),
132
+ left: 0,
133
+ zIndex: 10
134
+ },
135
+
136
+ centerContent: {
137
+ flex: 1,
126
138
  width: '100%',
127
139
  maxWidth: scale(400),
128
140
  alignItems: 'center',
129
- gap: verticalScale(12)
141
+ justifyContent: 'center',
142
+ gap: verticalScale(4)
130
143
  },
131
144
  title: {
132
- fontSize: scale(22),
145
+ fontSize: RFValue(21),
133
146
  fontWeight: '700',
134
147
  marginTop: verticalScale(8),
135
- color: appliedTheme.colors.textPrimary,
148
+ color: resolvedTheme.colors.textPrimary,
136
149
  textAlign: 'center'
137
150
  },
138
151
  sentText: {
139
- fontSize: scale(14),
140
- color: appliedTheme.colors.onSurfaceVariant,
152
+ fontSize: RFValue(12),
153
+ color: resolvedTheme.colors.onSurfaceVariant,
141
154
  textAlign: 'center',
142
155
  lineHeight: scale(18)
143
156
  },
@@ -149,7 +162,8 @@ const OTP: React.FC<OTPProps> = ({
149
162
  width: '100%',
150
163
  gap: verticalScale(20),
151
164
  alignItems: 'center',
152
- marginTop: verticalScale(24)
165
+ marginTop: verticalScale(24),
166
+ marginBottom: isKeyboardOpen ? verticalScale(20) : 0
153
167
  },
154
168
  codeFieldRoot: {
155
169
  width: Display.setWidth(80),
@@ -158,21 +172,32 @@ const OTP: React.FC<OTPProps> = ({
158
172
  cell: {
159
173
  width: scale(55),
160
174
  height: scale(55),
161
- fontSize: scale(30),
175
+ fontSize: RFValue(26),
162
176
  fontWeight: '500',
163
- paddingTop: Platform.OS === 'ios' ? scale(10) : scale(7),
177
+ paddingTop: Platform.OS === 'ios' ? scale(9) : scale(7),
164
178
  borderWidth: scale(1),
165
179
  borderRadius: scale(8),
180
+ justifyContent: 'center',
181
+ alignItems: 'center',
166
182
  textAlign: 'center',
167
- color: appliedTheme.colors.textPrimary,
168
- borderColor: appliedTheme.colors.outline
183
+ alignSelf: 'center',
184
+ overflow: 'hidden',
185
+ color: resolvedTheme.colors.textPrimary,
186
+ borderColor: resolvedTheme.colors.outline
169
187
  },
170
188
  focusCell: {
171
- borderColor: appliedTheme.colors.primary,
172
- backgroundColor: appliedTheme.colors.surface
189
+ borderColor: resolvedTheme.colors.primary,
190
+ backgroundColor: resolvedTheme.colors.surfaceVariant
173
191
  }
174
192
  }),
175
- [appliedTheme]
193
+ [
194
+ isKeyboardOpen,
195
+ resolvedTheme.colors.onSurfaceVariant,
196
+ resolvedTheme.colors.outline,
197
+ resolvedTheme.colors.primary,
198
+ resolvedTheme.colors.surfaceVariant,
199
+ resolvedTheme.colors.textPrimary
200
+ ]
176
201
  );
177
202
 
178
203
  useEffect(() => {
@@ -204,22 +229,28 @@ const OTP: React.FC<OTPProps> = ({
204
229
 
205
230
  const isLoading = loading || isSubmitting;
206
231
  const isSubmitDisabled = otp.length !== otpDigitCount || isLoading;
207
-
232
+ const shouldRender = (condition?: boolean | unknown): boolean => typeof condition === 'function' || !!condition;
208
233
  return (
209
234
  <BackgroundLayout
210
- gradientEnabled={gradientEnabled}
211
- backgroundImage={backgroundImage}
212
- gradientSplit={isKeyboardOpen ? 0.3 : 0.4}
235
+ theme={resolvedTheme}
236
+ backgroundImage={backgroundImage?.source}
237
+ gradientSplitBackground={isKeyboardOpen ? 0.3 : 0.4}
213
238
  >
214
- <HideKeyboard keyboardVerticalOffset={verticalScale(-80)}>
215
- <View style={[styles.container, containerStyle]}>
216
- {renderBackButton ? (
217
- renderBackButton({ onPress: onBackPress ?? (() => {}) })
218
- ) : onBackPress ? (
219
- <BackBtn theme={appliedTheme} style={backBtnStyle} onPress={onBackPress} />
220
- ) : null}
221
-
222
- <View style={styles.content}>
239
+ <View style={[styles.container, containerStyle]}>
240
+ {/* Top Back Button */}
241
+ {shouldRender(renderBackButton || onTopBackBtnPress) && (
242
+ <View style={styles.topBackBtnWrapper}>
243
+ {renderBackButton ? (
244
+ renderBackButton({
245
+ onPress: onTopBackBtnPress ?? (() => {})
246
+ })
247
+ ) : (
248
+ <BackBtn theme={resolvedTheme} style={backBtnStyle} onPress={onTopBackBtnPress} />
249
+ )}
250
+ </View>
251
+ )}
252
+ <HideKeyboard>
253
+ <View style={styles.centerContent}>
223
254
  {renderLogo ? renderLogo() : logoUri ? <Logo logoUri={logoUri} /> : null}
224
255
 
225
256
  {renderOtpHeader ? renderOtpHeader() : <Text style={[styles.title, titleStyle]}>{title}</Text>}
@@ -233,9 +264,9 @@ const OTP: React.FC<OTPProps> = ({
233
264
  <Text
234
265
  style={{
235
266
  fontWeight: '700',
236
- fontSize: scale(15),
267
+ fontSize: RFValue(13),
237
268
  marginTop: verticalScale(4),
238
- color: appliedTheme.colors.primary
269
+ color: resolvedTheme.colors.primary
239
270
  }}
240
271
  >
241
272
  {phoneNumber}
@@ -281,40 +312,44 @@ const OTP: React.FC<OTPProps> = ({
281
312
  ) : (
282
313
  <Button.Primary
283
314
  title={text.submitButton || DEFAULT_TEXT.submitButton}
284
- theme={appliedTheme}
315
+ theme={resolvedTheme}
285
316
  onPress={handleSubmit}
286
317
  loadingText={text.loadingSubmitBtnText}
318
+ titleStyle={{ fontSize: RFValue(13) }}
287
319
  disabled={isSubmitDisabled}
288
320
  loading={isLoading}
289
321
  />
290
322
  )}
291
323
 
292
324
  {/* Resend OTP Section */}
293
- <View style={{ alignItems: 'center', marginTop: verticalScale(10) }}>
294
- {renderResendButton ? (
295
- renderResendButton({
296
- onPress: handleResendOtp,
297
- disabled: resendTimer > 0
298
- })
299
- ) : (
300
- <Text
301
- onPress={resendTimer <= 0 ? handleResendOtp : undefined}
302
- style={{
303
- fontSize: scale(14),
304
- color: resendTimer > 0 ? appliedTheme.colors.onSurfaceVariant : appliedTheme.colors.primary,
305
- textAlign: 'center'
306
- }}
307
- >
308
- {resendTimer > 0
309
- ? `${text?.resendOtpCountdownText || DEFAULT_TEXT.resendOtpCountdownText} ${resendTimer}s`
310
- : text?.resendOtpText || DEFAULT_TEXT.resendOtpText}
311
- </Text>
312
- )}
313
- </View>
325
+
326
+ {!isKeyboardOpen && (
327
+ <View style={{ alignItems: 'center', marginTop: verticalScale(10) }}>
328
+ {renderResendButton ? (
329
+ renderResendButton({
330
+ onPress: handleResendOtp,
331
+ disabled: resendTimer > 0
332
+ })
333
+ ) : (
334
+ <Text
335
+ onPress={resendTimer <= 0 ? handleResendOtp : undefined}
336
+ style={{
337
+ fontSize: RFValue(12),
338
+ color: resendTimer > 0 ? resolvedTheme.colors.onSurfaceVariant : resolvedTheme.colors.primary,
339
+ textAlign: 'center'
340
+ }}
341
+ >
342
+ {resendTimer > 0
343
+ ? `${text?.resendOtpCountdownText || DEFAULT_TEXT.resendOtpCountdownText} ${resendTimer}s`
344
+ : text?.resendOtpText || DEFAULT_TEXT.resendOtpText}
345
+ </Text>
346
+ )}
347
+ </View>
348
+ )}
314
349
  </View>
315
350
  </View>
316
- </View>
317
- </HideKeyboard>
351
+ </HideKeyboard>
352
+ </View>
318
353
  </BackgroundLayout>
319
354
  );
320
355
  };
@@ -11,12 +11,13 @@ import { Button } from '../../Button';
11
11
  import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
12
12
  import { Logo } from '../../Logo/Logo';
13
13
  import TextButton from '../../Button/TextButton';
14
- import { useTheme } from '../../../theme';
14
+ import { useTheme } from '../../../theme/hook/useTheme';
15
15
  import { useKeyboard } from '../../../hooks/useKeyboard';
16
16
  import HideKeyboard from '../../Keyboard/HideKeyboard';
17
17
  import BackBtn from '../../Button/BackBtn';
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 FormValues = {
22
23
  username: string;
@@ -37,11 +38,15 @@ export interface SignupProps {
37
38
  inputContainerStyle?: ViewStyle;
38
39
  topBackBtnStyle?: ViewStyle;
39
40
  minPasswordLength?: number;
40
- backgroundImage?: string;
41
+ backgroundImage?: {
42
+ source?: string | null;
43
+ onImageError?: (error: Error) => void;
44
+ gradientSplitBackground?: number;
45
+ resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
46
+ };
41
47
  logoUri?: string;
42
48
  theme?: AppTheme;
43
49
  loadingSubmitBtn?: boolean;
44
- gradientEnabled?: boolean;
45
50
  text?: {
46
51
  usernameLabel?: string;
47
52
  usernamePlaceholder?: string;
@@ -80,8 +85,7 @@ const Signup: React.FC<SignupProps> = ({
80
85
  loadingSubmitBtn,
81
86
  backgroundImage,
82
87
  logoUri,
83
- theme,
84
- gradientEnabled,
88
+ theme: overrideTheme,
85
89
  text,
86
90
  loginTextProps,
87
91
  loginLinkTextProps,
@@ -105,8 +109,7 @@ const Signup: React.FC<SignupProps> = ({
105
109
  },
106
110
  mode: 'onChange'
107
111
  });
108
-
109
- const { theme: appliedTheme } = useTheme(theme);
112
+ const { theme: resolvedTheme } = useTheme(overrideTheme);
110
113
  const { isKeyboardOpen } = useKeyboard();
111
114
  const [isLoading, setIsLoading] = React.useState(false);
112
115
 
@@ -129,20 +132,24 @@ const Signup: React.FC<SignupProps> = ({
129
132
 
130
133
  return (
131
134
  <BackgroundLayout
132
- gradientEnabled={gradientEnabled}
133
- backgroundImage={backgroundImage}
134
- gradientSplit={isKeyboardOpen ? (Platform.OS === 'ios' ? 0.19 : 0.14) : 0.3}
135
+ theme={resolvedTheme}
136
+ backgroundImage={backgroundImage?.source}
137
+ gradientSplitBackground={isKeyboardOpen ? (Platform.OS === 'ios' ? 0.19 : 0.14) : 0.3}
135
138
  >
136
- <HideKeyboard>
137
- <View style={[styles.container, containerStyle]}>
138
- {/* Top Back Button */}
139
- {shouldRender(renderTopBackBtn || onTopBackBtnPress) &&
140
- (renderTopBackBtn ? (
141
- renderTopBackBtn({ onPress: onTopBackBtnPress ?? (() => {}) })
139
+ <View style={[styles.container, containerStyle]}>
140
+ {/* Top Back Button */}
141
+ {shouldRender(renderTopBackBtn || onTopBackBtnPress) && (
142
+ <View style={styles.topBackBtnWrapper}>
143
+ {renderTopBackBtn ? (
144
+ renderTopBackBtn({
145
+ onPress: onTopBackBtnPress ?? (() => {})
146
+ })
142
147
  ) : (
143
- <BackBtn theme={appliedTheme} style={topBackBtnStyle} onPress={onTopBackBtnPress} />
144
- ))}
145
-
148
+ <BackBtn theme={resolvedTheme} style={topBackBtnStyle} onPress={onTopBackBtnPress} />
149
+ )}
150
+ </View>
151
+ )}
152
+ <HideKeyboard keyboardVerticalOffset={scale(-50)}>
146
153
  <View style={styles.centerContent}>
147
154
  {/* Logo */}
148
155
  {renderLogo ? renderLogo() : logoUri ? <Logo logoUri={logoUri} /> : null}
@@ -172,7 +179,7 @@ const Signup: React.FC<SignupProps> = ({
172
179
  errorMessage={errors.username?.message}
173
180
  inputStyle={inputStyle}
174
181
  containerStyle={inputContainerStyle}
175
- theme={appliedTheme}
182
+ theme={resolvedTheme}
176
183
  />
177
184
  )}
178
185
  />
@@ -203,7 +210,7 @@ const Signup: React.FC<SignupProps> = ({
203
210
  errorMessage={errors.email?.message}
204
211
  inputStyle={inputStyle}
205
212
  containerStyle={inputContainerStyle}
206
- theme={appliedTheme}
213
+ theme={resolvedTheme}
207
214
  textContentType="emailAddress"
208
215
  autoCapitalize="none"
209
216
  keyboardType="email-address"
@@ -239,10 +246,12 @@ const Signup: React.FC<SignupProps> = ({
239
246
  error={!!touchedFields.password && !!errors.password}
240
247
  errorMessage={errors.password?.message}
241
248
  containerStyle={inputContainerStyle}
242
- textContentType="password"
249
+ textContentType="none"
243
250
  autoCapitalize="none"
251
+ spellCheck={false}
244
252
  autoCorrect={false}
245
- theme={appliedTheme}
253
+ autoComplete="off"
254
+ theme={resolvedTheme}
246
255
  />
247
256
  )}
248
257
  />
@@ -271,10 +280,12 @@ const Signup: React.FC<SignupProps> = ({
271
280
  errorMessage={errors.confirmPassword?.message}
272
281
  inputStyle={inputStyle}
273
282
  containerStyle={inputContainerStyle}
274
- theme={appliedTheme}
275
- textContentType="password"
283
+ theme={resolvedTheme}
284
+ textContentType="none"
276
285
  autoCapitalize="none"
286
+ spellCheck={false}
277
287
  autoCorrect={false}
288
+ autoComplete="off"
278
289
  />
279
290
  )}
280
291
  />
@@ -291,7 +302,7 @@ const Signup: React.FC<SignupProps> = ({
291
302
  <Button.Primary
292
303
  title={text?.signupButton || 'Sign up'}
293
304
  disabled={!isValid}
294
- theme={appliedTheme}
305
+ theme={resolvedTheme}
295
306
  loading={loadingSubmitBtn || isLoading}
296
307
  loadingText={text?.loadingSubmitBtnText || 'Signing up...'}
297
308
  onPress={handleSubmit(handleFormSubmit)}
@@ -309,7 +320,7 @@ const Signup: React.FC<SignupProps> = ({
309
320
  <View style={styles.loginContainerWrapper}>
310
321
  <View style={styles.loginContainer}>
311
322
  <View style={styles.loginRow}>
312
- <Text style={[styles.loginPrompt, loginTextProps]} color={appliedTheme?.colors?.textPrimary}>
323
+ <Text style={[styles.loginPrompt, loginTextProps]} color={resolvedTheme?.colors?.textPrimary}>
313
324
  {text?.loginPrompt || `Already have an account?`}
314
325
  </Text>
315
326
  <TextButton
@@ -322,15 +333,15 @@ const Signup: React.FC<SignupProps> = ({
322
333
  }}
323
334
  bold
324
335
  underline
325
- color={appliedTheme?.colors?.button}
336
+ color={resolvedTheme?.colors?.button}
326
337
  style={loginLinkTextProps}
327
338
  />
328
339
  </View>
329
340
  </View>
330
341
  </View>
331
342
  ))}
332
- </View>
333
- </HideKeyboard>
343
+ </HideKeyboard>
344
+ </View>
334
345
  </BackgroundLayout>
335
346
  );
336
347
  };
@@ -345,13 +356,20 @@ const styles = StyleSheet.create({
345
356
  justifyContent: 'center',
346
357
  alignItems: 'center'
347
358
  },
359
+ topBackBtnWrapper: {
360
+ position: 'absolute',
361
+ top: verticalScale(6),
362
+ left: 0,
363
+ zIndex: 10
364
+ },
348
365
  centerContent: {
366
+ flex: 1,
349
367
  width: '100%',
350
368
  alignItems: 'center',
351
369
  justifyContent: 'center'
352
370
  },
353
371
  title: {
354
- fontSize: scale(22),
372
+ fontSize: RFValue(21),
355
373
  fontWeight: '700',
356
374
  marginTop: verticalScale(5),
357
375
  marginBottom: verticalScale(20)
@@ -0,0 +1,166 @@
1
+ /**
2
+ * @author Naresh Dhamu
3
+ * @lastModified Wed 30 Jul 2025 at 03:21 PM
4
+ */
5
+
6
+ import React, { useEffect, useMemo, useCallback } from 'react';
7
+ import SplashImage from './components/SplashImage/SplashImage';
8
+ import SplashVideo from './components/SplashVideo/SplashVideo';
9
+ import SplashLottie from './components/SplashLottie/SplashLottie';
10
+ import { StatusBar, type ViewStyle } from 'react-native';
11
+ import type { AppTheme } from '../../../theme/themes';
12
+ import { useTheme } from '../../../theme';
13
+ import { useInitSplashCacheSync } from '../../../hooks/useInitSplashCacheSync';
14
+ import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
15
+ import Color from 'color';
16
+ type SplashSourceType = 'image' | 'video' | 'lottie-animation';
17
+
18
+ type SplashScreenConfig = {
19
+ source: string;
20
+ type?: SplashSourceType;
21
+ width: number;
22
+ height: number;
23
+ isStatic?: boolean;
24
+ screenTime?: number;
25
+ fullscreen?: boolean;
26
+ resizeMode?: 'contain' | 'cover' | 'stretch' | 'repeat' | 'center';
27
+ backgroundColor?: string;
28
+ };
29
+
30
+ type SplashScreenProps = {
31
+ splashScreenConfig: SplashScreenConfig;
32
+ innerContainerStyle?: ViewStyle;
33
+ onRedirect: () => void;
34
+ theme?: AppTheme;
35
+ backgroundImage?: {
36
+ source?: string | null;
37
+ onImageError?: (error: Error) => void;
38
+ gradientSplitBackground?: number;
39
+ resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
40
+ };
41
+ };
42
+
43
+ const DEFAULT_IMAGE_TIMEOUT_SECONDS = 5;
44
+
45
+ export const SplashScreen: React.FC<SplashScreenProps> = ({
46
+ splashScreenConfig: {
47
+ source: splashSource,
48
+ type: splashType = 'image',
49
+ width,
50
+ height,
51
+ isStatic = false,
52
+ screenTime,
53
+ fullscreen = false,
54
+ resizeMode = 'contain',
55
+ backgroundColor: splashBackgroundColor
56
+ },
57
+ innerContainerStyle,
58
+ backgroundImage = {
59
+ gradientSplitBackground: 0.4,
60
+ resizeMode: 'cover'
61
+ },
62
+ onRedirect,
63
+ theme: overrideTheme
64
+ }) => {
65
+ const isRemoteSource = useMemo(() => splashSource.startsWith('http'), [splashSource]);
66
+ const { theme: resolvedTheme } = useTheme(overrideTheme);
67
+
68
+ const isImageSplash = splashType === 'image';
69
+ const backgroundImageUri =
70
+ isImageSplash && backgroundImage.source?.startsWith('http') ? backgroundImage.source : undefined;
71
+
72
+ const {
73
+ data: { localPathLogo }
74
+ } = useInitSplashCacheSync({
75
+ logoUrl: isRemoteSource ? splashSource : undefined,
76
+ backgroundUrl: backgroundImageUri
77
+ });
78
+
79
+ const resolvedSplashUri = isRemoteSource && localPathLogo ? localPathLogo : splashSource;
80
+ const effectiveTimeout = useMemo(() => {
81
+ const timeout = screenTime ?? (isImageSplash || isStatic ? DEFAULT_IMAGE_TIMEOUT_SECONDS : 0);
82
+ return Number.isFinite(timeout) ? Number(timeout) : 0;
83
+ }, [screenTime, isImageSplash, isStatic]);
84
+
85
+ const handleRedirect = useCallback(() => {
86
+ try {
87
+ onRedirect();
88
+ } catch (err) {
89
+ console.error('[SplashScreen] Redirect error:', err);
90
+ }
91
+ }, [onRedirect]);
92
+
93
+ useEffect(() => {
94
+ const fallbackTimeout = 0.5; // fallback to 0.5s even if 0
95
+ const timeout = effectiveTimeout > 0 ? effectiveTimeout : fallbackTimeout;
96
+ const timer = setTimeout(() => {
97
+ handleRedirect();
98
+ }, timeout * 1000);
99
+ return () => {
100
+ clearTimeout(timer);
101
+ };
102
+ }, [effectiveTimeout, handleRedirect]);
103
+
104
+ const splashComponentProps = useMemo(
105
+ () => ({
106
+ source: resolvedSplashUri,
107
+ width,
108
+ height,
109
+ fullscreen,
110
+ resizeMode: resizeMode as any
111
+ }),
112
+ [resolvedSplashUri, width, height, fullscreen, resizeMode]
113
+ );
114
+
115
+ const renderSplashContent = useCallback(() => {
116
+ switch (splashType) {
117
+ case 'video':
118
+ return <SplashVideo {...splashComponentProps} onEnd={effectiveTimeout ? undefined : handleRedirect} />;
119
+ case 'lottie-animation':
120
+ return (
121
+ <SplashLottie {...splashComponentProps} onAnimationFinish={effectiveTimeout ? undefined : handleRedirect} />
122
+ );
123
+ case 'image':
124
+ default:
125
+ return <SplashImage {...splashComponentProps} />;
126
+ }
127
+ }, [splashType, splashComponentProps, effectiveTimeout, handleRedirect]);
128
+ const getSafeBackgroundColor = (inputColor: string | undefined, fallbackColor: string): string => {
129
+ try {
130
+ if (!inputColor) return fallbackColor;
131
+
132
+ const parsedColor = Color(inputColor);
133
+ const alpha = parsedColor.alpha(); // 0 to 1
134
+
135
+ if (alpha < 0.8) return fallbackColor; // ✅ your condition
136
+
137
+ return parsedColor.hex(); // Always convert to solid hex
138
+ } catch (e) {
139
+ return fallbackColor;
140
+ }
141
+ };
142
+ const colorToUse = getSafeBackgroundColor(splashBackgroundColor, resolvedTheme.colors.background);
143
+ const isDark = Color(colorToUse).isDark();
144
+ const statusBarStyle: 'light-content' | 'dark-content' = isDark ? 'light-content' : 'dark-content';
145
+
146
+ return (
147
+ <BackgroundLayout
148
+ backgroundImage={isImageSplash ? backgroundImage.source : undefined}
149
+ backgroundColor={splashBackgroundColor}
150
+ resizeMode={backgroundImage.resizeMode ?? 'cover'}
151
+ innerContainerStyle={innerContainerStyle}
152
+ onImageError={backgroundImage.onImageError}
153
+ theme={resolvedTheme}
154
+ gradientSplitBackground={backgroundImage.gradientSplitBackground ?? 0.4}
155
+ >
156
+ <StatusBar translucent backgroundColor="transparent" barStyle={statusBarStyle} />
157
+
158
+ {renderSplashContent()}
159
+ </BackgroundLayout>
160
+ );
161
+ };
162
+
163
+ namespace SplashScreen {
164
+ export type Config = SplashScreenConfig;
165
+ export type Props = SplashScreenProps;
166
+ }