@oxyhq/services 5.4.2 → 5.4.3

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 (359) hide show
  1. package/lib/commonjs/assets/OxyLogo.svg +1 -0
  2. package/lib/commonjs/assets/assets/OxyLogo.svg +1 -0
  3. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  5. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  6. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  7. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  8. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  9. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  10. package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
  11. package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
  12. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  13. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  16. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  17. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  18. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  19. package/lib/commonjs/assets/icons/OxyServices.js +53 -0
  20. package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
  21. package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
  22. package/lib/commonjs/constants/version.js +28 -0
  23. package/lib/commonjs/constants/version.js.map +1 -0
  24. package/lib/commonjs/core/index.js +1660 -0
  25. package/lib/commonjs/core/index.js.map +1 -0
  26. package/lib/commonjs/index.js +160 -0
  27. package/lib/commonjs/index.js.map +1 -0
  28. package/lib/commonjs/lib/sonner.js +21 -0
  29. package/lib/commonjs/lib/sonner.js.map +1 -0
  30. package/lib/commonjs/models/interfaces.js +2 -0
  31. package/lib/commonjs/models/interfaces.js.map +1 -0
  32. package/lib/commonjs/models/secureSession.js +2 -0
  33. package/lib/commonjs/models/secureSession.js.map +1 -0
  34. package/lib/commonjs/node/index.js +54 -0
  35. package/lib/commonjs/node/index.js.map +1 -0
  36. package/lib/commonjs/ui/components/Avatar.js +98 -0
  37. package/lib/commonjs/ui/components/Avatar.js.map +1 -0
  38. package/lib/commonjs/ui/components/FollowButton.js +246 -0
  39. package/lib/commonjs/ui/components/FollowButton.js.map +1 -0
  40. package/lib/commonjs/ui/components/FontLoader.js +181 -0
  41. package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
  42. package/lib/commonjs/ui/components/GroupedItem.js +109 -0
  43. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
  44. package/lib/commonjs/ui/components/GroupedSection.js +33 -0
  45. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
  46. package/lib/commonjs/ui/components/OxyLogo.js +56 -0
  47. package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
  48. package/lib/commonjs/ui/components/OxyProvider.js +517 -0
  49. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
  50. package/lib/commonjs/ui/components/OxySignInButton.js +178 -0
  51. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
  52. package/lib/commonjs/ui/components/ProfileCard.js +124 -0
  53. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
  54. package/lib/commonjs/ui/components/QuickActions.js +87 -0
  55. package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
  56. package/lib/commonjs/ui/components/Section.js +36 -0
  57. package/lib/commonjs/ui/components/Section.js.map +1 -0
  58. package/lib/commonjs/ui/components/SectionTitle.js +35 -0
  59. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
  60. package/lib/commonjs/ui/components/bottomSheet/index.js +37 -0
  61. package/lib/commonjs/ui/components/bottomSheet/index.js.map +1 -0
  62. package/lib/commonjs/ui/components/icon/OxyIcon.js +27 -0
  63. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -0
  64. package/lib/commonjs/ui/components/icon/index.js +14 -0
  65. package/lib/commonjs/ui/components/icon/index.js.map +1 -0
  66. package/lib/commonjs/ui/components/index.js +97 -0
  67. package/lib/commonjs/ui/components/index.js.map +1 -0
  68. package/lib/commonjs/ui/context/OxyContext.js +584 -0
  69. package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
  70. package/lib/commonjs/ui/index.js +128 -0
  71. package/lib/commonjs/ui/index.js.map +1 -0
  72. package/lib/commonjs/ui/navigation/OxyRouter.js +264 -0
  73. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -0
  74. package/lib/commonjs/ui/navigation/types.js +6 -0
  75. package/lib/commonjs/ui/navigation/types.js.map +1 -0
  76. package/lib/commonjs/ui/screens/AccountCenterScreen.js +313 -0
  77. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
  78. package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
  79. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
  80. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +855 -0
  81. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
  82. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +843 -0
  83. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
  84. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +788 -0
  85. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
  86. package/lib/commonjs/ui/screens/AppInfoScreen.js +664 -0
  87. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -0
  88. package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
  89. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
  90. package/lib/commonjs/ui/screens/FileManagementScreen.js +2515 -0
  91. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
  92. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
  93. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  94. package/lib/commonjs/ui/screens/ProfileScreen.js +450 -0
  95. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -0
  96. package/lib/commonjs/ui/screens/SessionManagementScreen.js +449 -0
  97. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -0
  98. package/lib/commonjs/ui/screens/SignInScreen.js +1004 -0
  99. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -0
  100. package/lib/commonjs/ui/screens/SignUpScreen.js +937 -0
  101. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -0
  102. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +88 -0
  103. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
  104. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +364 -0
  105. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
  106. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +227 -0
  107. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
  108. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +148 -0
  109. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
  110. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +127 -0
  111. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
  112. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +105 -0
  113. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
  114. package/lib/commonjs/ui/styles/FONTS.md +126 -0
  115. package/lib/commonjs/ui/styles/fonts.js +84 -0
  116. package/lib/commonjs/ui/styles/fonts.js.map +1 -0
  117. package/lib/commonjs/ui/styles/index.js +28 -0
  118. package/lib/commonjs/ui/styles/index.js.map +1 -0
  119. package/lib/commonjs/ui/styles/theme.js +121 -0
  120. package/lib/commonjs/ui/styles/theme.js.map +1 -0
  121. package/lib/commonjs/utils/deviceManager.js +173 -0
  122. package/lib/commonjs/utils/deviceManager.js.map +1 -0
  123. package/lib/commonjs/utils/index.js +13 -0
  124. package/lib/commonjs/utils/index.js.map +1 -0
  125. package/lib/commonjs/utils/polyfills.js +42 -0
  126. package/lib/commonjs/utils/polyfills.js.map +1 -0
  127. package/lib/module/assets/OxyLogo.svg +1 -0
  128. package/lib/module/assets/assets/OxyLogo.svg +1 -0
  129. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  130. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  131. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  132. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  133. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  134. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  135. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  136. package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
  137. package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
  138. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  139. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  140. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  141. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  142. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  143. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  144. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  145. package/lib/module/assets/icons/OxyServices.js +46 -0
  146. package/lib/module/assets/icons/OxyServices.js.map +1 -0
  147. package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
  148. package/lib/module/constants/version.js +21 -0
  149. package/lib/module/constants/version.js.map +1 -0
  150. package/lib/module/core/index.js +1634 -0
  151. package/lib/module/core/index.js.map +1 -0
  152. package/lib/module/index.js +48 -0
  153. package/lib/module/index.js.map +1 -0
  154. package/lib/module/lib/sonner.js +16 -0
  155. package/lib/module/lib/sonner.js.map +1 -0
  156. package/lib/module/models/interfaces.js +2 -0
  157. package/lib/module/models/interfaces.js.map +1 -0
  158. package/lib/module/models/secureSession.js +2 -0
  159. package/lib/module/models/secureSession.js.map +1 -0
  160. package/lib/module/node/index.js +23 -0
  161. package/lib/module/node/index.js.map +1 -0
  162. package/lib/module/ui/components/Avatar.js +93 -0
  163. package/lib/module/ui/components/Avatar.js.map +1 -0
  164. package/lib/module/ui/components/FollowButton.js +241 -0
  165. package/lib/module/ui/components/FollowButton.js.map +1 -0
  166. package/lib/module/ui/components/FontLoader.js +176 -0
  167. package/lib/module/ui/components/FontLoader.js.map +1 -0
  168. package/lib/module/ui/components/GroupedItem.js +104 -0
  169. package/lib/module/ui/components/GroupedItem.js.map +1 -0
  170. package/lib/module/ui/components/GroupedSection.js +28 -0
  171. package/lib/module/ui/components/GroupedSection.js.map +1 -0
  172. package/lib/module/ui/components/OxyLogo.js +49 -0
  173. package/lib/module/ui/components/OxyLogo.js.map +1 -0
  174. package/lib/module/ui/components/OxyProvider.js +511 -0
  175. package/lib/module/ui/components/OxyProvider.js.map +1 -0
  176. package/lib/module/ui/components/OxySignInButton.js +172 -0
  177. package/lib/module/ui/components/OxySignInButton.js.map +1 -0
  178. package/lib/module/ui/components/ProfileCard.js +119 -0
  179. package/lib/module/ui/components/ProfileCard.js.map +1 -0
  180. package/lib/module/ui/components/QuickActions.js +82 -0
  181. package/lib/module/ui/components/QuickActions.js.map +1 -0
  182. package/lib/module/ui/components/Section.js +31 -0
  183. package/lib/module/ui/components/Section.js.map +1 -0
  184. package/lib/module/ui/components/SectionTitle.js +30 -0
  185. package/lib/module/ui/components/SectionTitle.js.map +1 -0
  186. package/lib/module/ui/components/bottomSheet/index.js +5 -0
  187. package/lib/module/ui/components/bottomSheet/index.js.map +1 -0
  188. package/lib/module/ui/components/icon/OxyIcon.js +22 -0
  189. package/lib/module/ui/components/icon/OxyIcon.js.map +1 -0
  190. package/lib/module/ui/components/icon/index.js +4 -0
  191. package/lib/module/ui/components/icon/index.js.map +1 -0
  192. package/lib/module/ui/components/index.js +18 -0
  193. package/lib/module/ui/components/index.js.map +1 -0
  194. package/lib/module/ui/context/OxyContext.js +579 -0
  195. package/lib/module/ui/context/OxyContext.js.map +1 -0
  196. package/lib/module/ui/index.js +24 -0
  197. package/lib/module/ui/index.js.map +1 -0
  198. package/lib/module/ui/navigation/OxyRouter.js +257 -0
  199. package/lib/module/ui/navigation/OxyRouter.js.map +1 -0
  200. package/lib/module/ui/navigation/types.js +4 -0
  201. package/lib/module/ui/navigation/types.js.map +1 -0
  202. package/lib/module/ui/screens/AccountCenterScreen.js +308 -0
  203. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
  204. package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
  205. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
  206. package/lib/module/ui/screens/AccountOverviewScreen.js +849 -0
  207. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
  208. package/lib/module/ui/screens/AccountSettingsScreen.js +837 -0
  209. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
  210. package/lib/module/ui/screens/AccountSwitcherScreen.js +782 -0
  211. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
  212. package/lib/module/ui/screens/AppInfoScreen.js +658 -0
  213. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -0
  214. package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
  215. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
  216. package/lib/module/ui/screens/FileManagementScreen.js +2510 -0
  217. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
  218. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
  219. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  220. package/lib/module/ui/screens/ProfileScreen.js +444 -0
  221. package/lib/module/ui/screens/ProfileScreen.js.map +1 -0
  222. package/lib/module/ui/screens/SessionManagementScreen.js +444 -0
  223. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -0
  224. package/lib/module/ui/screens/SignInScreen.js +998 -0
  225. package/lib/module/ui/screens/SignInScreen.js.map +1 -0
  226. package/lib/module/ui/screens/SignUpScreen.js +932 -0
  227. package/lib/module/ui/screens/SignUpScreen.js.map +1 -0
  228. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +83 -0
  229. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
  230. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +358 -0
  231. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
  232. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +222 -0
  233. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
  234. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +142 -0
  235. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
  236. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +122 -0
  237. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
  238. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +100 -0
  239. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
  240. package/lib/module/ui/styles/FONTS.md +126 -0
  241. package/lib/module/ui/styles/fonts.js +81 -0
  242. package/lib/module/ui/styles/fonts.js.map +1 -0
  243. package/lib/module/ui/styles/index.js +5 -0
  244. package/lib/module/ui/styles/index.js.map +1 -0
  245. package/lib/module/ui/styles/theme.js +114 -0
  246. package/lib/module/ui/styles/theme.js.map +1 -0
  247. package/lib/module/utils/deviceManager.js +167 -0
  248. package/lib/module/utils/deviceManager.js.map +1 -0
  249. package/lib/module/utils/index.js +4 -0
  250. package/lib/module/utils/index.js.map +1 -0
  251. package/lib/module/utils/polyfills.js +36 -0
  252. package/lib/module/utils/polyfills.js.map +1 -0
  253. package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
  254. package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
  255. package/lib/typescript/constants/version.d.ts +14 -0
  256. package/lib/typescript/constants/version.d.ts.map +1 -0
  257. package/lib/typescript/core/index.d.ts +603 -0
  258. package/lib/typescript/core/index.d.ts.map +1 -0
  259. package/lib/typescript/index.d.ts +20 -0
  260. package/lib/typescript/index.d.ts.map +1 -0
  261. package/lib/typescript/lib/sonner.d.ts +6 -0
  262. package/lib/typescript/lib/sonner.d.ts.map +1 -0
  263. package/lib/typescript/models/interfaces.d.ts +179 -0
  264. package/lib/typescript/models/interfaces.d.ts.map +1 -0
  265. package/lib/typescript/models/secureSession.d.ts +27 -0
  266. package/lib/typescript/models/secureSession.d.ts.map +1 -0
  267. package/lib/typescript/node/index.d.ts +11 -0
  268. package/lib/typescript/node/index.d.ts.map +1 -0
  269. package/lib/typescript/ui/components/Avatar.d.ts +62 -0
  270. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -0
  271. package/lib/typescript/ui/components/FollowButton.d.ts +92 -0
  272. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -0
  273. package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
  274. package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
  275. package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
  276. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
  277. package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
  278. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
  279. package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
  280. package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
  281. package/lib/typescript/ui/components/OxyProvider.d.ts +12 -0
  282. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
  283. package/lib/typescript/ui/components/OxySignInButton.d.ts +70 -0
  284. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
  285. package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
  286. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
  287. package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
  288. package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
  289. package/lib/typescript/ui/components/Section.d.ts +11 -0
  290. package/lib/typescript/ui/components/Section.d.ts.map +1 -0
  291. package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
  292. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
  293. package/lib/typescript/ui/components/bottomSheet/index.d.ts +4 -0
  294. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -0
  295. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +10 -0
  296. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -0
  297. package/lib/typescript/ui/components/icon/index.d.ts +3 -0
  298. package/lib/typescript/ui/components/icon/index.d.ts.map +1 -0
  299. package/lib/typescript/ui/components/index.d.ts +13 -0
  300. package/lib/typescript/ui/components/index.d.ts.map +1 -0
  301. package/lib/typescript/ui/context/OxyContext.d.ts +42 -0
  302. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
  303. package/lib/typescript/ui/index.d.ts +15 -0
  304. package/lib/typescript/ui/index.d.ts.map +1 -0
  305. package/lib/typescript/ui/navigation/OxyRouter.d.ts +5 -0
  306. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -0
  307. package/lib/typescript/ui/navigation/types.d.ts +116 -0
  308. package/lib/typescript/ui/navigation/types.d.ts.map +1 -0
  309. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
  310. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
  311. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
  312. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
  313. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
  314. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
  315. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +5 -0
  316. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
  317. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +5 -0
  318. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
  319. package/lib/typescript/ui/screens/AppInfoScreen.d.ts +5 -0
  320. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -0
  321. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
  322. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
  323. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
  324. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
  325. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
  326. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
  327. package/lib/typescript/ui/screens/ProfileScreen.d.ts +9 -0
  328. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -0
  329. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +5 -0
  330. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -0
  331. package/lib/typescript/ui/screens/SignInScreen.d.ts +5 -0
  332. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -0
  333. package/lib/typescript/ui/screens/SignUpScreen.d.ts +5 -0
  334. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -0
  335. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +5 -0
  336. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -0
  337. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +5 -0
  338. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -0
  339. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +5 -0
  340. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -0
  341. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +5 -0
  342. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -0
  343. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +5 -0
  344. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -0
  345. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +5 -0
  346. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -0
  347. package/lib/typescript/ui/styles/fonts.d.ts +21 -0
  348. package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
  349. package/lib/typescript/ui/styles/index.d.ts +3 -0
  350. package/lib/typescript/ui/styles/index.d.ts.map +1 -0
  351. package/lib/typescript/ui/styles/theme.d.ts +68 -0
  352. package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
  353. package/lib/typescript/utils/deviceManager.d.ts +66 -0
  354. package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
  355. package/lib/typescript/utils/index.d.ts +3 -0
  356. package/lib/typescript/utils/index.d.ts.map +1 -0
  357. package/lib/typescript/utils/polyfills.d.ts +6 -0
  358. package/lib/typescript/utils/polyfills.d.ts.map +1 -0
  359. package/package.json +20 -4
