@oxyhq/services 10.2.0 → 10.2.1

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 (232) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/index.js +10 -0
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/ui/components/AccountMenu.js +297 -226
  5. package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
  6. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
  7. package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
  8. package/lib/commonjs/ui/components/SignInModal.js +11 -12
  9. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  10. package/lib/commonjs/ui/components/accountMenuRows.js +18 -30
  11. package/lib/commonjs/ui/components/accountMenuRows.js.map +1 -1
  12. package/lib/commonjs/ui/context/OxyContext.js +33 -65
  13. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  14. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +7 -13
  15. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  16. package/lib/commonjs/ui/hooks/useAuth.js +9 -39
  17. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  18. package/lib/commonjs/ui/hooks/useDeviceAccounts.js +285 -0
  19. package/lib/commonjs/ui/hooks/useDeviceAccounts.js.map +1 -0
  20. package/lib/commonjs/ui/hooks/useSessionManagement.js +5 -6
  21. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  22. package/lib/commonjs/ui/hooks/useSessionSocket.js +4 -5
  23. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  24. package/lib/commonjs/ui/hooks/useWebSSO.js +1 -1
  25. package/lib/commonjs/ui/navigation/routes.js +7 -7
  26. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  27. package/lib/commonjs/ui/screens/OxyAuthScreen.js +6 -7
  28. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/ProfileScreen.js +18 -20
  30. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +4 -4
  32. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
  34. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -0
  35. package/lib/commonjs/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +91 -41
  36. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -0
  37. package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
  38. package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
  39. package/lib/commonjs/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
  40. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
  41. package/lib/commonjs/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
  42. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
  43. package/lib/commonjs/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
  44. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -0
  45. package/lib/commonjs/ui/screens/trust/trustTier.js +23 -0
  46. package/lib/commonjs/ui/screens/trust/trustTier.js.map +1 -0
  47. package/lib/commonjs/utils/deviceFlowSignIn.js +12 -10
  48. package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
  49. package/lib/module/index.js +3 -0
  50. package/lib/module/index.js.map +1 -1
  51. package/lib/module/ui/components/AccountMenu.js +297 -226
  52. package/lib/module/ui/components/AccountMenu.js.map +1 -1
  53. package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
  54. package/lib/module/ui/components/OxySignInButton.js +1 -1
  55. package/lib/module/ui/components/SignInModal.js +11 -12
  56. package/lib/module/ui/components/SignInModal.js.map +1 -1
  57. package/lib/module/ui/components/accountMenuRows.js +18 -30
  58. package/lib/module/ui/components/accountMenuRows.js.map +1 -1
  59. package/lib/module/ui/context/OxyContext.js +33 -65
  60. package/lib/module/ui/context/OxyContext.js.map +1 -1
  61. package/lib/module/ui/context/hooks/useAuthOperations.js +7 -13
  62. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  63. package/lib/module/ui/hooks/useAuth.js +9 -39
  64. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  65. package/lib/module/ui/hooks/useDeviceAccounts.js +281 -0
  66. package/lib/module/ui/hooks/useDeviceAccounts.js.map +1 -0
  67. package/lib/module/ui/hooks/useSessionManagement.js +5 -6
  68. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  69. package/lib/module/ui/hooks/useSessionSocket.js +4 -5
  70. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  71. package/lib/module/ui/hooks/useWebSSO.js +1 -1
  72. package/lib/module/ui/navigation/routes.js +7 -7
  73. package/lib/module/ui/navigation/routes.js.map +1 -1
  74. package/lib/module/ui/screens/OxyAuthScreen.js +6 -7
  75. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  76. package/lib/module/ui/screens/ProfileScreen.js +18 -20
  77. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  78. package/lib/module/ui/screens/WelcomeNewUserScreen.js +4 -4
  79. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  80. package/lib/module/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
  81. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -0
  82. package/lib/module/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +92 -42
  83. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -0
  84. package/lib/module/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
  85. package/lib/module/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
  86. package/lib/module/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
  87. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
  88. package/lib/module/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
  89. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
  90. package/lib/module/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
  91. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -0
  92. package/lib/module/ui/screens/trust/trustTier.js +19 -0
  93. package/lib/module/ui/screens/trust/trustTier.js.map +1 -0
  94. package/lib/module/utils/deviceFlowSignIn.js +13 -10
  95. package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
  96. package/lib/typescript/commonjs/index.d.ts +3 -1
  97. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +30 -10
  99. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +1 -1
  101. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts +19 -12
  103. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -3
  105. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
  108. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +3 -7
  110. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts +133 -0
  112. package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +1 -1
  116. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  117. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
  120. package/lib/typescript/commonjs/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
  121. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
  122. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
  123. package/lib/typescript/{module/ui/screens/karma/KarmaFAQScreen.d.ts → commonjs/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
  124. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
  126. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
  128. package/lib/typescript/commonjs/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
  129. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
  130. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +9 -0
  132. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/ui/types/navigation.d.ts +1 -1
  134. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +11 -9
  135. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
  136. package/lib/typescript/module/index.d.ts +3 -1
  137. package/lib/typescript/module/index.d.ts.map +1 -1
  138. package/lib/typescript/module/ui/components/AccountMenu.d.ts +30 -10
  139. package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
  140. package/lib/typescript/module/ui/components/SignInModal.d.ts +1 -1
  141. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  142. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +19 -12
  143. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
  144. package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -3
  145. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  146. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  147. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
  148. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  149. package/lib/typescript/module/ui/hooks/useAuth.d.ts +3 -7
  150. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  151. package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts +133 -0
  152. package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
  153. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
  155. package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +1 -1
  156. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  157. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  158. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
  160. package/lib/typescript/module/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
  161. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
  162. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
  163. package/lib/typescript/{commonjs/ui/screens/karma/KarmaFAQScreen.d.ts → module/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
  164. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
  165. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
  166. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
  167. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
  168. package/lib/typescript/module/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
  169. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
  170. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
  171. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +9 -0
  172. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -0
  173. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  174. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +11 -9
  175. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
  176. package/package.json +1 -1
  177. package/src/index.ts +10 -1
  178. package/src/ui/components/AccountMenu.tsx +311 -253
  179. package/src/ui/components/AccountMenuButton.tsx +2 -2
  180. package/src/ui/components/OxySignInButton.tsx +1 -1
  181. package/src/ui/components/SignInModal.tsx +13 -14
  182. package/src/ui/components/accountMenuRows.ts +28 -40
  183. package/src/ui/context/OxyContext.tsx +43 -61
  184. package/src/ui/context/hooks/useAuthOperations.ts +7 -13
  185. package/src/ui/hooks/useAuth.ts +11 -48
  186. package/src/ui/hooks/useDeviceAccounts.ts +348 -0
  187. package/src/ui/hooks/useSessionManagement.ts +5 -14
  188. package/src/ui/hooks/useSessionSocket.ts +4 -5
  189. package/src/ui/hooks/useWebSSO.ts +1 -1
  190. package/src/ui/navigation/routes.ts +13 -13
  191. package/src/ui/screens/OxyAuthScreen.tsx +6 -7
  192. package/src/ui/screens/ProfileScreen.tsx +15 -17
  193. package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -2
  194. package/src/ui/screens/{karma/KarmaAboutScreen.tsx → trust/TrustAboutScreen.tsx} +15 -15
  195. package/src/ui/screens/{karma/KarmaCenterScreen.tsx → trust/TrustCenterScreen.tsx} +87 -41
  196. package/src/ui/screens/{karma/KarmaFAQScreen.tsx → trust/TrustFAQScreen.tsx} +10 -10
  197. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +101 -0
  198. package/src/ui/screens/{karma/KarmaRewardsScreen.tsx → trust/TrustRewardsScreen.tsx} +54 -54
  199. package/src/ui/screens/{karma/KarmaRulesScreen.tsx → trust/TrustRulesScreen.tsx} +27 -13
  200. package/src/ui/screens/trust/trustTier.ts +20 -0
  201. package/src/ui/types/navigation.ts +1 -2
  202. package/src/utils/__tests__/deviceFlowSignIn.test.ts +2 -3
  203. package/src/utils/deviceFlowSignIn.ts +18 -12
  204. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  205. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  206. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  207. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  208. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  209. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  210. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  211. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  212. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  213. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  214. package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  215. package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  216. package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  217. package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  218. package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  219. package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  220. package/lib/typescript/commonjs/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  221. package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  222. package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  223. package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  224. package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  225. package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  226. package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  227. package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  228. package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  229. package/lib/typescript/module/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  230. package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  231. package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  232. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +0 -88
@@ -8,23 +8,43 @@ var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
9
  var _vectorIcons = require("@expo/vector-icons");
10
10
  var _bloom = require("@oxyhq/bloom");
11
+ var _divider = require("@oxyhq/bloom/divider");
11
12
  var _theme = require("@oxyhq/bloom/theme");
12
13
  var _Avatar = _interopRequireDefault(require("./Avatar.js"));
13
14
  var _OxyContext = require("../context/OxyContext.js");
14
15
  var _useI18n = require("../hooks/useI18n.js");
15
16
  var _core = require("@oxyhq/core");
16
17
  var _accountMenuRows = require("./accountMenuRows.js");
18
+ var _useDeviceAccounts = require("../hooks/useDeviceAccounts.js");
17
19
  var _jsxRuntime = require("react/jsx-runtime");
18
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
+ /**
22
+ * Web-only anchor for the popover panel. Each field anchors the panel against
23
+ * one viewport edge, so the popover can be placed against ANY corner: a
24
+ * top-right avatar chip opens downward/right-aligned (`{ top, right }`), while a
25
+ * bottom-left account button opens upward/left-aligned (`{ bottom, left }`).
26
+ *
27
+ * Callers MUST supply at most one vertical edge (`top` XOR `bottom`) and at most
28
+ * one horizontal edge (`left` XOR `right`). The panel has a fixed width and
29
+ * `maxHeight`, so a single vertical + single horizontal edge fully positions it.
30
+ * Supplying both opposite edges (e.g. `top` AND `bottom`) would stretch the
31
+ * panel on RN-Web and is unsupported.
32
+ */
33
+
19
34
  const isWeb = _reactNative.Platform.OS === 'web';
20
35
 
36
+ /** Fixed popover width on web. Callers that compute an anchor (e.g. inbox's
37
+ * MailboxDrawer) key their gutter math off this — keep them consistent. */
38
+ const PANEL_WIDTH = 360;
39
+
21
40
  /**
22
- * Reusable account menu modeled after the Google account chooser. Opens from
23
- * the avatar entry point (`AccountMenuButton`) or any other trigger.
41
+ * Unified, canonical account switcher for the Oxy ecosystem. Gmail-style: the
42
+ * accounts list sits at the top (current account first, with a checkmark), then
43
+ * "Add another account", "Manage account", and the sign-out actions.
24
44
  *
25
- * Reads everything it needs from `useOxy()` — never receive a session via
26
- * props. Renders as a popover anchored to the trigger on web, and as a
27
- * full-width bottom-sheet style modal on native.
45
+ * Reads everything it needs from `useOxy()` / `useDeviceAccounts()` — never
46
+ * receives a session via props. Renders as a popover anchored to the trigger on
47
+ * web, and as a full-width bottom-sheet style modal on native.
28
48
  */
29
49
  const AccountMenu = ({
30
50
  open,
@@ -34,39 +54,55 @@ const AccountMenu = ({
34
54
  anchor
35
55
  }) => {
36
56
  const {
37
- user,
38
- sessions,
39
57
  activeSessionId,
40
58
  switchSession,
41
59
  logout,
42
60
  logoutAll,
43
- oxyServices
61
+ removeSession
44
62
  } = (0, _OxyContext.useOxy)();
45
63
  const {
46
- t,
47
- locale
64
+ t
48
65
  } = (0, _useI18n.useI18n)();
49
66
  const bloomTheme = (0, _theme.useTheme)();
67
+ const colors = bloomTheme.colors;
68
+
69
+ // Source EVERY account's real name/email/avatar/color from the unified
70
+ // device-account hook (shared apex `refresh-all` path on `*.oxy.so`, local
71
+ // `useOxy()` fallback on cross-domain web / native). This also synthesises a
72
+ // live-user row when the probe is empty, so the signed-in user is always
73
+ // represented (no "Not signed in" false negative).
74
+ const {
75
+ accounts: deviceAccounts
76
+ } = (0, _useDeviceAccounts.useDeviceAccounts)();
50
77
  const [busySessionId, setBusySessionId] = (0, _react.useState)(null);
78
+ const [removingSessionId, setRemovingSessionId] = (0, _react.useState)(null);
51
79
  const [signingOut, setSigningOut] = (0, _react.useState)(false);
52
80
  const [signingOutAll, setSigningOutAll] = (0, _react.useState)(false);
53
81
  const signOutDialog = (0, _bloom.useDialogControl)();
54
82
  const signOutAllDialog = (0, _bloom.useDialogControl)();
55
83
  const containerRef = (0, _react.useRef)(null);
56
- const firstActionRef = (0, _react.useRef)(null);
57
- const rows = (0, _react.useMemo)(() => (0, _accountMenuRows.buildAccountRows)({
58
- sessions,
59
- activeSessionId,
60
- user,
61
- locale,
62
- getAvatarUrl: avatarId => oxyServices.getFileDownloadUrl(avatarId, 'thumb')
63
- }), [sessions, activeSessionId, user, locale, oxyServices]);
64
- const activeRow = (0, _react.useMemo)(() => {
65
- return rows.find(r => r.isActive) ?? null;
66
- }, [rows]);
67
- const inactiveRows = (0, _react.useMemo)(() => {
68
- return rows.filter(r => !r.isActive);
69
- }, [rows]);
84
+
85
+ // Current account first, then the rest in their existing order — matching
86
+ // the Gmail-style chooser the inbox design ports from.
87
+ const rows = (0, _react.useMemo)(() => {
88
+ const built = (0, _accountMenuRows.buildAccountRows)({
89
+ accounts: deviceAccounts
90
+ });
91
+ const current = built.filter(row => row.isActive);
92
+ const others = built.filter(row => !row.isActive);
93
+ return [...current, ...others];
94
+ }, [deviceAccounts]);
95
+ const isSwitching = busySessionId !== null;
96
+
97
+ // Switch to a non-active account. We route ALL rows through
98
+ // `useOxy().switchSession(sessionId)` — the SDK's canonical switch path. On
99
+ // WEB it already performs the same silent activation the auth chooser uses:
100
+ // when the target `ClientSession` carries an `authuser` slot, it rotates that
101
+ // slot via `oxyServices.refreshTokenViaCookie({ authuser })` and plants the
102
+ // fresh access token before validating (see `useSessionManagement.switchSession`).
103
+ // On NATIVE it validates the session id directly. There is no separate
104
+ // "activate by authuser" SDK entry point, so reusing `switchSession`
105
+ // (rather than inventing a parallel mechanism) keeps a single source of truth.
70
106
  const handleSwitch = (0, _react.useCallback)(async sessionId => {
71
107
  if (sessionId === activeSessionId || busySessionId) {
72
108
  return;
@@ -87,6 +123,29 @@ const AccountMenu = ({
87
123
  setBusySessionId(null);
88
124
  }
89
125
  }, [activeSessionId, busySessionId, switchSession, t, onClose]);
126
+
127
+ // Sign out a SPECIFIC inactive account from its per-row icon. `removeSession`
128
+ // is the SDK's canonical per-session sign-out: it targets the given session
129
+ // id (cookie-cleared logout via `authuser` slot on web, bearer logout
130
+ // otherwise) and removes ONLY that account without switching/clearing the
131
+ // active session. The menu stays open so the user can keep managing accounts.
132
+ const handleRemove = (0, _react.useCallback)(async sessionId => {
133
+ if (sessionId === activeSessionId || removingSessionId) {
134
+ return;
135
+ }
136
+ setRemovingSessionId(sessionId);
137
+ try {
138
+ await removeSession(sessionId);
139
+ _bloom.toast.success(t('common.actions.signedOut') || 'Signed out');
140
+ } catch (error) {
141
+ _core.logger.warn('Remove account failed', {
142
+ component: 'AccountMenu'
143
+ }, error);
144
+ _bloom.toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
145
+ } finally {
146
+ setRemovingSessionId(null);
147
+ }
148
+ }, [activeSessionId, removingSessionId, removeSession, t]);
90
149
  const performSignOut = (0, _react.useCallback)(async () => {
91
150
  if (signingOut) {
92
151
  return;
@@ -142,73 +201,52 @@ const AccountMenu = ({
142
201
  return null;
143
202
  }
144
203
  const overlayStyles = isWeb ? styles.webOverlay : styles.nativeOverlay;
145
- const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchor ? {
146
- top: anchor.top,
147
- right: anchor.right
204
+
205
+ // Apply ONLY the edges the anchor supplies (so the panel never sets
206
+ // conflicting opposite edges). When no anchor is provided, fall back to the
207
+ // historical top-right placement used by `AccountMenuButton`.
208
+ const anchorStyle = anchor ? {
209
+ ...(anchor.top !== undefined ? {
210
+ top: anchor.top
211
+ } : null),
212
+ ...(anchor.bottom !== undefined ? {
213
+ bottom: anchor.bottom
214
+ } : null),
215
+ ...(anchor.left !== undefined ? {
216
+ left: anchor.left
217
+ } : null),
218
+ ...(anchor.right !== undefined ? {
219
+ right: anchor.right
220
+ } : null)
148
221
  } : {
149
222
  top: 64,
150
223
  right: 16
151
- }, {
152
- backgroundColor: bloomTheme.colors.background,
153
- borderColor: bloomTheme.colors.border
224
+ };
225
+ const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchorStyle, {
226
+ backgroundColor: colors.background,
227
+ borderColor: colors.border
154
228
  }] : [styles.panelBase, styles.panelNative, {
155
- backgroundColor: bloomTheme.colors.background
229
+ backgroundColor: colors.background
156
230
  }];
157
- const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
158
- ref: containerRef,
231
+ const actionDisabled = isSwitching || signingOut || signingOutAll;
232
+ const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
233
+ ref: containerRef
234
+ // Swallow taps inside the panel so they never reach the overlay's
235
+ // outside-tap-to-close handler. (On web the panel is a direct,
236
+ // absolutely-positioned child of the overlay so the anchor resolves
237
+ // against the viewport.)
238
+ ,
239
+ onPress: () => undefined,
159
240
  style: panelStyles,
160
241
  accessibilityRole: "menu",
161
242
  accessibilityLabel: t('accountMenu.label') || 'Account menu',
162
- children: [activeRow ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
163
- style: styles.header,
164
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
165
- uri: activeRow.avatarUri,
166
- name: activeRow.displayName,
167
- size: 64
168
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
169
- style: [styles.headerName, {
170
- color: bloomTheme.colors.text
171
- }],
172
- numberOfLines: 1,
173
- children: activeRow.displayName
174
- }), activeRow.secondary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
175
- style: [styles.headerSecondary, {
176
- color: bloomTheme.colors.textSecondary
177
- }],
178
- numberOfLines: 1,
179
- children: activeRow.secondary
180
- }) : null]
181
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
182
- style: styles.header,
183
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
184
- style: [styles.headerName, {
185
- color: bloomTheme.colors.text
186
- }],
187
- children: t('common.status.notSignedIn') || 'Not signed in'
188
- })
189
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
190
- ref: firstActionRef,
191
- accessibilityRole: "menuitem",
192
- accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
193
- style: [styles.primaryButton, {
194
- borderColor: bloomTheme.colors.border
195
- }],
196
- onPress: () => {
197
- onClose();
198
- onNavigateManage();
199
- },
200
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
201
- style: [styles.primaryButtonText, {
202
- color: bloomTheme.colors.primary
203
- }],
204
- children: t('accountMenu.manage') || 'Manage your Oxy Account'
205
- })
206
- }), rows.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
207
- style: styles.list,
208
- contentContainerStyle: styles.listContent,
243
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
244
+ style: styles.scroll,
245
+ contentContainerStyle: styles.scrollContent,
209
246
  showsVerticalScrollIndicator: false,
210
- children: rows.map(row => {
247
+ children: [rows.map(row => {
211
248
  const isBusy = busySessionId === row.sessionId;
249
+ const isRemoving = removingSessionId === row.sessionId;
212
250
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
213
251
  accessibilityRole: "menuitem",
214
252
  accessibilityLabel: row.displayName,
@@ -216,101 +254,161 @@ const AccountMenu = ({
216
254
  selected: row.isActive
217
255
  },
218
256
  onPress: () => handleSwitch(row.sessionId),
219
- disabled: row.isActive || isBusy,
220
- style: [styles.row, row.isActive && {
221
- backgroundColor: bloomTheme.colors.primarySubtle
222
- }],
257
+ disabled: row.isActive || isBusy || isSwitching,
258
+ activeOpacity: 0.6,
259
+ style: [styles.accountRow, row.isActive && {
260
+ backgroundColor: colors.primarySubtle
261
+ }, isSwitching && !row.isActive && styles.rowDisabled],
223
262
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
224
263
  uri: row.avatarUri,
225
264
  name: row.displayName,
226
- size: 36
265
+ size: row.isActive ? 40 : 32
227
266
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
228
- style: styles.rowInfo,
267
+ style: styles.accountInfo,
229
268
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
230
- style: [styles.rowName, {
231
- color: bloomTheme.colors.text
232
- }],
269
+ style: [styles.accountName, {
270
+ color: colors.text
271
+ }, row.isActive && styles.accountNameActive],
233
272
  numberOfLines: 1,
234
273
  children: row.displayName
235
274
  }), row.secondary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
236
- style: [styles.rowSecondary, {
237
- color: bloomTheme.colors.textSecondary
275
+ style: [styles.accountEmail, {
276
+ color: colors.textSecondary
238
277
  }],
239
278
  numberOfLines: 1,
240
279
  children: row.secondary
241
280
  }) : null]
242
281
  }), isBusy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
243
- color: bloomTheme.colors.primary,
282
+ color: colors.primary,
244
283
  size: "small"
245
284
  }) : row.isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
