@oxy.so/services 4.0.7 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/assets/assets/signIn/slide-1.jpg +0 -0
  3. package/lib/commonjs/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
  4. package/lib/commonjs/assets/assets/signIn/slide-2.jpg +0 -0
  5. package/lib/commonjs/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
  6. package/lib/commonjs/assets/assets/signIn/slide-3.jpg +0 -0
  7. package/lib/commonjs/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
  8. package/lib/commonjs/assets/assets/signIn/slide-4.jpg +0 -0
  9. package/lib/commonjs/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
  10. package/lib/commonjs/assets/signIn/slide-1.jpg +0 -0
  11. package/lib/commonjs/assets/signIn/slide-2.jpg +0 -0
  12. package/lib/commonjs/assets/signIn/slide-3.jpg +0 -0
  13. package/lib/commonjs/assets/signIn/slide-4.jpg +0 -0
  14. package/lib/commonjs/index.js +45 -8
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +11 -58
  17. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxyAuthChooser.js +36 -44
  19. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  20. package/lib/commonjs/ui/components/OxyProvider.js +0 -2
  21. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  22. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  23. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +29 -8
  24. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  25. package/lib/commonjs/ui/components/authChooser/primitives.js +7 -52
  26. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
  27. package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js +1 -7
  28. package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js.map +1 -1
  29. package/lib/commonjs/ui/components/authChooser/styles.js +0 -31
  30. package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -1
  31. package/lib/commonjs/ui/components/authChooser/types.js +2 -2
  32. package/lib/commonjs/ui/components/oauthNavigation.js +1 -1
  33. package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +161 -0
  34. package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js.map +1 -0
  35. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +111 -0
  36. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -0
  37. package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +160 -0
  38. package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -0
  39. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +371 -0
  40. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -0
  41. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +78 -0
  42. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -0
  43. package/lib/commonjs/ui/components/signIn/artwork.js +21 -0
  44. package/lib/commonjs/ui/components/signIn/artwork.js.map +1 -0
  45. package/lib/commonjs/ui/components/signIn/passkeyError.js +46 -0
  46. package/lib/commonjs/ui/components/signIn/passkeyError.js.map +1 -0
  47. package/lib/commonjs/ui/components/signIn/signInMethods.js +46 -0
  48. package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -0
  49. package/lib/commonjs/ui/context/OxyContext.js +16 -16
  50. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  51. package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
  52. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  53. package/lib/commonjs/ui/hooks/accountDialogSnapshot.js +15 -1
  54. package/lib/commonjs/ui/hooks/accountDialogSnapshot.js.map +1 -1
  55. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +1 -3
  56. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -1
  57. package/lib/commonjs/ui/oauth/browserAuthTransport.js +11 -4
  58. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
  59. package/lib/commonjs/ui/oauth/oauthHandshake.js +3 -0
  60. package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -1
  61. package/lib/commonjs/ui/oauth/oauthPopup.js +2 -3
  62. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
  63. package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -3
  64. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
  66. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  67. package/lib/commonjs/ui/session/authStore.js +0 -21
  68. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  69. package/lib/commonjs/ui/utils/accountDeletionHandoff.js +1 -1
  70. package/lib/commonjs/ui/utils/accountDeletionHandoff.js.map +1 -1
  71. package/lib/module/assets/assets/signIn/slide-1.jpg +0 -0
  72. package/lib/module/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
  73. package/lib/module/assets/assets/signIn/slide-2.jpg +0 -0
  74. package/lib/module/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
  75. package/lib/module/assets/assets/signIn/slide-3.jpg +0 -0
  76. package/lib/module/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
  77. package/lib/module/assets/assets/signIn/slide-4.jpg +0 -0
  78. package/lib/module/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
  79. package/lib/module/assets/signIn/slide-1.jpg +0 -0
  80. package/lib/module/assets/signIn/slide-2.jpg +0 -0
  81. package/lib/module/assets/signIn/slide-3.jpg +0 -0
  82. package/lib/module/assets/signIn/slide-4.jpg +0 -0
  83. package/lib/module/index.js +7 -6
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/ui/components/OxyAccountDialogScreen.js +14 -59
  86. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  87. package/lib/module/ui/components/OxyAuthChooser.js +37 -45
  88. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  89. package/lib/module/ui/components/OxyProvider.js +0 -2
  90. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  91. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  92. package/lib/module/ui/components/authChooser/AccountsMenuView.js +21 -2
  93. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  94. package/lib/module/ui/components/authChooser/primitives.js +1 -44
  95. package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
  96. package/lib/module/ui/components/authChooser/signInFailureMessage.js +1 -7
  97. package/lib/module/ui/components/authChooser/signInFailureMessage.js.map +1 -1
  98. package/lib/module/ui/components/authChooser/styles.js +0 -31
  99. package/lib/module/ui/components/authChooser/styles.js.map +1 -1
  100. package/lib/module/ui/components/authChooser/types.js +2 -2
  101. package/lib/module/ui/components/oauthNavigation.js +1 -1
  102. package/lib/module/ui/components/signIn/InlineCommonsQr.js +157 -0
  103. package/lib/module/ui/components/signIn/InlineCommonsQr.js.map +1 -0
  104. package/lib/module/ui/components/signIn/OxyAccountPicker.js +106 -0
  105. package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -0
  106. package/lib/module/ui/components/signIn/OxyAuthScreen.js +151 -0
  107. package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -0
  108. package/lib/module/ui/components/signIn/OxySignInPanel.js +366 -0
  109. package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -0
  110. package/lib/module/ui/components/signIn/OxySignUpPanel.js +75 -0
  111. package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -0
  112. package/lib/module/ui/components/signIn/artwork.js +16 -0
  113. package/lib/module/ui/components/signIn/artwork.js.map +1 -0
  114. package/lib/module/ui/components/signIn/passkeyError.js +40 -0
  115. package/lib/module/ui/components/signIn/passkeyError.js.map +1 -0
  116. package/lib/module/ui/components/signIn/signInMethods.js +42 -0
  117. package/lib/module/ui/components/signIn/signInMethods.js.map +1 -0
  118. package/lib/module/ui/context/OxyContext.js +17 -17
  119. package/lib/module/ui/context/OxyContext.js.map +1 -1
  120. package/lib/module/ui/context/commitSessionFlow.js +0 -42
  121. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  122. package/lib/module/ui/hooks/accountDialogSnapshot.js +14 -1
  123. package/lib/module/ui/hooks/accountDialogSnapshot.js.map +1 -1
  124. package/lib/module/ui/hooks/useDeviceSwitcher.js +3 -5
  125. package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -1
  126. package/lib/module/ui/oauth/browserAuthTransport.js +11 -4
  127. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
  128. package/lib/module/ui/oauth/oauthHandshake.js +3 -0
  129. package/lib/module/ui/oauth/oauthHandshake.js.map +1 -1
  130. package/lib/module/ui/oauth/oauthPopup.js +2 -3
  131. package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
  132. package/lib/module/ui/screens/ManageAccountScreen.js +3 -4
  133. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  134. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
  135. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  136. package/lib/module/ui/session/authStore.js +1 -22
  137. package/lib/module/ui/session/authStore.js.map +1 -1
  138. package/lib/module/ui/utils/accountDeletionHandoff.js +2 -2
  139. package/lib/module/ui/utils/accountDeletionHandoff.js.map +1 -1
  140. package/lib/typescript/assets/signIn/slide-1.jpg.d.ts +3 -0
  141. package/lib/typescript/assets/signIn/slide-2.jpg.d.ts +3 -0
  142. package/lib/typescript/assets/signIn/slide-3.jpg.d.ts +3 -0
  143. package/lib/typescript/assets/signIn/slide-4.jpg.d.ts +3 -0
  144. package/lib/typescript/commonjs/index.d.ts +8 -2
  145. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +5 -12
  148. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +1 -1
  151. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +0 -19
  154. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
  156. package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts +0 -31
  158. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +3 -3
  160. package/lib/typescript/commonjs/ui/components/oauthNavigation.d.ts +1 -1
  161. package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
  162. package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
  164. package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
  166. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +43 -0
  168. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
  170. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts +8 -0
  172. package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts +16 -0
  174. package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +39 -0
  176. package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
  179. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +8 -9
  181. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  182. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +7 -1
  183. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +9 -0
  186. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +3 -0
  188. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +2 -3
  190. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/ui/session/authStore.d.ts +0 -30
  193. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/ui/types/navigation.d.ts +0 -26
  195. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  196. package/lib/typescript/module/index.d.ts +8 -2
  197. package/lib/typescript/module/index.d.ts.map +1 -1
  198. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  199. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +5 -12
  200. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  202. package/lib/typescript/module/ui/components/ProfileButton.d.ts +1 -1
  203. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  204. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +0 -19
  206. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
  207. package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
  208. package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
  209. package/lib/typescript/module/ui/components/authChooser/styles.d.ts +0 -31
  210. package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -1
  211. package/lib/typescript/module/ui/components/authChooser/types.d.ts +3 -3
  212. package/lib/typescript/module/ui/components/oauthNavigation.d.ts +1 -1
  213. package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
  214. package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
  215. package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
  216. package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
  217. package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
  218. package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
  219. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +43 -0
  220. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
  221. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
  222. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
  223. package/lib/typescript/module/ui/components/signIn/artwork.d.ts +8 -0
  224. package/lib/typescript/module/ui/components/signIn/artwork.d.ts.map +1 -0
  225. package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts +16 -0
  226. package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts.map +1 -0
  227. package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +39 -0
  228. package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts.map +1 -0
  229. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  230. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
  231. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +8 -9
  233. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +7 -1
  235. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
  237. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +9 -0
  238. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  239. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +3 -0
  240. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -1
  241. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +2 -3
  242. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
  243. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  244. package/lib/typescript/module/ui/session/authStore.d.ts +0 -30
  245. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  246. package/lib/typescript/module/ui/types/navigation.d.ts +0 -26
  247. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  248. package/package.json +4 -7
  249. package/src/assets/signIn/slide-1.jpg +0 -0
  250. package/src/assets/signIn/slide-1.jpg.d.ts +3 -0
  251. package/src/assets/signIn/slide-2.jpg +0 -0
  252. package/src/assets/signIn/slide-2.jpg.d.ts +3 -0
  253. package/src/assets/signIn/slide-3.jpg +0 -0
  254. package/src/assets/signIn/slide-3.jpg.d.ts +3 -0
  255. package/src/assets/signIn/slide-4.jpg +0 -0
  256. package/src/assets/signIn/slide-4.jpg.d.ts +3 -0
  257. package/src/index.ts +16 -7
  258. package/src/ui/components/OxyAccountDialogScreen.tsx +11 -72
  259. package/src/ui/components/OxyAuthChooser.tsx +37 -53
  260. package/src/ui/components/OxyProvider.tsx +0 -2
  261. package/src/ui/components/ProfileButton.tsx +1 -4
  262. package/src/ui/components/authChooser/AccountsMenuView.tsx +28 -1
  263. package/src/ui/components/authChooser/primitives.tsx +1 -39
  264. package/src/ui/components/authChooser/signInFailureMessage.ts +1 -7
  265. package/src/ui/components/authChooser/styles.ts +0 -31
  266. package/src/ui/components/authChooser/types.ts +3 -3
  267. package/src/ui/components/oauthNavigation.ts +1 -1
  268. package/src/ui/components/signIn/InlineCommonsQr.tsx +135 -0
  269. package/src/ui/components/signIn/OxyAccountPicker.tsx +129 -0
  270. package/src/ui/components/signIn/OxyAuthScreen.tsx +123 -0
  271. package/src/ui/components/signIn/OxySignInPanel.tsx +392 -0
  272. package/src/ui/components/signIn/OxySignUpPanel.tsx +86 -0
  273. package/src/ui/components/signIn/artwork.ts +13 -0
  274. package/src/ui/components/signIn/passkeyError.ts +44 -0
  275. package/src/ui/components/signIn/signInMethods.ts +51 -0
  276. package/src/ui/context/OxyContext.tsx +21 -18
  277. package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
  278. package/src/ui/context/commitSessionFlow.ts +0 -61
  279. package/src/ui/context/oxyContextTypes.ts +9 -9
  280. package/src/ui/hooks/accountDialogSnapshot.ts +20 -1
  281. package/src/ui/hooks/useDeviceSwitcher.ts +3 -11
  282. package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +21 -0
  283. package/src/ui/oauth/browserAuthTransport.ts +14 -4
  284. package/src/ui/oauth/oauthHandshake.ts +4 -1
  285. package/src/ui/oauth/oauthPopup.ts +2 -3
  286. package/src/ui/screens/ManageAccountScreen.tsx +3 -4
  287. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
  288. package/src/ui/session/authStore.ts +0 -37
  289. package/src/ui/types/navigation.ts +0 -26
  290. package/src/ui/utils/accountDeletionHandoff.ts +2 -2
  291. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +0 -132
  292. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +0 -1
  293. package/lib/commonjs/ui/components/authChooser/SignUpView.js +0 -77
  294. package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +0 -1
  295. package/lib/commonjs/ui/components/passkeyHubPopup.js +0 -33
  296. package/lib/commonjs/ui/components/passkeyHubPopup.js.map +0 -1
  297. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
  298. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
  299. package/lib/module/ui/components/authChooser/SignInEntryView.js +0 -127
  300. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +0 -1
  301. package/lib/module/ui/components/authChooser/SignUpView.js +0 -73
  302. package/lib/module/ui/components/authChooser/SignUpView.js.map +0 -1
  303. package/lib/module/ui/components/passkeyHubPopup.js +0 -29
  304. package/lib/module/ui/components/passkeyHubPopup.js.map +0 -1
  305. package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
  306. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
  307. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +0 -39
  308. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
  309. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +0 -31
  310. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +0 -1
  311. package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts +0 -23
  312. package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts.map +0 -1
  313. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  314. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  315. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +0 -39
  316. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
  317. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +0 -31
  318. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +0 -1
  319. package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts +0 -23
  320. package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts.map +0 -1
  321. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
  322. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
  323. package/src/ui/components/authChooser/SignInEntryView.tsx +0 -157
  324. package/src/ui/components/authChooser/SignUpView.tsx +0 -76
  325. package/src/ui/components/passkeyHubPopup.ts +0 -28
  326. package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
