@oxyhq/services 5.11.9 → 5.11.11

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 (305) hide show
  1. package/lib/commonjs/ui/components/AnimationExample.js +213 -0
  2. package/lib/commonjs/ui/components/AnimationExample.js.map +1 -0
  3. package/lib/commonjs/ui/components/FollowButton.js +58 -47
  4. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  5. package/lib/commonjs/ui/components/GroupedItem.js +2 -1
  6. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedSection.js +3 -0
  8. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  9. package/lib/commonjs/ui/components/Header.js +26 -12
  10. package/lib/commonjs/ui/components/Header.js.map +1 -1
  11. package/lib/commonjs/ui/components/OxyProvider.js +69 -33
  12. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  13. package/lib/commonjs/ui/components/ProfileCard.js +5 -1
  14. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  15. package/lib/commonjs/ui/components/StepBasedScreen.README.md +337 -0
  16. package/lib/commonjs/ui/components/StepBasedScreen.js +361 -0
  17. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -0
  18. package/lib/commonjs/ui/components/icon/OxyIcon.js +3 -3
  19. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +0 -7
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/PinInput.js +1 -1
  23. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.js +8 -4
  25. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  26. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +161 -0
  27. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  28. package/lib/commonjs/ui/context/OxyContext.js +103 -44
  29. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  30. package/lib/commonjs/ui/hooks/useFollow.types.js +2 -0
  31. package/lib/commonjs/ui/hooks/useFollow.types.js.map +1 -0
  32. package/lib/commonjs/ui/navigation/OxyRouter.js +10 -0
  33. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js +26 -14
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +3 -3
  37. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +64 -15
  39. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +4 -4
  41. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/FeedbackScreen.js +72 -75
  43. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/FileManagementScreen.js +286 -126
  45. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +322 -0
  47. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -0
  48. package/lib/commonjs/ui/screens/ProfileScreen.js +56 -56
  49. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +87 -219
  51. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/SessionManagementScreen.js +176 -174
  53. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/SignInScreen.js +138 -244
  55. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  56. package/lib/commonjs/ui/screens/SignUpScreen.js +143 -744
  57. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +386 -0
  59. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  60. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +25 -15
  61. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  62. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +16 -9
  63. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  64. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
  65. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +110 -0
  67. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -0
  68. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +138 -0
  69. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
  70. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +141 -0
  71. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
  72. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +165 -0
  73. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -0
  74. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +150 -0
  75. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -0
  76. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +171 -0
  77. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
  78. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +163 -0
  79. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
  80. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +170 -0
  81. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
  82. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +72 -0
  83. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
  84. package/lib/commonjs/ui/styles/authStyles.js +1 -1
  85. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  86. package/lib/module/ui/components/AnimationExample.js +209 -0
  87. package/lib/module/ui/components/AnimationExample.js.map +1 -0
  88. package/lib/module/ui/components/FollowButton.js +58 -47
  89. package/lib/module/ui/components/FollowButton.js.map +1 -1
  90. package/lib/module/ui/components/GroupedItem.js +2 -1
  91. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  92. package/lib/module/ui/components/GroupedSection.js +3 -0
  93. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  94. package/lib/module/ui/components/Header.js +26 -12
  95. package/lib/module/ui/components/Header.js.map +1 -1
  96. package/lib/module/ui/components/OxyProvider.js +70 -34
  97. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  98. package/lib/module/ui/components/ProfileCard.js +5 -1
  99. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  100. package/lib/module/ui/components/Section.js.map +1 -1
  101. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  102. package/lib/module/ui/components/StepBasedScreen.README.md +337 -0
  103. package/lib/module/ui/components/StepBasedScreen.js +356 -0
  104. package/lib/module/ui/components/StepBasedScreen.js.map +1 -0
  105. package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -1
  106. package/lib/module/ui/components/icon/OxyIcon.js +3 -3
  107. package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
  108. package/lib/module/ui/components/index.js +0 -1
  109. package/lib/module/ui/components/index.js.map +1 -1
  110. package/lib/module/ui/components/internal/PinInput.js +1 -1
  111. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  112. package/lib/module/ui/components/internal/TextField.js +8 -4
  113. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  114. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +156 -0
  115. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  116. package/lib/module/ui/context/OxyContext.js +103 -45
  117. package/lib/module/ui/context/OxyContext.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.types.js +2 -0
  119. package/lib/module/ui/hooks/useFollow.types.js.map +1 -0
  120. package/lib/module/ui/navigation/OxyRouter.js +10 -0
  121. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  122. package/lib/module/ui/screens/AccountCenterScreen.js +12 -1
  123. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  124. package/lib/module/ui/screens/AccountOverviewScreen.js +3 -3
  125. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  126. package/lib/module/ui/screens/AccountSettingsScreen.js +64 -15
  127. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountSwitcherScreen.js +4 -4
  129. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  130. package/lib/module/ui/screens/FeedbackScreen.js +72 -75
  131. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  132. package/lib/module/ui/screens/FileManagementScreen.js +285 -125
  133. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  134. package/lib/module/ui/screens/LanguageSelectorScreen.js +319 -0
  135. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -0
  136. package/lib/module/ui/screens/ProfileScreen.js +56 -56
  137. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  138. package/lib/module/ui/screens/RecoverAccountScreen.js +91 -222
  139. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  140. package/lib/module/ui/screens/SessionManagementScreen.js +177 -175
  141. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  142. package/lib/module/ui/screens/SignInScreen.js +140 -246
  143. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  144. package/lib/module/ui/screens/SignUpScreen.js +145 -745
  145. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  146. package/lib/module/ui/screens/WelcomeNewUserScreen.js +382 -0
  147. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  148. package/lib/module/ui/screens/internal/SignInPasswordStep.js +23 -14
  149. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  150. package/lib/module/ui/screens/internal/SignInUsernameStep.js +15 -9
  151. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  152. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
  153. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  154. package/lib/module/ui/screens/steps/RecoverRequestStep.js +105 -0
  155. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -0
  156. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +133 -0
  157. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
  158. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +136 -0
  159. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
  160. package/lib/module/ui/screens/steps/SignInPasswordStep.js +160 -0
  161. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -0
  162. package/lib/module/ui/screens/steps/SignInUsernameStep.js +145 -0
  163. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -0
  164. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +166 -0
  165. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
  166. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +158 -0
  167. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
  168. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +165 -0
  169. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
  170. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +67 -0
  171. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
  172. package/lib/module/ui/styles/authStyles.js +1 -1
  173. package/lib/module/ui/styles/authStyles.js.map +1 -1
  174. package/lib/typescript/models/interfaces.d.ts +5 -8
  175. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  176. package/lib/typescript/models/session.d.ts +1 -4
  177. package/lib/typescript/models/session.d.ts.map +1 -1
  178. package/lib/typescript/ui/components/AnimationExample.d.ts +4 -0
  179. package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -0
  180. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  181. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  182. package/lib/typescript/ui/components/Header.d.ts +9 -0
  183. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/OxyPayButton.d.ts +2 -2
  185. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
  186. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/ProfileCard.d.ts +1 -3
  188. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  189. package/lib/typescript/ui/components/Section.d.ts +2 -1
  190. package/lib/typescript/ui/components/Section.d.ts.map +1 -1
  191. package/lib/typescript/ui/components/SectionTitle.d.ts +2 -1
  192. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
  193. package/lib/typescript/ui/components/StepBasedScreen.d.ts +24 -0
  194. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -0
  195. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +2 -1
  196. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -1
  197. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +1 -1
  198. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -1
  199. package/lib/typescript/ui/components/index.d.ts +0 -1
  200. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  201. package/lib/typescript/ui/components/internal/PinInput.d.ts +9 -1
  202. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
  203. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  204. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +27 -0
  205. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -0
  206. package/lib/typescript/ui/context/OxyContext.d.ts +8 -3
  207. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  208. package/lib/typescript/ui/hooks/useFollow.types.d.ts +33 -0
  209. package/lib/typescript/ui/hooks/useFollow.types.d.ts.map +1 -0
  210. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  211. package/lib/typescript/ui/navigation/types.d.ts +5 -0
  212. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  215. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +18 -1
  217. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +7 -0
  219. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -0
  220. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +2 -2
  221. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  223. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +2 -9
  224. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/SignUpScreen.d.ts +1 -1
  228. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +13 -0
  230. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -0
  231. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +5 -5
  232. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  233. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +4 -4
  234. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  235. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +21 -0
  236. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -0
  237. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +18 -0
  238. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -0
  239. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +24 -0
  240. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -0
  241. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +27 -0
  242. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -0
  243. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +27 -0
  244. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -0
  245. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +25 -0
  246. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -0
  247. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +26 -0
  248. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -0
  249. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +16 -0
  250. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -0
  251. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +13 -0
  252. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -0
  253. package/lib/typescript/ui/styles/authStyles.d.ts +1 -1
  254. package/package.json +10 -3
  255. package/src/models/interfaces.ts +7 -8
  256. package/src/models/session.ts +1 -4
  257. package/src/ui/components/AnimationExample.tsx +195 -0
  258. package/src/ui/components/FollowButton.tsx +65 -45
  259. package/src/ui/components/GroupedItem.tsx +1 -0
  260. package/src/ui/components/GroupedSection.tsx +1 -1
  261. package/src/ui/components/Header.tsx +37 -13
  262. package/src/ui/components/OxyPayButton.tsx +2 -2
  263. package/src/ui/components/OxyProvider.tsx +67 -33
  264. package/src/ui/components/ProfileCard.tsx +6 -8
  265. package/src/ui/components/Section.tsx +7 -7
  266. package/src/ui/components/SectionTitle.tsx +2 -2
  267. package/src/ui/components/StepBasedScreen.README.md +337 -0
  268. package/src/ui/components/StepBasedScreen.tsx +417 -0
  269. package/src/ui/components/icon/FAIRWalletIcon.tsx +2 -2
  270. package/src/ui/components/icon/OxyIcon.tsx +10 -11
  271. package/src/ui/components/index.ts +0 -1
  272. package/src/ui/components/internal/PinInput.tsx +13 -4
  273. package/src/ui/components/internal/TextField.tsx +12 -6
  274. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -0
  275. package/src/ui/context/OxyContext.tsx +90 -59
  276. package/src/ui/hooks/useFollow.types.ts +33 -0
  277. package/src/ui/navigation/OxyRouter.tsx +10 -0
  278. package/src/ui/navigation/types.ts +6 -0
  279. package/src/ui/screens/AccountCenterScreen.tsx +13 -7
  280. package/src/ui/screens/AccountOverviewScreen.tsx +3 -3
  281. package/src/ui/screens/AccountSettingsScreen.tsx +65 -13
  282. package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
  283. package/src/ui/screens/FeedbackScreen.tsx +57 -80
  284. package/src/ui/screens/FileManagementScreen.tsx +278 -175
  285. package/src/ui/screens/LanguageSelectorScreen.tsx +322 -0
  286. package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
  287. package/src/ui/screens/ProfileScreen.tsx +60 -55
  288. package/src/ui/screens/RecoverAccountScreen.tsx +98 -211
  289. package/src/ui/screens/SessionManagementScreen.tsx +148 -151
  290. package/src/ui/screens/SignInScreen.tsx +148 -290
  291. package/src/ui/screens/SignUpScreen.tsx +147 -751
  292. package/src/ui/screens/WelcomeNewUserScreen.tsx +272 -0
  293. package/src/ui/screens/internal/SignInPasswordStep.tsx +28 -13
  294. package/src/ui/screens/internal/SignInUsernameStep.tsx +21 -11
  295. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
  296. package/src/ui/screens/steps/RecoverRequestStep.tsx +130 -0
  297. package/src/ui/screens/steps/RecoverSuccessStep.tsx +131 -0
  298. package/src/ui/screens/steps/RecoverVerifyStep.tsx +153 -0
  299. package/src/ui/screens/steps/SignInPasswordStep.tsx +172 -0
  300. package/src/ui/screens/steps/SignInUsernameStep.tsx +176 -0
  301. package/src/ui/screens/steps/SignUpIdentityStep.tsx +204 -0
  302. package/src/ui/screens/steps/SignUpSecurityStep.tsx +191 -0
  303. package/src/ui/screens/steps/SignUpSummaryStep.tsx +130 -0
  304. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +65 -0
  305. package/src/ui/styles/authStyles.ts +1 -1