246
- name: "checkmark-circle",
285
+ name: "checkmark",
247
286
  size: 20,
248
- color: bloomTheme.colors.primary
249
- }) : null]
287
+ color: colors.primary
288
+ }) : isRemoving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
289
+ color: colors.textSecondary,
290
+ size: "small"
291
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
292
+ accessibilityRole: "button",
293
+ accessibilityLabel: t('accountMenu.signOutAccount', {
294
+ name: row.displayName
295
+ }) || `Sign out ${row.displayName}`,
296
+ onPress: () => handleRemove(row.sessionId),
297
+ disabled: isSwitching || removingSessionId !== null,
298
+ activeOpacity: 0.6,
299
+ hitSlop: {
300
+ top: 8,
301
+ bottom: 8,
302
+ left: 8,
303
+ right: 8
304
+ },
305
+ style: styles.rowSignOutButton,
306
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
307
+ name: "log-out-outline",
308
+ size: 18,
309
+ color: colors.textSecondary
310
+ })
311
+ })]
250
312
  }, `account-${row.sessionId}`);
251
- })
252
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
253
- accessibilityRole: "menuitem",
254
- accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
255
- onPress: () => {
256
- onClose();
257
- onAddAccount();
258
- },
259
- style: [styles.row, styles.actionRow],
260
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
261
- style: [styles.actionIcon, {
262
- backgroundColor: bloomTheme.colors.primarySubtle
263
- }],
264
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
313
+ }), isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
314
+ style: styles.switchingRow,
315
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
316
+ color: colors.textSecondary,
317
+ size: "small"
318
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
319
+ style: [styles.switchingText, {
320
+ color: colors.textSecondary
321
+ }],
322
+ children: t('accountMenu.switching') || 'Switching account…'
323
+ })]
324
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
325
+ color: colors.border,
326
+ spacing: 4
327
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
328
+ accessibilityRole: "menuitem",
329
+ accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
330
+ onPress: () => {
331
+ onClose();
332
+ onAddAccount();
333
+ },
334
+ disabled: actionDisabled,
335
+ activeOpacity: 0.6,
336
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
337
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
265
338
  name: "person-add-outline",
