@oxyhq/services 5.24.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 +277 -72
  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 +276 -72
  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 +113 -4
  300. package/lib/typescript/commonjs/web/WebOxyContext.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/web/index.d.ts +20 -9
  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 +113 -4
  364. package/lib/typescript/module/web/WebOxyContext.d.ts.map +1 -1
  365. package/lib/typescript/module/web/index.d.ts +20 -9
  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 +330 -72
  433. package/src/web/index.ts +77 -7
  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
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_CONFIG", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _networkUtils.DEFAULT_CIRCUIT_BREAKER_CONFIG;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "HttpStatus", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _errorUtils.HttpStatus;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "calculateBackoffInterval", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _networkUtils.calculateBackoffInterval;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "createCircuitBreakerState", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _networkUtils.createCircuitBreakerState;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "darkenColor", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _colorUtils.darkenColor;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "delay", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _networkUtils.delay;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "getContrastTextColor", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _colorUtils.getContrastTextColor;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "getErrorMessage", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _errorUtils.getErrorMessage;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "getErrorStatus", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _errorUtils.getErrorStatus;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "getOppositeTheme", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _themeUtils.getOppositeTheme;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "getSystemColorScheme", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _themeUtils.getSystemColorScheme;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "hexToRgb", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _colorUtils.hexToRgb;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "isAlreadyRegisteredError", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _errorUtils.isAlreadyRegisteredError;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "isForbiddenError", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _errorUtils.isForbiddenError;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "isLightColor", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _colorUtils.isLightColor;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "isNetworkError", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _errorUtils.isNetworkError;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "isNotFoundError", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _errorUtils.isNotFoundError;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "isRateLimitError", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _errorUtils.isRateLimitError;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "isRetryableError", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _errorUtils.isRetryableError;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "isServerError", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _errorUtils.isServerError;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "isUnauthorizedError", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _errorUtils.isUnauthorizedError;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "lightenColor", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _colorUtils.lightenColor;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "normalizeColorScheme", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _themeUtils.normalizeColorScheme;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "normalizeTheme", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _themeUtils.normalizeTheme;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "recordFailure", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _networkUtils.recordFailure;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "recordSuccess", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _networkUtils.recordSuccess;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "rgbToHex", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _colorUtils.rgbToHex;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "shouldAllowRequest", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _networkUtils.shouldAllowRequest;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "systemPrefersDarkMode", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _themeUtils.systemPrefersDarkMode;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "withOpacity", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _colorUtils.withOpacity;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "withRetry", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _networkUtils.withRetry;
190
+ }
191
+ });
192
+ var _colorUtils = require("./colorUtils.js");
193
+ var _themeUtils = require("./themeUtils.js");
194
+ var _errorUtils = require("./errorUtils.js");
195
+ var _networkUtils = require("./networkUtils.js");
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_colorUtils","require","_themeUtils","_errorUtils","_networkUtils"],"sourceRoot":"../../../../src","sources":["shared/utils/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,WAAA,GAAAC,OAAA;AAWA,IAAAC,WAAA,GAAAD,OAAA;AAUA,IAAAE,WAAA,GAAAF,OAAA;AAeA,IAAAG,aAAA,GAAAH,OAAA","ignoreList":[]}
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.withRetry = exports.shouldAllowRequest = exports.recordSuccess = exports.recordFailure = exports.delay = exports.createCircuitBreakerState = exports.calculateBackoffInterval = exports.DEFAULT_CIRCUIT_BREAKER_CONFIG = void 0;
7
+ /**
8
+ * Network Utility Functions
9
+ *
10
+ * Consolidated network utilities including circuit breaker pattern
11
+ * and exponential backoff for resilient API calls.
12
+ *
13
+ * @module shared/utils/networkUtils
14
+ */
15
+
16
+ /**
17
+ * State for circuit breaker pattern.
18
+ */
19
+
20
+ /**
21
+ * Configuration for circuit breaker.
22
+ */
23
+
24
+ /**
25
+ * Default circuit breaker configuration.
26
+ */
27
+ const DEFAULT_CIRCUIT_BREAKER_CONFIG = exports.DEFAULT_CIRCUIT_BREAKER_CONFIG = {
28
+ baseInterval: 10000,
29
+ maxInterval: 60000,
30
+ maxFailures: 5,
31
+ recoveryTimeout: 30000
32
+ };
33
+
34
+ /**
35
+ * Creates initial circuit breaker state.
36
+ *
37
+ * @param config - Optional custom configuration
38
+ * @returns Initial circuit breaker state
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const state = createCircuitBreakerState({ maxFailures: 3 });
43
+ * ```
44
+ */
45
+ const createCircuitBreakerState = (config = {}) => {
46
+ const {
47
+ baseInterval,
48
+ maxInterval,
49
+ maxFailures
50
+ } = {
51
+ ...DEFAULT_CIRCUIT_BREAKER_CONFIG,
52
+ ...config
53
+ };
54
+ return {
55
+ consecutiveFailures: 0,
56
+ currentInterval: baseInterval,
57
+ baseInterval,
58
+ maxInterval,
59
+ maxFailures,
60
+ isOpen: false
61
+ };
62
+ };
63
+
64
+ /**
65
+ * Calculates next interval using exponential backoff.
66
+ *
67
+ * @param state - Current circuit breaker state
68
+ * @returns Next interval in milliseconds
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const nextInterval = calculateBackoffInterval(state);
73
+ * await delay(nextInterval);
74
+ * ```
75
+ */
76
+ exports.createCircuitBreakerState = createCircuitBreakerState;
77
+ const calculateBackoffInterval = state => {
78
+ const {
79
+ consecutiveFailures,
80
+ baseInterval,
81
+ maxInterval
82
+ } = state;
83
+ if (consecutiveFailures === 0) return baseInterval;
84
+ const backoffMultiplier = Math.min(Math.pow(2, consecutiveFailures - 1), maxInterval / baseInterval);
85
+ return Math.min(baseInterval * backoffMultiplier, maxInterval);
86
+ };
87
+
88
+ /**
89
+ * Records a failure and updates circuit breaker state.
90
+ *
91
+ * @param state - Current circuit breaker state
92
+ * @returns Updated state after recording failure
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * try {
97
+ * await apiCall();
98
+ * state = recordSuccess(state);
99
+ * } catch (error) {
100
+ * state = recordFailure(state);
101
+ * }
102
+ * ```
103
+ */
104
+ exports.calculateBackoffInterval = calculateBackoffInterval;
105
+ const recordFailure = state => {
106
+ const newFailures = state.consecutiveFailures + 1;
107
+ const newInterval = calculateBackoffInterval({
108
+ ...state,
109
+ consecutiveFailures: newFailures
110
+ });
111
+ const shouldOpenCircuit = newFailures >= state.maxFailures;
112
+ const finalInterval = shouldOpenCircuit ? state.maxInterval : newInterval;
113
+ return {
114
+ ...state,
115
+ consecutiveFailures: newFailures,
116
+ currentInterval: finalInterval,
117
+ isOpen: shouldOpenCircuit,
118
+ openedAt: shouldOpenCircuit ? Date.now() : state.openedAt
119
+ };
120
+ };
121
+
122
+ /**
123
+ * Records a success and resets circuit breaker state.
124
+ *
125
+ * @param state - Current circuit breaker state
126
+ * @returns Reset state after successful request
127
+ */
128
+ exports.recordFailure = recordFailure;
129
+ const recordSuccess = state => {
130
+ return {
131
+ ...state,
132
+ consecutiveFailures: 0,
133
+ currentInterval: state.baseInterval,
134
+ isOpen: false,
135
+ openedAt: undefined
136
+ };
137
+ };
138
+
139
+ /**
140
+ * Checks if the circuit breaker should allow a request.
141
+ *
142
+ * When the circuit is open, it will only allow requests after
143
+ * the recovery timeout has passed (half-open state).
144
+ *
145
+ * @param state - Current circuit breaker state
146
+ * @param recoveryTimeout - Time to wait before allowing recovery attempts
147
+ * @returns true if request should be allowed
148
+ */
149
+ exports.recordSuccess = recordSuccess;
150
+ const shouldAllowRequest = (state, recoveryTimeout = DEFAULT_CIRCUIT_BREAKER_CONFIG.recoveryTimeout) => {
151
+ if (!state.isOpen) return true;
152
+ if (!state.openedAt) return true;
153
+ const timeSinceOpen = Date.now() - state.openedAt;
154
+ return timeSinceOpen >= recoveryTimeout;
155
+ };
156
+
157
+ /**
158
+ * Delays execution for a specified duration.
159
+ *
160
+ * @param ms - Milliseconds to delay
161
+ * @returns Promise that resolves after the delay
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * await delay(1000); // Wait 1 second
166
+ * ```
167
+ */
168
+ exports.shouldAllowRequest = shouldAllowRequest;
169
+ const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
170
+
171
+ /**
172
+ * Executes a function with exponential backoff retry.
173
+ *
174
+ * @param fn - Async function to execute
175
+ * @param options - Retry options
176
+ * @returns Result of the function
177
+ * @throws Last error if all retries fail
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const result = await withRetry(
182
+ * () => fetchData(),
183
+ * { maxRetries: 3, baseDelay: 1000 }
184
+ * );
185
+ * ```
186
+ */
187
+ exports.delay = delay;
188
+ const withRetry = async (fn, options = {}) => {
189
+ const {
190
+ maxRetries = 3,
191
+ baseDelay = 1000,
192
+ maxDelay = 30000,
193
+ shouldRetry = () => true,
194
+ onRetry
195
+ } = options;
196
+ let lastError;
197
+ for (let attempt = 0; attempt <= maxRetries; attempt++) {
198
+ try {
199
+ return await fn();
200
+ } catch (error) {
201
+ lastError = error;
202
+ if (attempt === maxRetries || !shouldRetry(error)) {
203
+ throw error;
204
+ }
205
+ const delayMs = Math.min(baseDelay * Math.pow(2, attempt), maxDelay);
206
+ onRetry?.(error, attempt + 1);
207
+ await delay(delayMs);
208
+ }
209
+ }
210
+ throw lastError;
211
+ };
212
+ exports.withRetry = withRetry;
213
+ //# sourceMappingURL=networkUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_CIRCUIT_BREAKER_CONFIG","exports","baseInterval","maxInterval","maxFailures","recoveryTimeout","createCircuitBreakerState","config","consecutiveFailures","currentInterval","isOpen","calculateBackoffInterval","state","backoffMultiplier","Math","min","pow","recordFailure","newFailures","newInterval","shouldOpenCircuit","finalInterval","openedAt","Date","now","recordSuccess","undefined","shouldAllowRequest","timeSinceOpen","delay","ms","Promise","resolve","setTimeout","withRetry","fn","options","maxRetries","baseDelay","maxDelay","shouldRetry","onRetry","lastError","attempt","error","delayMs"],"sourceRoot":"../../../../src","sources":["shared/utils/networkUtils.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAkBA;AACA;AACA;;AAYA;AACA;AACA;AACO,MAAMA,8BAA8D,GAAAC,OAAA,CAAAD,8BAAA,GAAG;EAC5EE,YAAY,EAAE,KAAK;EACnBC,WAAW,EAAE,KAAK;EAClBC,WAAW,EAAE,CAAC;EACdC,eAAe,EAAE;AACnB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAGA,CACvCC,MAA4B,GAAG,CAAC,CAAC,KACT;EACxB,MAAM;IAAEL,YAAY;IAAEC,WAAW;IAAEC;EAAY,CAAC,GAAG;IACjD,GAAGJ,8BAA8B;IACjC,GAAGO;EACL,CAAC;EAED,OAAO;IACLC,mBAAmB,EAAE,CAAC;IACtBC,eAAe,EAAEP,YAAY;IAC7BA,YAAY;IACZC,WAAW;IACXC,WAAW;IACXM,MAAM,EAAE;EACV,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXAT,OAAA,CAAAK,yBAAA,GAAAA,yBAAA;AAYO,MAAMK,wBAAwB,GAAIC,KAA0B,IAAa;EAC9E,MAAM;IAAEJ,mBAAmB;IAAEN,YAAY;IAAEC;EAAY,CAAC,GAAGS,KAAK;EAEhE,IAAIJ,mBAAmB,KAAK,CAAC,EAAE,OAAON,YAAY;EAElD,MAAMW,iBAAiB,GAAGC,IAAI,CAACC,GAAG,CAChCD,IAAI,CAACE,GAAG,CAAC,CAAC,EAAER,mBAAmB,GAAG,CAAC,CAAC,EACpCL,WAAW,GAAGD,YAChB,CAAC;EAED,OAAOY,IAAI,CAACC,GAAG,CAACb,YAAY,GAAGW,iBAAiB,EAAEV,WAAW,CAAC;AAChE,CAAC;;AAED;AACA;AAC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AAC;MAC7B,MAAMd,KAAK,CAACgB,OAAO,CAAC;IACtB;EACF;EAEA,MAAMH,SAAS;AACjB,CAAC;AAACzC,OAAA,CAAAiC,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.systemPrefersDarkMode = exports.normalizeTheme = exports.normalizeColorScheme = exports.getSystemColorScheme = exports.getOppositeTheme = void 0;
7
+ /**
8
+ * Theme Utility Functions
9
+ *
10
+ * Consolidated theme utilities for normalizing and handling color schemes
11
+ * across the OxyServices ecosystem.
12
+ *
13
+ * @module shared/utils/themeUtils
14
+ */
15
+
16
+ /**
17
+ * Valid theme values in the Oxy ecosystem.
18
+ */
19
+
20
+ /**
21
+ * Normalizes a theme value to ensure it's always 'light' or 'dark'.
22
+ *
23
+ * @param theme - Theme value (may be 'light' | 'dark' | string | undefined)
24
+ * @returns Normalized 'light' | 'dark' theme (defaults to 'light')
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * normalizeTheme('dark'); // 'dark'
29
+ * normalizeTheme('light'); // 'light'
30
+ * normalizeTheme('unknown'); // 'light'
31
+ * normalizeTheme(undefined); // 'light'
32
+ * normalizeTheme(null); // 'light'
33
+ * ```
34
+ */
35
+ const normalizeTheme = theme => theme === 'light' || theme === 'dark' ? theme : 'light';
36
+
37
+ /**
38
+ * Normalizes a color scheme value with optional fallback chain.
39
+ *
40
+ * Handles null/undefined cases from React Native's useColorScheme() hook
41
+ * with a proper fallback chain.
42
+ *
43
+ * @param colorScheme - The color scheme from useColorScheme() hook (may be null/undefined)
44
+ * @param theme - Optional theme prop as fallback
45
+ * @returns Normalized 'light' | 'dark' color scheme
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * // In a React Native component:
50
+ * const systemScheme = useColorScheme(); // might be null
51
+ * const colorScheme = normalizeColorScheme(systemScheme, props.theme);
52
+ *
53
+ * normalizeColorScheme('dark', 'light'); // 'dark'
54
+ * normalizeColorScheme(null, 'dark'); // 'dark'
55
+ * normalizeColorScheme(undefined, undefined); // 'light'
56
+ * ```
57
+ */
58
+ exports.normalizeTheme = normalizeTheme;
59
+ const normalizeColorScheme = (colorScheme, theme) => {
60
+ if (colorScheme === 'light' || colorScheme === 'dark') {
61
+ return colorScheme;
62
+ }
63
+ if (theme === 'light' || theme === 'dark') {
64
+ return theme;
65
+ }
66
+ return 'light';
67
+ };
68
+
69
+ /**
70
+ * Gets the opposite theme value.
71
+ *
72
+ * @param theme - Current theme value
73
+ * @returns The opposite theme ('light' → 'dark', 'dark' → 'light')
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * getOppositeTheme('light'); // 'dark'
78
+ * getOppositeTheme('dark'); // 'light'
79
+ * ```
80
+ */
81
+ exports.normalizeColorScheme = normalizeColorScheme;
82
+ const getOppositeTheme = theme => theme === 'light' ? 'dark' : 'light';
83
+
84
+ /**
85
+ * Checks if the system prefers dark mode.
86
+ *
87
+ * This function only works in browser environments.
88
+ * Returns false in non-browser environments (Node.js, React Native).
89
+ *
90
+ * @returns true if system prefers dark mode, false otherwise
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * if (systemPrefersDarkMode()) {
95
+ * setTheme('dark');
96
+ * }
97
+ * ```
98
+ */
99
+ exports.getOppositeTheme = getOppositeTheme;
100
+ const systemPrefersDarkMode = () => {
101
+ if (typeof window === 'undefined') return false;
102
+ return window.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false;
103
+ };
104
+
105
+ /**
106
+ * Gets the system's preferred color scheme.
107
+ *
108
+ * @returns 'dark' if system prefers dark mode, 'light' otherwise
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * const theme = getSystemColorScheme();
113
+ * ```
114
+ */
115
+ exports.systemPrefersDarkMode = systemPrefersDarkMode;
116
+ const getSystemColorScheme = () => systemPrefersDarkMode() ? 'dark' : 'light';
117
+ exports.getSystemColorScheme = getSystemColorScheme;
118
+ //# sourceMappingURL=themeUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["normalizeTheme","theme","exports","normalizeColorScheme","colorScheme","getOppositeTheme","systemPrefersDarkMode","window","matchMedia","matches","getSystemColorScheme"],"sourceRoot":"../../../../src","sources":["shared/utils/themeUtils.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,GAAIC,KAAqB,IAClDA,KAAK,KAAK,OAAO,IAAIA,KAAK,KAAK,MAAM,GAAGA,KAAK,GAAG,OAAO;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBAC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AAqBO,MAAMG,oBAAoB,GAAGA,CAClCC,WAA2B,EAC3BH,KAAc,KACC;EACf,IAAIG,WAAW,KAAK,OAAO,IAAIA,WAAW,KAAK,MAAM,EAAE;IACrD,OAAOA,WAAW;EACpB;EAEA,IAAIH,KAAK,KAAK,OAAO,IAAIA,KAAK,KAAK,MAAM,EAAE;IACzC,OAAOA,KAAK;EACd;EAEA,OAAO,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXAC,OAAA,CAAAC,oBAAA,GAAAA,oBAAA;AAYO,MAAME,gBAAgB,GAAIJ,KAAiB,IAChDA,KAAK,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdAC,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAeO,MAAMC,qBAAqB,GAAGA,CAAA,KAAe;EAClD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,KAAK;EAC/C,OAAOA,MAAM,CAACC,UAAU,GAAG,8BAA8B,CAAC,CAACC,OAAO,IAAI,KAAK;AAC7E,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATAP,OAAA,CAAAI,qBAAA,GAAAA,qBAAA;AAUO,MAAMI,oBAAoB,GAAGA,CAAA,KAClCJ,qBAAqB,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO;AAACJ,OAAA,CAAAQ,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -8,7 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _zustand = require("zustand");
10
10
  var _routes = require("../navigation/routes.js");