@@ -0,0 +1,932 @@
1
+ "use strict";
2
+
3
+ import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
4
+ import { View, Text, TextInput, TouchableOpacity, StyleSheet, ActivityIndicator, Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar } from 'react-native';
5
+ import { useOxy } from "../context/OxyContext.js";
6
+ import { useThemeColors, createCommonStyles } from "../styles/index.js";
7
+ import { Ionicons } from '@expo/vector-icons';
8
+ import Svg, { Path, Circle } from 'react-native-svg';
9
+ import { toast } from "../../lib/sonner.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const SignUpScreen = ({
12
+ navigate,
13
+ goBack,
14
+ theme
15
+ }) => {
16
+ // Form data states
17
+ const [username, setUsername] = useState('');
18
+ const [email, setEmail] = useState('');
19
+ const [password, setPassword] = useState('');
20
+ const [confirmPassword, setConfirmPassword] = useState('');
21
+ const [showPassword, setShowPassword] = useState(false);
22
+ const [showConfirmPassword, setShowConfirmPassword] = useState(false);
23
+ const [errorMessage, setErrorMessage] = useState('');
24
+
25
+ // Multi-step form states
26
+ const [currentStep, setCurrentStep] = useState(0);
27
+ const [isInputFocused, setIsInputFocused] = useState(false);
28
+ const [isValidating, setIsValidating] = useState(false);
29
+ const [validationStatus, setValidationStatus] = useState('idle');
30
+
31
+ // Cache for validation results
32
+ const validationCache = useRef(new Map());
33
+ const fadeAnim = useRef(new Animated.Value(1)).current;
34
+ const slideAnim = useRef(new Animated.Value(0)).current;
35
+ const heightAnim = useRef(new Animated.Value(400)).current;
36
+ const [containerHeight, setContainerHeight] = useState(400);
37
+ const {
38
+ signUp,
39
+ isLoading,
40
+ user,
41
+ isAuthenticated,
42
+ oxyServices
43
+ } = useOxy();
44
+ const colors = useThemeColors(theme);
45
+ const commonStyles = createCommonStyles(theme);
46
+
47
+ // Memoized styles to prevent rerenders
48
+ const styles = useMemo(() => createStyles(colors, theme), [colors, theme]);
49
+
50
+ // Input focus animations
51
+ const handleInputFocus = useCallback(() => {
52
+ setIsInputFocused(true);
53
+ }, []);
54
+ const handleInputBlur = useCallback(() => {
55
+ setIsInputFocused(false);
56
+ }, []);
57
+
58
+ // Memoized input change handlers
59
+ const handleUsernameChange = useCallback(text => {
60
+ setUsername(text);
61
+ if (validationStatus === 'invalid') {
62
+ setErrorMessage('');
63
+ setValidationStatus('idle');
64
+ }
65
+ }, [validationStatus]);
66
+ const handleEmailChange = useCallback(text => {
67
+ setEmail(text);
68
+ setErrorMessage('');
69
+ }, []);
70
+ const handlePasswordChange = useCallback(text => {
71
+ setPassword(text);
72
+ setErrorMessage('');
73
+ }, []);
74
+ const handleConfirmPasswordChange = useCallback(text => {
75
+ setConfirmPassword(text);
76
+ setErrorMessage('');
77
+ }, []);
78
+
79
+ // Username availability validation using core services
80
+ const validateUsername = useCallback(async usernameToValidate => {
81
+ if (!usernameToValidate || usernameToValidate.length < 3) {
82
+ setValidationStatus('invalid');
83
+ return false;
84
+ }
85
+
86
+ // Check cache first (cache valid for 5 minutes)
87
+ const cached = validationCache.current.get(usernameToValidate);
88
+ const now = Date.now();
89
+ if (cached && now - cached.timestamp < 5 * 60 * 1000) {
90
+ setValidationStatus(cached.available ? 'valid' : 'invalid');
91
+ setErrorMessage(cached.available ? '' : 'Username is already taken');
92
+ return cached.available;
93
+ }
94
+ setIsValidating(true);
95
+ setValidationStatus('validating');
96
+ try {
97
+ const result = await oxyServices.checkUsernameAvailability(usernameToValidate);
98
+ if (result.available) {
99
+ setValidationStatus('valid');
100
+ setErrorMessage('');
101
+
102
+ // Cache the result
103
+ validationCache.current.set(usernameToValidate, {
104
+ available: true,
105
+ timestamp: now
106
+ });
107
+ return true;
108
+ } else {
109
+ setValidationStatus('invalid');
110
+ setErrorMessage(result.message || 'Username is already taken');
111
+
112
+ // Cache the result
113
+ validationCache.current.set(usernameToValidate, {
114
+ available: false,
115
+ timestamp: now
116
+ });
117
+ return false;
118
+ }
119
+ } catch (error) {
120
+ console.error('Username validation error:', error);
121
+ setValidationStatus('invalid');
122
+ setErrorMessage('Unable to validate username. Please try again.');
123
+ return false;
124
+ } finally {
125
+ setIsValidating(false);
126
+ }
127
+ }, [oxyServices]);
128
+
129
+ // Debounced username validation
130
+ useEffect(() => {
131
+ if (!username || username.length < 3) {
132
+ setValidationStatus('idle');
133
+ setErrorMessage('');
134
+ return;
135
+ }
136
+ const timeoutId = setTimeout(() => {
137
+ validateUsername(username);
138
+ }, 800);
139
+ return () => clearTimeout(timeoutId);
140
+ }, [username, validateUsername]);
141
+
142
+ // Cleanup cache on unmount
143
+ useEffect(() => {
144
+ return () => {
145
+ validationCache.current.clear();
146
+ };
147
+ }, []);
148
+
149
+ // Animation functions
150
+ const animateTransition = useCallback(nextStep => {
151
+ Animated.timing(fadeAnim, {
152
+ toValue: 0,
153
+ duration: 250,
154
+ useNativeDriver: true
155
+ }).start(() => {
156
+ setCurrentStep(nextStep);
157
+ slideAnim.setValue(-100);
158
+ Animated.parallel([Animated.timing(fadeAnim, {
159
+ toValue: 1,
160
+ duration: 250,
161
+ useNativeDriver: true
162
+ }), Animated.timing(slideAnim, {
163
+ toValue: 0,
164
+ duration: 300,
165
+ useNativeDriver: true
166
+ })]).start();
167
+ });
168
+ }, [fadeAnim, slideAnim]);
169
+ const nextStep = useCallback(() => {
170
+ if (currentStep < 3) {
171
+ animateTransition(currentStep + 1);
172
+ }
173
+ }, [currentStep, animateTransition]);
174
+ const prevStep = useCallback(() => {
175
+ if (currentStep > 0) {
176
+ animateTransition(currentStep - 1);
177
+ }
178
+ }, [currentStep, animateTransition]);
179
+ const validateEmail = useCallback(email => {
180
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
181
+ return emailRegex.test(email);
182
+ }, []);
183
+ const handleSignUp = useCallback(async () => {
184
+ if (!username || !email || !password || !confirmPassword) {
185
+ toast.error('Please fill in all fields');
186
+ return;
187
+ }
188
+ if (!validateEmail(email)) {
189
+ toast.error('Please enter a valid email address');
190
+ return;
191
+ }
192
+ if (validationStatus !== 'valid') {
193
+ toast.error('Please enter a valid username');
194
+ return;
195
+ }
196
+ if (password !== confirmPassword) {
197
+ toast.error('Passwords do not match');
198
+ return;
199
+ }
200
+ if (password.length < 8) {
201
+ toast.error('Password must be at least 8 characters long');
202
+ return;
203
+ }
204
+ try {
205
+ setErrorMessage('');
206
+ await signUp(username, email, password);
207
+ toast.success('Account created successfully! Welcome to Oxy!');
208
+ } catch (error) {
209
+ toast.error(error.message || 'Sign up failed');
210
+ }
211
+ }, [username, email, password, confirmPassword, validationStatus, validateEmail, signUp]);
212
+
213
+ // Step components
214
+ const renderWelcomeStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
215
+ style: [styles.stepContainer, {
216
+ opacity: fadeAnim,
217
+ transform: [{
218
+ translateX: slideAnim
219
+ }]
220
+ }],
221
+ children: [/*#__PURE__*/_jsx(View, {
222
+ style: styles.welcomeImageContainer,
223
+ children: /*#__PURE__*/_jsxs(Svg, {
224
+ width: 220,
225
+ height: 120,
226
+ viewBox: "0 0 220 120",
227
+ children: [/*#__PURE__*/_jsx(Path, {
228
+ d: "M30 100 Q60 20 110 60 Q160 100 190 40",
229
+ stroke: colors.primary,
230
+ strokeWidth: "8",
231
+ fill: "none"
232
+ }), /*#__PURE__*/_jsx(Circle, {
233
+ cx: "60",
234
+ cy: "60",
235
+ r: "18",
236
+ fill: colors.primary,
237
+ opacity: "0.18"
238
+ }), /*#__PURE__*/_jsx(Circle, {
239
+ cx: "110",
240
+ cy: "60",
241
+ r: "24",
242
+ fill: colors.primary,
243
+ opacity: "0.25"
244
+ }), /*#__PURE__*/_jsx(Circle, {
245
+ cx: "170",
246
+ cy: "50",
247
+ r: "14",
248
+ fill: colors.primary,
249
+ opacity: "0.15"
250
+ }), /*#__PURE__*/_jsx(Circle, {
251
+ cx: "110",
252
+ cy: "60",
253
+ r: "32",
254
+ fill: "#fff",
255
+ opacity: "0.7"
256
+ }), /*#__PURE__*/_jsx(Circle, {
257
+ cx: "100",
258
+ cy: "55",
259
+ r: "4",
260
+ fill: colors.primary
261
+ }), /*#__PURE__*/_jsx(Circle, {
262
+ cx: "120",
263
+ cy: "55",
264
+ r: "4",
265
+ fill: colors.primary
266
+ }), /*#__PURE__*/_jsx(Path, {
267
+ d: "M104 68 Q110 75 116 68",
268
+ stroke: colors.primary,
269
+ strokeWidth: "2",
270
+ fill: "none",
271
+ strokeLinecap: "round"
272
+ })]
273
+ })
274
+ }), /*#__PURE__*/_jsx(Text, {
275
+ style: [styles.welcomeText, {
276
+ color: colors.text
277
+ }],
278
+ children: "We're excited to have you join us. Let's get your account set up in just a few easy steps."
279
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
280
+ style: [styles.button, {
281
+ backgroundColor: colors.primary
282
+ }],
283
+ onPress: nextStep,
284
+ testID: "welcome-next-button",
285
+ children: /*#__PURE__*/_jsx(Text, {
286
+ style: styles.buttonText,
287
+ children: "Get Started"
288
+ })
289
+ }), /*#__PURE__*/_jsxs(View, {
290
+ style: styles.footerTextContainer,
291
+ children: [/*#__PURE__*/_jsxs(Text, {
292
+ style: [styles.footerText, {
293
+ color: colors.text
294
+ }],
295
+ children: ["Already have an account?", ' ']
296
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
297
+ onPress: () => navigate('SignIn'),
298
+ children: /*#__PURE__*/_jsx(Text, {
299
+ style: [styles.linkText, {
300
+ color: colors.primary
301
+ }],
302
+ children: "Sign In"
303
+ })
304
+ })]
305
+ })]
306
+ }), [fadeAnim, slideAnim, colors, nextStep, navigate, styles]);
307
+ const renderIdentityStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
308
+ style: [styles.stepContainer, {
309
+ opacity: fadeAnim,
310
+ transform: [{
311
+ translateX: slideAnim
312
+ }]
313
+ }],
314
+ children: [/*#__PURE__*/_jsx(Text, {
315
+ style: [styles.stepTitle, {
316
+ color: colors.text
317
+ }],
318
+ children: "Who are you?"
319
+ }), /*#__PURE__*/_jsxs(View, {
320
+ style: styles.inputContainer,
321
+ children: [/*#__PURE__*/_jsx(Text, {
322
+ style: [styles.label, {
323
+ color: colors.text
324
+ }],
325
+ children: "Username"
326
+ }), /*#__PURE__*/_jsxs(View, {
327
+ style: {
328
+ position: 'relative'
329
+ },
330
+ children: [/*#__PURE__*/_jsx(TextInput, {
331
+ style: [styles.input, {
332
+ backgroundColor: colors.inputBackground,
333
+ borderColor: colors.border,
334
+ color: colors.text
335
+ }],
336
+ placeholder: "Choose a username",
337
+ placeholderTextColor: colors.placeholder,
338
+ value: username,
339
+ onChangeText: handleUsernameChange,
340
+ autoCapitalize: "none",
341
+ testID: "username-input"
342
+ }), validationStatus === 'validating' && /*#__PURE__*/_jsx(ActivityIndicator, {
343
+ size: "small",
344
+ color: colors.primary,
345
+ style: styles.validationIndicator
346
+ }), validationStatus === 'valid' && /*#__PURE__*/_jsx(Ionicons, {
347
+ name: "checkmark-circle",
348
+ size: 20,
349
+ color: colors.success,
350
+ style: styles.validationIndicator
351
+ }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/_jsx(Ionicons, {
352
+ name: "close-circle",
353
+ size: 20,
354
+ color: colors.error,
355
+ style: styles.validationIndicator
356
+ })]
357
+ }), validationStatus === 'valid' && /*#__PURE__*/_jsxs(View, {
358
+ style: [styles.validationSuccessCard, {
359
+ backgroundColor: colors.success + '15'
360
+ }],
361
+ children: [/*#__PURE__*/_jsx(Ionicons, {
362
+ name: "checkmark-circle",
363
+ size: 16,
364
+ color: colors.success
365
+ }), /*#__PURE__*/_jsx(Text, {
366
+ style: [styles.validationText, {
367
+ color: colors.success
368
+ }],
369
+ children: "Username is available"
370
+ })]
371
+ }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/_jsxs(View, {
372
+ style: [styles.validationErrorCard, {
373
+ backgroundColor: colors.error + '15'
374
+ }],
375
+ children: [/*#__PURE__*/_jsx(Ionicons, {
376
+ name: "alert-circle",
377
+ size: 16,
378
+ color: colors.error
379
+ }), /*#__PURE__*/_jsx(Text, {
380
+ style: [styles.validationText, {
381
+ color: colors.error
382
+ }],
383
+ children: errorMessage || 'Username is already taken'
384
+ })]
385
+ })]
386
+ }), /*#__PURE__*/_jsxs(View, {
387
+ style: styles.inputContainer,
388
+ children: [/*#__PURE__*/_jsx(Text, {
389
+ style: [styles.label, {
390
+ color: colors.text
391
+ }],
392
+ children: "Email"
393
+ }), /*#__PURE__*/_jsx(TextInput, {
394
+ style: [styles.input, {
395
+ backgroundColor: colors.inputBackground,
396
+ borderColor: colors.border,
397
+ color: colors.text
398
+ }],
399
+ placeholder: "Enter your email",
400
+ placeholderTextColor: colors.placeholder,
401
+ value: email,
402
+ onChangeText: handleEmailChange,
403
+ autoCapitalize: "none",
404
+ keyboardType: "email-address",
405
+ testID: "email-input"
406
+ })]
407
+ }), /*#__PURE__*/_jsxs(View, {
408
+ style: styles.navigationButtons,
409
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
410
+ style: [styles.navButton, styles.backButton, {
411
+ borderColor: colors.border
412
+ }],
413
+ onPress: prevStep,
414
+ children: /*#__PURE__*/_jsx(Text, {
415
+ style: [styles.navButtonText, {
416
+ color: colors.text
417
+ }],
418
+ children: "Back"
419
+ })
420
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
421
+ style: [styles.navButton, styles.nextButton, {
422
+ backgroundColor: colors.primary
423
+ }],
424
+ onPress: nextStep,
425
+ disabled: !username || !email || !validateEmail(email) || validationStatus !== 'valid',
426
+ children: /*#__PURE__*/_jsx(Text, {
427
+ style: [styles.navButtonText, {
428
+ color: '#FFFFFF'
429
+ }],
430
+ children: "Next"
431
+ })
432
+ })]
433
+ })]
434
+ }), [fadeAnim, slideAnim, colors, username, email, validationStatus, errorMessage, handleUsernameChange, handleEmailChange, validateEmail, prevStep, nextStep, styles]);
435
+ const renderSecurityStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
436
+ style: [styles.stepContainer, {
437
+ opacity: fadeAnim,
438
+ transform: [{
439
+ translateX: slideAnim
440
+ }]
441
+ }],
442
+ children: [/*#__PURE__*/_jsx(Text, {
443
+ style: [styles.stepTitle, {
444
+ color: colors.text
445
+ }],
446
+ children: "Secure your account"
447
+ }), /*#__PURE__*/_jsxs(View, {
448
+ style: styles.inputContainer,
449
+ children: [/*#__PURE__*/_jsx(Text, {
450
+ style: [styles.label, {
451
+ color: colors.text
452
+ }],
453
+ children: "Password"
454
+ }), /*#__PURE__*/_jsxs(View, {
455
+ style: {
456
+ position: 'relative'
457
+ },
458
+ children: [/*#__PURE__*/_jsx(TextInput, {
459
+ style: [styles.input, {
460
+ backgroundColor: colors.inputBackground,
461
+ borderColor: colors.border,
462
+ color: colors.text
463
+ }],
464
+ placeholder: "Create a password",
465
+ placeholderTextColor: colors.placeholder,
466
+ value: password,
467
+ onChangeText: handlePasswordChange,
468
+ secureTextEntry: !showPassword,
469
+ testID: "password-input"
470
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
471
+ style: styles.passwordToggle,
472
+ onPress: () => setShowPassword(!showPassword),
473
+ children: /*#__PURE__*/_jsx(Ionicons, {
474
+ name: showPassword ? 'eye-off' : 'eye',
475
+ size: 20,
476
+ color: colors.placeholder
477
+ })
478
+ })]
479
+ }), /*#__PURE__*/_jsx(Text, {
480
+ style: [styles.passwordHint, {
481
+ color: colors.secondaryText
482
+ }],
483
+ children: "Password must be at least 8 characters long"
484
+ })]
485
+ }), /*#__PURE__*/_jsxs(View, {
486
+ style: styles.inputContainer,
487
+ children: [/*#__PURE__*/_jsx(Text, {
488
+ style: [styles.label, {
489
+ color: colors.text
490
+ }],
491
+ children: "Confirm Password"
492
+ }), /*#__PURE__*/_jsxs(View, {
493
+ style: {
494
+ position: 'relative'
495
+ },
496
+ children: [/*#__PURE__*/_jsx(TextInput, {
497
+ style: [styles.input, {
498
+ backgroundColor: colors.inputBackground,
499
+ borderColor: colors.border,
500
+ color: colors.text
501
+ }],
502
+ placeholder: "Confirm your password",
503
+ placeholderTextColor: colors.placeholder,
504
+ value: confirmPassword,
505
+ onChangeText: handleConfirmPasswordChange,
506
+ secureTextEntry: !showConfirmPassword,
507
+ testID: "confirm-password-input"
508
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
509
+ style: styles.passwordToggle,
510
+ onPress: () => setShowConfirmPassword(!showConfirmPassword),
511
+ children: /*#__PURE__*/_jsx(Ionicons, {
512
+ name: showConfirmPassword ? 'eye-off' : 'eye',
513
+ size: 20,
514
+ color: colors.placeholder
515
+ })
516
+ })]
517
+ })]
518
+ }), /*#__PURE__*/_jsxs(View, {
519
+ style: styles.navigationButtons,
520
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
521
+ style: [styles.navButton, styles.backButton, {
522
+ borderColor: colors.border
523
+ }],
524
+ onPress: prevStep,
525
+ children: /*#__PURE__*/_jsx(Text, {
526
+ style: [styles.navButtonText, {
527
+ color: colors.text
528
+ }],
529
+ children: "Back"
530
+ })
531
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
532
+ style: [styles.navButton, styles.nextButton, {
533
+ backgroundColor: colors.primary
534
+ }],
535
+ onPress: nextStep,
536
+ disabled: !password || password.length < 8 || password !== confirmPassword,
537
+ children: /*#__PURE__*/_jsx(Text, {
538
+ style: [styles.navButtonText, {
539
+ color: '#FFFFFF'
540
+ }],
541
+ children: "Next"
542
+ })
543
+ })]
544
+ })]
545
+ }), [fadeAnim, slideAnim, colors, password, confirmPassword, showPassword, showConfirmPassword, handlePasswordChange, handleConfirmPasswordChange, prevStep, nextStep, styles]);
546
+ const renderSummaryStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
547
+ style: [styles.stepContainer, {
548
+ opacity: fadeAnim,
549
+ transform: [{
550
+ translateX: slideAnim
551
+ }]
552
+ }],
553
+ children: [/*#__PURE__*/_jsx(Text, {
554
+ style: [styles.stepTitle, {
555
+ color: colors.text
556
+ }],
557
+ children: "Ready to join"
558
+ }), /*#__PURE__*/_jsxs(View, {
559
+ style: styles.summaryContainer,
560
+ children: [/*#__PURE__*/_jsxs(View, {
561
+ style: styles.summaryRow,
562
+ children: [/*#__PURE__*/_jsx(Text, {
563
+ style: [styles.summaryLabel, {
564
+ color: colors.secondaryText
565
+ }],
566
+ children: "Username:"
567
+ }), /*#__PURE__*/_jsx(Text, {
568
+ style: [styles.summaryValue, {
569
+ color: colors.text
570
+ }],
571
+ children: username
572
+ })]
573
+ }), /*#__PURE__*/_jsxs(View, {
574
+ style: styles.summaryRow,
575
+ children: [/*#__PURE__*/_jsx(Text, {
576
+ style: [styles.summaryLabel, {
577
+ color: colors.secondaryText
578
+ }],
579
+ children: "Email:"
580
+ }), /*#__PURE__*/_jsx(Text, {
581
+ style: [styles.summaryValue, {
582
+ color: colors.text
583
+ }],
584
+ children: email
585
+ })]
586
+ })]
587
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
588
+ style: [styles.button, {
589
+ backgroundColor: colors.primary
590
+ }],
591
+ onPress: handleSignUp,
592
+ disabled: isLoading,
593
+ testID: "signup-button",
594
+ children: isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
595
+ color: "#FFFFFF",
596
+ size: "small"
597
+ }) : /*#__PURE__*/_jsx(Text, {
598
+ style: styles.buttonText,
599
+ children: "Create Account"
600
+ })
601
+ }), /*#__PURE__*/_jsx(View, {
602
+ style: styles.navigationButtons,
603
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
604
+ style: [styles.navButton, styles.backButton, {
605
+ borderColor: colors.border
606
+ }],
607
+ onPress: prevStep,
608
+ children: /*#__PURE__*/_jsx(Text, {
609
+ style: [styles.navButtonText, {
610
+ color: colors.text
611
+ }],
612
+ children: "Back"
613
+ })
614
+ })
615
+ })]
616
+ }), [fadeAnim, slideAnim, colors, username, email, isLoading, handleSignUp, prevStep, styles]);
617
+ const renderProgressIndicators = useMemo(() => /*#__PURE__*/_jsx(View, {
618
+ style: styles.progressContainer,
619
+ children: [0, 1, 2, 3].map(step => /*#__PURE__*/_jsx(View, {
620
+ style: [styles.progressDot, currentStep === step ? {
621
+ backgroundColor: colors.primary,
622
+ width: 24
623
+ } : {
624
+ backgroundColor: colors.border
625
+ }]
626
+ }, step))
627
+ }), [currentStep, colors, styles]);
628
+ const renderCurrentStep = useCallback(() => {
629
+ switch (currentStep) {
630
+ case 0:
631
+ return renderWelcomeStep;
632
+ case 1:
633
+ return renderIdentityStep;
634
+ case 2:
635
+ return renderSecurityStep;
636
+ case 3:
637
+ return renderSummaryStep;
638
+ default:
639
+ return renderWelcomeStep;
640
+ }
641
+ }, [currentStep, renderWelcomeStep, renderIdentityStep, renderSecurityStep, renderSummaryStep]);
642
+
643
+ // If user is already authenticated, show user info and account center option
644
+ if (user && isAuthenticated) {
645
+ return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
646
+ style: [styles.container, {
647
+ backgroundColor: colors.background
648
+ }],
649
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height',
650
+ children: [/*#__PURE__*/_jsx(StatusBar, {
651
+ barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
652
+ backgroundColor: colors.background
653
+ }), /*#__PURE__*/_jsxs(ScrollView, {
654
+ contentContainerStyle: styles.scrollContent,
655
+ showsVerticalScrollIndicator: false,
656
+ children: [/*#__PURE__*/_jsxs(Text, {
657
+ style: [styles.welcomeTitle, {
658
+ color: colors.text
659
+ }],
660
+ children: ["Welcome, ", user.username, "!"]
661
+ }), /*#__PURE__*/_jsxs(View, {
662
+ style: [styles.userInfoContainer, {
663
+ backgroundColor: colors.inputBackground
664
+ }],
665
+ children: [/*#__PURE__*/_jsx(Text, {
666
+ style: [styles.userInfoText, {
667
+ color: colors.text
668
+ }],
669
+ children: "You are already signed in."
670
+ }), user.email && /*#__PURE__*/_jsxs(Text, {
671
+ style: [styles.userInfoText, {
672
+ color: colors.secondaryText
673
+ }],
674
+ children: ["Email: ", user.email]
675
+ })]
676
+ }), /*#__PURE__*/_jsx(View, {
677
+ style: styles.actionButtonsContainer,
678
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
679
+ style: [styles.button, {
680
+ backgroundColor: colors.primary
681
+ }],
682
+ onPress: () => navigate('AccountCenter'),
683
+ children: /*#__PURE__*/_jsx(Text, {
684
+ style: styles.buttonText,
685
+ children: "Go to Account Center"
686
+ })
687
+ })
688
+ })]
689
+ })]
690
+ });
691
+ }
692
+ return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
693
+ style: [styles.container, {
694
+ backgroundColor: colors.background
695
+ }],
696
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height',
697
+ children: [/*#__PURE__*/_jsx(StatusBar, {
698
+ barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
699
+ backgroundColor: colors.background
700
+ }), /*#__PURE__*/_jsxs(ScrollView, {
701
+ contentContainerStyle: styles.scrollContent,
702
+ showsVerticalScrollIndicator: false,
703
+ keyboardShouldPersistTaps: "handled",
704
+ children: [renderProgressIndicators, renderCurrentStep()]
705
+ })]
706
+ });
707
+ };
708
+
709
+ // Memoized styles creation
710
+ const createStyles = (colors, theme) => StyleSheet.create({
711
+ container: {
712
+ flex: 1
713
+ },
714
+ scrollContent: {
715
+ flexGrow: 1,
716
+ paddingHorizontal: 24,
717
+ paddingTop: 40,
718
+ paddingBottom: 40
719
+ },
720
+ stepContainer: {
721
+ flex: 1,
722
+ justifyContent: 'center',
723
+ alignItems: 'center',
724
+ minHeight: 500
725
+ },
726
+ welcomeImageContainer: {
727
+ alignItems: 'center',
728
+ justifyContent: 'center',
729
+ marginVertical: 30
730
+ },
731
+ welcomeTitle: {
732
+ fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
733
+ fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
734
+ fontSize: 42,
735
+ lineHeight: 48,
736
+ marginBottom: 24,
737
+ textAlign: 'left',
738
+ letterSpacing: -1
739
+ },
740
+ welcomeText: {
741
+ fontSize: 16,
742
+ textAlign: 'left',
743
+ marginBottom: 30,
744
+ lineHeight: 24
745
+ },
746
+ stepTitle: {
747
+ fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
748
+ fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
749
+ fontSize: 34,
750
+ marginBottom: 20,
751
+ color: colors.primary,
752
+ maxWidth: '90%',
753
+ textAlign: 'left'
754
+ },
755
+ inputContainer: {
756
+ marginBottom: 18,
757
+ width: '100%'
758
+ },
759
+ label: {
760
+ fontSize: 15,
761
+ marginBottom: 8,
762
+ fontWeight: '500',
763
+ letterSpacing: 0.1
764
+ },
765
+ input: {
766
+ height: 48,
767
+ borderRadius: 16,
768
+ paddingHorizontal: 16,
769
+ borderWidth: 1,
770
+ fontSize: 16,
771
+ marginBottom: 2
772
+ },
773
+ validationIndicator: {
774
+ position: 'absolute',
775
+ right: 16,
776
+ top: 14
777
+ },
778
+ validationSuccessCard: {
779
+ flexDirection: 'row',
780
+ alignItems: 'center',
781
+ padding: 12,
782
+ borderRadius: 12,
783
+ marginTop: 8,
784
+ gap: 8
785
+ },
786
+ validationErrorCard: {
787
+ flexDirection: 'row',
788
+ alignItems: 'center',
789
+ padding: 12,
790
+ borderRadius: 12,
791
+ marginTop: 8,
792
+ gap: 8
793
+ },
794
+ validationText: {
795
+ fontSize: 12,
796
+ fontWeight: '500'
797
+ },
798
+ passwordToggle: {
799
+ position: 'absolute',
800
+ right: 16,
801
+ top: 14,
802
+ padding: 4
803
+ },
804
+ passwordHint: {
805
+ fontSize: 12,
806
+ marginTop: 4
807
+ },
808
+ button: {
809
+ height: 48,
810
+ borderRadius: 24,
811
+ alignItems: 'center',
812
+ justifyContent: 'center',
813
+ marginTop: 24,
814
+ shadowColor: colors.primary,
815
+ shadowOpacity: 0.12,
816
+ shadowOffset: {
817
+ width: 0,
818
+ height: 2
819
+ },
820
+ shadowRadius: 8,
821
+ elevation: 2,
822
+ width: '100%'
823
+ },
824
+ buttonText: {
825
+ color: '#FFFFFF',
826
+ fontSize: 17,
827
+ fontWeight: '700',
828
+ letterSpacing: 0.2
829
+ },
830
+ footerTextContainer: {
831
+ flexDirection: 'row',
832
+ justifyContent: 'center',
833
+ marginTop: 28
834
+ },
835
+ footerText: {
836
+ fontSize: 15
837
+ },
838
+ linkText: {
839
+ fontSize: 15,
840
+ fontWeight: '700'
841
+ },
842
+ userInfoContainer: {
843
+ padding: 20,
844
+ marginVertical: 20,
845
+ borderRadius: 24,
846
+ alignItems: 'center',
847
+ shadowColor: '#000',
848
+ shadowOpacity: 0.04,
849
+ shadowOffset: {
850
+ width: 0,
851
+ height: 1
852
+ },
853
+ shadowRadius: 4,
854
+ elevation: 1
855
+ },
856
+ userInfoText: {
857
+ fontSize: 16,
858
+ marginBottom: 8,
859
+ textAlign: 'center'
860
+ },
861
+ actionButtonsContainer: {
862
+ marginTop: 24
863
+ },
864
+ navigationButtons: {
865
+ flexDirection: 'row',
866
+ justifyContent: 'space-between',
867
+ alignItems: 'center',
868
+ marginTop: 28,
869
+ width: '100%'
870
+ },
871
+ navButton: {
872
+ borderRadius: 24,
873
+ height: 44,
874
+ alignItems: 'center',
875
+ justifyContent: 'center',
876
+ paddingHorizontal: 28,
877
+ backgroundColor: '#F3E5F5'
878
+ },
879
+ backButton: {
880
+ backgroundColor: 'transparent',
881
+ borderWidth: 1
882
+ },
883
+ nextButton: {
884
+ minWidth: 100
885
+ },
886
+ navButtonText: {
887
+ fontSize: 16,
888
+ fontWeight: '700'
889
+ },
890
+ progressContainer: {
891
+ flexDirection: 'row',
892
+ justifyContent: 'center',
893
+ marginBottom: 20,
894
+ marginTop: 8
895
+ },
896
+ progressDot: {
897
+ height: 10,
898
+ width: 10,
899
+ borderRadius: 5,
900
+ marginHorizontal: 6,
901
+ borderWidth: 2,
902
+ borderColor: '#fff',
903
+ shadowColor: colors.primary,
904
+ shadowOpacity: 0.08,
905
+ shadowOffset: {
906
+ width: 0,
907
+ height: 1
908
+ },
909
+ shadowRadius: 2,
910
+ elevation: 1
911
+ },
912
+ summaryContainer: {
913
+ padding: 0,
914
+ marginBottom: 24,
915
+ width: '100%'
916
+ },
917
+ summaryRow: {
918
+ flexDirection: 'row',
919
+ marginBottom: 10
920
+ },
921
+ summaryLabel: {
922
+ fontSize: 15,
923
+ width: 90
924
+ },
925
+ summaryValue: {
926
+ fontSize: 15,
927
+ fontWeight: '600',
928
+ flex: 1
929
+ }
930
+ });
931
+ export default SignUpScreen;
932
+ //# sourceMappingURL=SignUpScreen.js.map