@zezosoft/zezo-ott-react-native-ui-kit 1.1.1 → 1.1.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 (349) hide show
  1. package/lib/module/Styles/globalStyles.js +0 -5
  2. package/lib/module/Styles/globalStyles.js.map +1 -1
  3. package/lib/module/components/Auth/AuthProvider/AuthProvider.js +64 -40
  4. package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
  5. package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +5 -2
  6. package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
  7. package/lib/module/components/Auth/Login/LoginWithEmail.js +17 -11
  8. package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
  9. package/lib/module/components/Auth/Login/LoginWithPhone.js +12 -6
  10. package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
  11. package/lib/module/components/Auth/OTP/OTP.js +7 -4
  12. package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
  13. package/lib/module/components/Auth/QrLogin/QrLogin.js +133 -86
  14. package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
  15. package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +174 -109
  16. package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
  17. package/lib/module/components/Auth/SignUp/SignUp.js +19 -13
  18. package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
  19. package/lib/module/components/Auth/SplashScreen/SplashScreen.js +54 -36
  20. package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
  21. package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +29 -11
  22. package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
  23. package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +13 -7
  24. package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
  25. package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +33 -21
  26. package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
  27. package/lib/module/components/BackgroundLayout/BackgroundLayout.js +26 -20
  28. package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
  29. package/lib/module/components/BlogView/BlogView.js +36 -20
  30. package/lib/module/components/BlogView/BlogView.js.map +1 -1
  31. package/lib/module/components/Button/BackBtn.js +24 -20
  32. package/lib/module/components/Button/BackBtn.js.map +1 -1
  33. package/lib/module/components/Button/PrimaryBtn.js +19 -13
  34. package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
  35. package/lib/module/components/Button/SecondaryBtn.js +19 -13
  36. package/lib/module/components/Button/SecondaryBtn.js.map +1 -1
  37. package/lib/module/components/Button/TextButton.js +19 -13
  38. package/lib/module/components/Button/TextButton.js.map +1 -1
  39. package/lib/module/components/Content/Card/Category/Category.js +70 -37
  40. package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
  41. package/lib/module/components/Content/Card/Sliders/Styles/One.js +40 -32
  42. package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
  43. package/lib/module/components/Content/Card/Sliders/Styles/Two.js +109 -48
  44. package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
  45. package/lib/module/components/Content/Card/Styles/RotateInOut.js +4 -11
  46. package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
  47. package/lib/module/components/Content/Card/components/CardPoster.js +105 -43
  48. package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
  49. package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +18 -17
  50. package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -1
  51. package/lib/module/components/Content/Card/components/ThumbnailCard.js +78 -28
  52. package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
  53. package/lib/module/components/Content/Content.js +44 -25
  54. package/lib/module/components/Content/Content.js.map +1 -1
  55. package/lib/module/components/Content/Sections.js +37 -29
  56. package/lib/module/components/Content/Sections.js.map +1 -1
  57. package/lib/module/components/ContentView/ContentView.js +70 -41
  58. package/lib/module/components/ContentView/ContentView.js.map +1 -1
  59. package/lib/module/components/ContentView/MoreContentList.js +74 -40
  60. package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
  61. package/lib/module/components/ContentView/components/AboutSection.js +40 -19
  62. package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
  63. package/lib/module/components/ContentView/components/CastCard.js +6 -7
  64. package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
  65. package/lib/module/components/ContentView/components/EpisodeCard.js +2 -2
  66. package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
  67. package/lib/module/components/ContentView/components/GenreTags.js +25 -13
  68. package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
  69. package/lib/module/components/ContentView/components/HeroBanner.js +39 -11
  70. package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
  71. package/lib/module/components/ContentView/components/MiniInfo.js +84 -77
  72. package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
  73. package/lib/module/components/ContentView/components/PlayButton.js +11 -7
  74. package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
  75. package/lib/module/components/ContentView/components/Title.js +12 -12
  76. package/lib/module/components/ContentView/components/Title.js.map +1 -1
  77. package/lib/module/components/ContentView/components/TrailerButton.js +12 -7
  78. package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
  79. package/lib/module/components/Fallbacks/NoContentFallback.js +27 -22
  80. package/lib/module/components/Fallbacks/NoContentFallback.js.map +1 -1
  81. package/lib/module/components/Fallbacks/NotFoundFallback.js +6 -4
  82. package/lib/module/components/Fallbacks/NotFoundFallback.js.map +1 -1
  83. package/lib/module/components/Headers/AppHeader.js +22 -13
  84. package/lib/module/components/Headers/AppHeader.js.map +1 -1
  85. package/lib/module/components/Headers/Three.js +6 -5
  86. package/lib/module/components/Headers/Three.js.map +1 -1
  87. package/lib/module/components/Headers/Two.js +19 -14
  88. package/lib/module/components/Headers/Two.js.map +1 -1
  89. package/lib/module/components/Input/InputOne.js +46 -31
  90. package/lib/module/components/Input/InputOne.js.map +1 -1
  91. package/lib/module/components/Loader/Loader.js +2 -2
  92. package/lib/module/components/Loader/Loader.js.map +1 -1
  93. package/lib/module/components/Logo/Logo.js +17 -14
  94. package/lib/module/components/Logo/Logo.js.map +1 -1
  95. package/lib/module/components/Search/One.js +2 -1
  96. package/lib/module/components/Search/One.js.map +1 -1
  97. package/lib/module/components/Search/components/SearchCard.js +15 -19
  98. package/lib/module/components/Search/components/SearchCard.js.map +1 -1
  99. package/lib/module/components/Settings/AppSettings.js +97 -62
  100. package/lib/module/components/Settings/AppSettings.js.map +1 -1
  101. package/lib/module/components/Subscription/SubOne.js +313 -254
  102. package/lib/module/components/Subscription/SubOne.js.map +1 -1
  103. package/lib/module/components/Text/Text.js +15 -12
  104. package/lib/module/components/Text/Text.js.map +1 -1
  105. package/lib/module/components/User/DeviceSessions/DeviceSessions.js +25 -23
  106. package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
  107. package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +23 -18
  108. package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
  109. package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +38 -24
  110. package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
  111. package/lib/module/components/User/WatchHistory/WatchHistory.js +21 -14
  112. package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
  113. package/lib/module/components/User/WatchLater/WatchLater.js +30 -21
  114. package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
  115. package/lib/module/components/User/components/UserAvatar.js +38 -19
  116. package/lib/module/components/User/components/UserAvatar.js.map +1 -1
  117. package/lib/module/components/User/components/UserSection.js +37 -17
  118. package/lib/module/components/User/components/UserSection.js.map +1 -1
  119. package/lib/module/components/View/View.js +7 -4
  120. package/lib/module/components/View/View.js.map +1 -1
  121. package/lib/module/components/index.js +0 -1
  122. package/lib/module/components/index.js.map +1 -1
  123. package/lib/module/hooks/index.js +17 -0
  124. package/lib/module/hooks/index.js.map +1 -0
  125. package/lib/module/hooks/useDebounce.js +25 -6
  126. package/lib/module/hooks/useDebounce.js.map +1 -1
  127. package/lib/module/hooks/useKeyboard.js +7 -4
  128. package/lib/module/hooks/useKeyboard.js.map +1 -1
  129. package/lib/module/hooks/useNavigationMode.js +10 -4
  130. package/lib/module/hooks/useNavigationMode.js.map +1 -1
  131. package/lib/module/hooks/usePaginatedSection.js +1 -1
  132. package/lib/module/hooks/usePaginatedSection.js.map +1 -1
  133. package/lib/module/hooks/usePrevious.js +30 -0
  134. package/lib/module/hooks/usePrevious.js.map +1 -0
  135. package/lib/module/hooks/useSafeCallback.js +33 -0
  136. package/lib/module/hooks/useSafeCallback.js.map +1 -0
  137. package/lib/module/hooks/useSkeletonItems.js +33 -0
  138. package/lib/module/hooks/useSkeletonItems.js.map +1 -0
  139. package/lib/module/hooks/useSplashCache.js +2 -1
  140. package/lib/module/hooks/useSplashCache.js.map +1 -1
  141. package/lib/module/hooks/useThemeColors.js +33 -0
  142. package/lib/module/hooks/useThemeColors.js.map +1 -0
  143. package/lib/module/theme/ThemeProvider.js +17 -11
  144. package/lib/module/theme/ThemeProvider.js.map +1 -1
  145. package/lib/module/theme/hook/useInternalTheme.js +18 -11
  146. package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
  147. package/lib/module/theme/hook/useThemeStatusBar.js +10 -4
  148. package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -1
  149. package/lib/typescript/src/Styles/globalStyles.d.ts +0 -5
  150. package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -1
  151. package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
  152. package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
  153. package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
  154. package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
  155. package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
  156. package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +0 -15
  157. package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
  158. package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +0 -1
  159. package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
  160. package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
  161. package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
  162. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -1
  163. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -1
  164. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
  165. package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
  166. package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +1 -1
  167. package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
  168. package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -1
  169. package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
  170. package/lib/typescript/src/components/Button/BackBtn.d.ts +2 -2
  171. package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
  172. package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -1
  173. package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
  174. package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +2 -1
  175. package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -1
  176. package/lib/typescript/src/components/Button/TextButton.d.ts +2 -2
  177. package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
  178. package/lib/typescript/src/components/Button/index.d.ts +2 -2
  179. package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
  180. package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
  181. package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
  182. package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
  183. package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
  184. package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +2 -2
  185. package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -1
  186. package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +2 -0
  187. package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
  188. package/lib/typescript/src/components/Content/Content.d.ts +2 -0
  189. package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
  190. package/lib/typescript/src/components/Content/Sections.d.ts +2 -2
  191. package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
  192. package/lib/typescript/src/components/ContentView/ContentView.d.ts +6 -1
  193. package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
  194. package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
  195. package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts +2 -1
  196. package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
  197. package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +6 -1
  198. package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
  199. package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +2 -1
  200. package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
  201. package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +1 -1
  202. package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
  203. package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +2 -1
  204. package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
  205. package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +1 -1
  206. package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
  207. package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +2 -1
  208. package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -1
  209. package/lib/typescript/src/components/ContentView/components/Title.d.ts +1 -1
  210. package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
  211. package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -1
  212. package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
  213. package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts +2 -1
  214. package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts.map +1 -1
  215. package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts +1 -1
  216. package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts.map +1 -1
  217. package/lib/typescript/src/components/Headers/AppHeader.d.ts +2 -2
  218. package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
  219. package/lib/typescript/src/components/Headers/Three.d.ts +2 -2
  220. package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
  221. package/lib/typescript/src/components/Headers/Two.d.ts +2 -2
  222. package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
  223. package/lib/typescript/src/components/Headers/index.d.ts +2 -2
  224. package/lib/typescript/src/components/Input/Input.d.ts +1 -1
  225. package/lib/typescript/src/components/Input/InputOne.d.ts +2 -2
  226. package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
  227. package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
  228. package/lib/typescript/src/components/Logo/Logo.d.ts +2 -1
  229. package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
  230. package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
  231. package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -5
  232. package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
  233. package/lib/typescript/src/components/Search/index.d.ts +1 -1
  234. package/lib/typescript/src/components/Settings/AppSettings.d.ts +2 -2
  235. package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
  236. package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
  237. package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
  238. package/lib/typescript/src/components/Text/Text.d.ts +2 -2
  239. package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
  240. package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -1
  241. package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
  242. package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +1 -1
  243. package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
  244. package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +1 -1
  245. package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -1
  246. package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +1 -1
  247. package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
  248. package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +1 -1
  249. package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
  250. package/lib/typescript/src/components/User/components/UserAvatar.d.ts +1 -1
  251. package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
  252. package/lib/typescript/src/components/User/components/UserSection.d.ts +1 -1
  253. package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
  254. package/lib/typescript/src/components/View/View.d.ts +2 -0
  255. package/lib/typescript/src/components/View/View.d.ts.map +1 -1
  256. package/lib/typescript/src/components/index.d.ts +0 -1
  257. package/lib/typescript/src/components/index.d.ts.map +1 -1
  258. package/lib/typescript/src/hooks/index.d.ts +14 -0
  259. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  260. package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
  261. package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
  262. package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -1
  263. package/lib/typescript/src/hooks/usePrevious.d.ts +12 -0
  264. package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
  265. package/lib/typescript/src/hooks/useSafeCallback.d.ts +15 -0
  266. package/lib/typescript/src/hooks/useSafeCallback.d.ts.map +1 -0
  267. package/lib/typescript/src/hooks/useSkeletonItems.d.ts +11 -0
  268. package/lib/typescript/src/hooks/useSkeletonItems.d.ts.map +1 -0
  269. package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
  270. package/lib/typescript/src/hooks/useThemeColors.d.ts +27 -0
  271. package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
  272. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
  273. package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
  274. package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -1
  275. package/package.json +2 -2
  276. package/src/Styles/globalStyles.ts +0 -5
  277. package/src/components/Auth/AuthProvider/AuthProvider.tsx +288 -212
  278. package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +11 -4
  279. package/src/components/Auth/Login/LoginWithEmail.tsx +266 -238
  280. package/src/components/Auth/Login/LoginWithPhone.tsx +18 -6
  281. package/src/components/Auth/OTP/OTP.tsx +21 -5
  282. package/src/components/Auth/QrLogin/QrLogin.tsx +225 -185
  283. package/src/components/Auth/QrLogin/components/QrViewArea.tsx +282 -166
  284. package/src/components/Auth/SignUp/SignUp.tsx +312 -293
  285. package/src/components/Auth/SplashScreen/SplashScreen.tsx +186 -131
  286. package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +32 -15
  287. package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +11 -5
  288. package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +34 -18
  289. package/src/components/BackgroundLayout/BackgroundLayout.tsx +43 -37
  290. package/src/components/BlogView/BlogView.tsx +66 -30
  291. package/src/components/Button/BackBtn.tsx +64 -34
  292. package/src/components/Button/PrimaryBtn.tsx +42 -25
  293. package/src/components/Button/SecondaryBtn.tsx +41 -25
  294. package/src/components/Button/TextButton.tsx +54 -32
  295. package/src/components/Content/Card/Category/Category.tsx +94 -56
  296. package/src/components/Content/Card/Sliders/Styles/One.tsx +63 -47
  297. package/src/components/Content/Card/Sliders/Styles/Two.tsx +131 -51
  298. package/src/components/Content/Card/Styles/RotateInOut.tsx +7 -9
  299. package/src/components/Content/Card/components/CardPoster.tsx +136 -55
  300. package/src/components/Content/Card/components/RentOrBuyIcon.tsx +58 -38
  301. package/src/components/Content/Card/components/ThumbnailCard.tsx +122 -47
  302. package/src/components/Content/Content.tsx +164 -97
  303. package/src/components/Content/Sections.tsx +99 -43
  304. package/src/components/ContentView/ContentView.tsx +194 -128
  305. package/src/components/ContentView/MoreContentList.tsx +215 -151
  306. package/src/components/ContentView/components/AboutSection.tsx +132 -93
  307. package/src/components/ContentView/components/CastCard.tsx +148 -138
  308. package/src/components/ContentView/components/EpisodeCard.tsx +160 -155
  309. package/src/components/ContentView/components/GenreTags.tsx +68 -53
  310. package/src/components/ContentView/components/HeroBanner.tsx +326 -284
  311. package/src/components/ContentView/components/MiniInfo.tsx +181 -159
  312. package/src/components/ContentView/components/PlayButton.tsx +27 -16
  313. package/src/components/ContentView/components/Title.tsx +89 -72
  314. package/src/components/ContentView/components/TrailerButton.tsx +35 -22
  315. package/src/components/Fallbacks/NoContentFallback.tsx +107 -103
  316. package/src/components/Fallbacks/NotFoundFallback.tsx +12 -4
  317. package/src/components/Headers/AppHeader.tsx +42 -26
  318. package/src/components/Headers/Three.tsx +12 -8
  319. package/src/components/Headers/Two.tsx +31 -10
  320. package/src/components/Input/InputOne.tsx +136 -108
  321. package/src/components/Loader/Loader.tsx +2 -2
  322. package/src/components/Logo/Logo.tsx +43 -27
  323. package/src/components/Search/One.tsx +2 -4
  324. package/src/components/Search/components/SearchCard.tsx +19 -13
  325. package/src/components/Settings/AppSettings.tsx +217 -128
  326. package/src/components/Subscription/SubOne.tsx +394 -317
  327. package/src/components/Text/Text.tsx +33 -22
  328. package/src/components/User/DeviceSessions/DeviceSessions.tsx +129 -102
  329. package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +36 -17
  330. package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +194 -140
  331. package/src/components/User/WatchHistory/WatchHistory.tsx +63 -36
  332. package/src/components/User/WatchLater/WatchLater.tsx +119 -81
  333. package/src/components/User/components/UserAvatar.tsx +49 -15
  334. package/src/components/User/components/UserSection.tsx +71 -37
  335. package/src/components/View/View.tsx +10 -2
  336. package/src/components/index.ts +0 -1
  337. package/src/hooks/index.ts +14 -0
  338. package/src/hooks/useDebounce.ts +25 -6
  339. package/src/hooks/useKeyboard.ts +12 -5
  340. package/src/hooks/useNavigationMode.ts +16 -5
  341. package/src/hooks/usePaginatedSection.ts +1 -1
  342. package/src/hooks/usePrevious.ts +28 -0
  343. package/src/hooks/useSafeCallback.ts +43 -0
  344. package/src/hooks/useSkeletonItems.ts +30 -0
  345. package/src/hooks/useSplashCache.ts +2 -1
  346. package/src/hooks/useThemeColors.ts +51 -0
  347. package/src/theme/ThemeProvider.tsx +25 -9
  348. package/src/theme/hook/useInternalTheme.ts +19 -13
  349. package/src/theme/hook/useThemeStatusBar.ts +14 -5