266
- size: 18,
267
- color: bloomTheme.colors.primary
268
- })
269
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
270
- style: styles.rowInfo,
271
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
272
- style: [styles.rowName, {
273
- color: bloomTheme.colors.text
339
+ size: 20,
340
+ color: colors.icon
341
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
342
+ style: [styles.actionText, {
343
+ color: colors.text
274
344
  }],
275
345
  children: t('accountMenu.addAnother') || 'Add another account'
276
- })
277
- })]
278
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
279
- style: [styles.footer, {
280
- borderTopColor: bloomTheme.colors.border
281
- }],
282
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
346
+ })]
347
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
348
+ color: colors.border,
349
+ spacing: 4
350
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
351
+ accessibilityRole: "menuitem",
352
+ accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
353
+ onPress: () => {
354
+ onClose();
355
+ onNavigateManage();
356
+ },
357
+ disabled: actionDisabled,
358
+ activeOpacity: 0.6,
359
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
360
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
361
+ name: "settings-outline",
362
+ size: 18,
363
+ color: colors.icon
364
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
365
+ style: [styles.actionText, {
366
+ color: colors.text
367
+ }],
368
+ children: t('accountMenu.manage') || 'Manage your Oxy Account'
369
+ })]
370
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
283
371
  accessibilityRole: "menuitem",
