@oxyhq/services 5.4.0 → 5.4.2

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 (395) hide show
  1. package/package.json +3 -2
  2. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
  3. package/src/core/index.ts +103 -0
  4. package/src/lib/sonner.ts +9 -4
  5. package/src/ui/components/OxyProvider.tsx +5 -5
  6. package/src/ui/context/OxyContext.tsx +61 -41
  7. package/src/ui/screens/AccountManagementDemo.tsx +1 -1
  8. package/src/ui/screens/AccountOverviewScreen.tsx +44 -26
  9. package/src/ui/screens/AccountSettingsScreen.tsx +25 -19
  10. package/src/ui/screens/AppInfoScreen.tsx +5 -5
  11. package/src/ui/screens/FileManagementScreen.tsx +246 -211
  12. package/src/ui/screens/SignInScreen.tsx +382 -326
  13. package/src/ui/screens/SignUpScreen.tsx +443 -273
  14. package/src/ui/screens/karma/KarmaFAQScreen.tsx +50 -29
  15. package/lib/commonjs/assets/OxyLogo.svg +0 -1
  16. package/lib/commonjs/assets/assets/OxyLogo.svg +0 -1
  17. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  18. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  19. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  20. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  21. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  22. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  23. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  24. package/lib/commonjs/assets/assets/icons/OxyServices.tsx +0 -67
  25. package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +0 -1
  26. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  27. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  28. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  29. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  30. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  31. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  32. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  33. package/lib/commonjs/assets/icons/OxyServices.js +0 -53
  34. package/lib/commonjs/assets/icons/OxyServices.js.map +0 -1
  35. package/lib/commonjs/assets/icons/logo_OxyServices.svg +0 -1
  36. package/lib/commonjs/constants/version.js +0 -28
  37. package/lib/commonjs/constants/version.js.map +0 -1
  38. package/lib/commonjs/core/index.js +0 -1543
  39. package/lib/commonjs/core/index.js.map +0 -1
  40. package/lib/commonjs/index.js +0 -160
  41. package/lib/commonjs/index.js.map +0 -1
  42. package/lib/commonjs/lib/react-native-polyfills.js +0 -181
  43. package/lib/commonjs/lib/react-native-polyfills.js.map +0 -1
  44. package/lib/commonjs/lib/sonner-safe.js +0 -41
  45. package/lib/commonjs/lib/sonner-safe.js.map +0 -1
  46. package/lib/commonjs/lib/sonner.js +0 -18
  47. package/lib/commonjs/lib/sonner.js.map +0 -1
  48. package/lib/commonjs/lib/sonner.web.js +0 -17
  49. package/lib/commonjs/lib/sonner.web.js.map +0 -1
  50. package/lib/commonjs/models/interfaces.js +0 -2
  51. package/lib/commonjs/models/interfaces.js.map +0 -1
  52. package/lib/commonjs/models/secureSession.js +0 -2
  53. package/lib/commonjs/models/secureSession.js.map +0 -1
  54. package/lib/commonjs/node/index.js +0 -54
  55. package/lib/commonjs/node/index.js.map +0 -1
  56. package/lib/commonjs/package.json +0 -1
  57. package/lib/commonjs/ui/components/Avatar.js +0 -98
  58. package/lib/commonjs/ui/components/Avatar.js.map +0 -1
  59. package/lib/commonjs/ui/components/FollowButton.js +0 -246
  60. package/lib/commonjs/ui/components/FollowButton.js.map +0 -1
  61. package/lib/commonjs/ui/components/FontLoader.js +0 -181
  62. package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
  63. package/lib/commonjs/ui/components/GroupedItem.js +0 -109
  64. package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
  65. package/lib/commonjs/ui/components/GroupedSection.js +0 -33
  66. package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
  67. package/lib/commonjs/ui/components/OxyLogo.js +0 -56
  68. package/lib/commonjs/ui/components/OxyLogo.js.map +0 -1
  69. package/lib/commonjs/ui/components/OxyProvider.js +0 -517
  70. package/lib/commonjs/ui/components/OxyProvider.js.map +0 -1
  71. package/lib/commonjs/ui/components/OxySignInButton.js +0 -178
  72. package/lib/commonjs/ui/components/OxySignInButton.js.map +0 -1
  73. package/lib/commonjs/ui/components/ProfileCard.js +0 -124
  74. package/lib/commonjs/ui/components/ProfileCard.js.map +0 -1
  75. package/lib/commonjs/ui/components/QuickActions.js +0 -87
  76. package/lib/commonjs/ui/components/QuickActions.js.map +0 -1
  77. package/lib/commonjs/ui/components/Section.js +0 -36
  78. package/lib/commonjs/ui/components/Section.js.map +0 -1
  79. package/lib/commonjs/ui/components/SectionTitle.js +0 -35
  80. package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
  81. package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
  82. package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
  83. package/lib/commonjs/ui/components/icon/OxyIcon.js +0 -27
  84. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +0 -1
  85. package/lib/commonjs/ui/components/icon/index.js +0 -14
  86. package/lib/commonjs/ui/components/icon/index.js.map +0 -1
  87. package/lib/commonjs/ui/components/index.js +0 -97
  88. package/lib/commonjs/ui/components/index.js.map +0 -1
  89. package/lib/commonjs/ui/context/OxyContext.js +0 -568
  90. package/lib/commonjs/ui/context/OxyContext.js.map +0 -1
  91. package/lib/commonjs/ui/index.js +0 -128
  92. package/lib/commonjs/ui/index.js.map +0 -1
  93. package/lib/commonjs/ui/navigation/OxyRouter.js +0 -264
  94. package/lib/commonjs/ui/navigation/OxyRouter.js.map +0 -1
  95. package/lib/commonjs/ui/navigation/types.js +0 -6
  96. package/lib/commonjs/ui/navigation/types.js.map +0 -1
  97. package/lib/commonjs/ui/screens/AccountCenterScreen.js +0 -313
  98. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +0 -1
  99. package/lib/commonjs/ui/screens/AccountManagementDemo.js +0 -299
  100. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +0 -1
  101. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +0 -837
  102. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
  103. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -836
  104. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +0 -1
  105. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -788
  106. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
  107. package/lib/commonjs/ui/screens/AppInfoScreen.js +0 -664
  108. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +0 -1
  109. package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
  110. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
  111. package/lib/commonjs/ui/screens/FileManagementScreen.js +0 -2497
  112. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +0 -1
  113. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -1620
  114. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  115. package/lib/commonjs/ui/screens/ProfileScreen.js +0 -450
  116. package/lib/commonjs/ui/screens/ProfileScreen.js.map +0 -1
  117. package/lib/commonjs/ui/screens/SessionManagementScreen.js +0 -449
  118. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
  119. package/lib/commonjs/ui/screens/SignInScreen.js +0 -956
  120. package/lib/commonjs/ui/screens/SignInScreen.js.map +0 -1
  121. package/lib/commonjs/ui/screens/SignUpScreen.js +0 -762
  122. package/lib/commonjs/ui/screens/SignUpScreen.js.map +0 -1
  123. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +0 -88
  124. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  125. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +0 -364
  126. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  127. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +0 -202
  128. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
  129. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +0 -148
  130. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  131. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +0 -127
  132. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  133. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +0 -105
  134. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  135. package/lib/commonjs/ui/styles/FONTS.md +0 -126
  136. package/lib/commonjs/ui/styles/fonts.js +0 -84
  137. package/lib/commonjs/ui/styles/fonts.js.map +0 -1
  138. package/lib/commonjs/ui/styles/index.js +0 -28
  139. package/lib/commonjs/ui/styles/index.js.map +0 -1
  140. package/lib/commonjs/ui/styles/theme.js +0 -121
  141. package/lib/commonjs/ui/styles/theme.js.map +0 -1
  142. package/lib/commonjs/utils/deviceManager.js +0 -173
  143. package/lib/commonjs/utils/deviceManager.js.map +0 -1
  144. package/lib/commonjs/utils/index.js +0 -13
  145. package/lib/commonjs/utils/index.js.map +0 -1
  146. package/lib/commonjs/utils/polyfills.js +0 -42
  147. package/lib/commonjs/utils/polyfills.js.map +0 -1
  148. package/lib/module/assets/OxyLogo.svg +0 -1
  149. package/lib/module/assets/assets/OxyLogo.svg +0 -1
  150. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  151. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  152. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  153. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  154. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  155. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  156. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  157. package/lib/module/assets/assets/icons/OxyServices.tsx +0 -67
  158. package/lib/module/assets/assets/icons/logo_OxyServices.svg +0 -1
  159. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  160. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  161. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  162. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  163. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  164. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  165. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  166. package/lib/module/assets/icons/OxyServices.js +0 -46
  167. package/lib/module/assets/icons/OxyServices.js.map +0 -1
  168. package/lib/module/assets/icons/logo_OxyServices.svg +0 -1
  169. package/lib/module/constants/version.js +0 -21
  170. package/lib/module/constants/version.js.map +0 -1
  171. package/lib/module/core/index.js +0 -1517
  172. package/lib/module/core/index.js.map +0 -1
  173. package/lib/module/index.js +0 -48
  174. package/lib/module/index.js.map +0 -1
  175. package/lib/module/lib/react-native-polyfills.js +0 -179
  176. package/lib/module/lib/react-native-polyfills.js.map +0 -1
  177. package/lib/module/lib/sonner-safe.js +0 -37
  178. package/lib/module/lib/sonner-safe.js.map +0 -1
  179. package/lib/module/lib/sonner.js +0 -8
  180. package/lib/module/lib/sonner.js.map +0 -1
  181. package/lib/module/lib/sonner.web.js +0 -4
  182. package/lib/module/lib/sonner.web.js.map +0 -1
  183. package/lib/module/models/interfaces.js +0 -2
  184. package/lib/module/models/interfaces.js.map +0 -1
  185. package/lib/module/models/secureSession.js +0 -2
  186. package/lib/module/models/secureSession.js.map +0 -1
  187. package/lib/module/node/index.js +0 -23
  188. package/lib/module/node/index.js.map +0 -1
  189. package/lib/module/package.json +0 -1
  190. package/lib/module/ui/components/Avatar.js +0 -93
  191. package/lib/module/ui/components/Avatar.js.map +0 -1
  192. package/lib/module/ui/components/FollowButton.js +0 -241
  193. package/lib/module/ui/components/FollowButton.js.map +0 -1
  194. package/lib/module/ui/components/FontLoader.js +0 -176
  195. package/lib/module/ui/components/FontLoader.js.map +0 -1
  196. package/lib/module/ui/components/GroupedItem.js +0 -104
  197. package/lib/module/ui/components/GroupedItem.js.map +0 -1
  198. package/lib/module/ui/components/GroupedSection.js +0 -28
  199. package/lib/module/ui/components/GroupedSection.js.map +0 -1
  200. package/lib/module/ui/components/OxyLogo.js +0 -49
  201. package/lib/module/ui/components/OxyLogo.js.map +0 -1
  202. package/lib/module/ui/components/OxyProvider.js +0 -511
  203. package/lib/module/ui/components/OxyProvider.js.map +0 -1
  204. package/lib/module/ui/components/OxySignInButton.js +0 -172
  205. package/lib/module/ui/components/OxySignInButton.js.map +0 -1
  206. package/lib/module/ui/components/ProfileCard.js +0 -119
  207. package/lib/module/ui/components/ProfileCard.js.map +0 -1
  208. package/lib/module/ui/components/QuickActions.js +0 -82
  209. package/lib/module/ui/components/QuickActions.js.map +0 -1
  210. package/lib/module/ui/components/Section.js +0 -31
  211. package/lib/module/ui/components/Section.js.map +0 -1
  212. package/lib/module/ui/components/SectionTitle.js +0 -30
  213. package/lib/module/ui/components/SectionTitle.js.map +0 -1
  214. package/lib/module/ui/components/bottomSheet/index.js +0 -5
  215. package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
  216. package/lib/module/ui/components/icon/OxyIcon.js +0 -22
  217. package/lib/module/ui/components/icon/OxyIcon.js.map +0 -1
  218. package/lib/module/ui/components/icon/index.js +0 -4
  219. package/lib/module/ui/components/icon/index.js.map +0 -1
  220. package/lib/module/ui/components/index.js +0 -18
  221. package/lib/module/ui/components/index.js.map +0 -1
  222. package/lib/module/ui/context/OxyContext.js +0 -563
  223. package/lib/module/ui/context/OxyContext.js.map +0 -1
  224. package/lib/module/ui/index.js +0 -24
  225. package/lib/module/ui/index.js.map +0 -1
  226. package/lib/module/ui/navigation/OxyRouter.js +0 -257
  227. package/lib/module/ui/navigation/OxyRouter.js.map +0 -1
  228. package/lib/module/ui/navigation/types.js +0 -4
  229. package/lib/module/ui/navigation/types.js.map +0 -1
  230. package/lib/module/ui/screens/AccountCenterScreen.js +0 -308
  231. package/lib/module/ui/screens/AccountCenterScreen.js.map +0 -1
  232. package/lib/module/ui/screens/AccountManagementDemo.js +0 -296
  233. package/lib/module/ui/screens/AccountManagementDemo.js.map +0 -1
  234. package/lib/module/ui/screens/AccountOverviewScreen.js +0 -831
  235. package/lib/module/ui/screens/AccountOverviewScreen.js.map +0 -1
  236. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -830
  237. package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
  238. package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -782
  239. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
  240. package/lib/module/ui/screens/AppInfoScreen.js +0 -658
  241. package/lib/module/ui/screens/AppInfoScreen.js.map +0 -1
  242. package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
  243. package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
  244. package/lib/module/ui/screens/FileManagementScreen.js +0 -2492
  245. package/lib/module/ui/screens/FileManagementScreen.js.map +0 -1
  246. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -1615
  247. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  248. package/lib/module/ui/screens/ProfileScreen.js +0 -444
  249. package/lib/module/ui/screens/ProfileScreen.js.map +0 -1
  250. package/lib/module/ui/screens/SessionManagementScreen.js +0 -444
  251. package/lib/module/ui/screens/SessionManagementScreen.js.map +0 -1
  252. package/lib/module/ui/screens/SignInScreen.js +0 -950
  253. package/lib/module/ui/screens/SignInScreen.js.map +0 -1
  254. package/lib/module/ui/screens/SignUpScreen.js +0 -755
  255. package/lib/module/ui/screens/SignUpScreen.js.map +0 -1
  256. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +0 -83
  257. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  258. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +0 -358
  259. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  260. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +0 -197
  261. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
  262. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +0 -142
  263. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  264. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +0 -122
  265. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  266. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +0 -100
  267. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  268. package/lib/module/ui/styles/FONTS.md +0 -126
  269. package/lib/module/ui/styles/fonts.js +0 -81
  270. package/lib/module/ui/styles/fonts.js.map +0 -1
  271. package/lib/module/ui/styles/index.js +0 -5
  272. package/lib/module/ui/styles/index.js.map +0 -1
  273. package/lib/module/ui/styles/theme.js +0 -114
  274. package/lib/module/ui/styles/theme.js.map +0 -1
  275. package/lib/module/utils/deviceManager.js +0 -167
  276. package/lib/module/utils/deviceManager.js.map +0 -1
  277. package/lib/module/utils/index.js +0 -4
  278. package/lib/module/utils/index.js.map +0 -1
  279. package/lib/module/utils/polyfills.js +0 -36
  280. package/lib/module/utils/polyfills.js.map +0 -1
  281. package/lib/typescript/assets/icons/OxyServices.d.ts +0 -29
  282. package/lib/typescript/assets/icons/OxyServices.d.ts.map +0 -1
  283. package/lib/typescript/constants/version.d.ts +0 -14
  284. package/lib/typescript/constants/version.d.ts.map +0 -1
  285. package/lib/typescript/core/index.d.ts +0 -563
  286. package/lib/typescript/core/index.d.ts.map +0 -1
  287. package/lib/typescript/index.d.ts +0 -20
  288. package/lib/typescript/index.d.ts.map +0 -1
  289. package/lib/typescript/lib/react-native-polyfills.d.ts +0 -8
  290. package/lib/typescript/lib/react-native-polyfills.d.ts.map +0 -1
  291. package/lib/typescript/lib/sonner-safe.d.ts +0 -11
  292. package/lib/typescript/lib/sonner-safe.d.ts.map +0 -1
  293. package/lib/typescript/lib/sonner.d.ts +0 -3
  294. package/lib/typescript/lib/sonner.d.ts.map +0 -1
  295. package/lib/typescript/lib/sonner.web.d.ts +0 -2
  296. package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
  297. package/lib/typescript/models/interfaces.d.ts +0 -179
  298. package/lib/typescript/models/interfaces.d.ts.map +0 -1
  299. package/lib/typescript/models/secureSession.d.ts +0 -27
  300. package/lib/typescript/models/secureSession.d.ts.map +0 -1
  301. package/lib/typescript/node/index.d.ts +0 -11
  302. package/lib/typescript/node/index.d.ts.map +0 -1
  303. package/lib/typescript/ui/components/Avatar.d.ts +0 -62
  304. package/lib/typescript/ui/components/Avatar.d.ts.map +0 -1
  305. package/lib/typescript/ui/components/FollowButton.d.ts +0 -92
  306. package/lib/typescript/ui/components/FollowButton.d.ts.map +0 -1
  307. package/lib/typescript/ui/components/FontLoader.d.ts +0 -15
  308. package/lib/typescript/ui/components/FontLoader.d.ts.map +0 -1
  309. package/lib/typescript/ui/components/GroupedItem.d.ts +0 -17
  310. package/lib/typescript/ui/components/GroupedItem.d.ts.map +0 -1
  311. package/lib/typescript/ui/components/GroupedSection.d.ts +0 -19
  312. package/lib/typescript/ui/components/GroupedSection.d.ts.map +0 -1
  313. package/lib/typescript/ui/components/OxyLogo.d.ts +0 -29
  314. package/lib/typescript/ui/components/OxyLogo.d.ts.map +0 -1
  315. package/lib/typescript/ui/components/OxyProvider.d.ts +0 -12
  316. package/lib/typescript/ui/components/OxyProvider.d.ts.map +0 -1
  317. package/lib/typescript/ui/components/OxySignInButton.d.ts +0 -70
  318. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +0 -1
  319. package/lib/typescript/ui/components/ProfileCard.d.ts +0 -20
  320. package/lib/typescript/ui/components/ProfileCard.d.ts.map +0 -1
  321. package/lib/typescript/ui/components/QuickActions.d.ts +0 -15
  322. package/lib/typescript/ui/components/QuickActions.d.ts.map +0 -1
  323. package/lib/typescript/ui/components/Section.d.ts +0 -11
  324. package/lib/typescript/ui/components/Section.d.ts.map +0 -1
  325. package/lib/typescript/ui/components/SectionTitle.d.ts +0 -9
  326. package/lib/typescript/ui/components/SectionTitle.d.ts.map +0 -1
  327. package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
  328. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
  329. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +0 -10
  330. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +0 -1
  331. package/lib/typescript/ui/components/icon/index.d.ts +0 -3
  332. package/lib/typescript/ui/components/icon/index.d.ts.map +0 -1
  333. package/lib/typescript/ui/components/index.d.ts +0 -13
  334. package/lib/typescript/ui/components/index.d.ts.map +0 -1
  335. package/lib/typescript/ui/context/OxyContext.d.ts +0 -42
  336. package/lib/typescript/ui/context/OxyContext.d.ts.map +0 -1
  337. package/lib/typescript/ui/index.d.ts +0 -15
  338. package/lib/typescript/ui/index.d.ts.map +0 -1
  339. package/lib/typescript/ui/navigation/OxyRouter.d.ts +0 -5
  340. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +0 -1
  341. package/lib/typescript/ui/navigation/types.d.ts +0 -116
  342. package/lib/typescript/ui/navigation/types.d.ts.map +0 -1
  343. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +0 -5
  344. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  345. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +0 -8
  346. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +0 -1
  347. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +0 -5
  348. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  349. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +0 -5
  350. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  351. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  352. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  353. package/lib/typescript/ui/screens/AppInfoScreen.d.ts +0 -5
  354. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +0 -1
  355. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
  356. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
  357. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +0 -8
  358. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +0 -1
  359. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
  360. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
  361. package/lib/typescript/ui/screens/ProfileScreen.d.ts +0 -9
  362. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +0 -1
  363. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +0 -5
  364. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  365. package/lib/typescript/ui/screens/SignInScreen.d.ts +0 -5
  366. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +0 -1
  367. package/lib/typescript/ui/screens/SignUpScreen.d.ts +0 -5
  368. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +0 -1
  369. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  370. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +0 -1
  371. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  372. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  373. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +0 -5
  374. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  375. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  376. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  377. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  378. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +0 -1
  379. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  380. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  381. package/lib/typescript/ui/styles/fonts.d.ts +0 -21
  382. package/lib/typescript/ui/styles/fonts.d.ts.map +0 -1
  383. package/lib/typescript/ui/styles/index.d.ts +0 -3
  384. package/lib/typescript/ui/styles/index.d.ts.map +0 -1
  385. package/lib/typescript/ui/styles/theme.d.ts +0 -68
  386. package/lib/typescript/ui/styles/theme.d.ts.map +0 -1
  387. package/lib/typescript/utils/deviceManager.d.ts +0 -66
  388. package/lib/typescript/utils/deviceManager.d.ts.map +0 -1
  389. package/lib/typescript/utils/index.d.ts +0 -3
  390. package/lib/typescript/utils/index.d.ts.map +0 -1
  391. package/lib/typescript/utils/polyfills.d.ts +0 -6
  392. package/lib/typescript/utils/polyfills.d.ts.map +0 -1
  393. package/src/lib/react-native-polyfills.ts +0 -219
  394. package/src/lib/sonner-safe.ts +0 -37
  395. package/src/lib/sonner.web.ts +0 -1
