@oxyhq/services 5.5.9 → 5.6.1

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 (396) 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 +116 -84
  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 +90 -39
  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 +66 -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 +117 -85
  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 +91 -40
  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 +62 -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/interfaces.d.ts +6 -0
  179. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  180. package/lib/typescript/models/secureSession.d.ts +0 -1
  181. package/lib/typescript/models/secureSession.d.ts.map +1 -1
  182. package/lib/typescript/node/index.d.ts +0 -1
  183. package/lib/typescript/node/index.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
  185. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  186. package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
  187. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
  188. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  189. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
  190. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
  191. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
  192. package/lib/typescript/ui/components/icon/index.d.ts +1 -0
  193. package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
  194. package/lib/typescript/ui/components/index.d.ts +1 -0
  195. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  196. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  197. package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
  198. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
  199. package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
  200. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  201. package/lib/typescript/ui/context/OxyContext.d.ts +0 -2
  202. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  203. package/lib/typescript/ui/hooks/index.d.ts +1 -2
  204. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  205. package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
  206. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  207. package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
  208. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
  209. package/lib/typescript/ui/index.d.ts +2 -5
  210. package/lib/typescript/ui/index.d.ts.map +1 -1
  211. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  212. package/lib/typescript/ui/navigation/types.d.ts +5 -23
  213. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  215. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  219. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  220. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  221. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
  222. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
  223. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  224. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
  225. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
  226. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  228. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
  230. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
  231. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
  232. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
  233. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
  234. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
  235. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
  236. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
  237. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
  238. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
  239. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
  240. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
  241. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  242. package/lib/typescript/ui/stores/authStore.d.ts +16 -0
  243. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
  244. package/lib/typescript/ui/stores/followStore.d.ts +15 -0
  245. package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
  246. package/lib/typescript/ui/styles/index.d.ts +0 -1
  247. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  248. package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
  249. package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
  250. package/package.json +12 -7
  251. package/src/core/index.ts +78 -88
  252. package/src/index.ts +8 -45
  253. package/src/models/interfaces.ts +7 -1
  254. package/src/models/secureSession.ts +1 -2
  255. package/src/node/index.ts +0 -3
  256. package/src/ui/components/FollowButton.tsx +100 -322
  257. package/src/ui/components/OxyPayButton.tsx +133 -0
  258. package/src/ui/components/OxyProvider.tsx +39 -201
  259. package/src/ui/components/OxySignInButton.tsx +13 -2
  260. package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
  261. package/src/ui/components/icon/index.ts +1 -0
  262. package/src/ui/components/index.ts +1 -0
  263. package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
  264. package/src/ui/components/internal/PinInput.tsx +102 -0
  265. package/src/ui/components/internal/TextField.tsx +9 -0
  266. package/src/ui/context/OxyContext.tsx +74 -91
  267. package/src/ui/hooks/index.ts +1 -2
  268. package/src/ui/hooks/useFollow.ts +58 -129
  269. package/src/ui/hooks/useSessionSocket.ts +50 -0
  270. package/src/ui/index.ts +2 -37
  271. package/src/ui/navigation/OxyRouter.tsx +47 -63
  272. package/src/ui/navigation/types.ts +5 -26
  273. package/src/ui/screens/AccountCenterScreen.tsx +12 -21
  274. package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
  275. package/src/ui/screens/AccountSettingsScreen.tsx +75 -46
  276. package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
  277. package/src/ui/screens/AppInfoScreen.tsx +27 -47
  278. package/src/ui/screens/FeedbackScreen.tsx +34 -19
  279. package/src/ui/screens/FileManagementScreen.tsx +293 -321
  280. package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
  281. package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
  282. package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
  283. package/src/ui/screens/SessionManagementScreen.tsx +65 -137
  284. package/src/ui/screens/SignInScreen.tsx +89 -283
  285. package/src/ui/screens/SignUpScreen.tsx +138 -291
  286. package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
  287. package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
  288. package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
  289. package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
  290. package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
  291. package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
  292. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
  293. package/src/ui/stores/authStore.ts +45 -0
  294. package/src/ui/stores/followStore.ts +80 -0
  295. package/src/ui/styles/index.ts +0 -1
  296. package/src/ui/utils/confirmAction.ts +23 -0
  297. package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
  298. package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
  299. package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -217
  300. package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
  301. package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
  302. package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
  303. package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
  304. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
  305. package/lib/commonjs/ui/store/index.js +0 -67
  306. package/lib/commonjs/ui/store/index.js.map +0 -1
  307. package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
  308. package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
  309. package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
  310. package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
  311. package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
  312. package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
  313. package/lib/commonjs/ui/store/slices/index.js +0 -129
  314. package/lib/commonjs/ui/store/slices/index.js.map +0 -1
  315. package/lib/commonjs/ui/store/slices/types.js +0 -19
  316. package/lib/commonjs/ui/store/slices/types.js.map +0 -1
  317. package/lib/commonjs/ui/styles/shadows.js +0 -123
  318. package/lib/commonjs/ui/styles/shadows.js.map +0 -1
  319. package/lib/commonjs/utils/polyfills.js +0 -42
  320. package/lib/commonjs/utils/polyfills.js.map +0 -1
  321. package/lib/module/ui/components/bottomSheet/index.js +0 -5
  322. package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
  323. package/lib/module/ui/hooks/useAuthFetch.js +0 -212
  324. package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
  325. package/lib/module/ui/hooks/useOxyFollow.js +0 -186
  326. package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
  327. package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
  328. package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
  329. package/lib/module/ui/store/index.js +0 -33
  330. package/lib/module/ui/store/index.js.map +0 -1
  331. package/lib/module/ui/store/setupOxyStore.js +0 -59
  332. package/lib/module/ui/store/setupOxyStore.js.map +0 -1
  333. package/lib/module/ui/store/slices/authSlice.js +0 -48
  334. package/lib/module/ui/store/slices/authSlice.js.map +0 -1
  335. package/lib/module/ui/store/slices/followSlice.js +0 -232
  336. package/lib/module/ui/store/slices/followSlice.js.map +0 -1
  337. package/lib/module/ui/store/slices/index.js +0 -11
  338. package/lib/module/ui/store/slices/index.js.map +0 -1
  339. package/lib/module/ui/store/slices/types.js +0 -15
  340. package/lib/module/ui/store/slices/types.js.map +0 -1
  341. package/lib/module/ui/styles/shadows.js +0 -119
  342. package/lib/module/ui/styles/shadows.js.map +0 -1
  343. package/lib/module/utils/polyfills.js +0 -36
  344. package/lib/module/utils/polyfills.js.map +0 -1
  345. package/lib/typescript/types/react-redux.d.ts +0 -5
  346. package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
  347. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
  348. package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
  349. package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
  350. package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
  351. package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
  352. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
  353. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
  354. package/lib/typescript/ui/store/index.d.ts +0 -27
  355. package/lib/typescript/ui/store/index.d.ts.map +0 -1
  356. package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
  357. package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
  358. package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
  359. package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
  360. package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
  361. package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
  362. package/lib/typescript/ui/store/slices/index.d.ts +0 -9
  363. package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
  364. package/lib/typescript/ui/store/slices/types.d.ts +0 -16
  365. package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
  366. package/lib/typescript/ui/styles/shadows.d.ts +0 -233
  367. package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
  368. package/lib/typescript/utils/polyfills.d.ts +0 -6
  369. package/lib/typescript/utils/polyfills.d.ts.map +0 -1
  370. package/src/__tests__/backend-middleware.test.ts +0 -209
  371. package/src/__tests__/polyfills.test.ts +0 -30
  372. package/src/__tests__/setup.ts +0 -43
  373. package/src/__tests__/ui/hooks/authfetch-integration.test.ts +0 -197
  374. package/src/__tests__/ui/hooks/backward-compatibility.test.ts +0 -159
  375. package/src/__tests__/ui/hooks/real-world-scenarios.test.ts +0 -224
  376. package/src/__tests__/ui/hooks/url-resolution.test.ts +0 -129
  377. package/src/__tests__/ui/hooks/useAuthFetch-separation.test.ts +0 -69
  378. package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
  379. package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
  380. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
  381. package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
  382. package/src/__tests__/validate-structure.js +0 -91
  383. package/src/__tests__/validation.js +0 -42
  384. package/src/types/react-redux.d.ts +0 -5
  385. package/src/ui/components/bottomSheet/index.tsx +0 -14
  386. package/src/ui/hooks/useAuthFetch.ts +0 -238
  387. package/src/ui/hooks/useOxyFollow.ts +0 -188
  388. package/src/ui/screens/BillingManagementScreen.tsx +0 -589
  389. package/src/ui/store/index.ts +0 -36
  390. package/src/ui/store/setupOxyStore.ts +0 -58
  391. package/src/ui/store/slices/authSlice.ts +0 -43
  392. package/src/ui/store/slices/followSlice.ts +0 -207
  393. package/src/ui/store/slices/index.ts +0 -31
  394. package/src/ui/store/slices/types.ts +0 -33
  395. package/src/ui/styles/shadows.ts +0 -112
  396. package/src/utils/polyfills.ts +0 -34
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { View, Text, StyleSheet, ScrollView } from 'react-native';
2
+ import { View, Text, StyleSheet, ScrollView, Platform } from 'react-native';
3
3
  import { BaseScreenProps } from '../../navigation/types';