11
- var _useColorScheme = require("../hooks/use-color-scheme.js");
11
+ var _useColorScheme = require("../hooks/useColorScheme.js");
12
12
  var _theme = require("../constants/theme.js");
13
13
  var _BottomSheet = _interopRequireDefault(require("./BottomSheet.js"));
14
14
  var _bottomSheetManager = require("../navigation/bottomSheetManager.js");
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.setupFonts = exports.FontLoader = void 0;
7
- var _react = require("react");
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var Font = _interopRequireWildcard(require("expo-font"));
10
10
  var _jsxRuntime = require("react/jsx-runtime");
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","Font","_interopRequireWildcard","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getInterFonts","error","__DEV__","console","warn","FontLoader","children","fontState","setFontState","useState","useEffect","loadFonts","interFonts","Error","loadAsync","jsx","Fragment","exports","setupFonts","Platform","OS","document","style","createElement","fontFaceRules","textContent","head","appendChild","info","errorMessage","message","String"],"sourceRoot":"../../../../src","sources":["ui/components/FontLoader.tsx"],"mappings":";;;;;;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,IAAI,CAAC,kDAAkD,CAAC;QAChE;MACJ;IACJ,CAAC,MAAM;MACH;MACA,MAAMlD,IAAI,CAACoC,SAAS,CAACF,UAAU,CAAC;IACpC;IAEA,OAAO,IAAI;EACf,CAAC,CAAC,OAAOX,KAAc,EAAE;IACrB,IAAIC,OAAO,EAAE;MACb,MAAM2B,YAAY,GAAG5B,KAAK,YAAYY,KAAK,GAAGZ,KAAK,CAAC6B,OAAO,GAAGC,MAAM,CAAC9B,KAAK,CAAC;MAC3EE,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAEyB,YAAY,CAAC;IACrD;IACA,OAAO,KAAK;EAChB;AACJ,CAAC;AAACZ,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","Font","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getInterFonts","error","__DEV__","console","warn","FontLoader","children","fontState","setFontState","useState","useEffect","loadFonts","interFonts","Error","loadAsync","jsx","Fragment","exports","setupFonts","Platform","OS","document","style","createElement","fontFaceRules","textContent","head","appendChild","info","errorMessage","message","String"],"sourceRoot":"../../../../src","sources":["ui/components/FontLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAkC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,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ACJ,CAAC;AAACZ,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -7,7 +7,7 @@ exports.default = exports.GroupedItem = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _vectorIcons = require("@expo/vector-icons");
10
- var _useColorScheme = require("../hooks/use-color-scheme.js");
10
+ var _useColorScheme = require("../hooks/useColorScheme.js");
11
11
  var _colorUtils = require("../utils/colorUtils.js");