284
372
  accessibilityLabel: t('common.actions.signOut') || 'Sign out',
285
373
  onPress: () => signOutDialog.open(),
286
- disabled: signingOut || signingOutAll,
287
- style: styles.footerButton,
288
- children: signingOut ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
289
- color: bloomTheme.colors.error,
374
+ disabled: actionDisabled,
375
+ activeOpacity: 0.6,
376
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
377
+ children: [signingOut ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
378
+ color: colors.error,
290
379
  size: "small"
291
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
292
- style: [styles.footerButtonText, {
293
- color: bloomTheme.colors.error
380
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
381
+ name: "log-out-outline",
382
+ size: 18,
383
+ color: colors.error
384
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
385
+ style: [styles.actionText, {
386
+ color: colors.error
294
387
  }],
295
388
  children: t('common.actions.signOut') || 'Sign out'
296
- })
297
- }), rows.length > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
389
+ })]
390
+ }), rows.length > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
298
391
  accessibilityRole: "menuitem",
299
392
  accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
300
393
  onPress: () => signOutAllDialog.open(),
301
- disabled: signingOut || signingOutAll,
302
- style: styles.footerButton,
303
- children: signingOutAll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
304
- color: bloomTheme.colors.error,
394
+ disabled: actionDisabled,
395
+ activeOpacity: 0.6,
396
+ style: [styles.actionRow, actionDisabled && styles.rowDisabled],
397
+ children: [signingOutAll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
398
+ color: colors.error,
305
399
  size: "small"
306
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
307
- style: [styles.footerButtonText, {
308
- color: bloomTheme.colors.error
400
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
401
+ name: "log-out-outline",
402
+ size: 18,
403
+ color: colors.error
404
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
405
+ style: [styles.actionText, {
406
+ color: colors.error
309
407
  }],
310
408
  children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
311
- })
409
+ })]
312
410
  }) : null]
