@oxyhq/services 5.11.11 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/README.md +48 -7
  2. package/lib/commonjs/core/OxyServices.js +162 -12
  3. package/lib/commonjs/core/OxyServices.js.map +1 -1
  4. package/lib/commonjs/i18n/index.js +40 -0
  5. package/lib/commonjs/i18n/index.js.map +1 -0
  6. package/lib/commonjs/i18n/locales/en-US.json +681 -0
  7. package/lib/commonjs/i18n/locales/es-ES.json +689 -0
  8. package/lib/commonjs/ui/components/FollowButton.js +1 -1
  9. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  10. package/lib/commonjs/ui/components/GroupedItem.js +2 -1
  11. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  12. package/lib/commonjs/ui/components/Header.js +4 -3
  13. package/lib/commonjs/ui/components/Header.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyProvider.js +112 -105
  15. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  16. package/lib/commonjs/ui/components/ProfileCard.js +5 -1
  17. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  18. package/lib/commonjs/ui/components/Section.js +1 -1
  19. package/lib/commonjs/ui/components/StepBasedScreen.js +17 -17
  20. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  21. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +15 -3
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  23. package/lib/commonjs/ui/components/internal/PinInput.js +10 -4
  24. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  25. package/lib/commonjs/ui/context/OxyContext.js +128 -12
  26. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/useI18n.js +22 -0
  28. package/lib/commonjs/ui/hooks/useI18n.js.map +1 -0
  29. package/lib/commonjs/ui/navigation/OxyRouter.js +11 -131
  30. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  31. package/lib/commonjs/ui/navigation/routes.js +127 -0
  32. package/lib/commonjs/ui/navigation/routes.js.map +1 -0
  33. package/lib/commonjs/ui/navigation/types.js +7 -0
  34. package/lib/commonjs/ui/navigation/types.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js +55 -47
  36. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +69 -61
  38. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +378 -37
  40. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +52 -34
  42. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/FeedbackScreen.js +40 -36
  44. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +105 -78
  46. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -2
  48. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +92 -60
  50. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/ProfileScreen.js +21 -11
  52. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +30 -8
  54. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SignInScreen.js +47 -26
  56. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +31 -24
  58. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +11 -7
  60. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  61. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +12 -6
  62. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  63. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -7
  64. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +15 -11
  66. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +19 -27
  68. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
  70. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +14 -10
  72. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +7 -3
  74. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +19 -14
  76. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  77. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +130 -0
  78. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
  79. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +13 -13
  80. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  81. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +14 -20
  82. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  83. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +22 -8
  84. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  85. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +161 -0
  86. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -0
  87. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +12 -6
  88. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  89. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +10 -6
  90. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  91. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +10 -6
  92. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  93. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +34 -4
  94. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  95. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +9 -10
  96. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  97. package/lib/commonjs/ui/styles/authStyles.js +1 -2
  98. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  99. package/lib/commonjs/utils/deviceManager.js +1 -1
  100. package/lib/commonjs/utils/deviceManager.js.map +1 -1
  101. package/lib/commonjs/utils/validationUtils.js +4 -2
  102. package/lib/commonjs/utils/validationUtils.js.map +1 -1
  103. package/lib/module/core/OxyServices.js +162 -12
  104. package/lib/module/core/OxyServices.js.map +1 -1
  105. package/lib/module/i18n/index.js +35 -0
  106. package/lib/module/i18n/index.js.map +1 -0
  107. package/lib/module/i18n/locales/en-US.json +681 -0
  108. package/lib/module/i18n/locales/es-ES.json +689 -0
  109. package/lib/module/ui/components/FollowButton.js +1 -1
  110. package/lib/module/ui/components/FollowButton.js.map +1 -1
  111. package/lib/module/ui/components/GroupedItem.js +2 -1
  112. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  113. package/lib/module/ui/components/Header.js +4 -3
  114. package/lib/module/ui/components/Header.js.map +1 -1
  115. package/lib/module/ui/components/OxyProvider.js +111 -105
  116. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  117. package/lib/module/ui/components/ProfileCard.js +5 -1
  118. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  119. package/lib/module/ui/components/Section.js +1 -1
  120. package/lib/module/ui/components/StepBasedScreen.js +17 -17
  121. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  122. package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -3
  123. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  124. package/lib/module/ui/components/internal/PinInput.js +9 -4
  125. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  126. package/lib/module/ui/context/OxyContext.js +128 -12
  127. package/lib/module/ui/context/OxyContext.js.map +1 -1
  128. package/lib/module/ui/hooks/useI18n.js +18 -0
  129. package/lib/module/ui/hooks/useI18n.js.map +1 -0
  130. package/lib/module/ui/navigation/OxyRouter.js +7 -124
  131. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  132. package/lib/module/ui/navigation/routes.js +122 -0
  133. package/lib/module/ui/navigation/routes.js.map +1 -0
  134. package/lib/module/ui/navigation/types.js +19 -1
  135. package/lib/module/ui/navigation/types.js.map +1 -1
  136. package/lib/module/ui/screens/AccountCenterScreen.js +55 -47
  137. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  138. package/lib/module/ui/screens/AccountOverviewScreen.js +69 -61
  139. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  140. package/lib/module/ui/screens/AccountSettingsScreen.js +378 -37
  141. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  142. package/lib/module/ui/screens/AccountSwitcherScreen.js +52 -34
  143. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  144. package/lib/module/ui/screens/FeedbackScreen.js +40 -36
  145. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  146. package/lib/module/ui/screens/LanguageSelectorScreen.js +107 -80
  147. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  148. package/lib/module/ui/screens/PaymentGatewayScreen.js +2 -2
  149. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  150. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +92 -60
  151. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  152. package/lib/module/ui/screens/ProfileScreen.js +21 -11
  153. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  154. package/lib/module/ui/screens/RecoverAccountScreen.js +30 -8
  155. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  156. package/lib/module/ui/screens/SignInScreen.js +47 -26
  157. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  158. package/lib/module/ui/screens/WelcomeNewUserScreen.js +31 -24
  159. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  160. package/lib/module/ui/screens/internal/SignInPasswordStep.js +11 -7
  161. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  162. package/lib/module/ui/screens/internal/SignInUsernameStep.js +12 -6
  163. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  164. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -7
  165. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  166. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +15 -11
  167. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  168. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +19 -27
  169. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  170. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
  171. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  172. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +14 -10
  173. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  174. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +7 -3
  175. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  176. package/lib/module/ui/screens/steps/RecoverRequestStep.js +19 -14
  177. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  178. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +125 -0
  179. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
  180. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +13 -13
  181. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  182. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +14 -20
  183. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  184. package/lib/module/ui/screens/steps/SignInPasswordStep.js +22 -8
  185. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  186. package/lib/module/ui/screens/steps/SignInTotpStep.js +156 -0
  187. package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -0
  188. package/lib/module/ui/screens/steps/SignInUsernameStep.js +12 -6
  189. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  190. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +10 -6
  191. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  192. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +10 -6
  193. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  194. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +34 -4
  195. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  196. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +9 -10
  197. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  198. package/lib/module/ui/styles/authStyles.js +1 -2
  199. package/lib/module/ui/styles/authStyles.js.map +1 -1
  200. package/lib/module/utils/deviceManager.js +1 -1
  201. package/lib/module/utils/deviceManager.js.map +1 -1
  202. package/lib/module/utils/validationUtils.js +4 -2
  203. package/lib/module/utils/validationUtils.js.map +1 -1
  204. package/lib/typescript/core/OxyServices.d.ts +57 -3
  205. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  206. package/lib/typescript/i18n/index.d.ts +4 -0
  207. package/lib/typescript/i18n/index.d.ts.map +1 -0
  208. package/lib/typescript/models/interfaces.d.ts +4 -0
  209. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  210. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  211. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  212. package/lib/typescript/ui/components/OxyProvider.d.ts +1 -1
  213. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  214. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  215. package/lib/typescript/ui/components/StepBasedScreen.d.ts +2 -1
  216. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  218. package/lib/typescript/ui/components/internal/PinInput.d.ts +6 -3
  219. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
  220. package/lib/typescript/ui/context/OxyContext.d.ts +7 -4
  221. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  222. package/lib/typescript/ui/hooks/useI18n.d.ts +5 -0
  223. package/lib/typescript/ui/hooks/useI18n.d.ts.map +1 -0
  224. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  225. package/lib/typescript/ui/navigation/routes.d.ts +9 -0
  226. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -0
  227. package/lib/typescript/ui/navigation/types.d.ts +24 -10
  228. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  230. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  231. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  232. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  233. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  234. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  235. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  236. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  237. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  238. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  239. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  240. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +2 -1
  241. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  242. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  243. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  244. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  245. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  246. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
  247. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  248. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
  249. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +4 -1
  250. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
  251. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +24 -0
  252. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -0
  253. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +2 -1
  254. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
  255. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +3 -1
  256. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
  257. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +1 -0
  258. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
  259. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +19 -0
  260. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -0
  261. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +2 -1
  262. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
  263. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +2 -1
  264. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
  265. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +2 -1
  266. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
  267. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +2 -1
  268. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
  269. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +2 -1
  270. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
  271. package/lib/typescript/ui/styles/authStyles.d.ts +0 -1
  272. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
  273. package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
  274. package/package.json +49 -15
  275. package/src/core/OxyServices.ts +138 -19
  276. package/src/i18n/index.ts +39 -0
  277. package/src/i18n/locales/en-US.json +681 -0
  278. package/src/i18n/locales/es-ES.json +689 -0
  279. package/src/models/interfaces.ts +6 -1
  280. package/src/ui/components/FollowButton.tsx +2 -2
  281. package/src/ui/components/GroupedItem.tsx +2 -1
  282. package/src/ui/components/Header.tsx +4 -3
  283. package/src/ui/components/OxyProvider.tsx +107 -114
  284. package/src/ui/components/ProfileCard.tsx +5 -1
  285. package/src/ui/components/Section.tsx +1 -1
  286. package/src/ui/components/StepBasedScreen.tsx +17 -14
  287. package/src/ui/components/internal/GroupedPillButtons.tsx +10 -6
  288. package/src/ui/components/internal/PinInput.tsx +15 -6
  289. package/src/ui/context/OxyContext.tsx +123 -20
  290. package/src/ui/hooks/useI18n.ts +12 -0
  291. package/src/ui/navigation/OxyRouter.tsx +15 -134
  292. package/src/ui/navigation/routes.ts +153 -0
  293. package/src/ui/navigation/types.ts +28 -10
  294. package/src/ui/screens/AccountCenterScreen.tsx +47 -45
  295. package/src/ui/screens/AccountOverviewScreen.tsx +68 -70
  296. package/src/ui/screens/AccountSettingsScreen.tsx +265 -41
  297. package/src/ui/screens/AccountSwitcherScreen.tsx +35 -33
  298. package/src/ui/screens/FeedbackScreen.tsx +39 -37
  299. package/src/ui/screens/LanguageSelectorScreen.tsx +99 -70
  300. package/src/ui/screens/PaymentGatewayScreen.tsx +6 -6
  301. package/src/ui/screens/PremiumSubscriptionScreen.tsx +56 -54
  302. package/src/ui/screens/ProfileScreen.tsx +14 -8
  303. package/src/ui/screens/RecoverAccountScreen.tsx +29 -8
  304. package/src/ui/screens/SignInScreen.tsx +39 -30
  305. package/src/ui/screens/WelcomeNewUserScreen.tsx +31 -17
  306. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -8
  307. package/src/ui/screens/internal/SignInUsernameStep.tsx +10 -8
  308. package/src/ui/screens/karma/KarmaAboutScreen.tsx +23 -11
  309. package/src/ui/screens/karma/KarmaCenterScreen.tsx +21 -11
  310. package/src/ui/screens/karma/KarmaFAQScreen.tsx +15 -33
  311. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +6 -4
  312. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +28 -10
  313. package/src/ui/screens/karma/KarmaRulesScreen.tsx +5 -3
  314. package/src/ui/screens/steps/RecoverRequestStep.tsx +20 -17
  315. package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +133 -0
  316. package/src/ui/screens/steps/RecoverSuccessStep.tsx +12 -19
  317. package/src/ui/screens/steps/RecoverVerifyStep.tsx +15 -24
  318. package/src/ui/screens/steps/SignInPasswordStep.tsx +19 -6
  319. package/src/ui/screens/steps/SignInTotpStep.tsx +129 -0
  320. package/src/ui/screens/steps/SignInUsernameStep.tsx +11 -10
  321. package/src/ui/screens/steps/SignUpIdentityStep.tsx +10 -11
  322. package/src/ui/screens/steps/SignUpSecurityStep.tsx +10 -11
  323. package/src/ui/screens/steps/SignUpSummaryStep.tsx +24 -9
  324. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +8 -14
  325. package/src/ui/styles/authStyles.ts +0 -1
  326. package/src/utils/deviceManager.ts +1 -1
  327. package/src/utils/validationUtils.ts +5 -3
