@oxyhq/services 5.4.2 → 5.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/lib/commonjs/assets/OxyLogo.svg +1 -0
  2. package/lib/commonjs/assets/assets/OxyLogo.svg +1 -0
  3. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  5. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  6. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  7. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  8. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  9. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  10. package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
  11. package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
  12. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  13. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  16. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  17. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  18. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  19. package/lib/commonjs/assets/icons/OxyServices.js +53 -0
  20. package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
  21. package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
  22. package/lib/commonjs/constants/version.js +28 -0
  23. package/lib/commonjs/constants/version.js.map +1 -0
  24. package/lib/commonjs/core/index.js +1660 -0
  25. package/lib/commonjs/core/index.js.map +1 -0
  26. package/lib/commonjs/index.js +160 -0
  27. package/lib/commonjs/index.js.map +1 -0
  28. package/lib/commonjs/lib/sonner.js +21 -0
  29. package/lib/commonjs/lib/sonner.js.map +1 -0
  30. package/lib/commonjs/models/interfaces.js +2 -0
  31. package/lib/commonjs/models/interfaces.js.map +1 -0
  32. package/lib/commonjs/models/secureSession.js +2 -0
  33. package/lib/commonjs/models/secureSession.js.map +1 -0
  34. package/lib/commonjs/node/index.js +54 -0
  35. package/lib/commonjs/node/index.js.map +1 -0
  36. package/lib/commonjs/ui/components/Avatar.js +98 -0
  37. package/lib/commonjs/ui/components/Avatar.js.map +1 -0
  38. package/lib/commonjs/ui/components/FollowButton.js +246 -0
  39. package/lib/commonjs/ui/components/FollowButton.js.map +1 -0
  40. package/lib/commonjs/ui/components/FontLoader.js +181 -0
  41. package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
  42. package/lib/commonjs/ui/components/GroupedItem.js +109 -0
  43. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
  44. package/lib/commonjs/ui/components/GroupedSection.js +33 -0
  45. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
  46. package/lib/commonjs/ui/components/OxyLogo.js +56 -0
  47. package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
  48. package/lib/commonjs/ui/components/OxyProvider.js +517 -0
  49. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
  50. package/lib/commonjs/ui/components/OxySignInButton.js +178 -0
  51. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
  52. package/lib/commonjs/ui/components/ProfileCard.js +124 -0
  53. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
  54. package/lib/commonjs/ui/components/QuickActions.js +87 -0
  55. package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
  56. package/lib/commonjs/ui/components/Section.js +36 -0
  57. package/lib/commonjs/ui/components/Section.js.map +1 -0
  58. package/lib/commonjs/ui/components/SectionTitle.js +35 -0
  59. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
  60. package/lib/commonjs/ui/components/bottomSheet/index.js +37 -0
  61. package/lib/commonjs/ui/components/bottomSheet/index.js.map +1 -0
  62. package/lib/commonjs/ui/components/icon/OxyIcon.js +27 -0
  63. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -0
  64. package/lib/commonjs/ui/components/icon/index.js +14 -0
  65. package/lib/commonjs/ui/components/icon/index.js.map +1 -0
  66. package/lib/commonjs/ui/components/index.js +97 -0
  67. package/lib/commonjs/ui/components/index.js.map +1 -0
  68. package/lib/commonjs/ui/context/OxyContext.js +584 -0
  69. package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
  70. package/lib/commonjs/ui/index.js +128 -0
  71. package/lib/commonjs/ui/index.js.map +1 -0
  72. package/lib/commonjs/ui/navigation/OxyRouter.js +264 -0
  73. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -0
  74. package/lib/commonjs/ui/navigation/types.js +6 -0
  75. package/lib/commonjs/ui/navigation/types.js.map +1 -0
  76. package/lib/commonjs/ui/screens/AccountCenterScreen.js +313 -0
  77. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
  78. package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
  79. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
  80. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +855 -0
  81. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
  82. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +843 -0
  83. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
  84. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +788 -0
  85. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
  86. package/lib/commonjs/ui/screens/AppInfoScreen.js +664 -0
  87. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -0
  88. package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
  89. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
  90. package/lib/commonjs/ui/screens/FileManagementScreen.js +2515 -0
  91. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
  92. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
  93. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  94. package/lib/commonjs/ui/screens/ProfileScreen.js +450 -0
  95. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -0
  96. package/lib/commonjs/ui/screens/SessionManagementScreen.js +449 -0
  97. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -0
  98. package/lib/commonjs/ui/screens/SignInScreen.js +1004 -0
  99. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -0
  100. package/lib/commonjs/ui/screens/SignUpScreen.js +937 -0
  101. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -0
  102. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +88 -0
  103. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
  104. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +364 -0
  105. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
  106. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +227 -0
  107. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
  108. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +148 -0
  109. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
  110. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +127 -0
  111. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
  112. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +105 -0
  113. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
  114. package/lib/commonjs/ui/styles/FONTS.md +126 -0
  115. package/lib/commonjs/ui/styles/fonts.js +84 -0
  116. package/lib/commonjs/ui/styles/fonts.js.map +1 -0
  117. package/lib/commonjs/ui/styles/index.js +28 -0
  118. package/lib/commonjs/ui/styles/index.js.map +1 -0
  119. package/lib/commonjs/ui/styles/theme.js +121 -0
  120. package/lib/commonjs/ui/styles/theme.js.map +1 -0
  121. package/lib/commonjs/utils/deviceManager.js +173 -0
  122. package/lib/commonjs/utils/deviceManager.js.map +1 -0
  123. package/lib/commonjs/utils/index.js +13 -0
  124. package/lib/commonjs/utils/index.js.map +1 -0
  125. package/lib/commonjs/utils/polyfills.js +42 -0
  126. package/lib/commonjs/utils/polyfills.js.map +1 -0
  127. package/lib/module/assets/OxyLogo.svg +1 -0
  128. package/lib/module/assets/assets/OxyLogo.svg +1 -0
  129. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  130. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  131. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  132. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  133. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  134. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  135. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  136. package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
  137. package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
  138. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  139. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  140. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  141. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  142. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  143. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  144. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  145. package/lib/module/assets/icons/OxyServices.js +46 -0
  146. package/lib/module/assets/icons/OxyServices.js.map +1 -0
  147. package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
  148. package/lib/module/constants/version.js +21 -0
  149. package/lib/module/constants/version.js.map +1 -0
  150. package/lib/module/core/index.js +1634 -0
  151. package/lib/module/core/index.js.map +1 -0
  152. package/lib/module/index.js +48 -0
  153. package/lib/module/index.js.map +1 -0
  154. package/lib/module/lib/sonner.js +16 -0
  155. package/lib/module/lib/sonner.js.map +1 -0
  156. package/lib/module/models/interfaces.js +2 -0
  157. package/lib/module/models/interfaces.js.map +1 -0
  158. package/lib/module/models/secureSession.js +2 -0
  159. package/lib/module/models/secureSession.js.map +1 -0
  160. package/lib/module/node/index.js +23 -0
  161. package/lib/module/node/index.js.map +1 -0
  162. package/lib/module/ui/components/Avatar.js +93 -0
  163. package/lib/module/ui/components/Avatar.js.map +1 -0
  164. package/lib/module/ui/components/FollowButton.js +241 -0
  165. package/lib/module/ui/components/FollowButton.js.map +1 -0
  166. package/lib/module/ui/components/FontLoader.js +176 -0
  167. package/lib/module/ui/components/FontLoader.js.map +1 -0
  168. package/lib/module/ui/components/GroupedItem.js +104 -0
  169. package/lib/module/ui/components/GroupedItem.js.map +1 -0
  170. package/lib/module/ui/components/GroupedSection.js +28 -0
  171. package/lib/module/ui/components/GroupedSection.js.map +1 -0
  172. package/lib/module/ui/components/OxyLogo.js +49 -0
  173. package/lib/module/ui/components/OxyLogo.js.map +1 -0
  174. package/lib/module/ui/components/OxyProvider.js +511 -0
  175. package/lib/module/ui/components/OxyProvider.js.map +1 -0
  176. package/lib/module/ui/components/OxySignInButton.js +172 -0
  177. package/lib/module/ui/components/OxySignInButton.js.map +1 -0
  178. package/lib/module/ui/components/ProfileCard.js +119 -0
  179. package/lib/module/ui/components/ProfileCard.js.map +1 -0
  180. package/lib/module/ui/components/QuickActions.js +82 -0
  181. package/lib/module/ui/components/QuickActions.js.map +1 -0
  182. package/lib/module/ui/components/Section.js +31 -0
  183. package/lib/module/ui/components/Section.js.map +1 -0
  184. package/lib/module/ui/components/SectionTitle.js +30 -0
  185. package/lib/module/ui/components/SectionTitle.js.map +1 -0
  186. package/lib/module/ui/components/bottomSheet/index.js +5 -0
  187. package/lib/module/ui/components/bottomSheet/index.js.map +1 -0
  188. package/lib/module/ui/components/icon/OxyIcon.js +22 -0
  189. package/lib/module/ui/components/icon/OxyIcon.js.map +1 -0
  190. package/lib/module/ui/components/icon/index.js +4 -0
  191. package/lib/module/ui/components/icon/index.js.map +1 -0
  192. package/lib/module/ui/components/index.js +18 -0
  193. package/lib/module/ui/components/index.js.map +1 -0
  194. package/lib/module/ui/context/OxyContext.js +579 -0
  195. package/lib/module/ui/context/OxyContext.js.map +1 -0
  196. package/lib/module/ui/index.js +24 -0
  197. package/lib/module/ui/index.js.map +1 -0
  198. package/lib/module/ui/navigation/OxyRouter.js +257 -0
  199. package/lib/module/ui/navigation/OxyRouter.js.map +1 -0
  200. package/lib/module/ui/navigation/types.js +4 -0
  201. package/lib/module/ui/navigation/types.js.map +1 -0
  202. package/lib/module/ui/screens/AccountCenterScreen.js +308 -0
  203. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
  204. package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
  205. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
  206. package/lib/module/ui/screens/AccountOverviewScreen.js +849 -0
  207. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
  208. package/lib/module/ui/screens/AccountSettingsScreen.js +837 -0
  209. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
  210. package/lib/module/ui/screens/AccountSwitcherScreen.js +782 -0
  211. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
  212. package/lib/module/ui/screens/AppInfoScreen.js +658 -0
  213. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -0
  214. package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
  215. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
  216. package/lib/module/ui/screens/FileManagementScreen.js +2510 -0
  217. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
  218. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
  219. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
  220. package/lib/module/ui/screens/ProfileScreen.js +444 -0
  221. package/lib/module/ui/screens/ProfileScreen.js.map +1 -0
  222. package/lib/module/ui/screens/SessionManagementScreen.js +444 -0
  223. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -0
  224. package/lib/module/ui/screens/SignInScreen.js +998 -0
  225. package/lib/module/ui/screens/SignInScreen.js.map +1 -0
  226. package/lib/module/ui/screens/SignUpScreen.js +932 -0
  227. package/lib/module/ui/screens/SignUpScreen.js.map +1 -0
  228. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +83 -0
  229. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
  230. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +358 -0
  231. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
  232. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +222 -0
  233. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
  234. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +142 -0
  235. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
  236. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +122 -0
  237. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
  238. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +100 -0
  239. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
  240. package/lib/module/ui/styles/FONTS.md +126 -0
  241. package/lib/module/ui/styles/fonts.js +81 -0
  242. package/lib/module/ui/styles/fonts.js.map +1 -0
  243. package/lib/module/ui/styles/index.js +5 -0
  244. package/lib/module/ui/styles/index.js.map +1 -0
  245. package/lib/module/ui/styles/theme.js +114 -0
  246. package/lib/module/ui/styles/theme.js.map +1 -0
  247. package/lib/module/utils/deviceManager.js +167 -0
  248. package/lib/module/utils/deviceManager.js.map +1 -0
  249. package/lib/module/utils/index.js +4 -0
  250. package/lib/module/utils/index.js.map +1 -0
  251. package/lib/module/utils/polyfills.js +36 -0
  252. package/lib/module/utils/polyfills.js.map +1 -0
  253. package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
  254. package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
  255. package/lib/typescript/constants/version.d.ts +14 -0
  256. package/lib/typescript/constants/version.d.ts.map +1 -0
  257. package/lib/typescript/core/index.d.ts +603 -0
  258. package/lib/typescript/core/index.d.ts.map +1 -0
  259. package/lib/typescript/index.d.ts +20 -0
  260. package/lib/typescript/index.d.ts.map +1 -0
  261. package/lib/typescript/lib/sonner.d.ts +6 -0
  262. package/lib/typescript/lib/sonner.d.ts.map +1 -0
  263. package/lib/typescript/models/interfaces.d.ts +179 -0
  264. package/lib/typescript/models/interfaces.d.ts.map +1 -0
  265. package/lib/typescript/models/secureSession.d.ts +27 -0
  266. package/lib/typescript/models/secureSession.d.ts.map +1 -0
  267. package/lib/typescript/node/index.d.ts +11 -0
  268. package/lib/typescript/node/index.d.ts.map +1 -0
  269. package/lib/typescript/ui/components/Avatar.d.ts +62 -0
  270. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -0
  271. package/lib/typescript/ui/components/FollowButton.d.ts +92 -0
  272. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -0
  273. package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
  274. package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
  275. package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
  276. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
  277. package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
  278. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
  279. package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
  280. package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
  281. package/lib/typescript/ui/components/OxyProvider.d.ts +12 -0
  282. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
  283. package/lib/typescript/ui/components/OxySignInButton.d.ts +70 -0
  284. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
  285. package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
  286. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
  287. package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
  288. package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
  289. package/lib/typescript/ui/components/Section.d.ts +11 -0
  290. package/lib/typescript/ui/components/Section.d.ts.map +1 -0
  291. package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
  292. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
  293. package/lib/typescript/ui/components/bottomSheet/index.d.ts +4 -0
  294. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -0
  295. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +10 -0
  296. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -0
  297. package/lib/typescript/ui/components/icon/index.d.ts +3 -0
  298. package/lib/typescript/ui/components/icon/index.d.ts.map +1 -0
  299. package/lib/typescript/ui/components/index.d.ts +13 -0
  300. package/lib/typescript/ui/components/index.d.ts.map +1 -0
  301. package/lib/typescript/ui/context/OxyContext.d.ts +42 -0
  302. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
  303. package/lib/typescript/ui/index.d.ts +15 -0
  304. package/lib/typescript/ui/index.d.ts.map +1 -0
  305. package/lib/typescript/ui/navigation/OxyRouter.d.ts +5 -0
  306. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -0
  307. package/lib/typescript/ui/navigation/types.d.ts +116 -0
  308. package/lib/typescript/ui/navigation/types.d.ts.map +1 -0
  309. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
  310. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
  311. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
  312. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
  313. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
  314. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
  315. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +5 -0
  316. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
  317. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +5 -0
  318. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
  319. package/lib/typescript/ui/screens/AppInfoScreen.d.ts +5 -0
  320. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -0
  321. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
  322. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
  323. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
  324. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
  325. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
  326. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
  327. package/lib/typescript/ui/screens/ProfileScreen.d.ts +9 -0
  328. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -0
  329. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +5 -0
  330. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -0
  331. package/lib/typescript/ui/screens/SignInScreen.d.ts +5 -0
  332. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -0
  333. package/lib/typescript/ui/screens/SignUpScreen.d.ts +5 -0
  334. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -0
  335. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +5 -0
  336. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -0
  337. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +5 -0
  338. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -0
  339. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +5 -0
  340. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -0
  341. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +5 -0
  342. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -0
  343. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +5 -0
  344. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -0
  345. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +5 -0
  346. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -0
  347. package/lib/typescript/ui/styles/fonts.d.ts +21 -0
  348. package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
  349. package/lib/typescript/ui/styles/index.d.ts +3 -0
  350. package/lib/typescript/ui/styles/index.d.ts.map +1 -0
  351. package/lib/typescript/ui/styles/theme.d.ts +68 -0
  352. package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
  353. package/lib/typescript/utils/deviceManager.d.ts +66 -0
  354. package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
  355. package/lib/typescript/utils/index.d.ts +3 -0
  356. package/lib/typescript/utils/index.d.ts.map +1 -0
  357. package/lib/typescript/utils/polyfills.d.ts +6 -0
  358. package/lib/typescript/utils/polyfills.d.ts.map +1 -0
  359. package/package.json +20 -4
@@ -0,0 +1,782 @@
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.js";
6
+ import { toast } from "../../lib/sonner.js";
7
+ import OxyIcon from "../components/icon/OxyIcon.js";
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