@oxyhq/services 28.0.0 → 29.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 (324) hide show
  1. package/NOTICE +10 -9
  2. package/README.md +65 -2
  3. package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionModule.kt +178 -0
  4. package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionProvider.kt +99 -0
  5. package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionStore.kt +115 -0
  6. package/expo-module.config.json +1 -0
  7. package/lib/commonjs/index.js +60 -16
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/ui/boot/runProviderColdBoot.js +7 -0
  10. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  11. package/lib/commonjs/ui/client.js +12 -7
  12. package/lib/commonjs/ui/client.js.map +1 -1
  13. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +10 -27
  14. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  15. package/lib/commonjs/ui/components/OxyAuthChooser.js +132 -44
  16. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  17. package/lib/commonjs/ui/components/OxyProvider.js +4 -2
  18. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  19. package/lib/commonjs/ui/components/SurfaceScreen.js +31 -3
  20. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  21. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +209 -84
  22. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  23. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +25 -7
  24. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
  25. package/lib/commonjs/ui/components/authChooser/primitives.js +35 -22
  26. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
  27. package/lib/commonjs/ui/components/authChooser/types.js +11 -0
  28. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
  29. package/lib/commonjs/ui/context/OxyContext.js +257 -306
  30. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  31. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +27 -37
  32. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  33. package/lib/commonjs/ui/context/oxyContextHelpers.js +0 -29
  34. package/lib/commonjs/ui/context/oxyContextHelpers.js.map +1 -1
  35. package/lib/commonjs/ui/context/useOxyAccountGraph.js +6 -17
  36. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/accountDialogSnapshot.js +42 -0
  38. package/lib/commonjs/ui/hooks/accountDialogSnapshot.js.map +1 -0
  39. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +0 -19
  40. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  41. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +57 -0
  42. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -0
  43. package/lib/commonjs/ui/hooks/useI18n.js +22 -3
  44. package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
  45. package/lib/commonjs/ui/hooks/useSessionManagement.js +46 -153
  46. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  47. package/lib/commonjs/ui/index.js +12 -7
  48. package/lib/commonjs/ui/index.js.map +1 -1
  49. package/lib/commonjs/ui/navigation/routes.js +85 -73
  50. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  51. package/lib/commonjs/ui/navigation/surfaces.js +8 -7
  52. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
  53. package/lib/commonjs/ui/runtime/createOxyRuntime.js +433 -0
  54. package/lib/commonjs/ui/runtime/createOxyRuntime.js.map +1 -0
  55. package/lib/commonjs/ui/runtime/index.js +63 -0
  56. package/lib/commonjs/ui/runtime/index.js.map +1 -0
  57. package/lib/commonjs/ui/runtime/runtimeContext.js +83 -0
  58. package/lib/commonjs/ui/runtime/runtimeContext.js.map +1 -0
  59. package/lib/commonjs/ui/runtime/types.js +6 -0
  60. package/lib/commonjs/ui/runtime/types.js.map +1 -0
  61. package/lib/commonjs/ui/runtime/useRuntimeSnapshot.js +57 -0
  62. package/lib/commonjs/ui/runtime/useRuntimeSnapshot.js.map +1 -0
  63. package/lib/commonjs/ui/server.js +1 -2
  64. package/lib/commonjs/ui/server.js.map +1 -1
  65. package/lib/commonjs/ui/session/authStore.js +45 -9
  66. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  67. package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js +306 -0
  68. package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js.map +1 -0
  69. package/lib/commonjs/ui/stores/authStore.js +154 -55
  70. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  71. package/lib/commonjs/ui/utils/avatarUtils.js +2 -36
  72. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  73. package/lib/module/index.js +16 -8
  74. package/lib/module/index.js.map +1 -1
  75. package/lib/module/ui/boot/runProviderColdBoot.js +7 -0
  76. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  77. package/lib/module/ui/client.js +1 -2
  78. package/lib/module/ui/client.js.map +1 -1
  79. package/lib/module/ui/components/OxyAccountDialogScreen.js +10 -27
  80. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  81. package/lib/module/ui/components/OxyAuthChooser.js +134 -44
  82. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  83. package/lib/module/ui/components/OxyProvider.js +5 -3
  84. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  85. package/lib/module/ui/components/SurfaceScreen.js +33 -5
  86. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  87. package/lib/module/ui/components/authChooser/AccountsMenuView.js +210 -85
  88. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  89. package/lib/module/ui/components/authChooser/SignInEntryView.js +25 -7
  90. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
  91. package/lib/module/ui/components/authChooser/primitives.js +35 -22
  92. package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
  93. package/lib/module/ui/components/authChooser/types.js +11 -0
  94. package/lib/module/ui/components/authChooser/types.js.map +1 -1
  95. package/lib/module/ui/context/OxyContext.js +251 -303
  96. package/lib/module/ui/context/OxyContext.js.map +1 -1
  97. package/lib/module/ui/context/hooks/useAuthOperations.js +27 -37
  98. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  99. package/lib/module/ui/context/oxyContextHelpers.js +0 -28
  100. package/lib/module/ui/context/oxyContextHelpers.js.map +1 -1
  101. package/lib/module/ui/context/useOxyAccountGraph.js +6 -17
  102. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  103. package/lib/module/ui/hooks/accountDialogSnapshot.js +38 -0
  104. package/lib/module/ui/hooks/accountDialogSnapshot.js.map +1 -0
  105. package/lib/module/ui/hooks/mutations/useAccountMutations.js +0 -19
  106. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  107. package/lib/module/ui/hooks/useDeviceSwitcher.js +53 -0
  108. package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -0
  109. package/lib/module/ui/hooks/useI18n.js +24 -4
  110. package/lib/module/ui/hooks/useI18n.js.map +1 -1
  111. package/lib/module/ui/hooks/useSessionManagement.js +47 -155
  112. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  113. package/lib/module/ui/index.js +1 -2
  114. package/lib/module/ui/index.js.map +1 -1
  115. package/lib/module/ui/navigation/routes.js +84 -72
  116. package/lib/module/ui/navigation/routes.js.map +1 -1
  117. package/lib/module/ui/navigation/surfaces.js +6 -6
  118. package/lib/module/ui/navigation/surfaces.js.map +1 -1
  119. package/lib/module/ui/runtime/createOxyRuntime.js +430 -0
  120. package/lib/module/ui/runtime/createOxyRuntime.js.map +1 -0
  121. package/lib/module/ui/runtime/index.js +15 -0
  122. package/lib/module/ui/runtime/index.js.map +1 -0
  123. package/lib/module/ui/runtime/runtimeContext.js +75 -0
  124. package/lib/module/ui/runtime/runtimeContext.js.map +1 -0
  125. package/lib/module/ui/runtime/types.js +4 -0
  126. package/lib/module/ui/runtime/types.js.map +1 -0
  127. package/lib/module/ui/runtime/useRuntimeSnapshot.js +52 -0
  128. package/lib/module/ui/runtime/useRuntimeSnapshot.js.map +1 -0
  129. package/lib/module/ui/server.js +0 -1
  130. package/lib/module/ui/server.js.map +1 -1
  131. package/lib/module/ui/session/authStore.js +46 -11
  132. package/lib/module/ui/session/authStore.js.map +1 -1
  133. package/lib/module/ui/session/sharedDeviceCredentialStore.js +302 -0
  134. package/lib/module/ui/session/sharedDeviceCredentialStore.js.map +1 -0
  135. package/lib/module/ui/stores/authStore.js +154 -55
  136. package/lib/module/ui/stores/authStore.js.map +1 -1
  137. package/lib/module/ui/utils/avatarUtils.js +2 -35
  138. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  139. package/lib/typescript/commonjs/index.d.ts +5 -3
  140. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/ui/client.d.ts +1 -2
  143. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  148. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +11 -4
  149. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +3 -1
  151. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +18 -6
  153. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +33 -1
  155. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +35 -4
  157. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +8 -12
  159. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts +0 -2
  161. package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +9 -1
  163. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -3
  165. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +15 -0
  167. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts +49 -0
  170. package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts +13 -0
  172. package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +23 -18
  174. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/ui/index.d.ts +1 -2
  176. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +15 -1
  178. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts +144 -0
  181. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/ui/runtime/index.d.ts +16 -0
  183. package/lib/typescript/commonjs/ui/runtime/index.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts +43 -0
  185. package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/ui/runtime/types.d.ts +89 -0
  187. package/lib/typescript/commonjs/ui/runtime/types.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/ui/runtime/useRuntimeSnapshot.d.ts +23 -0
  189. package/lib/typescript/commonjs/ui/runtime/useRuntimeSnapshot.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/ui/server.d.ts +0 -1
  191. package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/ui/session/authStore.d.ts +60 -9
  193. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts +32 -0
  195. package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/ui/stores/authStore.d.ts +49 -5
  197. package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
  198. package/lib/typescript/commonjs/ui/types/navigation.d.ts +26 -0
  199. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +2 -10
  201. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  202. package/lib/typescript/module/index.d.ts +5 -3
  203. package/lib/typescript/module/index.d.ts.map +1 -1
  204. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/client.d.ts +1 -2
  206. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  207. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  208. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  209. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  210. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  211. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +11 -4
  212. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  213. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +3 -1
  214. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
  215. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +18 -6
  216. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
  217. package/lib/typescript/module/ui/components/authChooser/types.d.ts +33 -1
  218. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
  219. package/lib/typescript/module/ui/context/OxyContext.d.ts +35 -4
  220. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +8 -12
  222. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  223. package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts +0 -2
  224. package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts.map +1 -1
  225. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +9 -1
  226. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  227. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -3
  228. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  229. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +15 -0
  230. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -0
  231. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts +49 -0
  233. package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -0
  234. package/lib/typescript/module/ui/hooks/useI18n.d.ts +13 -0
  235. package/lib/typescript/module/ui/hooks/useI18n.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +23 -18
  237. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  238. package/lib/typescript/module/ui/index.d.ts +1 -2
  239. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  240. package/lib/typescript/module/ui/navigation/routes.d.ts +15 -1
  241. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  242. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
  243. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts +144 -0
  244. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts.map +1 -0
  245. package/lib/typescript/module/ui/runtime/index.d.ts +16 -0
  246. package/lib/typescript/module/ui/runtime/index.d.ts.map +1 -0
  247. package/lib/typescript/module/ui/runtime/runtimeContext.d.ts +43 -0
  248. package/lib/typescript/module/ui/runtime/runtimeContext.d.ts.map +1 -0
  249. package/lib/typescript/module/ui/runtime/types.d.ts +89 -0
  250. package/lib/typescript/module/ui/runtime/types.d.ts.map +1 -0
  251. package/lib/typescript/module/ui/runtime/useRuntimeSnapshot.d.ts +23 -0
  252. package/lib/typescript/module/ui/runtime/useRuntimeSnapshot.d.ts.map +1 -0
  253. package/lib/typescript/module/ui/server.d.ts +0 -1
  254. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  255. package/lib/typescript/module/ui/session/authStore.d.ts +60 -9
  256. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  257. package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts +32 -0
  258. package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -0
  259. package/lib/typescript/module/ui/stores/authStore.d.ts +49 -5
  260. package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
  261. package/lib/typescript/module/ui/types/navigation.d.ts +26 -0
  262. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  263. package/lib/typescript/module/ui/utils/avatarUtils.d.ts +2 -10
  264. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  265. package/package.json +6 -7
  266. package/plugins/withSharedDeviceSessionProvider.js +102 -0
  267. package/plugins/withSharedDeviceSessionReader.js +57 -0
  268. package/src/__tests__/esmSourcePurity.test.ts +61 -0
  269. package/src/index.ts +31 -9
  270. package/src/ui/boot/runProviderColdBoot.ts +7 -0
  271. package/src/ui/client.ts +1 -2
  272. package/src/ui/components/OxyAccountDialogScreen.tsx +10 -29
  273. package/src/ui/components/OxyAuthChooser.tsx +149 -50
  274. package/src/ui/components/OxyProvider.tsx +7 -5
  275. package/src/ui/components/SurfaceScreen.tsx +28 -4
  276. package/src/ui/components/authChooser/AccountsMenuView.tsx +246 -96
  277. package/src/ui/components/authChooser/SignInEntryView.tsx +31 -8
  278. package/src/ui/components/authChooser/primitives.tsx +37 -23
  279. package/src/ui/components/authChooser/types.ts +34 -1
  280. package/src/ui/context/OxyContext.tsx +269 -324
  281. package/src/ui/context/hooks/useAuthOperations.ts +32 -35
  282. package/src/ui/context/oxyContextHelpers.ts +0 -30
  283. package/src/ui/context/oxyContextTypes.ts +9 -1
  284. package/src/ui/context/useOxyAccountGraph.ts +5 -19
  285. package/src/ui/hooks/accountDialogSnapshot.ts +37 -0
  286. package/src/ui/hooks/mutations/useAccountMutations.ts +0 -19
  287. package/src/ui/hooks/queries/__tests__/userCache.test.ts +12 -1
  288. package/src/ui/hooks/useDeviceSwitcher.ts +110 -0
  289. package/src/ui/hooks/useI18n.ts +23 -3
  290. package/src/ui/hooks/useSessionManagement.ts +62 -211
  291. package/src/ui/index.ts +1 -2
  292. package/src/ui/navigation/routes.ts +85 -75
  293. package/src/ui/navigation/surfaces.ts +6 -9
  294. package/src/ui/runtime/createOxyRuntime.ts +623 -0
  295. package/src/ui/runtime/index.ts +34 -0
  296. package/src/ui/runtime/runtimeContext.tsx +111 -0
  297. package/src/ui/runtime/types.ts +110 -0
  298. package/src/ui/runtime/useRuntimeSnapshot.ts +52 -0
  299. package/src/ui/server.ts +0 -1
  300. package/src/ui/session/__tests__/authStore.test.ts +90 -0
  301. package/src/ui/session/__tests__/sharedDeviceCredentialStore.test.ts +289 -0
  302. package/src/ui/session/authStore.ts +78 -9
  303. package/src/ui/session/sharedDeviceCredentialStore.ts +318 -0
  304. package/src/ui/stores/authStore.ts +171 -43
  305. package/src/ui/types/navigation.ts +26 -0
  306. package/src/ui/utils/avatarUtils.ts +2 -37
  307. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +0 -64
  308. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +0 -1
  309. package/lib/commonjs/ui/stores/accountStore.js +0 -221
  310. package/lib/commonjs/ui/stores/accountStore.js.map +0 -1
  311. package/lib/module/ui/hooks/useSwitchableAccounts.js +0 -60
  312. package/lib/module/ui/hooks/useSwitchableAccounts.js.map +0 -1
  313. package/lib/module/ui/stores/accountStore.js +0 -213
  314. package/lib/module/ui/stores/accountStore.js.map +0 -1
  315. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +0 -23
  316. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +0 -1
  317. package/lib/typescript/commonjs/ui/stores/accountStore.d.ts +0 -27
  318. package/lib/typescript/commonjs/ui/stores/accountStore.d.ts.map +0 -1
  319. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +0 -23
  320. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +0 -1
  321. package/lib/typescript/module/ui/stores/accountStore.d.ts +0 -27
  322. package/lib/typescript/module/ui/stores/accountStore.d.ts.map +0 -1
  323. package/src/ui/hooks/useSwitchableAccounts.ts +0 -75
  324. package/src/ui/stores/accountStore.ts +0 -264