@@ -1,14 +1,15 @@
1
1
  import type { OxyServices } from '../../core';
2
2
  import type { User } from '../../models/interfaces';
3
- import type { ComponentType, ReactNode } from 'react';
3
+ import type { ReactNode } from 'react';
4
4
  import type { QueryClient } from '@tanstack/react-query';
5
+ import type { RouteName } from './routes';
5
6
 
6
7
  /**
7
8
  * Base props for all screens in the Oxy UI system
8
9
  */
9
10
  export interface BaseScreenProps {
10
11
  oxyServices: OxyServices;
11
- navigate: (screen: string, props?: Record<string, unknown>) => void;
12
+ navigate: (screen: RouteName, props?: Record<string, unknown>) => void;
12
13
  goBack: () => void;
13
14
  onClose?: () => void;
14
15
  onAuthenticated?: (user: User) => void;
@@ -22,22 +23,21 @@ export interface BaseScreenProps {
22
23
  /**
23
24
  * Route configuration for OxyRouter
24
25
  */
25
- export interface RouteConfig {
26
- component: ComponentType<any>; // Allow any component type for flexibility
27
- snapPoints: string[];
28
- }
26
+ // Route config moved to routes.ts to avoid cycles; re-exported here if needed
27
+ export { routes } from './routes';
28
+ export type { RouteName } from './routes';
29
29
 
30
30
  /**
31
31
  * Props for OxyRouter component
32
32
  */
33
33
  export interface OxyRouterProps {
34
34
  oxyServices: OxyServices;
35
- initialScreen: string;
35
+ initialScreen: RouteName;
36
36
  onClose?: () => void;
37
37
  onAuthenticated?: (user: User) => void;
38
38
  theme: 'light' | 'dark';
39
39
  adjustSnapPoints?: (snapPoints: string[]) => void;
40
- navigationRef?: React.MutableRefObject<((screen: string, props?: Record<string, unknown>) => void) | null>;
40
+ navigationRef?: React.MutableRefObject<((screen: RouteName, props?: Record<string, unknown>) => void) | null>;
41
41
  containerWidth?: number;
42
42
  }
43
43
 
@@ -59,7 +59,7 @@ export interface OxyProviderProps {
59
59
  * Initial screen to display
60
60
  * @default "SignIn"
61
61
  */
62
- initialScreen?: 'SignIn' | 'SignUp' | 'AccountCenter';
62
+ initialScreen?: RouteName;
63
63
 
64
64
  /**
65
65
  * Callback when the bottom sheet is closed
@@ -83,7 +83,7 @@ export interface OxyProviderProps {
83
83
  * @deprecated External bottom sheet ref is no longer required as OxyProvider handles the bottom sheet internally
84
84
  * @hidden
85
85
  */
86
- bottomSheetRef?: React.RefObject<unknown>;
86
+ bottomSheetRef?: React.RefObject<BottomSheetController | null>;
87
87
 
88
88
  /**
89
89
  * Whether to automatically present the bottom sheet when component mounts
@@ -144,4 +144,22 @@ export interface OxyProviderProps {
144
144
  * Optional QueryClient instance for React Query. If not provided, a sensible default is created.
145
145
  */
146
146
  queryClient?: QueryClient;
147
+
148
+ appInsets?: {
149
+ top: number;
150
+ right: number;
151
+ bottom: number;
152
+ left: number;
153
+ };
154
+ }
155
+
156
+ // Typed imperative controller for the bottom sheet UI
157
+ export interface BottomSheetController {
158
+ present: () => void;
159
+ dismiss: () => void;
160
+ expand: () => void;
161
+ collapse: () => void;
162
+ snapToIndex: (index: number) => void;
163
+ snapToPosition: (position: number | string) => void;
164
+ navigate: (screen: RouteName | string, props?: Record<string, any>) => void;
147
165
  }
@@ -21,6 +21,7 @@ import Section from '../components/Section';
21
21
  import QuickActions from '../components/QuickActions';
22
22
  import GroupedSection from '../components/GroupedSection';
23
23
  import GroupedItem from '../components/GroupedItem';
24
+ import { useI18n } from '../hooks/useI18n';
24
25
 
25
26
  const AccountCenterScreen: React.FC<BaseScreenProps> = ({
26
27
  onClose,
@@ -28,6 +29,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
28
29
  navigate,
29
30
  }) => {
30
31
  const { user, logout, isLoading, sessions, isAuthenticated } = useOxy();
32
+ const { t } = useI18n();
31
33
 
32
34
  const isDarkTheme = theme === 'dark';
33
35
  const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
@@ -45,13 +47,13 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
45
47
  }
46
48
  } catch (error) {
47
49
  console.error('Logout failed:', error);
48
- toast.error('There was a problem signing you out. Please try again.');
50
+ toast.error(t('common.errors.signOutFailed') || 'There was a problem signing you out. Please try again.');
49
51
  }
50
52
  };
