@oxyhq/services 13.0.2 → 13.0.3

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 (362) hide show
  1. package/lib/commonjs/index.js +0 -11
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/AccountMenuButton.js +8 -10
  4. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
  5. package/lib/commonjs/ui/components/AccountSwitcher.js +65 -35
  6. package/lib/commonjs/ui/components/AccountSwitcher.js.map +1 -1
  7. package/lib/commonjs/ui/context/OxyContext.js +124 -93
  8. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  9. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -2
  10. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  11. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
  12. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +8 -7
  14. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  15. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +11 -6
  16. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
  18. package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -4
  19. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  20. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -7
  21. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  22. package/lib/commonjs/ui/screens/FileManagementScreen.js +13 -13
  23. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  24. package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -7
  25. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  26. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +5 -5
  27. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  28. package/lib/commonjs/ui/screens/ManageAccountScreen.js +17 -18
  29. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  30. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  31. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  32. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +9 -9
  33. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  34. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  35. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +4 -4
  37. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -6
  39. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
  41. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +4 -4
  43. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -4
  45. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  46. package/lib/module/index.js +0 -5
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/ui/components/AccountMenuButton.js +8 -10
  49. package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
  50. package/lib/module/ui/components/AccountSwitcher.js +65 -35
  51. package/lib/module/ui/components/AccountSwitcher.js.map +1 -1
  52. package/lib/module/ui/context/OxyContext.js +124 -93
  53. package/lib/module/ui/context/OxyContext.js.map +1 -1
  54. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -2
  55. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  56. package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
  57. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  58. package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -7
  59. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  60. package/lib/module/ui/screens/AccountSettingsScreen.js +11 -6
  61. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  62. package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
  63. package/lib/module/ui/screens/CreateAccountScreen.js +6 -4
  64. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  65. package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -7
  66. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  67. package/lib/module/ui/screens/FileManagementScreen.js +13 -13
  68. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  69. package/lib/module/ui/screens/HistoryViewScreen.js +7 -7
  70. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  71. package/lib/module/ui/screens/LanguageSelectorScreen.js +5 -5
  72. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  73. package/lib/module/ui/screens/ManageAccountScreen.js +17 -18
  74. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  75. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  76. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  77. package/lib/module/ui/screens/PrivacySettingsScreen.js +9 -9
  78. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  79. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  80. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  81. package/lib/module/ui/screens/SavesCollectionsScreen.js +4 -4
  82. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  83. package/lib/module/ui/screens/SearchSettingsScreen.js +6 -6
  84. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  85. package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
  86. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  87. package/lib/module/ui/screens/trust/TrustCenterScreen.js +4 -4
  88. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  89. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +4 -4
  90. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  91. package/lib/typescript/commonjs/index.d.ts +0 -1
  92. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +5 -7
  94. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
  97. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +2 -1
  99. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
  101. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
  103. package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -1
  105. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +2 -1
  107. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
  109. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
  110. package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +1 -1
  111. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +2 -1
  112. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +2 -1
  114. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +2 -1
  116. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +11 -26
  118. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
  120. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +3 -3
  124. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  127. package/lib/typescript/module/index.d.ts +60 -61
  128. package/lib/typescript/module/index.d.ts.map +1 -1
  129. package/lib/typescript/module/ui/client.d.ts +26 -26
  130. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  131. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +5 -7
  132. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
  133. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +1 -1
  134. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -1
  135. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +2 -2
  136. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
  137. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +1 -1
  138. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  139. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +4 -3
  140. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
  141. package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
  142. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
  144. package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
  145. package/lib/typescript/module/ui/components/Icon.d.ts +1 -1
  146. package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
  147. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
  148. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
  149. package/lib/typescript/module/ui/components/IconButton/utils.d.ts +1 -1
  150. package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +1 -1
  151. package/lib/typescript/module/ui/components/OxyPayButton.d.ts +1 -1
  152. package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
  153. package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
  154. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  155. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +2 -2
  156. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/components/Surface.d.ts +2 -2
  158. package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +3 -2
  160. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +3 -2
  162. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +3 -3
  164. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +3 -3
  166. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +4 -4
  168. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
  170. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +1 -1
  172. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
  173. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +2 -2
  174. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +1 -1
  175. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +3 -2
  176. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  177. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +3 -2
  178. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  179. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +3 -2
  180. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/components/TextField/helpers.d.ts +3 -3
  182. package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
  183. package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
  184. package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
  185. package/lib/typescript/module/ui/components/TextField.d.ts +4 -4
  186. package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
  187. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +3 -3
  188. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  189. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +3 -3
  190. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +1 -1
  192. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +3 -3
  194. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
  195. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +1 -1
  196. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +1 -1
  198. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +1 -1
  199. package/lib/typescript/module/ui/components/feedback/constants.d.ts +1 -1
  200. package/lib/typescript/module/ui/components/feedback/constants.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts +1 -1
  202. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts.map +1 -1
  203. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  204. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
  206. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  207. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
  208. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  209. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
  210. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  211. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
  212. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  213. package/lib/typescript/module/ui/components/payment/constants.d.ts +1 -1
  214. package/lib/typescript/module/ui/components/payment/constants.d.ts.map +1 -1
  215. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +1 -1
  216. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
  217. package/lib/typescript/module/ui/components/theming.d.ts +1 -1
  218. package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
  219. package/lib/typescript/module/ui/context/OxyContext.d.ts +14 -29
  220. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
  222. package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
  223. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -2
  224. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  225. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +1 -1
  226. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  227. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/hooks/queryClient.d.ts +1 -1
  229. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
  230. package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
  231. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
  233. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +1 -1
  235. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +1 -1
  237. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  238. package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
  239. package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
  240. package/lib/typescript/module/ui/index.d.ts +28 -28
  241. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  242. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
  243. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  244. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  245. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  246. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
  247. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  248. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +1 -1
  249. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  250. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +4 -4
  251. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  252. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts +1 -1
  253. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  254. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts +1 -1
  255. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  256. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +1 -1
  257. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  258. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts +1 -1
  259. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  260. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +1 -1
  261. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  262. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
  263. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  264. package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
  265. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  266. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
  267. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  268. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts +1 -1
  269. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
  271. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
  273. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  274. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts +1 -1
  275. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  276. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts +1 -1
  277. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  278. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts +1 -1
  279. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  280. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
  281. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts +1 -1
  283. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  284. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  285. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  286. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +1 -1
  287. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  288. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +1 -1
  289. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  290. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +2 -2
  291. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +1 -1
  293. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  294. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
  295. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  296. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts +1 -1
  297. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts +1 -1
  299. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts +1 -1
  301. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts +1 -1
  303. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts +1 -1
  305. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
  307. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  309. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +1 -1
  311. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +1 -1
  313. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts +1 -1
  315. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  316. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +1 -1
  317. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +1 -1
  319. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +1 -1
  321. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  322. package/lib/typescript/module/ui/server.d.ts +2 -2
  323. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
  325. package/lib/typescript/module/ui/types/fileManagement.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  327. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
  329. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  330. package/package.json +21 -20
  331. package/src/index.ts +0 -5
  332. package/src/ui/components/AccountMenuButton.tsx +9 -11
  333. package/src/ui/components/AccountSwitcher.tsx +71 -37
  334. package/src/ui/context/OxyContext.tsx +127 -122
  335. package/src/ui/hooks/queries/useAccountQueries.ts +2 -2
  336. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  337. package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
  338. package/src/ui/screens/AccountSettingsScreen.tsx +9 -5
  339. package/src/ui/screens/AccountSwitcherScreen.tsx +3 -3
  340. package/src/ui/screens/CreateAccountScreen.tsx +6 -4
  341. package/src/ui/screens/EditProfileFieldScreen.tsx +8 -7
  342. package/src/ui/screens/FileManagementScreen.tsx +13 -13
  343. package/src/ui/screens/HistoryViewScreen.tsx +7 -7
  344. package/src/ui/screens/LanguageSelectorScreen.tsx +5 -5
  345. package/src/ui/screens/ManageAccountScreen.tsx +17 -18
  346. package/src/ui/screens/PremiumSubscriptionScreen.tsx +3 -3
  347. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -9
  348. package/src/ui/screens/ProfileScreen.tsx +1 -1
  349. package/src/ui/screens/SavesCollectionsScreen.tsx +5 -5
  350. package/src/ui/screens/SearchSettingsScreen.tsx +6 -6
  351. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  352. package/src/ui/screens/trust/TrustCenterScreen.tsx +5 -5
  353. package/src/ui/screens/trust/TrustRewardsScreen.tsx +4 -4
  354. package/lib/commonjs/ui/components/ActiveAccountBanner.js +0 -144
  355. package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +0 -1
  356. package/lib/module/ui/components/ActiveAccountBanner.js +0 -141
  357. package/lib/module/ui/components/ActiveAccountBanner.js.map +0 -1
  358. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts +0 -4
  359. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  360. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts +0 -4
  361. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  362. package/src/ui/components/ActiveAccountBanner.tsx +0 -130