@@ -1,25 +1,76 @@
1
1
  /**
2
2
  * Platform `AuthStateStore` for `@oxyhq/services`.
3
3
  *
4
- * The zero-cookie device model persists the durable device credential
5
- * (`deviceId` + `deviceSecret`) per origin (web) / per device (native), and the
6
- * SDK re-mints the access token from that credential on cold boot. `@oxyhq/core`
7
- * owns the store shape + logic (`createWebAuthStateStore` /
8
- * `createNativeAuthStateStore`); this module only selects the platform storage
9
- * seam:
4
+ * The device model persists the durable device credential (`deviceId` +
5
+ * `deviceSecret`) per origin (web) / per device (native), and the SDK re-mints
6
+ * the access token from that credential on cold boot. `@oxyhq/core` owns the
7
+ * store shape + logic (`createWebAuthStateStore` / `createNativeAuthStateStore` /
8
+ * `createMemoryAuthStateStore`); this module only selects the seam:
10
9
  *
10
+ * - `storage: 'ephemeral'` → `createMemoryAuthStateStore()`, on EVERY platform.
11
11
  * - web → `createWebAuthStateStore()` (localStorage, in-memory fallback).
12
12
  * - native → `createNativeAuthStateStore(secureKV)` for the SESSION blob over
13
13
  * the shared `createNativeSecureKeyValueStorage()` adapter
14
- * (`expo-secure-store`, AsyncStorage fallback).
14
+ * (`expo-secure-store`, AsyncStorage fallback), WRAPPED so every credential
15
+ * it persists is also mirrored into the device-wide shared slot.
16
+ *
17
+ * The native wrapper is how several official apps end up on ONE `DeviceSession`
18
+ * (and therefore one active context): whichever app proves a credential publishes
19
+ * it, and a later-installed sibling adopts it during cold boot instead of asking
20
+ * for the Commons identity key. The mirror is additive — it can neither change
21
+ * nor fail the app's own durable write.
15
22
  */