@@ -142,42 +142,11 @@ export const authChooserStyles = StyleSheet.create({
142
142
  fontSize: 14,
143
143
  fontWeight: '600'
144
144
  },
145
- signInBlock: {
146
- width: '100%'
147
- },
148
145
  primaryButton: {
149
146
  width: '100%',
150
147
  borderRadius: 14,
151
148
  marginTop: 8
152
149
  },
153
- secondaryButton: {
154
- width: '100%',
155
- borderRadius: 14,
156
- marginTop: 10
157
- },
158
- usernameInput: {
159
- width: '100%',
160
- borderWidth: StyleSheet.hairlineWidth,
161
- borderRadius: 14,
162
- paddingVertical: 12,
163
- paddingHorizontal: 14,
164
- fontSize: 16,
165
- marginTop: 8
166
- },
167
- dividerRow: {
168
- flexDirection: 'row',
169
- alignItems: 'center',
170
- width: '100%',
171
- marginVertical: 14
172
- },
173
- dividerLine: {
174
- flex: 1,
175
- height: StyleSheet.hairlineWidth
176
- },
177
- dividerText: {
178
- marginHorizontal: 12,
179
- fontSize: 13
180
- },
181
150
  centeredBlock: {
182
151
  alignItems: 'center',
183
152
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","collapse","overflow","collapseMeasure","hero","paddingTop","paddingBottom","currentAvatarRing","position","top","left","right","bottom","heroAvatarPressable","heroAvatarRing","heroNameBlock","heroGreeting","textAlign","heroAddress","chevronCircle","height","justifyContent","footerLink","alignSelf","linkText","signInBlock","primaryButton","secondaryButton","usernameInput","dividerRow","marginVertical","dividerLine","dividerText","marginHorizontal","centeredBlock","mutedText","qrHeadline","qrPlate","backgroundColor","troubleActions","troubleDisclosure","troubleTrigger"],"sourceRoot":"../../../../../src","sources":["ui/components/authChooser/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,MAAMC,WAAW,GAAG,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,UAAU,CAACG,MAAM,CAAC;EACjDC,IAAI,EAAE;IACJC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAAC;EACDC,UAAU,EAAE;IACVC,aAAa,EA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C;EACD6B,UAAU,EAAE;IACV/C,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBJ,KAAK,EAAE,MAAM;IACbmD,cAAc,EAAE;EAClB,CAAC;EACDC,WAAW,EAAE;IACXrC,IAAI,EAAE,CAAC;IACP0B,MAAM,EAAE9C,UAAU,CAACW;EACrB,CAAC;EACD+C,WAAW,EAAE;IACXC,gBAAgB,EAAE,EAAE;IACpBpC,QAAQ,EAAE;EACZ,CAAC;EACDqC,aAAa,EAAE;IACbnD,UAAU,EAAE,QAAQ;IACpBsC,cAAc,EAAE,QAAQ;IACxBzC,GAAG,EAAE,EAAE;IACPO,eAAe,EAAE;EACnB,CAAC;EACDgD,SAAS,EAAE;IACTtC,QAAQ,EAAE,EAAE;IACZoB,SAAS,EAAE;EACb,CAAC;EACDmB,UAAU,EAAE;IACVvC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBmB,SAAS,EAAE;EACb,CAAC;EACDoB,OAAO,EAAE;IACP7C,OAAO,EAAE,EAAE;IACXN,YAAY,EAAE,EAAE;IAChBoD,eAAe,EAAE/D;EACnB,CAAC;EACD;AACF;AACA;AACA;AACA;EACEgE,cAAc,EAAE;IACd5D,KAAK,EAAE,MAAM;IACbI,UAAU,EAAE;EACd,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;EACEyD,iBAAiB,EAAE;IACjB7D,KAAK,EAAE,MAAM;IACbqB,SAAS,EAAE;EACb,CAAC;EACD;EACAyC,cAAc,EAAE;IACdlB,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","collapse","overflow","collapseMeasure","hero","paddingTop","paddingBottom","currentAvatarRing","position","top","left","right","bottom","heroAvatarPressable","heroAvatarRing","heroNameBlock","heroGreeting","textAlign","heroAddress","chevronCircle","height","justifyContent","footerLink","alignSelf","linkText","primaryButton","centeredBlock","mutedText","qrHeadline","qrPlate","backgroundColor","troubleActions","troubleDisclosure","troubleTrigger"],"sourceRoot":"../../../../../src","sources":["ui/components/authChooser/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,MAAMC,WAAW,GAAG,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,UAAU,CAACG,MAAM,CAAC;EACjDC,IAAI,EAAE;IACJC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAAC;EACDC,UAAU,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBH,GAAG,EAAE,EAAE;IACPI,WAAW,EAAEV,UAAU,CAACW,aAAa;IACrCC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,WAAW,EAAE;IACXC,OAAO,EAAE;EACX,CAAC;EACDC,UAAU,EAAE;IACVL,YAAY,EAAE,IAAI;IAClBF,WAAW,EAAE,CAAC;IACdQ,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDC,SAAS,EAAE;IACTF,QAAQ,EAAE,IAAI;IACdG,SAAS,EAAE;EACb,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE;IACRC,QAAQ,EAAE;EACZ,CAAC;EACDC,eAAe,EAAE;IACfxB,KAAK,EAAE;EACT,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;EACEyB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AAE;IACR3B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD2B,aAAa,EAAE;IACb9C,KAAK,EAAE,MAAM;IACbO,YAAY,EAAE,EAAE;IAChBc,SAAS,EAAE;EACb,CAAC;EACD0B,aAAa,EAAE;IACb3C,UAAU,EAAE,QAAQ;IACpBsC,cAAc,EAAE,QAAQ;IACxBzC,GAAG,EAAE,EAAE;IACPO,eAAe,EAAE;EACnB,CAAC;EACDwC,SAAS,EAAE;IACT9B,QAAQ,EAAE,EAAE;IACZoB,SAAS,EAAE;EACb,CAAC;EACDW,UAAU,EAAE;IACV/B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBmB,SAAS,EAAE;EACb,CAAC;EACDY,OAAO,EAAE;IACPrC,OAAO,EAAE,EAAE;IACXN,YAAY,EAAE,EAAE;IAChB4C,eAAe,EAAEvD;EACnB,CAAC;EACD;AACF;AACA;AACA;AACA;EACEwD,cAAc,EAAE;IACdpD,KAAK,EAAE,MAAM;IACbI,UAAU,EAAE;EACd,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;EACEiD,iBAAiB,EAAE;IACjBrD,KAAK,EAAE,MAAM;IACbqB,SAAS,EAAE;EACb,CAAC;EACD;EACAiC,cAAc,EAAE;IACdV,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -42,8 +42,8 @@ import { APP_COLOR_NAMES, APP_COLOR_PRESETS } from '@oxy.so/bloom/theme';
42
42
  /**
43
43
  * Where a passkey sign-in or sign-up can run from the current surface.
44
44
  *
45
- * `'hub'` = web: it runs at the identity origin (`id.oxy.so`) in a popup, on
46
- * every web origin, first-party or not.
45
+ * `'hub'` = web: it runs in auth.oxy.so's window over the app
46
+ * (`continueOnAuth`), on every web origin.
47
47
  * `'none'` = native, where Commons owns identity.
48
48
  */
49
49
 
@@ -28,7 +28,7 @@ import { logger, persistOAuthReturnPath } from '@oxy.so/core';
28
28
  * (see `normalizeOAuthRedirectUri`), so the IdP always returns the tab to `/`,
29
29
  * and the return handlers restore this path. Doing it here rather than at each
30
30
  * call site is deliberate: every web authorize redirect — silent restore,
31
- * interactive sign-in, the passkey hub — funnels through this function, so a
31
+ * interactive sign-in, `continueOnAuth` — funnels through this function, so a
32
32
  * new flow cannot forget to preserve the page the visitor came from.
33
33
  */
34
34
  export function redirectToAuthorize(url) {
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The sign-in entry's embedded QR, over the split card's photo carousel: scan
5
+ * it with Commons on a phone and this screen is signed in.
6
+ *
7
+ * It owns one QR-only request (`controller.startInlineQr()`): started the
8
+ * first time the block is actually laid out on screen — never while its column
9
+ * is hidden below `md` — renewed when it expires, and withdrawn when the block
10
+ * goes away while it is still approvable. It never pushes to a phone or opens Commons —
11
+ * the person did not ask for either by opening the screen. Any other sign-in
12
+ * they choose supersedes it like any new attempt.
13
+ *
14
+ * Anti-phishing: the plate encodes `signIn.qrPayload` and renders nothing
15
+ * derived from it; the approver resolves the app server-side.
16
+ */
17
+
18
+ import { useEffect, useState } from 'react';
19
+ import { ActivityIndicator, StyleSheet, View } from 'react-native';
20
+ import QRCode from 'react-native-qrcode-svg';
21
+ import { Button } from '@oxy.so/bloom/button';
22
+ import { RiCheckboxCircleLine } from '@oxy.so/bloom/icons/RiCheckboxCircleLine';
23
+ import { RiRefreshLine } from '@oxy.so/bloom/icons/RiRefreshLine';
24
+ import { useTheme } from '@oxy.so/bloom/theme';
25
+ import { Text } from '@oxy.so/bloom/typography';
26
+ import { useI18n } from "../../hooks/useI18n.js";
27
+ import { useAccountDialogSnapshot } from "../../hooks/accountDialogSnapshot.js";
28
+
29
+ /** High-contrast, un-themed on purpose: scan reliability. */
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
+ const QR_PLATE_BG = '#FFFFFF';
32
+ const QR_FOREGROUND = '#000000';
33
+ const QR_SIZE = 112;
34
+ const PLATE_PADDING = 8;
35
+ const PLATE_SIZE = QR_SIZE + PLATE_PADDING * 2;
36
+ export const InlineCommonsQr = ({
37
+ controller
38
+ }) => {
39
+ const theme = useTheme();
40
+ const {
41
+ t
42
+ } = useI18n();
43
+ const {
44
+ signIn
45
+ } = useAccountDialogSnapshot(controller);
46
+ const live = signIn.inline && (signIn.phase === 'starting' || signIn.phase === 'waiting');
47
+ const expired = signIn.inline && signIn.phase === 'error' && signIn.failure === 'expired';
48
+
49
+ // Laid out with a size only where its column shows (`display: none` below
50
+ // `md` lays out empty), so that is when a request is worth having.
51
+ const [shown, setShown] = useState(false);
52
+
53
+ // One request for as long as the block is on screen. Withdrawn on the way
54
+ // out only while it is still ours and still approvable: an attempt the
55
+ // person started meanwhile (a passkey window, "Continue with Oxy") is theirs.
56
+ useEffect(() => {
57
+ if (!controller || !shown) return;
58
+ const {
59
+ signIn: current
60
+ } = controller.getSnapshot();
61
+ if (!(current.inline && (current.phase === 'starting' || current.phase === 'waiting'))) {
62
+ void controller.startInlineQr();
63
+ }
64
+ return () => {
65
+ const {
66
+ signIn: last
67
+ } = controller.getSnapshot();
68
+ if (last.inline && (last.phase === 'starting' || last.phase === 'waiting')) controller.cancelSignIn();
69
+ };
70
+ }, [controller, shown]);
71
+
72
+ // A code only lives a few minutes; an expired one is replaced, not reported.
73
+ useEffect(() => {
74
+ if (controller && expired) void controller.startInlineQr();
75
+ }, [controller, expired]);
76
+ let plate;
77
+ if (signIn.inline && signIn.progress === 'identity-confirmed') {
78
+ plate = /*#__PURE__*/_jsx(RiCheckboxCircleLine, {
79
+ size: "3xl",
80
+ fill: theme.colors.success
81
+ });
82
+ } else if (live && signIn.qrPayload && signIn.progress !== 'confirming-identity') {
83
+ plate = /*#__PURE__*/_jsx(QRCode, {
84
+ value: signIn.qrPayload,
85
+ size: QR_SIZE,
86
+ backgroundColor: QR_PLATE_BG,
87
+ color: QR_FOREGROUND
88
+ });
89
+ } else if (live || expired || signIn.inline && signIn.phase === 'completed') {
90
+ plate = /*#__PURE__*/_jsx(ActivityIndicator, {
91
+ size: "large",
92
+ color: QR_FOREGROUND
93
+ });
94
+ } else {
95
+ // Failed for a reason renewing will not fix by itself, or superseded and
96
+ // then withdrawn: one press for a new code.
97
+ plate = /*#__PURE__*/_jsx(Button, {
98
+ appearance: "plain",
99
+ tone: "neutral",
100
+ size: "sm",
101
+ iconOnly: true,
102
+ leadingIcon: RiRefreshLine,
103
+ accessibilityLabel: t('signin.qr.renew'),
104
+ onPress: () => void controller?.startInlineQr(),
105
+ testID: "inline-qr-renew"
106
+ });
107
+ }
108
+ return /*#__PURE__*/_jsxs(View, {
109
+ style: styles.block,
110
+ testID: "inline-commons-qr",
111
+ onLayout: event => {
112
+ if (event.nativeEvent.layout.width > 0) setShown(true);
113
+ },
114
+ children: [/*#__PURE__*/_jsx(View, {
115
+ style: [styles.plate, {
116
+ borderColor: theme.colors.border
117
+ }],
118
+ children: plate
119
+ }), /*#__PURE__*/_jsx(Text, {
120
+ style: [styles.caption, styles.captionOnMedia],
121
+ children: t('signin.qr.caption')
122
+ })]
123
+ });
124
+ };
125
+ const styles = StyleSheet.create({
126
+ block: {
127
+ width: PLATE_SIZE,
128
+ alignItems: 'center',
129
+ gap: 6
130
+ },
131
+ plate: {
132
+ width: PLATE_SIZE,
133
+ height: PLATE_SIZE,
134
+ padding: PLATE_PADDING,
135
+ borderRadius: 12,
136
+ borderWidth: StyleSheet.hairlineWidth,
137
+ backgroundColor: QR_PLATE_BG,
138
+ alignItems: 'center',
139
+ justifyContent: 'center'
140
+ },
141
+ caption: {
142
+ fontSize: 12,
143
+ lineHeight: 16,
144
+ textAlign: 'center'
145
+ },
146
+ captionOnMedia: {
147
+ color: '#FFFFFF',
148
+ fontWeight: '500',
149
+ textShadowColor: 'rgba(0, 0, 0, 0.6)',
150
+ textShadowOffset: {
151
+ width: 0,
152
+ height: 1
153
+ },
154
+ textShadowRadius: 4
155
+ }
156
+ });
157
+ //# sourceMappingURL=InlineCommonsQr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","ActivityIndicator","StyleSheet","View","QRCode","Button","RiCheckboxCircleLine","RiRefreshLine","useTheme","Text","useI18n","useAccountDialogSnapshot","jsx","_jsx","jsxs","_jsxs","QR_PLATE_BG","QR_FOREGROUND","QR_SIZE","PLATE_PADDING","PLATE_SIZE","InlineCommonsQr","controller","theme","t","signIn","live","inline","phase","expired","failure","shown","setShown","current","getSnapshot","startInlineQr","last","cancelSignIn","plate","progress","size","fill","colors","success","qrPayload","value","backgroundColor","color","appearance","tone","iconOnly","leadingIcon","accessibilityLabel","onPress","testID","style","styles","block","onLayout","event","nativeEvent","layout","width","children","borderColor","border","caption","captionOnMedia","create","alignItems","gap","height","padding","borderRadius","borderWidth","hairlineWidth","justifyContent","fontSize","lineHeight","textAlign","fontWeight","textShadowColor","textShadowOffset","textShadowRadius"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/InlineCommonsQr.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,iBAAiB,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAClE,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,oBAAoB,QAAQ,0CAA0C;AAC/E,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI,QAAQ,0BAA0B;AAE/C,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,wBAAwB,QAAQ,sCAAmC;;AAE5E;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,WAAW,GAAG,SAAS;AAC7B,MAAMC,aAAa,GAAG,SAAS;AAC/B,MAAMC,OAAO,GAAG,GAAG;AACnB,MAAMC,aAAa,GAAG,C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,EAAE;EACb,CAAC;EACDZ,cAAc,EAAE;IACdpB,KAAK,EAAE,SAAS;IAChBiC,UAAU,EAAE,KAAK;IACjBC,eAAe,EAAE,oBAAoB;IACrCC,gBAAgB,EAAE;MAAEpB,KAAK,EAAE,CAAC;MAAES,MAAM,EAAE;IAAE,CAAC;IACzCY,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * "Choose an account" — every `principal acting as account` pair on this
5
+ * device, then "Use another account".
6
+ *
7
+ * The front screen of sign-in on a returning device, in the account dialog and
8
+ * on every auth.oxy.so page that asks WHO (sign-in, OAuth authorize, device
9
+ * approval, MCP linking). Presentational: the host decides what choosing a row
10
+ * means — a switch, a "Continue as" sign-in, or activating the pair before an
11
+ * OAuth consent — and passes the pair back, never an account id, which cannot
12
+ * say whose route was chosen.
13
+ */
14
+
15
+ import { Pressable, StyleSheet, View } from 'react-native';
16
+ import { RiArrowRightSLine } from '@oxy.so/bloom/icons/RiArrowRightSLine';
17
+ import { RiUserAddLine } from '@oxy.so/bloom/icons/RiUserAddLine';
18
+ import { useTheme } from '@oxy.so/bloom/theme';
19
+ import { Text } from '@oxy.so/bloom/typography';
20
+ import { showsPrincipalHeaders } from '@oxy.so/core';
21
+ import { useI18n } from "../../hooks/useI18n.js";
22
+ import { AccountRow } from "../authChooser/primitives.js";
23
+ import { authChooserStyles } from "../authChooser/styles.js";
24
+ import { OxyAuthScreen, OxyAuthScreenHeader, OxyAuthTerms } from "./OxyAuthScreen.js";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
+ export const OxyAccountPicker = ({
27
+ principals,
28
+ appName,
29
+ onSelectContext,
30
+ onUseAnother,
31
+ pendingContextId = null,
32
+ isLoading = false,
33
+ signedOut = false
34
+ }) => {
35
+ const theme = useTheme();
36
+ const {
37
+ t
38
+ } = useI18n();
39
+ // Whose route a row is only needs naming once someone holds more than one
40
+ // account here — the same rule the account menu's group headers follow.
41
+ const namesTheOperator = showsPrincipalHeaders(principals);
42
+ return /*#__PURE__*/_jsxs(OxyAuthScreen, {
43
+ children: [/*#__PURE__*/_jsx(OxyAuthScreenHeader, {
44
+ title: t('signin.chooser.title'),
45
+ description: appName ? t('signin.chooser.subtitleToApp', {
46
+ app: appName
47
+ }) : t('signin.chooser.subtitle')
48
+ }), /*#__PURE__*/_jsxs(View, {
49
+ style: authChooserStyles.rows,
50
+ children: [principals.flatMap(principal => principal.contexts.map(context => /*#__PURE__*/_jsx(AccountRow, {
51
+ context: context,
52
+ operatedBy: namesTheOperator && context.isDelegated ? t('accountSwitcher.context.operatedBy', {
53
+ name: principal.displayName
54
+ }) : null,
55
+ continueAsLabel: signedOut ? t('signin.chooser.continueAs', {
56
+ name: context.handle ? `@${context.handle}` : context.displayName
57
+ }) : null,
58
+ theme: theme,
59
+ activating: pendingContextId === context.contextId,
60
+ disabled: isLoading,
61
+ onPress: () => onSelectContext(context)
62
+ }, context.contextId))), /*#__PURE__*/_jsxs(Pressable, {
63
+ onPress: onUseAnother,
64
+ disabled: isLoading,
65
+ accessibilityRole: "button",
66
+ accessibilityLabel: t('signin.chooser.useAnother'),
67
+ style: [authChooserStyles.accountRow, {
68
+ borderColor: theme.colors.border,
69
+ backgroundColor: theme.colors.card
70
+ }, isLoading ? authChooserStyles.rowDisabled : null],
71
+ testID: "use-another-account",
72
+ children: [/*#__PURE__*/_jsx(View, {
73
+ style: [styles.addGlyph, {
74
+ backgroundColor: theme.colors.backgroundSecondary
75
+ }],
76
+ children: /*#__PURE__*/_jsx(RiUserAddLine, {
77
+ size: "md",
78
+ fill: theme.colors.textSecondary
79
+ })
80
+ }), /*#__PURE__*/_jsx(Text, {
81
+ style: [authChooserStyles.rowName, styles.addLabel, {
82
+ color: theme.colors.text
83
+ }],
84
+ children: t('signin.chooser.useAnother')
85
+ }), /*#__PURE__*/_jsx(RiArrowRightSLine, {
86
+ size: "md",
87
+ fill: theme.colors.textSecondary
88
+ })]
89
+ })]
90
+ }), /*#__PURE__*/_jsx(OxyAuthTerms, {})]
91
+ });
92
+ };
93
+ const styles = StyleSheet.create({
94
+ // Matches `AccountRow`'s 40px avatar plus its 2px ring and 1px gap.
95
+ addGlyph: {
96
+ width: 46,
97
+ height: 46,
98
+ borderRadius: 23,
99
+ alignItems: 'center',
100
+ justifyContent: 'center'
101
+ },
102
+ addLabel: {
103
+ flex: 1
104
+ }
105
+ });
106
+ //# sourceMappingURL=OxyAccountPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Pressable","StyleSheet","View","RiArrowRightSLine","RiUserAddLine","useTheme","Text","showsPrincipalHeaders","useI18n","AccountRow","authChooserStyles","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthTerms","jsx","_jsx","jsxs","_jsxs","OxyAccountPicker","principals","appName","onSelectContext","onUseAnother","pendingContextId","isLoading","signedOut","theme","t","namesTheOperator","children","title","description","app","style","rows","flatMap","principal","contexts","map","context","operatedBy","isDelegated","name","displayName","continueAsLabel","handle","activating","contextId","disabled","onPress","accessibilityRole","accessibilityLabel","accountRow","borderColor","colors","border","backgroundColor","card","rowDisabled","testID","styles","addGlyph","backgroundSecondary","size","fill","textSecondary","rowName","addLabel","color","text","create","width","height","borderRadius","alignItems","justifyContent","flex"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAccountPicker.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,aAAa,QAAQ,mCAAmC;AACjE,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,qBAAqB,QAA4D,cAAc;AACxG,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,UAAU,QAAQ,8BAA2B;A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UAAAxC,QAAA,EACrFF,CAAC,CAAC,2BAA2B;QAAC,CAC3B,CAAC,eACPZ,IAAA,CAACZ,iBAAiB;UAAC4D,IAAI,EAAC,IAAI;UAACC,IAAI,EAAEtC,KAAK,CAAC4B,MAAM,CAACW;QAAc,CAAE,CAAC;MAAA,CACxD,CAAC;IAAA,CACR,CAAC,eACPlD,IAAA,CAACF,YAAY,IAAE,CAAC;EAAA,CACH,CAAC;AAEpB,CAAC;AAED,MAAM+C,MAAM,GAAG3D,UAAU,CAACqE,MAAM,CAAC;EAC/B;EACAT,QAAQ,EAAE;IACRU,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDR,QAAQ,EAAE;IACRS,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The shell every Oxy sign-in screen shares — the in-app account dialog and
5
+ * every page of the auth.oxy.so IdP render these, so the two cannot drift:
6
+ *
7
+ * header the Oxy mark (56), then the title (48/800, tight) and a 18px
8
+ * description, 8 apart
9
+ * screen blocks 24 apart, at most 448 wide
10
+ * split from `md`, Bloom `AuthCard`'s split base — max 880, radius 24,
11
+ * 1px border, two equal columns, the right one on the secondary
12
+ * surface; below `md` the right column is dropped, not stacked
13
+ * loading an indeterminate spinner holding the screen's height
14
+ * terms one centred caption linking the Terms of Service and Privacy Policy
15
+ *
16
+ * Layout is NativeWind `className` (breakpoints included). Type stays on
17
+ * Bloom `Text`'s own ramp through `style` — a `className` there drops its
18
+ * default family — and colours come from the Bloom theme.
19
+ */
20
+
21
+ import { ActivityIndicator, Linking, Text as RNText } from 'react-native';
22
+ import { View } from 'react-native-css/components';
23
+ import { useTheme } from '@oxy.so/bloom/theme';
24
+ import { Text } from '@oxy.so/bloom/typography';
25
+ import { useI18n } from "../../hooks/useI18n.js";
26
+ import { LogoIcon } from "../logo/LogoIcon.js";
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ const LOGO_HEIGHT = 56;
29
+ const TERMS_URL = 'https://oxy.so/company/transparency/policies/terms-of-service';
30
+ const PRIVACY_URL = 'https://oxy.so/company/transparency/policies/privacy';
31
+ const TITLE = {
32
+ fontSize: 48,
33
+ lineHeight: 48,
34
+ fontWeight: '800',
35
+ letterSpacing: -1.2
36
+ };
37
+ const DESCRIPTION = {
38
+ fontSize: 18,
39
+ lineHeight: 28
40
+ };
41
+ const TERMS = {
42
+ fontSize: 14,
43
+ lineHeight: 20,
44
+ textAlign: 'center',
45
+ paddingHorizontal: 24
46
+ };
47
+ /** The Oxy mark over the screen's title and description. */
48
+ export const OxyAuthScreenHeader = ({
49
+ title,
50
+ description
51
+ }) => {
52
+ const theme = useTheme();
53
+ return /*#__PURE__*/_jsxs(View, {
54
+ className: "gap-6",
55
+ children: [/*#__PURE__*/_jsx(LogoIcon, {
56
+ height: LOGO_HEIGHT
57
+ }), /*#__PURE__*/_jsxs(View, {
58
+ className: "max-w-[90%] gap-2",
59
+ children: [/*#__PURE__*/_jsx(Text, {
60
+ accessibilityRole: "header",
61
+ style: [TITLE, {
62
+ color: theme.colors.text
63
+ }],
64
+ children: title
65
+ }), description != null && description !== '' ? typeof description === 'string' ? /*#__PURE__*/_jsx(Text, {
66
+ style: [DESCRIPTION, {
67
+ color: theme.colors.textSecondary
68
+ }],
69
+ children: description
70
+ }) : description : null]
71
+ })]
72
+ });
73
+ };
74
+
75
+ /** A sign-in screen's column: its blocks 24 apart. `className` extends it (the split's form column). */
76
+ export const OxyAuthScreen = ({
77
+ children,
78
+ className
79
+ }) => /*#__PURE__*/_jsx(View, {
80
+ className: `w-full max-w-[448px] self-center gap-6 ${className ?? ''}`,
81
+ children: children
82
+ });
83
+
84
+ /** The split card: `children` on the left and, from `md`, `aside` on the right. */
85
+ export const OxyAuthSplit = ({
86
+ children,
87
+ aside
88
+ }) => {
89
+ const theme = useTheme();
90
+ return /*#__PURE__*/_jsxs(View, {
91
+ className: "w-full self-center md:max-w-[880px] md:flex-row md:rounded-3xl md:border md:border-border md:bg-card md:overflow-hidden",
92
+ children: [/*#__PURE__*/_jsx(View, {
93
+ className: "md:flex-1 md:basis-0 md:min-w-0",
94
+ children: /*#__PURE__*/_jsx(View, {
95
+ className: "md:p-8",
96
+ children: children
97
+ })
98
+ }), /*#__PURE__*/_jsx(View, {
99
+ className: "hidden md:flex md:flex-1 md:basis-0 md:min-w-0 items-center justify-center overflow-hidden p-8",
100
+ style: {
101
+ backgroundColor: theme.colors.backgroundSecondary
102
+ },
103
+ children: aside
104
+ })]
105
+ });
106
+ };
107
+
108
+ /**
109
+ * The screen while there is nothing to show yet. React Native's own indicator:
110
+ * `@oxy.so/bloom/loading` can tree-shake to `undefined` in a rolldown-vite
111
+ * production bundle when co-imported with `@oxy.so/bloom/button`.
112
+ */
113
+ export const OxyAuthLoading = () => {
114
+ const theme = useTheme();
115
+ return /*#__PURE__*/_jsx(View, {
116
+ className: "min-h-[300px] items-center justify-center",
117
+ children: /*#__PURE__*/_jsx(ActivityIndicator, {
118
+ size: "large",
119
+ color: theme.colors.primary
120
+ })
121
+ });
122
+ };
123
+
124
+ /** "By continuing, you agree to our Terms of Service and Privacy Policy." */
125
+ export const OxyAuthTerms = () => {
126
+ const theme = useTheme();
127
+ const {
128
+ t
129
+ } = useI18n();
130
+ const link = {
131
+ color: theme.colors.text,
132
+ textDecorationLine: 'underline'
133
+ };
134
+ return /*#__PURE__*/_jsxs(Text, {
135
+ style: [TERMS, {
136
+ color: theme.colors.textSecondary
137
+ }],
138
+ children: [t('signin.terms.before'), ' ', /*#__PURE__*/_jsx(RNText, {
139
+ accessibilityRole: "link",
140
+ style: link,
141
+ onPress: () => void Linking.openURL(TERMS_URL),
142
+ children: t('signin.terms.termsLink')
143
+ }), ' ', t('signin.terms.and'), ' ', /*#__PURE__*/_jsx(RNText, {
144
+ accessibilityRole: "link",
145
+ style: link,
146
+ onPress: () => void Linking.openURL(PRIVACY_URL),
147
+ children: t('signin.terms.privacyLink')
148
+ }), "."]
149
+ });
150
+ };
151
+ //# sourceMappingURL=OxyAuthScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ActivityIndicator","Linking","Text","RNText","View","useTheme","useI18n","LogoIcon","jsx","_jsx","jsxs","_jsxs","LOGO_HEIGHT","TERMS_URL","PRIVACY_URL","TITLE","fontSize","lineHeight","fontWeight","letterSpacing","DESCRIPTION","TERMS","textAlign","paddingHorizontal","OxyAuthScreenHeader","title","description","theme","className","children","height","accessibilityRole","style","color","colors","text","textSecondary","OxyAuthScreen","OxyAuthSplit","aside","backgroundColor","backgroundSecondary","OxyAuthLoading","size","primary","OxyAuthTerms","t","link","textDecorationLine","onPress","openURL"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAuthScreen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,iBAAiB,EAAEC,OAAO,EAAEC,IAAI,IAAIC,MAAM,QAAQ,cAAc;AACzE,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASH,IAAI,QAAQ,0BAA0B;AAC/C,SAASI,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,QAAQ,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5C,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAMC,SAAS,GAAG,+DAA+D;AACjF,MAAMC,WAAW,GAAG,sDAAsD;AAE1E,MAAMC,KAAK,GAAG;EAAEC,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEC,UAAU,EAAE,KAAK;EAAEC,aAAa,EAAE,CAAC;AAAI,CAAU;AAC/F,MAAMC,WAAW,GAAG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