@oxyhq/services 5.25.0 → 5.26.0

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 (444) hide show
  1. package/README.md +60 -8
  2. package/lib/commonjs/core/AuthManager.js +405 -0
  3. package/lib/commonjs/core/AuthManager.js.map +1 -0
  4. package/lib/commonjs/core/HttpService.js +39 -1
  5. package/lib/commonjs/core/HttpService.js.map +1 -1
  6. package/lib/commonjs/core/index.js +16 -0
  7. package/lib/commonjs/core/index.js.map +1 -1
  8. package/lib/commonjs/core/mixins/OxyServices.fedcm.js +38 -44
  9. package/lib/commonjs/core/mixins/OxyServices.fedcm.js.map +1 -1
  10. package/lib/commonjs/core/mixins/OxyServices.popup.js +9 -7
  11. package/lib/commonjs/core/mixins/OxyServices.popup.js.map +1 -1
  12. package/lib/commonjs/index.js +321 -18
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/shared/index.js +227 -0
  15. package/lib/commonjs/shared/index.js.map +1 -0
  16. package/lib/commonjs/shared/utils/colorUtils.js +161 -0
  17. package/lib/commonjs/shared/utils/colorUtils.js.map +1 -0
  18. package/lib/commonjs/shared/utils/debugUtils.js +84 -0
  19. package/lib/commonjs/shared/utils/debugUtils.js.map +1 -0
  20. package/lib/commonjs/shared/utils/errorUtils.js +190 -0
  21. package/lib/commonjs/shared/utils/errorUtils.js.map +1 -0
  22. package/lib/commonjs/shared/utils/index.js +196 -0
  23. package/lib/commonjs/shared/utils/index.js.map +1 -0
  24. package/lib/commonjs/shared/utils/networkUtils.js +213 -0
  25. package/lib/commonjs/shared/utils/networkUtils.js.map +1 -0
  26. package/lib/commonjs/shared/utils/themeUtils.js +118 -0
  27. package/lib/commonjs/shared/utils/themeUtils.js.map +1 -0
  28. package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -1
  29. package/lib/commonjs/ui/components/FontLoader.js +1 -1
  30. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  31. package/lib/commonjs/ui/components/GroupedItem.js +1 -1
  32. package/lib/commonjs/ui/components/Header.js +1 -1
  33. package/lib/commonjs/ui/components/OxyProvider.js +9 -1
  34. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  35. package/lib/commonjs/ui/components/OxySignInButton.js +19 -20
  36. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  37. package/lib/commonjs/ui/components/ProfileCard.js +1 -1
  38. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  39. package/lib/commonjs/ui/components/QuickActions.js +1 -1
  40. package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
  41. package/lib/commonjs/ui/components/Section.js +1 -1
  42. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  43. package/lib/commonjs/ui/components/SignInModal.js +546 -0
  44. package/lib/commonjs/ui/components/SignInModal.js.map +1 -0
  45. package/lib/commonjs/ui/context/OxyContext.js +2 -1
  46. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  47. package/lib/commonjs/ui/hooks/{use-color-scheme.js → useColorScheme.js} +1 -1
  48. package/lib/commonjs/ui/hooks/useColorScheme.js.map +1 -0
  49. package/lib/commonjs/ui/hooks/useSessionSocket.js +6 -12
  50. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  51. package/lib/commonjs/ui/hooks/useThemeColors.js +1 -1
  52. package/lib/commonjs/ui/hooks/useThemeStyles.js +1 -1
  53. package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -2
  54. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  55. package/lib/commonjs/ui/navigation/routes.js +7 -8
  56. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  57. package/lib/commonjs/ui/screens/AccountCenterScreen.js +7 -7
  58. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +6 -6
  60. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +2 -2
  62. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +4 -4
  63. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/AppInfoScreen.js +1 -1
  65. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +1 -1
  66. package/lib/commonjs/ui/screens/FileManagementScreen.js +1 -1
  67. package/lib/commonjs/ui/screens/FollowersListScreen.js +18 -0
  68. package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -0
  69. package/lib/commonjs/ui/screens/FollowingListScreen.js +18 -0
  70. package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -0
  71. package/lib/commonjs/ui/screens/HelpSupportScreen.js +1 -1
  72. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/HistoryViewScreen.js +1 -1
  74. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +1 -1
  75. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +229 -0
  76. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -0
  77. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +1 -1
  78. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/OxyAuthScreen.js +9 -21
  80. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1 -1
  82. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  83. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +1 -1
  85. package/lib/commonjs/ui/screens/UserListScreen.js +411 -0
  86. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -0
  87. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +1 -1
  88. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
  89. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +1 -1
  90. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  91. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +1 -1
  92. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
  93. package/lib/commonjs/ui/stores/authStore.js +4 -6
  94. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  95. package/lib/commonjs/ui/utils/colorUtils.js +43 -46
  96. package/lib/commonjs/ui/utils/colorUtils.js.map +1 -1
  97. package/lib/commonjs/ui/utils/themeUtils.js +29 -39
  98. package/lib/commonjs/ui/utils/themeUtils.js.map +1 -1
  99. package/lib/commonjs/ui/utils/{user-utils.js → userUtils.js} +1 -1
  100. package/lib/commonjs/ui/utils/userUtils.js.map +1 -0
  101. package/lib/commonjs/utils/errorUtils.js +0 -13
  102. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  103. package/lib/commonjs/utils/hookUtils.js +8 -8
  104. package/lib/commonjs/utils/hookUtils.js.map +1 -1
  105. package/lib/commonjs/web/WebOxyContext.js +273 -41
  106. package/lib/commonjs/web/WebOxyContext.js.map +1 -1
  107. package/lib/commonjs/web/index.js +177 -4
  108. package/lib/commonjs/web/index.js.map +1 -1
  109. package/lib/commonjs/web.js +12 -12
  110. package/lib/commonjs/web.js.map +1 -1
  111. package/lib/module/core/AuthManager.js +399 -0
  112. package/lib/module/core/AuthManager.js.map +1 -0
  113. package/lib/module/core/HttpService.js +39 -1
  114. package/lib/module/core/HttpService.js.map +1 -1
  115. package/lib/module/core/index.js +2 -0
  116. package/lib/module/core/index.js.map +1 -1
  117. package/lib/module/core/mixins/OxyServices.fedcm.js +38 -44
  118. package/lib/module/core/mixins/OxyServices.fedcm.js.map +1 -1
  119. package/lib/module/core/mixins/OxyServices.popup.js +9 -7
  120. package/lib/module/core/mixins/OxyServices.popup.js.map +1 -1
  121. package/lib/module/index.js +27 -2
  122. package/lib/module/index.js.map +1 -1
  123. package/lib/module/shared/index.js +37 -0
  124. package/lib/module/shared/index.js.map +1 -0
  125. package/lib/module/shared/utils/colorUtils.js +150 -0
  126. package/lib/module/shared/utils/colorUtils.js.map +1 -0
  127. package/lib/module/shared/utils/debugUtils.js +75 -0
  128. package/lib/module/shared/utils/debugUtils.js.map +1 -0
  129. package/lib/module/shared/utils/errorUtils.js +176 -0
  130. package/lib/module/shared/utils/errorUtils.js.map +1 -0
  131. package/lib/module/shared/utils/index.js +21 -0
  132. package/lib/module/shared/utils/index.js.map +1 -0
  133. package/lib/module/shared/utils/networkUtils.js +202 -0
  134. package/lib/module/shared/utils/networkUtils.js.map +1 -0
  135. package/lib/module/shared/utils/themeUtils.js +109 -0
  136. package/lib/module/shared/utils/themeUtils.js.map +1 -0
  137. package/lib/module/ui/components/BottomSheetRouter.js +1 -1
  138. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  139. package/lib/module/ui/components/FontLoader.js +1 -1
  140. package/lib/module/ui/components/FontLoader.js.map +1 -1
  141. package/lib/module/ui/components/GroupedItem.js +1 -1
  142. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  143. package/lib/module/ui/components/Header.js +1 -1
  144. package/lib/module/ui/components/Header.js.map +1 -1
  145. package/lib/module/ui/components/OxyProvider.js +9 -1
  146. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  147. package/lib/module/ui/components/OxySignInButton.js +20 -21
  148. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  149. package/lib/module/ui/components/ProfileCard.js +1 -1
  150. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  151. package/lib/module/ui/components/QuickActions.js +1 -1
  152. package/lib/module/ui/components/QuickActions.js.map +1 -1
  153. package/lib/module/ui/components/Section.js +1 -1
  154. package/lib/module/ui/components/Section.js.map +1 -1
  155. package/lib/module/ui/components/SectionTitle.js +1 -1
  156. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  157. package/lib/module/ui/components/SignInModal.js +536 -0
  158. package/lib/module/ui/components/SignInModal.js.map +1 -0
  159. package/lib/module/ui/context/OxyContext.js +1 -1
  160. package/lib/module/ui/context/OxyContext.js.map +1 -1
  161. package/lib/module/ui/hooks/{use-color-scheme.js → useColorScheme.js} +1 -1
  162. package/lib/module/ui/hooks/useColorScheme.js.map +1 -0
  163. package/lib/module/ui/hooks/useSessionSocket.js +6 -12
  164. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  165. package/lib/module/ui/hooks/useThemeColors.js +1 -1
  166. package/lib/module/ui/hooks/useThemeColors.js.map +1 -1
  167. package/lib/module/ui/hooks/useThemeStyles.js +1 -1
  168. package/lib/module/ui/hooks/useThemeStyles.js.map +1 -1
  169. package/lib/module/ui/navigation/bottomSheetManager.js +5 -2
  170. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  171. package/lib/module/ui/navigation/routes.js +7 -8
  172. package/lib/module/ui/navigation/routes.js.map +1 -1
  173. package/lib/module/ui/screens/AccountCenterScreen.js +7 -7
  174. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  175. package/lib/module/ui/screens/AccountOverviewScreen.js +6 -6
  176. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  177. package/lib/module/ui/screens/AccountSettingsScreen.js +2 -2
  178. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  179. package/lib/module/ui/screens/AccountSwitcherScreen.js +4 -4
  180. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  181. package/lib/module/ui/screens/AppInfoScreen.js +1 -1
  182. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  183. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  184. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  185. package/lib/module/ui/screens/FileManagementScreen.js +1 -1
  186. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  187. package/lib/module/ui/screens/FollowersListScreen.js +13 -0
  188. package/lib/module/ui/screens/FollowersListScreen.js.map +1 -0
  189. package/lib/module/ui/screens/FollowingListScreen.js +13 -0
  190. package/lib/module/ui/screens/FollowingListScreen.js.map +1 -0
  191. package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
  192. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  193. package/lib/module/ui/screens/HistoryViewScreen.js +1 -1
  194. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  195. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  196. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  197. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +224 -0
  198. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -0
  199. package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
  200. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  201. package/lib/module/ui/screens/OxyAuthScreen.js +9 -21
  202. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  203. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1 -1
  204. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  205. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  206. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  207. package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
  208. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  209. package/lib/module/ui/screens/UserListScreen.js +405 -0
  210. package/lib/module/ui/screens/UserListScreen.js.map +1 -0
  211. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +1 -1
  212. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  213. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
  214. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  215. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -1
  216. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  217. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  218. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  219. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +1 -1
  220. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  221. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  222. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  223. package/lib/module/ui/stores/authStore.js +4 -6
  224. package/lib/module/ui/stores/authStore.js.map +1 -1
  225. package/lib/module/ui/utils/colorUtils.js +7 -40
  226. package/lib/module/ui/utils/colorUtils.js.map +1 -1
  227. package/lib/module/ui/utils/themeUtils.js +7 -35
  228. package/lib/module/ui/utils/themeUtils.js.map +1 -1
  229. package/lib/module/ui/utils/{user-utils.js → userUtils.js} +1 -1
  230. package/lib/module/ui/utils/userUtils.js.map +1 -0
  231. package/lib/module/utils/errorUtils.js +0 -7
  232. package/lib/module/utils/errorUtils.js.map +1 -1
  233. package/lib/module/utils/hookUtils.js +8 -8
  234. package/lib/module/utils/hookUtils.js.map +1 -1
  235. package/lib/module/web/WebOxyContext.js +272 -41
  236. package/lib/module/web/WebOxyContext.js.map +1 -1
  237. package/lib/module/web/index.js +26 -5
  238. package/lib/module/web/index.js.map +1 -1
  239. package/lib/module/web.js +2 -1
  240. package/lib/module/web.js.map +1 -1
  241. package/lib/typescript/commonjs/core/AuthManager.d.ts +144 -0
  242. package/lib/typescript/commonjs/core/AuthManager.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/core/index.d.ts +2 -0
  245. package/lib/typescript/commonjs/core/index.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/core/mixins/OxyServices.fedcm.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/core/mixins/OxyServices.popup.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/index.d.ts +16 -2
  249. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/models/session.d.ts +4 -0
  251. package/lib/typescript/commonjs/models/session.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/shared/index.d.ts +29 -0
  253. package/lib/typescript/commonjs/shared/index.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts +105 -0
  255. package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts +49 -0
  257. package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts +98 -0
  259. package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/shared/utils/index.d.ts +14 -0
  261. package/lib/typescript/commonjs/shared/utils/index.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts +140 -0
  263. package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts +91 -0
  265. package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
  267. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +18 -0
  271. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +1 -2
  273. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/ui/hooks/{use-color-scheme.d.ts → useColorScheme.d.ts} +1 -1
  275. package/lib/typescript/commonjs/ui/hooks/useColorScheme.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +2 -0
  278. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  280. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +9 -0
  282. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +9 -0
  284. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts +5 -0
  286. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +11 -0
  289. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts +7 -11
  292. package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts +6 -19
  294. package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/utils/{user-utils.d.ts → userUtils.d.ts} +1 -1
  296. package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/utils/errorUtils.d.ts +0 -6
  298. package/lib/typescript/commonjs/utils/errorUtils.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/web/WebOxyContext.d.ts +117 -9
  300. package/lib/typescript/commonjs/web/WebOxyContext.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/web/index.d.ts +19 -8
  302. package/lib/typescript/commonjs/web/index.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/web.d.ts +2 -1
  304. package/lib/typescript/commonjs/web.d.ts.map +1 -1
  305. package/lib/typescript/module/core/AuthManager.d.ts +144 -0
  306. package/lib/typescript/module/core/AuthManager.d.ts.map +1 -0
  307. package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
  308. package/lib/typescript/module/core/index.d.ts +2 -0
  309. package/lib/typescript/module/core/index.d.ts.map +1 -1
  310. package/lib/typescript/module/core/mixins/OxyServices.fedcm.d.ts.map +1 -1
  311. package/lib/typescript/module/core/mixins/OxyServices.popup.d.ts.map +1 -1
  312. package/lib/typescript/module/index.d.ts +16 -2
  313. package/lib/typescript/module/index.d.ts.map +1 -1
  314. package/lib/typescript/module/models/session.d.ts +4 -0
  315. package/lib/typescript/module/models/session.d.ts.map +1 -1
  316. package/lib/typescript/module/shared/index.d.ts +29 -0
  317. package/lib/typescript/module/shared/index.d.ts.map +1 -0
  318. package/lib/typescript/module/shared/utils/colorUtils.d.ts +105 -0
  319. package/lib/typescript/module/shared/utils/colorUtils.d.ts.map +1 -0
  320. package/lib/typescript/module/shared/utils/debugUtils.d.ts +49 -0
  321. package/lib/typescript/module/shared/utils/debugUtils.d.ts.map +1 -0
  322. package/lib/typescript/module/shared/utils/errorUtils.d.ts +98 -0
  323. package/lib/typescript/module/shared/utils/errorUtils.d.ts.map +1 -0
  324. package/lib/typescript/module/shared/utils/index.d.ts +14 -0
  325. package/lib/typescript/module/shared/utils/index.d.ts.map +1 -0
  326. package/lib/typescript/module/shared/utils/networkUtils.d.ts +140 -0
  327. package/lib/typescript/module/shared/utils/networkUtils.d.ts.map +1 -0
  328. package/lib/typescript/module/shared/utils/themeUtils.d.ts +91 -0
  329. package/lib/typescript/module/shared/utils/themeUtils.d.ts.map +1 -0
  330. package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
  331. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
  332. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/components/SignInModal.d.ts +18 -0
  335. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -0
  336. package/lib/typescript/module/ui/context/OxyContext.d.ts +1 -2
  337. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  338. package/lib/typescript/module/ui/hooks/{use-color-scheme.d.ts → useColorScheme.d.ts} +1 -1
  339. package/lib/typescript/module/ui/hooks/useColorScheme.d.ts.map +1 -0
  340. package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +2 -0
  342. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  344. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +9 -0
  346. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -0
  347. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +9 -0
  348. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -0
  349. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +5 -0
  350. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -0
  351. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +11 -0
  353. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -0
  354. package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
  355. package/lib/typescript/module/ui/utils/colorUtils.d.ts +7 -11
  356. package/lib/typescript/module/ui/utils/colorUtils.d.ts.map +1 -1
  357. package/lib/typescript/module/ui/utils/themeUtils.d.ts +6 -19
  358. package/lib/typescript/module/ui/utils/themeUtils.d.ts.map +1 -1
  359. package/lib/typescript/module/ui/utils/{user-utils.d.ts → userUtils.d.ts} +1 -1
  360. package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -0
  361. package/lib/typescript/module/utils/errorUtils.d.ts +0 -6
  362. package/lib/typescript/module/utils/errorUtils.d.ts.map +1 -1
  363. package/lib/typescript/module/web/WebOxyContext.d.ts +117 -9
  364. package/lib/typescript/module/web/WebOxyContext.d.ts.map +1 -1
  365. package/lib/typescript/module/web/index.d.ts +19 -8
  366. package/lib/typescript/module/web/index.d.ts.map +1 -1
  367. package/lib/typescript/module/web.d.ts +2 -1
  368. package/lib/typescript/module/web.d.ts.map +1 -1
  369. package/package.json +8 -2
  370. package/src/core/AuthManager.ts +436 -0
  371. package/src/core/HttpService.ts +43 -1
  372. package/src/core/index.ts +4 -0
  373. package/src/core/mixins/OxyServices.fedcm.ts +37 -42
  374. package/src/core/mixins/OxyServices.popup.ts +10 -7
  375. package/src/index.ts +76 -11
  376. package/src/models/session.ts +4 -0
  377. package/src/shared/index.ts +82 -0
  378. package/src/shared/utils/colorUtils.ts +155 -0
  379. package/src/shared/utils/debugUtils.ts +73 -0
  380. package/src/shared/utils/errorUtils.ts +181 -0
  381. package/src/shared/utils/index.ts +59 -0
  382. package/src/shared/utils/networkUtils.ts +248 -0
  383. package/src/shared/utils/themeUtils.ts +115 -0
  384. package/src/ui/components/BottomSheetRouter.tsx +1 -1
  385. package/src/ui/components/FontLoader.tsx +1 -2
  386. package/src/ui/components/GroupedItem.tsx +1 -1
  387. package/src/ui/components/Header.tsx +1 -1
  388. package/src/ui/components/OxyProvider.tsx +10 -0
  389. package/src/ui/components/OxySignInButton.tsx +20 -22
  390. package/src/ui/components/ProfileCard.tsx +1 -1
  391. package/src/ui/components/QuickActions.tsx +1 -1
  392. package/src/ui/components/Section.tsx +1 -1
  393. package/src/ui/components/SectionTitle.tsx +1 -1
  394. package/src/ui/components/SignInModal.tsx +534 -0
  395. package/src/ui/context/OxyContext.tsx +1 -2
  396. package/src/ui/hooks/queries/queryKeys.ts +2 -2
  397. package/src/ui/hooks/useSessionSocket.ts +12 -17
  398. package/src/ui/hooks/useThemeColors.ts +1 -1
  399. package/src/ui/hooks/useThemeStyles.ts +1 -1
  400. package/src/ui/navigation/bottomSheetManager.ts +5 -1
  401. package/src/ui/navigation/routes.ts +8 -9
  402. package/src/ui/screens/AccountCenterScreen.tsx +7 -7
  403. package/src/ui/screens/AccountOverviewScreen.tsx +6 -6
  404. package/src/ui/screens/AccountSettingsScreen.tsx +2 -2
  405. package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
  406. package/src/ui/screens/AppInfoScreen.tsx +1 -1
  407. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  408. package/src/ui/screens/FileManagementScreen.tsx +1 -1
  409. package/src/ui/screens/FollowersListScreen.tsx +14 -0
  410. package/src/ui/screens/FollowingListScreen.tsx +14 -0
  411. package/src/ui/screens/HelpSupportScreen.tsx +1 -1
  412. package/src/ui/screens/HistoryViewScreen.tsx +1 -1
  413. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  414. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +231 -0
  415. package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
  416. package/src/ui/screens/OxyAuthScreen.tsx +10 -21
  417. package/src/ui/screens/PremiumSubscriptionScreen.tsx +1 -1
  418. package/src/ui/screens/ProfileScreen.tsx +1 -1
  419. package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
  420. package/src/ui/screens/UserListScreen.tsx +416 -0
  421. package/src/ui/screens/karma/KarmaAboutScreen.tsx +1 -1
  422. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
  423. package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
  424. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
  425. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +1 -1
  426. package/src/ui/screens/karma/KarmaRulesScreen.tsx +1 -1
  427. package/src/ui/stores/authStore.ts +5 -6
  428. package/src/ui/utils/colorUtils.ts +15 -43
  429. package/src/ui/utils/themeUtils.ts +14 -39
  430. package/src/utils/errorUtils.ts +1 -6
  431. package/src/utils/hookUtils.ts +8 -8
  432. package/src/web/WebOxyContext.tsx +331 -41
  433. package/src/web/index.ts +76 -6
  434. package/src/web.ts +1 -1
  435. package/lib/commonjs/ui/hooks/use-color-scheme.js.map +0 -1
  436. package/lib/commonjs/ui/utils/user-utils.js.map +0 -1
  437. package/lib/module/ui/hooks/use-color-scheme.js.map +0 -1
  438. package/lib/module/ui/utils/user-utils.js.map +0 -1
  439. package/lib/typescript/commonjs/ui/hooks/use-color-scheme.d.ts.map +0 -1
  440. package/lib/typescript/commonjs/ui/utils/user-utils.d.ts.map +0 -1
  441. package/lib/typescript/module/ui/hooks/use-color-scheme.d.ts.map +0 -1
  442. package/lib/typescript/module/ui/utils/user-utils.d.ts.map +0 -1
  443. /package/src/ui/hooks/{use-color-scheme.ts → useColorScheme.ts} +0 -0
  444. /package/src/ui/utils/{user-utils.ts → userUtils.ts} +0 -0