@@ -1,34 +1,12 @@
1
1
  import type React from 'react';
2
2
  import { useState, useRef, useEffect, useMemo, useCallback } from 'react';
3
- import {
4
- View,
5
- Text,
6
- TextInput,
7
- TouchableOpacity,
8
- StyleSheet,
9
- ActivityIndicator,
10
- Platform,
11
- KeyboardAvoidingView,
12
- ScrollView,
13
- TextStyle,
14
- Animated,
15
- Dimensions,
16
- StatusBar,
17
- Alert,
18
- } from 'react-native';
19
3
  import type { BaseScreenProps } from '../navigation/types';
20
4
  import { useOxy } from '../context/OxyContext';
21
- import { fontFamilies, useThemeColors, createCommonStyles, createAuthStyles } from '../styles';
22
- import OxyLogo from '../components/OxyLogo';
23
- import Avatar from '../components/Avatar';
24
- import { Ionicons } from '@expo/vector-icons';
25
- import HighFive from '../../assets/illustrations/HighFive';
5
+ import { useThemeColors } from '../styles';
26
6
  import { toast } from '../../lib/sonner';
27
- import Svg, { Path, Circle } from 'react-native-svg';
28
- import GroupedPillButtons from '../components/internal/GroupedPillButtons';
29
- import TextField from '../components/internal/TextField';
30
- import SignInUsernameStep from './internal/SignInUsernameStep';
31
- import SignInPasswordStep from './internal/SignInPasswordStep';
7
+ import StepBasedScreen, { type StepConfig } from '../components/StepBasedScreen';
8
+ import SignInUsernameStep from './steps/SignInUsernameStep';
9
+ import SignInPasswordStep from './steps/SignInPasswordStep';
32
10
 