@@ -22,9 +22,9 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
22
22
  goBack,
23
23
  }) => {
24
24
  // Search settings are persisted on the ACTIVE account's profile (the
25
- // org/project/bot when switched, else the personal user); the read/write
26
- // route to it via the X-Acting-As header.
27
- const { oxyServices, activeAccount } = useOxy();
25
+ // org/project/bot when switched, else the personal user); reads/writes
26
+ // authenticate as the active session, which IS that account.
27
+ const { oxyServices, user } = useOxy();
28
28
  const { t } = useI18n();
29
29
  const bloomTheme = useTheme();
30
30
  const [isLoading, setIsLoading] = useState(true);
@@ -33,7 +33,7 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
33
33
  const { values: settings, toggle, savingKeys, setValues } = useSettingToggles<SearchSettings>({
34
34
  initialValues: { safeSearch: false, searchPersonalization: true },
35
35
  onSave: async (key, value) => {
36
- if (!activeAccount?.id || !oxyServices) return;
36
+ if (!user?.id || !oxyServices) return;
37
37
 
38
38
  const fieldMap: Record<keyof SearchSettings, string> = {
39
39
  safeSearch: 'autoFilter',
@@ -56,7 +56,7 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
56
56
  const loadSettings = async () => {
57
57
  try {
58
58
  setIsLoading(true);
59
- if (activeAccount?.id && oxyServices) {
59
+ if (user?.id && oxyServices) {
60
60
  const userData = await oxyServices.getCurrentUser() as User & { privacySettings?: { autoFilter?: boolean; dataSharing?: boolean } };
61
61
  const privacySettings = userData?.privacySettings || {};
62
62
 
@@ -75,7 +75,7 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
75
75
  };
76
76
 
77
77
  loadSettings();
78
- }, [activeAccount?.id, oxyServices, setValues]);
78
+ }, [user?.id, oxyServices, setValues]);
79
79
 
80
80
  if (isLoading) {
81
81
  return (
@@ -65,12 +65,12 @@ const WelcomeNewUserScreen: React.FC<BaseScreenProps & { newUser?: any }> = ({
65
65
  }) => {
66
66
  // Use useOxy() hook for OxyContext values. The greeting/avatar identity is
67
67
  // the ACTIVE account (the personal user during onboarding, but read through
68
- // `activeAccount` so this stays correct everywhere), with the freshly
68
+ // `user` so this stays correct everywhere), with the freshly
69
69
  // registered `newUser` as the pre-store-hydration fallback.
70
- const { activeAccount, oxyServices } = useOxy();
70
+ const { user, oxyServices } = useOxy();
71
71
  const { t, locale } = useI18n();
72
72
  const updateProfileMutation = useUpdateProfile();
73
- const currentUser = activeAccount || newUser; // fallback
73
+ const currentUser = user || newUser; // fallback
74
74
  const bloomTheme = useTheme();
75
75
  const colors = {
76
76
  primary: bloomTheme.colors.primary,
@@ -93,12 +93,12 @@ const WelcomeNewUserScreen: React.FC<BaseScreenProps & { newUser?: any }> = ({
93
93
 
94
94
  // Update selectedAvatarId when the active account's avatar changes
95
95
  useEffect(() => {
96
- if (activeAccount?.avatar) {
97
- setSelectedAvatarId(activeAccount.avatar);
96
+ if (user?.avatar) {
97
+ setSelectedAvatarId(user.avatar);
98
98
  } else if (newUser?.avatar) {
99
99
  setSelectedAvatarId(newUser.avatar);
100
100
  }
101
- }, [activeAccount?.avatar, newUser?.avatar]);
101
+ }, [user?.avatar, newUser?.avatar]);
102
102
 
103
103
  const avatarUri = selectedAvatarId ? oxyServices.getFileDownloadUrl(selectedAvatarId, 'thumb') : undefined;
104
104
 
@@ -22,7 +22,7 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
22
22
  }) => {
23
23
  // Reputation/trust is the ACTIVE account's standing (the org/project/bot
24
24
  // when switched, else the personal user).
25
- const { activeAccount, oxyServices, isAuthenticated } = useOxy();
25
+ const { user, oxyServices, isAuthenticated } = useOxy();
26
26
  const { t } = useI18n();
27
27
  const [reputationTotal, setReputationTotal] = useState<number | null>(null);
28
28
  const [trustTier, setTrustTier] = useState<TrustTier | null>(null);
@@ -34,12 +34,12 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
34
34
  const primaryColor = bloomTheme.colors.primary;
35
35
 
36
36
  useEffect(() => {
37
- if (!activeAccount) return;
37
+ if (!user) return;
38
38
  setIsLoading(true);
39
39
  setError(null);
40
40
  Promise.all([
41
- oxyServices.getReputationBalance(activeAccount.id),
42
- oxyServices.getReputationTransactions(activeAccount.id, 20, 0),
41
+ oxyServices.getReputationBalance(user.id),
42
+ oxyServices.getReputationTransactions(user.id, 20, 0),
43
43
  ])
44
44
  .then(([balance, txns]) => {
45
45
  setReputationTotal(balance.total);
@@ -53,7 +53,7 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
53
53
  );
54
54
  })
55
55
  .finally(() => setIsLoading(false));
56
- }, [activeAccount, oxyServices, t]);
56
+ }, [user, oxyServices, t]);
57
57
 
58
58
  const trustTierLabel = useMemo(
59
59
  () => (trustTier ? getTrustTierLabel(trustTier, t) : null),
@@ -79,7 +79,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
79
79
  const { t } = useI18n();
80
80
  // Reputation/trust is the ACTIVE account's standing (the org/project/bot
81
81
  // when switched, else the personal user).
82
- const { activeAccount, oxyServices, isAuthenticated } = useOxy();
82
+ const { user, oxyServices, isAuthenticated } = useOxy();
83
83
  const [reputationTotal, setReputationTotal] = useState<number>(0);
84
84
  const [, setIsLoading] = useState(true);
85
85
 
@@ -87,12 +87,12 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
87
87
  const colors = bloomTheme.colors;
88
88
 
89
89
  useEffect(() => {
90
- if (!activeAccount || !isAuthenticated) {
90
+ if (!user || !isAuthenticated) {
91
91
  setIsLoading(false);
92
92
  return;
93
93
  }
94
94
  setIsLoading(true);
95
- oxyServices.getReputationBalance(activeAccount.id)
95
+ oxyServices.getReputationBalance(user.id)
96
96
  .then((balance) => {
97
97
  setReputationTotal(balance.total || 0);
98
98
  })
@@ -100,7 +100,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
100
100
  setReputationTotal(0);
101
101
  })
102
102
  .finally(() => setIsLoading(false));
103
- }, [activeAccount, isAuthenticated, oxyServices]);
103
+ }, [user, isAuthenticated, oxyServices]);
104
104
 
105
105
  const achievements: Achievement[] = useMemo(() => [
106
106
  {
@@ -1,144 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _vectorIcons = require("@expo/vector-icons");
10
- var _theme = require("@oxyhq/bloom/theme");
11
- var _OxyContext = require("../context/OxyContext.js");
12
- var _core = require("@oxyhq/core");
13
- var _useI18n = require("../hooks/useI18n.js");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- /**
17
- * ActiveAccountBanner — a subtle context cue shown when the active account is an
18
- * account the user switched INTO (an org / project / bot / shared account)
19
- * rather than their own personal account.
20
- *
21
- * Framing: this reads as the CURRENT account, NOT as delegation. There is no
22
- * "acting as" / "on behalf of" copy and no "switch back" affordance — switching
23
- * into an account makes the whole app become that account, and the banner simply
24
- * confirms which account is active. To change accounts (including returning to
25
- * the personal account) the user opens the unified account switcher and picks
26
- * one; tapping the banner opens it.
27
- *
28
- * Renders nothing on the personal account. Place it in your app's layout where a
29
- * persistent "you're in <Account>" cue is useful (typically below the header).
30
- * The "account" here is the relational Account, NOT the cryptographic
31
- * Commons/DID identity.
32
- */const ActiveAccountBanner = () => {
33
- const bloomTheme = (0, _theme.useTheme)();
34
- const {
35
- actingAsAccount,
36
- showBottomSheet,
37
- oxyServices
38
- } = (0, _OxyContext.useOxy)();
39
- const {
40
- t,
41
- locale
42
- } = (0, _useI18n.useI18n)();
43
- const account = actingAsAccount?.account ?? null;
44
-
45
- // Only a switched-into account warrants the cue; the personal account is the
46
- // default and needs no banner.
47
- if (!account) {
48
- return null;
49
- }
50
- const displayName = (0, _core.getAccountDisplayName)(account, locale);
51
- const handlePress = () => {
52
- showBottomSheet?.('AccountSwitcher');
53
- };
54
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
55
- style: [styles.container, {
56
- backgroundColor: `${bloomTheme.colors.primary}14`
57
- }],
58
- onPress: handlePress,
59
- activeOpacity: 0.7,
60
- accessibilityRole: "button",
61
- accessibilityLabel: t('accounts.activeAccount.a11y', {
62
- name: displayName
63
- }) || `Active account: ${displayName}. Tap to switch accounts.`,
64
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
65
- style: styles.content,
66
- children: [account.avatar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
67
- source: {
68
- uri: oxyServices.getFileDownloadUrl(account.avatar, 'thumb')
69
- },
70
- style: styles.avatar
71
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
72
- style: [styles.avatarFallback, {
73
- backgroundColor: `${bloomTheme.colors.primary}30`
74
- }],
75
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
76
- style: [styles.avatarText, {
77
- color: bloomTheme.colors.primary
78
- }],
79
- children: displayName.charAt(0).toUpperCase()
80
- })
81
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
82
- style: styles.textContainer,
83
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
84
- style: [styles.name, {
85
- color: bloomTheme.colors.primary
86
- }],
87
- numberOfLines: 1,
88
- children: displayName
89
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
90
- style: [styles.caption, {
91
- color: bloomTheme.colors.primary
92
- }],
93
- numberOfLines: 1,
94
- children: t('accounts.activeAccount.label') || 'Active account'
95
- })]
96
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
97
- name: "chevron-down",
98
- size: 18,
99
- color: bloomTheme.colors.primary
100
- })]
101
- })
102
- });
103
- };
104
- const styles = _reactNative.StyleSheet.create({
105
- container: {
106
- paddingHorizontal: 16,
107
- paddingVertical: 10
108
- },
109
- content: {
110
- flexDirection: 'row',
111
- alignItems: 'center'
112
- },
113
- avatar: {
114
- width: 24,
115
- height: 24,
116
- borderRadius: 12
117
- },
118
- avatarFallback: {
119
- width: 24,
120
- height: 24,
121
- borderRadius: 12,
122
- alignItems: 'center',
123
- justifyContent: 'center'
124
- },
125
- avatarText: {
126
- fontSize: 12,
127
- fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined
128
- },
129
- textContainer: {
130
- flex: 1,
131
- marginLeft: 10
132
- },
133
- name: {
134
- fontSize: 14,
135
- fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined
136
- },
137
- caption: {
138
- fontSize: 11,
139
- opacity: 0.8,
140
- marginTop: 1
141
- }
142
- });
143
- var _default = exports.default = /*#__PURE__*/_react.default.memo(ActiveAccountBanner);
144
- //# sourceMappingURL=ActiveAccountBanner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_vectorIcons","_theme","_OxyContext","_core","_useI18n","_jsxRuntime","e","__esModule","default","ActiveAccountBanner","bloomTheme","useTheme","actingAsAccount","showBottomSheet","oxyServices","useOxy","t","locale","useI18n","account","displayName","getAccountDisplayName","handlePress","jsx","TouchableOpacity","style","styles","container","backgroundColor","colors","primary","onPress","activeOpacity","accessibilityRole","accessibilityLabel","name","children","jsxs","View","content","avatar","Image","source","uri","getFileDownloadUrl","avatarFallback","Text","avatarText","color","charAt","toUpperCase","textContainer","numberOfLines","caption","Ionicons","size","StyleSheet","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","width","height","borderRadius","justifyContent","fontSize","fontWeight","Platform","OS","undefined","flex","marginLeft","opacity","marginTop","_default","exports","React","memo"],"sourceRoot":"../../../../src","sources":["ui/components/ActiveAccountBanner.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EA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AC,OAAA,CAAApE,OAAA,gBAEYqE,cAAK,CAACC,IAAI,CAACrE,mBAAmB,CAAC","ignoreList":[]}
@@ -1,141 +0,0 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, Text, TouchableOpacity, StyleSheet, Platform, Image } from 'react-native';
5
- import { Ionicons } from '@expo/vector-icons';
6
- import { useTheme } from '@oxyhq/bloom/theme';
7
- import { useOxy } from "../context/OxyContext.js";
8
- import { getAccountDisplayName } from '@oxyhq/core';
9
- import { useI18n } from "../hooks/useI18n.js";
10
-
11
- /**
12
- * ActiveAccountBanner — a subtle context cue shown when the active account is an
13
- * account the user switched INTO (an org / project / bot / shared account)
14
- * rather than their own personal account.
15
- *
16
- * Framing: this reads as the CURRENT account, NOT as delegation. There is no
17
- * "acting as" / "on behalf of" copy and no "switch back" affordance — switching
18
- * into an account makes the whole app become that account, and the banner simply
19
- * confirms which account is active. To change accounts (including returning to
20
- * the personal account) the user opens the unified account switcher and picks
21
- * one; tapping the banner opens it.
22
- *
23
- * Renders nothing on the personal account. Place it in your app's layout where a
24
- * persistent "you're in <Account>" cue is useful (typically below the header).
25
- * The "account" here is the relational Account, NOT the cryptographic
26
- * Commons/DID identity.
27
- */
28
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
- const ActiveAccountBanner = () => {
30
- const bloomTheme = useTheme();
31
- const {
32
- actingAsAccount,
33
- showBottomSheet,
34
- oxyServices
35
- } = useOxy();
36
- const {
37
- t,
38
- locale
39
- } = useI18n();
40
- const account = actingAsAccount?.account ?? null;
41
-
42
- // Only a switched-into account warrants the cue; the personal account is the
43
- // default and needs no banner.
44
- if (!account) {
45
- return null;
46
- }
47
- const displayName = getAccountDisplayName(account, locale);
48
- const handlePress = () => {
49
- showBottomSheet?.('AccountSwitcher');
50
- };
51
- return /*#__PURE__*/_jsx(TouchableOpacity, {
52
- style: [styles.container, {
53
- backgroundColor: `${bloomTheme.colors.primary}14`
54
- }],
55
- onPress: handlePress,
56
- activeOpacity: 0.7,
57
- accessibilityRole: "button",
58
- accessibilityLabel: t('accounts.activeAccount.a11y', {
59
- name: displayName
60
- }) || `Active account: ${displayName}. Tap to switch accounts.`,
61
- children: /*#__PURE__*/_jsxs(View, {
62
- style: styles.content,
63
- children: [account.avatar ? /*#__PURE__*/_jsx(Image, {
64
- source: {
65
- uri: oxyServices.getFileDownloadUrl(account.avatar, 'thumb')
66
- },
67
- style: styles.avatar
68
- }) : /*#__PURE__*/_jsx(View, {
69
- style: [styles.avatarFallback, {
70
- backgroundColor: `${bloomTheme.colors.primary}30`
71
- }],
72
- children: /*#__PURE__*/_jsx(Text, {
73
- style: [styles.avatarText, {
74
- color: bloomTheme.colors.primary
75
- }],
76
- children: displayName.charAt(0).toUpperCase()
77
- })
78
- }), /*#__PURE__*/_jsxs(View, {
79
- style: styles.textContainer,
80
- children: [/*#__PURE__*/_jsx(Text, {
81
- style: [styles.name, {
82
- color: bloomTheme.colors.primary
83
- }],
84
- numberOfLines: 1,
85
- children: displayName
86
- }), /*#__PURE__*/_jsx(Text, {
87
- style: [styles.caption, {
88
- color: bloomTheme.colors.primary
89
- }],
90
- numberOfLines: 1,
91
- children: t('accounts.activeAccount.label') || 'Active account'
92
- })]
93
- }), /*#__PURE__*/_jsx(Ionicons, {
94
- name: "chevron-down",
95
- size: 18,
96
- color: bloomTheme.colors.primary
97
- })]
98
- })
99
- });
100
- };
101
- const styles = StyleSheet.create({
102
- container: {
103
- paddingHorizontal: 16,
104
- paddingVertical: 10
105
- },
106
- content: {
107
- flexDirection: 'row',
108
- alignItems: 'center'
109
- },
110
- avatar: {
111
- width: 24,
112
- height: 24,
113
- borderRadius: 12
114
- },
115
- avatarFallback: {
116
- width: 24,
117
- height: 24,
118
- borderRadius: 12,
119
- alignItems: 'center',
120
- justifyContent: 'center'
121
- },
122
- avatarText: {
123
- fontSize: 12,
124
- fontWeight: Platform.OS === 'web' ? '600' : undefined
125
- },
126
- textContainer: {
127
- flex: 1,
128
- marginLeft: 10
129
- },
130
- name: {
131
- fontSize: 14,
132
- fontWeight: Platform.OS === 'web' ? '600' : undefined
133
- },
134
- caption: {
135
- fontSize: 11,
136
- opacity: 0.8,
137
- marginTop: 1
138
- }
139
- });
140
- export default /*#__PURE__*/React.memo(ActiveAccountBanner);
141
- //# sourceMappingURL=ActiveAccountBanner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","View","Text","TouchableOpacity","StyleSheet","Platform","Image","Ionicons","useTheme","useOxy","getAccountDisplayName","useI18n","jsx","_jsx","jsxs","_jsxs","ActiveAccountBanner","bloomTheme","actingAsAccount","showBottomSheet","oxyServices","t","locale","account","displayName","handlePress","style","styles","container","backgroundColor","colors","primary","onPress","activeOpacity","accessibilityRole","accessibilityLabel","name","children","content","avatar","source","uri","getFileDownloadUrl","avatarFallback","avatarText","color","charAt","toUpperCase","textContainer","numberOfLines","caption","size","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","width","height","borderRadius","justifyContent","fontSize","fontWeight","OS","undefined","flex","marginLeft","opacity","marginTop","memo"],"sourceRoot":"../../../../src","sources":["ui/components/ActiveAccountBanner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,EACRC,KAAK,QACA,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,OAAO,QAAQ,qBAAkB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiBA,MAAMC,mBAA6B,GAAGA,CAAA,KAAM;EAC1C,MAAMC,UAAU,GAAGT,QAAQ,CAAC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;IACNkB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE;EAChB,CAAC;EACDhB,cAAc,EAAE;IACdc,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBH,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE;EAClB,CAAC;EACDhB,UAAU,EAAE;IACViB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEzD,QAAQ,CAAC0D,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDhB,aAAa,EAAE;IACbiB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACD9B,IAAI,EAAE;IACJyB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEzD,QAAQ,CAAC0D,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDd,OAAO,EAAE;IACPW,QAAQ,EAAE,EAAE;IACZM,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,4BAAepE,KAAK,CAACqE,IAAI,CAACrD,mBAAmB,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{}>;
3
- export default _default;
4
- //# sourceMappingURL=ActiveAccountBanner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActiveAccountBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActiveAccountBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAiI1B,wBAA+C"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{}>;
3
- export default _default;
4
- //# sourceMappingURL=ActiveAccountBanner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActiveAccountBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActiveAccountBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAiI1B,wBAA+C"}
@@ -1,130 +0,0 @@
1
- import React from 'react';
2
- import {
3
- View,
4
- Text,
5
- TouchableOpacity,
6
- StyleSheet,
7
- Platform,
8
- Image,
9
- } from 'react-native';
10
- import { Ionicons } from '@expo/vector-icons';
11
- import { useTheme } from '@oxyhq/bloom/theme';
12
- import { useOxy } from '../context/OxyContext';
13
- import { getAccountDisplayName } from '@oxyhq/core';
14
- import { useI18n } from '../hooks/useI18n';
15
-
16
- /**
17
- * ActiveAccountBanner — a subtle context cue shown when the active account is an
18
- * account the user switched INTO (an org / project / bot / shared account)
19
- * rather than their own personal account.
20
- *
21
- * Framing: this reads as the CURRENT account, NOT as delegation. There is no
22
- * "acting as" / "on behalf of" copy and no "switch back" affordance — switching
23
- * into an account makes the whole app become that account, and the banner simply
24
- * confirms which account is active. To change accounts (including returning to
25
- * the personal account) the user opens the unified account switcher and picks
26
- * one; tapping the banner opens it.
27
- *
28
- * Renders nothing on the personal account. Place it in your app's layout where a
29
- * persistent "you're in <Account>" cue is useful (typically below the header).
30
- * The "account" here is the relational Account, NOT the cryptographic
31
- * Commons/DID identity.
32
- */
33
- const ActiveAccountBanner: React.FC = () => {
34
- const bloomTheme = useTheme();
35
- const { actingAsAccount, showBottomSheet, oxyServices } = useOxy();
36
- const { t, locale } = useI18n();
37
-
38
- const account = actingAsAccount?.account ?? null;
39
-
40
- // Only a switched-into account warrants the cue; the personal account is the
41
- // default and needs no banner.
42
- if (!account) {
43
- return null;
44
- }
45
-
46
- const displayName = getAccountDisplayName(account, locale);
47
-
48
- const handlePress = () => {
49
- showBottomSheet?.('AccountSwitcher');
50
- };
51
-
52
- return (
53
- <TouchableOpacity
54
- style={[styles.container, { backgroundColor: `${bloomTheme.colors.primary}14` }]}
55
- onPress={handlePress}
56
- activeOpacity={0.7}
57
- accessibilityRole="button"
58
- accessibilityLabel={
59
- t('accounts.activeAccount.a11y', { name: displayName })
60
- || `Active account: ${displayName}. Tap to switch accounts.`
61
- }
62
- >
63
- <View style={styles.content}>
64
- {account.avatar ? (
65
- <Image
66
- source={{ uri: oxyServices.getFileDownloadUrl(account.avatar, 'thumb') }}
67
- style={styles.avatar}
68
- />
69
- ) : (
70
- <View style={[styles.avatarFallback, { backgroundColor: `${bloomTheme.colors.primary}30` }]}>
71
- <Text style={[styles.avatarText, { color: bloomTheme.colors.primary }]}>
72
- {displayName.charAt(0).toUpperCase()}
73
- </Text>
74
- </View>
75
- )}
76
- <View style={styles.textContainer}>
77
- <Text style={[styles.name, { color: bloomTheme.colors.primary }]} numberOfLines={1}>
78
- {displayName}
79
- </Text>
80
- <Text style={[styles.caption, { color: bloomTheme.colors.primary }]} numberOfLines={1}>
81
- {t('accounts.activeAccount.label') || 'Active account'}
82
- </Text>
83
- </View>
84
- <Ionicons name="chevron-down" size={18} color={bloomTheme.colors.primary} />
85
- </View>
86
- </TouchableOpacity>
87
- );
88
- };
89
-
90
- const styles = StyleSheet.create({
91
- container: {
92
- paddingHorizontal: 16,
93
- paddingVertical: 10,
94
- },
95
- content: {
96
- flexDirection: 'row',
97
- alignItems: 'center',
98
- },
99
- avatar: {
100
- width: 24,
101
- height: 24,
102
- borderRadius: 12,
103
- },
104
- avatarFallback: {
105
- width: 24,
106
- height: 24,
107
- borderRadius: 12,
108
- alignItems: 'center',
109
- justifyContent: 'center',
110
- },
111
- avatarText: {
112
- fontSize: 12,
113
- fontWeight: Platform.OS === 'web' ? '600' : undefined,
114
- },
115
- textContainer: {
116
- flex: 1,
117
- marginLeft: 10,
118
- },
119
- name: {
120
- fontSize: 14,
121
- fontWeight: Platform.OS === 'web' ? '600' : undefined,
122
- },
123
- caption: {
124
- fontSize: 11,
125
- opacity: 0.8,
126
- marginTop: 1,
127
- },
128
- });
129
-
130
- export default React.memo(ActiveAccountBanner);