@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,998 @@
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 Avatar from "../components/Avatar.js";
8
+ import { Ionicons } from '@expo/vector-icons';
9
+ import Svg, { Path, Circle, Defs, LinearGradient, Stop } from 'react-native-svg';
10
+ import { toast } from "../../lib/sonner.js";
11
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
+ const SignInScreen = ({
13
+ navigate,
14
+ goBack,
15
+ theme
16
+ }) => {
17
+ // Form data states
18
+ const [username, setUsername] = useState('');
19
+ const [password, setPassword] = useState('');
20
+ const [errorMessage, setErrorMessage] = useState('');
21
+ const [userProfile, setUserProfile] = useState(null);
22
+ const [showPassword, setShowPassword] = useState(false);
23
+
24
+ // Multi-step form states
25
+ const [currentStep, setCurrentStep] = useState(0);
26
+ const [isInputFocused, setIsInputFocused] = useState(false);
27
+ const [isValidating, setIsValidating] = useState(false);
28
+ const [validationStatus, setValidationStatus] = useState('idle');
29
+
30
+ // Cache for validation results to prevent repeated API calls
31
+ const validationCache = useRef(new Map());
32
+ const fadeAnim = useRef(new Animated.Value(1)).current;
33
+ const slideAnim = useRef(new Animated.Value(0)).current;
34
+ const scaleAnim = useRef(new Animated.Value(1)).current;
35
+ const inputScaleAnim = useRef(new Animated.Value(1)).current;
36
+ const logoAnim = useRef(new Animated.Value(0)).current;
37
+ const progressAnim = useRef(new Animated.Value(0.5)).current;
38
+ const {
39
+ login,
40
+ isLoading,
41
+ user,
42
+ isAuthenticated,
43
+ sessions,
44
+ oxyServices
45
+ } = useOxy();
46
+ const colors = useThemeColors(theme);
47
+ const commonStyles = createCommonStyles(theme);
48
+
49
+ // Check if this should be treated as "Add Account" mode
50
+ const isAddAccountMode = useMemo(() => user && isAuthenticated && sessions && sessions.length > 0, [user, isAuthenticated, sessions]);
51
+
52
+ // Memoized styles to prevent rerenders
53
+ const styles = useMemo(() => createStyles(colors, theme), [colors, theme]);
54
+
55
+ // Initialize logo animation
56
+ useEffect(() => {
57
+ Animated.spring(logoAnim, {
58
+ toValue: 1,
59
+ tension: 50,
60
+ friction: 8,
61
+ useNativeDriver: true
62
+ }).start();
63
+ }, [logoAnim]);
64
+
65
+ // Input focus animations
66
+ const handleInputFocus = useCallback(() => {
67
+ setIsInputFocused(true);
68
+ Animated.spring(inputScaleAnim, {
69
+ toValue: 1.02,
70
+ useNativeDriver: true
71
+ }).start();
72
+ }, [inputScaleAnim]);
73
+ const handleInputBlur = useCallback(() => {
74
+ setIsInputFocused(false);
75
+ Animated.spring(inputScaleAnim, {
76
+ toValue: 1,
77
+ useNativeDriver: true
78
+ }).start();
79
+ }, [inputScaleAnim]);
80
+
81
+ // Memoized input change handlers to prevent re-renders
82
+ const handleUsernameChange = useCallback(text => {
83
+ setUsername(text);
84
+ // Only clear error if we're changing from an invalid state
85
+ if (validationStatus === 'invalid') {
86
+ setErrorMessage('');
87
+ setValidationStatus('idle');
88
+ }
89
+ }, [validationStatus]);
90
+ const handlePasswordChange = useCallback(text => {
91
+ setPassword(text);
92
+ setErrorMessage(''); // Clear error when user types
93
+ }, []);
94
+
95
+ // Username validation using core services with caching
96
+ const validateUsername = useCallback(async usernameToValidate => {
97
+ if (!usernameToValidate || usernameToValidate.length < 3) {
98
+ setValidationStatus('invalid');
99
+ return false;
100
+ }
101
+
102
+ // Check cache first (cache valid for 5 minutes)
103
+ const cached = validationCache.current.get(usernameToValidate);
104
+ const now = Date.now();
105
+ if (cached && now - cached.timestamp < 5 * 60 * 1000) {
106
+ setUserProfile(cached.profile);
107
+ setValidationStatus('valid');
108
+ setErrorMessage('');
109
+ return true;
110
+ }
111
+ setIsValidating(true);
112
+ setValidationStatus('validating');
113
+ try {
114
+ // First check if username exists by trying to get profile
115
+ const profile = await oxyServices.getUserProfileByUsername(usernameToValidate);
116
+ if (profile) {
117
+ const profileData = {
118
+ displayName: profile.name?.full || profile.name?.first || profile.username,
119
+ name: profile.username,
120
+ avatar: profile.avatar,
121
+ id: profile.id
122
+ };
123
+ setUserProfile(profileData);
124
+ setValidationStatus('valid');
125
+ setErrorMessage(''); // Clear any previous errors
126
+
127
+ // Cache the result
128
+ validationCache.current.set(usernameToValidate, {
129
+ profile: profileData,
130
+ timestamp: now
131
+ });
132
+ return true;
133
+ } else {
134
+ setValidationStatus('invalid');
135
+ setErrorMessage('Username not found. Please check your username or sign up.');
136
+ return false;
137
+ }
138
+ } catch (error) {
139
+ // If user not found (404), username doesn't exist
140
+ if (error.status === 404 || error.code === 'USER_NOT_FOUND') {
141
+ setValidationStatus('invalid');
142
+ setErrorMessage('Username not found. Please check your username or sign up.');
143
+ return false;
144
+ }
145
+
146
+ // For other errors, show generic message
147
+ console.error('Username validation error:', error);
148
+ setValidationStatus('invalid');
149
+ setErrorMessage('Unable to validate username. Please try again.');
150
+ return false;
151
+ } finally {
152
+ setIsValidating(false);
153
+ }
154
+ }, [oxyServices]);
155
+
156
+ // Debounced username validation - increased debounce time and added better conditions
157
+ useEffect(() => {
158
+ if (!username || username.length < 3) {
159
+ setValidationStatus('idle');
160
+ setUserProfile(null);
161
+ setErrorMessage(''); // Clear error when input is too short
162
+ return;
163
+ }
164
+
165
+ // Only validate if we haven't already validated this exact username
166
+ if (validationStatus === 'valid' && userProfile?.name === username) {
167
+ return;
168
+ }
169
+ const timeoutId = setTimeout(() => {
170
+ validateUsername(username);
171
+ }, 800); // Increased debounce to 800ms
172
+
173
+ return () => clearTimeout(timeoutId);
174
+ }, [username, validateUsername, validationStatus, userProfile?.name]);
175
+
176
+ // Cleanup cache on unmount and limit cache size
177
+ useEffect(() => {
178
+ return () => {
179
+ // Clear cache on unmount
180
+ validationCache.current.clear();
181
+ };
182
+ }, []);
183
+
184
+ // Clean up old cache entries periodically (older than 10 minutes)
185
+ useEffect(() => {
186
+ const cleanupInterval = setInterval(() => {
187
+ const now = Date.now();
188
+ const maxAge = 10 * 60 * 1000; // 10 minutes
189
+
190
+ for (const [key, value] of validationCache.current.entries()) {
191
+ if (now - value.timestamp > maxAge) {
192
+ validationCache.current.delete(key);
193
+ }
194
+ }
195
+
196
+ // Limit cache size to 50 entries
197
+ if (validationCache.current.size > 50) {
198
+ const entries = Array.from(validationCache.current.entries());
199
+ entries.sort((a, b) => a[1].timestamp - b[1].timestamp);
200
+ const toDelete = entries.slice(0, entries.length - 50);
201
+ toDelete.forEach(([key]) => validationCache.current.delete(key));
202
+ }
203
+ }, 5 * 60 * 1000); // Clean up every 5 minutes
204
+
205
+ return () => clearInterval(cleanupInterval);
206
+ }, []);
207
+
208
+ // Animation functions
209
+ const animateTransition = useCallback(nextStep => {
210
+ // Scale down current content
211
+ Animated.timing(scaleAnim, {
212
+ toValue: 0.95,
213
+ duration: 150,
214
+ useNativeDriver: true
215
+ }).start();
216
+
217
+ // Fade out
218
+ Animated.timing(fadeAnim, {
219
+ toValue: 0,
220
+ duration: 200,
221
+ useNativeDriver: true
222
+ }).start(() => {
223
+ setCurrentStep(nextStep);
224
+
225
+ // Reset animations
226
+ slideAnim.setValue(-50);
227
+ scaleAnim.setValue(0.95);
228
+
229
+ // Animate in new content
230
+ Animated.parallel([Animated.timing(fadeAnim, {
231
+ toValue: 1,
232
+ duration: 300,
233
+ useNativeDriver: true
234
+ }), Animated.spring(slideAnim, {
235
+ toValue: 0,
236
+ tension: 80,
237
+ friction: 8,
238
+ useNativeDriver: true
239
+ }), Animated.spring(scaleAnim, {
240
+ toValue: 1,
241
+ tension: 80,
242
+ friction: 8,
243
+ useNativeDriver: true
244
+ })]).start();
245
+ });
246
+ }, [fadeAnim, slideAnim, scaleAnim]);
247
+ const nextStep = useCallback(() => {
248
+ if (currentStep < 1) {
249
+ // Animate progress bar
250
+ Animated.timing(progressAnim, {
251
+ toValue: 1.0,
252
+ duration: 300,
253
+ useNativeDriver: false
254
+ }).start();
255
+ animateTransition(currentStep + 1);
256
+ }
257
+ }, [currentStep, progressAnim, animateTransition]);
258
+ const prevStep = useCallback(() => {
259
+ if (currentStep > 0) {
260
+ // Animate progress bar
261
+ Animated.timing(progressAnim, {
262
+ toValue: 0.5,
263
+ duration: 300,
264
+ useNativeDriver: false
265
+ }).start();
266
+ animateTransition(currentStep - 1);
267
+ }
268
+ }, [currentStep, progressAnim, animateTransition]);
269
+ const handleUsernameNext = useCallback(() => {
270
+ if (!username) {
271
+ toast.error('Please enter your username');
272
+ return;
273
+ }
274
+ if (validationStatus === 'invalid') {
275
+ // Don't show toast if we already have an error message displayed
276
+ if (!errorMessage) {
277
+ toast.error('Please enter a valid username');
278
+ }
279
+ return;
280
+ }
281
+ if (validationStatus === 'validating') {
282
+ toast.error('Please wait while we validate your username');
283
+ return;
284
+ }
285
+ if (validationStatus === 'valid' && userProfile) {
286
+ setErrorMessage('');
287
+ nextStep();
288
+ } else {
289
+ toast.error('Please enter a valid username');
290
+ }
291
+ }, [username, validationStatus, userProfile, errorMessage, nextStep]);
292
+ const handleLogin = useCallback(async () => {
293
+ if (!username || !password) {
294
+ toast.error('Please enter both username and password');
295
+ return;
296
+ }
297
+ try {
298
+ setErrorMessage('');
299
+ await login(username, password);
300
+ // The authentication state change will be handled through context
301
+ } catch (error) {
302
+ toast.error(error.message || 'Login failed');
303
+ }
304
+ }, [username, password, login]);
305
+
306
+ // Memoized step components
307
+ const renderUsernameStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
308
+ style: [styles.stepContainer, {
309
+ opacity: fadeAnim,
310
+ transform: [{
311
+ translateX: slideAnim
312
+ }, {
313
+ scale: scaleAnim
314
+ }]
315
+ }],
316
+ children: [/*#__PURE__*/_jsx(View, {
317
+ style: styles.modernImageContainer,
318
+ children: /*#__PURE__*/_jsxs(Svg, {
319
+ width: 280,
320
+ height: 160,
321
+ viewBox: "0 0 280 160",
322
+ children: [/*#__PURE__*/_jsxs(Defs, {
323
+ children: [/*#__PURE__*/_jsxs(LinearGradient, {
324
+ id: "primaryGradient",
325
+ x1: "0%",
326
+ y1: "0%",
327
+ x2: "100%",
328
+ y2: "100%",
329
+ children: [/*#__PURE__*/_jsx(Stop, {
330
+ offset: "0%",
331
+ stopColor: colors.primary,
332
+ stopOpacity: "0.8"
333
+ }), /*#__PURE__*/_jsx(Stop, {
334
+ offset: "100%",
335
+ stopColor: colors.primary,
336
+ stopOpacity: "0.2"
337
+ })]
338
+ }), /*#__PURE__*/_jsxs(LinearGradient, {
339
+ id: "secondaryGradient",
340
+ x1: "0%",
341
+ y1: "0%",
342
+ x2: "100%",
343
+ y2: "100%",
344
+ children: [/*#__PURE__*/_jsx(Stop, {
345
+ offset: "0%",
346
+ stopColor: colors.primary,
347
+ stopOpacity: "0.1"
348
+ }), /*#__PURE__*/_jsx(Stop, {
349
+ offset: "100%",
350
+ stopColor: colors.primary,
351
+ stopOpacity: "0.3"
352
+ })]
353
+ })]
354
+ }), /*#__PURE__*/_jsx(Circle, {
355
+ cx: "80",
356
+ cy: "80",
357
+ r: "45",
358
+ fill: "url(#primaryGradient)"
359
+ }), /*#__PURE__*/_jsx(Circle, {
360
+ cx: "200",
361
+ cy: "80",
362
+ r: "35",
363
+ fill: "url(#secondaryGradient)"
364
+ }), /*#__PURE__*/_jsx(Path, {
365
+ d: "M40 120 Q80 40 140 80 Q200 120 240 60",
366
+ stroke: colors.primary,
367
+ strokeWidth: "4",
368
+ fill: "none",
369
+ strokeLinecap: "round"
370
+ }), /*#__PURE__*/_jsx(Circle, {
371
+ cx: "60",
372
+ cy: "50",
373
+ r: "8",
374
+ fill: colors.primary,
375
+ opacity: "0.6"
376
+ }), /*#__PURE__*/_jsx(Circle, {
377
+ cx: "220",
378
+ cy: "120",
379
+ r: "6",
380
+ fill: colors.primary,
381
+ opacity: "0.4"
382
+ }), /*#__PURE__*/_jsx(Circle, {
383
+ cx: "250",
384
+ cy: "40",
385
+ r: "4",
386
+ fill: colors.primary,
387
+ opacity: "0.8"
388
+ }), /*#__PURE__*/_jsx(Circle, {
389
+ cx: "140",
390
+ cy: "80",
391
+ r: "25",
392
+ fill: colors.background,
393
+ opacity: "0.9"
394
+ }), /*#__PURE__*/_jsx(Circle, {
395
+ cx: "135",
396
+ cy: "75",
397
+ r: "3",
398
+ fill: colors.primary
399
+ }), /*#__PURE__*/_jsx(Circle, {
400
+ cx: "145",
401
+ cy: "75",
402
+ r: "3",
403
+ fill: colors.primary
404
+ }), /*#__PURE__*/_jsx(Path, {
405
+ d: "M132 85 Q140 92 148 85",
406
+ stroke: colors.primary,
407
+ strokeWidth: "2",
408
+ fill: "none",
409
+ strokeLinecap: "round"
410
+ })]
411
+ })
412
+ }), /*#__PURE__*/_jsxs(View, {
413
+ style: styles.modernHeader,
414
+ children: [/*#__PURE__*/_jsx(Text, {
415
+ style: [styles.modernTitle, {
416
+ color: colors.text
417
+ }],
418
+ children: isAddAccountMode ? 'Add Account' : 'Welcome Back'
419
+ }), /*#__PURE__*/_jsx(Text, {
420
+ style: [styles.modernSubtitle, {
421
+ color: colors.secondaryText
422
+ }],
423
+ children: isAddAccountMode ? 'Sign in with another account' : 'Sign in to continue your journey'
424
+ })]
425
+ }), isAddAccountMode && /*#__PURE__*/_jsxs(View, {
426
+ style: [styles.modernInfoCard, {
427
+ backgroundColor: colors.inputBackground
428
+ }],
429
+ children: [/*#__PURE__*/_jsx(Ionicons, {
430
+ name: "information-circle",
431
+ size: 20,
432
+ color: colors.primary
433
+ }), /*#__PURE__*/_jsxs(Text, {
434
+ style: [styles.modernInfoText, {
435
+ color: colors.text
436
+ }],
437
+ children: ["Currently signed in as ", /*#__PURE__*/_jsx(Text, {
438
+ style: {
439
+ fontWeight: 'bold'
440
+ },
441
+ children: user?.username
442
+ })]
443
+ })]
444
+ }), errorMessage ? /*#__PURE__*/_jsxs(Animated.View, {
445
+ style: [styles.modernErrorCard, {
446
+ backgroundColor: '#FF6B6B20'
447
+ }],
448
+ children: [/*#__PURE__*/_jsx(Ionicons, {
449
+ name: "alert-circle",
450
+ size: 20,
451
+ color: "#FF6B6B"
452
+ }), /*#__PURE__*/_jsx(Text, {
453
+ style: [styles.errorText, {
454
+ color: '#FF6B6B'
455
+ }],
456
+ children: errorMessage
457
+ })]
458
+ }) : null, /*#__PURE__*/_jsxs(Animated.View, {
459
+ style: [styles.modernInputContainer, {
460
+ transform: [{
461
+ scale: inputScaleAnim
462
+ }]
463
+ }],
464
+ children: [/*#__PURE__*/_jsxs(View, {
465
+ style: [styles.inputWrapper, {
466
+ borderColor: validationStatus === 'valid' ? colors.success : validationStatus === 'invalid' ? colors.error : isInputFocused ? colors.primary : colors.border
467
+ }],
468
+ children: [/*#__PURE__*/_jsx(Ionicons, {
469
+ name: "person-outline",
470
+ size: 20,
471
+ color: isInputFocused ? colors.primary : colors.secondaryText,
472
+ style: styles.inputIcon
473
+ }), /*#__PURE__*/_jsx(TextInput, {
474
+ style: [styles.modernInput, {
475
+ color: colors.text
476
+ }],
477
+ placeholder: "Enter your username",
478
+ placeholderTextColor: colors.placeholder,
479
+ value: username,
480
+ onChangeText: handleUsernameChange,
481
+ onFocus: handleInputFocus,
482
+ onBlur: handleInputBlur,
483
+ autoCapitalize: "none",
484
+ testID: "username-input"
485
+ }), validationStatus === 'validating' && /*#__PURE__*/_jsx(ActivityIndicator, {
486
+ size: "small",
487
+ color: colors.primary,
488
+ style: styles.validationIndicator
489
+ }), validationStatus === 'valid' && /*#__PURE__*/_jsx(Ionicons, {
490
+ name: "checkmark-circle",
491
+ size: 20,
492
+ color: colors.success,
493
+ style: styles.validationIndicator
494
+ }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/_jsx(Ionicons, {
495
+ name: "close-circle",
496
+ size: 20,
497
+ color: colors.error,
498
+ style: styles.validationIndicator
499
+ })]
500
+ }), validationStatus === 'valid' && userProfile && /*#__PURE__*/_jsxs(View, {
501
+ style: [styles.validationSuccessCard, {
502
+ backgroundColor: colors.success + '15'
503
+ }],
504
+ children: [/*#__PURE__*/_jsx(Ionicons, {
505
+ name: "checkmark-circle",
506
+ size: 16,
507
+ color: colors.success
508
+ }), /*#__PURE__*/_jsxs(Text, {
509
+ style: [styles.validationText, {
510
+ color: colors.success
511
+ }],
512
+ children: ["Found user: ", userProfile.displayName]
513
+ })]
514
+ }), validationStatus === 'invalid' && username.length >= 3 && !errorMessage && /*#__PURE__*/_jsxs(View, {
515
+ style: [styles.validationErrorCard, {
516
+ backgroundColor: colors.error + '15'
517
+ }],
518
+ children: [/*#__PURE__*/_jsx(Ionicons, {
519
+ name: "alert-circle",
520
+ size: 16,
521
+ color: colors.error
522
+ }), /*#__PURE__*/_jsx(Text, {
523
+ style: [styles.validationText, {
524
+ color: colors.error
525
+ }],
526
+ children: "Username not found"
527
+ })]
528
+ })]
529
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
530
+ style: [styles.modernButton, {
531
+ backgroundColor: colors.primary,
532
+ opacity: !username || validationStatus !== 'valid' ? 0.5 : 1,
533
+ shadowColor: colors.primary
534
+ }],
535
+ onPress: handleUsernameNext,
536
+ disabled: !username || validationStatus !== 'valid' || isValidating,
537
+ testID: "username-next-button",
538
+ children: isValidating ? /*#__PURE__*/_jsx(ActivityIndicator, {
539
+ color: "#FFFFFF",
540
+ size: "small"
541
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
542
+ children: [/*#__PURE__*/_jsx(Text, {
543
+ style: styles.modernButtonText,
544
+ children: "Continue"
545
+ }), /*#__PURE__*/_jsx(Ionicons, {
546
+ name: "arrow-forward",
547
+ size: 20,
548
+ color: "#FFFFFF",
549
+ style: styles.buttonIcon
550
+ })]
551
+ })
552
+ }), /*#__PURE__*/_jsxs(View, {
553
+ style: styles.footerTextContainer,
554
+ children: [/*#__PURE__*/_jsxs(Text, {
555
+ style: [styles.footerText, {
556
+ color: colors.secondaryText
557
+ }],
558
+ children: ["Don't have an account?", ' ']
559
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
560
+ onPress: () => navigate('SignUp'),
561
+ children: /*#__PURE__*/_jsx(Text, {
562
+ style: [styles.modernLinkText, {
563
+ color: colors.primary
564
+ }],
565
+ children: "Sign Up"
566
+ })
567
+ })]
568
+ })]
569
+ }), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameNext, navigate, styles]);
570
+ const renderPasswordStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
571
+ style: [styles.stepContainer, {
572
+ opacity: fadeAnim,
573
+ transform: [{
574
+ translateX: slideAnim
575
+ }, {
576
+ scale: scaleAnim
577
+ }]
578
+ }],
579
+ children: [/*#__PURE__*/_jsxs(View, {
580
+ style: styles.modernUserProfileContainer,
581
+ children: [/*#__PURE__*/_jsxs(Animated.View, {
582
+ style: [styles.avatarContainer, {
583
+ transform: [{
584
+ scale: logoAnim
585
+ }]
586
+ }],
587
+ children: [/*#__PURE__*/_jsx(Avatar, {
588
+ uri: userProfile?.avatar,
589
+ name: userProfile?.displayName || userProfile?.name || username,
590
+ size: 100,
591
+ theme: theme,
592
+ style: styles.modernUserAvatar
593
+ }), /*#__PURE__*/_jsx(View, {
594
+ style: [styles.statusIndicator, {
595
+ backgroundColor: colors.primary
596
+ }]
597
+ })]
598
+ }), /*#__PURE__*/_jsx(Text, {
599
+ style: [styles.modernUserDisplayName, {
600
+ color: colors.text
601
+ }],
602
+ children: userProfile?.displayName || userProfile?.name || username
603
+ }), /*#__PURE__*/_jsxs(Text, {
604
+ style: [styles.modernUsernameSubtext, {
605
+ color: colors.secondaryText
606
+ }],
607
+ children: ["@", username]
608
+ }), /*#__PURE__*/_jsxs(View, {
609
+ style: [styles.welcomeBackBadge, {
610
+ backgroundColor: colors.primary + '15'
611
+ }],
612
+ children: [/*#__PURE__*/_jsx(Ionicons, {
613
+ name: "checkmark-circle",
614
+ size: 16,
615
+ color: colors.primary
616
+ }), /*#__PURE__*/_jsx(Text, {
617
+ style: [styles.welcomeBackText, {
618
+ color: colors.primary
619
+ }],
620
+ children: "Welcome back!"
621
+ })]
622
+ })]
623
+ }), errorMessage ? /*#__PURE__*/_jsxs(Animated.View, {
624
+ style: [styles.modernErrorCard, {
625
+ backgroundColor: '#FF6B6B20'
626
+ }],
627
+ children: [/*#__PURE__*/_jsx(Ionicons, {
628
+ name: "alert-circle",
629
+ size: 20,
630
+ color: "#FF6B6B"
631
+ }), /*#__PURE__*/_jsx(Text, {
632
+ style: [styles.errorText, {
633
+ color: '#FF6B6B'
634
+ }],
635
+ children: errorMessage
636
+ })]
637
+ }) : null, /*#__PURE__*/_jsx(Animated.View, {
638
+ style: [styles.modernInputContainer, {
639
+ transform: [{
640
+ scale: inputScaleAnim
641
+ }]
642
+ }],
643
+ children: /*#__PURE__*/_jsxs(View, {
644
+ style: [styles.inputWrapper, {
645
+ borderColor: isInputFocused ? colors.primary : colors.border
646
+ }],
647
+ children: [/*#__PURE__*/_jsx(Ionicons, {
648
+ name: "lock-closed-outline",
649
+ size: 20,
650
+ color: isInputFocused ? colors.primary : colors.secondaryText,
651
+ style: styles.inputIcon
652
+ }), /*#__PURE__*/_jsx(TextInput, {
653
+ style: [styles.modernInput, {
654
+ color: colors.text
655
+ }],
656
+ placeholder: "Enter your password",
657
+ placeholderTextColor: colors.placeholder,
658
+ value: password,
659
+ onChangeText: handlePasswordChange,
660
+ onFocus: handleInputFocus,
661
+ onBlur: handleInputBlur,
662
+ secureTextEntry: !showPassword,
663
+ autoCapitalize: "none",
664
+ testID: "password-input"
665
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
666
+ style: styles.passwordToggle,
667
+ onPress: () => setShowPassword(!showPassword),
668
+ children: /*#__PURE__*/_jsx(Ionicons, {
669
+ name: showPassword ? "eye-off" : "eye",
670
+ size: 20,
671
+ color: colors.secondaryText
672
+ })
673
+ })]
674
+ })
675
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
676
+ style: [styles.modernButton, {
677
+ backgroundColor: colors.primary,
678
+ opacity: !password ? 0.5 : 1,
679
+ shadowColor: colors.primary
680
+ }],
681
+ onPress: handleLogin,
682
+ disabled: !password || isLoading,
683
+ testID: "login-button",
684
+ children: isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
685
+ color: "#FFFFFF",
686
+ size: "small"
687
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
688
+ children: [/*#__PURE__*/_jsx(Text, {
689
+ style: styles.modernButtonText,
690
+ children: "Sign In"
691
+ }), /*#__PURE__*/_jsx(Ionicons, {
692
+ name: "log-in",
693
+ size: 20,
694
+ color: "#FFFFFF",
695
+ style: styles.buttonIcon
696
+ })]
697
+ })
698
+ }), /*#__PURE__*/_jsx(View, {
699
+ style: styles.modernNavigationButtons,
700
+ children: /*#__PURE__*/_jsxs(TouchableOpacity, {
701
+ style: [styles.modernBackButton, {
702
+ borderColor: colors.border
703
+ }],
704
+ onPress: prevStep,
705
+ children: [/*#__PURE__*/_jsx(Ionicons, {
706
+ name: "arrow-back",
707
+ size: 18,
708
+ color: colors.text
709
+ }), /*#__PURE__*/_jsx(Text, {
710
+ style: [styles.modernBackButtonText, {
711
+ color: colors.text
712
+ }],
713
+ children: "Back"
714
+ })]
715
+ })
716
+ }), /*#__PURE__*/_jsxs(View, {
717
+ style: styles.securityNotice,
718
+ children: [/*#__PURE__*/_jsx(Ionicons, {
719
+ name: "shield-checkmark",
720
+ size: 14,
721
+ color: colors.secondaryText
722
+ }), /*#__PURE__*/_jsx(Text, {
723
+ style: [styles.securityText, {
724
+ color: colors.secondaryText
725
+ }],
726
+ children: "Your data is encrypted and secure"
727
+ })]
728
+ })]
729
+ }), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleLogin, isLoading, prevStep, styles]);
730
+ const renderCurrentStep = useCallback(() => {
731
+ switch (currentStep) {
732
+ case 0:
733
+ return renderUsernameStep;
734
+ case 1:
735
+ return renderPasswordStep;
736
+ default:
737
+ return renderUsernameStep;
738
+ }
739
+ }, [currentStep, renderUsernameStep, renderPasswordStep]);
740
+ return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
741
+ style: [styles.container, {
742
+ backgroundColor: colors.background
743
+ }],
744
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height',
745
+ children: [/*#__PURE__*/_jsx(StatusBar, {
746
+ barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
747
+ backgroundColor: colors.background
748
+ }), /*#__PURE__*/_jsx(ScrollView, {
749
+ contentContainerStyle: styles.scrollContent,
750
+ showsVerticalScrollIndicator: false,
751
+ keyboardShouldPersistTaps: "handled",
752
+ children: renderCurrentStep()
753
+ })]
754
+ });
755
+ };
756
+
757
+ // Memoized styles creation
758
+ const createStyles = (colors, theme) => StyleSheet.create({
759
+ container: {
760
+ flex: 1
761
+ },
762
+ scrollContent: {
763
+ flexGrow: 1,
764
+ paddingHorizontal: 24,
765
+ paddingTop: 40,
766
+ paddingBottom: 40
767
+ },
768
+ stepContainer: {
769
+ flex: 1,
770
+ justifyContent: 'center',
771
+ alignItems: 'center',
772
+ minHeight: 600
773
+ },
774
+ modernImageContainer: {
775
+ alignItems: 'center',
776
+ marginBottom: 40
777
+ },
778
+ modernHeader: {
779
+ alignItems: 'flex-start',
780
+ width: '100%',
781
+ marginBottom: 32
782
+ },
783
+ modernTitle: {
784
+ fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
785
+ fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
786
+ fontSize: 42,
787
+ lineHeight: 48,
788
+ marginBottom: 12,
789
+ textAlign: 'left',
790
+ letterSpacing: -1
791
+ },
792
+ modernSubtitle: {
793
+ fontSize: 18,
794
+ lineHeight: 24,
795
+ textAlign: 'left',
796
+ opacity: 0.8
797
+ },
798
+ modernInfoCard: {
799
+ flexDirection: 'row',
800
+ alignItems: 'center',
801
+ padding: 16,
802
+ borderRadius: 16,
803
+ marginBottom: 24,
804
+ gap: 12,
805
+ width: '100%'
806
+ },
807
+ modernInfoText: {
808
+ fontSize: 14,
809
+ flex: 1
810
+ },
811
+ modernErrorCard: {
812
+ flexDirection: 'row',
813
+ alignItems: 'center',
814
+ padding: 16,
815
+ borderRadius: 16,
816
+ marginBottom: 24,
817
+ gap: 12,
818
+ width: '100%'
819
+ },
820
+ errorText: {
821
+ fontSize: 14,
822
+ fontWeight: '500',
823
+ flex: 1
824
+ },
825
+ modernInputContainer: {
826
+ width: '100%',
827
+ marginBottom: 24
828
+ },
829
+ inputWrapper: {
830
+ flexDirection: 'row',
831
+ alignItems: 'center',
832
+ height: 56,
833
+ borderRadius: 16,
834
+ paddingHorizontal: 20,
835
+ borderWidth: 2,
836
+ backgroundColor: colors.inputBackground
837
+ },
838
+ inputIcon: {
839
+ marginRight: 12
840
+ },
841
+ modernInput: {
842
+ flex: 1,
843
+ fontSize: 16,
844
+ height: '100%'
845
+ },
846
+ passwordToggle: {
847
+ padding: 4
848
+ },
849
+ validationIndicator: {
850
+ marginLeft: 8
851
+ },
852
+ validationSuccessCard: {
853
+ flexDirection: 'row',
854
+ alignItems: 'center',
855
+ padding: 12,
856
+ borderRadius: 12,
857
+ marginTop: 8,
858
+ gap: 8
859
+ },
860
+ validationErrorCard: {
861
+ flexDirection: 'row',
862
+ alignItems: 'center',
863
+ padding: 12,
864
+ borderRadius: 12,
865
+ marginTop: 8,
866
+ gap: 8
867
+ },
868
+ validationText: {
869
+ fontSize: 12,
870
+ fontWeight: '500'
871
+ },
872
+ modernButton: {
873
+ flexDirection: 'row',
874
+ alignItems: 'center',
875
+ justifyContent: 'center',
876
+ paddingVertical: 18,
877
+ paddingHorizontal: 32,
878
+ borderRadius: 16,
879
+ marginVertical: 8,
880
+ shadowOffset: {
881
+ width: 0,
882
+ height: 4
883
+ },
884
+ shadowOpacity: 0.3,
885
+ shadowRadius: 8,
886
+ elevation: 6,
887
+ gap: 8,
888
+ width: '100%'
889
+ },
890
+ modernButtonText: {
891
+ color: '#FFFFFF',
892
+ fontSize: 16,
893
+ fontWeight: '600',
894
+ letterSpacing: 0.5
895
+ },
896
+ buttonIcon: {
897
+ marginLeft: 4
898
+ },
899
+ modernLinkText: {
900
+ fontSize: 14,
901
+ lineHeight: 20,
902
+ fontWeight: '600',
903
+ textDecorationLine: 'underline'
904
+ },
905
+ footerTextContainer: {
906
+ flexDirection: 'row',
907
+ justifyContent: 'center',
908
+ marginTop: 28
909
+ },
910
+ footerText: {
911
+ fontSize: 15
912
+ },
913
+ // Modern User Profile Styles
914
+ modernUserProfileContainer: {
915
+ alignItems: 'center',
916
+ marginBottom: 32,
917
+ paddingVertical: 24
918
+ },
919
+ avatarContainer: {
920
+ position: 'relative',
921
+ marginBottom: 20
922
+ },
923
+ modernUserAvatar: {
924
+ borderWidth: 4,
925
+ borderColor: 'rgba(209, 105, 229, 0.2)'
926
+ },
927
+ statusIndicator: {
928
+ position: 'absolute',
929
+ bottom: 4,
930
+ right: 4,
931
+ width: 20,
932
+ height: 20,
933
+ borderRadius: 10,
934
+ borderWidth: 3,
935
+ borderColor: '#FFFFFF'
936
+ },
937
+ modernUserDisplayName: {
938
+ fontSize: 26,
939
+ fontWeight: '700',
940
+ marginBottom: 4,
941
+ textAlign: 'center',
942
+ letterSpacing: -0.5
943
+ },
944
+ modernUsernameSubtext: {
945
+ fontSize: 16,
946
+ textAlign: 'center',
947
+ marginBottom: 16,
948
+ opacity: 0.7
949
+ },
950
+ welcomeBackBadge: {
951
+ flexDirection: 'row',
952
+ alignItems: 'center',
953
+ paddingHorizontal: 12,
954
+ paddingVertical: 6,
955
+ borderRadius: 20,
956
+ gap: 6
957
+ },
958
+ welcomeBackText: {
959
+ fontSize: 12,
960
+ fontWeight: '600',
961
+ textTransform: 'uppercase',
962
+ letterSpacing: 0.5
963
+ },
964
+ // Modern Navigation
965
+ modernNavigationButtons: {
966
+ flexDirection: 'row',
967
+ justifyContent: 'center',
968
+ marginTop: 24,
969
+ marginBottom: 16
970
+ },
971
+ modernBackButton: {
972
+ flexDirection: 'row',
973
+ alignItems: 'center',
974
+ paddingVertical: 12,
975
+ paddingHorizontal: 20,
976
+ borderRadius: 12,
977
+ borderWidth: 1,
978
+ gap: 8
979
+ },
980
+ modernBackButtonText: {
981
+ fontSize: 16,
982
+ fontWeight: '500'
983
+ },
984
+ // Security Notice
985
+ securityNotice: {
986
+ flexDirection: 'row',
987
+ alignItems: 'center',
988
+ justifyContent: 'center',
989
+ marginTop: 20,
990
+ gap: 6
991
+ },
992
+ securityText: {
993
+ fontSize: 12,
994
+ fontWeight: '500'
995
+ }
996
+ });
997
+ export default SignInScreen;
998
+ //# sourceMappingURL=SignInScreen.js.map