4
- import { shadows } from '../../styles';
5
4
 
6
5
  const KarmaRewardsScreen: React.FC<BaseScreenProps> = ({ goBack, theme }) => {
7
6
  const isDarkTheme = theme === 'dark';
@@ -42,7 +41,18 @@ const styles = StyleSheet.create({
42
41
  borderRadius: 16,
43
42
  padding: 18,
44
43
  marginBottom: 18,
45
- ...shadows.small,
44
+ ...Platform.select({
45
+ web: {
46
+ boxShadow: '0 1px 4px rgba(0,0,0,0.04)',
47
+ },
48
+ default: {
49
+ shadowColor: '#000',
50
+ shadowOpacity: 0.04,
51
+ shadowOffset: { width: 0, height: 1 },
52
+ shadowRadius: 4,
53
+ elevation: 1,
54
+ }
55
+ }),
46
56
  },
47
57
  rewardTitle: { fontSize: 18, fontWeight: 'bold', marginBottom: 6 },
48
58
  rewardDesc: { fontSize: 15 },
@@ -0,0 +1,45 @@
1
+ import { create } from 'zustand';
2
+ import type { User } from '../../models/interfaces';
3
+
4
+ interface AuthState {
5
+ user: User | null;
6
+ isAuthenticated: boolean;
7
+ isLoading: boolean;
8
+ error: string | null;
9
+ loginStart: () => void;
10
+ loginSuccess: (user: User) => void;
11
+ loginFailure: (error: string) => void;
12
+ logout: () => void;
13
+ fetchUser: (oxyServices: any) => Promise<void>;
14
+ updateUser: (updates: Partial<User>, oxyServices: any) => Promise<void>;
15
+ }
16
+
17
+ export const useAuthStore = create<AuthState>((set: (state: Partial<AuthState>) => void) => ({
18
+ user: null,
19
+ isAuthenticated: false,
20
+ isLoading: false,
21
+ error: null,
22
+ loginStart: () => set({ isLoading: true, error: null }),
23
+ loginSuccess: (user: User) => set({ isLoading: false, isAuthenticated: true, user }),
24
+ loginFailure: (error: string) => set({ isLoading: false, error }),
25
+ logout: () => set({ user: null, isAuthenticated: false }),
26
+ fetchUser: async (oxyServices) => {
27
+ set({ isLoading: true, error: null });
28
+ try {
29
+ const user = await oxyServices.getCurrentUser();
30
+ set({ user, isLoading: false, isAuthenticated: true });
31
+ } catch (error: any) {
32
+ set({ error: error.message || 'Failed to fetch user', isLoading: false });
33
+ }
34
+ },
35
+ updateUser: async (updates, oxyServices) => {
36
+ set({ isLoading: true, error: null });
37
+ try {
38
+ await oxyServices.updateProfile(updates);
39
+ // Immediately fetch the latest user data after update
40
+ await useAuthStore.getState().fetchUser(oxyServices);
41
+ } catch (error: any) {
42
+ set({ error: error.message || 'Failed to update user', isLoading: false });
43
+ }
44
+ },
45
+ }));
@@ -0,0 +1,80 @@
1
+ import { create } from 'zustand';
2
+ import { OxyServices } from '../../core';
3
+
4
+ interface FollowState {
5
+ followingUsers: Record<string, boolean>;
6
+ loadingUsers: Record<string, boolean>;
7
+ fetchingUsers: Record<string, boolean>;
8
+ errors: Record<string, string | null>;
9
+ setFollowingStatus: (userId: string, isFollowing: boolean) => void;
10
+ clearFollowError: (userId: string) => void;
11
+ resetFollowState: () => void;
12
+ fetchFollowStatus: (userId: string, oxyServices: OxyServices) => Promise<void>;
13
+ toggleFollowUser: (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => Promise<void>;
14
+ }
15
+
16
+ export const useFollowStore = create<FollowState>((set: any, get: any) => ({
17
+ followingUsers: {},
18
+ loadingUsers: {},
19
+ fetchingUsers: {},
20
+ errors: {},
21
+ setFollowingStatus: (userId: string, isFollowing: boolean) => set((state: FollowState) => ({
22
+ followingUsers: { ...state.followingUsers, [userId]: isFollowing },
23
+ errors: { ...state.errors, [userId]: null },
24
+ })),
25
+ clearFollowError: (userId: string) => set((state: FollowState) => ({
26
+ errors: { ...state.errors, [userId]: null },
27
+ })),
28
+ resetFollowState: () => set({
29
+ followingUsers: {},
30
+ loadingUsers: {},
31
+ fetchingUsers: {},
32
+ errors: {},
33
+ }),
34
+ fetchFollowStatus: async (userId: string, oxyServices: OxyServices) => {
35
+ set((state: FollowState) => ({
36
+ fetchingUsers: { ...state.fetchingUsers, [userId]: true },
37
+ errors: { ...state.errors, [userId]: null },
38
+ }));
39
+ try {
40
+ const response = await oxyServices.getFollowStatus(userId);
41
+ set((state: FollowState) => ({
42
+ followingUsers: { ...state.followingUsers, [userId]: response.isFollowing },
43
+ fetchingUsers: { ...state.fetchingUsers, [userId]: false },
44
+ errors: { ...state.errors, [userId]: null },
45
+ }));
46
+ } catch (error: any) {
47
+ set((state: FollowState) => ({
48
+ fetchingUsers: { ...state.fetchingUsers, [userId]: false },
49
+ errors: { ...state.errors, [userId]: error?.message || 'Failed to fetch follow status' },
50
+ }));
51
+ }
52
+ },
53
+ toggleFollowUser: async (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => {
54
+ set((state: FollowState) => ({
55
+ loadingUsers: { ...state.loadingUsers, [userId]: true },
56
+ errors: { ...state.errors, [userId]: null },
57
+ }));
58
+ try {
59
+ let response;
60
+ let newFollowState;
61
+ if (isCurrentlyFollowing) {
62
+ response = await oxyServices.unfollowUser(userId);
63
+ newFollowState = false;
64
+ } else {
65
+ response = await oxyServices.followUser(userId);
66
+ newFollowState = true;
67
+ }
68
+ set((state: FollowState) => ({
69
+ followingUsers: { ...state.followingUsers, [userId]: newFollowState },
70
+ loadingUsers: { ...state.loadingUsers, [userId]: false },
71
+ errors: { ...state.errors, [userId]: null },
72
+ }));
73
+ } catch (error: any) {
74
+ set((state: FollowState) => ({
75
+ loadingUsers: { ...state.loadingUsers, [userId]: false },
76
+ errors: { ...state.errors, [userId]: error?.message || 'Failed to update follow status' },
77
+ }));
78
+ }
79
+ },
80
+ }));
@@ -1,3 +1,2 @@
1
1
  export * from './fonts';
2
2
  export * from './theme';
3
- export * from './shadows';
@@ -0,0 +1,23 @@
1
+ import { Platform, Alert } from 'react-native';
2
+
3
+ /**
4
+ * Cross-platform confirm dialog. Uses window.confirm on web, Alert.alert on native.
5
+ * @param message The message to display
6
+ * @param onConfirm Callback if user confirms
7
+ */
8
+ export function confirmAction(message: string, onConfirm: () => void) {
9
+ if (Platform.OS === 'web') {
10
+ if (window.confirm(message)) {
11
+ onConfirm();
12
+ }
13
+ } else {
14
+ Alert.alert(
15
+ 'Confirm',
16
+ message,
17
+ [
18
+ { text: 'Cancel', style: 'cancel' },
19
+ { text: 'OK', onPress: onConfirm },
20
+ ]
21
+ );
22
+ }
23
+ }
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "BottomSheetBackdrop", {
7
- enumerable: true,
8
- get: function () {
9
- return _bottomSheet.BottomSheetBackdrop;
10
- }
11
- });
12
- Object.defineProperty(exports, "BottomSheetModal", {
13
- enumerable: true,
14
- get: function () {
15
- return _bottomSheet.BottomSheetModal;
16
- }
17
- });
18
- Object.defineProperty(exports, "BottomSheetModalProvider", {
19
- enumerable: true,
20
- get: function () {
21
- return _bottomSheet.BottomSheetModalProvider;
22
- }
23
- });
24
- Object.defineProperty(exports, "BottomSheetScrollView", {
25
- enumerable: true,
26
- get: function () {
27
- return _bottomSheet.BottomSheetScrollView;
28
- }
29
- });
30
- Object.defineProperty(exports, "BottomSheetView", {
31
- enumerable: true,
32
- get: function () {
33
- return _bottomSheet.BottomSheetView;
34
- }
35
- });
36
- var _bottomSheet = require("@gorhom/bottom-sheet");
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_bottomSheet","require"],"sourceRoot":"../../../../../src","sources":["ui/components/bottomSheet/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA","ignoreList":[]}
@@ -1,217 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- exports.useAuthFetch = useAuthFetch;
8
- var _react = require("react");
9
- var _OxyContext = require("../context/OxyContext");
10
- /**
11
- * Zero Config Authenticated Fetch Hook
12
- *
13
- * Simple hook that provides fetch-like API with automatic authentication
14
- * Leverages the existing useOxy hook and OxyProvider infrastructure
15
- *
16
- * Usage:
17
- * const authFetch = useAuthFetch();
18
- * const response = await authFetch('/api/protected');
19
- * const data = await authFetch.get('/api/users');
20
- */
21
-
22
- /**
23
- * Hook that provides authenticated fetch functionality
24
- * Uses the existing OxyServices instance from useOxy context
25
- */
26
- function useAuthFetch() {
27
- const {
28
- oxyServices,
29
- isAuthenticated,
30
- user,
31
- login,
32
- logout,
33
- signUp,
34
- activeSessionId,
35
- setApiUrl,
36
- getAppBaseURL
37
- } = (0, _OxyContext.useOxy)();
38
-
39
- // Validate that we have the required dependencies
40
- if (!oxyServices) {
41
- throw new Error('useAuthFetch requires OxyServices to be initialized. Make sure your app is wrapped with OxyProvider.');
42
- }
43
-
44
- // Main fetch function with automatic auth headers
45
- const authFetch = (0, _react.useCallback)(async (input, init) => {
46
- if (!oxyServices) {
47
- throw new Error('OxyServices not initialized. Make sure to wrap your app in OxyProvider.');
48
- }
49
- const url = resolveURL(input, getAppBaseURL());
50
- const options = await addAuthHeaders(init, oxyServices, activeSessionId || undefined, isAuthenticated);
51
- try {
52
- let response = await fetch(url, options);
53
-
54
- // Handle token expiry and automatic refresh
55
- if (response.status === 401 && isAuthenticated) {
56
- // Try to refresh token if we have refresh capability
57
- if (oxyServices.refreshTokens) {
58
- try {
59
- await oxyServices.refreshTokens();
60
- const retryOptions = await addAuthHeaders(init, oxyServices, activeSessionId || undefined, isAuthenticated);
61
- response = await fetch(url, retryOptions);
62
- } catch (refreshError) {
63
- // Refresh failed, throw authentication error
64
- const error = new Error('Authentication expired. Please login again.');
65
- error.status = 401;
66
- error.code = 'AUTH_EXPIRED';
67
- throw error;
68
- }
69
- }
70
- }
71
- return response;
72
- } catch (error) {
73
- // Re-throw with additional context if needed
74
- if (error instanceof Error) {
75
- throw error;
76
- }
77
- throw new Error('Request failed');
78
- }
79
- }, [oxyServices, activeSessionId, isAuthenticated, getAppBaseURL]);
80
-
81
- // JSON convenience methods
82
- const get = (0, _react.useCallback)(async (endpoint, options) => {
83
- const response = await authFetch(endpoint, {
84
- ...options,
85
- method: 'GET'
86
- });
87
- return handleJsonResponse(response);
88
- }, [authFetch]);
89
- const post = (0, _react.useCallback)(async (endpoint, data, options) => {
90
- const response = await authFetch(endpoint, {
91
- ...options,
92
- method: 'POST',
93
- headers: {
94
- 'Content-Type': 'application/json',
95
- ...options?.headers
96
- },
97
- body: data ? JSON.stringify(data) : undefined
98
- });
99
- return handleJsonResponse(response);
100
- }, [authFetch]);
101
- const put = (0, _react.useCallback)(async (endpoint, data, options) => {
102
- const response = await authFetch(endpoint, {
103
- ...options,
104
- method: 'PUT',
105
- headers: {
106
- 'Content-Type': 'application/json',
107
- ...options?.headers
108
- },
109
- body: data ? JSON.stringify(data) : undefined
110
- });
111
- return handleJsonResponse(response);
112
- }, [authFetch]);
113
- const del = (0, _react.useCallback)(async (endpoint, options) => {
114
- const response = await authFetch(endpoint, {
115
- ...options,
116
- method: 'DELETE'
117
- });
118
- return handleJsonResponse(response);
119
- }, [authFetch]);
120
-
121
- // Attach convenience methods and auth state to the main function
122
- const fetchWithMethods = authFetch;
123
- fetchWithMethods.get = get;
124
- fetchWithMethods.post = post;
125
- fetchWithMethods.put = put;
126
- fetchWithMethods.delete = del;
127
- fetchWithMethods.isAuthenticated = isAuthenticated;
128
- fetchWithMethods.user = user;
129
- fetchWithMethods.login = login;
130
- fetchWithMethods.logout = logout;
131
- fetchWithMethods.signUp = signUp;
132
- fetchWithMethods.setApiUrl = setApiUrl;
133
- return fetchWithMethods;
134
- }
135
-
136
- /**
137
- * Helper functions
138
- */
139
-
140
- function resolveURL(input, baseURL) {
141
- if (!baseURL) {
142
- throw new Error('Base URL not configured. Please provide a baseURL in OxyServices configuration.');
143
- }
144
- const url = input.toString();
145
-
146
- // If it's already a full URL (http/https), return as is
147
- if (url.startsWith('http://') || url.startsWith('https://')) {
148
- return url;
149
- }
150
-
151
- // Normalize base URL (remove trailing slash)
152
- const normalizedBaseURL = baseURL.replace(/\/$/, '');
153
-
154
- // If URL starts with /, it's relative to base URL
155
- if (url.startsWith('/')) {
156
- return `${normalizedBaseURL}${url}`;
157
- }
158
-
159
- // Otherwise, append to base URL with /
160
- return `${normalizedBaseURL}/${url}`;
161
- }
162
- async function addAuthHeaders(init, oxyServices, activeSessionId, isAuthenticated) {
163
- const headers = new Headers(init?.headers);
164
-
165
- // Add auth header if user is authenticated
166
- if (isAuthenticated && oxyServices && !headers.has('Authorization')) {
167
- try {
168
- // First try to get regular JWT access token
169
- let accessToken = oxyServices.getAccessToken?.();
170
-
171
- // If no JWT token but we have a secure session, try to get token from session
172
- if (!accessToken && activeSessionId) {
173
- try {
174
- const tokenData = await oxyServices.getTokenBySession(activeSessionId);
175
- accessToken = tokenData.accessToken;
176
- } catch (error) {
177
- // Silent fail - will attempt request without token
178
- }
179
- }
180
- if (accessToken) {
181
- headers.set('Authorization', `Bearer ${accessToken}`);
182
- }
183
- } catch (error) {
184
- // Silent fail - will attempt request without token
185
- }
186
- }
187
- const body = init?.body;
188
- const processedBody = body && typeof body === 'object' && !(body instanceof FormData) && !(body instanceof URLSearchParams) ? JSON.stringify(body) : body;
189
- return {
190
- ...init,
191
- headers,
192
- body: processedBody
193
- };
194
- }
195
- async function handleJsonResponse(response) {
196
- if (!response.ok) {
197
- let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
198
- try {
199
- const errorData = await response.json();
200
- errorMessage = errorData.message || errorData.error || errorMessage;
201
- } catch {
202
- // Ignore JSON parsing errors
203
- }
204
- const error = new Error(errorMessage);
205
- error.status = response.status;
206
- error.response = response;
207
- throw error;
208
- }
209
- try {
210
- return await response.json();
211
- } catch {
212
- // If response isn't JSON, return the response itself
213
- return response;
214
- }
215
- }
216
- var _default = exports.default = useAuthFetch;
217
- //# sourceMappingURL=useAuthFetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_OxyContext","useAuthFetch","oxyServices","isAuthenticated","user","login","logout","signUp","activeSessionId","setApiUrl","getAppBaseURL","useOxy","Error","authFetch","useCallback","input","init","url","resolveURL","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","_default","exports","default"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAuthFetch.ts"],"mappings":";;;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACO,SAASE,YAAYA,CAAA,EAAiB;EAC3C,MAAM;IAAEC,WAAW;IAAEC,eAAe;IAAEC,IAAI;IAAEC,KAAK;IAAEC,MAAM;IAAEC,MAAM;IAAEC,eAAe;IAAEC,SAAS;IAAEC;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;;EAEzH;EACA,IAAI,CAACT,WAAW,EAAE;IAChB,MAAM,IAAIU,KAAK,CAAC,sGAAsG,CAAC;EACzH;;EAEA;EACA,MAAMC,SAAS,GAAG,IAAAC,kBAAW,EAAC,OAAOC,KAAwB,EAAEC,IAAuB,KAAwB;IAC5G,IAAI,CAACd,WAAW,EAAE;MAChB,MAAM,IAAIU,KAAK,CAAC,yEAAyE,CAAC;IAC5F;IAEA,MAAMK,GAAG,GAAGC,UAAU,CAACH,KAAK,EAAEL,aAAa,CAAC,CAAC,CAAC;IAC9C,MAAMS,OAAO,GAAG,MAAMC,cAAc,CAACJ,IAAI,EAAEd,WAAW,EAAEM,eAAe,IAAIa,SAAS,EAAElB,eAAe,CAAC;IAEtG,IAAI;MACF,IAAImB,QAAQ,GAAG,MAAMC,KAAK,CAACN,GAAG,EAAEE,OAAO,CAAC;;MAExC;MACA,IAAIG,QAAQ,CAACE,MAAM,KAAK,GAAG,IAAIrB,eAAe,EAAE;QAC9C;QACA,IAAID,WAAW,CAACuB,aAAa,EAAE;UAC7B,IAAI;YACF,MAAMvB,WAAW,CAACuB,aAA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F,OAAO,MAAMN,QAAQ,CAACyC,IAAI,CAAC,CAAC;EAC9B,CAAC,CAAC,MAAM;IACN;IACA,OAAOzC,QAAQ;EACjB;AACF;AAAC,IAAA2C,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclE,YAAY","ignoreList":[]}
@@ -1,190 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useOxyFollow = exports.useFollow = void 0;
7
- var _reactRedux = require("react-redux");
8
- var _react = require("react");
9
- var _followSlice = require("../store/slices/followSlice");
10
- var _OxyContext = require("../context/OxyContext");
11
- // Generic type for state that includes follow slice
12
-
13
- // Memoized selector to prevent unnecessary re-renders
14
- const createFollowSelector = userId => state => ({
15
- isFollowing: _followSlice.followSelectors.selectIsUserFollowed(state, userId),
16
- isLoading: _followSlice.followSelectors.selectIsUserLoading(state, userId),
17
- error: _followSlice.followSelectors.selectUserError(state, userId)
18
- });
19
-
20
- // Memoized selector for multiple users
21
- const createMultipleFollowSelector = userIds => state => {
22
- const followData = {};
23
- for (const userId of userIds) {
24
- followData[userId] = {
25
- isFollowing: _followSlice.followSelectors.selectIsUserFollowed(state, userId),
26
- isLoading: _followSlice.followSelectors.selectIsUserLoading(state, userId),
27
- error: _followSlice.followSelectors.selectUserError(state, userId)
28
- };
29
- }
30
- const followState = state.follow;
31
- return {
32
- followData,
33
- isAnyLoading: userIds.some(uid => followState.loadingUsers[uid]),
34
- hasAnyError: userIds.some(uid => followState.errors[uid]),
35
- allFollowing: userIds.every(uid => followState.followingUsers[uid]),
36
- allNotFollowing: userIds.every(uid => !followState.followingUsers[uid])
37
- };
38
- };
39
-
40
- /**
41
- * Custom hook for managing follow/unfollow functionality
42
- * Works with any Redux store that includes the Oxy follow reducer
43
- * Optimized to prevent unnecessary re-renders
44
- * Can handle both single user and multiple users
45
- */
46
- const useOxyFollow = userId => {
47
- const dispatch = (0, _reactRedux.useDispatch)();
48
- const {
49
- oxyServices
50
- } = (0, _OxyContext.useOxy)();
51
-
52
- // Memoize user IDs to prevent recreation on every render
53
- const userIds = (0, _react.useMemo)(() => {
54
- return Array.isArray(userId) ? userId : userId ? [userId] : [];
55
- }, [userId]);
56
- const isSingleUser = typeof userId === 'string';
57
-
58
- // Memoize selectors to prevent recreation
59
- const singleUserSelector = (0, _react.useMemo)(() => {
60
- return isSingleUser && userId ? createFollowSelector(userId) : null;
61
- }, [isSingleUser, userId]);
62
- const multipleUserSelector = (0, _react.useMemo)(() => {
63
- return !isSingleUser ? createMultipleFollowSelector(userIds) : null;
64
- }, [isSingleUser, userIds]);
65
-
66
- // Use appropriate selector based on mode
67
- const singleUserData = (0, _reactRedux.useSelector)(singleUserSelector || (() => ({
68
- isFollowing: false,
69
- isLoading: false,
70
- error: null
71
- })));
72
- const multipleUserData = (0, _reactRedux.useSelector)(multipleUserSelector || (() => ({
73
- followData: {},
74
- isAnyLoading: false,
75
- hasAnyError: false,
76
- allFollowing: false,
77
- allNotFollowing: true
78
- })));
79
-
80
- // Memoized callbacks to prevent recreation on every render
81
- const toggleFollow = (0, _react.useCallback)(async () => {
82
- if (!isSingleUser || !userId) throw new Error('toggleFollow is only available for single user mode');
83
- try {
84
- const result = await dispatch((0, _followSlice.toggleFollowUser)({
85
- userId,
86
- oxyServices,
87
- isCurrentlyFollowing: singleUserData.isFollowing
88
- })).unwrap();
89
- return result;
90
- } catch (error) {
91
- throw error;
92
- }
93
- }, [dispatch, userId, oxyServices, singleUserData.isFollowing, isSingleUser]);
94
- const setFollowStatus = (0, _react.useCallback)(following => {
95
- if (!isSingleUser || !userId) throw new Error('setFollowStatus is only available for single user mode');
96
- dispatch((0, _followSlice.setFollowingStatus)({
97
- userId,
98
- isFollowing: following
99
- }));
100
- }, [dispatch, userId, isSingleUser]);
101
- const fetchStatus = (0, _react.useCallback)(async () => {
102
- if (!isSingleUser || !userId) throw new Error('fetchStatus is only available for single user mode');
103
- try {
104
- await dispatch((0, _followSlice.fetchFollowStatus)({
105
- userId,
106
- oxyServices
107
- })).unwrap();
108
- } catch (error) {
109
- console.warn(`Failed to fetch follow status for user ${userId}:`, error);
110
- }
111
- }, [dispatch, userId, oxyServices, isSingleUser]);
112
- const clearError = (0, _react.useCallback)(() => {
113
- if (!isSingleUser || !userId) throw new Error('clearError is only available for single user mode');
114
- dispatch((0, _followSlice.clearFollowError)(userId));
115
- }, [dispatch, userId, isSingleUser]);
116
-
117
- // Multiple user callbacks
118
- const toggleFollowForUser = (0, _react.useCallback)(async targetUserId => {
119
- const currentState = multipleUserData.followData[targetUserId]?.isFollowing ?? false;
120
- try {
121
- const result = await dispatch((0, _followSlice.toggleFollowUser)({
122
- userId: targetUserId,
123
- oxyServices,
124
- isCurrentlyFollowing: currentState
125
- })).unwrap();
126
- return result;
127
- } catch (error) {
128
- throw error;
129
- }
130
- }, [dispatch, oxyServices, multipleUserData.followData]);
131
- const setFollowStatusForUser = (0, _react.useCallback)((targetUserId, following) => {
132
- dispatch((0, _followSlice.setFollowingStatus)({
133
- userId: targetUserId,
134
- isFollowing: following
135
- }));
136
- }, [dispatch]);
137
- const fetchStatusForUser = (0, _react.useCallback)(async targetUserId => {
138
- try {
139
- await dispatch((0, _followSlice.fetchFollowStatus)({
140
- userId: targetUserId,
141
- oxyServices
142
- })).unwrap();
143
- } catch (error) {
144
- console.warn(`Failed to fetch follow status for user ${targetUserId}:`, error);
145
- }
146
- }, [dispatch, oxyServices]);
147
- const fetchAllStatuses = (0, _react.useCallback)(async () => {
148
- const promises = userIds.map(uid => dispatch((0, _followSlice.fetchFollowStatus)({
149
- userId: uid,
150
- oxyServices
151
- })).unwrap().catch(error => {
152
- console.warn(`Failed to fetch follow status for user ${uid}:`, error);
153
- }));
154
- await Promise.all(promises);
155
- }, [dispatch, userIds, oxyServices]);
156
- const clearErrorForUser = (0, _react.useCallback)(targetUserId => {
157
- dispatch((0, _followSlice.clearFollowError)(targetUserId));
158
- }, [dispatch]);
159
-
160
- // Return appropriate interface based on mode
161
- if (isSingleUser && userId) {
162
- return {
163
- isFollowing: singleUserData.isFollowing,
164
- isLoading: singleUserData.isLoading,
165
- error: singleUserData.error,
166
- toggleFollow,
167
- setFollowStatus,
168
- fetchStatus,
169
- clearError
170
- };
171
- }
172
- return {
173
- followData: multipleUserData.followData,
174
- toggleFollowForUser,
175
- setFollowStatusForUser,
176
- fetchStatusForUser,
177
- fetchAllStatuses,
178
- clearErrorForUser,
179
- // Helper methods
180
- isAnyLoading: multipleUserData.isAnyLoading,
181
- hasAnyError: multipleUserData.hasAnyError,
182
- allFollowing: multipleUserData.allFollowing,
183
- allNotFollowing: multipleUserData.allNotFollowing
184
- };
185
- };
186
-
187
- // Backward compatibility alias
188
- exports.useOxyFollow = useOxyFollow;
189
- const useFollow = exports.useFollow = useOxyFollow;
190
- //# sourceMappingURL=useOxyFollow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactRedux","require","_react","_followSlice","_OxyContext","createFollowSelector","userId","state","isFollowing","followSelectors","selectIsUserFollowed","isLoading","selectIsUserLoading","error","selectUserError","createMultipleFollowSelector","userIds","followData","followState","follow","isAnyLoading","some","uid","loadingUsers","hasAnyError","errors","allFollowing","every","followingUsers","allNotFollowing","useOxyFollow","dispatch","useDispatch","oxyServices","useOxy","useMemo","Array","isArray","isSingleUser","singleUserSelector","multipleUserSelector","singleUserData","useSelector","multipleUserData","toggleFollow","useCallback","Error","result","toggleFollowUser","isCurrentlyFollowing","unwrap","setFollowStatus","following","setFollowingStatus","fetchStatus","fetchFollowStatus","console","warn","clearError","clearFollowError","toggleFollowForUser","targetUserId","currentState","setFollowStatusForUser","fetchStatusForUser","fetchAllStatuses","promises","map","catch","Promise","all","clearErrorForUser","exports","useFollow"],"sourceRoot":"../../../../src","sources":["ui/hooks/useOxyFollow.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAQA,IAAAG,WAAA,GAAAH,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