@oxyhq/services 5.7.5 → 5.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/README.md +76 -76
  2. package/lib/commonjs/core/index.js +177 -102
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +69 -28
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/ui/components/Avatar.js +15 -6
  7. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  8. package/lib/commonjs/ui/components/FollowButton.js +100 -12
  9. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  10. package/lib/commonjs/ui/components/GroupedItem.js +58 -13
  11. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  12. package/lib/commonjs/ui/components/GroupedSection.js +7 -1
  13. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  14. package/lib/commonjs/ui/components/Header.js +356 -0
  15. package/lib/commonjs/ui/components/Header.js.map +1 -0
  16. package/lib/commonjs/ui/components/OxyProvider.js +28 -7
  17. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  18. package/lib/commonjs/ui/components/index.js +7 -0
  19. package/lib/commonjs/ui/components/index.js.map +1 -1
  20. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
  21. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/TextField.js +606 -546
  23. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.md +436 -0
  25. package/lib/commonjs/ui/context/OxyContext.js +181 -199
  26. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/index.js +6 -0
  28. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/useFollow.js +59 -2
  30. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
  32. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/OxyRouter.js +11 -1
  34. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
  36. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  38. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
  40. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1160 -406
  42. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
  44. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
  46. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
  48. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
  50. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
  52. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
  54. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
  56. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
  58. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
  60. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
  62. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
  63. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
  64. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  65. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
  66. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  67. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
  68. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  69. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
  70. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  71. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
  72. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
  74. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
  76. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
  78. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
  80. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
  82. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  83. package/lib/commonjs/ui/stores/authStore.js +36 -6
  84. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  85. package/lib/commonjs/ui/stores/followStore.js +106 -1
  86. package/lib/commonjs/ui/stores/followStore.js.map +1 -1
  87. package/lib/commonjs/ui/styles/authStyles.js +337 -0
  88. package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
  89. package/lib/commonjs/ui/styles/index.js +11 -0
  90. package/lib/commonjs/ui/styles/index.js.map +1 -1
  91. package/lib/module/core/index.js +177 -41
  92. package/lib/module/core/index.js.map +1 -1
  93. package/lib/module/index.js +24 -4
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/ui/components/Avatar.js +15 -6
  96. package/lib/module/ui/components/Avatar.js.map +1 -1
  97. package/lib/module/ui/components/FollowButton.js +101 -13
  98. package/lib/module/ui/components/FollowButton.js.map +1 -1
  99. package/lib/module/ui/components/GroupedItem.js +59 -14
  100. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  101. package/lib/module/ui/components/GroupedSection.js +7 -1
  102. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  103. package/lib/module/ui/components/Header.js +351 -0
  104. package/lib/module/ui/components/Header.js.map +1 -0
  105. package/lib/module/ui/components/OxyProvider.js +30 -9
  106. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  107. package/lib/module/ui/components/index.js +1 -0
  108. package/lib/module/ui/components/index.js.map +1 -1
  109. package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
  110. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  111. package/lib/module/ui/components/internal/TextField.js +607 -547
  112. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  113. package/lib/module/ui/components/internal/TextField.md +436 -0
  114. package/lib/module/ui/context/OxyContext.js +180 -198
  115. package/lib/module/ui/context/OxyContext.js.map +1 -1
  116. package/lib/module/ui/hooks/index.js +1 -1
  117. package/lib/module/ui/hooks/index.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.js +57 -1
  119. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  120. package/lib/module/ui/hooks/useSessionSocket.js +5 -2
  121. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  122. package/lib/module/ui/navigation/OxyRouter.js +11 -1
  123. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  124. package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
  125. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  126. package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
  127. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  128. package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
  129. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  130. package/lib/module/ui/screens/AccountSettingsScreen.js +1161 -407
  131. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
  133. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AppInfoScreen.js +248 -465
  135. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  136. package/lib/module/ui/screens/FeedbackScreen.js +3 -3
  137. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  138. package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
  139. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  140. package/lib/module/ui/screens/ProfileScreen.js +214 -37
  141. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  142. package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
  143. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  144. package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
  145. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  146. package/lib/module/ui/screens/SignInScreen.js +32 -305
  147. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SignUpScreen.js +5 -5
  149. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  150. package/lib/module/ui/screens/UserLinksScreen.js +85 -0
  151. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
  152. package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
  153. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  154. package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
  155. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  156. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
  157. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  158. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
  159. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  160. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
  161. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  162. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
  163. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  164. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
  165. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  166. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
  167. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  168. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
  169. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  170. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
  171. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  172. package/lib/module/ui/stores/authStore.js +36 -6
  173. package/lib/module/ui/stores/authStore.js.map +1 -1
  174. package/lib/module/ui/stores/followStore.js +106 -1
  175. package/lib/module/ui/stores/followStore.js.map +1 -1
  176. package/lib/module/ui/styles/authStyles.js +332 -0
  177. package/lib/module/ui/styles/authStyles.js.map +1 -0
  178. package/lib/module/ui/styles/index.js +1 -0
  179. package/lib/module/ui/styles/index.js.map +1 -1
  180. package/lib/typescript/core/index.d.ts +68 -24
  181. package/lib/typescript/core/index.d.ts.map +1 -1
  182. package/lib/typescript/index.d.ts +13 -3
  183. package/lib/typescript/index.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
  185. package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
  186. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
  188. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  189. package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
  190. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
  191. package/lib/typescript/ui/components/Header.d.ts +24 -0
  192. package/lib/typescript/ui/components/Header.d.ts.map +1 -0
  193. package/lib/typescript/ui/components/OxyProvider.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/TextField.d.ts +31 -16
  197. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  198. package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
  199. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  200. package/lib/typescript/ui/hooks/index.d.ts +1 -1
  201. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  202. package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
  203. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  204. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  205. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  206. package/lib/typescript/ui/navigation/types.d.ts +9 -2
  207. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  208. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  209. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  210. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  211. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  212. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
  215. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
  219. package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
  220. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
  221. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
  223. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  224. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  228. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
  230. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  231. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
  232. package/lib/typescript/ui/stores/authStore.d.ts +3 -1
  233. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  234. package/lib/typescript/ui/stores/followStore.d.ts +10 -0
  235. package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
  236. package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
  237. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
  238. package/lib/typescript/ui/styles/index.d.ts +1 -0
  239. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  240. package/package.json +1 -4
  241. package/src/core/index.ts +195 -41
  242. package/src/index.ts +64 -4
  243. package/src/ui/components/Avatar.tsx +11 -5
  244. package/src/ui/components/FollowButton.tsx +95 -11
  245. package/src/ui/components/GroupedItem.tsx +57 -9
  246. package/src/ui/components/GroupedSection.tsx +12 -0
  247. package/src/ui/components/Header.tsx +405 -0
  248. package/src/ui/components/OxyProvider.tsx +37 -15
  249. package/src/ui/components/index.ts +1 -0
  250. package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
  251. package/src/ui/components/internal/TextField.md +436 -0
  252. package/src/ui/components/internal/TextField.tsx +720 -620
  253. package/src/ui/context/OxyContext.tsx +211 -195
  254. package/src/ui/hooks/index.ts +1 -1
  255. package/src/ui/hooks/useFollow.ts +63 -0
  256. package/src/ui/hooks/useSessionSocket.ts +5 -2
  257. package/src/ui/navigation/OxyRouter.tsx +11 -1
  258. package/src/ui/navigation/types.ts +10 -2
  259. package/src/ui/screens/AccountCenterScreen.tsx +5 -5
  260. package/src/ui/screens/AccountManagementDemo.tsx +9 -9
  261. package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
  262. package/src/ui/screens/AccountSettingsScreen.tsx +1173 -403
  263. package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
  264. package/src/ui/screens/AppInfoScreen.tsx +270 -497
  265. package/src/ui/screens/FeedbackScreen.tsx +3 -3
  266. package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
  267. package/src/ui/screens/ProfileScreen.tsx +196 -33
  268. package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
  269. package/src/ui/screens/SessionManagementScreen.tsx +14 -22
  270. package/src/ui/screens/SignInScreen.tsx +27 -294
  271. package/src/ui/screens/SignUpScreen.tsx +5 -5
  272. package/src/ui/screens/UserLinksScreen.tsx +96 -0
  273. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
  274. package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
  275. package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
  276. package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
  277. package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
  278. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
  279. package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
  280. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
  281. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
  282. package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
  283. package/src/ui/stores/authStore.ts +34 -7
  284. package/src/ui/stores/followStore.ts +102 -1
  285. package/src/ui/styles/authStyles.ts +352 -0
  286. package/src/ui/styles/index.ts +1 -0
  287. package/lib/commonjs/core/auth-manager.js +0 -440
  288. package/lib/commonjs/core/auth-manager.js.map +0 -1
  289. package/lib/commonjs/core/use-auth.js +0 -244
  290. package/lib/commonjs/core/use-auth.js.map +0 -1
  291. package/lib/module/core/auth-manager.js +0 -432
  292. package/lib/module/core/auth-manager.js.map +0 -1
  293. package/lib/module/core/use-auth.js +0 -235
  294. package/lib/module/core/use-auth.js.map +0 -1
  295. package/lib/typescript/core/auth-manager.d.ts +0 -136
  296. package/lib/typescript/core/auth-manager.d.ts.map +0 -1
  297. package/lib/typescript/core/use-auth.d.ts +0 -79
  298. package/lib/typescript/core/use-auth.d.ts.map +0 -1
  299. package/src/__tests__/middleware.test.ts +0 -105
  300. package/src/__tests__/setup.ts +0 -10
  301. package/src/__tests__/zero-config-auth.test.ts +0 -607
  302. package/src/core/auth-manager.ts +0 -500
  303. package/src/core/use-auth.tsx +0 -245
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _OxyContext = require("../../context/OxyContext");
10
+ var _components = require("../../components");
10
11
  var _jsxRuntime = require("react/jsx-runtime");
