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