@oxyhq/services 22.12.5 → 22.13.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 (464) hide show
  1. package/README.md +16 -46
  2. package/lib/commonjs/index.js +90 -10
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/notifications/deviceNotifications.js +424 -0
  5. package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
  6. package/lib/commonjs/ui/boot/runProviderColdBoot.js +51 -9
  7. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  8. package/lib/commonjs/ui/client.js +0 -13
  9. package/lib/commonjs/ui/client.js.map +1 -1
  10. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +27 -4
  11. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyAuthChooser.js +74 -1124
  13. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyConsentScreen.js +50 -12
  15. package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxyProvider.js +4 -4
  17. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxySignInButton.js +74 -40
  19. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  20. package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
  21. package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
  22. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +527 -0
  23. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  24. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +90 -0
  25. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -0
  26. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +106 -0
  27. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -0
  28. package/lib/commonjs/ui/components/authChooser/SignUpView.js +188 -0
  29. package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +1 -0
  30. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +61 -0
  31. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  32. package/lib/commonjs/ui/components/authChooser/primitives.js +169 -0
  33. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
  34. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +153 -0
  35. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -0
  36. package/lib/commonjs/ui/components/authChooser/signInProgress.js +54 -0
  37. package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -0
  38. package/lib/commonjs/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  39. package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -0
  40. package/lib/commonjs/ui/components/authChooser/types.js +70 -0
  41. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -0
  42. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +50 -0
  43. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  44. package/lib/commonjs/ui/context/OxyContext.js +205 -30
  45. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  46. package/lib/commonjs/ui/context/commitSessionFlow.js +46 -0
  47. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  48. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
  49. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  50. package/lib/commonjs/ui/context/useOxyAccountGraph.js +13 -5
  51. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  52. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +6 -1
  53. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
  54. package/lib/commonjs/ui/index.js +0 -13
  55. package/lib/commonjs/ui/index.js.map +1 -1
  56. package/lib/commonjs/ui/oauth/browserAuthTransport.js +170 -0
  57. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -0
  58. package/lib/commonjs/ui/oauth/completeOAuthCode.js +78 -0
  59. package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -0
  60. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
  61. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
  62. package/lib/commonjs/ui/oauth/oauthHandshake.js +53 -0
  63. package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -0
  64. package/lib/commonjs/ui/oauth/oauthPopup.js +276 -0
  65. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -0
  66. package/lib/commonjs/ui/oauth/oauthPopupMessages.js +141 -0
  67. package/lib/commonjs/ui/oauth/oauthPopupMessages.js.map +1 -0
  68. package/lib/commonjs/ui/oauth/types.js +2 -0
  69. package/lib/commonjs/ui/oauth/types.js.map +1 -0
  70. package/lib/commonjs/ui/server.js +2 -5
  71. package/lib/commonjs/ui/server.js.map +1 -1
  72. package/lib/commonjs/ui/session/authStore.js +6 -75
  73. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  74. package/lib/commonjs/ui/session/createSessionClient.js +11 -3
  75. package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
  76. package/lib/commonjs/ui/session/identityBinding.js +95 -0
  77. package/lib/commonjs/ui/session/identityBinding.js.map +1 -0
  78. package/lib/commonjs/ui/session/index.js +13 -0
  79. package/lib/commonjs/ui/session/index.js.map +1 -1
  80. package/lib/commonjs/ui/session/nativeSecureStorage.js +90 -0
  81. package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -0
  82. package/lib/commonjs/ui/session/tokenTransport.js +11 -1
  83. package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
  84. package/lib/commonjs/ui/utils/crossOriginRestore.js +3 -2
  85. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
  86. package/lib/commonjs/ui/utils/deliveryPlatform.js +58 -0
  87. package/lib/commonjs/ui/utils/deliveryPlatform.js.map +1 -0
  88. package/lib/commonjs/ui/utils/oauthReturn.js +33 -49
  89. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  90. package/lib/module/index.js +27 -4
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/notifications/deviceNotifications.js +414 -0
  93. package/lib/module/notifications/deviceNotifications.js.map +1 -0
  94. package/lib/module/ui/boot/runProviderColdBoot.js +51 -9
  95. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  96. package/lib/module/ui/client.js +0 -1
  97. package/lib/module/ui/client.js.map +1 -1
  98. package/lib/module/ui/components/OxyAccountDialogScreen.js +27 -4
  99. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  100. package/lib/module/ui/components/OxyAuthChooser.js +78 -1129
  101. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  102. package/lib/module/ui/components/OxyConsentScreen.js +50 -12
  103. package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
  104. package/lib/module/ui/components/OxyProvider.js +4 -4
  105. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  106. package/lib/module/ui/components/OxySignInButton.js +76 -42
  107. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  108. package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
  109. package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
  110. package/lib/module/ui/components/authChooser/AccountsMenuView.js +523 -0
  111. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  112. package/lib/module/ui/components/authChooser/SignInEntryView.js +85 -0
  113. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -0
  114. package/lib/module/ui/components/authChooser/SignInRequestView.js +101 -0
  115. package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -0
  116. package/lib/module/ui/components/authChooser/SignUpView.js +184 -0
  117. package/lib/module/ui/components/authChooser/SignUpView.js.map +1 -0
  118. package/lib/module/ui/components/authChooser/TroubleDisclosure.js +57 -0
  119. package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  120. package/lib/module/ui/components/authChooser/primitives.js +163 -0
  121. package/lib/module/ui/components/authChooser/primitives.js.map +1 -0
  122. package/lib/module/ui/components/authChooser/requestSurfaces.js +143 -0
  123. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -0
  124. package/lib/module/ui/components/authChooser/signInProgress.js +50 -0
  125. package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -0
  126. package/lib/module/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  127. package/lib/module/ui/components/authChooser/styles.js.map +1 -0
  128. package/lib/module/ui/components/authChooser/types.js +66 -0
  129. package/lib/module/ui/components/authChooser/types.js.map +1 -0
  130. package/lib/module/ui/components/authChooser/useUsernameAvailability.js +46 -0
  131. package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  132. package/lib/module/ui/context/OxyContext.js +208 -33
  133. package/lib/module/ui/context/OxyContext.js.map +1 -1
  134. package/lib/module/ui/context/commitSessionFlow.js +45 -0
  135. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  136. package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
  137. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  138. package/lib/module/ui/context/useOxyAccountGraph.js +13 -5
  139. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  140. package/lib/module/ui/hooks/useSwitchableAccounts.js +6 -1
  141. package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
  142. package/lib/module/ui/index.js +0 -1
  143. package/lib/module/ui/index.js.map +1 -1
  144. package/lib/module/ui/oauth/browserAuthTransport.js +167 -0
  145. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -0
  146. package/lib/module/ui/oauth/completeOAuthCode.js +75 -0
  147. package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -0
  148. package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
  149. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
  150. package/lib/module/ui/oauth/oauthHandshake.js +50 -0
  151. package/lib/module/ui/oauth/oauthHandshake.js.map +1 -0
  152. package/lib/module/ui/oauth/oauthPopup.js +268 -0
  153. package/lib/module/ui/oauth/oauthPopup.js.map +1 -0
  154. package/lib/module/ui/oauth/oauthPopupMessages.js +135 -0
  155. package/lib/module/ui/oauth/oauthPopupMessages.js.map +1 -0
  156. package/lib/module/ui/oauth/types.js +2 -0
  157. package/lib/module/ui/oauth/types.js.map +1 -0
  158. package/lib/module/ui/server.js +0 -2
  159. package/lib/module/ui/server.js.map +1 -1
  160. package/lib/module/ui/session/authStore.js +5 -75
  161. package/lib/module/ui/session/authStore.js.map +1 -1
  162. package/lib/module/ui/session/createSessionClient.js +11 -3
  163. package/lib/module/ui/session/createSessionClient.js.map +1 -1
  164. package/lib/module/ui/session/identityBinding.js +89 -0
  165. package/lib/module/ui/session/identityBinding.js.map +1 -0
  166. package/lib/module/ui/session/index.js +5 -2
  167. package/lib/module/ui/session/index.js.map +1 -1
  168. package/lib/module/ui/session/nativeSecureStorage.js +88 -0
  169. package/lib/module/ui/session/nativeSecureStorage.js.map +1 -0
  170. package/lib/module/ui/session/tokenTransport.js +11 -1
  171. package/lib/module/ui/session/tokenTransport.js.map +1 -1
  172. package/lib/module/ui/utils/crossOriginRestore.js +4 -3
  173. package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
  174. package/lib/module/ui/utils/deliveryPlatform.js +55 -0
  175. package/lib/module/ui/utils/deliveryPlatform.js.map +1 -0
  176. package/lib/module/ui/utils/oauthReturn.js +35 -50
  177. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  178. package/lib/typescript/commonjs/index.d.ts +9 -1
  179. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
  181. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +34 -2
  183. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/ui/client.d.ts +0 -1
  185. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +23 -29
  188. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/components/OxyConsentScreen.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +17 -12
  192. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
  194. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  196. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  198. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  200. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +34 -0
  202. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  204. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +55 -0
  206. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  208. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +26 -0
  210. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  211. package/lib/typescript/{module/ui/components/oxyAuthChooserStyles.d.ts → commonjs/ui/components/authChooser/styles.d.ts} +19 -1
  212. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +103 -0
  214. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  216. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
  219. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
  221. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +44 -1
  223. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +7 -1
  225. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/ui/index.d.ts +0 -1
  228. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +56 -0
  230. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts +49 -0
  232. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  234. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +50 -0
  236. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +83 -0
  238. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts +67 -0
  240. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/ui/oauth/types.d.ts +176 -0
  242. package/lib/typescript/commonjs/ui/oauth/types.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/ui/server.d.ts +0 -2
  244. package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/ui/session/authStore.d.ts +3 -7
  246. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +8 -1
  248. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +66 -0
  250. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/ui/session/index.d.ts +6 -2
  252. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +25 -0
  254. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +8 -1
  256. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/ui/types/navigation.d.ts +44 -0
  258. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts +33 -0
  261. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +11 -16
  263. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  264. package/lib/typescript/module/index.d.ts +9 -1
  265. package/lib/typescript/module/index.d.ts.map +1 -1
  266. package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
  267. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
  268. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +34 -2
  269. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/client.d.ts +0 -1
  271. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +23 -29
  274. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  275. package/lib/typescript/module/ui/components/OxyConsentScreen.d.ts.map +1 -1
  276. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  277. package/lib/typescript/module/ui/components/OxySignInButton.d.ts +17 -12
  278. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  279. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
  280. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  281. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  282. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  283. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  284. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  285. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  286. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  287. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +34 -0
  288. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  289. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  290. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  291. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +55 -0
  292. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -0
  293. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  294. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  295. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +26 -0
  296. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  297. package/lib/typescript/{commonjs/ui/components/oxyAuthChooserStyles.d.ts → module/ui/components/authChooser/styles.d.ts} +19 -1
  298. package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -0
  299. package/lib/typescript/module/ui/components/authChooser/types.d.ts +103 -0
  300. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -0
  301. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  302. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  303. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
  305. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
  307. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +44 -1
  309. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +7 -1
  311. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/index.d.ts +0 -1
  314. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +56 -0
  316. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  317. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts +49 -0
  318. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  319. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  320. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  321. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +50 -0
  322. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -0
  323. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +83 -0
  324. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -0
  325. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts +67 -0
  326. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  327. package/lib/typescript/module/ui/oauth/types.d.ts +176 -0
  328. package/lib/typescript/module/ui/oauth/types.d.ts.map +1 -0
  329. package/lib/typescript/module/ui/server.d.ts +0 -2
  330. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/session/authStore.d.ts +3 -7
  332. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/session/createSessionClient.d.ts +8 -1
  334. package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/session/identityBinding.d.ts +66 -0
  336. package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -0
  337. package/lib/typescript/module/ui/session/index.d.ts +6 -2
  338. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +25 -0
  340. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -0
  341. package/lib/typescript/module/ui/session/tokenTransport.d.ts +8 -1
  342. package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/types/navigation.d.ts +44 -0
  344. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts +33 -0
  347. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts.map +1 -0
  348. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +11 -16
  349. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  350. package/package.json +18 -10
  351. package/src/index.ts +51 -5
  352. package/src/notifications/deviceNotifications.ts +458 -0
  353. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
  354. package/src/ui/boot/runProviderColdBoot.ts +83 -13
  355. package/src/ui/client.ts +0 -1
  356. package/src/ui/components/OxyAccountDialogScreen.tsx +33 -4
  357. package/src/ui/components/OxyAuthChooser.tsx +102 -1231
  358. package/src/ui/components/OxyConsentScreen.tsx +56 -13
  359. package/src/ui/components/OxyProvider.tsx +4 -4
  360. package/src/ui/components/OxySignInButton.tsx +119 -78
  361. package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
  362. package/src/ui/components/__tests__/OxyConsentScreen.test.tsx +27 -0
  363. package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
  364. package/src/ui/components/authChooser/SignInEntryView.tsx +121 -0
  365. package/src/ui/components/authChooser/SignInRequestView.tsx +130 -0
  366. package/src/ui/components/authChooser/SignUpView.tsx +174 -0
  367. package/src/ui/components/authChooser/TroubleDisclosure.tsx +73 -0
  368. package/src/ui/components/authChooser/primitives.tsx +144 -0
  369. package/src/ui/components/authChooser/requestSurfaces.tsx +120 -0
  370. package/src/ui/components/authChooser/signInProgress.ts +54 -0
  371. package/src/ui/components/{oxyAuthChooserStyles.ts → authChooser/styles.ts} +18 -0
  372. package/src/ui/components/authChooser/types.ts +120 -0
  373. package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
  374. package/src/ui/context/OxyContext.tsx +226 -24
  375. package/src/ui/context/__tests__/commitSessionFlow.test.ts +102 -0
  376. package/src/ui/context/commitSessionFlow.ts +64 -0
  377. package/src/ui/context/hooks/useAuthOperations.ts +26 -1
  378. package/src/ui/context/oxyContextTypes.ts +45 -1
  379. package/src/ui/context/useOxyAccountGraph.ts +19 -5
  380. package/src/ui/hooks/useSwitchableAccounts.ts +12 -1
  381. package/src/ui/index.ts +0 -1
  382. package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +335 -0
  383. package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +142 -0
  384. package/src/ui/oauth/__tests__/oauthPopup.test.ts +352 -0
  385. package/src/ui/oauth/__tests__/oauthPopupMessages.test.ts +189 -0
  386. package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +174 -0
  387. package/src/ui/oauth/browserAuthTransport.ts +193 -0
  388. package/src/ui/oauth/completeOAuthCode.ts +93 -0
  389. package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
  390. package/src/ui/oauth/oauthHandshake.ts +74 -0
  391. package/src/ui/oauth/oauthPopup.ts +277 -0
  392. package/src/ui/oauth/oauthPopupMessages.ts +136 -0
  393. package/src/ui/oauth/types.ts +150 -0
  394. package/src/ui/server.ts +0 -2
  395. package/src/ui/session/__tests__/createSessionClient.test.ts +26 -0
  396. package/src/ui/session/__tests__/tokenTransport.test.ts +34 -0
  397. package/src/ui/session/authStore.ts +5 -89
  398. package/src/ui/session/createSessionClient.ts +15 -2
  399. package/src/ui/session/identityBinding.ts +116 -0
  400. package/src/ui/session/index.ts +6 -2
  401. package/src/ui/session/nativeSecureStorage.ts +98 -0
  402. package/src/ui/session/tokenTransport.ts +14 -1
  403. package/src/ui/types/navigation.ts +44 -1
  404. package/src/ui/utils/__tests__/crossOriginRestore.test.ts +17 -0
  405. package/src/ui/utils/crossOriginRestore.ts +7 -6
  406. package/src/ui/utils/deliveryPlatform.ts +65 -0
  407. package/src/ui/utils/oauthReturn.ts +38 -62
  408. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  409. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  410. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  411. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  412. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  413. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  414. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  415. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  416. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  417. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  418. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  419. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  420. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  421. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  422. package/lib/commonjs/ui/components/FontLoader.js +0 -35
  423. package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
  424. package/lib/commonjs/ui/components/FontLoader.native.js +0 -88
  425. package/lib/commonjs/ui/components/FontLoader.native.js.map +0 -1
  426. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +0 -1
  427. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  428. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  429. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  430. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  431. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  432. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  433. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  434. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  435. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  436. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  437. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  438. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  439. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  440. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  441. package/lib/module/ui/components/FontLoader.js +0 -29
  442. package/lib/module/ui/components/FontLoader.js.map +0 -1
  443. package/lib/module/ui/components/FontLoader.native.js +0 -83
  444. package/lib/module/ui/components/FontLoader.native.js.map +0 -1
  445. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +0 -1
  446. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +0 -24
  447. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +0 -1
  448. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts +0 -13
  449. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts.map +0 -1
  450. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  451. package/lib/typescript/module/ui/components/FontLoader.d.ts +0 -24
  452. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +0 -1
  453. package/lib/typescript/module/ui/components/FontLoader.native.d.ts +0 -13
  454. package/lib/typescript/module/ui/components/FontLoader.native.d.ts.map +0 -1
  455. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  456. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  457. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  458. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  459. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  460. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  461. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  462. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  463. package/src/ui/components/FontLoader.native.tsx +0 -88
  464. package/src/ui/components/FontLoader.tsx +0 -27