33
11
  const SignInScreen: React.FC<BaseScreenProps> = ({
34
12
  navigate,
@@ -39,38 +17,35 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
39
17
  username: initialUsername,
40
18
  userProfile: initialUserProfile,
41
19
  }) => {
42
- // Only log props in development mode to reduce console noise
43
- if (__DEV__) {
44
- console.log('SignInScreen props:', { initialStep, initialUsername, initialUserProfile });
45
- }
46
20
  // Form data states
47
21
  const [username, setUsername] = useState(initialUsername || '');
48
22
  const [password, setPassword] = useState('');
49
23
  const [errorMessage, setErrorMessage] = useState('');
50
24
  const [userProfile, setUserProfile] = useState<any>(initialUserProfile || null);
51
25
  const [showPassword, setShowPassword] = useState(false);
52
-
53
- // Multi-step form states
54
- const [currentStep, setCurrentStep] = useState(initialStep || 0);
55
26
  const [isInputFocused, setIsInputFocused] = useState(false);
56
27
  const [isValidating, setIsValidating] = useState(false);
57
28
  const [validationStatus, setValidationStatus] = useState<'idle' | 'validating' | 'valid' | 'invalid'>(
58
29
  initialUserProfile ? 'valid' : 'idle'
59
30
  );
60
31
 
61
- // Cache for validation results to prevent repeated API calls
62
- const validationCache = useRef<Map<string, { profile: any; timestamp: number }>>(new Map());
32
+ // Monitor username state changes
33
+ useEffect(() => {
34
+ console.log('👀 SignInScreen username state changed:', username);
35
+ }, [username]);
63
36
 
64
- const fadeAnim = useRef(new Animated.Value(1)).current;
65
- const slideAnim = useRef(new Animated.Value(0)).current;
66
- const scaleAnim = useRef(new Animated.Value(1)).current;
67
- const logoAnim = useRef(new Animated.Value(0)).current;
68
- const progressAnim = useRef(new Animated.Value(initialStep ? 1.0 : 0.5)).current;
37
+ // Cache for validation results to prevent repeated API calls
38
+ const validationCache = useRef<Map<string, { profile: any }>>(new Map());
69
39
 
70
40
  const { login, isLoading, user, isAuthenticated, sessions, oxyServices } = useOxy();
71
41
 
42
+ // Only log props in development mode to reduce console noise
43
+ if (__DEV__) {
44
+ console.log('SignInScreen props:', { initialStep, initialUsername, initialUserProfile });
45
+ console.log('🔧 oxyServices available:', !!oxyServices);
46
+ console.log('🔧 getProfileByUsername available:', typeof oxyServices?.getProfileByUsername);
47
+ }
72
48
  const colors = useThemeColors(theme);
73
- const commonStyles = createCommonStyles(theme);
74
49
 
75
50
  // Check if this should be treated as "Add Account" mode
76
51
  const isAddAccountMode = useMemo(() =>
@@ -78,68 +53,45 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
78
53
  [isAuthenticated, sessions]
79
54
  );
80
55
 
81
- // Memoized styles to prevent rerenders
82
- const styles = useMemo(() => createAuthStyles(colors, theme), [colors, theme]);
83
-
84
- // Initialize logo animation
85
- useEffect(() => {
86
- Animated.spring(logoAnim, {
87
- toValue: 1,
88
- tension: 50,
89
- friction: 8,
90
- useNativeDriver: Platform.OS !== 'web',
91
- }).start();
92
- }, [logoAnim]);
93
-
94
- // Input focus handlers (no animation)
95
- const handleInputFocus = useCallback(() => {
96
- setIsInputFocused(true);
97
- }, []);
98
-
99
- const handleInputBlur = useCallback(() => {
100
- setIsInputFocused(false);
101
- }, []);
102
-
103
- // Memoized input change handlers to prevent re-renders
104
- const handleUsernameChange = useCallback((text: string) => {
105
- setUsername(text);
106
- // Clear error as soon as user edits username
107
- if (errorMessage) setErrorMessage('');
108
- setValidationStatus('idle');
109
- }, [errorMessage]);
110
-
111
- const handlePasswordChange = useCallback((text: string) => {
112
- setPassword(text);
113
- // Clear error as soon as user edits password
114
- if (errorMessage) setErrorMessage('');
115
- }, [errorMessage]);
116
-
117
56
  // Username validation using core services with caching
118
57
  const validateUsername = useCallback(async (usernameToValidate: string) => {
58
+ console.log('🔍 Validating username:', usernameToValidate);
59
+
119
60
  if (!usernameToValidate || usernameToValidate.length < 3) {
61
+ console.log('❌ Username too short');
62
+ setValidationStatus('invalid');
63
+ setErrorMessage('Username must be at least 3 characters.');
64
+ return false;
65
+ }
66
+
67
+ // Safety check for oxyServices
68
+ if (!oxyServices || typeof oxyServices.getProfileByUsername !== 'function') {
69
+ console.error('🚨 oxyServices not available or getProfileByUsername not found');
120
70
  setValidationStatus('invalid');
121
- setErrorMessage('Please enter a valid username.');
71
+ setErrorMessage('Service unavailable. Please try again.');
122
72
  return false;
123
73
  }
124
74
 
125
- // Check cache first (cache valid for 5 minutes)
75
+ // Check cache first
126
76
  const cached = validationCache.current.get(usernameToValidate);
127
- const now = Date.now();
128
- if (cached && (now - cached.timestamp) < 5 * 60 * 1000) {
77
+ if (cached) {
78
+ console.log('✅ Username found in cache:', cached.profile);
129
79
  setUserProfile(cached.profile);
130
80
  setValidationStatus('valid');
131
81
  setErrorMessage('');
132
82
  return true;
133
83
  }
134
84
 
85
+ console.log('🔄 Validating username with API...');
135
86
  setIsValidating(true);
136
87
  setValidationStatus('validating');
137
88
 
138
89
  try {
139
- // First check if username exists by trying to get profile
90
+ // Check if username exists
140
91
  const profile = await oxyServices.getProfileByUsername(usernameToValidate);
92
+ console.log('📋 Profile response:', profile);
141
93
 
142
- if (profile) {
94
+ if (profile && profile.username) {
143
95
  const profileData = {
144
96
  displayName: profile.name?.full || profile.name?.first || profile.username,
145
97
  name: profile.username,
@@ -147,30 +99,42 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
147
99
  id: profile.id
148
100
  };
149
101
 
102
+ console.log('✅ Username is valid:', profileData);
150
103
  setUserProfile(profileData);
151
104
  setValidationStatus('valid');
152
- setErrorMessage(''); // Clear any previous errors
105
+ setErrorMessage('');
153
106
 
154
107
  // Cache the result
155
108
  validationCache.current.set(usernameToValidate, {
156
- profile: profileData,
157
- timestamp: now
109
+ profile: profileData
158
110
  });
159
111
 
160
112
  return true;
161
113
  } else {
114
+ console.log('❌ Username not found');
162
115
  setValidationStatus('invalid');
163
116
  setErrorMessage('Username not found.');
164
117
  return false;
165
118
  }
166
119
  } catch (error: any) {
120
+ console.log('🚨 Validation error:', error);
121
+
167
122
  // If user not found (404), username doesn't exist
168
123
  if (error.status === 404 || error.code === 'USER_NOT_FOUND') {
124
+ console.log('❌ Username not found (404)');
169
125
  setValidationStatus('invalid');
170
126
  setErrorMessage('Username not found.');
171
127
  return false;
172
128
  }
173
129
 
130
+ // For development/testing: if API fails, allow any 3+ character username
131
+ if (__DEV__) {
132
+ console.log('⚠️ Development mode: allowing username due to API error');
133
+ setValidationStatus('valid');
134
+ setErrorMessage('');
135
+ return true;
136
+ }
137
+
174
138
  // For other errors, show generic message
175
139
  console.error('Username validation error:', error);
176
140
  setValidationStatus('invalid');
@@ -181,139 +145,39 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
181
145
  }
182
146
  }, [oxyServices]);
183
147
 
184
- // Debounced username validation - only run on explicit continue, not on every keystroke
185
- useEffect(() => {
186
- if (!username || username.length < 3) {
187
- setValidationStatus('idle');
188
- setUserProfile(null);
189
- setErrorMessage('');
190
- return;
191
- }
192
- // Only validate if we haven't already validated this exact username
193
- if (validationStatus === 'valid' && userProfile?.name === username) {
194
- return;
195
- }
196
- // Remove debounce, only validate on continue
197
- }, [username, validationStatus, userProfile?.name]);
198
-
199
- // Cleanup cache on unmount and limit cache size
200
- useEffect(() => {
201
- return () => {
202
- // Clear cache on unmount
203
- validationCache.current.clear();
204
- };
205
- }, []);
206
-
207
- // Clean up old cache entries periodically (older than 10 minutes)
208
- useEffect(() => {
209
- const cleanupInterval = setInterval(() => {
210
- const now = Date.now();
211
- const maxAge = 10 * 60 * 1000; // 10 minutes
212
-
213
- for (const [key, value] of validationCache.current.entries()) {
214
- if (now - value.timestamp > maxAge) {
215
- validationCache.current.delete(key);
216
- }
217
- }
148
+ // Input change handlers
149
+ const handleUsernameChange = useCallback((text: string) => {
150
+ console.log('🔄 SignInScreen handleUsernameChange called:', text);
151
+ setUsername(text);
152
+ if (errorMessage) setErrorMessage('');
153
+ setValidationStatus('idle');
154
+ }, [errorMessage]);
218
155
 
219
- // Limit cache size to 50 entries
220
- if (validationCache.current.size > 50) {
221
- const entries = Array.from(validationCache.current.entries());
222
- entries.sort((a, b) => a[1].timestamp - b[1].timestamp);
223
- const toDelete = entries.slice(0, entries.length - 50);
224
- toDelete.forEach(([key]) => validationCache.current.delete(key));
225
- }
226
- }, 5 * 60 * 1000); // Clean up every 5 minutes
156
+ const handlePasswordChange = useCallback((text: string) => {
157
+ setPassword(text);
158
+ if (errorMessage) setErrorMessage('');
159
+ }, [errorMessage]);
227
160
 
228
- return () => clearInterval(cleanupInterval);
161
+ const handleInputFocus = useCallback(() => {
162
+ setIsInputFocused(true);
229
163
  }, []);
230
164
 
231
- // Animation functions
232
- const animateTransition = useCallback((nextStep: number) => {
233
- // Scale down current content
234
- Animated.timing(scaleAnim, {
235
- toValue: 0.95,
236
- duration: 150,
237
- useNativeDriver: Platform.OS !== 'web',
238
- }).start();
239
-
240
- // Fade out
241
- Animated.timing(fadeAnim, {
242
- toValue: 0,
243
- duration: 200,
244
- useNativeDriver: Platform.OS !== 'web',
245
- }).start(() => {
246
- setCurrentStep(nextStep);
247
-
248
- // Reset animations
249
- slideAnim.setValue(-50);
250
- scaleAnim.setValue(0.95);
251
-
252
- // Animate in new content
253
- Animated.parallel([
254
- Animated.timing(fadeAnim, {
255
- toValue: 1,
256
- duration: 300,
257
- useNativeDriver: Platform.OS !== 'web',
258
- }),
259
- Animated.spring(slideAnim, {
260
- toValue: 0,
261
- tension: 80,
262
- friction: 8,
263
- useNativeDriver: Platform.OS !== 'web',
264
- }),
265
- Animated.spring(scaleAnim, {
266
- toValue: 1,
267
- tension: 80,
268
- friction: 8,
269
- useNativeDriver: Platform.OS !== 'web',
270
- })
271
- ]).start();
272
- });
273
- }, [fadeAnim, slideAnim, scaleAnim]);
274
-
275
- const nextStep = useCallback(() => {
276
- if (currentStep < 1) {
277
- // Animate progress bar
278
- Animated.timing(progressAnim, {
279
- toValue: 1.0,
280
- duration: 300,
281
- useNativeDriver: false,
282
- }).start();
283
-
284
- animateTransition(currentStep + 1);
285
- }
286
- }, [currentStep, progressAnim, animateTransition]);
287
-
288
- const prevStep = useCallback(() => {
289
- if (currentStep > 0) {
290
- // Animate progress bar
291
- Animated.timing(progressAnim, {
292
- toValue: 0.5,
293
- duration: 300,
294
- useNativeDriver: false,
295
- }).start();
296
-
297
- animateTransition(currentStep - 1);
298
- }
299
- }, [currentStep, progressAnim, animateTransition]);
165
+ const handleInputBlur = useCallback(() => {
166
+ setIsInputFocused(false);
167
+ }, []);
300
168
 
301
- // Custom next handlers for validation
302
- const handleUsernameContinue = useCallback(async () => {
169
+ // Step validation and handlers
170
+ const validateUsernameStep = useCallback(async () => {
303
171
  if (!username) {
304
172
  setErrorMessage('Please enter your username.');
305
- return;
173
+ return false;
306
174
  }
307
175
  setErrorMessage('');
308
176
  setIsValidating(true);
309
177
  const valid = await validateUsername(username);
310
178
  setIsValidating(false);
311
- if (!valid) {
312
- // Error message is set in validateUsername
313
- return;
314
- }
315
- nextStep();
316
- }, [username, validateUsername, nextStep]);
179
+ return valid;
180
+ }, [username, validateUsername]);
317
181
 
318
182
  const handleSignIn = useCallback(async () => {
319
183
  if (!password) {
@@ -335,93 +199,87 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
335
199
  }
336
200
  }, [username, password, login, onAuthenticated, userProfile]);
337
201
 
338
- // Memoized step components
339
- const renderUsernameStep = useMemo(() => (
340
- <SignInUsernameStep
341
- styles={styles}
342
- fadeAnim={fadeAnim}
343
- slideAnim={slideAnim}
344
- scaleAnim={scaleAnim}
345
- colors={colors}
346
- isAddAccountMode={isAddAccountMode}
347
- user={user}
348
- errorMessage={errorMessage}
349
- isInputFocused={isInputFocused}
350
- username={username}
351
- validationStatus={validationStatus}
352
- userProfile={userProfile}
353
- isValidating={isValidating}
354
- handleInputFocus={handleInputFocus}
355
- handleInputBlur={handleInputBlur}
356
- handleUsernameChange={handleUsernameChange}
357
- handleUsernameContinue={handleUsernameContinue}
358
- navigate={navigate}
359
- />
360
- ), [
361
- fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username,
362
- errorMessage, isInputFocused, username, validationStatus,
363
- userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange,
364
- handleUsernameContinue, navigate, styles
365
- ]);
202
+ // Simple cleanup on unmount - that's all we need for username validation
203
+ useEffect(() => {
204
+ return () => {
205
+ validationCache.current.clear();
206
+ };
207
+ }, []);
366
208
 
367
- const renderPasswordStep = useMemo(() => (
368
- <SignInPasswordStep
369
- styles={styles}
370
- fadeAnim={fadeAnim}
371
- slideAnim={slideAnim}
372
- scaleAnim={scaleAnim}
373
- colors={colors}
374
- userProfile={userProfile}
375
- username={username}
376
- theme={theme}
377
- logoAnim={logoAnim}
378
- errorMessage={errorMessage}
379
- isInputFocused={isInputFocused}
380
- password={password}
381
- showPassword={showPassword}
382
- handleInputFocus={handleInputFocus}
383
- handleInputBlur={handleInputBlur}
384
- handlePasswordChange={handlePasswordChange}
385
- handleSignIn={handleSignIn}
386
- isLoading={isLoading}
387
- prevStep={prevStep}
388
- navigate={navigate}
389
- />
390
- ), [
391
- fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim,
392
- errorMessage, isInputFocused, password, showPassword,
393
- handleInputFocus, handleInputBlur, handlePasswordChange, handleSignIn, isLoading, prevStep, styles, navigate
394
- ]);
209
+ // Step configurations
210
+ const steps: StepConfig[] = useMemo(() => [
211
+ {
212
+ id: 'username',
213
+ component: SignInUsernameStep,
214
+ canProceed: () => true, // Let the component handle validation internally
215
+ },
216
+ {
217
+ id: 'password',
218
+ component: SignInPasswordStep,
219
+ canProceed: () => true, // Let the component handle validation internally
220
+ },
221
+ ], [username, password, validationStatus, validateUsername, handleSignIn]);
222
+
223
+ // Handle step completion (final step)
224
+ const handleComplete = useCallback(async (stepData: any[]) => {
225
+ // The sign-in is handled by the password step component
226
+ // This callback is here for interface compatibility
227
+ console.log('Sign-in flow completed');
228
+ }, []);
395
229
 
396
- const renderCurrentStep = useCallback(() => {
397
- switch (currentStep) {
398
- case 0:
399
- return renderUsernameStep;
400
- case 1:
401
- return renderPasswordStep;
402
- default:
403
- return renderUsernameStep;
404
- }
405
- }, [currentStep, renderUsernameStep, renderPasswordStep]);
230
+ // Step data for the reusable component
231
+ const stepData = useMemo(() => [
232
+ {
233
+ username,
234
+ setUsername: handleUsernameChange,
235
+ errorMessage,
236
+ setErrorMessage,
237
+ validationStatus,
238
+ userProfile,
239
+ isValidating,
240
+ isInputFocused,
241
+ isAddAccountMode,
242
+ user,
243
+ handleInputFocus,
244
+ handleInputBlur,
245
+ validateUsername, // Add validation function
246
+ },
247
+ {
248
+ password,
249
+ setPassword: handlePasswordChange,
250
+ showPassword,
251
+ setShowPassword,
252
+ errorMessage,
253
+ setErrorMessage,
254
+ isLoading,
255
+ isInputFocused,
256
+ userProfile,
257
+ username,
258
+ handleInputFocus,
259
+ handleInputBlur,
260
+ handleSignIn, // Add sign-in function for password step
261
+ },
262
+ ], [
263
+ username, password, errorMessage, validationStatus, userProfile,
264
+ isValidating, isInputFocused, isAddAccountMode, user, showPassword,
265
+ isLoading, handleUsernameChange, handlePasswordChange, handleInputFocus, handleInputBlur,
266
+ validateUsername, handleSignIn
267
+ ]);
406
268
 
407
269
  return (
408
- <KeyboardAvoidingView
409
- style={[styles.container, { backgroundColor: colors.background }]}
410
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
411
- >
412
- <StatusBar
413
- barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
414
- backgroundColor={colors.background}
415
- />
416
-
417
- <ScrollView
418
- contentContainerStyle={styles.scrollContent}
419
- showsVerticalScrollIndicator={false}
420
- keyboardShouldPersistTaps="handled"
421
- >
422
- {renderCurrentStep()}
423
- </ScrollView>
424
- </KeyboardAvoidingView>
270
+ <StepBasedScreen
271
+ steps={steps}
272
+ initialStep={initialStep}
273
+ stepData={stepData}
274
+ onComplete={handleComplete}
275
+ navigate={navigate}
276
+ goBack={goBack}
277
+ onAuthenticated={onAuthenticated}
278
+ theme={theme}
279
+ showProgressIndicator={true}
280
+ enableAnimations={true}
281
+ oxyServices={oxyServices}
282
+ />
425
283
  );
426
284
  };
427
285