@@ -226,7 +226,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
226
226
  {isOwnProfile ? (
227
227
  <TouchableOpacity
228
228
  style={styles.actionButton}
229
- onPress={() => navigate?.('EditProfile')}
229
+ onPress={() => navigate?.('AccountSettings')}
230
230
  >
231
231
  <Text style={styles.actionButtonText}>{t('editProfile.title') || 'Edit Profile'}</Text>
232
232
  </TouchableOpacity>
@@ -11,7 +11,7 @@ import { toast } from '../../lib/sonner';
11
11
  import { Header, Section, GroupedSection, LoadingState, EmptyState } from '../components';
12
12
  import { useI18n } from '../hooks/useI18n';
13
13
  import { useThemeStyles } from '../hooks/useThemeStyles';
14
- import { useColorScheme } from '../hooks/use-color-scheme';
14
+ import { useColorScheme } from '../hooks/useColorScheme';
15
15
  import { useOxy } from '../context/OxyContext';
16
16
 
17
17
  interface SavedItem {
@@ -0,0 +1,416 @@
1
+ import React, { useEffect, useState, useCallback } from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ StyleSheet,
6
+ ActivityIndicator,
7
+ FlatList,
8
+ TouchableOpacity,
9
+ RefreshControl,
10
+ } from 'react-native';
11
+ import type { BaseScreenProps } from '../types/navigation';
12
+ import { useThemeColors, type ThemeColors } from '../styles';
13
+ import Avatar from '../components/Avatar';
14
+ import { FollowButton } from '../components';
15
+ import { Ionicons } from '@expo/vector-icons';
16
+ import { useI18n } from '../hooks/useI18n';
17
+ import { useOxy } from '../context/OxyContext';
18
+ import { logger } from '../../utils/loggerUtils';
19
+ import type { User } from '../../models/interfaces';
20
+
21
+ type ListMode = 'followers' | 'following';
22
+
23
+ interface UserListScreenProps extends BaseScreenProps {
24
+ userId: string;
25
+ mode: ListMode;
26
+ initialCount?: number;
27
+ }
28
+
29
+ const PAGE_SIZE = 20;
30
+
31
+ const UserListScreen: React.FC<UserListScreenProps> = ({
32
+ userId,
33
+ mode,
34
+ initialCount,
35
+ theme,
36
+ goBack,
37
+ navigate,
38
+ }) => {
39
+ const { oxyServices, user: currentUser } = useOxy();
40
+ const [users, setUsers] = useState<User[]>([]);
41
+ const [total, setTotal] = useState(initialCount ?? 0);
42
+ const [isLoading, setIsLoading] = useState(true);
43
+ const [isLoadingMore, setIsLoadingMore] = useState(false);
44
+ const [isRefreshing, setIsRefreshing] = useState(false);
45
+ const [error, setError] = useState<string | null>(null);
46
+ const [hasMore, setHasMore] = useState(true);
47
+
48
+ const colors = useThemeColors((theme as 'light' | 'dark') ?? 'light');
49
+ const styles = createStyles(colors);
50
+ const { t } = useI18n();
51
+
52
+ const currentUserId = currentUser?.id || (currentUser?._id as string | undefined);
53
+
54
+ const fetchUsers = useCallback(
55
+ async (offset = 0, isRefresh = false) => {
56
+ if (!userId) {
57
+ setError('No user ID provided');
58
+ setIsLoading(false);
59
+ return;
60
+ }
61
+
62
+ try {
63
+ if (isRefresh) {
64
+ setIsRefreshing(true);
65
+ } else if (offset === 0) {
66
+ setIsLoading(true);
67
+ } else {
68
+ setIsLoadingMore(true);
69
+ }
70
+ setError(null);
71
+
72
+ const response =
73
+ mode === 'followers'
74
+ ? await oxyServices.getUserFollowers(userId, { limit: PAGE_SIZE, offset })
75
+ : await oxyServices.getUserFollowing(userId, { limit: PAGE_SIZE, offset });
76
+
77
+ const newUsers = mode === 'followers' ? response.followers : response.following;
78
+
79
+ if (offset === 0 || isRefresh) {
80
+ setUsers(newUsers);
81
+ } else {
82
+ setUsers((prev) => [...prev, ...newUsers]);
83
+ }
84
+
85
+ setTotal(response.total);
86
+ setHasMore(response.hasMore);
87
+ } catch (err) {
88
+ logger.error(`Failed to fetch ${mode}`, err instanceof Error ? err : new Error(String(err)), {
89
+ component: 'UserListScreen',
90
+ });
91
+ setError(`Failed to load ${mode}. Please try again.`);
92
+ } finally {
93
+ setIsLoading(false);
94
+ setIsLoadingMore(false);
95
+ setIsRefreshing(false);
96
+ }
97
+ },
98
+ [userId, mode, oxyServices]
99
+ );
100
+
101
+ useEffect(() => {
102
+ fetchUsers(0);
103
+ }, [fetchUsers]);
104
+
105
+ const handleLoadMore = useCallback(() => {
106
+ if (!isLoadingMore && hasMore && !isLoading) {
107
+ fetchUsers(users.length);
108
+ }
109
+ }, [isLoadingMore, hasMore, isLoading, users.length, fetchUsers]);
110
+
111
+ const handleRefresh = useCallback(() => {
112
+ fetchUsers(0, true);
113
+ }, [fetchUsers]);
114
+
115
+ const handleUserPress = useCallback(
116
+ (user: User) => {
117
+ const targetUserId = user.id || (user._id as string | undefined);
118
+ if (targetUserId && navigate) {
119
+ navigate('Profile', { userId: targetUserId });
120
+ }
121
+ },
122
+ [navigate]
123
+ );
124
+
125
+ const renderUser = useCallback(
126
+ ({ item }: { item: User }) => {
127
+ const itemUserId = item.id || (item._id as string) || '';
128
+ const isCurrentUser = itemUserId === currentUserId;
129
+ const description = typeof item.description === 'string' ? item.description : '';
130
+
131
+ return (
132
+ <TouchableOpacity
133
+ style={styles.userItem}
134
+ onPress={() => handleUserPress(item)}
135
+ activeOpacity={0.7}
136
+ >
137
+ <Avatar
138
+ uri={
139
+ item.avatar
140
+ ? oxyServices.getFileDownloadUrl(item.avatar as string, 'thumb')
141
+ : undefined
142
+ }
143
+ name={item.username || item.name?.full}
144
+ size={48}
145
+ />
146
+ <View style={styles.userInfo}>
147
+ <Text style={styles.userName} numberOfLines={1}>
148
+ {item.name?.full || item.username || 'Unknown User'}
149
+ </Text>
150
+ {item.username && (
151
+ <Text style={styles.userHandle} numberOfLines={1}>
152
+ @{item.username}
153
+ </Text>
154
+ )}
155
+ {description ? (
156
+ <Text style={styles.userBio} numberOfLines={2}>
157
+ {description}
158
+ </Text>
159
+ ) : null}
160
+ </View>
161
+ {!isCurrentUser && itemUserId ? (
162
+ <View style={styles.followButtonWrapper}>
163
+ <FollowButton userId={itemUserId} size="small" />
164
+ </View>
165
+ ) : null}
166
+ </TouchableOpacity>
167
+ );
168
+ },
169
+ [colors, styles, handleUserPress, currentUserId, oxyServices]
170
+ );
171
+
172
+ const renderEmpty = useCallback(() => {
173
+ if (isLoading) return null;
174
+ return (
175
+ <View style={styles.emptyContainer}>
176
+ <Ionicons
177
+ name={mode === 'followers' ? 'people-outline' : 'heart-outline'}
178
+ size={64}
179
+ color={colors.secondaryText}
180
+ />
181
+ <Text style={styles.emptyTitle}>
182
+ {mode === 'followers'
183
+ ? t('userList.noFollowers') || 'No followers yet'
184
+ : t('userList.noFollowing') || 'Not following anyone'}
185
+ </Text>
186
+ <Text style={styles.emptySubtitle}>
187
+ {mode === 'followers'
188
+ ? t('userList.noFollowersDesc') || 'When people follow this user, they will appear here.'
189
+ : t('userList.noFollowingDesc') || 'When this user follows people, they will appear here.'}
190
+ </Text>
191
+ </View>
192
+ );
193
+ }, [isLoading, mode, colors, styles, t]);
194
+
195
+ const renderFooter = useCallback(() => {
196
+ if (!isLoadingMore) return null;
197
+ return (
198
+ <View style={styles.footerLoader}>
199
+ <ActivityIndicator size="small" color={colors.primary} />
200
+ </View>
201
+ );
202
+ }, [isLoadingMore, colors, styles]);
203
+
204
+ const title = mode === 'followers'
205
+ ? (t('userList.followers') || 'Followers')
206
+ : (t('userList.following') || 'Following');
207
+
208
+ if (isLoading && users.length === 0) {
209
+ return (
210
+ <View style={styles.container}>
211
+ <View style={styles.header}>
212
+ {goBack && (
213
+ <TouchableOpacity onPress={goBack} style={styles.backButton}>
214
+ <Ionicons name="arrow-back" size={24} color={colors.text} />
215
+ </TouchableOpacity>
216
+ )}
217
+ <Text style={styles.headerTitle}>{title}</Text>
218
+ <View style={styles.headerRight} />
219
+ </View>
220
+ <View style={styles.loadingContainer}>
221
+ <ActivityIndicator size="large" color={colors.primary} />
222
+ </View>
223
+ </View>
224
+ );
225
+ }
226
+
227
+ if (error) {
228
+ return (
229
+ <View style={styles.container}>
230
+ <View style={styles.header}>
231
+ {goBack && (
232
+ <TouchableOpacity onPress={goBack} style={styles.backButton}>
233
+ <Ionicons name="arrow-back" size={24} color={colors.text} />
234
+ </TouchableOpacity>
235
+ )}
236
+ <Text style={styles.headerTitle}>{title}</Text>
237
+ <View style={styles.headerRight} />
238
+ </View>
239
+ <View style={styles.errorContainer}>
240
+ <Ionicons name="alert-circle" size={48} color={colors.error} />
241
+ <Text style={styles.errorText}>{error}</Text>
242
+ <TouchableOpacity style={styles.retryButton} onPress={() => fetchUsers(0)}>
243
+ <Text style={styles.retryButtonText}>{t('common.retry') || 'Retry'}</Text>
244
+ </TouchableOpacity>
245
+ </View>
246
+ </View>
247
+ );
248
+ }
249
+
250
+ return (
251
+ <View style={styles.container}>
252
+ <View style={styles.header}>
253
+ {goBack && (
254
+ <TouchableOpacity onPress={goBack} style={styles.backButton}>
255
+ <Ionicons name="arrow-back" size={24} color={colors.text} />
256
+ </TouchableOpacity>
257
+ )}
258
+ <View style={styles.headerTitleContainer}>
259
+ <Text style={styles.headerTitle}>{title}</Text>
260
+ {total > 0 && <Text style={styles.headerCount}>{total}</Text>}
261
+ </View>
262
+ <View style={styles.headerRight} />
263
+ </View>
264
+ <FlatList
265
+ data={users}
266
+ renderItem={renderUser}
267
+ keyExtractor={(item, index) => item.id || (item._id as string) || `user-${index}`}
268
+ contentContainerStyle={styles.listContent}
269
+ ItemSeparatorComponent={() => <View style={styles.separator} />}
270
+ ListEmptyComponent={renderEmpty}
271
+ ListFooterComponent={renderFooter}
272
+ onEndReached={handleLoadMore}
273
+ onEndReachedThreshold={0.3}
274
+ refreshControl={
275
+ <RefreshControl
276
+ refreshing={isRefreshing}
277
+ onRefresh={handleRefresh}
278
+ tintColor={colors.primary}
279
+ colors={[colors.primary]}
280
+ />
281
+ }
282
+ />
283
+ </View>
284
+ );
285
+ };
286
+
287
+ const createStyles = (colors: ThemeColors) =>
288
+ StyleSheet.create({
289
+ container: {
290
+ flex: 1,
291
+ backgroundColor: colors.background,
292
+ },
293
+ header: {
294
+ flexDirection: 'row',
295
+ alignItems: 'center',
296
+ paddingHorizontal: 16,
297
+ paddingVertical: 12,
298
+ borderBottomWidth: 1,
299
+ borderBottomColor: colors.border,
300
+ },
301
+ backButton: {
302
+ padding: 8,
303
+ marginRight: 8,
304
+ },
305
+ headerTitleContainer: {
306
+ flex: 1,
307
+ flexDirection: 'row',
308
+ alignItems: 'center',
309
+ },
310
+ headerTitle: {
311
+ fontSize: 18,
312
+ fontWeight: '600',
313
+ color: colors.text,
314
+ },
315
+ headerCount: {
316
+ fontSize: 16,
317
+ color: colors.secondaryText,
318
+ marginLeft: 8,
319
+ },
320
+ headerRight: {
321
+ width: 40,
322
+ },
323
+ loadingContainer: {
324
+ flex: 1,
325
+ justifyContent: 'center',
326
+ alignItems: 'center',
327
+ },
328
+ errorContainer: {
329
+ flex: 1,
330
+ justifyContent: 'center',
331
+ alignItems: 'center',
332
+ paddingHorizontal: 32,
333
+ },
334
+ errorText: {
335
+ fontSize: 16,
336
+ color: colors.error,
337
+ textAlign: 'center',
338
+ marginTop: 16,
339
+ marginBottom: 24,
340
+ },
341
+ retryButton: {
342
+ backgroundColor: colors.primary,
343
+ paddingHorizontal: 24,
344
+ paddingVertical: 12,
345
+ borderRadius: 8,
346
+ },
347
+ retryButtonText: {
348
+ color: '#fff',
349
+ fontSize: 16,
350
+ fontWeight: '600',
351
+ },
352
+ listContent: {
353
+ flexGrow: 1,
354
+ },
355
+ userItem: {
356
+ flexDirection: 'row',
357
+ alignItems: 'center',
358
+ paddingHorizontal: 16,
359
+ paddingVertical: 12,
360
+ },
361
+ userInfo: {
362
+ flex: 1,
363
+ marginLeft: 12,
364
+ marginRight: 8,
365
+ },
366
+ userName: {
367
+ fontSize: 16,
368
+ fontWeight: '600',
369
+ color: colors.text,
370
+ },
371
+ userHandle: {
372
+ fontSize: 14,
373
+ color: colors.secondaryText,
374
+ marginTop: 2,
375
+ },
376
+ userBio: {
377
+ fontSize: 14,
378
+ color: colors.text,
379
+ marginTop: 4,
380
+ opacity: 0.8,
381
+ },
382
+ followButtonWrapper: {
383
+ marginLeft: 'auto',
384
+ },
385
+ separator: {
386
+ height: 1,
387
+ backgroundColor: colors.border,
388
+ marginLeft: 76,
389
+ },
390
+ emptyContainer: {
391
+ flex: 1,
392
+ justifyContent: 'center',
393
+ alignItems: 'center',
394
+ paddingHorizontal: 32,
395
+ paddingTop: 80,
396
+ },
397
+ emptyTitle: {
398
+ fontSize: 18,
399
+ fontWeight: '600',
400
+ color: colors.text,
401
+ marginTop: 16,
402
+ textAlign: 'center',
403
+ },
404
+ emptySubtitle: {
405
+ fontSize: 14,
406
+ color: colors.secondaryText,
407
+ marginTop: 8,
408
+ textAlign: 'center',
409
+ },
410
+ footerLoader: {
411
+ paddingVertical: 16,
412
+ alignItems: 'center',
413
+ },
414
+ });
415
+
416
+ export default UserListScreen;
@@ -5,7 +5,7 @@ import { Header } from '../../components';
5
5
  import { useI18n } from '../../hooks/useI18n';
6
6
  import { useThemeStyles } from '../../hooks/useThemeStyles';
7
7
  import { normalizeTheme } from '../../utils/themeUtils';
8
- import { useColorScheme } from '../../hooks/use-color-scheme';
8
+ import { useColorScheme } from '../../hooks/useColorScheme';
9
9
  import { fontFamilies } from '../../styles/fonts';
10
10
 
11
11
  const KarmaAboutScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
@@ -15,7 +15,7 @@ import { fontFamilies } from '../../styles/fonts';
15
15
  import { Ionicons } from '@expo/vector-icons';
16
16
  import { useI18n } from '../../hooks/useI18n';
17
17
  import { useThemeStyles } from '../../hooks/useThemeStyles';
18
- import { useColorScheme } from '../../hooks/use-color-scheme';
18
+ import { useColorScheme } from '../../hooks/useColorScheme';
19
19
  import { darkenColor } from '../../utils/colorUtils';
20
20
  import { useOxy } from '../../context/OxyContext';
21
21
 
@@ -6,7 +6,7 @@ import { Header, GroupedItem } from '../../components';
6
6
  import { useI18n } from '../../hooks/useI18n';
7
7
  import { useThemeStyles } from '../../hooks/useThemeStyles';
8
8
  import { normalizeTheme, normalizeColorScheme } from '../../utils/themeUtils';
9
- import { useColorScheme } from '../../hooks/use-color-scheme';
9
+ import { useColorScheme } from '../../hooks/useColorScheme';
10
10
  import { Colors } from '../../constants/theme';
11
11
 
12
12
  const FAQ_KEYS = ['what', 'earn', 'lose', 'use', 'transfer', 'support'] as const;
@@ -7,7 +7,7 @@ import { Header } from '../../components';
7
7
  import { useI18n } from '../../hooks/useI18n';
8
8
  import { useThemeStyles } from '../../hooks/useThemeStyles';
9
9
  import { normalizeTheme } from '../../utils/themeUtils';
10
- import { useColorScheme } from '../../hooks/use-color-scheme';
10
+ import { useColorScheme } from '../../hooks/useColorScheme';
11
11
  import { useOxy } from '../../context/OxyContext';
12
12
 
13
13
  const KarmaLeaderboardScreen: React.FC<BaseScreenProps> = ({ goBack, theme, navigate }) => {
@@ -7,7 +7,7 @@ import { Ionicons } from '@expo/vector-icons';
7
7
  import { useI18n } from '../../hooks/useI18n';
8
8
  import { useThemeStyles } from '../../hooks/useThemeStyles';
9
9
  import { normalizeTheme, normalizeColorScheme } from '../../utils/themeUtils';
10
- import { useColorScheme } from '../../hooks/use-color-scheme';
10
+ import { useColorScheme } from '../../hooks/useColorScheme';
11
11
  import { Colors } from '../../constants/theme';
12
12
  import { useOxy } from '../../context/OxyContext';
13
13
  import { darkenColor, lightenColor } from '../../utils/colorUtils';
@@ -6,7 +6,7 @@ import { Header } from '../../components';
6
6
  import { useI18n } from '../../hooks/useI18n';
7
7
  import { useThemeStyles } from '../../hooks/useThemeStyles';
8
8
  import { normalizeTheme } from '../../utils/themeUtils';
9
- import { useColorScheme } from '../../hooks/use-color-scheme';
9
+ import { useColorScheme } from '../../hooks/useColorScheme';
10
10
  import { useOxy } from '../../context/OxyContext';
11
11
 
12
12
  const KarmaRulesScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
@@ -1,5 +1,8 @@
1
1
  import { create } from 'zustand';
2
2
  import type { User } from '../../models/interfaces';
3
+ import { createDebugLogger } from '../../shared/utils/debugUtils';
4
+
5
+ const debug = createDebugLogger('AuthStore');
3
6
 
4
7
  export interface AuthState {
5
8
  user: User | null;
@@ -43,9 +46,7 @@ export const useAuthStore = create<AuthState>((set: (state: Partial<AuthState>)
43
46
 
44
47
  // Use cached data if available and not forcing refresh
45
48
  if (!forceRefresh && state.user && cacheValid) {
46
- if (__DEV__) {
47
- console.log('AuthStore: Using cached user data (age:', cacheAge, 'ms)');
48
- }
49
+ debug.log('Using cached user data (age:', cacheAge, 'ms)');
49
50
  return;
50
51
  }
51
52
 
@@ -55,9 +56,7 @@ export const useAuthStore = create<AuthState>((set: (state: Partial<AuthState>)
55
56
  set({ user, isLoading: false, isAuthenticated: true, lastUserFetch: now });
56
57
  } catch (error) {
57
58
  const errorMessage = error instanceof Error ? error.message : 'Failed to fetch user';
58
- if (__DEV__) {
59
- console.error('AuthStore: Error fetching user:', error);
60
- }
59
+ debug.error('Error fetching user:', error);
61
60
  set({ error: errorMessage, isLoading: false });
62
61
  }
63
62
  },
@@ -1,46 +1,18 @@
1
1
  /**
2
- * Color utility functions
2
+ * Color Utility Functions
3
+ *
4
+ * Re-exports from shared module for cleaner internal imports.
5
+ * External consumers should use '@oxyhq/services/shared' directly.
6
+ *
7
+ * @module ui/utils/colorUtils
3
8
  */
4
9
 
5
- /**
6
- * Darkens a color by a specified factor
7
- * Returns a darker version of the color
8
- */
9
- export const darkenColor = (color: string, factor: number = 0.6): string => {
10
- // Remove # if present
11
- const hex = color.replace('#', '');
12
-
13
- // Convert to RGB
14
- const r = parseInt(hex.substring(0, 2), 16);
15
- const g = parseInt(hex.substring(2, 4), 16);
16
- const b = parseInt(hex.substring(4, 6), 16);
17
-
18
- // Darken by factor
19
- const newR = Math.max(0, Math.round(r * (1 - factor)));
20
- const newG = Math.max(0, Math.round(g * (1 - factor)));
21
- const newB = Math.max(0, Math.round(b * (1 - factor)));
22
-
23
- return `#${newR.toString(16).padStart(2, '0')}${newG.toString(16).padStart(2, '0')}${newB.toString(16).padStart(2, '0')}`;
24
- };
25
-
26
- /**
27
- * Lightens a color by a specified factor
28
- * Returns a lighter version of the color
29
- */
30
- export const lightenColor = (color: string, factor: number = 0.3): string => {
31
- // Remove # if present
32
- const hex = color.replace('#', '');
33
-
34
- // Convert to RGB
35
- const r = parseInt(hex.substring(0, 2), 16);
36
- const g = parseInt(hex.substring(2, 4), 16);
37
- const b = parseInt(hex.substring(4, 6), 16);
38
-
39
- // Lighten by factor
40
- const newR = Math.min(255, Math.round(r + (255 - r) * factor));
41
- const newG = Math.min(255, Math.round(g + (255 - g) * factor));
42
- const newB = Math.min(255, Math.round(b + (255 - b) * factor));
43
-
44
- return `#${newR.toString(16).padStart(2, '0')}${newG.toString(16).padStart(2, '0')}${newB.toString(16).padStart(2, '0')}`;
45
- };
46
-
10
+ export {
11
+ darkenColor,
12
+ lightenColor,
13
+ hexToRgb,
14
+ rgbToHex,
15
+ withOpacity,
16
+ isLightColor,
17
+ getContrastTextColor,
18
+ } from '../../shared/utils/colorUtils';
@@ -1,43 +1,18 @@
1
1
  /**
2
- * Theme utility functions
2
+ * Theme Utility Functions
3
+ *
4
+ * Re-exports from shared module for cleaner internal imports.
5
+ * External consumers should use '@oxyhq/services/shared' directly.
6
+ *
7
+ * @module ui/utils/themeUtils
3
8
  */
4
9
 
5
- /**
6
- * Normalizes a theme value to ensure it's always 'light' | 'dark'
7
- * @param theme - Theme value (may be 'light' | 'dark' | string | undefined)
8
- * @returns Normalized 'light' | 'dark' theme (defaults to 'light')
9
- */
10
- export const normalizeTheme = (theme?: string | null): 'light' | 'dark' =>
11
- theme === 'light' || theme === 'dark' ? theme : 'light';
12
-
13
- /**
14
- * Normalizes a color scheme value to ensure it's always 'light' or 'dark'
15
- * Handles null/undefined cases with proper fallback chain
16
- *
17
- * @param colorScheme - The color scheme from useColorScheme() hook (may be null/undefined)
18
- * @param theme - Optional theme prop as fallback
19
- * @returns Normalized 'light' | 'dark' color scheme
20
- *
21
- * @example
22
- * ```ts
23
- * const colorScheme = normalizeColorScheme(useColorScheme(), theme);
24
- * ```
25
- */
26
- export const normalizeColorScheme = (
27
- colorScheme?: string | null,
28
- theme?: string
29
- ): 'light' | 'dark' => {
30
- // First try the colorScheme from hook
31
- if (colorScheme === 'light' || colorScheme === 'dark') {
32
- return colorScheme;
33
- }
34
-
35
- // Fallback to theme prop
36
- if (theme === 'light' || theme === 'dark') {
37
- return theme;
38
- }
39
-
40
- // Default to light
41
- return 'light';
42
- };
10
+ export {
11
+ normalizeTheme,
12
+ normalizeColorScheme,
13
+ getOppositeTheme,
14
+ systemPrefersDarkMode,
15
+ getSystemColorScheme,
16
+ } from '../../shared/utils/themeUtils';
43
17
 
18
+ export type { ThemeValue } from '../../shared/utils/themeUtils';
@@ -213,9 +213,4 @@ export function logError(error: unknown, context?: string): void {
213
213
  }
214
214
  }
215
215
 
216
- /**
217
- * Retry function with exponential backoff
218
- * Re-exports retryAsync for backward compatibility
219
- * @deprecated Use retryAsync from asyncUtils instead
220
- */
221
- export { retryAsync as retryWithBackoff } from './asyncUtils';
216
+