@@ -0,0 +1,523 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The signed-in Oxy account MENU (`accounts` view) — a Google-account-menu-style
5
+ * full menu built entirely with NativeWind `className` (the dynamic per-account
6
+ * accent hex is the one inline style NativeWind cannot express). Structure:
7
+ *
8
+ * - HERO on its own chrome-free block: the current account's large pressable
9
+ * avatar (with a camera badge to change the photo), the greeting, the account
10
+ * address, and a "Manage your Oxy account" pill.
11
+ * - SWITCH ACCOUNT: a disclosure row whose corner animates from pill to card as
12
+ * the other switchable accounts + "Add another account" + "Manage accounts on
13
+ * this device" reveal beneath it.
14
+ * - OXY STORAGE: cloud + used/total + a composition meter + Upgrade / Manage chips.
15
+ * - MENU rows: Your data in Oxy · Oxy settings · Help & feedback · Sign out —
16
+ * Bloom's grouped section, the same component every other SDK settings surface
17
+ * uses, not a local row copy.
18
+ * - FOOTER: Privacy Policy · Terms of Service.
19
+ *
20
+ * All three blocks share ONE rhythm taken from that grouped section: a 12px
21
+ * content inset, a 12px gap after the leading element, 16px between blocks, and
22
+ * a 16px trailing chevron column.
23
+ *
24
+ * Collapse state is a plain `useState` toggled in the row's press handler — no
25
+ * effect hook, no derived-from-props sync.
26
+ */
27
+
28
+ import { Fragment, useCallback, useState } from 'react';
29
+ import { Pressable, View } from 'react-native';
30
+ import Animated, { Extrapolation, interpolate, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
31
+ import { MaterialCommunityIcons } from '@expo/vector-icons';
32
+ import { Avatar } from '@oxyhq/bloom/avatar';
33
+ import { AvatarGroup } from '@oxyhq/bloom/avatar-group';
34
+ import { Button } from '@oxyhq/bloom/button';
35
+ import { PressableScale } from '@oxyhq/bloom/pressable-scale';
36
+ import { CompositionBar } from '@oxyhq/bloom/composition-bar';
37
+ import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
38
+ import { Text } from '@oxyhq/bloom/typography';
39
+ import { getNormalizedUserHandle } from '@oxyhq/core';
40
+ import AvatarCameraBadge from "../AvatarCameraBadge.js";
41
+ import { HoverPressable } from "./primitives.js";
42
+ import { authChooserStyles as styles } from "./styles.js";
43
+ import { resolveAccentHex } from "./types.js";
44
+
45
+ /**
46
+ * Leading glyph for the rows that live in a Bloom grouped section (the MENU
47
+ * block) and for the storage card's cloud, which lines its title up with them.
48
+ * It is Bloom's OWN icon-slot size: `SettingsListItem` reserves a fixed 20px
49
+ * leading column and Bloom is consumed exactly as it ships, so a menu glyph
50
+ * larger than this would overhang into the row's title.
51
+ */
52
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
53
+ const ROW_ICON_SIZE = 20;
54
+ /**
55
+ * The switch card's two corner states. Collapsed it is one row and reads as a
56
+ * PILL; opened it is a card holding rows, on the same 16px corner the Bloom
57
+ * grouped section below it uses. Interpolated across the reveal, never snapped.
58
+ */
59
+ const SWITCH_CARD_PILL_RADIUS = 999;
60
+ const SWITCH_CARD_RADIUS = 16;
61
+ /**
62
+ * The fraction of the reveal over which the corner resolves. The corner is a
63
+ * FASTER gesture than the reveal — it has to be finished before the rows read as
64
+ * rows, or the card still looks like a pill while a list falls out of it — so it
65
+ * is clamped to the reveal's opening fraction instead of tracking it end to end.
66
+ * Measured in a browser against the 240ms reveal: the corner reaches its card
67
+ * value ~120ms in, with the list only ~20% revealed, and (mirrored) the pill is
68
+ * back ~250ms into the close, with the list already down to ~0.
69
+ */
70
+ const SWITCH_CARD_RADIUS_SETTLE = 0.2;
71
+ /** Duration of the switch-list reveal. */
72
+ const SWITCH_REVEAL_MS = 240;
73
+ /** Diameter of an account row's avatar in the switch list (own markup). */
74
+ const SWITCH_AVATAR_SIZE = 36;
75
+ /** Glyph inside a bordered affordance badge, sized to the avatar it stands in for. */
76
+ const BADGE_GLYPH_SIZE = 19;
77
+ /** The hero block's large current-account avatar. */
78
+ const HERO_AVATAR_SIZE = 72;
79
+ /** Avatars shown in the switch row's facepile before it collapses into `+N`. */
80
+ const FACEPILE_MAX = 2;
81
+ /** Facepile avatar diameter — one clear step down from a switch-list avatar. */
82
+ const FACEPILE_AVATAR_SIZE = 32;
83
+ /**
84
+ * Facepile overlap. Well under Bloom's `size / 3` default: the stack draws the
85
+ * FIRST item on top, so a deep overlap would bury the trailing `+N` chip's own
86
+ * label under the avatar before it.
87
+ */
88
+ const FACEPILE_OVERLAP = 4;
89
+
90
+ /**
91
+ * The hero's address line, shown under the "Hi, <name>!" greeting: the account's
92
+ * canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
93
+ * synthesizes a `username@oxy.so` address (the identity contract forbids it) — a
94
+ * non-Oxy or missing email falls back to `getNormalizedUserHandle`.
95
+ */
96
+ function heroAddressLine(account) {
97
+ if (account.email?.toLowerCase().endsWith('@oxy.so')) {
98
+ return account.email;
99
+ }
100
+ const handle = getNormalizedUserHandle(account.user);
101
+ return handle ? `@${handle}` : null;
102
+ }
103
+
104
+ /**
105
+ * `bytes` → `"11.6 GB"`. Whole plan sizes read as whole numbers (`"17 GB"`, not
106
+ * `"17.0 GB"`), and anything ≥ 100 GB drops the decimal entirely.
107
+ */
108
+ function formatStorageGb(bytes) {
109
+ const gb = bytes / 1024 ** 3;
110
+ if (gb >= 100 || Number.isInteger(gb)) return `${Math.round(gb)} GB`;
111
+ return `${gb.toFixed(1)} GB`;
112
+ }
113
+ const AccountsMenuView = ({
114
+ snapshot,
115
+ theme,
116
+ t,
117
+ handlers,
118
+ storage,
119
+ menu
120
+ }) => {
121
+ const [expanded, setExpanded] = useState(false);
122
+ // Measured natural height of the switch list, so the reveal animates to an
123
+ // exact height (and the content below reflows down smoothly) instead of a
124
+ // guessed max. The measuring wrapper is style-based, NOT className'd — on
125
+ // RN-Web `onLayout` never fires for className'd Views (see AGENTS.md).
126
+ const [listContentHeight, setListContentHeight] = useState(0);
127
+ // 0 = collapsed, 1 = expanded. Set imperatively in the toggle handler (no
128
+ // effect hook). On RN-Web there is no worklets plugin, so every shared value a
129
+ // mapper reads MUST be in its deps array or it freezes on the first frame
130
+ // (AGENTS.md "Reanimated (web)").
131
+ const listProgress = useSharedValue(0);
132
+ const listStyle = useAnimatedStyle(() => ({
133
+ height: listProgress.value * listContentHeight,
134
+ opacity: listProgress.value
135
+ }), [listProgress, listContentHeight]);
136
+ const chevronStyle = useAnimatedStyle(() => ({
137
+ transform: [{
138
+ rotate: `${listProgress.value * 180}deg`
139
+ }]
140
+ }), [listProgress]);
141
+ // Collapsed, the switch card is a single row and reads as a PILL; opened, it
142
+ // becomes a card holding rows and takes the grouped-section corner. The corner
143
+ // is driven off the SAME `listProgress` as the reveal — but clamped to its
144
+ // opening fraction, so it resolves early instead of trailing the rows.
145
+ const switchCardStyle = useAnimatedStyle(() => ({
146
+ borderRadius: interpolate(listProgress.value, [0, SWITCH_CARD_RADIUS_SETTLE], [SWITCH_CARD_PILL_RADIUS, SWITCH_CARD_RADIUS], Extrapolation.CLAMP)
147
+ }), [listProgress]);
148
+ // `CompositionBar` ships as an interactive breakdown: a selected segment
149
+ // replaces its hint line with that segment's readout. Tapping the selected one
150
+ // again clears it.
151
+ const [storageSegment, setStorageSegment] = useState(null);
152
+ const toggleStorageSegment = useCallback(key => setStorageSegment(previous => previous === key ? null : key), []);
153
+ const toggleExpanded = useCallback(() => {
154
+ const next = !expanded;
155
+ setExpanded(next);
156
+ listProgress.value = withTiming(next ? 1 : 0, {
157
+ duration: SWITCH_REVEAL_MS
158
+ });
159
+ }, [expanded, listProgress]);
160
+ if (snapshot.loading && snapshot.accounts.length === 0) {
161
+ return /*#__PURE__*/_jsxs(View, {
162
+ className: "items-center justify-center gap-space-12 py-space-24",
163
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
164
+ name: "loading",
165
+ size: 24,
166
+ color: theme.colors.textSecondary
167
+ }), /*#__PURE__*/_jsx(Text, {
168
+ className: "text-body text-text-secondary text-center",
169
+ children: t('accountSwitcher.loading')
170
+ })]
171
+ });
172
+ }
173
+ const switchingDisabled = snapshot.switchingAccountId !== null;
174
+ const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
175
+ const others = current ? snapshot.accounts.filter(account => account.accountId !== current.accountId) : snapshot.accounts;
176
+ const currentAccent = current ? resolveAccentHex(current.color, theme.colors.primary) : theme.colors.primary;
177
+ const currentAddress = current ? heroAddressLine(current) : null;
178
+ // The switch list repeats the CURRENT account (first, ringed) — unlike the old
179
+ // compact header it is not represented anywhere else once the hero moved out
180
+ // of the card, and the list is where you switch back to it.
181
+ const switchableAccounts = current ? [current, ...others] : others;
182
+ const facepile = switchableAccounts.map(account => ({
183
+ id: account.accountId,
184
+ uri: account.avatarUrl ?? undefined,
185
+ displayName: account.displayName
186
+ }));
187
+
188
+ // Used vs free is a two-part COMPOSITION (the parts always fill the bar), not
189
+ // a progress value — exactly what Bloom's `CompositionBar` models. Both colors
190
+ // are theme tokens, so the bar is correct in light and dark.
191
+ const storageCategories = storage ? [{
192
+ key: 'used',
193
+ name: t('accountMenu.storage.used'),
194
+ amount: storage.usedBytes,
195
+ color: theme.colors.primary
196
+ }, {
197
+ key: 'free',
198
+ name: t('accountMenu.storage.free'),
199
+ amount: Math.max(0, storage.limitBytes - storage.usedBytes),
200
+ color: theme.colors.contrast50
201
+ }] : [];
202
+ const usageLabel = storage ? t('accountMenu.storage.usage', {
203
+ used: formatStorageGb(storage.usedBytes),
204
+ total: formatStorageGb(storage.limitBytes)
205
+ }) : t('accountMenu.storage.unavailable');
206
+
207
+ // The switch list body, revealed under the "Switch account" row. Own markup,
208
+ // not a Bloom grouped section: this is not a list of settings rows and the
209
+ // component is not a card container. It mirrors the section's rhythm by hand —
210
+ // 12px content inset, 12px after the avatar, a hairline between rows — and
211
+ // draws those hairlines INSIDE the animated clip, so a collapsed list never
212
+ // strands one against the header row.
213
+ const listItems = /*#__PURE__*/_jsxs(_Fragment, {
214
+ children: [switchableAccounts.map((account, index) => {
215
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
216
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
217
+ return /*#__PURE__*/_jsxs(Fragment, {
218
+ children: [index > 0 ? /*#__PURE__*/_jsx(View, {
219
+ className: "h-px bg-border opacity-30 ml-space-12"
220
+ }) : null, /*#__PURE__*/_jsxs(HoverPressable, {
221
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${switchingDisabled ? ' opacity-60' : ''}`,
222
+ hoverClassName: "bg-fill-secondary",
223
+ onPress: () => handlers.onSwitch(account.accountId),
224
+ disabled: switchingDisabled,
225
+ accessibilityRole: "button",
226
+ accessibilityLabel: account.displayName,
227
+ children: [/*#__PURE__*/_jsxs(View, {
228
+ children: [/*#__PURE__*/_jsx(Avatar, {
229
+ source: account.avatarUrl ?? undefined,
230
+ variant: "thumb",
231
+ name: account.displayName,
232
+ size: SWITCH_AVATAR_SIZE
233
+ }), account.isCurrent ? /*#__PURE__*/_jsx(View, {
234
+ style: [styles.currentAvatarRing, {
235
+ borderColor: accent
236
+ }],
237
+ pointerEvents: "none"
238
+ }) : null]
239
+ }), /*#__PURE__*/_jsxs(View, {
240
+ className: "flex-1 min-w-0",
241
+ children: [/*#__PURE__*/_jsx(Text, {
242
+ className: "text-body font-semibold text-text",
243
+ numberOfLines: 1,
244
+ children: account.displayName
245
+ }), account.email ? /*#__PURE__*/_jsx(Text, {
246
+ className: "text-caption text-text-secondary",
247
+ numberOfLines: 1,
248
+ children: account.email
249
+ }) : null]
250
+ }), isSwitching ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
251
+ name: "loading",
252
+ size: 20,
253
+ color: accent
254
+ }) : null]
255
+ })]
256
+ }, account.accountId);
257
+ }), /*#__PURE__*/_jsx(View, {
258
+ className: "h-px bg-border opacity-30 ml-space-12"
259
+ }), /*#__PURE__*/_jsx(AccountAffordanceRow, {
260
+ icon: "plus",
261
+ label: t('accountMenu.addAnother'),
262
+ onPress: handlers.onAdd,
263
+ disabled: switchingDisabled,
264
+ theme: theme
265
+ }), /*#__PURE__*/_jsx(View, {
266
+ className: "h-px bg-border opacity-30 ml-space-12"
267
+ }), /*#__PURE__*/_jsx(AccountAffordanceRow, {
268
+ icon: "account-multiple-outline",
269
+ label: t('accountSwitcher.manageOnDevice'),
270
+ onPress: handlers.onManage,
271
+ disabled: switchingDisabled,
272
+ theme: theme
273
+ })]
274
+ });
275
+ const manageLabel = t('accountMenu.manage');
276
+ const switchLabel = t('accountMenu.switchAccount');
277
+ return /*#__PURE__*/_jsxs(View, {
278
+ children: [/*#__PURE__*/_jsxs(View, {
279
+ style: styles.hero,
280
+ children: [current ? /*#__PURE__*/_jsxs(_Fragment, {
281
+ children: [/*#__PURE__*/_jsxs(PressableScale, {
282
+ onPress: handlers.onEditAvatar,
283
+ accessibilityRole: "button",
284
+ accessibilityLabel: t('editProfile.changeAvatar'),
285
+ style: styles.heroAvatarPressable,
286
+ children: [/*#__PURE__*/_jsx(Avatar, {
287
+ source: current.avatarUrl ?? undefined,
288
+ name: current.displayName,
289
+ size: HERO_AVATAR_SIZE
290
+ }), /*#__PURE__*/_jsx(View, {
291
+ style: [styles.heroAvatarRing, {
292
+ borderColor: currentAccent
293
+ }],
294
+ pointerEvents: "none"
295
+ }), /*#__PURE__*/_jsx(AvatarCameraBadge, {})]
296
+ }), /*#__PURE__*/_jsxs(View, {
297
+ style: styles.heroNameBlock,
298
+ children: [/*#__PURE__*/_jsx(Text, {
299
+ style: [styles.heroGreeting, {
300
+ color: theme.colors.text
301
+ }],
302
+ numberOfLines: 2,
303
+ children: t('accountMenu.greeting', {
304
+ name: current.displayName
305
+ })
306
+ }), currentAddress ? /*#__PURE__*/_jsx(Text, {
307
+ style: [styles.heroAddress, {
308
+ color: theme.colors.textSecondary
309
+ }],
310
+ numberOfLines: 1,
311
+ children: currentAddress
312
+ }) : null]
313
+ })]
314
+ }) : null, /*#__PURE__*/_jsx(Button, {
315
+ variant: "secondary",
316
+ size: "small",
317
+ onPress: handlers.onManage,
318
+ accessibilityLabel: manageLabel,
319
+ children: manageLabel
320
+ })]
321
+ }), /*#__PURE__*/_jsxs(Animated.View, {
322
+ className: "bg-fill overflow-hidden mb-space-16",
323
+ style: switchCardStyle,
324
+ children: [/*#__PURE__*/_jsxs(HoverPressable, {
325
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${switchingDisabled ? ' opacity-60' : ''}`,
326
+ hoverClassName: "bg-fill-secondary",
327
+ onPress: toggleExpanded,
328
+ disabled: switchingDisabled,
329
+ accessibilityRole: "button"
330
+ // The ARIA prop, not `accessibilityState`: react-native-web 0.21
331
+ // forwards only this one, and RN maps it to
332
+ // `accessibilityState.expanded` natively — so the disclosure state
333
+ // reaches assistive tech on BOTH platforms.
334
+ ,
335
+ "aria-expanded": expanded,
336
+ accessibilityLabel: switchLabel,
337
+ children: [/*#__PURE__*/_jsx(Text, {
338
+ className: "flex-1 text-body text-text",
339
+ numberOfLines: 1,
340
+ children: switchLabel
341
+ }), expanded ? null : /*#__PURE__*/_jsx(AvatarGroup, {
342
+ items: facepile,
343
+ layout: "stack",
344
+ size: FACEPILE_AVATAR_SIZE,
345
+ max: FACEPILE_MAX,
346
+ overlap: FACEPILE_OVERLAP,
347
+ variant: "thumb",
348
+ showInitials: true,
349
+ ringColor: theme.colors.card
350
+ }), /*#__PURE__*/_jsx(View, {
351
+ style: [styles.chevronCircle, {
352
+ backgroundColor: theme.colors.contrast50
353
+ }],
354
+ children: /*#__PURE__*/_jsx(Animated.View, {
355
+ style: chevronStyle,
356
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
357
+ name: "chevron-down",
358
+ size: 20,
359
+ color: theme.colors.text
360
+ })
361
+ })
362
+ })]
363
+ }), /*#__PURE__*/_jsx(Animated.View, {
364
+ style: [styles.collapse, listStyle],
365
+ pointerEvents: expanded ? 'auto' : 'none',
366
+ children: /*#__PURE__*/_jsx(View, {
367
+ style: styles.collapseMeasure,
368
+ onLayout: event => setListContentHeight(event.nativeEvent.layout.height),
369
+ children: /*#__PURE__*/_jsx(View, {
370
+ children: listItems
371
+ })
372
+ })
373
+ })]
374
+ }), /*#__PURE__*/_jsxs(View, {
375
+ className: "bg-fill rounded-[16px] overflow-hidden mb-space-16 px-space-12 py-[10px] gap-space-12",
376
+ children: [/*#__PURE__*/_jsxs(View, {
377
+ className: "flex-row items-center gap-space-12 min-h-[24px]",
378
+ children: [/*#__PURE__*/_jsx(View, {
379
+ className: "w-[20px] items-center",
380
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
381
+ name: "cloud-outline",
382
+ size: ROW_ICON_SIZE,
383
+ color: theme.colors.textSecondary
384
+ })
385
+ }), /*#__PURE__*/_jsx(Text, {
386
+ className: "flex-1 text-body font-semibold text-text",
387
+ numberOfLines: 1,
388
+ children: t('accountMenu.storage.title')
389
+ })]
390
+ }), /*#__PURE__*/_jsx(CompositionBar, {
391
+ categories: storageCategories,
392
+ selectedKey: storageSegment,
393
+ onSelect: toggleStorageSegment,
394
+ hintLabel: usageLabel,
395
+ formatReadout: (bytes, percent) => `${formatStorageGb(bytes)} · ${percent}%`
396
+ }), /*#__PURE__*/_jsxs(View, {
397
+ className: "flex-row gap-space-8",
398
+ children: [/*#__PURE__*/_jsx(StorageChip, {
399
+ label: t('accountMenu.storage.upgrade'),
400
+ onPress: menu.onUpgradeStorage
401
+ }), /*#__PURE__*/_jsx(StorageChip, {
402
+ label: t('accountMenu.storage.manage'),
403
+ onPress: menu.onManageStorage
404
+ })]
405
+ })]
406
+ }), /*#__PURE__*/_jsxs(SettingsListGroup, {
407
+ children: [/*#__PURE__*/_jsx(SettingsListItem, {
408
+ icon: /*#__PURE__*/_jsx(MenuIcon, {
409
+ name: "tray-arrow-down",
410
+ theme: theme
411
+ }),
412
+ title: t('accountMenu.data'),
413
+ onPress: menu.onOpenData
414
+ }), /*#__PURE__*/_jsx(SettingsListItem, {
415
+ icon: /*#__PURE__*/_jsx(MenuIcon, {
416
+ name: "cog-outline",
417
+ theme: theme
418
+ }),
419
+ title: t('accountMenu.settings'),
420
+ onPress: menu.onOpenSettings
421
+ }), /*#__PURE__*/_jsx(SettingsListItem, {
422
+ icon: /*#__PURE__*/_jsx(MenuIcon, {
423
+ name: "help-circle-outline",
424
+ theme: theme
425
+ }),
426
+ title: t('accountMenu.help'),
427
+ onPress: menu.onHelp
428
+ }), /*#__PURE__*/_jsx(SettingsListItem, {
429
+ icon: /*#__PURE__*/_jsx(MenuIcon, {
430
+ name: "logout",
431
+ theme: theme
432
+ }),
433
+ title: t('accountMenu.signOut'),
434
+ onPress: menu.onSignOut,
435
+ showChevron: false
436
+ })]
437
+ }), /*#__PURE__*/_jsxs(View, {
438
+ className: "flex-row items-center justify-center gap-space-12 px-space-12 pb-space-8",
439
+ children: [/*#__PURE__*/_jsx(Pressable, {
440
+ onPress: menu.onPrivacy,
441
+ accessibilityRole: "link",
442
+ children: /*#__PURE__*/_jsx(Text, {
443
+ className: "text-bodySmall text-text-secondary",
444
+ children: t('accountMenu.privacy')
445
+ })
446
+ }), /*#__PURE__*/_jsx(Text, {
447
+ className: "text-bodySmall text-text-tertiary",
448
+ children: "\xB7"
449
+ }), /*#__PURE__*/_jsx(Pressable, {
450
+ onPress: menu.onTerms,
451
+ accessibilityRole: "link",
452
+ children: /*#__PURE__*/_jsx(Text, {
453
+ className: "text-bodySmall text-text-secondary",
454
+ children: t('accountMenu.terms')
455
+ })
456
+ })]
457
+ })]
458
+ });
459
+ };
460
+
461
+ /**
462
+ * An account-list AFFORDANCE row ("Add another account", "Manage accounts on
463
+ * this device") — a bordered circle sized to the avatar it stands in for, so its
464
+ * label lands on the same line as every account name above it. Own markup, like
465
+ * the account rows it closes: this list is not a Bloom grouped section.
466
+ */
467
+ const AccountAffordanceRow = ({
468
+ icon,
469
+ label,
470
+ onPress,
471
+ disabled,
472
+ theme
473
+ }) => /*#__PURE__*/_jsxs(HoverPressable, {
474
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${disabled ? ' opacity-60' : ''}`,
475
+ hoverClassName: "bg-fill-secondary",
476
+ onPress: onPress,
477
+ disabled: disabled,
478
+ accessibilityRole: "button",
479
+ accessibilityLabel: label,
480
+ children: [/*#__PURE__*/_jsx(View, {
481
+ className: "w-[36px] h-[36px] items-center justify-center rounded-radius-max border border-border",
482
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
483
+ name: icon,
484
+ size: BADGE_GLYPH_SIZE,
485
+ color: theme.colors.textSecondary
486
+ })
487
+ }), /*#__PURE__*/_jsx(Text, {
488
+ className: "flex-1 text-body font-semibold text-text",
489
+ numberOfLines: 1,
490
+ children: label
491
+ })]
492
+ });
493
+
494
+ /**
495
+ * The leading glyph for a grouped-section menu row, sized to Bloom's 20px icon
496
+ * column so the icons, the storage block's cloud and every row title align.
497
+ */
498
+ const MenuIcon = ({
499
+ name,
500
+ theme
501
+ }) => /*#__PURE__*/_jsx(MaterialCommunityIcons, {
502
+ name: name,
503
+ size: ROW_ICON_SIZE,
504
+ color: theme.colors.textSecondary
505
+ });
506
+
507
+ /** A storage action chip — a bordered pill on the sheet background. */
508
+ const StorageChip = ({
509
+ label,
510
+ onPress
511
+ }) => /*#__PURE__*/_jsx(HoverPressable, {
512
+ baseClassName: "rounded-radius-max border border-border bg-bg py-[9px] px-[14px]",
513
+ hoverClassName: "bg-fill-secondary",
514
+ onPress: onPress,
515
+ accessibilityRole: "button",
516
+ accessibilityLabel: label,
517
+ children: /*#__PURE__*/_jsx(Text, {
518
+ className: "text-bodySmall font-semibold text-text",
519
+ children: label
520
+ })
521
+ });
522
+ export default AccountsMenuView;
523
+ //# sourceMappingURL=AccountsMenuView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Fragment","useCallback","useState","Pressable","View","Animated","Extrapolation","interpolate","useAnimatedStyle","useSharedValue","withTiming","MaterialCommunityIcons","Avatar","AvatarGroup","Button","PressableScale","CompositionBar","SettingsListGroup","SettingsListItem","Text","getNormalizedUserHandle","AvatarCameraBadge","HoverPressable","authChooserStyles","styles","resolveAccentHex","jsx","_jsx","jsxs","_jsxs","_Fragment","ROW_ICON_SIZE","SWITCH_CARD_PILL_RADIUS","SWITCH_CARD_RADIUS","SWITCH_CARD_RADIUS_SETTLE","SWITCH_REVEAL_MS","SWITCH_AVATAR_SIZE","BADGE_GLYPH_SIZE","HERO_AVATAR_SIZE","FACEPILE_MAX","FACEPILE_AVATAR_SIZE","FACEPILE_OVERLAP","heroAddressLine","account","email","toLowerCase","endsWith","handle","user","formatStorageGb","bytes","gb","Number","isInteger","Math","round","toFixed","AccountsMenuView","snapshot","theme","t","handlers","storage","menu","expanded","setExpanded","listContentHeight","setListContentHeight","listProgress","listStyle","height","value","opacity","chevronStyle","transform","rotate","switchCardStyle","borderRadius","CLAMP","storageSegment","setStorageSegment","toggleStorageSegment","key","previous","toggleExpanded","next","duration","loading","accounts","length","className","children","name","size","color","colors","textSecondary","switchingDisabled","switchingAccountId","current","find","isCurrent","others","filter","accountId","currentAccent","primary","currentAddress","switchableAccounts","facepile","map","id","uri","avatarUrl","undefined","displayName","storageCategories","amount","usedBytes","max","limitBytes","contrast50","usageLabel","used","total","listItems","index","accent","isSwitching","baseClassName","hoverClassName","onPress","onSwitch","disabled","accessibilityRole","accessibilityLabel","source","variant","style","currentAvatarRing","borderColor","pointerEvents","numberOfLines","AccountAffordanceRow","icon","label","onAdd","onManage","manageLabel","switchLabel","hero","onEditAvatar","heroAvatarPressable","heroAvatarRing","heroNameBlock","heroGreeting","text","heroAddress","items","layout","overlap","showInitials","ringColor","card","chevronCircle","backgroundColor","collapse","collapseMeasure","onLayout","event","nativeEvent","categories","selectedKey","onSelect","hintLabel","formatReadout","percent","StorageChip","onUpgradeStorage","onManageStorage","MenuIcon","title","onOpenData","onOpenSettings","onHelp","onSignOut","showChevron","onPrivacy","onTerms"],"sourceRoot":"../../../../../src","sources":["ui/components/authChooser/AccountsMenuView.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACvD,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,OAAOC,QAAQ,IACbC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,sBAAsB,QAAQ,oBAAoB;AAC3D,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,WAAW,QAA8B,2BAA2B;AAC7E,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,cAAc,QAAQ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BAAiB;MACvByD,KAAK,EAAEnC,KAAK,CAACoC,MAAM,CAACC;IAAc,CACnC;EAAC,CACE,CAAC,eACPrE,IAAA,CAACR,IAAI;IAACuE,SAAS,EAAC,0CAA0C;IAACoD,aAAa,EAAE,CAAE;IAAAnD,QAAA,EACzEsD;EAAK,CACF,CAAC;AAAA,CACO,CACjB;;AAED;AACA;AACA;AACA;AACA,MAAMmC,QAGJ,GAAGA,CAAC;EAAExF,IAAI;EAAEjC;AAAM,CAAC,kBACnBhC,IAAA,CAAChB,sBAAsB;EAACiF,IAAI,EAAEA,IAAK;EAACC,IAAI,EAAE9D,aAAc;EAAC+D,KAAK,EAAEnC,KAAK,CAACoC,MAAM,CAACC;AAAc,CAAE,CAC9F;;AAED;AACA,MAAMiF,WAA6D,GAAGA,CAAC;EAAEhC,KAAK;EAAEd;AAAQ,CAAC,kBACvFxG,IAAA,CAACL,cAAc;EACb2G,aAAa,EAAC,kEAAkE;EAChFC,cAAc,EAAC,mBAAmB;EAClCC,OAAO,EAAEA,OAAQ;EACjBG,iBAAiB,EAAC,QAAQ;EAC1BC,kBAAkB,EAAEU,KAAM;EAAAtD,QAAA,eAE1BhE,IAAA,CAACR,IAAI;IAACuE,SAAS,EAAC,wCAAwC;IAAAC,QAAA,EAAEsD;EAAK,CAAO;AAAC,CACzD,CACjB;AAED,eAAexF,gBAAgB","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The sign-in ENTRY (`signin` / `add` views) — ONE primary action.
5
+ *
6
+ * Issue #691, Phase 5: the normal experience presents no menu of authentication
7
+ * methods. The user sees "Continue with Oxy"; Oxy — not the user — then picks
8
+ * how the request reaches their Commons identity, and the request surface shows
9
+ * honest progress. Everything else (a QR from another device, a passkey on this
10
+ * device, getting Commons, creating an account) lives behind "Having trouble?".
11
+ *
12
+ * Existing accounts still render ABOVE the CTA: "continue as one of these" is a
13
+ * choice of WHO, not of HOW, so it is not one of the competing method buttons
14
+ * the issue removes.
15
+ *
16
+ * On web this view is transient — the container auto-starts the flow the instant
17
+ * the view is reached, because the request surface (QR, or "Check Commons on
18
+ * your phone") IS the primary route there, never something behind a tap.
19
+ */
20
+
21
+ import { View } from 'react-native';
22
+ import { Button } from '@oxyhq/bloom/button';
23
+ import TroubleDisclosure from "./TroubleDisclosure.js";
24
+ import { AccountRow, Dividerish, SubtleLink } from "./primitives.js";
25
+ import { authChooserStyles as styles } from "./styles.js";
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
+ const SignInEntryView = ({
28
+ snapshot,
29
+ theme,
30
+ t,
31
+ handlers,
32
+ onContinueWithOxy,
33
+ alternatives
34
+ }) => {
35
+ // The entry has no chosen route yet, so nothing here can have failed: the
36
+ // alternatives stay behind the disclosure unconditionally.
37
+ const troubleActions = [{
38
+ key: 'scan-qr-link',
39
+ label: t('accountSwitcher.scanQr'),
40
+ onPress: alternatives.onShowQr
41
+ }, ...(alternatives.passkeyAvailable ? [{
42
+ key: 'passkey-signin-link',
43
+ label: alternatives.passkeyPending ? t('accountSwitcher.passkeySigningIn') : t('accountSwitcher.useIdentityOnDevice'),
44
+ onPress: alternatives.onSignInWithPasskey,
45
+ disabled: alternatives.passkeyPending
46
+ }] : []), {
47
+ key: 'get-commons-link',
48
+ label: t('accountSwitcher.getCommons'),
49
+ onPress: alternatives.onGetCommons
50
+ }];
51
+ return /*#__PURE__*/_jsxs(View, {
52
+ style: styles.signInBlock,
53
+ children: [snapshot.accounts.length > 0 ? /*#__PURE__*/_jsxs(View, {
54
+ style: styles.rows,
55
+ children: [snapshot.accounts.map(account => /*#__PURE__*/_jsx(AccountRow, {
56
+ account: account,
57
+ theme: theme,
58
+ switching: snapshot.switchingAccountId === account.accountId,
59
+ disabled: snapshot.switchingAccountId !== null,
60
+ onPress: () => handlers.onSwitch(account.accountId)
61
+ }, account.accountId)), /*#__PURE__*/_jsx(Dividerish, {
62
+ theme: theme,
63
+ label: t('signin.or')
64
+ })]
65
+ }) : null, /*#__PURE__*/_jsx(Button, {
66
+ variant: "primary",
67
+ onPress: onContinueWithOxy,
68
+ style: styles.primaryButton,
69
+ testID: "continue-with-oxy",
70
+ children: t('accountSwitcher.continueWithOxy')
71
+ }), /*#__PURE__*/_jsx(SubtleLink, {
72
+ label: t('signin.createAccountLink'),
73
+ theme: theme,
74
+ onPress: alternatives.onCreateAccount,
75
+ testID: "create-account-link"
76
+ }), /*#__PURE__*/_jsx(TroubleDisclosure, {
77
+ actions: troubleActions,
78
+ revealed: false,
79
+ theme: theme,
80
+ t: t
81
+ })]
82
+ });
83
+ };
84
+ export default SignInEntryView;
85
+ //# sourceMappingURL=SignInEntryView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","Button","TroubleDisclosure","AccountRow","Dividerish","SubtleLink","authChooserStyles","styles","jsx","_jsx","jsxs","_jsxs","SignInEntryView","snapshot","theme","t","handlers","onContinueWithOxy","alternatives","troubleActions","key","label","onPress","onShowQr","passkeyAvailable","passkeyPending","onSignInWithPasskey","disabled","onGetCommons","style","signInBlock","children","accounts","length","rows","map","account","switching","switchingAccountId","accountId","onSwitch","variant","primaryButton","testID","onCreateAccount","actions","revealed"],"sourceRoot":"../../../../../src","sources":["ui/components/authChooser/SignInEntryView.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,qBAAqB;AAE5C,OAAOC,iBAAiB,MAAM,wBAAqB;AACnD,SAASC,UAAU,EAAEC,UAAU,EAAEC,UAAU,QAAQ,iBAAc;AACjE,SAASC,iBAAiB,IAAIC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmBvD,MAAMC,eAA+C,GAAGA,CAAC;EACvDC,QAAQ;EACRC,KAAK;EACLC,CAAC;EACDC,QAAQ;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