16
- import { type AuthStateStore } from '@oxyhq/core';
23
+ import { type AuthStateStore, type SessionMode } from '@oxyhq/core';
24
+ export interface PlatformAuthStateStoreOptions {
25
+ /**
26
+ * Who owns the session this provider resolves. Only `'account'` mirrors into
27
+ * the device-wide shared slot.
28
+ *
29
+ * `'identity'` (the vault) is deliberately excluded, which keeps its storage
30
+ * behaviour byte-for-byte what it is today. The vault's credential is a
31
+ * perfectly valid device credential, so publishing it would arguably be
32
+ * correct — but it would also let every ordinary app on the device join the
33
+ * vault's device session as a side effect of the vault persisting a token, and
34
+ * "a background write changes which session five other apps boot into" is not
35
+ * a decision a storage seam gets to make.
36
+ */
37
+ sessionMode?: SessionMode;
38
+ /**
39
+ * Whether this origin/app may persist a durable device credential AT ALL.
40
+ *
41
+ * `'ephemeral'` stores nothing durable and mirrors nothing: the session lives
42
+ * in memory for the lifetime of the page and is gone on reload. Its one caller
43
+ * is `auth.oxy.so` with the browser hub enabled (issue #937 Phase 5, ADR 0003),
44
+ * where the durable credential for the browser profile is the server-side
45
+ * DeviceSession behind the `__Host-oxy-device` handle.
46
+ *
47
+ * See `OxyProviderProps.deviceCredentialStorage` for why the answer to "let the
48
+ * hub be authoritative" is to stop persisting the other credential rather than
49
+ * to consult it second.
50
+ */
51
+ storage?: 'persistent' | 'ephemeral';
52
+ }
17
53
  /**
18
54
  * Build the platform {@link AuthStateStore} for this runtime.
19
55
  *
20
56
  * Native persists the SESSION blob (`deviceId` + `deviceSecret` + cached access
21
57
  * token) per-app in SecureStore; the SDK re-mints the access token from the
22
58
  * device credential on the next cold boot.
59
+ *
60
+ * ## The ephemeral check is FIRST, and the order is load-bearing
61
+ *
62
+ * It short-circuits above the `isReactNative()` branch so an ephemeral caller can
63
+ * never reach the native path — and therefore can never reach the shared-slot
64
+ * mirroring wrapper. Checked after that branch instead, an origin that has
65
+ * declined to persist a credential would publish one into the device-wide slot
66
+ * every sibling app adopts on cold boot: it would keep nothing itself while
67
+ * deciding which session five other apps boot into.
68
+ *
69
+ * That is unreachable today because the only ephemeral caller is a web origin, so
70
+ * `isReactNative()` is false there anyway. Unreachable today is exactly the kind
71
+ * of guarantee that stops holding when someone adds the second caller, so it is
72
+ * structural here rather than incidental, and
73
+ * `__tests__/session/authStoreEphemeral.test.ts` holds the ordering directly.
23
74
  */
