@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
@@ -3,7 +3,7 @@
3
3
  * @lastModified Tue 24 Jun 2025 at 10:15 PM
4
4
  **/
5
5
 
6
- import React from 'react';
6
+ import React, { memo, useMemo, useCallback } from 'react';
7
7
  import {
8
8
  StyleSheet,
9
9
  View,
@@ -67,7 +67,7 @@ export type WatchLaterProps = {
67
67
  const DefaultSkeleton: React.FC<{
68
68
  theme: ITheme;
69
69
  viewMode: 'poster' | 'detailed';
70
- }> = ({ theme, viewMode }) => {
70
+ }> = memo(({ theme, viewMode }) => {
71
71
  if (viewMode === 'detailed') {
72
72
  return (
73
73
  <SkeletonPlaceholder
@@ -124,9 +124,11 @@ const DefaultSkeleton: React.FC<{
124
124
  />
125
125
  </SkeletonPlaceholder>
126
126
  );
127
- };
127
+ });
128
128
 
129
- export const WatchLater: React.FC<WatchLaterProps> = ({
129
+ DefaultSkeleton.displayName = 'DefaultSkeleton';
130
+
131
+ const WatchLaterComponent: React.FC<WatchLaterProps> = ({
130
132
  data = [],
131
133
  isLoading = false,
132
134
  title = 'Watch Later',
@@ -152,79 +154,122 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
152
154
  }) => {
153
155
  const { theme: appliedTheme } = useInternalTheme(theme);
154
156
 
155
- const listData = isLoading
156
- ? (Array.from({ length: skeletonCount }, (_, i) => ({
157
- _id: `skeleton-${i}`,
158
- content: {
159
- name: '',
160
- description: '',
161
- poster: '',
162
- thumbnail: '',
163
- },
164
- })) as any)
165
- : data;
157
+ const listData = useMemo(
158
+ () =>
159
+ isLoading
160
+ ? (Array.from({ length: skeletonCount }, (_, i) => ({
161
+ _id: `skeleton-${i}`,
162
+ content: {
163
+ name: '',
164
+ description: '',
165
+ poster: '',
166
+ thumbnail: '',
167
+ },
168
+ })) as any)
169
+ : data,
170
+ [isLoading, skeletonCount, data]
171
+ );
166
172
 
167
- const renderGridItem: ListRenderItem<IWatchLaterItem> = ({ item, index }) => {
168
- if (isLoading) {
169
- return (
170
- skeletonComponent ?? (
171
- <DefaultSkeleton theme={appliedTheme} viewMode={viewMode} />
172
- )
173
- );
174
- }
173
+ const handleItemPress = useCallback(
174
+ (item: IWatchLaterItem) => {
175
+ onPressItem?.(item);
176
+ },
177
+ [onPressItem]
178
+ );
179
+
180
+ const detailedDescStyle = useMemo(
181
+ () => [styles.detailedDesc, { color: appliedTheme.colors.textSecondary }],
182
+ [appliedTheme.colors.textSecondary]
183
+ );
184
+
185
+ const renderGridItem: ListRenderItem<IWatchLaterItem> = useCallback(
186
+ ({ item, index }) => {
187
+ if (isLoading) {
188
+ return (
189
+ skeletonComponent ?? (
190
+ <DefaultSkeleton theme={appliedTheme} viewMode={viewMode} />
191
+ )
192
+ );
193
+ }
175
194
 
176
- if (renderItem) return renderItem(item, index);
195
+ if (renderItem) return renderItem(item, index);
196
+
197
+ if (viewMode === 'detailed') {
198
+ return (
199
+ <TouchableOpacity
200
+ key={item._id}
201
+ onPress={() => handleItemPress(item)}
202
+ activeOpacity={0.8}
203
+ style={styles.detailedItem}
204
+ >
205
+ <View style={styles.thumbnailWrapper}>
206
+ <ThumbnailCard
207
+ theme={appliedTheme}
208
+ isLoading={false}
209
+ thumbnailUri={item?.content?.thumbnail}
210
+ wrapperStyle={styles.thumbnailImage}
211
+ />
212
+ </View>
213
+ <View style={styles.detailedInfo}>
214
+ <Text
215
+ theme={theme}
216
+ numberOfLines={1}
217
+ style={styles.detailedTitle}
218
+ >
219
+ {item?.content?.name}
220
+ </Text>
221
+ <Text theme={theme} numberOfLines={5} style={detailedDescStyle}>
222
+ {item?.content?.description}
223
+ </Text>
224
+ </View>
225
+ </TouchableOpacity>
226
+ );
227
+ }
177
228
 
178
- if (viewMode === 'detailed') {
179
229
  return (
180
230
  <TouchableOpacity
181
- key={item._id}
182
- onPress={() => onPressItem?.(item)}
231
+ key={item._id || index}
232
+ onPress={() => handleItemPress(item)}
183
233
  activeOpacity={0.8}
184
- style={styles.detailedItem}
185
234
  >
186
- <View style={styles.thumbnailWrapper}>
187
- <ThumbnailCard
188
- theme={appliedTheme}
189
- isLoading={false}
190
- thumbnailUri={item?.content?.thumbnail}
191
- wrapperStyle={styles.thumbnailImage}
192
- />
193
- </View>
194
- <View style={styles.detailedInfo}>
195
- <Text theme={theme} numberOfLines={1} style={styles.detailedTitle}>
196
- {item?.content?.name}
197
- </Text>
198
- <Text
199
- theme={theme}
200
- numberOfLines={5}
201
- style={[
202
- styles.detailedDesc,
203
- { color: appliedTheme.colors.textSecondary },
204
- ]}
205
- >
206
- {item?.content?.description}
207
- </Text>
208
- </View>
235
+ <CardPoster
236
+ content_offering_type={item?.content?.content_offering_type}
237
+ theme={appliedTheme}
238
+ isLoading={isLoading}
239
+ posterUri={item?.content?.poster}
240
+ />
209
241
  </TouchableOpacity>
210
242
  );
211
- }
243
+ },
244
+ [
245
+ isLoading,
246
+ skeletonComponent,
247
+ appliedTheme,
248
+ viewMode,
249
+ renderItem,
250
+ handleItemPress,
251
+ theme,
252
+ detailedDescStyle,
253
+ ]
254
+ );
212
255
 
213
- return (
214
- <TouchableOpacity
215
- key={item._id || index}
216
- onPress={() => onPressItem?.(item)}
217
- activeOpacity={0.8}
218
- >
219
- <CardPoster
220
- content_offering_type={item?.content?.content_offering_type}
221
- theme={appliedTheme}
222
- isLoading={isLoading}
223
- posterUri={item?.content?.poster}
224
- />
225
- </TouchableOpacity>
226
- );
227
- };
256
+ const keyExtractor = useCallback(
257
+ (item: IWatchLaterItem, index: number) => item._id || `item-${index}`,
258
+ []
259
+ );
260
+
261
+ const contentContainerStyleMemo = useMemo(
262
+ () => [styles.contentContainerFlatStyle, contentContainerStyle],
263
+ [contentContainerStyle]
264
+ );
265
+
266
+ const titleStyleMemo = useMemo(
267
+ () => ({
268
+ ...(titleStyle ? StyleSheet.flatten(titleStyle) : {}),
269
+ color: appliedTheme.colors.onBackground,
270
+ }),
271
+ [titleStyle, appliedTheme.colors.onBackground]
272
+ );
228
273
 
229
274
  return (
230
275
  <View style={styles.container}>
@@ -236,10 +281,7 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
236
281
  title={title}
237
282
  titleAlign="left"
238
283
  theme={theme}
239
- titleStyle={{
240
- ...(titleStyle ? StyleSheet.flatten(titleStyle) : {}),
241
- color: appliedTheme.colors.onBackground,
242
- }}
284
+ titleStyle={titleStyleMemo}
243
285
  onRightPress={onSearchPress}
244
286
  rightIcon={
245
287
  showSearchIcon ? (
@@ -258,13 +300,10 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
258
300
  itemDimension={itemDimension}
259
301
  spacing={spacing}
260
302
  data={listData}
261
- keyExtractor={(item, index) => item._id || `item-${index}`}
303
+ keyExtractor={keyExtractor}
262
304
  style={listStyle}
263
305
  showsVerticalScrollIndicator={false}
264
- contentContainerStyle={[
265
- styles.contentContainerFlatStyle,
266
- contentContainerStyle,
267
- ]}
306
+ contentContainerStyle={contentContainerStyleMemo}
268
307
  renderItem={renderGridItem}
269
308
  onEndReached={onEndReached}
270
309
  onEndReachedThreshold={onEndReachedThreshold ?? 0.5}
@@ -272,13 +311,10 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
272
311
  ) : (
273
312
  <FlatList
274
313
  data={listData}
275
- keyExtractor={(item, index) => item._id || `item-${index}`}
314
+ keyExtractor={keyExtractor}
276
315
  renderItem={renderGridItem}
277
316
  style={listStyle}
278
- contentContainerStyle={[
279
- styles.contentContainerFlatStyle,
280
- contentContainerStyle,
281
- ]}
317
+ contentContainerStyle={contentContainerStyleMemo}
282
318
  onEndReached={onEndReached}
283
319
  onEndReachedThreshold={onEndReachedThreshold ?? 0.5}
284
320
  showsVerticalScrollIndicator={false}
@@ -295,6 +331,8 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
295
331
  );
296
332
  };
297
333
 
334
+ export const WatchLater = memo(WatchLaterComponent);
335
+
298
336
  const styles = StyleSheet.create({
299
337
  container: {
300
338
  flex: 1,
@@ -2,7 +2,7 @@
2
2
  * @author Naresh Dhamu
3
3
  * @lastModified Fri 17 Oct 2025 at 10:16 PM
4
4
  */
5
- import React, { useState } from 'react';
5
+ import React, { useState, memo, useMemo, useCallback } from 'react';
6
6
  import { Image, StyleSheet, View } from 'react-native';
7
7
  import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
8
8
  import { scale } from 'react-native-size-matters';
@@ -17,7 +17,7 @@ type UserAvatarProps = {
17
17
  theme?: ThemeOverride;
18
18
  };
19
19
 
20
- const UserAvatar: React.FC<UserAvatarProps> = ({
20
+ const UserAvatarComponent: React.FC<UserAvatarProps> = ({
21
21
  avatarUri,
22
22
  size = scale(80),
23
23
  theme,
@@ -26,38 +26,71 @@ const UserAvatar: React.FC<UserAvatarProps> = ({
26
26
  const [imageError, setImageError] = useState(false);
27
27
  const [loading, setLoading] = useState(!!avatarUri);
28
28
 
29
- const borderColor = appliedTheme.colors.primary || '#ccc';
30
- const skeletonBaseColor = appliedTheme.colors.skeletonBaseColor || '#E0E0E0';
31
- const skeletonHighlightColor =
32
- appliedTheme.colors.skeletonHighlightColor || '#F5F5F5';
29
+ // Memoize colors
30
+ const borderColor = useMemo(
31
+ () => appliedTheme.colors.primary || '#ccc',
32
+ [appliedTheme.colors.primary]
33
+ );
34
+
35
+ const skeletonBaseColor = useMemo(
36
+ () => appliedTheme.colors.skeletonBaseColor || '#E0E0E0',
37
+ [appliedTheme.colors.skeletonBaseColor]
38
+ );
33
39
 
34
- const handleError = () => {
40
+ const skeletonHighlightColor = useMemo(
41
+ () => appliedTheme.colors.skeletonHighlightColor || '#F5F5F5',
42
+ [appliedTheme.colors.skeletonHighlightColor]
43
+ );
44
+
45
+ // Memoize handlers
46
+ const handleError = useCallback(() => {
35
47
  setImageError(true);
36
48
  setLoading(false);
37
- };
49
+ }, []);
50
+
51
+ const handleLoadStart = useCallback(() => {
52
+ setLoading(true);
53
+ }, []);
54
+
55
+ const handleLoadEnd = useCallback(() => {
56
+ setLoading(false);
57
+ }, []);
58
+
59
+ // Memoize image source
60
+ const imageSource = useMemo(
61
+ () => (imageError || !avatarUri ? fallbackAvatar : { uri: avatarUri }),
62
+ [imageError, avatarUri]
63
+ );
64
+
65
+ // Memoize styles
66
+ const avatarStyles = useMemo(() => styles(size), [size]);
67
+ const avatarImageStyle = useMemo(
68
+ () => [avatarStyles.avatar, { borderColor, position: 'absolute' as const }],
69
+ [avatarStyles.avatar, borderColor]
70
+ );
38
71
 
39
- const handleLoadStart = () => setLoading(true);
40
- const handleLoadEnd = () => setLoading(false);
72
+ // Memoize skeleton borderRadius
73
+ const skeletonBorderRadius = useMemo(() => size / 2, [size]);
41
74
 
42
75
  return (
43
- <View style={styles(size).wrapper}>
76
+ <View style={avatarStyles.wrapper}>
44
77
  {loading && (
45
78
  <SkeletonPlaceholder
46
79
  backgroundColor={skeletonBaseColor}
47
80
  highlightColor={skeletonHighlightColor}
48
- borderRadius={size / 2}
81
+ borderRadius={skeletonBorderRadius}
49
82
  >
50
83
  <SkeletonPlaceholder.Item
51
84
  width={size}
52
85
  height={size}
53
- borderRadius={size / 2}
86
+ borderRadius={skeletonBorderRadius}
54
87
  />
55
88
  </SkeletonPlaceholder>
56
89
  )}
57
90
 
58
91
  <Image
59
- source={imageError || !avatarUri ? fallbackAvatar : { uri: avatarUri }}
60
- style={[styles(size).avatar, { borderColor, position: 'absolute' }]}
92
+ source={imageSource}
93
+ style={avatarImageStyle}
61
94
  onError={handleError}
62
95
  onLoadStart={handleLoadStart}
63
96
  onLoadEnd={handleLoadEnd}
@@ -66,6 +99,7 @@ const UserAvatar: React.FC<UserAvatarProps> = ({
66
99
  );
67
100
  };
68
101
 
102
+ const UserAvatar = memo(UserAvatarComponent);
69
103
  export default UserAvatar;
70
104
 
71
105
  const styles = (size: number) =>
@@ -2,7 +2,7 @@
2
2
  * @author Naresh Dhamu
3
3
  * @lastModified Mon 23 Jun 2025 at 11:22 AM
4
4
  */
5
- import React from 'react';
5
+ import React, { memo, useMemo } from 'react';
6
6
  import { View, Pressable, type TextStyle, type ViewStyle } from 'react-native';
7
7
  import { Edit3 } from 'lucide-react-native';
8
8
  import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
@@ -35,7 +35,7 @@ interface UserSectionProps {
35
35
  userInfoTextStyle?: UserInfoTextStyle;
36
36
  }
37
37
 
38
- const UserSection: React.FC<UserSectionProps> = ({
38
+ const UserSectionComponent: React.FC<UserSectionProps> = ({
39
39
  userInfo,
40
40
  isLoading,
41
41
  renderUserInfo,
@@ -45,6 +45,67 @@ const UserSection: React.FC<UserSectionProps> = ({
45
45
  userInfoTextStyle = {},
46
46
  }) => {
47
47
  const { theme: appliedTheme } = useInternalTheme(theme);
48
+
49
+ // Memoize skeleton colors
50
+ const skeletonColors = useMemo(
51
+ () => ({
52
+ backgroundColor: appliedTheme.colors.skeletonBaseColor,
53
+ highlightColor: appliedTheme.colors.skeletonHighlightColor,
54
+ }),
55
+ [
56
+ appliedTheme.colors.skeletonBaseColor,
57
+ appliedTheme.colors.skeletonHighlightColor,
58
+ ]
59
+ );
60
+
61
+ // Memoize edit button style
62
+ const editButtonStyle = useMemo(
63
+ () => [
64
+ styles.editButton,
65
+ {
66
+ borderColor: appliedTheme.colors.primary,
67
+ backgroundColor: appliedTheme.colors.surfaceVariant,
68
+ shadowColor: appliedTheme.colors.surface,
69
+ },
70
+ ],
71
+ [
72
+ appliedTheme.colors.primary,
73
+ appliedTheme.colors.surfaceVariant,
74
+ appliedTheme.colors.surface,
75
+ ]
76
+ );
77
+
78
+ // Memoize text styles
79
+ const userNameStyle = useMemo(
80
+ () => [
81
+ styles.userName,
82
+ { color: appliedTheme.colors.onBackground },
83
+ userInfoTextStyle.nameStyle,
84
+ ],
85
+ [appliedTheme.colors.onBackground, userInfoTextStyle.nameStyle]
86
+ );
87
+
88
+ const userEmailStyle = useMemo(
89
+ () => [
90
+ styles.userEmail,
91
+ { color: appliedTheme.colors.onBackground },
92
+ userInfoTextStyle.emailStyle,
93
+ ],
94
+ [appliedTheme.colors.onBackground, userInfoTextStyle.emailStyle]
95
+ );
96
+
97
+ // Memoize ripple color
98
+ const rippleColor = useMemo(
99
+ () => appliedTheme.colors.surfaceDisabled,
100
+ [appliedTheme.colors.surfaceDisabled]
101
+ );
102
+
103
+ // Memoize primary color
104
+ const primaryColor = useMemo(
105
+ () => appliedTheme.colors.primary,
106
+ [appliedTheme.colors.primary]
107
+ );
108
+
48
109
  if (!userInfo) return null;
49
110
  if (renderUserInfo) return renderUserInfo(userInfo);
50
111
 
@@ -52,8 +113,8 @@ const UserSection: React.FC<UserSectionProps> = ({
52
113
  return (
53
114
  <View style={styles.userInfoContainer}>
54
115
  <SkeletonPlaceholder
55
- backgroundColor={appliedTheme.colors.skeletonBaseColor}
56
- highlightColor={appliedTheme.colors.skeletonHighlightColor}
116
+ backgroundColor={skeletonColors.backgroundColor}
117
+ highlightColor={skeletonColors.highlightColor}
57
118
  borderRadius={moderateScale(8)}
58
119
  {...skeletonProps}
59
120
  >
@@ -76,54 +137,27 @@ const UserSection: React.FC<UserSectionProps> = ({
76
137
  {userInfo.onEditPress && (
77
138
  <Pressable
78
139
  onPress={userInfo.onEditPress}
79
- style={[
80
- styles.editButton,
81
- {
82
- borderColor: appliedTheme.colors.primary,
83
- backgroundColor: appliedTheme.colors.surfaceVariant,
84
- shadowColor: appliedTheme.colors.surface,
85
- },
86
- ]}
140
+ style={editButtonStyle}
87
141
  android_ripple={{
88
- color: appliedTheme.colors.surfaceDisabled,
142
+ color: rippleColor,
89
143
  }}
90
144
  >
91
- <Edit3
92
- size={moderateScale(13)}
93
- color={appliedTheme.colors.primary}
94
- />
145
+ <Edit3 size={moderateScale(13)} color={primaryColor} />
95
146
  </Pressable>
96
147
  )}
97
148
  </>
98
149
  )}
99
150
  </View>
100
151
 
101
- {userInfo.name && (
102
- <Text
103
- style={[
104
- styles.userName,
105
- { color: appliedTheme.colors.onBackground },
106
- userInfoTextStyle.nameStyle,
107
- ]}
108
- >
109
- {userInfo.name}
110
- </Text>
111
- )}
152
+ {userInfo.name && <Text style={userNameStyle}>{userInfo.name}</Text>}
112
153
  {userInfo.emailOrPhone && (
113
- <Text
114
- style={[
115
- styles.userEmail,
116
- { color: appliedTheme.colors.onBackground },
117
- userInfoTextStyle.emailStyle,
118
- ]}
119
- >
120
- {userInfo.emailOrPhone}
121
- </Text>
154
+ <Text style={userEmailStyle}>{userInfo.emailOrPhone}</Text>
122
155
  )}
123
156
  </View>
124
157
  );
125
158
  };
126
159
 
160
+ const UserSection = memo(UserSectionComponent);
127
161
  export default UserSection;
128
162
 
129
163
  // Styles
@@ -2,7 +2,7 @@
2
2
  * @author Naresh Dhamu
3
3
  * @lastModified Mon 07 Jul 2025 at 11:49 AM
4
4
  */
5
- import React from 'react';
5
+ import React, { useMemo } from 'react';
6
6
  import {
7
7
  View as RNView,
8
8
  type ViewProps as RNViewProps,
@@ -21,9 +21,17 @@ export const View: React.FC<ViewProps> = ({
21
21
  children,
22
22
  ...rest
23
23
  }) => {
24
+ // Memoize style array to prevent unnecessary re-renders
25
+ const computedStyle = useMemo(
26
+ () => [style, backgroundColor !== 'transparent' && { backgroundColor }],
27
+ [style, backgroundColor]
28
+ );
29
+
24
30
  return (
25
- <RNView style={[style, { backgroundColor }]} {...rest}>
31
+ <RNView style={computedStyle} {...rest}>
26
32
  {children}
27
33
  </RNView>
28
34
  );
29
35
  };
36
+
37
+ export default React.memo(View);
@@ -15,7 +15,6 @@ export * from './layout';
15
15
  export * from './Settings';
16
16
  export * from './Account';
17
17
  export * from './TabBar';
18
- export * from './Input/Input';
19
18
  export * from './Text';
20
19
  export * from './View';
21
20
  export * from './User';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @author Naresh Dhamu
3
+ * @lastModified Optimized for performance
4
+ */
5
+
6
+ export * from './useDebounce';
7
+ export * from './useKeyboard';
8
+ export * from './useNavigationMode';
9
+ export * from './usePaginatedSection';
10
+ export * from './useSplashCache';
11
+ export * from './usePrevious';
12
+ export * from './useSafeCallback';
13
+ export * from './useSkeletonItems';
14
+ export * from './useThemeColors';
@@ -1,16 +1,35 @@
1
- import React from 'react';
1
+ import { useCallback, useRef, useEffect } from 'react';
2
2
 
3
3
  export const useDebounce = (
4
4
  callback: (value: string) => void,
5
5
  delay: number
6
6
  ) => {
7
- const timeoutRef = React.useRef<NodeJS.Timeout | null>(null);
7
+ const timeoutRef = useRef<NodeJS.Timeout | null>(null);
8
+ const callbackRef = useRef(callback);
8
9
 
9
- return React.useCallback(
10
+ // Update callback ref when it changes
11
+ useEffect(() => {
12
+ callbackRef.current = callback;
13
+ }, [callback]);
14
+
15
+ // Cleanup on unmount
16
+ useEffect(() => {
17
+ return () => {
18
+ if (timeoutRef.current) {
19
+ clearTimeout(timeoutRef.current);
20
+ }
21
+ };
22
+ }, []);
23
+
24
+ return useCallback(
10
25
  (value: string) => {
11
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
12
- timeoutRef.current = setTimeout(() => callback(value), delay);
26
+ if (timeoutRef.current) {
27
+ clearTimeout(timeoutRef.current);
28
+ }
29
+ timeoutRef.current = setTimeout(() => {
30
+ callbackRef.current(value);
31
+ }, delay);
13
32
  },
14
- [callback, delay]
33
+ [delay]
15
34
  );
16
35
  };
@@ -3,7 +3,7 @@
3
3
  * @lastModified Sat 14 Jun 2025 at 03:01 PM
4
4
  */
5
5
 
6
- import { useEffect, useState } from 'react';
6
+ import { useEffect, useState, useCallback, useMemo } from 'react';
7
7
  import { Keyboard, Platform } from 'react-native';
8
8
 
9
9
  export const useKeyboard = () => {
@@ -29,8 +29,15 @@ export const useKeyboard = () => {
29
29
  };
30
30
  }, []);
31
31
 
32
- return {
33
- isKeyboardOpen,
34
- hideKeyboard: () => Keyboard.dismiss(),
35
- };
32
+ const hideKeyboard = useCallback(() => {
33
+ Keyboard.dismiss();
34
+ }, []);
35
+
36
+ return useMemo(
37
+ () => ({
38
+ isKeyboardOpen,
39
+ hideKeyboard,
40
+ }),
41
+ [isKeyboardOpen, hideKeyboard]
42
+ );
36
43
  };