51
53
 
52
54
  const confirmLogout = () => {
53
55
  confirmAction(
54
- 'Are you sure you want to sign out?',
56
+ t('common.confirms.signOut') || 'Are you sure you want to sign out?',
55
57
  handleLogout
56
58
  );
57
59
  };
@@ -59,7 +61,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
59
61
  if (!isAuthenticated) {
60
62
  return (
61
63
  <View style={[styles.container, { backgroundColor }]}>
62
- <Text style={[styles.message, { color: textColor }]}>Not signed in</Text>
64
+ <Text style={[styles.message, { color: textColor }]}>{t('common.status.notSignedIn') || 'Not signed in'}</Text>
63
65
  </View>
64
66
  );
65
67
  }
@@ -87,71 +89,71 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
87
89
 
88
90
  <ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
89
91
  {/* Quick Actions */}
90
- <Section title="Quick Actions" theme={theme} isFirst={true}>
92
+ <Section title={t('accountCenter.sections.quickActions') || 'Quick Actions'} theme={theme} isFirst={true}>
91
93
  <QuickActions
92
94
  actions={[
93
- { id: 'overview', icon: 'person-circle', iconColor: '#007AFF', title: 'Overview', onPress: () => navigate('AccountOverview') },
94
- { id: 'settings', icon: 'settings', iconColor: '#5856D6', title: 'Edit Profile', onPress: () => navigate('EditProfile') },
95
- { id: 'sessions', icon: 'shield-checkmark', iconColor: '#30D158', title: 'Sessions', onPress: () => navigate('SessionManagement') },
96
- { id: 'premium', icon: 'star', iconColor: '#FFD700', title: 'Premium', onPress: () => navigate('PremiumSubscription') },
97
- ...(user?.isPremium ? [{ id: 'billing', icon: 'card', iconColor: '#34C759', title: 'Billing', onPress: () => navigate('') }] : []),
98
- ...(sessions && sessions.length > 1 ? [{ id: 'switch', icon: 'swap-horizontal', iconColor: '#FF9500', title: 'Switch', onPress: () => navigate('AccountSwitcher') }] : []),
95
+ { id: 'overview', icon: 'person-circle', iconColor: '#007AFF', title: t('accountCenter.quickActions.overview') || 'Overview', onPress: () => navigate('AccountOverview') },
96
+ { id: 'settings', icon: 'settings', iconColor: '#5856D6', title: t('accountCenter.quickActions.editProfile') || 'Edit Profile', onPress: () => navigate('EditProfile') },
97
+ { id: 'sessions', icon: 'shield-checkmark', iconColor: '#30D158', title: t('accountCenter.quickActions.sessions') || 'Sessions', onPress: () => navigate('SessionManagement') },
98
+ { id: 'premium', icon: 'star', iconColor: '#FFD700', title: t('accountCenter.quickActions.premium') || 'Premium', onPress: () => navigate('PremiumSubscription') },
99
+ ...(user?.isPremium ? [{ id: 'billing', icon: 'card', iconColor: '#34C759', title: t('accountCenter.quickActions.billing') || 'Billing', onPress: () => navigate('PaymentGateway') }] : []),
100
+ ...(sessions && sessions.length > 1 ? [{ id: 'switch', icon: 'swap-horizontal', iconColor: '#FF9500', title: t('accountCenter.quickActions.switch') || 'Switch', onPress: () => navigate('AccountSwitcher') }] : []),
99
101
  ]}
