@oxyhq/services 6.10.7 → 7.0.0

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 (454) hide show
  1. package/lib/commonjs/index.js +211 -49
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/client.js +25 -4
  4. package/lib/commonjs/ui/client.js.map +1 -1
  5. package/lib/commonjs/ui/components/AccountMenu.js +485 -0
  6. package/lib/commonjs/ui/components/AccountMenu.js.map +1 -0
  7. package/lib/commonjs/ui/components/AccountMenuButton.js +120 -0
  8. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -0
  9. package/lib/commonjs/ui/components/ActingAsBanner.js +2 -2
  10. package/lib/commonjs/ui/components/ActingAsBanner.js.map +1 -1
  11. package/lib/commonjs/ui/components/ProfileCard.js +2 -2
  12. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  13. package/lib/commonjs/ui/components/StepBasedScreen.js +2 -2
  14. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  15. package/lib/commonjs/ui/components/accountMenuRows.js +45 -0
  16. package/lib/commonjs/ui/components/accountMenuRows.js.map +1 -0
  17. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +5 -5
  18. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  19. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +3 -2
  20. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  21. package/lib/commonjs/ui/components/theming.js +2 -2
  22. package/lib/commonjs/ui/components/theming.js.map +1 -1
  23. package/lib/commonjs/ui/context/OxyContext.js +211 -21
  24. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  25. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +36 -2
  26. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +6 -0
  28. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +138 -1
  30. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/queries/queryKeys.js +67 -2
  32. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +27 -2
  34. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  35. package/lib/commonjs/ui/hooks/useAuth.js +13 -2
  36. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/useSessionManagement.js +30 -0
  38. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  39. package/lib/commonjs/ui/index.js +132 -85
  40. package/lib/commonjs/ui/index.js.map +1 -1
  41. package/lib/commonjs/ui/navigation/routes.js +6 -7
  42. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -2
  44. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +202 -0
  46. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -0
  47. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +3 -2
  48. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +3 -2
  50. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/FAQScreen.js +7 -4
  52. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/FeedbackScreen.js +21 -16
  54. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/HelpSupportScreen.js +3 -2
  56. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -4
  58. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -2
  60. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +6 -4
  62. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/ManageAccountScreen.js +780 -0
  64. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -0
  65. package/lib/commonjs/ui/screens/NotificationsScreen.js +175 -0
  66. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -0
  67. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +18 -12
  68. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/PreferencesScreen.js +220 -0
  70. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -0
  71. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +14 -10
  72. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/ProfileScreen.js +3 -3
  74. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +8 -5
  76. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -4
  78. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -2
  80. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/UserListScreen.js +2 -2
  82. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +3 -2
  84. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -2
  86. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  88. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +4 -3
  90. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +3 -2
  92. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  93. package/lib/commonjs/ui/utils/activeAuthuser.js +85 -0
  94. package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -0
  95. package/lib/module/index.js +58 -16
  96. package/lib/module/index.js.map +1 -1
  97. package/lib/module/ui/client.js +5 -3
  98. package/lib/module/ui/client.js.map +1 -1
  99. package/lib/module/ui/components/AccountMenu.js +480 -0
  100. package/lib/module/ui/components/AccountMenu.js.map +1 -0
  101. package/lib/module/ui/components/AccountMenuButton.js +115 -0
  102. package/lib/module/ui/components/AccountMenuButton.js.map +1 -0
  103. package/lib/module/ui/components/ActingAsBanner.js +2 -2
  104. package/lib/module/ui/components/ActingAsBanner.js.map +1 -1
  105. package/lib/module/ui/components/ProfileCard.js +1 -1
  106. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  107. package/lib/module/ui/components/StepBasedScreen.js +1 -1
  108. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  109. package/lib/module/ui/components/accountMenuRows.js +41 -0
  110. package/lib/module/ui/components/accountMenuRows.js.map +1 -0
  111. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  112. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  113. package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
  114. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  115. package/lib/module/ui/components/theming.js +1 -1
  116. package/lib/module/ui/components/theming.js.map +1 -1
  117. package/lib/module/ui/context/OxyContext.js +211 -21
  118. package/lib/module/ui/context/OxyContext.js.map +1 -1
  119. package/lib/module/ui/context/hooks/useAuthOperations.js +36 -2
  120. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  121. package/lib/module/ui/hooks/mutations/mutationKeys.js +6 -0
  122. package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -1
  123. package/lib/module/ui/hooks/mutations/useAccountMutations.js +135 -1
  124. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  125. package/lib/module/ui/hooks/queries/queryKeys.js +60 -1
  126. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  127. package/lib/module/ui/hooks/queries/useAccountQueries.js +24 -0
  128. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  129. package/lib/module/ui/hooks/useAuth.js +13 -2
  130. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  131. package/lib/module/ui/hooks/useSessionManagement.js +30 -0
  132. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  133. package/lib/module/ui/index.js +34 -78
  134. package/lib/module/ui/index.js.map +1 -1
  135. package/lib/module/ui/navigation/routes.js +6 -7
  136. package/lib/module/ui/navigation/routes.js.map +1 -1
  137. package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
  138. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  139. package/lib/module/ui/screens/ConnectedAppsScreen.js +198 -0
  140. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -0
  141. package/lib/module/ui/screens/CreateManagedAccountScreen.js +1 -1
  142. package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  143. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  144. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  145. package/lib/module/ui/screens/FAQScreen.js +3 -1
  146. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  147. package/lib/module/ui/screens/FeedbackScreen.js +6 -2
  148. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  149. package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
  150. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  151. package/lib/module/ui/screens/HistoryViewScreen.js +3 -1
  152. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  153. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  154. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  155. package/lib/module/ui/screens/LegalDocumentsScreen.js +2 -1
  156. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  157. package/lib/module/ui/screens/ManageAccountScreen.js +775 -0
  158. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -0
  159. package/lib/module/ui/screens/NotificationsScreen.js +169 -0
  160. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -0
  161. package/lib/module/ui/screens/PaymentGatewayScreen.js +9 -3
  162. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  163. package/lib/module/ui/screens/PreferencesScreen.js +214 -0
  164. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -0
  165. package/lib/module/ui/screens/PrivacySettingsScreen.js +4 -1
  166. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  167. package/lib/module/ui/screens/ProfileScreen.js +2 -2
  168. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  169. package/lib/module/ui/screens/SavesCollectionsScreen.js +3 -1
  170. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  171. package/lib/module/ui/screens/SearchSettingsScreen.js +2 -1
  172. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  173. package/lib/module/ui/screens/UserLinksScreen.js +1 -1
  174. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  175. package/lib/module/ui/screens/UserListScreen.js +1 -1
  176. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  177. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +1 -1
  178. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  179. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -1
  180. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  181. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  182. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  183. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +1 -1
  184. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  185. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  186. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  187. package/lib/module/ui/utils/activeAuthuser.js +79 -0
  188. package/lib/module/ui/utils/activeAuthuser.js.map +1 -0
  189. package/lib/typescript/commonjs/index.d.ts +23 -6
  190. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/ui/client.d.ts +7 -2
  192. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +23 -0
  194. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +19 -0
  196. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts +27 -0
  198. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +5 -0
  202. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +26 -1
  204. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +32 -3
  206. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +10 -1
  208. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
  210. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +8 -2
  212. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/ui/index.d.ts +32 -18
  215. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  217. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  218. package/lib/typescript/{module/ui/screens/AccountOverviewScreen.d.ts → commonjs/ui/screens/ConnectedAppsScreen.d.ts} +1 -1
  219. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +13 -0
  225. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/ui/screens/{AccountOverviewScreen.d.ts → NotificationsScreen.d.ts} +1 -1
  227. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  229. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/ui/screens/{AccountSettingsScreen.d.ts → PreferencesScreen.d.ts} +2 -5
  231. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +42 -0
  236. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -0
  237. package/lib/typescript/module/index.d.ts +23 -6
  238. package/lib/typescript/module/index.d.ts.map +1 -1
  239. package/lib/typescript/module/ui/client.d.ts +7 -2
  240. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  241. package/lib/typescript/module/ui/components/AccountMenu.d.ts +23 -0
  242. package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -0
  243. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +19 -0
  244. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -0
  245. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +27 -0
  246. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -0
  247. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  248. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  249. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +5 -0
  250. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  251. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +26 -1
  252. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  253. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +32 -3
  254. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  255. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +10 -1
  256. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  257. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
  258. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  259. package/lib/typescript/module/ui/hooks/useAuth.d.ts +8 -2
  260. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  261. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  262. package/lib/typescript/module/ui/index.d.ts +32 -18
  263. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  264. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  265. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  266. package/lib/typescript/module/ui/screens/{AccountSettingsScreen.d.ts → ConnectedAppsScreen.d.ts} +2 -5
  267. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -0
  268. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  269. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  271. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +13 -0
  273. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -0
  274. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +5 -0
  275. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -0
  276. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  277. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  278. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +5 -0
  279. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -0
  280. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  283. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +42 -0
  284. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -0
  285. package/package.json +20 -9
  286. package/src/index.ts +141 -47
  287. package/src/ui/client.ts +7 -2
  288. package/src/ui/components/AccountMenu.tsx +534 -0
  289. package/src/ui/components/AccountMenuButton.tsx +113 -0
  290. package/src/ui/components/ActingAsBanner.tsx +2 -2
  291. package/src/ui/components/ProfileCard.tsx +1 -1
  292. package/src/ui/components/StepBasedScreen.tsx +1 -1
  293. package/src/ui/components/accountMenuRows.ts +60 -0
  294. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  295. package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
  296. package/src/ui/components/theming.tsx +1 -1
  297. package/src/ui/context/OxyContext.tsx +204 -18
  298. package/src/ui/context/hooks/useAuthOperations.ts +36 -2
  299. package/src/ui/hooks/mutations/mutationKeys.ts +11 -0
  300. package/src/ui/hooks/mutations/useAccountMutations.ts +154 -2
  301. package/src/ui/hooks/queries/queryKeys.ts +54 -4
  302. package/src/ui/hooks/queries/useAccountQueries.ts +25 -1
  303. package/src/ui/hooks/useAuth.ts +23 -4
  304. package/src/ui/hooks/useSessionManagement.ts +29 -0
  305. package/src/ui/index.ts +37 -98
  306. package/src/ui/navigation/routes.ts +9 -11
  307. package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
  308. package/src/ui/screens/ConnectedAppsScreen.tsx +225 -0
  309. package/src/ui/screens/CreateManagedAccountScreen.tsx +1 -1
  310. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  311. package/src/ui/screens/FAQScreen.tsx +3 -1
  312. package/src/ui/screens/FeedbackScreen.tsx +6 -10
  313. package/src/ui/screens/HelpSupportScreen.tsx +1 -1
  314. package/src/ui/screens/HistoryViewScreen.tsx +3 -1
  315. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  316. package/src/ui/screens/LegalDocumentsScreen.tsx +2 -1
  317. package/src/ui/screens/ManageAccountScreen.tsx +1102 -0
  318. package/src/ui/screens/NotificationsScreen.tsx +189 -0
  319. package/src/ui/screens/PaymentGatewayScreen.tsx +10 -12
  320. package/src/ui/screens/PreferencesScreen.tsx +263 -0
  321. package/src/ui/screens/PrivacySettingsScreen.tsx +4 -1
  322. package/src/ui/screens/ProfileScreen.tsx +2 -2
  323. package/src/ui/screens/SavesCollectionsScreen.tsx +3 -1
  324. package/src/ui/screens/SearchSettingsScreen.tsx +2 -1
  325. package/src/ui/screens/UserLinksScreen.tsx +1 -1
  326. package/src/ui/screens/UserListScreen.tsx +1 -1
  327. package/src/ui/screens/karma/KarmaAboutScreen.tsx +1 -1
  328. package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
  329. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
  330. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +1 -1
  331. package/src/ui/screens/karma/KarmaRulesScreen.tsx +1 -1
  332. package/src/ui/utils/activeAuthuser.ts +78 -0
  333. package/lib/commonjs/ui/components/feedback/index.js +0 -54
  334. package/lib/commonjs/ui/components/feedback/index.js.map +0 -1
  335. package/lib/commonjs/ui/components/icon/index.js +0 -21
  336. package/lib/commonjs/ui/components/icon/index.js.map +0 -1
  337. package/lib/commonjs/ui/components/index.js +0 -104
  338. package/lib/commonjs/ui/components/index.js.map +0 -1
  339. package/lib/commonjs/ui/components/modals/index.js +0 -14
  340. package/lib/commonjs/ui/components/modals/index.js.map +0 -1
  341. package/lib/commonjs/ui/components/payment/index.js +0 -80
  342. package/lib/commonjs/ui/components/payment/index.js.map +0 -1
  343. package/lib/commonjs/ui/hooks/index.js +0 -92
  344. package/lib/commonjs/ui/hooks/index.js.map +0 -1
  345. package/lib/commonjs/ui/hooks/mutations/index.js +0 -68
  346. package/lib/commonjs/ui/hooks/mutations/index.js.map +0 -1
  347. package/lib/commonjs/ui/hooks/queries/index.js +0 -155
  348. package/lib/commonjs/ui/hooks/queries/index.js.map +0 -1
  349. package/lib/commonjs/ui/screens/AccountCenterScreen.js +0 -344
  350. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +0 -1
  351. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +0 -724
  352. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
  353. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -643
  354. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +0 -1
  355. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -1029
  356. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
  357. package/lib/commonjs/ui/screens/SessionManagementScreen.js +0 -512
  358. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
  359. package/lib/commonjs/ui/styles/index.js +0 -39
  360. package/lib/commonjs/ui/styles/index.js.map +0 -1
  361. package/lib/module/ui/components/feedback/index.js +0 -8
  362. package/lib/module/ui/components/feedback/index.js.map +0 -1
  363. package/lib/module/ui/components/icon/index.js +0 -5
  364. package/lib/module/ui/components/icon/index.js.map +0 -1
  365. package/lib/module/ui/components/index.js +0 -18
  366. package/lib/module/ui/components/index.js.map +0 -1
  367. package/lib/module/ui/components/modals/index.js +0 -4
  368. package/lib/module/ui/components/modals/index.js.map +0 -1
  369. package/lib/module/ui/components/payment/index.js +0 -10
  370. package/lib/module/ui/components/payment/index.js.map +0 -1
  371. package/lib/module/ui/hooks/index.js +0 -11
  372. package/lib/module/ui/hooks/index.js.map +0 -1
  373. package/lib/module/ui/hooks/mutations/index.js +0 -15
  374. package/lib/module/ui/hooks/mutations/index.js.map +0 -1
  375. package/lib/module/ui/hooks/queries/index.js +0 -26
  376. package/lib/module/ui/hooks/queries/index.js.map +0 -1
  377. package/lib/module/ui/screens/AccountCenterScreen.js +0 -339
  378. package/lib/module/ui/screens/AccountCenterScreen.js.map +0 -1
  379. package/lib/module/ui/screens/AccountOverviewScreen.js +0 -719
  380. package/lib/module/ui/screens/AccountOverviewScreen.js.map +0 -1
  381. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -638
  382. package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
  383. package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -1024
  384. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
  385. package/lib/module/ui/screens/SessionManagementScreen.js +0 -508
  386. package/lib/module/ui/screens/SessionManagementScreen.js.map +0 -1
  387. package/lib/module/ui/styles/index.js +0 -6
  388. package/lib/module/ui/styles/index.js.map +0 -1
  389. package/lib/typescript/commonjs/ui/components/feedback/index.d.ts +0 -7
  390. package/lib/typescript/commonjs/ui/components/feedback/index.d.ts.map +0 -1
  391. package/lib/typescript/commonjs/ui/components/icon/index.d.ts +0 -4
  392. package/lib/typescript/commonjs/ui/components/icon/index.d.ts.map +0 -1
  393. package/lib/typescript/commonjs/ui/components/index.d.ts +0 -13
  394. package/lib/typescript/commonjs/ui/components/index.d.ts.map +0 -1
  395. package/lib/typescript/commonjs/ui/components/modals/index.d.ts +0 -2
  396. package/lib/typescript/commonjs/ui/components/modals/index.d.ts.map +0 -1
  397. package/lib/typescript/commonjs/ui/components/payment/index.d.ts +0 -9
  398. package/lib/typescript/commonjs/ui/components/payment/index.d.ts.map +0 -1
  399. package/lib/typescript/commonjs/ui/hooks/index.d.ts +0 -9
  400. package/lib/typescript/commonjs/ui/hooks/index.d.ts.map +0 -1
  401. package/lib/typescript/commonjs/ui/hooks/mutations/index.d.ts +0 -9
  402. package/lib/typescript/commonjs/ui/hooks/mutations/index.d.ts.map +0 -1
  403. package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts +0 -13
  404. package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts.map +0 -1
  405. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts +0 -5
  406. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  407. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  408. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  409. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  410. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  411. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts +0 -5
  412. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  413. package/lib/typescript/commonjs/ui/styles/index.d.ts +0 -4
  414. package/lib/typescript/commonjs/ui/styles/index.d.ts.map +0 -1
  415. package/lib/typescript/module/ui/components/feedback/index.d.ts +0 -7
  416. package/lib/typescript/module/ui/components/feedback/index.d.ts.map +0 -1
  417. package/lib/typescript/module/ui/components/icon/index.d.ts +0 -4
  418. package/lib/typescript/module/ui/components/icon/index.d.ts.map +0 -1
  419. package/lib/typescript/module/ui/components/index.d.ts +0 -13
  420. package/lib/typescript/module/ui/components/index.d.ts.map +0 -1
  421. package/lib/typescript/module/ui/components/modals/index.d.ts +0 -2
  422. package/lib/typescript/module/ui/components/modals/index.d.ts.map +0 -1
  423. package/lib/typescript/module/ui/components/payment/index.d.ts +0 -9
  424. package/lib/typescript/module/ui/components/payment/index.d.ts.map +0 -1
  425. package/lib/typescript/module/ui/hooks/index.d.ts +0 -9
  426. package/lib/typescript/module/ui/hooks/index.d.ts.map +0 -1
  427. package/lib/typescript/module/ui/hooks/mutations/index.d.ts +0 -9
  428. package/lib/typescript/module/ui/hooks/mutations/index.d.ts.map +0 -1
  429. package/lib/typescript/module/ui/hooks/queries/index.d.ts +0 -13
  430. package/lib/typescript/module/ui/hooks/queries/index.d.ts.map +0 -1
  431. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts +0 -5
  432. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  433. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  434. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  435. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  436. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  437. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts +0 -5
  438. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  439. package/lib/typescript/module/ui/styles/index.d.ts +0 -4
  440. package/lib/typescript/module/ui/styles/index.d.ts.map +0 -1
  441. package/src/ui/components/feedback/index.ts +0 -6
  442. package/src/ui/components/icon/index.ts +0 -3
  443. package/src/ui/components/index.ts +0 -15
  444. package/src/ui/components/modals/index.ts +0 -1
  445. package/src/ui/components/payment/index.ts +0 -9
  446. package/src/ui/hooks/index.ts +0 -13
  447. package/src/ui/hooks/mutations/index.ts +0 -25
  448. package/src/ui/hooks/queries/index.ts +0 -61
  449. package/src/ui/screens/AccountCenterScreen.tsx +0 -182
  450. package/src/ui/screens/AccountOverviewScreen.tsx +0 -696
  451. package/src/ui/screens/AccountSettingsScreen.tsx +0 -620
  452. package/src/ui/screens/AccountSwitcherScreen.tsx +0 -1003
  453. package/src/ui/screens/SessionManagementScreen.tsx +0 -477
  454. package/src/ui/styles/index.ts +0 -3
