@oxyhq/services 5.5.8 → 5.6.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 (388) hide show
  1. package/README.md +16 -2
  2. package/lib/commonjs/core/index.js +69 -82
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +24 -183
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/node/index.js +0 -2
  7. package/lib/commonjs/node/index.js.map +1 -1
  8. package/lib/commonjs/ui/components/FollowButton.js +100 -229
  9. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  10. package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
  11. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
  12. package/lib/commonjs/ui/components/OxyProvider.js +41 -198
  13. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
  15. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  16. package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
  17. package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
  18. package/lib/commonjs/ui/components/icon/index.js +7 -0
  19. package/lib/commonjs/ui/components/icon/index.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +7 -0
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
  23. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
  25. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
  26. package/lib/commonjs/ui/components/internal/TextField.js +20 -0
  27. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  28. package/lib/commonjs/ui/context/OxyContext.js +26 -23
  29. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  30. package/lib/commonjs/ui/hooks/index.js +2 -15
  31. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  32. package/lib/commonjs/ui/hooks/useFollow.js +52 -136
  33. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  34. package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
  35. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
  36. package/lib/commonjs/ui/index.js +8 -191
  37. package/lib/commonjs/ui/index.js.map +1 -1
  38. package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
  39. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
  41. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
  43. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +6 -14
  45. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
  47. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  48. package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
  49. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
  51. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
  53. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
  55. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
  56. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
  57. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
  59. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
  60. package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
  61. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  62. package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
  63. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
  65. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
  67. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
  68. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
  69. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
  70. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
  71. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
  72. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
  73. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
  74. package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
  75. package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
  76. package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
  77. package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
  78. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
  79. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  80. package/lib/commonjs/ui/stores/authStore.js +31 -0
  81. package/lib/commonjs/ui/stores/authStore.js.map +1 -0
  82. package/lib/commonjs/ui/stores/followStore.js +124 -0
  83. package/lib/commonjs/ui/stores/followStore.js.map +1 -0
  84. package/lib/commonjs/ui/styles/index.js +0 -11
  85. package/lib/commonjs/ui/styles/index.js.map +1 -1
  86. package/lib/commonjs/ui/utils/confirmAction.js +28 -0
  87. package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
  88. package/lib/module/core/index.js +69 -81
  89. package/lib/module/core/index.js.map +1 -1
  90. package/lib/module/index.js +14 -17
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/node/index.js +0 -3
  93. package/lib/module/node/index.js.map +1 -1
  94. package/lib/module/ui/components/FollowButton.js +100 -229
  95. package/lib/module/ui/components/FollowButton.js.map +1 -1
  96. package/lib/module/ui/components/OxyPayButton.js +125 -0
  97. package/lib/module/ui/components/OxyPayButton.js.map +1 -0
  98. package/lib/module/ui/components/OxyProvider.js +42 -199
  99. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  100. package/lib/module/ui/components/OxySignInButton.js +15 -2
  101. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  102. package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
  103. package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
  104. package/lib/module/ui/components/icon/index.js +1 -0
  105. package/lib/module/ui/components/icon/index.js.map +1 -1
  106. package/lib/module/ui/components/index.js +1 -0
  107. package/lib/module/ui/components/index.js.map +1 -1
  108. package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
  109. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  110. package/lib/module/ui/components/internal/PinInput.js +103 -0
  111. package/lib/module/ui/components/internal/PinInput.js.map +1 -0
  112. package/lib/module/ui/components/internal/TextField.js +20 -0
  113. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  114. package/lib/module/ui/context/OxyContext.js +26 -23
  115. package/lib/module/ui/context/OxyContext.js.map +1 -1
  116. package/lib/module/ui/hooks/index.js +1 -2
  117. package/lib/module/ui/hooks/index.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.js +52 -137
  119. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  120. package/lib/module/ui/hooks/useSessionSocket.js +47 -0
  121. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
  122. package/lib/module/ui/index.js +2 -13
  123. package/lib/module/ui/index.js.map +1 -1
  124. package/lib/module/ui/navigation/OxyRouter.js +53 -61
  125. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  126. package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
  127. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
  129. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  130. package/lib/module/ui/screens/AccountSettingsScreen.js +7 -15
  131. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
  133. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AppInfoScreen.js +22 -45
  135. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  136. package/lib/module/ui/screens/FeedbackScreen.js +44 -23
  137. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  138. package/lib/module/ui/screens/FileManagementScreen.js +59 -78
  139. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  140. package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
  141. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
  142. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
  143. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  144. package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
  145. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
  146. package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
  147. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SignInScreen.js +100 -334
  149. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  150. package/lib/module/ui/screens/SignUpScreen.js +137 -341
  151. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  152. package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
  153. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
  154. package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
  155. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
  156. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
  157. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
  158. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
  159. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
  160. package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
  161. package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
  162. package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
  163. package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
  164. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
  165. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  166. package/lib/module/ui/stores/authStore.js +27 -0
  167. package/lib/module/ui/stores/authStore.js.map +1 -0
  168. package/lib/module/ui/stores/followStore.js +120 -0
  169. package/lib/module/ui/stores/followStore.js.map +1 -0
  170. package/lib/module/ui/styles/index.js +0 -1
  171. package/lib/module/ui/styles/index.js.map +1 -1
  172. package/lib/module/ui/utils/confirmAction.js +25 -0
  173. package/lib/module/ui/utils/confirmAction.js.map +1 -0
  174. package/lib/typescript/core/index.d.ts +28 -10
  175. package/lib/typescript/core/index.d.ts.map +1 -1
  176. package/lib/typescript/index.d.ts +5 -4
  177. package/lib/typescript/index.d.ts.map +1 -1
  178. package/lib/typescript/models/secureSession.d.ts +0 -1
  179. package/lib/typescript/models/secureSession.d.ts.map +1 -1
  180. package/lib/typescript/node/index.d.ts +0 -1
  181. package/lib/typescript/node/index.d.ts.map +1 -1
  182. package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
  183. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
  185. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
  186. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
  188. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
  189. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
  190. package/lib/typescript/ui/components/icon/index.d.ts +1 -0
  191. package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
  192. package/lib/typescript/ui/components/index.d.ts +1 -0
  193. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  194. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  195. package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
  196. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
  197. package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
  198. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  199. package/lib/typescript/ui/context/OxyContext.d.ts +0 -1
  200. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  201. package/lib/typescript/ui/hooks/index.d.ts +1 -2
  202. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  203. package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
  204. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  205. package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
  206. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
  207. package/lib/typescript/ui/index.d.ts +2 -5
  208. package/lib/typescript/ui/index.d.ts.map +1 -1
  209. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  210. package/lib/typescript/ui/navigation/types.d.ts +5 -23
  211. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  212. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  215. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  219. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
  220. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
  221. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
  223. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
  224. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
  228. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
  229. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
  230. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
  231. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
  232. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
  233. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
  234. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
  235. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
  236. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
  237. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
  238. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
  239. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  240. package/lib/typescript/ui/stores/authStore.d.ts +14 -0
  241. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
  242. package/lib/typescript/ui/stores/followStore.d.ts +15 -0
  243. package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
  244. package/lib/typescript/ui/styles/index.d.ts +0 -1
  245. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  246. package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
  247. package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
  248. package/package.json +12 -7
  249. package/src/core/index.ts +78 -88
  250. package/src/index.ts +8 -45
  251. package/src/models/secureSession.ts +1 -2
  252. package/src/node/index.ts +0 -3
  253. package/src/ui/components/FollowButton.tsx +100 -322
  254. package/src/ui/components/OxyPayButton.tsx +133 -0
  255. package/src/ui/components/OxyProvider.tsx +39 -201
  256. package/src/ui/components/OxySignInButton.tsx +13 -2
  257. package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
  258. package/src/ui/components/icon/index.ts +1 -0
  259. package/src/ui/components/index.ts +1 -0
  260. package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
  261. package/src/ui/components/internal/PinInput.tsx +102 -0
  262. package/src/ui/components/internal/TextField.tsx +9 -0
  263. package/src/ui/context/OxyContext.tsx +26 -26
  264. package/src/ui/hooks/index.ts +1 -2
  265. package/src/ui/hooks/useFollow.ts +58 -129
  266. package/src/ui/hooks/useSessionSocket.ts +50 -0
  267. package/src/ui/index.ts +2 -37
  268. package/src/ui/navigation/OxyRouter.tsx +47 -63
  269. package/src/ui/navigation/types.ts +5 -26
  270. package/src/ui/screens/AccountCenterScreen.tsx +12 -21
  271. package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
  272. package/src/ui/screens/AccountSettingsScreen.tsx +7 -22
  273. package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
  274. package/src/ui/screens/AppInfoScreen.tsx +27 -47
  275. package/src/ui/screens/FeedbackScreen.tsx +34 -19
  276. package/src/ui/screens/FileManagementScreen.tsx +293 -321
  277. package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
  278. package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
  279. package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
  280. package/src/ui/screens/SessionManagementScreen.tsx +65 -137
  281. package/src/ui/screens/SignInScreen.tsx +89 -283
  282. package/src/ui/screens/SignUpScreen.tsx +138 -291
  283. package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
  284. package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
  285. package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
  286. package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
  287. package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
  288. package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
  289. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
  290. package/src/ui/stores/authStore.ts +24 -0
  291. package/src/ui/stores/followStore.ts +80 -0
  292. package/src/ui/styles/index.ts +0 -1
  293. package/src/ui/utils/confirmAction.ts +23 -0
  294. package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
  295. package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
  296. package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -216
  297. package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
  298. package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
  299. package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
  300. package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
  301. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
  302. package/lib/commonjs/ui/store/index.js +0 -67
  303. package/lib/commonjs/ui/store/index.js.map +0 -1
  304. package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
  305. package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
  306. package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
  307. package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
  308. package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
  309. package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
  310. package/lib/commonjs/ui/store/slices/index.js +0 -129
  311. package/lib/commonjs/ui/store/slices/index.js.map +0 -1
  312. package/lib/commonjs/ui/store/slices/types.js +0 -19
  313. package/lib/commonjs/ui/store/slices/types.js.map +0 -1
  314. package/lib/commonjs/ui/styles/shadows.js +0 -123
  315. package/lib/commonjs/ui/styles/shadows.js.map +0 -1
  316. package/lib/commonjs/utils/polyfills.js +0 -42
  317. package/lib/commonjs/utils/polyfills.js.map +0 -1
  318. package/lib/module/ui/components/bottomSheet/index.js +0 -5
  319. package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
  320. package/lib/module/ui/hooks/useAuthFetch.js +0 -211
  321. package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
  322. package/lib/module/ui/hooks/useOxyFollow.js +0 -186
  323. package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
  324. package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
  325. package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
  326. package/lib/module/ui/store/index.js +0 -33
  327. package/lib/module/ui/store/index.js.map +0 -1
  328. package/lib/module/ui/store/setupOxyStore.js +0 -59
  329. package/lib/module/ui/store/setupOxyStore.js.map +0 -1
  330. package/lib/module/ui/store/slices/authSlice.js +0 -48
  331. package/lib/module/ui/store/slices/authSlice.js.map +0 -1
  332. package/lib/module/ui/store/slices/followSlice.js +0 -232
  333. package/lib/module/ui/store/slices/followSlice.js.map +0 -1
  334. package/lib/module/ui/store/slices/index.js +0 -11
  335. package/lib/module/ui/store/slices/index.js.map +0 -1
  336. package/lib/module/ui/store/slices/types.js +0 -15
  337. package/lib/module/ui/store/slices/types.js.map +0 -1
  338. package/lib/module/ui/styles/shadows.js +0 -119
  339. package/lib/module/ui/styles/shadows.js.map +0 -1
  340. package/lib/module/utils/polyfills.js +0 -36
  341. package/lib/module/utils/polyfills.js.map +0 -1
  342. package/lib/typescript/types/react-redux.d.ts +0 -5
  343. package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
  344. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
  345. package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
  346. package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
  347. package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
  348. package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
  349. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
  350. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
  351. package/lib/typescript/ui/store/index.d.ts +0 -27
  352. package/lib/typescript/ui/store/index.d.ts.map +0 -1
  353. package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
  354. package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
  355. package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
  356. package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
  357. package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
  358. package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
  359. package/lib/typescript/ui/store/slices/index.d.ts +0 -9
  360. package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
  361. package/lib/typescript/ui/store/slices/types.d.ts +0 -16
  362. package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
  363. package/lib/typescript/ui/styles/shadows.d.ts +0 -233
  364. package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
  365. package/lib/typescript/utils/polyfills.d.ts +0 -6
  366. package/lib/typescript/utils/polyfills.d.ts.map +0 -1
  367. package/src/__tests__/backend-middleware.test.ts +0 -209
  368. package/src/__tests__/polyfills.test.ts +0 -30
  369. package/src/__tests__/setup.ts +0 -43
  370. package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
  371. package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
  372. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
  373. package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
  374. package/src/__tests__/validate-structure.js +0 -91
  375. package/src/__tests__/validation.js +0 -42
  376. package/src/types/react-redux.d.ts +0 -5
  377. package/src/ui/components/bottomSheet/index.tsx +0 -14
  378. package/src/ui/hooks/useAuthFetch.ts +0 -238
  379. package/src/ui/hooks/useOxyFollow.ts +0 -188
  380. package/src/ui/screens/BillingManagementScreen.tsx +0 -589
  381. package/src/ui/store/index.ts +0 -36
  382. package/src/ui/store/setupOxyStore.ts +0 -58
  383. package/src/ui/store/slices/authSlice.ts +0 -43
  384. package/src/ui/store/slices/followSlice.ts +0 -207
  385. package/src/ui/store/slices/index.ts +0 -31
  386. package/src/ui/store/slices/types.ts +0 -33
  387. package/src/ui/styles/shadows.ts +0 -112
  388. package/src/utils/polyfills.ts +0 -34