100
102
  theme={theme}
101
103
  />
102
104
  </Section>
103
105
 
104
106
  {/* Account Management */}
105
- <Section title="Account Management" theme={theme}>
107
+ <Section title={t('accountCenter.sections.accountManagement') || 'Account Management'} theme={theme}>
106
108
  <GroupedSection
107
109
  items={[
108
110
  {
109
111
  id: 'overview',
110
112
  icon: 'person-circle',
111
113
  iconColor: '#007AFF',
112
- title: 'Account Overview',
113
- subtitle: 'Complete account information',
114
+ title: t('accountCenter.items.accountOverview.title') || 'Account Overview',
115
+ subtitle: t('accountCenter.items.accountOverview.subtitle') || 'Complete account information',
114
116
  onPress: () => navigate('AccountOverview'),
115
117
  },
116
118
  {
117
119
  id: 'settings',
118
120
  icon: 'settings',
119
121
  iconColor: '#5856D6',
120
- title: 'Edit Profile',
121
- subtitle: 'Manage your profile and preferences',
122
+ title: t('accountCenter.items.editProfile.title') || 'Edit Profile',
123
+ subtitle: t('accountCenter.items.editProfile.subtitle') || 'Manage your profile and preferences',
122
124
  onPress: () => navigate('EditProfile'),
123
125
  },
124
126
  {
125
127
  id: 'sessions',
126
128
  icon: 'shield-checkmark',
127
129
  iconColor: '#30D158',
128
- title: 'Manage Sessions',
129
- subtitle: 'Security and active devices',
130
+ title: t('accountCenter.items.manageSessions.title') || 'Manage Sessions',
131
+ subtitle: t('accountCenter.items.manageSessions.subtitle') || 'Security and active devices',
130
132
  onPress: () => navigate('SessionManagement'),
131
133
  },
132
134
  {
133
135
  id: 'files',
134
136
  icon: 'folder',
135
137
  iconColor: '#FF9500',
136
- title: 'File Management',
137
- subtitle: 'Upload, download, and manage your files',
138
+ title: t('accountCenter.items.fileManagement.title') || 'File Management',
139
+ subtitle: t('accountCenter.items.fileManagement.subtitle') || 'Upload, download, and manage your files',
138
140
  onPress: () => navigate('FileManagement'),
139
141
  },
140
142
  {
141
143
  id: 'premium',
142
144
  icon: 'star',
143
145
  iconColor: '#FFD700',
144
- title: 'Oxy+ Subscriptions',
145
- subtitle: user?.isPremium ? 'Manage your premium plan' : 'Upgrade to premium features',
146
+ title: t('accountCenter.items.premium.title') || 'Oxy+ Subscriptions',
147
+ subtitle: user?.isPremium ? (t('accountCenter.items.premium.manage') || 'Manage your premium plan') : (t('accountCenter.items.premium.upgrade') || 'Upgrade to premium features'),
146
148
  onPress: () => navigate('PremiumSubscription'),
147
149
  },
148
150
  ...(user?.isPremium ? [{
149
151
  id: 'billing',
150
152
  icon: 'card',
151
153
  iconColor: '#34C759',
152
- title: 'Billing Management',
153
- subtitle: 'Payment methods and invoices',
154
- onPress: () => navigate(''),
154
+ title: t('accountCenter.items.billing.title') || 'Billing Management',
155
+ subtitle: t('accountCenter.items.billing.subtitle') || 'Payment methods and invoices',
156
+ onPress: () => navigate('PaymentGateway'),
155
157
  }] : []),
156
158
  ]}