313
- })]
411
+ })
314
412
  });
315
413
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Modal, {
316
414
  visible: open,
@@ -322,11 +420,7 @@ const AccountMenu = ({
322
420
  accessibilityLabel: t('common.actions.close') || 'Close',
323
421
  onPress: onClose,
324
422
  style: overlayStyles,
325
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
326
- onPress: () => undefined,
327
- style: styles.panelTouchable,
328
- children: content
329
- })
423
+ children: content
330
424
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
331
425
  control: signOutDialog,
332
426
  title: t('common.actions.signOut') || 'Sign out',
@@ -357,19 +451,20 @@ const AccountMenu = ({
357
451
  const styles = _reactNative.StyleSheet.create({
358
452
  webOverlay: {
359
453
  flex: 1,
360
- backgroundColor: 'transparent'
454
+ backgroundColor: 'transparent',
455
+ // Explicit positioning context: the absolutely-positioned panel is a
456
+ // direct child and resolves its anchor edges (top/bottom/left/right)
457
+ // against this full-viewport overlay — matching the trigger-rect math
458
+ // callers compute from `window.innerWidth` / `window.innerHeight`.
459
+ position: 'relative'
361
460
  },
362
461
  nativeOverlay: {
363
462
  flex: 1,
364
463
  backgroundColor: 'rgba(0,0,0,0.32)',
365
464
  justifyContent: 'flex-end'
366
465
  },
367
- panelTouchable: {
368
- // Pressable wrapper that owns no styling — just absorbs taps.
369
- },
370
466
  panelBase: {
371
- borderRadius: 24,
372
- paddingVertical: 12,
467
+ borderRadius: 12,
373
468
  shadowColor: '#000',
374
469
  shadowOpacity: 0.18,
375
470
  shadowRadius: 24,
@@ -382,103 +477,79 @@ const styles = _reactNative.StyleSheet.create({
382
477
  },
383
478
  panelWeb: {
384
479
  position: 'absolute',
385
- width: 360,
480
+ width: PANEL_WIDTH,
386
481
  maxHeight: '85%',
387
482
  borderWidth: 1
388
483
  },
389
484
  panelNative: {
390
485
  marginHorizontal: 0,
391
- borderTopLeftRadius: 28,
392
- borderTopRightRadius: 28,
486
+ borderTopLeftRadius: 20,
487
+ borderTopRightRadius: 20,
393
488
  borderBottomLeftRadius: 0,
394
489
  borderBottomRightRadius: 0,
395
- paddingTop: 20,
396
- paddingBottom: 24,
490
+ paddingBottom: 12,
397
491
  maxHeight: '85%'
398
492
  },
399
- header: {
493
+ scroll: {
494
+ flexGrow: 0
495
+ },
496
+ scrollContent: {
497
+ paddingVertical: 4
498
+ },
499
+ accountRow: {
500
+ flexDirection: 'row',
400
501
  alignItems: 'center',
401
- paddingHorizontal: 20,
402
- paddingVertical: 16
502
+ paddingHorizontal: 14,
503
+ paddingVertical: 10,
504
+ gap: 10
403
505
  },
404
- headerName: {
405
- fontSize: 18,
406
- fontWeight: '600',
407
- marginTop: 12,
408
- textAlign: 'center'
506
+ rowDisabled: {
507
+ opacity: 0.4
409
508
  },
410
- headerSecondary: {
411
- fontSize: 14,
412
- marginTop: 4,
413
- textAlign: 'center'
509
+ accountInfo: {
510
+ flex: 1,
511
+ minWidth: 0
414
512
  },
415
- primaryButton: {
416
- marginHorizontal: 20,
417
- marginBottom: 12,
418
- paddingVertical: 12,
419
- paddingHorizontal: 16,
420
- borderRadius: 999,
421
- borderWidth: 1,
422
- alignItems: 'center'
513
+ accountName: {
514
+ fontSize: 13,
515
+ fontWeight: '500'
423
516
  },
424
- primaryButtonText: {
425
- fontSize: 14,
517
+ accountNameActive: {
426
518
  fontWeight: '600'
427
519
  },
428
- list: {
429
- maxHeight: 280
520
+ accountEmail: {
521
+ fontSize: 11,
522
+ marginTop: 1
430
523
  },
431
- listContent: {
432
- paddingHorizontal: 12,
433
- paddingBottom: 4
434
- },
435
- row: {
436
- flexDirection: 'row',
524
+ rowSignOutButton: {
525
+ width: 28,
526
+ height: 28,
437
527
  alignItems: 'center',
438
- paddingVertical: 10,
439
- paddingHorizontal: 12,
440
- borderRadius: 16,
441
- marginVertical: 2
442
- },
443
- actionRow: {
444
- marginHorizontal: 12,
445
- marginTop: 4
528
+ justifyContent: 'center',
529
+ borderRadius: 14,
530
+ opacity: 0.6
446
531
  },
447
- actionIcon: {
448
- width: 36,
449
- height: 36,
450
- borderRadius: 18,
532
+ switchingRow: {
533
+ flexDirection: 'row',
451
534
  alignItems: 'center',
452
- justifyContent: 'center'
535
+ justifyContent: 'center',
536
+ paddingVertical: 8,
537
+ gap: 8
453
538
  },
454
- rowInfo: {
455
- flex: 1,
456
- marginLeft: 12
457
- },
458
- rowName: {
459
- fontSize: 15,
539
+ switchingText: {
540
+ fontSize: 12,
460
541
  fontWeight: '500'
461
542
  },
462
- rowSecondary: {
463
- fontSize: 13,
464
- marginTop: 2
465
- },
466
- footer: {
467
- marginTop: 12,
468
- paddingTop: 8,
469
- paddingHorizontal: 12,
470
- borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
543
+ actionRow: {
471
544
  flexDirection: 'row',
472
- flexWrap: 'wrap',
473
- justifyContent: 'space-around'
474
- },
475
- footerButton: {
476
- paddingVertical: 10,
477
- paddingHorizontal: 12
545
+ alignItems: 'center',
546
+ paddingHorizontal: 14,
547
+ paddingVertical: 12,
548
+ gap: 10
478
549
  },
479
- footerButtonText: {
480
- fontSize: 14,
481
- fontWeight: '600'
550
+ actionText: {
551
+ fontSize: 13,
552
+ fontWeight: '500'
482
553
  }
483
554
  });
484
555
  var _default = exports.default = AccountMenu;