24
- export declare function createPlatformAuthStateStore(): AuthStateStore;
75
+ export declare function createPlatformAuthStateStore(options?: PlatformAuthStateStoreOptions): AuthStateStore;
25
76
  //# sourceMappingURL=authStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAIrB;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,cAAc,CAM7D"}
1
+ {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAKrB,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,6BAAkC,GAC1C,cAAc,CAiBhB"}
@@ -0,0 +1,32 @@
1
+ import { type SharedDeviceCredentialStore } from '@oxyhq/core';
2
+ /**
3
+ * The iOS Keychain Access Group every official Oxy app declares in its
4
+ * entitlements. Shared with the identity slots — the group is the app-group
5
+ * boundary, not the secret's identity.
6
+ */
7
+ export declare const IOS_KEYCHAIN_ACCESS_GROUP = "group.so.oxy.shared";
8
+ /**
9
+ * The iOS `keychainService` for the DEVICE SESSION credential. Deliberately
10
+ * distinct from every identity and recovery service; do not reuse one of those
11
+ * here, and do not drop it (an item written with no service shares the legacy
12
+ * identity slot's namespace inside the group).
13
+ */
14
+ export declare const IOS_DEVICE_SESSION_KEYCHAIN_SERVICE = "oxy_device_session";
15
+ /** The single key holding the JSON-encoded `{deviceId, deviceSecret}` pair. */
16
+ export declare const SHARED_DEVICE_SESSION_STORAGE_KEY = "oxy_shared_device_session_v1";
17
+ /**
18
+ * The shared DeviceSession credential slot for this runtime, or `null` when
19
+ * there is none.
20
+ *
21
+ * The branch is on the PLATFORM, not on which module happens to load, because
22
+ * `expo-secure-store` loads perfectly well on Android — it would just quietly
23
+ * ignore `keychainAccessGroup` and read a package-private item, which looks
24
+ * exactly like an empty shared slot. This is the same iOS-vs-Android split
25
+ * `KeyManager` makes for the shared identity, for the same reason.
26
+ *
27
+ * Any other native platform gets the broker, which answers `unsupported` when
28
+ * the module is not linked — so the lane is simply off, which is the safe
29
+ * direction.
30
+ */
31
+ export declare function createPlatformSharedDeviceCredentialStore(): SharedDeviceCredentialStore | null;
32
+ //# sourceMappingURL=sharedDeviceCredentialStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedDeviceCredentialStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/sharedDeviceCredentialStore.ts"],"names":[],"mappings":"AAyCA,OAAO,EAIL,KAAK,2BAA2B,EACjC,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,uBAAuB,CAAC;AAExE,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AA0OhF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yCAAyC,IAAI,2BAA2B,GAAG,IAAI,CAK9F"}
@@ -1,17 +1,61 @@
1
1
  import type { User } from '@oxyhq/core';
2
+ import type { OxyRuntime } from '../runtime';
3
+ /**
4
+ * The signed-in user, as a zustand-shaped read/write surface.
5
+ *
6
+ * It used to BE a zustand store, and that made it a second owner of the
7
+ * session: the provider wrote `user`/`isAuthenticated` here, `SessionClient`
8
+ * wrote the same facts into its device state, and nothing reconciled them —
9
+ * when they disagreed, which one was right was not answerable. It is now a
10
+ * projection of the ONE `OxyRuntime` (ADR 0004): reads come off the runtime
11
+ * snapshot and writes go into the runtime, so there is nothing left to drift.
12
+ *
13
+ * The zustand SHAPE is kept deliberately — `useAuthStore(selector)`,
14
+ * `.getState()`, `.setState()`, `.subscribe()` — because a dozen call sites
15
+ * across this package and the Commons app read the user out of band, from
16
+ * mutation success handlers and cache helpers that are not inside a render.
17
+ * Rewriting them is Phase 8's cut, not this one's.
18
+ *
19
+ * `fetchUser` and `lastUserFetch` are GONE rather than projected: they were a
20
+ * five-minute profile cache with zero readers anywhere in the monorepo, and the
21
+ * Query cache has owned that job since long before this change.
22
+ */
2
23
  export interface AuthState {
3
24
  user: User | null;
4
25
  isAuthenticated: boolean;
5
26
  isLoading: boolean;
6
27
  error: string | null;
7
- lastUserFetch: number | null;
8
28
  loginSuccess: (user: User) => void;
9
29
  loginFailure: (error: string) => void;
10
30
  logout: () => void;
11
- fetchUser: (oxyServices: {
12
- getCurrentUser: () => Promise<User>;
13
- }, forceRefresh?: boolean) => Promise<void>;
31
+ /** Replace the signed-in profile after a write (a rename, a new avatar). */
14
32
  setUser: (user: User) => void;
15
33
  }
16
- export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
34
+ /** The subset of `AuthState` a caller may push back in through `setState`. */
35
+ export type AuthStatePatch = Partial<Pick<AuthState, 'user' | 'isLoading' | 'error'>>;
36
+ /**
37
+ * Point this surface at the provider's runtime. Called once by
38
+ * `OxyRuntimeProvider`; the returned function detaches it again on unmount.
39
+ *
40
+ * With nothing bound, reads answer signed-out and writes are dropped. That is
41
+ * the honest answer for the two places it happens — the SSR shim, and a unit
42
+ * test poking the store with no provider mounted — and it is why binding is an
43
+ * explicit call rather than a lazily-created default runtime, which is exactly
44
+ * the fabricated-forever-loading runtime ADR 0004 deleted.
45
+ */
46
+ export declare function bindAuthStoreToRuntime(runtime: OxyRuntime): () => void;
47
+ declare function useAuthStoreHook<T>(selector: (state: AuthState) => T): T;
48
+ /**
49
+ * Read the signed-in user. Zustand-shaped, projected from the runtime.
50
+ *
51
+ * A selector that builds an object must be wrapped in `useShallow` (as every
52
+ * call site here already does) — otherwise a structurally-equal result reads as
53
+ * a change on every publish.
54
+ */
55
+ export declare const useAuthStore: typeof useAuthStoreHook & {
56
+ getState: () => AuthState;
57
+ setState: (patch: AuthStatePatch) => void;
58
+ subscribe: (listener: () => void) => (() => void);
59
+ };
60
+ export {};
17
61
  //# sourceMappingURL=authStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,WAAW,EAAE;QAAE,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3G,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,wEA0CtB,CAAC"}
1
+ {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,4EAA4E;IAC5E,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AAED,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;AAuEtF;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,IAAI,CActE;AA6BD,iBAAS,gBAAgB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,CAejE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;oBAnDJ,SAAS;sBAEL,cAAc,KAAG,IAAI;0BAkBjB,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;CAmCpD,CAAC"}
@@ -123,5 +123,31 @@ export interface OxyProviderProps {
123
123
  * @default false
124
124
  */
125
125
  backgroundSession?: boolean;
126
+ /**
127
+ * Whether this origin/app may persist the durable device credential
128
+ * (`deviceId` + `deviceSecret`) at all.
129
+ *
130
+ * `'persistent'` (the default, and every app's behaviour) stores it — web
131
+ * localStorage per origin, SecureStore per app on native — so the SDK can
132
+ * re-mint an access token on the next cold boot.
133
+ *
134
+ * `'ephemeral'` stores NOTHING durable: the session lives in memory for the
135
+ * lifetime of the page and is gone on reload. It exists for ONE caller,
136
+ * `auth.oxy.so` with the browser hub enabled (issue #937 Phase 5, ADR 0003),
137
+ * where the durable credential for the browser profile is the server-side
138
+ * DeviceSession behind the `__Host-oxy-device` handle. Two durable
139
+ * credentials for one origin is the dual authority that phase exists to
140
+ * remove — revoking the hub while a localStorage secret still mints would
141
+ * make a sign-out look like it worked — so the way to let the hub be
142
+ * authoritative is to stop persisting the other one, not to consult it
143
+ * second.
144
+ *
145
+ * Do NOT reach for this to make an app "more private". A relying-party
146
+ * origin set to `'ephemeral'` simply signs the user out on every reload,
147
+ * because nothing else on that origin remembers the device.
148
+ *
149
+ * @default 'persistent'
150
+ */
151
+ deviceCredentialStorage?: 'persistent' | 'ephemeral';
126
152
  }
127
153
  //# sourceMappingURL=navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAA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C;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,uBAAuB,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;CACxD"}
@@ -2,16 +2,8 @@ import type { OxyServices, User } from '@oxyhq/core';
2
2
  import type { UserProfileUpdate } from '@oxyhq/contracts';
3
3
  import type { QueryClient } from '@tanstack/react-query';
4
4
  /**
5
- * Refreshes avatar in accountStore with cache-busted URL to force image reload.
6
- *
7
- * @param sessionId - The session ID for the account to update
8
- * @param avatarFileId - The new avatar file ID
9
- * @param oxyServices - OxyServices instance to generate download URL
10
- */
11
- export declare function refreshAvatarInStore(sessionId: string, avatarFileId: string, oxyServices: OxyServices): void;
12
- /**
13
- * Updates user profile with avatar and handles all side effects (query invalidation, accountStore update).
14
- * This function can be used from within OxyContext provider without requiring useOxy hook.
5
+ * Updates user profile with avatar and handles all side effects (cache writes,
6
+ * query invalidation). Usable from inside the provider without `useOxy`.
15
7
  *
16
8
  * @param updates - Profile updates including avatar
17
9
  * @param oxyServices - OxyServices instance
@@ -1 +1 @@
1
- {"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CAyCf"}
1
+ {"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
@@ -22,12 +22,14 @@
22
22
  */
23
23
  export { default as OxyProvider } from './ui/components/OxyProvider.js';
24
24
  export { useOxy } from './ui/context/OxyContext.js';
25
+ export { useOptionalOxy, OxyProviderMissingError } from './ui/context/OxyContext.js';
26
+ export { useOxyRuntime, useOxySnapshot, useActiveAccount, useDeviceDirectory, OxyRuntimeMissingError, } from './ui/runtime/index.js';
27
+ export type { ActiveAccount, OxyRuntime, OxyRuntimeError, OxyRuntimeSnapshot, OxyRuntimeStatus, OxyTokenStatus, } from './ui/runtime/index.js';
25
28
  export type { OxyContextState } from './ui/context/OxyContext.js';
26
29
  export { useAuth } from './ui/hooks/useAuth.js';
27
30
  export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth.js';
28
31
  export { IdentityBoundSessionError } from './ui/session/identityBinding.js';
29
32
  export { useAuthStore } from './ui/stores/authStore.js';
30
- export { useAccountStore } from './ui/stores/accountStore.js';
31
33
  export { useAssetStore, useAssets as useAssetsStore, useAsset, useUploadProgress, useAssetLoading, useAssetErrors, useAssetsByApp, useAssetsByEntity, useAssetUsageCount, useIsAssetLinked, } from './ui/stores/assetStore.js';
32
34
  export { useAssets, setOxyAssetInstance } from './ui/hooks/useAssets.js';
33
35
  export { useFileDownloadUrl } from './ui/hooks/useFileDownloadUrl.js';
@@ -88,8 +90,8 @@ export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser.js';
88
90
  export { OxySignInRequestSurface } from './ui/components/OxySignInRequestSurface.js';
89
91
  export type { OxySignInRequestSurfaceProps } from './ui/components/OxySignInRequestSurface.js';
90
92
  export type { OxySignInSurfaceAction } from './ui/components/authChooser/types.js';
91
- export { useSwitchableAccounts } from './ui/hooks/useSwitchableAccounts.js';
92
- export type { UseSwitchableAccountsResult } from './ui/hooks/useSwitchableAccounts.js';
93
+ export { useDeviceSwitcher } from './ui/hooks/useDeviceSwitcher.js';
94
+ export type { UseDeviceSwitcherResult } from './ui/hooks/useDeviceSwitcher.js';
93
95
  export { default as ProfileScreen } from './ui/screens/ProfileScreen.js';
94
96
  export { default as ManageAccountScreen } from './ui/screens/ManageAccountScreen.js';
95
97
  export { default as NotificationsScreen } from './ui/screens/NotificationsScreen.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA4B,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QAAS,CAAC;AA0CpD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,0BAA0B,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CA4HzF"}
1
+ {"version":3,"file":"runProviderColdBoot.d.ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA4B,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QAAS,CAAC;AA0CpD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,0BAA0B,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAkIzF"}
@@ -15,7 +15,7 @@ export { LogoIcon } from './components/logo/LogoIcon.js';
15
15
  export { LogoText } from './components/logo/LogoText.js';
16
16
  export { default as FollowButton } from './components/FollowButton.js';
17
17
  export { default as OxyPayButton } from './components/OxyPayButton.js';
18
- export { useOxy } from './context/OxyContext.js';
18
+ export { useOxy, useOptionalOxy, OxyProviderMissingError } from './context/OxyContext.js';
19
19
  export { useAuth } from './hooks/useAuth.js';
20
20
  export type { AuthState, AuthActions, UseAuthReturn } from './hooks/useAuth.js';
21
21
  export { useFollow } from './hooks/useFollow.js';
@@ -24,7 +24,6 @@ export type { UseStorageOptions, UseStorageResult } from './hooks/useStorage.js'
24
24
  export { default as ProfileScreen } from './screens/ProfileScreen.js';
25
25
  export { default as ManageAccountScreen } from './screens/ManageAccountScreen.js';
26
26
  export { useAuthStore } from './stores/authStore.js';
27
- export { useAccountStore } from './stores/accountStore.js';
28
27
  export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extractErrorMessage, } from './utils/errorHandlers.js';
29
28
  export type { HandleAuthErrorOptions } from './utils/errorHandlers.js';
30
29
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/ui/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iCAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA2B,CAAC;AAGpE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAsB,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAiB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,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OAAO,EAAE,OAAO,EAAE,MAAM,oBAAiB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAoB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAG9E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAA+B,CAAC;AAG/E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAGlD,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACtB,MAAM,0BAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAccountDialogScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialogScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAc3D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+DrD,CAAC;AA+EF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"OxyAccountDialogScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialogScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAe3D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiErD,CAAC;AAyDF,eAAe,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuC/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+UjD,CAAC;AA4BF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2C/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4ajD,CAAC;AA8BF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AA6C5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6OrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AA6C5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA+OrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoE,MAAM,OAAO,CAAC;AASzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAA+B,CAAC;AAgErE,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,iFAAiF;IACjF,OAAO,EAAE,eAAe,CAAC;IACzB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,iBAAwB,GACzB,EAAE,kBAAkB,4BA8JpB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"SurfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/SurfaceScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8E,MAAM,OAAO,CAAC;AASnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAA+B,CAAC;AAsFrE,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,iFAAiF;IACjF,OAAO,EAAE,eAAe,CAAC;IACzB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,iBAAwB,GACzB,EAAE,kBAAkB,4BAgKpB;AAED,eAAe,aAAa,CAAC"}
@@ -7,8 +7,11 @@
7
7
  * avatar (with a camera badge to change the photo), the greeting, the account
8
8
  * address, and a "Manage your Oxy account" pill.
9
9
  * - SWITCH ACCOUNT: a disclosure row whose corner animates from pill to card as
10
- * the other switchable accounts + "Add another account" + "Manage accounts on
11
- * this device" reveal beneath it.
10
+ * the device's people + "Add another account" + "Manage accounts on this
11
+ * device" reveal beneath it. The list is grouped BY PERSON (ADR 0002): an
12
+ * account sits under the human who can operate it, and the same organization
13
+ * reachable through two people is two rows under two names — the thing a list
14
+ * keyed by account id structurally cannot say.
12
15
  * - OXY STORAGE: cloud + used/total + a composition meter + Upgrade / Manage chips.
13
16
  * - MENU rows: Your data in Oxy · Oxy settings · Help & feedback · Sign out —
14
17
  * Bloom's grouped section, the same component every other SDK settings surface
@@ -23,10 +26,14 @@
23
26
  * effect hook, no derived-from-props sync.
24
27
  */
25
28
  import type React from 'react';
26
- import type { AccountDialogSnapshot } from '@oxyhq/core';
27
- import { type AccountStorageModel, type AccountsMenuActions, type OxyAuthChooserHandlers, type Theme, type Translate } from './types.js';
29
+ import { type AccountDialogSnapshot, type SwitcherPrincipalRow } from '@oxyhq/core';
30
+ import { type AccountHeroModel, type AccountStorageModel, type AccountsMenuActions, type OxyAuthChooserHandlers, type Theme, type Translate } from './types.js';
28
31
  interface AccountsMenuViewProps {
29
32
  snapshot: AccountDialogSnapshot;
33
+ /** The device's people, each with the accounts they may act as. */
34
+ principals: SwitcherPrincipalRow[];
35
+ /** The current account, rendered large. `null` before the session resolves. */
36
+ hero: AccountHeroModel | null;
30
37
  theme: Theme;
31
38
  t: Translate;
32
39
  handlers: OxyAuthChooserHandlers;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountsMenuView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/AccountsMenuView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,KAAK,EAAE,qBAAqB,EAAqB,MAAM,aAAa,CAAC;AAK5E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,YAAS,CAAC;AAsEjB,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,EAAE,SAAS,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkYrD,CAAC;AA8DF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"AccountsMenuView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/AccountsMenuView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAIrB,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,YAAS,CAAC;AA6DjB,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,mEAAmE;IACnE,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,+EAA+E;IAC/E,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,EAAE,SAAS,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuXrD,CAAC;AA4NF,eAAe,gBAAgB,CAAC"}
@@ -16,10 +16,12 @@
16
16
  * your phone") IS the primary route there, never something behind a tap.
17
17
  */
18
18
  import type React from 'react';
19
- import type { AccountDialogSnapshot } from '@oxyhq/core';
19
+ import { type AccountDialogSnapshot, type SwitcherPrincipalRow } from '@oxyhq/core';
20
20
  import type { OxyAuthChooserHandlers, SignInAlternatives, Theme, Translate } from './types.js';
21
21
  interface SignInEntryViewProps {
22
22
  snapshot: AccountDialogSnapshot;
23
+ /** The device's people, each with the accounts they may act as. */
24
+ principals: SwitcherPrincipalRow[];
23
25
  theme: Theme;
24
26
  t: Translate;
25
27
  handlers: OxyAuthChooserHandlers;
@@ -1 +1 @@
1
- {"version":3,"file":"SignInEntryView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/SignInEntryView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIzD,OAAO,KAAK,EACV,sBAAsB,EAEtB,kBAAkB,EAClB,KAAK,EACL,SAAS,EACV,MAAM,YAAS,CAAC;AAEjB,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,EAAE,SAAS,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,iFAAiF;IACjF,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,EAAE,kBAAkB,CAAC;CAClC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2EnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"SignInEntryView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/SignInEntryView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EACV,sBAAsB,EAEtB,kBAAkB,EAClB,KAAK,EACL,SAAS,EACV,MAAM,YAAS,CAAC;AAEjB,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,mEAAmE;IACnE,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,CAAC,EAAE,SAAS,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,iFAAiF;IACjF,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,EAAE,kBAAkB,CAAC;CAClC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4FnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type React from 'react';
7
7
  import { Pressable } from 'react-native-css/components';
8
- import type { SwitchableAccount } from '@oxyhq/core';
8
+ import type { SwitcherContextRow } from '@oxyhq/core';
9
9
  import { type Theme } from './types.js';
10
10
  type HoverPressableProps = Omit<React.ComponentProps<typeof Pressable>, 'className'> & {
11
11
  baseClassName: string;
@@ -40,14 +40,26 @@ export declare const Dividerish: React.FC<{
40
40
  label: string;
41
41
  }>;
42
42
  /**
43
- * An account row on the sign-in entry — "continue as one of these" rather than a
44
- * choice of authentication METHOD, which is why it stays above the primary CTA
45
- * instead of behind the trouble disclosure.
43
+ * A `principal acting as account` row on the sign-in entry — "continue as one of
44
+ * these" rather than a choice of authentication METHOD, which is why it stays
45
+ * above the primary CTA instead of behind the trouble disclosure.
46
+ *
47
+ * Pressing it activates the PAIR. The secondary line is the account's `@handle`:
48
+ * the device directory carries a handle and no email, deliberately — it is the
49
+ * minimum that renders a row for every person on the device, and this surface is
50
+ * reached while signed out, where fetching anyone's profile is not an option.
51
+ *
52
+ * The accent comes from the row's OWN account (`context.color`, straight off the
53
+ * directory), not from the theme and not from whoever is signed in. This surface
54
+ * is where a device holding two people is most visible, and it is reached while
55
+ * signed out — so there is no "current user" whose colour could stand in.
46
56
  */
47
57
  export declare const AccountRow: React.FC<{
48
- account: SwitchableAccount;
58
+ context: SwitcherContextRow;
59
+ /** The person this account is reached through, when that is not obvious. */
60
+ operatedBy: string | null;
49
61
  theme: Theme;
50
- switching: boolean;
62
+ activating: boolean;
51
63
  disabled: boolean;
52
64
  onPress: () => void;
53
65
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAQ,MAAM,6BAA6B,CAAC;AAK9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CA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AAa,CAAC;AAEtD,OAAO,EAA8B,KAAK,KAAK,EAAE,MAAM,YAAS,CAAC;AAKjE,KAAK,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,WAAW,CAAC,GAAG;IACrF,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAcxD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAWA,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMhE,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,4EAA4E;IAC5E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAkDA,CAAC"}
@@ -30,7 +30,21 @@ export interface OxySignInSurfaceAction {
30
30
  }
31
31
  /** The account-row actions the container wires for the switcher + menu views. */
32
32
  export interface OxyAuthChooserHandlers {
33
- onSwitch: (accountId: string) => void;
33
+ /**
34
+ * Become one `principal acting as account` pair.
35
+ *
36
+ * A `contextId`, never an `accountId`: on a device holding two people the
37
+ * same organization is reachable through both, and an account id cannot name
38
+ * which person's route to take.
39
+ */
40
+ onActivate: (contextId: string) => void;
41
+ /**
42
+ * Drop ONE pair. The same account reached through somebody else stays — that
43
+ * is a different session with a different audit actor.
44
+ */
45
+ onRemoveContext: (contextId: string) => void;
46
+ /** Drop ONE PERSON and every account they reach here, and nobody else's. */
47
+ onRemovePrincipal: (principalId: string) => void;
34
48
  onAdd: () => void;
35
49
  onManage: () => void;
36
50
  /**
@@ -41,6 +55,24 @@ export interface OxyAuthChooserHandlers {
41
55
  */
42
56
  onEditAvatar: () => void;
43
57
  }
58
+ /**
59
+ * The account menu's HERO block — the current account, rendered large.
60
+ *
61
+ * Built by the container from `useOxy().user`, not from a directory row, and
62
+ * that asymmetry is deliberate rather than an oversight: the directory carries
63
+ * the minimum that renders a row (name, handle, avatar) for EVERY person on the
64
+ * device, while the account this client is actually signed in as is the one it
65
+ * legitimately holds a full profile for — so the hero keeps its real email and
66
+ * its own accent colour, and the rows below it do not pretend to.
67
+ */
68
+ export interface AccountHeroModel {
69
+ displayName: string;
70
+ /** The canonical `@oxy.so` email when there is one, else the `@handle`. */
71
+ addressLine: string | null;
72
+ avatarUrl: string | undefined;
73
+ /** The account's own Bloom accent, resolved to a hex. */
74
+ accentHex: string;
75
+ }
44
76
  /** Used/total storage bytes for the "Oxy storage" block, or `null` when unknown. */
45
77
  export interface AccountStorageModel {
46
78
  usedBytes: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAsC,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAqB,CAAC;AAEnD,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,QAAQ,CA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AW,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,uCAAuC;IACvC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG/E;AAED,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,SAAS,CAKvE"}
@@ -1,7 +1,38 @@
1
1
  import type React from 'react';
2
- import type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes.js';
3
- export type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes.js';
4
- export declare const OxyProvider: React.FC<OxyContextProviderProps>;
5
- export declare const OxyContextProvider: React.FC<OxyContextProviderProps>;
2
+ import type { OxyContextState, OxyRuntimeProviderProps } from './oxyContextTypes.js';
3
+ export type { OxyContextState, OxyRuntimeProviderProps } from './oxyContextTypes.js';
4
+ /**
5
+ * The SDK's internal runtime provider — the session/account state machine that
6
+ * backs `useOxy()`.
7
+ *
8
+ * This is NOT the component consumers mount. The one public composition root is
9
+ * `OxyProvider` (`../components/OxyProvider`), which mounts this alongside the
10
+ * QueryClient, Bloom's dialog/surface/toast hosts, safe areas, the gesture root
11
+ * and the keyboard provider. Naming both of them `OxyProvider` (as this file
12
+ * used to) made every error message, stack frame and doc reference ambiguous —
13
+ * see ADR 0004.
14
+ */
15
+ export declare const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps>;
16
+ export declare class OxyProviderMissingError extends Error {
17
+ readonly code = "oxy_provider_missing";
18
+ constructor();
19
+ }
20
+ /**
21
+ * The base runtime hook. THROWS when no `<OxyProvider>` is mounted.
22
+ *
23
+ * It used to return a fabricated forever-loading runtime — `isLoading: true`,
24
+ * `isPrivateApiPending: true`, every method a rejecting no-op — which turned a
25
+ * missing provider into a UI that spins forever with nothing in the console.
26
+ * Failing here names the mistake at the exact component that made it (ADR 0004).
27
+ *
28
+ * A component that legitimately renders both inside and outside the provider
29
+ * uses {@link useOptionalOxy} instead.
30
+ */
6
31
  export declare const useOxy: () => OxyContextState;
32
+ /**
33
+ * `useOxy()` for the rare component that renders both inside and outside the
34
+ * provider — returns `null` instead of throwing. Callers must handle `null`;
35
+ * there is no fabricated runtime to fall back on.
36
+ */
37
+ export declare const useOptionalOxy: () => OxyContextState | null;
7
38
  //# sourceMappingURL=OxyContext.d.ts.map