157
159
  theme={theme}
@@ -160,23 +162,23 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
160
162
 
161
163
  {/* Multi-Account Management */}
162
164
  {sessions && sessions.length > 1 && (
163
- <Section title="Multi-Account" theme={theme}>
165
+ <Section title={t('accountCenter.sections.multiAccount') || 'Multi-Account'} theme={theme}>
164
166
  <GroupedSection
165
167
  items={[
166
168
  {
167
169
  id: 'switch',
168
170
  icon: 'people',
169
171
  iconColor: '#FF9500',
170
- title: 'Switch Account',
171
- subtitle: `${sessions.length} accounts available`,
172
+ title: t('accountCenter.items.switchAccount.title') || 'Switch Account',
173
+ subtitle: t('accountCenter.items.switchAccount.subtitle', { count: sessions.length }) || `${sessions.length} accounts available`,
172
174
  onPress: () => navigate('AccountSwitcher'),
173
175
  },
174
176
  {
175
177
  id: 'add',
176
178
  icon: 'person-add',
177
179
  iconColor: '#30D158',
178
- title: 'Add Another Account',
179
- subtitle: 'Sign in with a different account',
180
+ title: t('accountCenter.items.addAccount.title') || 'Add Another Account',
181
+ subtitle: t('accountCenter.items.addAccount.subtitle') || 'Sign in with a different account',
180
182
  onPress: () => navigate('SignIn'),
181
183
  },
182
184
  ]}
@@ -187,15 +189,15 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
187
189
 
188
190
  {/* Single Account Setup */}
189
191
  {(!sessions || sessions.length <= 1) && (
190
- <Section title="Add Account" theme={theme}>
192
+ <Section title={t('accountCenter.sections.addAccount') || 'Add Account'} theme={theme}>
191
193
  <GroupedSection
192
194
  items={[
193
195
  {
194
196
  id: 'add',
195
197
  icon: 'person-add',
196
198
  iconColor: '#30D158',
197
- title: 'Add Another Account',
198
- subtitle: 'Sign in with a different account',
199
+ title: t('accountCenter.items.addAccount.title') || 'Add Another Account',
200
+ subtitle: t('accountCenter.items.addAccount.subtitle') || 'Sign in with a different account',
199
201
  onPress: () => navigate('SignIn'),
200
202
  },
201
203
  ]}
@@ -205,39 +207,39 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
205
207
  )}
206
208
 
207
209
  {/* Additional Options */}
208
- <Section title="More Options" theme={theme}>
210
+ <Section title={t('accountCenter.sections.moreOptions') || 'More Options'} theme={theme}>
209
211
  <GroupedSection
210
212
  items={[
211
213
  ...(Platform.OS !== 'web' ? [{
212
214
  id: 'notifications',
213
215
  icon: 'notifications',
214
216
  iconColor: '#FF9500',
215
- title: 'Notifications',
216
- subtitle: 'Manage notification settings',
217
- onPress: () => toast.info('Notifications feature coming soon!'),
217
+ title: t('accountCenter.items.notifications.title') || 'Notifications',
218
+ subtitle: t('accountCenter.items.notifications.subtitle') || 'Manage notification settings',
219
+ onPress: () => toast.info(t('accountCenter.items.notifications.coming') || 'Notifications feature coming soon!'),
218
220
  }] : []),
219
221
  {
220
222
  id: 'language',
221
223
  icon: 'language',
222
224
  iconColor: '#32D74B',
223
- title: 'Language',
224
- subtitle: 'Choose your preferred language',
225
+ title: t('language.title') || 'Language',
226
+ subtitle: t('language.subtitle') || 'Choose your preferred language',
225
227
  onPress: () => navigate('LanguageSelector'),
226
228
  },
227
229
  {
228
230
  id: 'help',
229
231
  icon: 'help-circle',
230
232
  iconColor: '#007AFF',
231
- title: 'Help & Support',
232
- subtitle: 'Get help and contact support',
233
- onPress: () => toast.info('Help & Support feature coming soon!'),
233
+ title: t('accountOverview.items.help.title') || 'Help & Support',
234
+ subtitle: t('accountOverview.items.help.subtitle') || 'Get help and contact support',
235
+ onPress: () => toast.info(t('accountOverview.items.help.coming') || 'Help & Support feature coming soon!'),
234
236
  },
235
237
  {
236
238
  id: 'appinfo',
237
239
  icon: 'information-circle',
238
240
  iconColor: '#8E8E93',
239
- title: 'App Information',
240
- subtitle: 'Version and system details',
241
+ title: t('accountCenter.items.appInfo.title') || 'App Information',
242
+ subtitle: t('accountCenter.items.appInfo.subtitle') || 'Version and system details',
241
243
  onPress: () => navigate('AppInfo'),
242
244
  },
243
245
  ]}
@@ -250,7 +252,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
250
252
  <GroupedItem
251
253
  icon="log-out"
252
254
  iconColor={dangerColor}
253
- title={isLoading ? "Signing out..." : "Sign Out"}
255
+ title={isLoading ? (t('accountCenter.signingOut') || 'Signing out...') : (t('common.actions.signOut') || 'Sign Out')}
254
256
  theme={theme}
255
257
  onPress={confirmLogout}
256
258
  isFirst={true}
@@ -265,7 +267,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
265
267
 
266
268
  <View style={styles.versionContainer}>
267
269
  <Text style={[styles.versionText, { color: isDarkTheme ? '#666666' : '#999999' }]}>
268
- Version {packageInfo.version}
270
+ {t('accountCenter.version', { version: packageInfo.version }) || `Version ${packageInfo.version}`}
269
271
  </Text>
270
272
  </View>
271
273
  </ScrollView>