@@ -1,782 +0,0 @@
1
- "use strict";
2
-
3
- import React, { useState, useEffect } from 'react';
4
- import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator, ScrollView, Alert, Image, Dimensions } from 'react-native';
5
- import { useOxy } from '../context/OxyContext';
6
- import { toast } from '../../lib/sonner';
7
- import OxyIcon from '../components/icon/OxyIcon';
8
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
- const ModernAccountSwitcherScreen = ({
10
- onClose,
11
- theme,
12
- navigate,
13
- goBack,
14
- oxyServices
15
- }) => {
16
- const {
17
- user,
18
- sessions,
19
- activeSessionId,
20
- switchSession,
21
- removeSession,
22
- logoutAll,
23
- isLoading
24
- } = useOxy();
25
- const [sessionsWithUsers, setSessionsWithUsers] = useState([]);
26
- const [switchingToUserId, setSwitchingToUserId] = useState(null);
27
- const [removingUserId, setRemovingUserId] = useState(null);
28
-
29
- // Device session management state
30
- const [showDeviceManagement, setShowDeviceManagement] = useState(false);
31
- const [deviceSessions, setDeviceSessions] = useState([]);
32
- const [loadingDeviceSessions, setLoadingDeviceSessions] = useState(false);
33
- const [remotingLogoutSessionId, setRemoteLogoutSessionId] = useState(null);
34
- const [loggingOutAllDevices, setLoggingOutAllDevices] = useState(false);
35
- const screenWidth = Dimensions.get('window').width;
36
- const isDarkTheme = theme === 'dark';
37
-
38
- // Modern color scheme
39
- const colors = {
40
- background: isDarkTheme ? '#000000' : '#FFFFFF',
41
- surface: isDarkTheme ? '#1C1C1E' : '#F2F2F7',
42
- card: isDarkTheme ? '#2C2C2E' : '#FFFFFF',
43
- text: isDarkTheme ? '#FFFFFF' : '#000000',
44
- secondaryText: isDarkTheme ? '#8E8E93' : '#6D6D70',
45
- accent: '#007AFF',
46
- destructive: '#FF3B30',
47
- success: '#34C759',
48
- border: isDarkTheme ? '#38383A' : '#C6C6C8',
49
- activeCard: isDarkTheme ? '#0A84FF20' : '#007AFF15',
50
- shadow: isDarkTheme ? 'rgba(0,0,0,0.3)' : 'rgba(0,0,0,0.1)'
51
- };
52
-
53
- // Load user profiles for sessions
54
- useEffect(() => {
55
- const loadUserProfiles = async () => {
56
- if (!sessions.length || !oxyServices) return;
57
- const updatedSessions = sessions.map(session => ({
58
- ...session,
59
- isLoadingProfile: true
60
- }));
61
- setSessionsWithUsers(updatedSessions);
62
-
63
- // Load profiles for each session
64
- for (let i = 0; i < sessions.length; i++) {
65
- const session = sessions[i];
66
- try {
67
- // Try to get user profile using the session
68
- const userProfile = await oxyServices.getUserBySession(session.sessionId);
69
- setSessionsWithUsers(prev => prev.map(s => s.sessionId === session.sessionId ? {
70
- ...s,
71
- userProfile,
72
- isLoadingProfile: false
73
- } : s));
74
- } catch (error) {
75
- console.error(`Failed to load profile for session ${session.sessionId}:`, error);
76
- setSessionsWithUsers(prev => prev.map(s => s.sessionId === session.sessionId ? {
77
- ...s,
78
- isLoadingProfile: false
79
- } : s));
80
- }
81
- }
82
- };
83
- loadUserProfiles();
84
- }, [sessions, oxyServices]);
85
- const handleSwitchSession = async sessionId => {
86
- if (sessionId === user?.sessionId) return; // Already active session
87
-
88
- setSwitchingToUserId(sessionId);
89
- try {
90
- await switchSession(sessionId);
91
- toast.success('Account switched successfully!');
92
- if (onClose) {
93
- onClose();
94
- }
95
- } catch (error) {
96
- console.error('Switch session failed:', error);
97
- toast.error('There was a problem switching accounts. Please try again.');
98
- } finally {
99
- setSwitchingToUserId(null);
100
- }
101
- };
102
- const handleRemoveSession = async sessionId => {
103
- const sessionToRemove = sessionsWithUsers.find(s => s.sessionId === sessionId);
104
- if (!sessionToRemove) return;
105
- const displayName = typeof sessionToRemove.userProfile?.name === 'object' ? sessionToRemove.userProfile.name.full || sessionToRemove.userProfile.name.first || sessionToRemove.userProfile.username : sessionToRemove.userProfile?.name || sessionToRemove.userProfile?.username || 'this account';
106
- Alert.alert('Remove Account', `Are you sure you want to remove ${displayName} from this device? You'll need to sign in again to access this account.`, [{
107
- text: 'Cancel',
108
- style: 'cancel'
109
- }, {
110
- text: 'Remove',
111
- style: 'destructive',
112
- onPress: async () => {
113
- setRemovingUserId(sessionId);
114
- try {
115
- await removeSession(sessionId);
116
- toast.success('Account removed successfully!');
117
- } catch (error) {
118
- console.error('Remove session failed:', error);
119
- toast.error('There was a problem removing the account. Please try again.');
120
- } finally {
121
- setRemovingUserId(null);
122
- }
123
- }
124
- }], {
125
- cancelable: true
126
- });
127
- };
128
- const handleLogoutAll = async () => {
129
- // IMPORTANT DEBUG INFO - Check this in console
130
- console.log('🔴 DEBUG handleLogoutAll called');
131
- console.log('🔴 Current user:', user);
132
- console.log('🔴 activeSessionId:', activeSessionId);
133
- console.log('🔴 sessions count:', sessions?.length || 0);
134
- console.log('🔴 sessions array:', sessions);
135
- console.log('🔴 isLoading:', isLoading);
136
- console.log('🔴 logoutAll function type:', typeof logoutAll);
137
-
138
- // Check if we have the required data
139
- if (!activeSessionId) {
140
- console.error('🔴 ERROR: No activeSessionId found!');
141
- toast.error('No active session found. You may already be logged out.');
142
- return;
143
- }
144
- if (typeof logoutAll !== 'function') {
145
- console.error('🔴 ERROR: logoutAll is not a function!', typeof logoutAll);
146
- toast.error('Logout function not available. Please try refreshing the app.');
147
- return;
148
- }
149
-
150
- // TEMPORARY: Skip confirmation dialog to test direct logout
151
- console.log('🔴 TESTING: Bypassing confirmation dialog for direct test');
152
- try {
153
- console.log('🔴 TESTING: About to call logoutAll() directly');
154
- await logoutAll();
155
- console.log('🔴 TESTING: logoutAll() completed successfully');
156
- toast.success('All accounts signed out successfully!');
157
- if (onClose) {
158
- console.log('🔴 TESTING: Calling onClose');
159
- onClose();
160
- }
161
- } catch (error) {
162
- console.error('🔴 TESTING: Logout all failed:', error);
163
- const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
164
- toast.error(`There was a problem signing out: ${errorMessage}`);
165
- }
166
- };
167
-
168
- // Device session management functions
169
- const loadAllDeviceSessions = async () => {
170
- if (!oxyServices || !user?.sessionId) return;
171
- setLoadingDeviceSessions(true);
172
- try {
173
- // This would call the API to get all device sessions for the current user
174
- const allSessions = await oxyServices.getDeviceSessions(user.sessionId);
175
- setDeviceSessions(allSessions || []);
176
- } catch (error) {
177
- console.error('Failed to load device sessions:', error);
178
- toast.error('Failed to load device sessions. Please try again.');
179
- } finally {
180
- setLoadingDeviceSessions(false);
181
- }
182
- };
183
- const handleRemoteSessionLogout = async (sessionId, deviceName) => {
184
- Alert.alert('Remove Device Session', `Are you sure you want to sign out from "${deviceName}"? This will end the session on that device.`, [{
185
- text: 'Cancel',
186
- style: 'cancel'
187
- }, {
188
- text: 'Sign Out',
189
- style: 'destructive',
190
- onPress: async () => {
191
- setRemoteLogoutSessionId(sessionId);
192
- try {
193
- await oxyServices?.logoutSecureSession(user?.sessionId || '', sessionId);
194
- // Refresh device sessions list
195
- await loadAllDeviceSessions();
196
- toast.success(`Signed out from ${deviceName} successfully!`);
197
- } catch (error) {
198
- console.error('Remote logout failed:', error);
199
- toast.error('There was a problem signing out from the device. Please try again.');
200
- } finally {
201
- setRemoteLogoutSessionId(null);
202
- }
203
- }
204
- }], {
205
- cancelable: true
206
- });
207
- };
208
- const handleLogoutAllDevices = async () => {
209
- const otherDevicesCount = deviceSessions.filter(session => !session.isCurrent).length;
210
- if (otherDevicesCount === 0) {
211
- toast.info('No other device sessions found to sign out from.');
212
- return;
213
- }
214
- Alert.alert('Sign Out All Other Devices', `Are you sure you want to sign out from all ${otherDevicesCount} other device(s)? This will end sessions on all other devices except this one.`, [{
215
- text: 'Cancel',
216
- style: 'cancel'
217
- }, {
218
- text: 'Sign Out All',
219
- style: 'destructive',
220
- onPress: async () => {
221
- setLoggingOutAllDevices(true);
222
- try {
223
- await oxyServices?.logoutAllDeviceSessions(user?.sessionId || '', undefined, true);
224
- // Refresh device sessions list
225
- await loadAllDeviceSessions();
226
- toast.success('Signed out from all other devices successfully!');
227
- } catch (error) {
228
- console.error('Logout all devices failed:', error);
229
- toast.error('There was a problem signing out from other devices. Please try again.');
230
- } finally {
231
- setLoggingOutAllDevices(false);
232
- }
233
- }
234
- }], {
235
- cancelable: true
236
- });
237
- };
238
- return /*#__PURE__*/_jsxs(View, {
239
- style: [styles.container, {
240
- backgroundColor: '#f2f2f2'
241
- }],
242
- children: [/*#__PURE__*/_jsxs(View, {
243
- style: styles.header,
244
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
245
- style: styles.backButton,
246
- onPress: goBack,
247
- children: /*#__PURE__*/_jsx(OxyIcon, {
248
- name: "chevron-back",
249
- size: 24,
250
- color: "#007AFF"
251
- })
252
- }), /*#__PURE__*/_jsx(Text, {
253
- style: styles.headerTitle,
254
- children: "Account Switcher"
255
- }), onClose && /*#__PURE__*/_jsx(TouchableOpacity, {
256
- style: styles.closeButton,
257
- onPress: onClose,
258
- children: /*#__PURE__*/_jsx(Text, {
259
- style: styles.closeButtonText,
260
- children: "\xD7"
261
- })
262
- })]
263
- }), /*#__PURE__*/_jsx(ScrollView, {
264
- style: styles.content,
265
- children: isLoading ? /*#__PURE__*/_jsxs(View, {
266
- style: styles.loadingContainer,
267
- children: [/*#__PURE__*/_jsx(ActivityIndicator, {
268
- size: "large",
269
- color: "#007AFF"
270
- }), /*#__PURE__*/_jsx(Text, {
271
- style: styles.loadingText,
272
- children: "Loading accounts..."
273
- })]
274
- }) : /*#__PURE__*/_jsxs(_Fragment, {
275
- children: [user && /*#__PURE__*/_jsxs(View, {
276
- style: styles.section,
277
- children: [/*#__PURE__*/_jsx(Text, {
278
- style: styles.sectionTitle,
279
- children: "Current Account"
280
- }), /*#__PURE__*/_jsxs(View, {
281
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem, styles.currentAccountCard],
282
- children: [/*#__PURE__*/_jsxs(View, {
283
- style: styles.userIcon,
284
- children: [user.avatar?.url ? /*#__PURE__*/_jsx(Image, {
285
- source: {
286
- uri: user.avatar.url
287
- },
288
- style: styles.accountAvatarImage
289
- }) : /*#__PURE__*/_jsx(View, {
290
- style: styles.accountAvatarFallback,
291
- children: /*#__PURE__*/_jsx(Text, {
292
- style: styles.accountAvatarText,
293
- children: (typeof user.name === 'string' ? user.name : user.name?.first || user.username)?.charAt(0).toUpperCase()
294
- })
295
- }), /*#__PURE__*/_jsx(View, {
296
- style: styles.activeBadge,
297
- children: /*#__PURE__*/_jsx(OxyIcon, {
298
- name: "checkmark",
299
- size: 12,
300
- color: "#fff"
301
- })
302
- })]
303
- }), /*#__PURE__*/_jsx(View, {
304
- style: styles.settingInfo,
305
- children: /*#__PURE__*/_jsxs(View, {
306
- children: [/*#__PURE__*/_jsx(Text, {
307
- style: styles.settingLabel,
308
- children: typeof user.name === 'string' ? user.name : user.name?.full || user.name?.first || user.username
309
- }), /*#__PURE__*/_jsx(Text, {
310
- style: styles.settingDescription,
311
- children: user.email || user.username
312
- })]
313
- })
314
- }), /*#__PURE__*/_jsx(View, {
315
- style: styles.currentBadge,
316
- children: /*#__PURE__*/_jsx(Text, {
317
- style: styles.currentBadgeText,
318
- children: "Current"
319
- })
320
- })]
321
- })]
322
- }), sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).length > 0 && /*#__PURE__*/_jsxs(View, {
323
- style: styles.section,
324
- children: [/*#__PURE__*/_jsxs(Text, {
325
- style: styles.sectionTitle,
326
- children: ["Other Accounts (", sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).length, ")"]
327
- }), sessionsWithUsers.filter(s => s.sessionId !== activeSessionId).map((sessionWithUser, index, filteredArray) => {
328
- const isFirst = index === 0;
329
- const isLast = index === filteredArray.length - 1;
330
- const isSwitching = switchingToUserId === sessionWithUser.sessionId;
331
- const isRemoving = removingUserId === sessionWithUser.sessionId;
332
- const {
333
- userProfile,
334
- isLoadingProfile
335
- } = sessionWithUser;
336
- const displayName = typeof userProfile?.name === 'object' ? userProfile.name.full || userProfile.name.first || userProfile.username : userProfile?.name || userProfile?.username || 'Unknown User';
337
- return /*#__PURE__*/_jsxs(View, {
338
- style: [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem],
339
- children: [/*#__PURE__*/_jsx(View, {
340
- style: styles.userIcon,
341
- children: isLoadingProfile ? /*#__PURE__*/_jsx(View, {
342
- style: styles.accountAvatarFallback,
343
- children: /*#__PURE__*/_jsx(ActivityIndicator, {
344
- size: "small",
345
- color: "#007AFF"
346
- })
347
- }) : userProfile?.avatar?.url ? /*#__PURE__*/_jsx(Image, {
348
- source: {
349
- uri: userProfile.avatar.url
350
- },
351
- style: styles.accountAvatarImage
352
- }) : /*#__PURE__*/_jsx(View, {
353
- style: styles.accountAvatarFallback,
354
- children: /*#__PURE__*/_jsx(Text, {
355
- style: styles.accountAvatarText,
356
- children: displayName.charAt(0).toUpperCase()
357
- })
358
- })
359
- }), /*#__PURE__*/_jsx(View, {
360
- style: styles.settingInfo,
361
- children: /*#__PURE__*/_jsxs(View, {
362
- children: [/*#__PURE__*/_jsx(Text, {
363
- style: styles.settingLabel,
364
- children: displayName
365
- }), /*#__PURE__*/_jsxs(Text, {
366
- style: styles.settingDescription,
367
- children: ["@", userProfile?.username || 'unknown']
368
- })]
369
- })
370
- }), /*#__PURE__*/_jsxs(View, {
371
- style: styles.accountActions,
372
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
373
- style: styles.switchButton,
374
- onPress: () => handleSwitchSession(sessionWithUser.sessionId),
375
- disabled: isSwitching || isRemoving,
376
- children: isSwitching ? /*#__PURE__*/_jsx(ActivityIndicator, {
377
- size: "small",
378
- color: "#007AFF"
379
- }) : /*#__PURE__*/_jsx(Text, {
380
- style: styles.switchButtonText,
381
- children: "Switch"
382
- })
383
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
384
- style: styles.removeButton,
385
- onPress: () => handleRemoveSession(sessionWithUser.sessionId),
386
- disabled: isSwitching || isRemoving,
387
- children: isRemoving ? /*#__PURE__*/_jsx(ActivityIndicator, {
388
- size: "small",
389
- color: "#FF3B30"
390
- }) : /*#__PURE__*/_jsx(OxyIcon, {
391
- name: "trash",
392
- size: 16,
393
- color: "#FF3B30"
394
- })
395
- })]
396
- })]
397
- }, sessionWithUser.sessionId);
398
- })]
399
- }), /*#__PURE__*/_jsxs(View, {
400
- style: styles.section,
401
- children: [/*#__PURE__*/_jsx(Text, {
402
- style: styles.sectionTitle,
403
- children: "Quick Actions"
404
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
405
- style: [styles.settingItem, styles.firstSettingItem],
406
- onPress: () => navigate?.('SignIn'),
407
- children: [/*#__PURE__*/_jsxs(View, {
408
- style: styles.settingInfo,
409
- children: [/*#__PURE__*/_jsx(OxyIcon, {
410
- name: "person-add",
411
- size: 20,
412
- color: "#007AFF",
413
- style: styles.settingIcon
414
- }), /*#__PURE__*/_jsxs(View, {
415
- children: [/*#__PURE__*/_jsx(Text, {
416
- style: styles.settingLabel,
417
- children: "Add Another Account"
418
- }), /*#__PURE__*/_jsx(Text, {
419
- style: styles.settingDescription,
420
- children: "Sign in with a different account"
421
- })]
422
- })]
423
- }), /*#__PURE__*/_jsx(OxyIcon, {
424
- name: "chevron-forward",
425
- size: 16,
426
- color: "#ccc"
427
- })]
428
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
429
- style: styles.settingItem,
430
- onPress: () => setShowDeviceManagement(!showDeviceManagement),
431
- children: [/*#__PURE__*/_jsxs(View, {
432
- style: styles.settingInfo,
433
- children: [/*#__PURE__*/_jsx(OxyIcon, {
434
- name: "devices",
435
- size: 20,
436
- color: "#5856D6",
437
- style: styles.settingIcon
438
- }), /*#__PURE__*/_jsxs(View, {
439
- children: [/*#__PURE__*/_jsxs(Text, {
440
- style: styles.settingLabel,
441
- children: [showDeviceManagement ? 'Hide' : 'Manage', " Device Sessions"]
442
- }), /*#__PURE__*/_jsx(Text, {
443
- style: styles.settingDescription,
444
- children: "View and manage sessions on other devices"
445
- })]
446
- })]
447
- }), /*#__PURE__*/_jsx(OxyIcon, {
448
- name: "chevron-forward",
449
- size: 16,
450
- color: "#ccc"
451
- })]
452
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
453
- style: [styles.settingItem, styles.lastSettingItem],
454
- onPress: handleLogoutAll,
455
- disabled: sessionsWithUsers.length === 0,
456
- children: [/*#__PURE__*/_jsxs(View, {
457
- style: styles.settingInfo,
458
- children: [/*#__PURE__*/_jsx(OxyIcon, {
459
- name: "log-out",
460
- size: 20,
461
- color: "#FF3B30",
462
- style: styles.settingIcon
463
- }), /*#__PURE__*/_jsxs(View, {
464
- children: [/*#__PURE__*/_jsx(Text, {
465
- style: [styles.settingLabel, {
466
- color: sessionsWithUsers.length === 0 ? '#ccc' : '#FF3B30'
467
- }],
468
- children: "Sign Out All Accounts"
469
- }), /*#__PURE__*/_jsx(Text, {
470
- style: styles.settingDescription,
471
- children: "Remove all accounts from this device"
472
- })]
473
- })]
474
- }), /*#__PURE__*/_jsx(OxyIcon, {
475
- name: "chevron-forward",
476
- size: 16,
477
- color: "#ccc"
478
- })]
479
- })]
480
- }), showDeviceManagement && /*#__PURE__*/_jsxs(View, {
481
- style: styles.section,
482
- children: [/*#__PURE__*/_jsx(Text, {
483
- style: styles.sectionTitle,
484
- children: "Device Sessions"
485
- }), loadingDeviceSessions ? /*#__PURE__*/_jsx(View, {
486
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
487
- children: /*#__PURE__*/_jsxs(View, {
488
- style: styles.loadingContainer,
489
- children: [/*#__PURE__*/_jsx(ActivityIndicator, {
490
- size: "small",
491
- color: "#007AFF"
492
- }), /*#__PURE__*/_jsx(Text, {
493
- style: styles.loadingText,
494
- children: "Loading device sessions..."
495
- })]
496
- })
497
- }) : deviceSessions.length === 0 ? /*#__PURE__*/_jsx(View, {
498
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
499
- children: /*#__PURE__*/_jsxs(View, {
500
- style: styles.settingInfo,
501
- children: [/*#__PURE__*/_jsx(OxyIcon, {
502
- name: "phone-portrait",
503
- size: 20,
504
- color: "#ccc",
505
- style: styles.settingIcon
506
- }), /*#__PURE__*/_jsxs(View, {
507
- children: [/*#__PURE__*/_jsx(Text, {
508
- style: styles.settingLabel,
509
- children: "No device sessions found"
510
- }), /*#__PURE__*/_jsx(Text, {
511
- style: styles.settingDescription,
512
- children: "Device session management not available"
513
- })]
514
- })]
515
- })
516
- }) : /*#__PURE__*/_jsx(_Fragment, {
517
- children: deviceSessions.map((session, index) => /*#__PURE__*/_jsxs(View, {
518
- style: [styles.settingItem, index === 0 && styles.firstSettingItem, index === deviceSessions.length - 1 && styles.lastSettingItem],
519
- children: [/*#__PURE__*/_jsxs(View, {
520
- style: styles.settingInfo,
521
- children: [/*#__PURE__*/_jsx(OxyIcon, {
522
- name: session.isCurrent ? "phone-portrait" : "phone-portrait-outline",
523
- size: 20,
524
- color: session.isCurrent ? "#34C759" : "#8E8E93",
525
- style: styles.settingIcon
526
- }), /*#__PURE__*/_jsxs(View, {
527
- children: [/*#__PURE__*/_jsxs(Text, {
528
- style: styles.settingLabel,
529
- children: [session.deviceName, " ", session.isCurrent ? '(This device)' : '']
530
- }), /*#__PURE__*/_jsxs(Text, {
531
- style: styles.settingDescription,
532
- children: ["Last active: ", new Date(session.lastActive).toLocaleDateString()]
533
- })]
534
- })]
535
- }), !session.isCurrent && /*#__PURE__*/_jsx(TouchableOpacity, {
536
- style: styles.removeButton,
537
- onPress: () => handleRemoteSessionLogout(session.sessionId, session.deviceName),
538
- disabled: remotingLogoutSessionId === session.sessionId,
539
- children: remotingLogoutSessionId === session.sessionId ? /*#__PURE__*/_jsx(ActivityIndicator, {
540
- size: "small",
541
- color: "#FF3B30"
542
- }) : /*#__PURE__*/_jsx(OxyIcon, {
543
- name: "log-out",
544
- size: 16,
545
- color: "#FF3B30"
546
- })
547
- })]
548
- }, session.sessionId))
549
- })]
550
- }), sessionsWithUsers.length === 0 && /*#__PURE__*/_jsx(View, {
551
- style: styles.section,
552
- children: /*#__PURE__*/_jsx(View, {
553
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
554
- children: /*#__PURE__*/_jsxs(View, {
555
- style: styles.emptyStateContainer,
556
- children: [/*#__PURE__*/_jsx(OxyIcon, {
557
- name: "person-outline",
558
- size: 48,
559
- color: "#ccc"
560
- }), /*#__PURE__*/_jsx(Text, {
561
- style: styles.emptyStateTitle,
562
- children: "No saved accounts"
563
- }), /*#__PURE__*/_jsx(Text, {
564
- style: styles.emptyStateDescription,
565
- children: "Add another account to switch between them quickly"
566
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
567
- style: styles.addAccountButton,
568
- onPress: () => navigate?.('SignIn'),
569
- children: /*#__PURE__*/_jsx(Text, {
570
- style: styles.addAccountButtonText,
571
- children: "Add Account"
572
- })
573
- })]
574
- })
575
- })
576
- })]
577
- })
578
- })]
579
- });
580
- };
581
- const styles = StyleSheet.create({
582
- container: {
583
- flex: 1,
584
- backgroundColor: '#f2f2f2'
585
- },
586
- header: {
587
- paddingHorizontal: 20,
588
- paddingTop: 60,
589
- paddingBottom: 16,
590
- backgroundColor: '#fff',
591
- borderBottomWidth: 1,
592
- borderBottomColor: '#e0e0e0',
593
- flexDirection: 'row',
594
- justifyContent: 'space-between',
595
- alignItems: 'center'
596
- },
597
- headerTitle: {
598
- fontSize: 24,
599
- fontWeight: 'bold',
600
- color: '#000'
601
- },
602
- backButton: {
603
- padding: 8
604
- },
605
- closeButton: {
606
- padding: 8
607
- },
608
- closeButtonText: {
609
- fontSize: 24,
610
- color: '#000',
611
- fontWeight: '300'
612
- },
613
- content: {
614
- flex: 1,
615
- padding: 16
616
- },
617
- section: {
618
- marginBottom: 24
619
- },
620
- sectionTitle: {
621
- fontSize: 16,
622
- fontWeight: '600',
623
- color: '#333',
624
- marginBottom: 12
625
- },
626
- settingItem: {
627
- backgroundColor: '#fff',
628
- padding: 16,
629
- flexDirection: 'row',
630
- alignItems: 'center',
631
- justifyContent: 'space-between',
632
- marginBottom: 2
633
- },
634
- firstSettingItem: {
635
- borderTopLeftRadius: 24,
636
- borderTopRightRadius: 24
637
- },
638
- lastSettingItem: {
639
- borderBottomLeftRadius: 24,
640
- borderBottomRightRadius: 24,
641
- marginBottom: 8
642
- },
643
- currentAccountCard: {
644
- borderWidth: 2,
645
- borderColor: '#007AFF',
646
- backgroundColor: '#007AFF08'
647
- },
648
- settingInfo: {
649
- flexDirection: 'row',
650
- alignItems: 'center',
651
- flex: 1
652
- },
653
- settingIcon: {
654
- marginRight: 12
655
- },
656
- settingLabel: {
657
- fontSize: 16,
658
- fontWeight: '500',
659
- color: '#333',
660
- marginBottom: 2
661
- },
662
- settingDescription: {
663
- fontSize: 14,
664
- color: '#666'
665
- },
666
- userIcon: {
667
- marginRight: 12,
668
- position: 'relative'
669
- },
670
- accountAvatarImage: {
671
- width: 40,
672
- height: 40,
673
- borderRadius: 20
674
- },
675
- accountAvatarFallback: {
676
- width: 40,
677
- height: 40,
678
- borderRadius: 20,
679
- backgroundColor: '#d169e5',
680
- alignItems: 'center',
681
- justifyContent: 'center'
682
- },
683
- accountAvatarText: {
684
- color: 'white',
685
- fontSize: 18,
686
- fontWeight: 'bold'
687
- },
688
- activeBadge: {
689
- position: 'absolute',
690
- top: -2,
691
- right: -2,
692
- width: 16,
693
- height: 16,
694
- borderRadius: 8,
695
- backgroundColor: '#34C759',
696
- alignItems: 'center',
697
- justifyContent: 'center',
698
- borderWidth: 2,
699
- borderColor: '#fff'
700
- },
701
- currentBadge: {
702
- backgroundColor: '#007AFF',
703
- paddingHorizontal: 8,
704
- paddingVertical: 4,
705
- borderRadius: 12
706
- },
707
- currentBadgeText: {
708
- color: '#fff',
709
- fontSize: 12,
710
- fontWeight: '600'
711
- },
712
- accountActions: {
713
- flexDirection: 'row',
714
- alignItems: 'center',
715
- gap: 8
716
- },
717
- switchButton: {
718
- backgroundColor: '#007AFF',
719
- paddingHorizontal: 16,
720
- paddingVertical: 8,
721
- borderRadius: 16,
722
- minWidth: 60,
723
- alignItems: 'center'
724
- },
725
- switchButtonText: {
726
- color: '#fff',
727
- fontSize: 14,
728
- fontWeight: '500'
729
- },
730
- removeButton: {
731
- padding: 8,
732
- borderRadius: 16,
733
- backgroundColor: '#fff',
734
- borderWidth: 1,
735
- borderColor: '#FF3B30',
736
- alignItems: 'center',
737
- justifyContent: 'center'
738
- },
739
- loadingContainer: {
740
- flexDirection: 'row',
741
- alignItems: 'center',
742
- justifyContent: 'center',
743
- paddingVertical: 20,
744
- gap: 12
745
- },
746
- loadingText: {
747
- fontSize: 16,
748
- color: '#666'
749
- },
750
- emptyStateContainer: {
751
- alignItems: 'center',
752
- paddingVertical: 32,
753
- paddingHorizontal: 20
754
- },
755
- emptyStateTitle: {
756
- fontSize: 18,
757
- fontWeight: '600',
758
- color: '#333',
759
- marginTop: 16,
760
- marginBottom: 8
761
- },
762
- emptyStateDescription: {
763
- fontSize: 14,
764
- color: '#666',
765
- textAlign: 'center',
766
- marginBottom: 24,
767
- lineHeight: 20
768
- },
769
- addAccountButton: {
770
- backgroundColor: '#007AFF',
771
- paddingHorizontal: 24,
772
- paddingVertical: 12,
773
- borderRadius: 20
774
- },
775
- addAccountButtonText: {
776
- color: '#fff',
777
- fontSize: 16,
778
- fontWeight: '600'
779
- }
780
- });
781
- export default ModernAccountSwitcherScreen;
782
- //# sourceMappingURL=AccountSwitcherScreen.js.map