@@ -1,123 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createShadow = createShadow;
7
- exports.shadows = void 0;
8
- var _reactNative = require("react-native");
9
- /**
10
- * Cross-platform shadow utility that eliminates "shadow*" deprecation warnings
11
- */
12
-
13
- /**
14
- * Creates cross-platform shadow styles
15
- * Uses boxShadow for web and native shadow props for iOS/Android
16
- */
17
- function createShadow(config) {
18
- const {
19
- shadowColor = '#000',
20
- shadowOffset = {
21
- width: 0,
22
- height: 2
23
- },
24
- shadowOpacity = 0.1,
25
- shadowRadius = 4,
26
- elevation = 2
27
- } = config;
28
- return _reactNative.Platform.select({
29
- web: {
30
- boxShadow: `${shadowOffset.width}px ${shadowOffset.height}px ${shadowRadius}px rgba(${hexToRgb(shadowColor)}, ${shadowOpacity})`
31
- },
32
- ios: {
33
- shadowColor,
34
- shadowOffset,
35
- shadowOpacity,
36
- shadowRadius
37
- },
38
- android: {
39
- elevation
40
- },
41
- default: {
42
- shadowColor,
43
- shadowOffset,
44
- shadowOpacity,
45
- shadowRadius,
46
- elevation
47
- }
48
- });
49
- }
50
-
51
- /**
52
- * Helper function to convert hex color to RGB
53
- */
54
- function hexToRgb(hex) {
55
- // Remove # if present
56
- hex = hex.replace('#', '');
57
-
58
- // Handle shorthand hex colors (e.g., #fff)
59
- if (hex.length === 3) {
60
- hex = hex.split('').map(char => char + char).join('');
61
- }
62
- const r = parseInt(hex.substr(0, 2), 16);
63
- const g = parseInt(hex.substr(2, 2), 16);
64
- const b = parseInt(hex.substr(4, 2), 16);
65
- return `${r}, ${g}, ${b}`;
66
- }
67
-
68
- /**
69
- * Predefined shadow presets
70
- */
71
- const shadows = exports.shadows = {
72
- small: createShadow({
73
- shadowColor: '#000',
74
- shadowOffset: {
75
- width: 0,
76
- height: 1
77
- },
78
- shadowOpacity: 0.05,
79
- shadowRadius: 2,
80
- elevation: 1
81
- }),
82
- medium: createShadow({
83
- shadowColor: '#000',
84
- shadowOffset: {
85
- width: 0,
86
- height: 2
87
- },
88
- shadowOpacity: 0.1,
89
- shadowRadius: 4,
90
- elevation: 2
91
- }),
92
- large: createShadow({
93
- shadowColor: '#000',
94
- shadowOffset: {
95
- width: 0,
96
- height: 4
97
- },
98
- shadowOpacity: 0.15,
99
- shadowRadius: 8,
100
- elevation: 4
101
- }),
102
- card: createShadow({
103
- shadowColor: '#000',
104
- shadowOffset: {
105
- width: 0,
106
- height: 2
107
- },
108
- shadowOpacity: 0.08,
109
- shadowRadius: 8,
110
- elevation: 3
111
- }),
112
- button: createShadow({
113
- shadowColor: '#000',
114
- shadowOffset: {
115
- width: 0,
116
- height: 2
117
- },
118
- shadowOpacity: 0.1,
119
- shadowRadius: 4,
120
- elevation: 2
121
- })
122
- };
123
- //# sourceMappingURL=shadows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","createShadow","config","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","Platform","select","web","boxShadow","hexToRgb","ios","android","default","hex","replace","length","split","map","char","join","r","parseInt","substr","g","b","shadows","exports","small","medium","large","card","button"],"sourceRoot":"../../../../src","sources":["ui/styles/shadows.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;;AASA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAACC,MAAoB,EAAE;EACjD,MAAM;IACJC,WAAW,GAAG,MAAM;IACpBC,YAAY,GAAG;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACtCC,aAAa,GAAG,GAAG;IACnBC,YAAY,GAAG,CAAC;IAChBC,SAAS,GAAG;EACd,CAAC,GAAGP,MAAM;EAEV,OAAOQ,qBAAQ,CAACC,MAAM,CAAC;IACrBC,GAAG,EAAE;MACHC,SAAS,EAAE,GAAGT,YAAY,CAACC,KAAK,MAAMD,YAAY,CAACE,MAAM,MAAME,YAAY,WAAWM,QAAQ,CAACX,WAAW,CAAC,KAAKI,aAAa;IAC/H,CAAC;IACDQ,GAAG,EAAE;MACHZ,WAAW;MACXC,YAAY;MACZG,aAAa;MACbC;IACF,CAAC;IACDQ,OAAO,EAAE;MACPP;IACF,CAAC;IACDQ,OAAO,EAAE;MACPd,WAAW;MACXC,YAAY;MACZG,aAAa;MACbC,YAAY;MACZC;IACF;EACF,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA,SAASK,QAAQA,CAACI,GAAW,EAAU;EACrC;EACAA,GAAG,GAAGA,GAAG,CAACC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;;EAE1B;EACA,IAAID,GAAG,CAACE,MAAM,KAAK,CAAC,EAAE;IACpBF,GAAG,GAAGA,GAAG,CAACG,KAAK,CAAC,EAAE,CAAC,CAACC,GAAG,CAACC,IAAI,IAAIA,IAAI,GAAGA,IAA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E;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF2B,MAAM,EAAEnC,YAAY,CAAC;IACnBE,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getFormDataConstructor = exports.ensureFormDataAvailable = void 0;
7
- /**
8
- * Polyfills for React Native environments that may be missing certain Web APIs
9
- */
10
-
11
- // FormData polyfill for React Native/Hermes environments
12
- if (typeof FormData === 'undefined') {
13
- try {
14
- const FormDataPolyfill = require('form-data');
15
- // Use globalThis which is more universal than global
16
- if (typeof globalThis !== 'undefined') {
17
- globalThis.FormData = FormDataPolyfill;
18
- }
19
- } catch (error) {
20
- console.warn('form-data package not found. File uploads may not work in React Native environments without native FormData support.');
21
- }
22
- }
23
-
24
- // Export a helper to ensure FormData is available
25
- const ensureFormDataAvailable = () => {
26
- return typeof FormData !== 'undefined' || typeof require !== 'undefined';
27
- };
28
-
29
- // Get FormData constructor (either native or polyfilled)
30
- exports.ensureFormDataAvailable = ensureFormDataAvailable;
31
- const getFormDataConstructor = () => {
32
- if (typeof FormData !== 'undefined') {
33
- return FormData;
34
- }
35
- try {
36
- return require('form-data');
37
- } catch (error) {
38
- throw new Error('FormData is not available and form-data package is not installed. Please install form-data for file upload support.');
39
- }
40
- };
41
- exports.getFormDataConstructor = getFormDataConstructor;
42
- //# sourceMappingURL=polyfills.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FormData","FormDataPolyfill","require","globalThis","error","console","warn","ensureFormDataAvailable","exports","getFormDataConstructor","Error"],"sourceRoot":"../../../src","sources":["utils/polyfills.ts"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;AACA,IAAI,OAAOA,QAAQ,KAAK,WAAW,EAAE;EACnC,IAAI;IACF,MAAMC,gBAAgB,GAAGC,OAAO,CAAC,WAAW,CAAC;IAC7C;IACA,IAAI,OAAOC,UAAU,KAAK,WAAW,EAAE;MACpCA,UAAU,CAASH,QAAQ,GAAGC,gBAAgB;IACjD;EACF,CAAC,CAAC,OAAOG,KAAK,EAAE;IACdC,OAAO,CAACC,IAAI,CAAC,sHAAsH,CAAC;EACtI;AACF;;AAEA;AACO,MAAMC,uBAAuB,GAAGA,CAAA,KAAe;EACpD,OAAO,OAAOP,QAAQ,KAAK,WAAW,IAAI,OAAOE,OAAO,KAAK,WAAW;AAC1E,CAAC;;AAED;AAAAM,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AACO,MAAME,sBAAsB,GAAGA,CAAA,KAAW;EAC/C,IAAI,OAAOT,QAAQ,KAAK,WAAW,EAAE;IACnC,OAAOA,QAAQ;EACjB;EAEA,IAAI;IACF,OAAOE,OAAO,CAAC,WAAW,CAAC;EAC7B,CAAC,CAAC,OAAOE,KAAK,EAAE;IACd,MAAM,IAAIM,KAAK,CAAC,qHAAqH,CAAC;EACxI;AACF,CAAC;AAACF,OAAA,CAAAC,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- // Re-export bottom sheet components from @gorhom/bottom-sheet
4
- export { BottomSheetModal, BottomSheetBackdrop, BottomSheetModalProvider, BottomSheetView, BottomSheetScrollView } from '@gorhom/bottom-sheet';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BottomSheetModal","BottomSheetBackdrop","BottomSheetModalProvider","BottomSheetView","BottomSheetScrollView"],"sourceRoot":"../../../../../src","sources":["ui/components/bottomSheet/index.tsx"],"mappings":";;AAAA;AACA,SACEA,gBAAgB,EAChBC,mBAAmB,EACnBC,wBAAwB,EACxBC,eAAe,EACfC,qBAAqB,QAChB,sBAAsB","ignoreList":[]}
@@ -1,211 +0,0 @@
1
- "use strict";
2
-
3
- /**
4
- * Zero Config Authenticated Fetch Hook
5
- *
6
- * Simple hook that provides fetch-like API with automatic authentication
7
- * Leverages the existing useOxy hook and OxyProvider infrastructure
8
- *
9
- * Usage:
10
- * const authFetch = useAuthFetch();
11
- * const response = await authFetch('/api/protected');
12
- * const data = await authFetch.get('/api/users');
13
- */
14
-
15
- import { useCallback } from 'react';
16
- import { useOxy } from '../context/OxyContext';
17
- /**
18
- * Hook that provides authenticated fetch functionality
19
- * Uses the existing OxyServices instance from useOxy context
20
- */
21
- export function useAuthFetch() {
22
- const {
23
- oxyServices,
24
- isAuthenticated,
25
- user,
26
- login,
27
- logout,
28
- signUp,
29
- activeSessionId,
30
- setApiUrl
31
- } = useOxy();
32
-
33
- // Validate that we have the required dependencies
34
- if (!oxyServices) {
35
- throw new Error('useAuthFetch requires OxyServices to be initialized. Make sure your app is wrapped with OxyProvider.');
36
- }
37
-
38
- // Main fetch function with automatic auth headers
39
- const authFetch = useCallback(async (input, init) => {
40
- if (!oxyServices) {
41
- throw new Error('OxyServices not initialized. Make sure to wrap your app in OxyProvider.');
42
- }
43
- const url = resolveURL(input, oxyServices.getBaseURL());
44
- const options = await addAuthHeaders(init, oxyServices, activeSessionId || undefined, isAuthenticated);
45
- try {
46
- let response = await fetch(url, options);
47
-
48
- // Handle token expiry and automatic refresh
49
- if (response.status === 401 && isAuthenticated) {
50
- // Try to refresh token if we have refresh capability
51
- if (oxyServices.refreshTokens) {
52
- try {
53
- await oxyServices.refreshTokens();
54
- const retryOptions = await addAuthHeaders(init, oxyServices, activeSessionId || undefined, isAuthenticated);
55
- response = await fetch(url, retryOptions);
56
- } catch (refreshError) {
57
- // Refresh failed, throw authentication error
58
- const error = new Error('Authentication expired. Please login again.');
59
- error.status = 401;
60
- error.code = 'AUTH_EXPIRED';
61
- throw error;
62
- }
63
- }
64
- }
65
- return response;
66
- } catch (error) {
67
- // Re-throw with additional context if needed
68
- if (error instanceof Error) {
69
- throw error;
70
- }
71
- throw new Error('Request failed');
72
- }
73
- }, [oxyServices, activeSessionId, isAuthenticated]);
74
-
75
- // JSON convenience methods
76
- const get = useCallback(async (endpoint, options) => {
77
- const response = await authFetch(endpoint, {
78
- ...options,
79
- method: 'GET'
80
- });
81
- return handleJsonResponse(response);
82
- }, [authFetch]);
83
- const post = useCallback(async (endpoint, data, options) => {
84
- const response = await authFetch(endpoint, {
85
- ...options,
86
- method: 'POST',
87
- headers: {
88
- 'Content-Type': 'application/json',
89
- ...options?.headers
90
- },
91
- body: data ? JSON.stringify(data) : undefined
92
- });
93
- return handleJsonResponse(response);
94
- }, [authFetch]);
95
- const put = useCallback(async (endpoint, data, options) => {
96
- const response = await authFetch(endpoint, {
97
- ...options,
98
- method: 'PUT',
99
- headers: {
100
- 'Content-Type': 'application/json',
101
- ...options?.headers
102
- },
103
- body: data ? JSON.stringify(data) : undefined
104
- });
105
- return handleJsonResponse(response);
106
- }, [authFetch]);
107
- const del = useCallback(async (endpoint, options) => {
108
- const response = await authFetch(endpoint, {
109
- ...options,
110
- method: 'DELETE'
111
- });
112
- return handleJsonResponse(response);
113
- }, [authFetch]);
114
-
115
- // Attach convenience methods and auth state to the main function
116
- const fetchWithMethods = authFetch;
117
- fetchWithMethods.get = get;
118
- fetchWithMethods.post = post;
119
- fetchWithMethods.put = put;
120
- fetchWithMethods.delete = del;
121
- fetchWithMethods.isAuthenticated = isAuthenticated;
122
- fetchWithMethods.user = user;
123
- fetchWithMethods.login = login;
124
- fetchWithMethods.logout = logout;
125
- fetchWithMethods.signUp = signUp;
126
- fetchWithMethods.setApiUrl = setApiUrl;
127
- return fetchWithMethods;
128
- }
129
-
130
- /**
131
- * Helper functions
132
- */
133
-
134
- function resolveURL(input, baseURL) {
135
- if (!baseURL) {
136
- throw new Error('Base URL not configured. Please provide a baseURL in OxyServices configuration.');
137
- }
138
- const url = input.toString();
139
-
140
- // If it's already a full URL (http/https), return as is
141
- if (url.startsWith('http://') || url.startsWith('https://')) {
142
- return url;
143
- }
144
-
145
- // Normalize base URL (remove trailing slash)
146
- const normalizedBaseURL = baseURL.replace(/\/$/, '');
147
-
148
- // If URL starts with /, it's relative to base URL
149
- if (url.startsWith('/')) {
150
- return `${normalizedBaseURL}${url}`;
151
- }
152
-
153
- // Otherwise, append to base URL with /
154
- return `${normalizedBaseURL}/${url}`;
155
- }
156
- async function addAuthHeaders(init, oxyServices, activeSessionId, isAuthenticated) {
157
- const headers = new Headers(init?.headers);
158
-
159
- // Add auth header if user is authenticated
160
- if (isAuthenticated && oxyServices && !headers.has('Authorization')) {
161
- try {
162
- // First try to get regular JWT access token
163
- let accessToken = oxyServices.getAccessToken?.();
164
-
165
- // If no JWT token but we have a secure session, try to get token from session
166
- if (!accessToken && activeSessionId) {
167
- try {
168
- const tokenData = await oxyServices.getTokenBySession(activeSessionId);
169
- accessToken = tokenData.accessToken;
170
- } catch (error) {
171
- // Silent fail - will attempt request without token
172
- }
173
- }
174
- if (accessToken) {
175
- headers.set('Authorization', `Bearer ${accessToken}`);
176
- }
177
- } catch (error) {
178
- // Silent fail - will attempt request without token
179
- }
180
- }
181
- const body = init?.body;
182
- const processedBody = body && typeof body === 'object' && !(body instanceof FormData) && !(body instanceof URLSearchParams) ? JSON.stringify(body) : body;
183
- return {
184
- ...init,
185
- headers,
186
- body: processedBody
187
- };
188
- }
189
- async function handleJsonResponse(response) {
190
- if (!response.ok) {
191
- let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
192
- try {
193
- const errorData = await response.json();
194
- errorMessage = errorData.message || errorData.error || errorMessage;
195
- } catch {
196
- // Ignore JSON parsing errors
197
- }
198
- const error = new Error(errorMessage);
199
- error.status = response.status;
200
- error.response = response;
201
- throw error;
202
- }
203
- try {
204
- return await response.json();
205
- } catch {
206
- // If response isn't JSON, return the response itself
207
- return response;
208
- }
209
- }
210
- export default useAuthFetch;
211
- //# sourceMappingURL=useAuthFetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useOxy","useAuthFetch","oxyServices","isAuthenticated","user","login","logout","signUp","activeSessionId","setApiUrl","Error","authFetch","input","init","url","resolveURL","getBaseURL","options","addAuthHeaders","undefined","response","fetch","status","refreshTokens","retryOptions","refreshError","error","code","get","endpoint","method","handleJsonResponse","post","data","headers","body","JSON","stringify","put","del","fetchWithMethods","delete","baseURL","toString","startsWith","normalizedBaseURL","replace","Headers","has","accessToken","getAccessToken","tokenData","getTokenBySession","set","processedBody","FormData","URLSearchParams","ok","errorMessage","statusText","errorData","json","message"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAuthFetch.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,MAAM,QAAQ,uBAAuB;AA2B9C;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAA,EAAiB;EAC3C,MAAM;IAAEC,WAAW;IAAEC,eAAe;IAAEC,IAAI;IAAEC,KAAK;IAAEC,MAAM;IAAEC,MAAM;IAAEC,eAAe;IAAEC;EAAU,CAAC,GAAGT,MAAM,CAAC,CAAC;;EAE1G;EACA,IAAI,CAACE,WAAW,EAAE;IAChB,MAAM,IAAIQ,KAAK,CAAC,sGAAsG,CAAC;EACzH;;EAEA;EACA,MAAMC,SAAS,GAAGZ,WAAW,CAAC,OAAOa,KAAwB,EAAEC,IAAuB,KAAwB;IAC5G,IAAI,CAACX,WAAW,EAAE;MAChB,MAAM,IAAIQ,KAAK,CAAC,yEAAyE,CAAC;IAC5F;IAEA,MAAMI,GAAG,GAAGC,UAAU,CAACH,KAAK,EAAEV,WAAW,CAACc,UAAU,CAAC,CAAC,CAAC;IACvD,MAAMC,OAAO,GAAG,MAAMC,cAAc,CAACL,IAAI,EAAEX,WAA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AAK,IAAIgC,YAAY;IACrE,CAAC,CAAC,MAAM;MACN;IAAA;IAGF,MAAMhC,KAAK,GAAG,IAAIhB,KAAK,CAACgD,YAAY,CAAQ;IAC5ChC,KAAK,CAACJ,MAAM,GAAGF,QAAQ,CAACE,MAAM;IAC9BI,KAAK,CAACN,QAAQ,GAAGA,QAAQ;IACzB,MAAMM,KAAK;EACb;EAEA,IAAI;IACF,OAAO,MAAMN,QAAQ,CAACyC,IAAI,CAAC,CAAC;EAC9B,CAAC,CAAC,MAAM;IACN;IACA,OAAOzC,QAAQ;EACjB;AACF;AAEA,eAAenB,YAAY","ignoreList":[]}
@@ -1,186 +0,0 @@
1
- "use strict";
2
-
3
- import { useDispatch, useSelector } from 'react-redux';
4
- import { useCallback, useMemo } from 'react';
5
- import { toggleFollowUser, setFollowingStatus, clearFollowError, fetchFollowStatus, followSelectors } from '../store/slices/followSlice';
6
- import { useOxy } from '../context/OxyContext';
7
-
8
- // Generic type for state that includes follow slice
9
-
10
- // Memoized selector to prevent unnecessary re-renders
11
- const createFollowSelector = userId => state => ({
12
- isFollowing: followSelectors.selectIsUserFollowed(state, userId),
13
- isLoading: followSelectors.selectIsUserLoading(state, userId),
14
- error: followSelectors.selectUserError(state, userId)
15
- });
16
-
17
- // Memoized selector for multiple users
18
- const createMultipleFollowSelector = userIds => state => {
19
- const followData = {};
20
- for (const userId of userIds) {
21
- followData[userId] = {
22
- isFollowing: followSelectors.selectIsUserFollowed(state, userId),
23
- isLoading: followSelectors.selectIsUserLoading(state, userId),
24
- error: followSelectors.selectUserError(state, userId)
25
- };
26
- }
27
- const followState = state.follow;
28
- return {
29
- followData,
30
- isAnyLoading: userIds.some(uid => followState.loadingUsers[uid]),
31
- hasAnyError: userIds.some(uid => followState.errors[uid]),
32
- allFollowing: userIds.every(uid => followState.followingUsers[uid]),
33
- allNotFollowing: userIds.every(uid => !followState.followingUsers[uid])
34
- };
35
- };
36
-
37
- /**
38
- * Custom hook for managing follow/unfollow functionality
39
- * Works with any Redux store that includes the Oxy follow reducer
40
- * Optimized to prevent unnecessary re-renders
41
- * Can handle both single user and multiple users
42
- */
43
- export const useOxyFollow = userId => {
44
- const dispatch = useDispatch();
45
- const {
46
- oxyServices
47
- } = useOxy();
48
-
49
- // Memoize user IDs to prevent recreation on every render
50
- const userIds = useMemo(() => {
51
- return Array.isArray(userId) ? userId : userId ? [userId] : [];
52
- }, [userId]);
53
- const isSingleUser = typeof userId === 'string';
54
-
55
- // Memoize selectors to prevent recreation
56
- const singleUserSelector = useMemo(() => {
57
- return isSingleUser && userId ? createFollowSelector(userId) : null;
58
- }, [isSingleUser, userId]);
59
- const multipleUserSelector = useMemo(() => {
60
- return !isSingleUser ? createMultipleFollowSelector(userIds) : null;
61
- }, [isSingleUser, userIds]);
62
-
63
- // Use appropriate selector based on mode
64
- const singleUserData = useSelector(singleUserSelector || (() => ({
65
- isFollowing: false,
66
- isLoading: false,
67
- error: null
68
- })));
69
- const multipleUserData = useSelector(multipleUserSelector || (() => ({
70
- followData: {},
71
- isAnyLoading: false,
72
- hasAnyError: false,
73
- allFollowing: false,
74
- allNotFollowing: true
75
- })));
76
-
77
- // Memoized callbacks to prevent recreation on every render
78
- const toggleFollow = useCallback(async () => {
79
- if (!isSingleUser || !userId) throw new Error('toggleFollow is only available for single user mode');
80
- try {
81
- const result = await dispatch(toggleFollowUser({
82
- userId,
83
- oxyServices,
84
- isCurrentlyFollowing: singleUserData.isFollowing
85
- })).unwrap();
86
- return result;
87
- } catch (error) {
88
- throw error;
89
- }
90
- }, [dispatch, userId, oxyServices, singleUserData.isFollowing, isSingleUser]);
91
- const setFollowStatus = useCallback(following => {
92
- if (!isSingleUser || !userId) throw new Error('setFollowStatus is only available for single user mode');
93
- dispatch(setFollowingStatus({
94
- userId,
95
- isFollowing: following
96
- }));
97
- }, [dispatch, userId, isSingleUser]);
98
- const fetchStatus = useCallback(async () => {
99
- if (!isSingleUser || !userId) throw new Error('fetchStatus is only available for single user mode');
100
- try {
101
- await dispatch(fetchFollowStatus({
102
- userId,
103
- oxyServices
104
- })).unwrap();
105
- } catch (error) {
106
- console.warn(`Failed to fetch follow status for user ${userId}:`, error);
107
- }
108
- }, [dispatch, userId, oxyServices, isSingleUser]);
109
- const clearError = useCallback(() => {
110
- if (!isSingleUser || !userId) throw new Error('clearError is only available for single user mode');
111
- dispatch(clearFollowError(userId));
112
- }, [dispatch, userId, isSingleUser]);
113
-
114
- // Multiple user callbacks
115
- const toggleFollowForUser = useCallback(async targetUserId => {
116
- const currentState = multipleUserData.followData[targetUserId]?.isFollowing ?? false;
117
- try {
118
- const result = await dispatch(toggleFollowUser({
119
- userId: targetUserId,
120
- oxyServices,
121
- isCurrentlyFollowing: currentState
122
- })).unwrap();
123
- return result;
124
- } catch (error) {
125
- throw error;
126
- }
127
- }, [dispatch, oxyServices, multipleUserData.followData]);
128
- const setFollowStatusForUser = useCallback((targetUserId, following) => {
129
- dispatch(setFollowingStatus({
130
- userId: targetUserId,
131
- isFollowing: following
132
- }));
133
- }, [dispatch]);
134
- const fetchStatusForUser = useCallback(async targetUserId => {
135
- try {
136
- await dispatch(fetchFollowStatus({
137
- userId: targetUserId,
138
- oxyServices
139
- })).unwrap();
140
- } catch (error) {
141
- console.warn(`Failed to fetch follow status for user ${targetUserId}:`, error);
142
- }
143
- }, [dispatch, oxyServices]);
144
- const fetchAllStatuses = useCallback(async () => {
145
- const promises = userIds.map(uid => dispatch(fetchFollowStatus({
146
- userId: uid,
147
- oxyServices
148
- })).unwrap().catch(error => {
149
- console.warn(`Failed to fetch follow status for user ${uid}:`, error);
150
- }));
151
- await Promise.all(promises);
152
- }, [dispatch, userIds, oxyServices]);
153
- const clearErrorForUser = useCallback(targetUserId => {
154
- dispatch(clearFollowError(targetUserId));
155
- }, [dispatch]);
156
-
157
- // Return appropriate interface based on mode
158
- if (isSingleUser && userId) {
159
- return {
160
- isFollowing: singleUserData.isFollowing,
161
- isLoading: singleUserData.isLoading,
162
- error: singleUserData.error,
163
- toggleFollow,
164
- setFollowStatus,
165
- fetchStatus,
166
- clearError
167
- };
168
- }
169
- return {
170
- followData: multipleUserData.followData,
171
- toggleFollowForUser,
172
- setFollowStatusForUser,
173
- fetchStatusForUser,
174
- fetchAllStatuses,
175
- clearErrorForUser,
176
- // Helper methods
177
- isAnyLoading: multipleUserData.isAnyLoading,
178
- hasAnyError: multipleUserData.hasAnyError,
179
- allFollowing: multipleUserData.allFollowing,
180
- allNotFollowing: multipleUserData.allNotFollowing
181
- };
182
- };
183
-
184
- // Backward compatibility alias
185
- export const useFollow = useOxyFollow;
186
- //# sourceMappingURL=useOxyFollow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useDispatch","useSelector","useCallback","useMemo","toggleFollowUser","setFollowingStatus","clearFollowError","fetchFollowStatus","followSelectors","useOxy","createFollowSelector","userId","state","isFollowing","selectIsUserFollowed","isLoading","selectIsUserLoading","error","selectUserError","createMultipleFollowSelector","userIds","followData","followState","follow","isAnyLoading","some","uid","loadingUsers","hasAnyError","errors","allFollowing","every","followingUsers","allNotFollowing","useOxyFollow","dispatch","oxyServices","Array","isArray","isSingleUser","singleUserSelector","multipleUserSelector","singleUserData","multipleUserData","toggleFollow","Error","result","isCurrentlyFollowing","unwrap","setFollowStatus","following","fetchStatus","console","warn","clearError","toggleFollowForUser","targetUserId","currentState","setFollowStatusForUser","fetchStatusForUser","fetchAllStatuses","promises","map","catch","Promise","all","clearErrorForUser","useFollow"],"sourceRoot":"../../../../src","sources":["ui/hooks/useOxyFollow.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,SAASC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,gBAAgB,EAChBC,iBAAiB,EACjBC,eAAe,QACV,6BAA6B;AAEpC,SAASC,MAAM,QAAQ,uBAAuB;;AAE9C;;AAKA;AACA,MAAMC,oBAAoB,GAAIC,MAAc,IAAMC,KAAsB,KAAM;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