@oxyhq/services 5.4.2 → 5.4.4

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