@@ -9,7 +9,6 @@ import React, {
9
9
  useCallback,
10
10
  useMemo,
11
11
  useState,
12
- useEffect,
13
12
  } from 'react';
14
13
  import {
15
14
  View,
@@ -51,13 +50,8 @@ const ITEM_WIDTH = scale(80);
51
50
  const CONTAINER_PADDING = scale(14);
52
51
  const { width: SCREEN_WIDTH } = Dimensions.get('window');
53
52
 
54
- function usePrevious<T>(value: T): T | undefined {
55
- const ref = useRef<T>(undefined);
56
- useEffect(() => {
57
- ref.current = value;
58
- }, [value]);
59
- return ref.current;
60
- }
53
+ import { usePrevious } from '../../../../hooks/usePrevious';
54
+ import { useSkeletonItems } from '../../../../hooks/useSkeletonItems';
61
55
 
62
56
  const CategoryCard = React.memo(
63
57
  ({
@@ -72,6 +66,19 @@ const CategoryCard = React.memo(
72
66
  const flatListRef = useRef<FlatList<ICategory>>(null);
73
67
  const [itemWidths, setItemWidths] = useState<number[]>([]);
74
68
 
69
+ // Memoize theme colors
70
+ const themeColors = useMemo(
71
+ () => ({
72
+ primary: appliedTheme.colors.primary,
73
+ outline: appliedTheme.colors.outline,
74
+ buttonText: appliedTheme.colors.buttonText,
75
+ textPrimary: appliedTheme.colors.textPrimary,
76
+ skeletonBaseColor: appliedTheme.colors.skeletonBaseColor,
77
+ skeletonHighlightColor: appliedTheme.colors.skeletonHighlightColor,
78
+ }),
79
+ [appliedTheme.colors]
80
+ );
81
+
75
82
  const selectedCategory = useMemo(
76
83
  () => activeCategory || category?.[0] || null,
77
84
  [activeCategory, category]
@@ -79,6 +86,26 @@ const CategoryCard = React.memo(
79
86
 
80
87
  const prevCategoryId = usePrevious(selectedCategory?._id);
81
88
 
89
+ // Memoize skeleton items
90
+ const skeletonItems = useSkeletonItems(5);
91
+
92
+ // Memoize skeleton item style
93
+ const skeletonItemStyle = useMemo(
94
+ () => ({
95
+ width: ITEM_WIDTH - scale(20),
96
+ height: verticalScale(26),
97
+ borderRadius: scale(8),
98
+ marginRight: scale(8),
99
+ }),
100
+ []
101
+ );
102
+
103
+ // Memoize list container style with flexDirection
104
+ const listContainerStyle = useMemo(
105
+ () => [styles.listContainer, { flexDirection: 'row' as const }],
106
+ []
107
+ );
108
+
82
109
  const scrollToCategory = useCallback(
83
110
  (index: number, animated: boolean) => {
84
111
  if (!flatListRef.current || index < 0 || index >= category.length)
@@ -141,6 +168,34 @@ const CategoryCard = React.memo(
141
168
  [category, onPressCategory, scrollToCategory]
142
169
  );
143
170
 
171
+ // Memoize filled mode selected style
172
+ const filledSelectedStyle = useMemo(
173
+ () => ({
174
+ borderRadius: scale(8),
175
+ borderWidth: scale(1),
176
+ borderColor: themeColors.primary,
177
+ backgroundColor: themeColors.primary,
178
+ }),
179
+ [themeColors.primary]
180
+ );
181
+
182
+ // Memoize filled mode unselected style
183
+ const filledUnselectedStyle = useMemo(
184
+ () => ({
185
+ borderRadius: scale(8),
186
+ borderWidth: scale(1),
187
+ borderColor: themeColors.outline,
188
+ backgroundColor: 'transparent',
189
+ }),
190
+ [themeColors.outline]
191
+ );
192
+
193
+ // Memoize underline style
194
+ const underlineStyle = useMemo(
195
+ () => [styles.underline, { backgroundColor: themeColors.primary }],
196
+ [themeColors.primary]
197
+ );
198
+
144
199
  const renderItem = useCallback(
145
200
  ({ item, index }: ListRenderItemInfo<ICategory>) => {
146
201
  const isSelected = item._id === selectedCategory?._id;
@@ -148,25 +203,19 @@ const CategoryCard = React.memo(
148
203
 
149
204
  const containerStyle = [
150
205
  styles.tabContainer,
151
- isFilledMode && {
152
- borderRadius: scale(8),
153
- borderWidth: scale(1),
154
- borderColor: isSelected
155
- ? appliedTheme.colors.primary
156
- : appliedTheme.colors.outline,
157
- backgroundColor: isSelected
158
- ? appliedTheme.colors.primary
159
- : 'transparent',
160
- },
206
+ isFilledMode &&
207
+ (isSelected ? filledSelectedStyle : filledUnselectedStyle),
161
208
  ];
162
209
 
163
210
  const textColor = isFilledMode
164
211
  ? isSelected
165
- ? appliedTheme.colors.buttonText
166
- : appliedTheme.colors.textPrimary
212
+ ? themeColors.buttonText
213
+ : themeColors.textPrimary
167
214
  : isSelected
168
- ? appliedTheme.colors.primary
169
- : appliedTheme.colors.textPrimary;
215
+ ? themeColors.primary
216
+ : themeColors.textPrimary;
217
+
218
+ const textStyle = [styles.tabText, { color: textColor }];
170
219
 
171
220
  return (
172
221
  <TouchableOpacity
@@ -176,52 +225,37 @@ const CategoryCard = React.memo(
176
225
  onLayout={(event) => onItemLayout(event, index)}
177
226
  accessibilityLabel={`Select category ${item.name}`}
178
227
  >
179
- <Text
180
- style={[
181
- styles.tabText,
182
- {
183
- color: textColor,
184
- },
185
- ]}
186
- >
187
- {item.name}
188
- </Text>
189
- {mode === 'text' && isSelected && (
190
- <View
191
- style={[
192
- styles.underline,
193
- { backgroundColor: appliedTheme.colors.primary },
194
- ]}
195
- />
196
- )}
228
+ <Text style={textStyle}>{item.name}</Text>
229
+ {mode === 'text' && isSelected && <View style={underlineStyle} />}
197
230
  </TouchableOpacity>
198
231
  );
199
232
  },
200
- [selectedCategory, mode, appliedTheme, handlePress, onItemLayout]
233
+ [
234
+ selectedCategory,
235
+ mode,
236
+ themeColors,
237
+ handlePress,
238
+ onItemLayout,
239
+ filledSelectedStyle,
240
+ filledUnselectedStyle,
241
+ underlineStyle,
242
+ ]
201
243
  );
202
244
 
203
245
  const renderSkeleton = useCallback(
204
246
  () => (
205
247
  <SkeletonPlaceholder
206
- backgroundColor={appliedTheme.colors.skeletonBaseColor}
207
- highlightColor={appliedTheme.colors.skeletonHighlightColor}
248
+ backgroundColor={themeColors.skeletonBaseColor}
249
+ highlightColor={themeColors.skeletonHighlightColor}
208
250
  >
209
- <View style={[styles.listContainer, { flexDirection: 'row' }]}>
210
- {[...Array(5)].map((_, index) => (
211
- <View
212
- key={index}
213
- style={{
214
- width: ITEM_WIDTH - scale(20),
215
- height: verticalScale(26),
216
- borderRadius: scale(8),
217
- marginRight: scale(8),
218
- }}
219
- />
251
+ <View style={listContainerStyle}>
252
+ {skeletonItems.map((_, index) => (
253
+ <View key={index} style={skeletonItemStyle} />
220
254
  ))}
221
255
  </View>
222
256
  </SkeletonPlaceholder>
223
257
  ),
224
- [appliedTheme]
258
+ [themeColors, listContainerStyle, skeletonItems, skeletonItemStyle]
225
259
  );
226
260
 
227
261
  const getItemLayout = useCallback(
@@ -235,6 +269,9 @@ const CategoryCard = React.memo(
235
269
  [itemWidths]
236
270
  );
237
271
 
272
+ // Memoize keyExtractor
273
+ const keyExtractor = useCallback((item: ICategory) => item._id, []);
274
+
238
275
  return (
239
276
  <View style={styles.container}>
240
277
  {isLoading ? (
@@ -243,7 +280,7 @@ const CategoryCard = React.memo(
243
280
  <FlatList
244
281
  ref={flatListRef}
245
282
  data={category}
246
- keyExtractor={(item) => item._id}
283
+ keyExtractor={keyExtractor}
247
284
  horizontal
248
285
  showsHorizontalScrollIndicator={false}
249
286
  contentContainerStyle={styles.listContainer}
@@ -256,6 +293,7 @@ const CategoryCard = React.memo(
256
293
  initialNumToRender={10}
257
294
  maxToRenderPerBatch={12}
258
295
  windowSize={5}
296
+ removeClippedSubviews
259
297
  />
260
298
  )}
261
299
  </View>
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { memo, useCallback, useMemo, useState } from 'react';
7
+ import { useSkeletonItems } from '../../../../../hooks/useSkeletonItems';
7
8
  import {
8
9
  View,
9
10
  TouchableOpacity,
@@ -22,6 +23,7 @@ import type { ISectionContent } from '../../../../../types';
22
23
  import { useInternalTheme } from '../../../../../theme/hook/useInternalTheme';
23
24
  import { RFValue } from 'react-native-responsive-fontsize';
24
25
  import RentOrBuyIcon from '../../components/RentOrBuyIcon';
26
+ import { ThumbnailCard } from '../../components/ThumbnailCard';
25
27
  import type { ThemeOverride } from '../../../../../theme/themes';
26
28
  import type { IContentData } from '@zezosoft/zezo-ott-api-client';
27
29
 
@@ -48,19 +50,18 @@ type ImageTouchableProps = {
48
50
  onImagePress?: () => void;
49
51
  };
50
52
 
51
- const ImageTouchable: React.FC<ImageTouchableProps> = ({
52
- children,
53
- onImagePress,
54
- }) => (
55
- <TouchableOpacity
56
- activeOpacity={0.8}
57
- style={styles.imageWrapper}
58
- onPress={onImagePress}
59
- accessibilityRole="button"
60
- accessibilityLabel="View content"
61
- >
62
- {children}
63
- </TouchableOpacity>
53
+ const ImageTouchable = memo<ImageTouchableProps>(
54
+ ({ children, onImagePress }) => (
55
+ <TouchableOpacity
56
+ activeOpacity={0.8}
57
+ style={styles.imageWrapper}
58
+ onPress={onImagePress}
59
+ accessibilityRole="button"
60
+ accessibilityLabel="View content"
61
+ >
62
+ {children}
63
+ </TouchableOpacity>
64
+ )
64
65
  );
65
66
 
66
67
  // Main component
@@ -86,6 +87,27 @@ const SliderOne: React.FC<SliderOneProps> = ({
86
87
 
87
88
  const handleSnapToItem = useCallback((i: number) => setActiveIndex(i), []);
88
89
 
90
+ // Memoize skeleton items
91
+ const skeletonItems = useSkeletonItems(skeletonCount);
92
+
93
+ // Memoize indicator array
94
+ const indicatorArray = useMemo(
95
+ () => Array.from({ length: contentData.length }, (_, i) => i),
96
+ [contentData.length]
97
+ );
98
+
99
+ // Memoize play icon style
100
+ const playIconStyle = useMemo(
101
+ () => [styles.playIcon, { backgroundColor: appliedTheme.colors.button }],
102
+ [appliedTheme.colors.button]
103
+ );
104
+
105
+ // Memoize play text style
106
+ const playTextStyle = useMemo(
107
+ () => [styles.playText, { color: appliedTheme.colors.white }],
108
+ [appliedTheme.colors.white]
109
+ );
110
+
89
111
  // Render carousel item
90
112
  const renderCarouselItem = useCallback(
91
113
  ({ item }: { item: IContentData }) => (
@@ -95,15 +117,14 @@ const SliderOne: React.FC<SliderOneProps> = ({
95
117
  theme={appliedTheme}
96
118
  content_offering_type={item.content_offering_type}
97
119
  />
98
- <FastImage
99
- source={{
100
- uri: item.thumbnail,
101
- priority: FastImage.priority.normal,
102
- cache: FastImage.cacheControl.immutable,
103
- }}
104
- style={styles.sliderImage}
120
+ <ThumbnailCard
121
+ thumbnailUri={item.thumbnail}
122
+ theme={appliedTheme}
123
+ isLoading={false}
124
+ borderRadius={BORDER_RADIUS}
125
+ wrapperStyle={styles.imageWrapper}
126
+ imageStyle={styles.sliderImage}
105
127
  resizeMode={FastImage.resizeMode.cover}
106
- accessibilityLabel={`Image of ${item.name || 'content'}`}
107
128
  />
108
129
  {showPlayIcon && (
109
130
  <LinearGradient
@@ -113,10 +134,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
113
134
  <View style={styles.playOverlay}>
114
135
  <TouchableOpacity
115
136
  onPress={() => onPressItem?.(item)}
116
- style={[
117
- styles.playIcon,
118
- { backgroundColor: appliedTheme.colors.button },
119
- ]}
137
+ style={playIconStyle}
120
138
  activeOpacity={0.8}
121
139
  accessibilityRole="button"
122
140
  accessibilityLabel="Play content"
@@ -128,10 +146,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
128
146
  />
129
147
  </TouchableOpacity>
130
148
  <Text
131
- style={[
132
- styles.playText,
133
- { color: appliedTheme.colors.white },
134
- ]}
149
+ style={playTextStyle}
135
150
  numberOfLines={1}
136
151
  accessibilityLabel={item.name}
137
152
  >
@@ -143,7 +158,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
143
158
  </ImageTouchable>
144
159
  </View>
145
160
  ),
146
- [appliedTheme, showPlayIcon, onPressItem]
161
+ [appliedTheme, showPlayIcon, onPressItem, playIconStyle, playTextStyle]
147
162
  );
148
163
 
149
164
  // Render skeleton item
@@ -209,16 +224,19 @@ const SliderOne: React.FC<SliderOneProps> = ({
209
224
  ]
210
225
  );
211
226
 
212
- // Common carousel props
213
- const carouselProps = {
214
- width: CAROUSEL_WIDTH,
215
- height: CAROUSEL_HEIGHT,
216
- autoPlay: !isLoading && contentData.length > 1,
217
- loop: true,
218
- scrollAnimationDuration: 1000,
219
- autoPlayInterval: 2500,
220
- style: styles.carousel,
221
- };
227
+ // Common carousel props - memoized
228
+ const carouselProps = useMemo(
229
+ () => ({
230
+ width: CAROUSEL_WIDTH,
231
+ height: CAROUSEL_HEIGHT,
232
+ autoPlay: !isLoading && contentData.length > 1,
233
+ loop: true,
234
+ scrollAnimationDuration: 1000,
235
+ autoPlayInterval: 2500,
236
+ style: styles.carousel,
237
+ }),
238
+ [isLoading, contentData.length]
239
+ );
222
240
  if (!data) {
223
241
  return null;
224
242
  }
@@ -231,7 +249,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
231
249
  >
232
250
  <Carousel
233
251
  {...carouselProps}
234
- data={Array.from({ length: skeletonCount })}
252
+ data={skeletonItems}
235
253
  renderItem={renderSkeletonItem}
236
254
  mode="parallax"
237
255
  modeConfig={{
@@ -244,10 +262,9 @@ const SliderOne: React.FC<SliderOneProps> = ({
244
262
  />
245
263
  <View style={styles.indicatorContainer}>
246
264
  <View style={styles.indicator}>
247
- {Array.from(
248
- { length: isLoading ? skeletonCount : contentData.length },
249
- renderIndicator
250
- )}
265
+ {isLoading
266
+ ? skeletonItems.map((_, i) => renderIndicator(0, i))
267
+ : indicatorArray.map((i) => renderIndicator(0, i))}
251
268
  </View>
252
269
  </View>
253
270
  </View>
@@ -279,7 +296,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
279
296
  {index === 0 && (
280
297
  <View style={styles.indicatorContainer}>
281
298
  <View style={styles.indicator}>
282
- {Array.from({ length: contentData.length }, renderIndicator)}
299
+ {indicatorArray.map((i) => renderIndicator(0, i))}
283
300
  </View>
284
301
  </View>
285
302
  )}
@@ -312,7 +329,6 @@ const styles = StyleSheet.create({
312
329
  width: '100%',
313
330
  aspectRatio: 16 / 9,
314
331
  borderRadius: BORDER_RADIUS,
315
- backgroundColor: '#444',
316
332
  },
317
333
  gradientOverlay: {
318
334
  ...StyleSheet.absoluteFillObject,
@@ -2,7 +2,9 @@
2
2
  * @author Naresh Dhamu
3
3
  * @LastModified Mon 30 Jun 2025 at 11:30 PM
4
4
  */
5
- import React, { memo, useCallback, useMemo, useState } from 'react';
5
+ import React, { memo, useCallback, useMemo, useState, useRef } from 'react';
6
+ import { InteractionManager } from 'react-native';
7
+ import { useSkeletonItems } from '../../../../../hooks/useSkeletonItems';
6
8
  import {
7
9
  View,
8
10
  TouchableOpacity,
@@ -27,6 +29,48 @@ import type { IContentData } from '@zezosoft/zezo-ott-api-client';
27
29
  const FULL_WIDTH = Display.fullWidth;
28
30
  const FULL_HEIGHT = FULL_WIDTH * (9 / 16);
29
31
 
32
+ // Memoized carousel item component for better performance
33
+ type CarouselItemProps = {
34
+ item: IContentData;
35
+ onPressItem?: (item: IContentData) => void;
36
+ appliedTheme: any;
37
+ gradientConfig: {
38
+ colors: [string, string];
39
+ start: { x: number; y: number };
40
+ end: { x: number; y: number };
41
+ };
42
+ };
43
+
44
+ const CarouselItem = memo<CarouselItemProps>(
45
+ ({ item, onPressItem, appliedTheme, gradientConfig }) => (
46
+ <TouchableOpacity
47
+ activeOpacity={0.85}
48
+ onPress={() => onPressItem?.(item)}
49
+ style={styles.itemWrapper}
50
+ accessibilityRole="button"
51
+ accessibilityLabel={`View ${item.name}`}
52
+ >
53
+ <RentOrBuyIcon
54
+ theme={appliedTheme}
55
+ content_offering_type={item.content_offering_type}
56
+ />
57
+ <ThumbnailCard
58
+ thumbnailUri={item.thumbnail}
59
+ theme={appliedTheme}
60
+ isLoading={false}
61
+ wrapperStyle={styles.image}
62
+ resizeMode={FastImage.resizeMode.cover}
63
+ />
64
+ <LinearGradient
65
+ colors={gradientConfig.colors}
66
+ start={gradientConfig.start}
67
+ end={gradientConfig.end}
68
+ style={styles.gradientBottomOverlay}
69
+ />
70
+ </TouchableOpacity>
71
+ )
72
+ );
73
+
30
74
  type SliderTwoProps = {
31
75
  data: ISectionContent | null;
32
76
  onPressItem?: (item: IContentData) => void;
@@ -51,7 +95,48 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
51
95
  () => [appliedTheme.colors.primary, appliedTheme.colors.primary],
52
96
  [appliedTheme.colors.primary]
53
97
  );
54
- const handleSnapToItem = useCallback((i: number) => setActiveIndex(i), []);
98
+ // Debounce snap handler to prevent stuttering
99
+ const snapTimeoutRef = useRef<NodeJS.Timeout | null>(null);
100
+ const handleSnapToItem = useCallback((i: number) => {
101
+ if (snapTimeoutRef.current) {
102
+ clearTimeout(snapTimeoutRef.current);
103
+ }
104
+ snapTimeoutRef.current = setTimeout(() => {
105
+ InteractionManager.runAfterInteractions(() => {
106
+ setActiveIndex(i);
107
+ });
108
+ }, 50);
109
+ }, []);
110
+
111
+ // Memoize skeleton items
112
+ const skeletonItems = useSkeletonItems(skeletonCount);
113
+
114
+ // Memoize indicator array
115
+ const indicatorArray = useMemo(
116
+ () => Array.from({ length: contentData.length }, (_, i) => i),
117
+ [contentData.length]
118
+ );
119
+
120
+ // Memoize carousel data
121
+ const carouselData = useMemo(
122
+ () => (isLoading ? skeletonItems : contentData),
123
+ [isLoading, skeletonItems, contentData]
124
+ );
125
+
126
+ // Memoize gradient configuration
127
+ const gradientConfig = useMemo(
128
+ () => ({
129
+ colors: ['transparent', 'rgba(0,0,0,0.7)'] as [string, string],
130
+ start: { x: 0.5, y: 0 },
131
+ end: { x: 0.5, y: 1 },
132
+ }),
133
+ []
134
+ );
135
+
136
+ // Memoize pan gesture handler for smooth scrolling
137
+ const configurePanGesture = useCallback((gesture: any) => {
138
+ gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5]);
139
+ }, []);
55
140
 
56
141
  const renderSkeletonItem = useCallback(
57
142
  () => (
@@ -69,33 +154,44 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
69
154
 
70
155
  const renderCarouselItem = useCallback(
71
156
  ({ item }: { item: IContentData }) => (
72
- <TouchableOpacity
73
- activeOpacity={0.85}
74
- onPress={() => onPressItem?.(item)}
75
- style={styles.itemWrapper}
76
- accessibilityRole="button"
77
- accessibilityLabel={`View ${item.name}`}
78
- >
79
- <RentOrBuyIcon
80
- theme={appliedTheme}
81
- content_offering_type={item.content_offering_type}
82
- />
83
- <ThumbnailCard
84
- thumbnailUri={item.thumbnail}
85
- theme={appliedTheme}
86
- isLoading={isLoading}
87
- wrapperStyle={styles.image}
88
- resizeMode={FastImage.resizeMode.cover}
89
- />
90
- <LinearGradient
91
- colors={['transparent', 'rgba(0,0,0,0.7)']}
92
- start={{ x: 0.5, y: 0 }}
93
- end={{ x: 0.5, y: 1 }}
94
- style={styles.gradientBottomOverlay}
95
- />
96
- </TouchableOpacity>
157
+ <CarouselItem
158
+ item={item}
159
+ onPressItem={onPressItem}
160
+ appliedTheme={appliedTheme}
161
+ gradientConfig={gradientConfig}
162
+ />
97
163
  ),
98
- [appliedTheme, isLoading, onPressItem]
164
+ [appliedTheme, onPressItem, gradientConfig]
165
+ );
166
+
167
+ // Memoize renderItem to prevent switching functions
168
+ const renderItem = useMemo(
169
+ () => (isLoading ? renderSkeletonItem : renderCarouselItem),
170
+ [isLoading, renderSkeletonItem, renderCarouselItem]
171
+ );
172
+
173
+ // Memoize carousel props for smooth scrolling
174
+ const carouselProps = useMemo(
175
+ () => ({
176
+ width: FULL_WIDTH,
177
+ height: FULL_HEIGHT,
178
+ autoPlay: !isLoading && contentData.length > 1,
179
+ loop: !isLoading && contentData.length > 1,
180
+ scrollAnimationDuration: 300, // Reduced for smoother scrolling
181
+ autoPlayInterval: 3000,
182
+ windowSize: 2, // Reduced window size for better performance
183
+ enabled: true,
184
+ }),
185
+ [isLoading, contentData.length]
186
+ );
187
+
188
+ // Memoize inactive indicator style
189
+ const inactiveIndicatorStyle = useMemo(
190
+ () => [
191
+ styles.inactiveIndicator,
192
+ { backgroundColor: appliedTheme.colors.onSurface },
193
+ ],
194
+ [appliedTheme.colors.onSurface]
99
195
  );
100
196
 
101
197
  const renderIndicator = useCallback(
@@ -121,12 +217,7 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
121
217
  style={styles.activeIndicator}
122
218
  />
123
219
  ) : (
124
- <View
125
- style={[
126
- styles.inactiveIndicator,
127
- { backgroundColor: appliedTheme.colors.onSurface },
128
- ]}
129
- />
220
+ <View style={inactiveIndicatorStyle} />
130
221
  )}
131
222
  </View>
132
223
  ),
@@ -134,7 +225,7 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
134
225
  isLoading,
135
226
  appliedTheme.colors.skeletonBaseColor,
136
227
  appliedTheme.colors.skeletonHighlightColor,
137
- appliedTheme.colors.onSurface,
228
+ inactiveIndicatorStyle,
138
229
  activeIndex,
139
230
  gradientColors,
140
231
  ]
@@ -155,26 +246,15 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
155
246
  accessibilityHint={accessibilityHint}
156
247
  >
157
248
  <Carousel
158
- width={FULL_WIDTH}
159
- height={FULL_HEIGHT}
160
- autoPlay={!isLoading && contentData.length > 1}
161
- loop={!isLoading && contentData.length > 1}
162
- scrollAnimationDuration={1000}
163
- autoPlayInterval={3000}
164
- data={
165
- isLoading
166
- ? (Array.from({ length: skeletonCount }) as IContentData[])
167
- : contentData
168
- }
169
- renderItem={isLoading ? renderSkeletonItem : renderCarouselItem}
249
+ {...carouselProps}
250
+ data={carouselData}
251
+ renderItem={renderItem}
170
252
  onSnapToItem={handleSnapToItem}
171
- onConfigurePanGesture={(gesture: any) =>
172
- gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5])
173
- }
253
+ onConfigurePanGesture={configurePanGesture}
174
254
  />
175
255
  <View style={styles.indicatorContainer}>
176
256
  <View style={styles.indicator}>
177
- {Array.from({ length: contentData.length }, renderIndicator)}
257
+ {indicatorArray.map((i) => renderIndicator(0, i))}
178
258
  </View>
179
259
  </View>
180
260
  </View>