@@ -0,0 +1,480 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
+ import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Modal, Pressable, Platform, ActivityIndicator } from 'react-native';
5
+ import { Ionicons } from '@expo/vector-icons';
6
+ import { toast, useDialogControl, Dialog } from '@oxyhq/bloom';
7
+ import { useTheme } from '@oxyhq/bloom/theme';
8
+ import Avatar from "./Avatar.js";
9
+ import { useOxy } from "../context/OxyContext.js";
10
+ import { useI18n } from "../hooks/useI18n.js";
11
+ import { logger as loggerUtil } from '@oxyhq/core';
12
+ import { buildAccountRows } from "./accountMenuRows.js";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ const isWeb = Platform.OS === 'web';
15
+
16
+ /**
17
+ * Reusable account menu modeled after the Google account chooser. Opens from
18
+ * the avatar entry point (`AccountMenuButton`) or any other trigger.
19
+ *
20
+ * Reads everything it needs from `useOxy()` — never receive a session via
21
+ * props. Renders as a popover anchored to the trigger on web, and as a
22
+ * full-width bottom-sheet style modal on native.
23
+ */
24
+ const AccountMenu = ({
25
+ open,
26
+ onClose,
27
+ onNavigateManage,
28
+ onAddAccount,
29
+ anchor
30
+ }) => {
31
+ const {
32
+ user,
33
+ sessions,
34
+ activeSessionId,
35
+ switchSession,
36
+ logout,
37
+ logoutAll,
38
+ oxyServices
39
+ } = useOxy();
40
+ const {
41
+ t,
42
+ locale
43
+ } = useI18n();
44
+ const bloomTheme = useTheme();
45
+ const [busySessionId, setBusySessionId] = useState(null);
46
+ const [signingOut, setSigningOut] = useState(false);
47
+ const [signingOutAll, setSigningOutAll] = useState(false);
48
+ const signOutDialog = useDialogControl();
49
+ const signOutAllDialog = useDialogControl();
50
+ const containerRef = useRef(null);
51
+ const firstActionRef = useRef(null);
52
+ const rows = useMemo(() => buildAccountRows({
53
+ sessions,
54
+ activeSessionId,
55
+ user,
56
+ locale,
57
+ getAvatarUrl: avatarId => oxyServices.getFileDownloadUrl(avatarId, 'thumb')
58
+ }), [sessions, activeSessionId, user, locale, oxyServices]);
59
+ const activeRow = useMemo(() => {
60
+ return rows.find(r => r.isActive) ?? null;
61
+ }, [rows]);
62
+ const inactiveRows = useMemo(() => {
63
+ return rows.filter(r => !r.isActive);
64
+ }, [rows]);
65
+ const handleSwitch = useCallback(async sessionId => {
66
+ if (sessionId === activeSessionId || busySessionId) {
67
+ return;
68
+ }
69
+ setBusySessionId(sessionId);
70
+ try {
71
+ await switchSession(sessionId);
72
+ toast.success(t('accountSwitcher.toasts.switchSuccess') || 'Switched account');
73
+ onClose();
74
+ } catch (error) {
75
+ if (!__DEV__) {
76
+ loggerUtil.warn('Switch account failed', {
77
+ component: 'AccountMenu'
78
+ }, error);
79
+ }
80
+ toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
81
+ } finally {
82
+ setBusySessionId(null);
83
+ }
84
+ }, [activeSessionId, busySessionId, switchSession, t, onClose]);
85
+ const performSignOut = useCallback(async () => {
86
+ if (signingOut) {
87
+ return;
88
+ }
89
+ setSigningOut(true);
90
+ try {
91
+ await logout();
92
+ toast.success(t('common.actions.signedOut') || 'Signed out');
93
+ onClose();
94
+ } catch (error) {
95
+ loggerUtil.warn('Sign out failed', {
96
+ component: 'AccountMenu'
97
+ }, error);
98
+ toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
99
+ } finally {
100
+ setSigningOut(false);
101
+ }
102
+ }, [signingOut, logout, t, onClose]);
103
+ const performSignOutAll = useCallback(async () => {
104
+ if (signingOutAll) {
105
+ return;
106
+ }
107
+ setSigningOutAll(true);
108
+ try {
109
+ await logoutAll();
110
+ toast.success(t('accountSwitcher.toasts.signOutAllSuccess') || 'Signed out of all accounts');
111
+ onClose();
112
+ } catch (error) {
113
+ loggerUtil.warn('Sign out all failed', {
114
+ component: 'AccountMenu'
115
+ }, error);
116
+ toast.error(t('common.errors.signOutAllFailed') || 'Failed to sign out of all accounts');
117
+ } finally {
118
+ setSigningOutAll(false);
119
+ }
120
+ }, [signingOutAll, logoutAll, t, onClose]);
121
+
122
+ // Escape-to-close + focus management (web only).
123
+ useEffect(() => {
124
+ if (!open || !isWeb || typeof document === 'undefined') {
125
+ return undefined;
126
+ }
127
+ const onKey = event => {
128
+ if (event.key === 'Escape') {
129
+ event.stopPropagation();
130
+ onClose();
131
+ }
132
+ };
133
+ document.addEventListener('keydown', onKey, true);
134
+ return () => document.removeEventListener('keydown', onKey, true);
135
+ }, [open, onClose]);
136
+ if (!open) {
137
+ return null;
138
+ }
139
+ const overlayStyles = isWeb ? styles.webOverlay : styles.nativeOverlay;
140
+ const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchor ? {
141
+ top: anchor.top,
142
+ right: anchor.right
143
+ } : {
144
+ top: 64,
145
+ right: 16
146
+ }, {
147
+ backgroundColor: bloomTheme.colors.background,
148
+ borderColor: bloomTheme.colors.border
149
+ }] : [styles.panelBase, styles.panelNative, {
150
+ backgroundColor: bloomTheme.colors.background
151
+ }];
152
+ const content = /*#__PURE__*/_jsxs(View, {
153
+ ref: containerRef,
154
+ style: panelStyles,
155
+ accessibilityRole: "menu",
156
+ accessibilityLabel: t('accountMenu.label') || 'Account menu',
157
+ children: [activeRow ? /*#__PURE__*/_jsxs(View, {
158
+ style: styles.header,
159
+ children: [/*#__PURE__*/_jsx(Avatar, {
160
+ uri: activeRow.avatarUri,
161
+ name: activeRow.displayName,
162
+ size: 64
163
+ }), /*#__PURE__*/_jsx(Text, {
164
+ style: [styles.headerName, {
165
+ color: bloomTheme.colors.text
166
+ }],
167
+ numberOfLines: 1,
168
+ children: activeRow.displayName
169
+ }), activeRow.secondary ? /*#__PURE__*/_jsx(Text, {
170
+ style: [styles.headerSecondary, {
171
+ color: bloomTheme.colors.textSecondary
172
+ }],
173
+ numberOfLines: 1,
174
+ children: activeRow.secondary
175
+ }) : null]
176
+ }) : /*#__PURE__*/_jsx(View, {
177
+ style: styles.header,
178
+ children: /*#__PURE__*/_jsx(Text, {
179
+ style: [styles.headerName, {
180
+ color: bloomTheme.colors.text
181
+ }],
182
+ children: t('common.status.notSignedIn') || 'Not signed in'
183
+ })
184
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
185
+ ref: firstActionRef,
186
+ accessibilityRole: "menuitem",
187
+ accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
188
+ style: [styles.primaryButton, {
189
+ borderColor: bloomTheme.colors.border
190
+ }],
191
+ onPress: () => {
192
+ onClose();
193
+ onNavigateManage();
194
+ },
195
+ children: /*#__PURE__*/_jsx(Text, {
196
+ style: [styles.primaryButtonText, {
197
+ color: bloomTheme.colors.primary
198
+ }],
199
+ children: t('accountMenu.manage') || 'Manage your Oxy Account'
200
+ })
201
+ }), rows.length > 0 ? /*#__PURE__*/_jsx(ScrollView, {
202
+ style: styles.list,
203
+ contentContainerStyle: styles.listContent,
204
+ showsVerticalScrollIndicator: false,
205
+ children: rows.map(row => {
206
+ const isBusy = busySessionId === row.sessionId;
207
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
208
+ accessibilityRole: "menuitem",
209
+ accessibilityLabel: row.displayName,
210
+ accessibilityState: {
211
+ selected: row.isActive
212
+ },
213
+ onPress: () => handleSwitch(row.sessionId),
214
+ disabled: row.isActive || isBusy,
215
+ style: [styles.row, row.isActive && {
216
+ backgroundColor: bloomTheme.colors.primarySubtle
217
+ }],
218
+ children: [/*#__PURE__*/_jsx(Avatar, {
219
+ uri: row.avatarUri,
220
+ name: row.displayName,
221
+ size: 36
222
+ }), /*#__PURE__*/_jsxs(View, {
223
+ style: styles.rowInfo,
224
+ children: [/*#__PURE__*/_jsx(Text, {
225
+ style: [styles.rowName, {
226
+ color: bloomTheme.colors.text
227
+ }],
228
+ numberOfLines: 1,
229
+ children: row.displayName
230
+ }), row.secondary ? /*#__PURE__*/_jsx(Text, {
231
+ style: [styles.rowSecondary, {
232
+ color: bloomTheme.colors.textSecondary
233
+ }],
234
+ numberOfLines: 1,
235
+ children: row.secondary
236
+ }) : null]
237
+ }), isBusy ? /*#__PURE__*/_jsx(ActivityIndicator, {
238
+ color: bloomTheme.colors.primary,
239
+ size: "small"
240
+ }) : row.isActive ? /*#__PURE__*/_jsx(Ionicons, {
241
+ name: "checkmark-circle",
242
+ size: 20,
243
+ color: bloomTheme.colors.primary
244
+ }) : null]
245
+ }, `account-${row.sessionId}`);
246
+ })
247
+ }) : null, /*#__PURE__*/_jsxs(TouchableOpacity, {
248
+ accessibilityRole: "menuitem",
249
+ accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
250
+ onPress: () => {
251
+ onClose();
252
+ onAddAccount();
253
+ },
254
+ style: [styles.row, styles.actionRow],
255
+ children: [/*#__PURE__*/_jsx(View, {
256
+ style: [styles.actionIcon, {
257
+ backgroundColor: bloomTheme.colors.primarySubtle
258
+ }],
259
+ children: /*#__PURE__*/_jsx(Ionicons, {
260
+ name: "person-add-outline",
261
+ size: 18,
262
+ color: bloomTheme.colors.primary
263
+ })
264
+ }), /*#__PURE__*/_jsx(View, {
265
+ style: styles.rowInfo,
266
+ children: /*#__PURE__*/_jsx(Text, {
267
+ style: [styles.rowName, {
268
+ color: bloomTheme.colors.text
269
+ }],
270
+ children: t('accountMenu.addAnother') || 'Add another account'
271
+ })
272
+ })]
273
+ }), /*#__PURE__*/_jsxs(View, {
274
+ style: [styles.footer, {
275
+ borderTopColor: bloomTheme.colors.border
276
+ }],
277
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
278
+ accessibilityRole: "menuitem",
279
+ accessibilityLabel: t('common.actions.signOut') || 'Sign out',
280
+ onPress: () => signOutDialog.open(),
281
+ disabled: signingOut || signingOutAll,
282
+ style: styles.footerButton,
283
+ children: signingOut ? /*#__PURE__*/_jsx(ActivityIndicator, {
284
+ color: bloomTheme.colors.error,
285
+ size: "small"
286
+ }) : /*#__PURE__*/_jsx(Text, {
287
+ style: [styles.footerButtonText, {
288
+ color: bloomTheme.colors.error
289
+ }],
290
+ children: t('common.actions.signOut') || 'Sign out'
291
+ })
292
+ }), rows.length > 1 ? /*#__PURE__*/_jsx(TouchableOpacity, {
293
+ accessibilityRole: "menuitem",
294
+ accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
295
+ onPress: () => signOutAllDialog.open(),
296
+ disabled: signingOut || signingOutAll,
297
+ style: styles.footerButton,
298
+ children: signingOutAll ? /*#__PURE__*/_jsx(ActivityIndicator, {
299
+ color: bloomTheme.colors.error,
300
+ size: "small"
301
+ }) : /*#__PURE__*/_jsx(Text, {
302
+ style: [styles.footerButtonText, {
303
+ color: bloomTheme.colors.error
304
+ }],
305
+ children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
306
+ })
307
+ }) : null]
308
+ })]
309
+ });
310
+ return /*#__PURE__*/_jsxs(Modal, {
311
+ visible: open,
312
+ transparent: true,
313
+ animationType: isWeb ? 'fade' : 'slide',
314
+ onRequestClose: onClose,
315
+ children: [/*#__PURE__*/_jsx(Pressable, {
316
+ accessibilityRole: "button",
317
+ accessibilityLabel: t('common.actions.close') || 'Close',
318
+ onPress: onClose,
319
+ style: overlayStyles,
320
+ children: /*#__PURE__*/_jsx(Pressable, {
321
+ onPress: () => undefined,
322
+ style: styles.panelTouchable,
323
+ children: content
324
+ })
325
+ }), /*#__PURE__*/_jsx(Dialog, {
326
+ control: signOutDialog,
327
+ title: t('common.actions.signOut') || 'Sign out',
328
+ description: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
329
+ actions: [{
330
+ label: t('common.actions.signOut') || 'Sign out',
331
+ color: 'destructive',
332
+ onPress: performSignOut
333
+ }, {
334
+ label: t('common.cancel') || 'Cancel',
335
+ color: 'cancel'
336
+ }]
337
+ }), /*#__PURE__*/_jsx(Dialog, {
338
+ control: signOutAllDialog,
339
+ title: t('accountMenu.signOutAll') || 'Sign out of all accounts',
340
+ description: t('common.confirms.signOutAll') || 'Are you sure you want to sign out of all accounts?',
341
+ actions: [{
342
+ label: t('accountMenu.signOutAll') || 'Sign out of all accounts',
343
+ color: 'destructive',
344
+ onPress: performSignOutAll
345
+ }, {
346
+ label: t('common.cancel') || 'Cancel',
347
+ color: 'cancel'
348
+ }]
349
+ })]
350
+ });
351
+ };
352
+ const styles = StyleSheet.create({
353
+ webOverlay: {
354
+ flex: 1,
355
+ backgroundColor: 'transparent'
356
+ },
357
+ nativeOverlay: {
358
+ flex: 1,
359
+ backgroundColor: 'rgba(0,0,0,0.32)',
360
+ justifyContent: 'flex-end'
361
+ },
362
+ panelTouchable: {
363
+ // Pressable wrapper that owns no styling — just absorbs taps.
364
+ },
365
+ panelBase: {
366
+ borderRadius: 24,
367
+ paddingVertical: 12,
368
+ shadowColor: '#000',
369
+ shadowOpacity: 0.18,
370
+ shadowRadius: 24,
371
+ shadowOffset: {
372
+ width: 0,
373
+ height: 8
374
+ },
375
+ elevation: 12,
376
+ overflow: 'hidden'
377
+ },
378
+ panelWeb: {
379
+ position: 'absolute',
380
+ width: 360,
381
+ maxHeight: '85%',
382
+ borderWidth: 1
383
+ },
384
+ panelNative: {
385
+ marginHorizontal: 0,
386
+ borderTopLeftRadius: 28,
387
+ borderTopRightRadius: 28,
388
+ borderBottomLeftRadius: 0,
389
+ borderBottomRightRadius: 0,
390
+ paddingTop: 20,
391
+ paddingBottom: 24,
392
+ maxHeight: '85%'
393
+ },
394
+ header: {
395
+ alignItems: 'center',
396
+ paddingHorizontal: 20,
397
+ paddingVertical: 16
398
+ },
399
+ headerName: {
400
+ fontSize: 18,
401
+ fontWeight: '600',
402
+ marginTop: 12,
403
+ textAlign: 'center'
404
+ },
405
+ headerSecondary: {
406
+ fontSize: 14,
407
+ marginTop: 4,
408
+ textAlign: 'center'
409
+ },
410
+ primaryButton: {
411
+ marginHorizontal: 20,
412
+ marginBottom: 12,
413
+ paddingVertical: 12,
414
+ paddingHorizontal: 16,
415
+ borderRadius: 999,
416
+ borderWidth: 1,
417
+ alignItems: 'center'
418
+ },
419
+ primaryButtonText: {
420
+ fontSize: 14,
421
+ fontWeight: '600'
422
+ },
423
+ list: {
424
+ maxHeight: 280
425
+ },
426
+ listContent: {
427
+ paddingHorizontal: 12,
428
+ paddingBottom: 4
429
+ },
430
+ row: {
431
+ flexDirection: 'row',
432
+ alignItems: 'center',
433
+ paddingVertical: 10,
434
+ paddingHorizontal: 12,
435
+ borderRadius: 16,
436
+ marginVertical: 2
437
+ },
438
+ actionRow: {
439
+ marginHorizontal: 12,
440
+ marginTop: 4
441
+ },
442
+ actionIcon: {
443
+ width: 36,
444
+ height: 36,
445
+ borderRadius: 18,
446
+ alignItems: 'center',
447
+ justifyContent: 'center'
448
+ },
449
+ rowInfo: {
450
+ flex: 1,
451
+ marginLeft: 12
452
+ },
453
+ rowName: {
454
+ fontSize: 15,
455
+ fontWeight: '500'
456
+ },
457
+ rowSecondary: {
458
+ fontSize: 13,
459
+ marginTop: 2
460
+ },
461
+ footer: {
462
+ marginTop: 12,
463
+ paddingTop: 8,
464
+ paddingHorizontal: 12,
465
+ borderTopWidth: StyleSheet.hairlineWidth,
466
+ flexDirection: 'row',
467
+ flexWrap: 'wrap',
468
+ justifyContent: 'space-around'
469
+ },
470
+ footerButton: {
471
+ paddingVertical: 10,
472
+ paddingHorizontal: 12
473
+ },
474
+ footerButtonText: {
475
+ fontSize: 14,
476
+ fontWeight: '600'
477
+ }
478
+ });
479
+ export default AccountMenu;
480
+ //# sourceMappingURL=AccountMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","View","Text","TouchableOpacity","StyleSheet","ScrollView","Modal","Pressable","Platform","ActivityIndicator","Ionicons","toast","useDialogControl","Dialog","useTheme","Avatar","useOxy","useI18n","logger","loggerUtil","buildAccountRows","jsx","_jsx","jsxs","_jsxs","isWeb","OS","AccountMenu","open","onClose","onNavigateManage","onAddAccount","anchor","user","sessions","activeSessionId","switchSession","logout","logoutAll","oxyServices","t","locale","bloomTheme","busySessionId","setBusySessionId","signingOut","setSigningOut","signingOutAll","setSigningOutAll","signOutDialog","signOutAllDialog","containerRef","firstActionRef","rows","getAvatarUrl","avatarId","getFileDownloadUrl","activeRow","find","r","isActive","inactiveRows","filter","handleSwitch","sessionId","success","error","__DEV__","warn","component","performSignOut","performSignOutAll","document","undefined","onKey","event","key","stopPropagation","addEventListener","removeEventListener","overlayStyles","styles","webOverlay","nativeOverlay","panelStyles","panelBase","panelWeb","top","right","backgroundColor","colors","background","borderColor","border","panelNative","content","ref","style","accessibilityRole","accessibilityLabel","children","header","uri","avatarUri","name","displayName","size","headerName","color","text","numberOfLines","secondary","headerSecondary","textSecondary","primaryButton","onPress","primaryButtonText","primary","length","list","contentContainerStyle","listContent","showsVerticalScrollIndicator","map","row","isBusy","accessibilityState","selected","disabled","primarySubtle","rowInfo","rowName","rowSecondary","actionRow","actionIcon","footer","borderTopColor","footerButton","footerButtonText","visible","transparent","animationType","onRequestClose","panelTouchable","control","title","description","actions","label","create","flex","justifyContent","borderRadius","paddingVertical","shadowColor","shadowOpacity","shadowRadius","shadowOffset","width","height","elevation","overflow","position","maxHeight","borderWidth","marginHorizontal","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingTop","paddingBottom","alignItems","paddingHorizontal","fontSize","fontWeight","marginTop","textAlign","marginBottom","flexDirection","marginVertical","marginLeft","borderTopWidth","hairlineWidth","flexWrap"],"sourceRoot":"../../../../src","sources":["ui/components/AccountMenu.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SACIC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,QAAQ,EACRC,iBAAiB,QAEd,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,KAAK,EAAEC,gBAAgB,EAAEC,MAAM,QAAQ,cAAc;AAC9D,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,MAAM,MAAM,aAAU;AAC7B,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,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AAE,CAAC;IACP+B,UAAU,EAAE;EAChB,CAAC;EACDlD,OAAO,EAAE;IACL2C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB,CAAC;EACD3C,YAAY,EAAE;IACV0C,QAAQ,EAAE,EAAE;IACZE,SAAS,EAAE;EACf,CAAC;EACDzC,MAAM,EAAE;IACJyC,SAAS,EAAE,EAAE;IACbN,UAAU,EAAE,CAAC;IACbG,iBAAiB,EAAE,EAAE;IACrBS,cAAc,EAAElL,UAAU,CAACmL,aAAa;IACxCJ,aAAa,EAAE,KAAK;IACpBK,QAAQ,EAAE,MAAM;IAChBjC,cAAc,EAAE;EACpB,CAAC;EACDd,YAAY,EAAE;IACVgB,eAAe,EAAE,EAAE;IACnBoB,iBAAiB,EAAE;EACvB,CAAC;EACDnC,gBAAgB,EAAE;IACdoC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC;AAEF,eAAepJ,WAAW","ignoreList":[]}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useRef, useState } from 'react';
4
+ import { TouchableOpacity, StyleSheet, Platform } from 'react-native';
5
+ import { getAccountDisplayName } from '@oxyhq/core';
6
+ import Avatar from "./Avatar.js";
7
+ import AccountMenu from "./AccountMenu.js";
8
+ import { useOxy } from "../context/OxyContext.js";
9
+ import { useI18n } from "../hooks/useI18n.js";
10
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const isWeb = Platform.OS === 'web';
12
+
13
+ /**
14
+ * Avatar entry-point that opens the unified {@link AccountMenu}. Reads the
15
+ * active account from `useOxy()` — never receive user data via props.
16
+ *
17
+ * Renders a small avatar chip (top-right friendly). Click → opens AccountMenu.
18
+ * Pure component: owns only the open-state and the trigger's measured anchor.
19
+ */
20
+ const AccountMenuButton = ({
21
+ size = 36,
22
+ onNavigateManage,
23
+ onAddAccount
24
+ }) => {
25
+ const {
26
+ user,
27
+ oxyServices,
28
+ isAuthenticated
29
+ } = useOxy();
30
+ const {
31
+ t,
32
+ locale
33
+ } = useI18n();
34
+ const [open, setOpen] = useState(false);
35
+ const [anchor, setAnchor] = useState(null);
36
+ const triggerRef = useRef(null);
37
+ const measureAnchor = useCallback(() => {
38
+ if (!isWeb || !triggerRef.current) {
39
+ return;
40
+ }
41
+ // RN-Web exposes measure() on host views; use the native API.
42
+ triggerRef.current.measure?.((_x, _y, _w, h, pageX, pageY) => {
43
+ if (typeof window === 'undefined' || typeof pageX !== 'number') {
44
+ return;
45
+ }
46
+ const right = Math.max(8, window.innerWidth - pageX - (_w ?? 0));
47
+ const top = pageY + h + 8;
48
+ setAnchor({
49
+ top,
50
+ right
51
+ });
52
+ });
53
+ }, []);
54
+ const handleOpen = useCallback(() => {
55
+ measureAnchor();
56
+ setOpen(true);
57
+ }, [measureAnchor]);
58
+ const handleClose = useCallback(() => setOpen(false), []);
59
+ const handleLayout = useCallback(_event => {
60
+ // Re-measure on layout changes so the popover doesn't drift after
61
+ // window resize / sticky-header relayout.
62
+ if (open) {
63
+ measureAnchor();
64
+ }
65
+ }, [measureAnchor, open]);
66
+ const displayName = getAccountDisplayName(user, locale);
67
+ const avatarUri = user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined;
68
+ const accessibilityLabel = isAuthenticated ? t('accountMenu.openWithUser', {
69
+ name: displayName
70
+ }) || `Account menu for ${displayName}` : t('accountMenu.open') || 'Account menu';
71
+ return /*#__PURE__*/_jsxs(_Fragment, {
72
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
73
+ ref: triggerRef,
74
+ onPress: handleOpen,
75
+ onLayout: handleLayout,
76
+ accessibilityRole: "button",
77
+ accessibilityLabel: accessibilityLabel,
78
+ accessibilityHint: t('accountMenu.openHint') || 'Opens the account menu',
79
+ accessibilityState: {
80
+ expanded: open
81
+ },
82
+ style: [styles.trigger, {
83
+ width: size,
84
+ height: size,
85
+ borderRadius: size / 2
86
+ }],
87
+ hitSlop: {
88
+ top: 8,
89
+ bottom: 8,
90
+ left: 8,
91
+ right: 8
92
+ },
93
+ children: /*#__PURE__*/_jsx(Avatar, {
94
+ uri: avatarUri,
95
+ name: displayName,
96
+ size: size
97
+ })
98
+ }), /*#__PURE__*/_jsx(AccountMenu, {
99
+ open: open,
100
+ onClose: handleClose,
101
+ onNavigateManage: onNavigateManage,
102
+ onAddAccount: onAddAccount,
103
+ anchor: anchor
104
+ })]
105
+ });
106
+ };
107
+ const styles = StyleSheet.create({
108
+ trigger: {
109
+ overflow: 'hidden',
110
+ alignItems: 'center',
111
+ justifyContent: 'center'
112
+ }
113
+ });
114
+ export default AccountMenuButton;
115
+ //# sourceMappingURL=AccountMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useRef","useState","TouchableOpacity","StyleSheet","Platform","getAccountDisplayName","Avatar","AccountMenu","useOxy","useI18n","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","isWeb","OS","AccountMenuButton","size","onNavigateManage","onAddAccount","user","oxyServices","isAuthenticated","t","locale","open","setOpen","anchor","setAnchor","triggerRef","measureAnchor","current","measure","_x","_y","_w","h","pageX","pageY","window","right","Math","max","innerWidth","top","handleOpen","handleClose","handleLayout","_event","displayName","avatarUri","avatar","getFileDownloadUrl","undefined","accessibilityLabel","name","children","ref","onPress","onLayout","accessibilityRole","accessibilityHint","accessibilityState","expanded","style","styles","trigger","width","height","borderRadius","hitSlop","bottom","left","uri","onClose","create","overflow","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["ui/components/AccountMenuButton.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrD,SAASC,gBAAgB,EAAEC,UAAU,EAAEC,QAAQ,QAAgC,cAAc;AAC7F,SAASC,qBAAqB,QAAQ,aAAa;AACnD,OAAOC,MAAM,MAAM,aAAU;AAC7B,OAAOC,WAAW,MAAM,kBAAe;AACvC,SAASC,MAAM,Q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E;QAAEC,QAAQ,EAAEtC;MAAK,CAAE;MACvCuC,KAAK,EAAE,CAACC,MAAM,CAACC,OAAO,EAAE;QAAEC,KAAK,EAAElD,IAAI;QAAEmD,MAAM,EAAEnD,IAAI;QAAEoD,YAAY,EAAEpD,IAAI,GAAG;MAAE,CAAC,CAAE;MAC/EqD,OAAO,EAAE;QAAE1B,GAAG,EAAE,CAAC;QAAE2B,MAAM,EAAE,CAAC;QAAEC,IAAI,EAAE,CAAC;QAAEhC,KAAK,EAAE;MAAE,CAAE;MAAAgB,QAAA,eAElD/C,IAAA,CAACL,MAAM;QAACqE,GAAG,EAAEvB,SAAU;QAACK,IAAI,EAAEN,WAAY;QAAChC,IAAI,EAAEA;MAAK,CAAE;IAAC,CAC3C,CAAC,eACnBR,IAAA,CAACJ,WAAW;MACRoB,IAAI,EAAEA,IAAK;MACXiD,OAAO,EAAE5B,WAAY;MACrB5B,gBAAgB,EAAEA,gBAAiB;MACnCC,YAAY,EAAEA,YAAa;MAC3BQ,MAAM,EAAEA;IAAO,CAClB,CAAC;EAAA,CACJ,CAAC;AAEX,CAAC;AAED,MAAMsC,MAAM,GAAGhE,UAAU,CAAC0E,MAAM,CAAC;EAC7BT,OAAO,EAAE;IACLU,QAAQ,EAAE,QAAQ;IAClBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACpB;AACJ,CAAC,CAAC;AAEF,eAAe9D,iBAAiB","ignoreList":[]}
@@ -8,7 +8,7 @@ import { useOxy } from "../context/OxyContext.js";
8
8
  /**
9
9
  * ActingAsBanner - Shows a subtle banner when the user is acting as a managed account.
10
10
  *
11
- * - Tap to open the AccountSwitcher screen.
11
+ * - Tap to open the ManageAccount screen (account switcher lives in AccountMenu).
12
12
  * - Long-press to switch back to the primary account immediately.
13
13
  *
14
14
  * Place this component in your app's layout where you want the banner to appear
@@ -34,7 +34,7 @@ const ActingAsBanner = () => {
34
34
  }
35
35
  const displayName = typeof activeAccount.name === 'object' ? activeAccount.name.full || activeAccount.name.first || activeAccount.username : activeAccount.name || activeAccount.username;
36
36
  const handlePress = () => {
37
- showBottomSheet?.('AccountSwitcher');
37
+ showBottomSheet?.('ManageAccount');
38
38
  };
39
39
  const handleLongPress = () => {
40
40
  setActingAs(null);