12
12
  var _themeUtils = require("../utils/themeUtils.js");
13
13
  var _theme = require("../constants/theme.js");
@@ -11,7 +11,7 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
11
11
  var _vectorIcons = require("@expo/vector-icons");
12
12
  var _OxyIcon = _interopRequireDefault(require("./icon/OxyIcon.js"));
13
13
  var _fonts = require("../styles/fonts.js");
14
- var _useColorScheme = require("../hooks/use-color-scheme.js");
14
+ var _useColorScheme = require("../hooks/useColorScheme.js");
15
15
  var _themeUtils = require("../utils/themeUtils.js");
16
16
  var _theme = require("../constants/theme.js");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
@@ -26,6 +26,7 @@ let KeyboardProvider = ({
26
26
  children
27
27
  }) => children;
28
28
  let BottomSheetRouter = null;
29
+ let SignInModal = null;
29
30
 
30
31
  // KeyboardProvider only on native
31
32
  if (!isWeb) {
@@ -43,6 +44,13 @@ try {
43
44
  // BottomSheetRouter not available
44
45
  }
45
46
 
47
+ // SignInModal works on all platforms
48
+ try {
49
+ SignInModal = require('./SignInModal').default;
50
+ } catch {
51
+ // SignInModal not available
52
+ }
53
+
46
54
  /**
47
55
  * OxyProvider - Universal provider for Expo apps (native + web)
48
56
  *
@@ -197,7 +205,7 @@ const OxyProvider = ({
197
205
  authRedirectUri: authRedirectUri,
198
206
  storageKeyPrefix: storageKeyPrefix,
199
207
  onAuthStateChange: onAuthStateChange,
200
- children: [children, BottomSheetRouter && /*#__PURE__*/(0, _jsxRuntime.jsx)(BottomSheetRouter, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sonner.Toaster, {})]
208
+ children: [children, BottomSheetRouter && /*#__PURE__*/(0, _jsxRuntime.jsx)(BottomSheetRouter, {}), SignInModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(SignInModal, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sonner.Toaster, {})]
201
209
  })
202
210
  });
203
211