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