11
12
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
13
  const KarmaRulesScreen = ({
@@ -32,11 +33,12 @@ const KarmaRulesScreen = ({
32
33
  style: [styles.container, {
33
34
  backgroundColor
34
35
  }],
35
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
36
- style: [styles.title, {
37
- color: textColor
38
- }],
39
- children: "Karma Rules"
36
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
37
+ title: "Karma Rules",
38
+ subtitle: "How to earn karma points",
39
+ theme: theme,
40
+ onBack: goBack,
41
+ elevation: "subtle"
40
42
  }), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
41
43
  size: "large",
42
44
  color: primaryColor,
@@ -71,14 +73,9 @@ const styles = _reactNative.StyleSheet.create({
71
73
  container: {
72
74
  flex: 1
73
75
  },
74
- title: {
75
- fontSize: 24,
76
- fontWeight: 'bold',
77
- margin: 24,
78
- textAlign: 'center'
79
- },
80
76
  listContainer: {
81
- paddingBottom: 40
77
+ paddingBottom: 40,
78
+ paddingTop: 20
82
79
  },
83
80
  ruleRow: {
84
81
  paddingVertical: 14,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_OxyContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","KarmaRulesScreen","goBack","theme","oxyServices","useOxy","rules","setRules","useState","isLoading","setIsLoading","error","setError","isDarkTheme","backgroundColor","textColor","primaryColor","useEffect","getKarmaRules","then","data","Array","isArray","catch","err","message","finally","jsxs","View","style","styles","container","children","jsx","Text","title","color","ActivityIndicator","size","marginTop","ScrollView","contentContainerStyle","listContainer","length","placeholder","map","rule","idx","ruleRow","ruleDesc","description","id","StyleSheet","create","flex","fontSize","fontWeight","margin","textAlign","paddingBottom","paddingVertical","paddingHorizontal","borderBottomWidth","borderColor","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaRulesScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAAkD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IA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zE,OAAA,GAEYS,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_OxyContext","_components","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","KarmaRulesScreen","goBack","theme","oxyServices","useOxy","rules","setRules","useState","isLoading","setIsLoading","error","setError","isDarkTheme","backgroundColor","textColor","primaryColor","useEffect","getKarmaRules","then","data","Array","isArray","catch","err","message","finally","jsxs","View","style","styles","container","children","jsx","Header","title","subtitle","onBack","elevation","ActivityIndicator","size","color","marginTop","Text","ScrollView","contentContainerStyle","listContainer","length","placeholder","map","rule","idx","ruleRow","ruleDesc","description","id","StyleSheet","create","flex","paddingBottom","paddingTop","paddingVertical","paddingHorizontal","borderBottomWidth","borderColor","fontSize","textAlign","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaRulesScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,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AE,QAAQ;IAAExB,SAAS,EAAE;EAAG;AAC9D,CAAC,CAAC;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAA5E,OAAA,GAEYS,gBAAgB","ignoreList":[]}
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useAuthStore = void 0;
7
7
  var _zustand = require("zustand");
8
- const useAuthStore = exports.useAuthStore = (0, _zustand.create)(set => ({
8
+ const useAuthStore = exports.useAuthStore = (0, _zustand.create)((set, get) => ({
9
9
  user: null,
10
10
  isAuthenticated: false,
11
11
  isLoading: false,
12
12
  error: null,
13
+ lastUserFetch: null,
13
14
  loginStart: () => set({
14
15
  isLoading: true,
15
16
  error: null
@@ -17,7 +18,8 @@ const useAuthStore = exports.useAuthStore = (0, _zustand.create)(set => ({
17
18
  loginSuccess: user => set({
18
19
  isLoading: false,
19
20
  isAuthenticated: true,
20
- user
21
+ user,
22
+ lastUserFetch: Date.now()
21
23
  }),
22
24
  loginFailure: error => set({
23
25
  isLoading: false,
@@ -25,21 +27,45 @@ const useAuthStore = exports.useAuthStore = (0, _zustand.create)(set => ({
25
27
  }),
26
28
  logout: () => set({
27
29
  user: null,
28
- isAuthenticated: false
30
+ isAuthenticated: false,
31
+ lastUserFetch: null
29
32
  }),
30
- fetchUser: async oxyServices => {
33
+ setUser: user => set({
34
+ user,
35
+ lastUserFetch: Date.now()
36
+ }),
37
+ fetchUser: async (oxyServices, forceRefresh = false) => {
38
+ const state = get();
39
+ const now = Date.now();
40
+ const cacheAge = state.lastUserFetch ? now - state.lastUserFetch : Infinity;
41
+ const cacheValid = cacheAge < 5 * 60 * 1000; // 5 minutes cache
42
+
43
+ // Use cached data if available and not forcing refresh
44
+ if (!forceRefresh && state.user && cacheValid) {
45
+ console.log('AuthStore: Using cached user data (age:', cacheAge, 'ms)');
46
+ return;
47
+ }
31
48
  set({
32
49
  isLoading: true,
33
50
  error: null
34
51
  });
35
52
  try {
53
+ console.log('AuthStore: Fetching user data...');
36
54
  const user = await oxyServices.getCurrentUser();
55
+ console.log('AuthStore: Received user data:', {
56
+ hasUser: !!user,
57
+ userLinksMetadata: user?.linksMetadata,
58
+ userLinks: user?.links,
59
+ userWebsite: user?.website
60
+ });
37
61
  set({
38
62
  user,
39
63
  isLoading: false,
40
- isAuthenticated: true
64
+ isAuthenticated: true,
65
+ lastUserFetch: now
41
66
  });
42
67
  } catch (error) {
68
+ console.error('AuthStore: Error fetching user:', error);
43
69
  set({
44
70
  error: error.message || 'Failed to fetch user',
45
71
  isLoading: false
@@ -52,10 +78,14 @@ const useAuthStore = exports.useAuthStore = (0, _zustand.create)(set => ({
52
78
  error: null
53
79
  });
54
80
  try {
81
+ console.log('AuthStore: Updating user with:', updates);
55
82
  await oxyServices.updateProfile(updates);
83
+ console.log('AuthStore: Profile updated successfully');
56
84
  // Immediately fetch the latest user data after update
57
- await useAuthStore.getState().fetchUser(oxyServices);
85
+ await useAuthStore.getState().fetchUser(oxyServices, true); // Force refresh
86
+ console.log('AuthStore: User data refreshed');
58
87
  } catch (error) {
88
+ console.error('AuthStore: Error updating user:', error);
59
89
  set({
60
90
  error: error.message || 'Failed to update user',
61
91
  isLoading: false
@@ -1 +1 @@
1
- {"version":3,"names":["_zustand","require","useAuthStore","exports","create","set","user","isAuthenticated","isLoading","error","loginStart","loginSuccess","loginFailure","logout","fetchUser","oxyServices","getCurrentUser","message","updateUser","updates","updateProfile","getState"],"sourceRoot":"../../../../src","sources":["ui/stores/authStore.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAgBO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,eAAM,EAAaC,GAAwC,KAAM;EAC3FC,IAAI,EAAE,IAAI;EACVC,eAAe,EAAE,KAAK;EACtBC,SAAS,EAAE,KAAK;EAChBC,KAAK,EAAE,IAAI;EACXC,UAAU,EAAEA,CAAA,KAAML,GAAG,CAAC;IAAEG,SAAS,EAAE,IAAI;IAAEC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AC,CAAC;IAC5E;EACF;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_zustand","require","useAuthStore","exports","create","set","get","user","isAuthenticated","isLoading","error","lastUserFetch","loginStart","loginSuccess","Date","now","loginFailure","logout","setUser","fetchUser","oxyServices","forceRefresh","state","cacheAge","Infinity","cacheValid","console","log","getCurrentUser","hasUser","userLinksMetadata","linksMetadata","userLinks","links","userWebsite","website","message","updateUser","updates","updateProfile","getState"],"sourceRoot":"../../../../src","sources":["ui/stores/authStore.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAkBO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,eAAM,EAAY,CAACC,GAAwC,EAAEC,GAAoB,MAAM;EACjHC,IAAI,EAAE,IAAI;EACVC,eAAe,EAAE,KAAK;EACtBC,SAAS,EAAE,KAAK;EAChBC,KAAK,EAAE,IAAI;EACXC,aAAa,EAAE,IAAI;EACnBC,UAAU,EAAEA,CAAA,KAAMP,GAAG,CAAC;IAAEI,SAAS,EAAE,IAAI;IAAEC,KAAK,EAAE;EAAK,CAAC,CAAC;EACvDG,YAAY,EAAGN,IAAU,IAAKF,GAAG,CAAC;IAAEI,SAAS,EAAE,KAAK;IAAED,eAAe,EAAE,IAAI;IAAED,IAAI;IAAEI,aAAa,EAAEG,IAAI,CAACC,GAAG,CAAC;EAAE,CAAC,CAAC;EAC/GC,YAAY,EAAGN,KAAa,IAAKL,GAAG,CAAC;IAAEI,SAAS,EAAE,KAAK;IAAEC;EAAM,CAAC,CAAC;EACjEO,MAAM,EAAEA,CAAA,KAAMZ,GAAG,CAAC;IAAEE,IAAI,EAAE,IAAI;IAAEC,eAAe,EAAE,KAAK;IAAEG,aAAa,EAAE;EAAK,CAAC,CAAC;EAC9EO,OAAO,EAAGX,IAAU,IAAKF,GAAG,CAAC;IAAEE,IAAI;IAAEI,aAAa,EAAEG,IAAI,CAACC,GAAG,CAAC;EAAE,C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AC0B,OAAO,IAAI,sBAAsB;QAAE3B,SAAS,EAAE;MAAM,CAAC,CAAC;IAC3E;EACF,CAAC;EACD4B,UAAU,EAAE,MAAAA,CAAOC,OAAO,EAAElB,WAAW,KAAK;IAC1Cf,GAAG,CAAC;MAAEI,SAAS,EAAE,IAAI;MAAEC,KAAK,EAAE;IAAK,CAAC,CAAC;IACrC,IAAI;MACFgB,OAAO,CAACC,GAAG,CAAC,gCAAgC,EAAEW,OAAO,CAAC;MACtD,MAAMlB,WAAW,CAACmB,aAAa,CAACD,OAAO,CAAC;MACxCZ,OAAO,CAACC,GAAG,CAAC,yCAAyC,CAAC;MACtD;MACA,MAAMzB,YAAY,CAACsC,QAAQ,CAAC,CAAC,CAACrB,SAAS,CAACC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;MAC5DM,OAAO,CAACC,GAAG,CAAC,gCAAgC,CAAC;IAC/C,CAAC,CAAC,OAAOjB,KAAU,EAAE;MACnBgB,OAAO,CAAChB,KAAK,CAAC,iCAAiC,EAAEA,KAAK,CAAC;MACvDL,GAAG,CAAC;QAAEK,KAAK,EAAEA,KAAK,CAAC0B,OAAO,IAAI,uBAAuB;QAAE3B,SAAS,EAAE;MAAM,CAAC,CAAC;IAC5E;EACF;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -10,6 +10,9 @@ const useFollowStore = exports.useFollowStore = (0, _zustand.create)((set, get)
10
10
  loadingUsers: {},
11
11
  fetchingUsers: {},
12
12
  errors: {},
13
+ followerCounts: {},
14
+ followingCounts: {},
15
+ loadingCounts: {},
13
16
  setFollowingStatus: (userId, isFollowing) => set(state => ({
14
17
  followingUsers: {
15
18
  ...state.followingUsers,
@@ -30,7 +33,10 @@ const useFollowStore = exports.useFollowStore = (0, _zustand.create)((set, get)
30
33
  followingUsers: {},
31
34
  loadingUsers: {},
32
35
  fetchingUsers: {},
33
- errors: {}
36
+ errors: {},
37
+ followerCounts: {},
38
+ followingCounts: {},
39
+ loadingCounts: {}
34
40
  }),
35
41
  fetchFollowStatus: async (userId, oxyServices) => {
36
42
  set(state => ({
@@ -93,6 +99,8 @@ const useFollowStore = exports.useFollowStore = (0, _zustand.create)((set, get)
93
99
  response = await oxyServices.followUser(userId);
94
100
  newFollowState = true;
95
101
  }
102
+
103
+ // Update follow status
96
104
  set(state => ({
97
105
  followingUsers: {
98
106
  ...state.followingUsers,
@@ -107,6 +115,37 @@ const useFollowStore = exports.useFollowStore = (0, _zustand.create)((set, get)
107
115
  [userId]: null
108
116
  }
109
117
  }));
118
+
119
+ // Update counts if the response includes them
120
+ // The API returns counts for both users:
121
+ // - followers: target user's follower count (the user being followed)
122
+ // - following: current user's following count (the user doing the following)
123
+ if (response && response.counts) {
124
+ const {
125
+ counts
126
+ } = response;
127
+
128
+ // Get current user ID from oxyServices
129
+ const currentUserId = oxyServices.getCurrentUserId();
130
+ set(state => {
131
+ const updates = {};
132
+
133
+ // Update target user's follower count (the user being followed)
134
+ updates.followerCounts = {
135
+ ...state.followerCounts,
136
+ [userId]: counts.followers
137
+ };
138
+
139
+ // Update current user's following count (the user doing the following)
140
+ if (currentUserId) {
141
+ updates.followingCounts = {
142
+ ...state.followingCounts,
143
+ [currentUserId]: counts.following
144
+ };
145
+ }
146
+ return updates;
147
+ });
148
+ }
110
149
  } catch (error) {
111
150
  set(state => ({
112
151
  loadingUsers: {
@@ -119,6 +158,72 @@ const useFollowStore = exports.useFollowStore = (0, _zustand.create)((set, get)
119
158
  }
120
159
  }));
121
160
  }
161
+ },
162
+ setFollowerCount: (userId, count) => set(state => ({
163
+ followerCounts: {
164
+ ...state.followerCounts,
165
+ [userId]: count
166
+ }
167
+ })),
168
+ setFollowingCount: (userId, count) => set(state => ({
169
+ followingCounts: {
170
+ ...state.followingCounts,
171
+ [userId]: count
172
+ }
173
+ })),
174
+ updateCountsFromFollowAction: (targetUserId, action, counts, currentUserId) => {
175
+ set(state => {
176
+ const updates = {};
177
+
178
+ // Update target user's follower count (the user being followed)
179
+ updates.followerCounts = {
180
+ ...state.followerCounts,
181
+ [targetUserId]: counts.followers
182
+ };
183
+
184
+ // Update current user's following count (the user doing the following)
185
+ if (currentUserId) {
186
+ updates.followingCounts = {
187
+ ...state.followingCounts,
188
+ [currentUserId]: counts.following
189
+ };
190
+ }
191
+ return updates;
192
+ });
193
+ },
194
+ fetchUserCounts: async (userId, oxyServices) => {
195
+ set(state => ({
196
+ loadingCounts: {
197
+ ...state.loadingCounts,
198
+ [userId]: true
199
+ }
200
+ }));
201
+ try {
202
+ const user = await oxyServices.getUserById(userId);
203
+ if (user && user._count) {
204
+ set(state => ({
205
+ followerCounts: {
206
+ ...state.followerCounts,
207
+ [userId]: user._count.followers || 0
208
+ },
209
+ followingCounts: {
210
+ ...state.followingCounts,
211
+ [userId]: user._count.following || 0
212
+ },
213
+ loadingCounts: {
214
+ ...state.loadingCounts,
215
+ [userId]: false
216
+ }
217
+ }));
218
+ }
219
+ } catch (error) {
220
+ set(state => ({
221
+ loadingCounts: {
222
+ ...state.loadingCounts,
223
+ [userId]: false
224
+ }
225
+ }));
226
+ }
122
227
  }
123
228
  }));
124
229
  //# sourceMappingURL=followStore.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_zustand","require","useFollowStore","exports","create","set","get","followingUsers","loadingUsers","fetchingUsers","errors","setFollowingStatus","userId","isFollowing","state","clearFollowError","resetFollowState","fetchFollowStatus","oxyServices","response","getFollowStatus","error","message","toggleFollowUser","isCurrentlyFollowing","newFollowState","unfollowUser","followUser"],"sourceRoot":"../../../../src","sources":["ui/stores/followStore.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAeO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,eAAM,EAAc,CAACC,GAAQ,EAAEC,GAAQ,MAAM;EACzEC,cAAc,EAAE,CAAC,CAAC;EAClBC,YAAY,EAAE,CAAC,CAAC;EAChBC,aAAa,EAAE,CAAC,CAAC;EACjBC,MAAM,EAAE,CAAC,CAA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I,KAAK,CAACJ,MAAM;UAAE,CAACE,MAAM,GAAG;QAAK;MAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,OAAOS,KAAU,EAAE;MACnBhB,GAAG,CAAES,KAAkB,KAAM;QAC3BN,YAAY,EAAE;UAAE,GAAGM,KAAK,CAACN,YAAY;UAAE,CAACI,MAAM,GAAG;QAAM,CAAC;QACxDF,MAAM,EAAE;UAAE,GAAGI,KAAK,CAACJ,MAAM;UAAE,CAACE,MAAM,GAAGS,KAAK,EAAEC,OAAO,IAAI;QAAiC;MAC1F,CAAC,CAAC,CAAC;IACL;EACF;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_zustand","require","useFollowStore","exports","create","set","get","followingUsers","loadingUsers","fetchingUsers","errors","followerCounts","followingCounts","loadingCounts","setFollowingStatus","userId","isFollowing","state","clearFollowError","resetFollowState","fetchFollowStatus","oxyServices","response","getFollowStatus","error","message","toggleFollowUser","isCurrentlyFollowing","newFollowState","unfollowUser","followUser","counts","currentUserId","getCurrentUserId","updates","followers","following","setFollowerCount","count","setFollowingCount","updateCountsFromFollowAction","targetUserId","action","fetchUserCounts","user","getUserById","_count"],"sourceRoot":"../../../../src","sources":["ui/stores/followStore.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAyBO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,eAAM,EAAc,CAACC,GAAQ,EAAEC,GAAQ,MAAM;EACzEC,cAAc,EAAE,CAAC,CAAC;EAClBC,YAAY,EAAE,CAAC,CAAC;EAChBC,aAAa,EAAE,CAAC,CAAC;EACjBC,MAAM,EAAE,CAAC,CAAC;EACVC,cAAc,EAAE,CAAC,CAAC;EAClBC,eAAe,EAAE,CAAC,CAAC;EACnBC,aAAa,EAAE,CAAC,CAAC;EACjBC,kBAAkB,EAAEA,CAACC,MAAc,EAAEC,WAAoB,KAAKX,GAAG,CAAEY,KAAkB,KAAM;IACzF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C,CAAC;UACDvB,aAAa,EAAE;YAAE,GAAGI,KAAK,CAACJ,aAAa;YAAE,CAACE,MAAM,GAAG;UAAM;QAC3D,CAAC,CAAC,CAAC;MACL;IACF,CAAC,CAAC,OAAOS,KAAU,EAAE;MACnBnB,GAAG,CAAEY,KAAkB,KAAM;QAC3BJ,aAAa,EAAE;UAAE,GAAGI,KAAK,CAACJ,aAAa;UAAE,CAACE,MAAM,GAAG;QAAM;MAC3D,CAAC,CAAC,CAAC;IACL;EACF;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,337 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createAuthStyles = void 0;
7
+ var _reactNative = require("react-native");
8
+ const createAuthStyles = (colors, theme) => _reactNative.StyleSheet.create({
9
+ // Container styles
10
+ container: {
11
+ flex: 1
12
+ },
13
+ scrollContent: {
14
+ flexGrow: 1,
15
+ paddingHorizontal: 24,
16
+ paddingTop: 4,
17
+ paddingBottom: 20
18
+ },
19
+ stepContainer: {
20
+ flex: 1,
21
+ justifyContent: 'flex-start',
22
+ alignItems: 'flex-start'
23
+ },
24
+ // Header styles
25
+ modernHeader: {
26
+ alignItems: 'flex-start',
27
+ width: '100%',
28
+ marginBottom: 24
29
+ },
30
+ modernTitle: {
31
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
32
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
33
+ fontSize: 62,
34
+ lineHeight: 74.4,
35
+ // 62 * 1.2
36
+ marginBottom: 18,
37
+ textAlign: 'left',
38
+ letterSpacing: -1
39
+ },
40
+ modernSubtitle: {
41
+ fontSize: 18,
42
+ lineHeight: 24,
43
+ textAlign: 'left',
44
+ opacity: 0.8
45
+ },
46
+ welcomeTitle: {
47
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
48
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
49
+ fontSize: 42,
50
+ lineHeight: 50.4,
51
+ // 42 * 1.2
52
+ marginBottom: 12,
53
+ textAlign: 'left',
54
+ letterSpacing: -1
55
+ },
56
+ stepTitle: {
57
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
58
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
59
+ fontSize: 42,
60
+ lineHeight: 50.4,
61
+ // 42 * 1.2
62
+ marginBottom: 12,
63
+ textAlign: 'left',
64
+ letterSpacing: -1
65
+ },
66
+ // Info and error cards
67
+ modernInfoCard: {
68
+ flexDirection: 'row',
69
+ alignItems: 'center',
70
+ padding: 16,
71
+ borderRadius: 16,
72
+ marginBottom: 24,
73
+ gap: 12,
74
+ width: '100%'
75
+ },
76
+ modernInfoText: {
77
+ fontSize: 14,
78
+ flex: 1
79
+ },
80
+ modernErrorCard: {
81
+ flexDirection: 'row',
82
+ alignItems: 'center',
83
+ padding: 16,
84
+ borderRadius: 16,
85
+ marginBottom: 24,
86
+ gap: 12,
87
+ width: '100%'
88
+ },
89
+ errorText: {
90
+ fontSize: 14,
91
+ fontWeight: '500',
92
+ flex: 1
93
+ },
94
+ // Input styles
95
+ modernInputContainer: {
96
+ width: '100%',
97
+ marginBottom: 24
98
+ },
99
+ inputWrapper: {
100
+ flexDirection: 'row',
101
+ alignItems: 'center',
102
+ height: 56,
103
+ borderRadius: 16,
104
+ paddingHorizontal: 20,
105
+ borderWidth: 2,
106
+ backgroundColor: colors.inputBackground
107
+ },
108
+ premiumInputWrapper: {
109
+ flexDirection: 'row',
110
+ alignItems: 'center',
111
+ height: 56,
112
+ borderRadius: 16,
113
+ paddingHorizontal: 20,
114
+ borderWidth: 2,
115
+ backgroundColor: colors.inputBackground
116
+ },
117
+ inputIcon: {
118
+ marginRight: 12
119
+ },
120
+ inputContent: {
121
+ flex: 1
122
+ },
123
+ modernInput: {
124
+ flex: 1,
125
+ fontSize: 16,
126
+ height: '100%'
127
+ },
128
+ passwordToggle: {
129
+ padding: 4
130
+ },
131
+ // Validation styles
132
+ validationIndicator: {
133
+ marginLeft: 8
134
+ },
135
+ validationSuccessCard: {
136
+ flexDirection: 'row',
137
+ alignItems: 'center',
138
+ padding: 12,
139
+ borderRadius: 12,
140
+ marginTop: 8,
141
+ gap: 8
142
+ },
143
+ validationErrorCard: {
144
+ flexDirection: 'row',
145
+ alignItems: 'center',
146
+ padding: 12,
147
+ borderRadius: 12,
148
+ marginTop: 8,
149
+ gap: 8
150
+ },
151
+ validationCard: {
152
+ flexDirection: 'row',
153
+ alignItems: 'center',
154
+ padding: 12,
155
+ borderRadius: 12,
156
+ marginTop: 8,
157
+ gap: 8
158
+ },
159
+ validationText: {
160
+ fontSize: 12,
161
+ fontWeight: '500'
162
+ },
163
+ belowInputMessage: {
164
+ flexDirection: 'row',
165
+ alignItems: 'center',
166
+ marginTop: 4,
167
+ marginBottom: 0,
168
+ gap: 6
169
+ },
170
+ belowInputText: {
171
+ fontSize: 13,
172
+ fontWeight: '500'
173
+ },
174
+ // Button styles
175
+ modernButton: {
176
+ flexDirection: 'row',
177
+ alignItems: 'center',
178
+ justifyContent: 'center',
179
+ paddingVertical: 18,
180
+ paddingHorizontal: 32,
181
+ borderRadius: 16,
182
+ marginVertical: 8,
183
+ shadowOffset: {
184
+ width: 0,
185
+ height: 4
186
+ },
187
+ shadowOpacity: 0.3,
188
+ shadowRadius: 8,
189
+ elevation: 6,
190
+ gap: 8,
191
+ width: '100%'
192
+ },
193
+ modernButtonText: {
194
+ color: '#FFFFFF',
195
+ fontSize: 16,
196
+ fontWeight: '600',
197
+ letterSpacing: 0.5
198
+ },
199
+ buttonIcon: {
200
+ marginLeft: 4
201
+ },
202
+ // Label and link styles
203
+ modernLabel: {
204
+ fontSize: 12,
205
+ fontWeight: '500',
206
+ marginBottom: 2
207
+ },
208
+ modernLinkText: {
209
+ fontSize: 14,
210
+ lineHeight: 20,
211
+ fontWeight: '600',
212
+ textDecorationLine: 'underline'
213
+ },
214
+ footerTextContainer: {
215
+ flexDirection: 'row',
216
+ justifyContent: 'center',
217
+ marginTop: 16
218
+ },
219
+ footerText: {
220
+ fontSize: 15
221
+ },
222
+ // User profile styles
223
+ modernUserProfileContainer: {
224
+ alignItems: 'flex-start',
225
+ paddingVertical: 24
226
+ },
227
+ avatarContainer: {
228
+ position: 'relative',
229
+ marginBottom: 20
230
+ },
231
+ modernUserAvatar: {
232
+ borderWidth: 4,
233
+ borderColor: 'rgba(209, 105, 229, 0.2)'
234
+ },
235
+ statusIndicator: {
236
+ position: 'absolute',
237
+ bottom: 4,
238
+ right: 4,
239
+ width: 20,
240
+ height: 20,
241
+ borderRadius: 10,
242
+ borderWidth: 3,
243
+ borderColor: '#FFFFFF'
244
+ },
245
+ modernUserDisplayName: {
246
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
247
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
248
+ fontSize: 42,
249
+ marginBottom: 4,
250
+ textAlign: 'center',
251
+ letterSpacing: -0.5
252
+ },
253
+ modernUsernameSubtext: {
254
+ fontSize: 20,
255
+ textAlign: 'left',
256
+ marginBottom: 16,
257
+ opacity: 0.7
258
+ },
259
+ welcomeBackBadge: {
260
+ flexDirection: 'row',
261
+ alignItems: 'center',
262
+ paddingHorizontal: 12,
263
+ paddingVertical: 6,
264
+ borderRadius: 20,
265
+ gap: 6
266
+ },
267
+ welcomeBackText: {
268
+ fontSize: 12,
269
+ fontWeight: '600',
270
+ textTransform: 'uppercase',
271
+ letterSpacing: 0.5
272
+ },
273
+ // Navigation styles
274
+ modernNavigationButtons: {
275
+ flexDirection: 'row',
276
+ justifyContent: 'center',
277
+ marginTop: 16,
278
+ marginBottom: 8,
279
+ width: '100%',
280
+ gap: 8
281
+ },
282
+ modernBackButton: {
283
+ flexDirection: 'row',
284
+ alignItems: 'center',
285
+ paddingVertical: 12,
286
+ paddingHorizontal: 20,
287
+ borderRadius: 12,
288
+ borderWidth: 1,
289
+ gap: 8
290
+ },
291
+ modernBackButtonText: {
292
+ fontSize: 16,
293
+ fontWeight: '500'
294
+ },
295
+ // Security notice
296
+ securityNotice: {
297
+ flexDirection: 'row',
298
+ alignItems: 'center',
299
+ justifyContent: 'center',
300
+ marginTop: 20,
301
+ gap: 6
302
+ },
303
+ securityText: {
304
+ fontSize: 12,
305
+ fontWeight: '500'
306
+ },
307
+ // Welcome image container
308
+ welcomeImageContainer: {
309
+ alignItems: 'center',
310
+ justifyContent: 'center',
311
+ marginVertical: 20
312
+ },
313
+ welcomeText: {
314
+ fontSize: 18,
315
+ lineHeight: 24,
316
+ textAlign: 'left',
317
+ opacity: 0.8,
318
+ marginBottom: 24
319
+ },
320
+ // Success styles
321
+ successCard: {
322
+ flexDirection: 'row',
323
+ alignItems: 'center',
324
+ padding: 16,
325
+ borderRadius: 16,
326
+ marginBottom: 24,
327
+ gap: 12,
328
+ width: '100%'
329
+ },
330
+ successText: {
331
+ fontSize: 14,
332
+ fontWeight: '500',
333
+ flex: 1
334
+ }
335
+ });
336
+ exports.createAuthStyles = createAuthStyles;
337
+ //# sourceMappingURL=authStyles.js.map