@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,788 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _OxyContext = require("../context/OxyContext.js");
10
+ var _sonner = require("../../lib/sonner.js");
11
+ var _OxyIcon = _interopRequireDefault(require("../components/icon/OxyIcon.js"));
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