@oxyhq/services 13.0.2 → 13.1.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 (403) hide show
  1. package/lib/commonjs/index.js +18 -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/components/ProfileButton.js +233 -0
  8. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -0
  9. package/lib/commonjs/ui/components/ProfileMenu.js +374 -0
  10. package/lib/commonjs/ui/components/ProfileMenu.js.map +1 -0
  11. package/lib/commonjs/ui/context/OxyContext.js +213 -101
  12. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  13. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +28 -1
  14. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  15. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -2
  16. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  17. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
  18. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  19. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +8 -7
  20. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  21. package/lib/commonjs/ui/index.js +14 -0
  22. package/lib/commonjs/ui/index.js.map +1 -1
  23. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +11 -6
  24. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
  26. package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -4
  27. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  28. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -7
  29. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  30. package/lib/commonjs/ui/screens/FileManagementScreen.js +13 -13
  31. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  32. package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -7
  33. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  34. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +5 -5
  35. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/ManageAccountScreen.js +17 -18
  37. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  39. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +9 -9
  41. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  43. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +4 -4
  45. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -6
  47. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  48. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
  49. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +4 -4
  51. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -4
  53. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  54. package/lib/commonjs/ui/utils/activeAuthuser.js +76 -8
  55. package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
  56. package/lib/module/index.js +5 -5
  57. package/lib/module/index.js.map +1 -1
  58. package/lib/module/ui/components/AccountMenuButton.js +8 -10
  59. package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
  60. package/lib/module/ui/components/AccountSwitcher.js +65 -35
  61. package/lib/module/ui/components/AccountSwitcher.js.map +1 -1
  62. package/lib/module/ui/components/ProfileButton.js +228 -0
  63. package/lib/module/ui/components/ProfileButton.js.map +1 -0
  64. package/lib/module/ui/components/ProfileMenu.js +370 -0
  65. package/lib/module/ui/components/ProfileMenu.js.map +1 -0
  66. package/lib/module/ui/context/OxyContext.js +214 -102
  67. package/lib/module/ui/context/OxyContext.js.map +1 -1
  68. package/lib/module/ui/context/hooks/useAuthOperations.js +29 -2
  69. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  70. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -2
  71. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  72. package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
  73. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  74. package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -7
  75. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  76. package/lib/module/ui/index.js +2 -0
  77. package/lib/module/ui/index.js.map +1 -1
  78. package/lib/module/ui/screens/AccountSettingsScreen.js +11 -6
  79. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  80. package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
  81. package/lib/module/ui/screens/CreateAccountScreen.js +6 -4
  82. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  83. package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -7
  84. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  85. package/lib/module/ui/screens/FileManagementScreen.js +13 -13
  86. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  87. package/lib/module/ui/screens/HistoryViewScreen.js +7 -7
  88. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  89. package/lib/module/ui/screens/LanguageSelectorScreen.js +5 -5
  90. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  91. package/lib/module/ui/screens/ManageAccountScreen.js +17 -18
  92. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  93. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  94. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  95. package/lib/module/ui/screens/PrivacySettingsScreen.js +9 -9
  96. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  97. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  98. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  99. package/lib/module/ui/screens/SavesCollectionsScreen.js +4 -4
  100. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  101. package/lib/module/ui/screens/SearchSettingsScreen.js +6 -6
  102. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  103. package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
  104. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  105. package/lib/module/ui/screens/trust/TrustCenterScreen.js +4 -4
  106. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  107. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +4 -4
  108. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  109. package/lib/module/ui/utils/activeAuthuser.js +74 -9
  110. package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
  111. package/lib/typescript/commonjs/index.d.ts +4 -1
  112. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +5 -7
  114. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
  117. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +2 -1
  119. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
  121. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
  123. package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +46 -0
  125. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts +39 -0
  127. package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -1
  129. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +2 -1
  131. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
  133. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
  134. package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +1 -1
  135. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +2 -1
  136. package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +2 -1
  138. package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +2 -1
  140. package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +11 -26
  142. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
  144. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/ui/index.d.ts +2 -0
  148. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +3 -3
  151. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +24 -0
  155. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
  156. package/lib/typescript/module/index.d.ts +64 -61
  157. package/lib/typescript/module/index.d.ts.map +1 -1
  158. package/lib/typescript/module/ui/client.d.ts +26 -26
  159. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  160. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +5 -7
  161. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
  162. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +1 -1
  163. package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -1
  164. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +2 -2
  165. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +1 -1
  167. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  168. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +4 -3
  169. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
  171. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
  172. package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
  173. package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
  174. package/lib/typescript/module/ui/components/Icon.d.ts +1 -1
  175. package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
  176. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
  177. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
  178. package/lib/typescript/module/ui/components/IconButton/utils.d.ts +1 -1
  179. package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +1 -1
  180. package/lib/typescript/module/ui/components/OxyPayButton.d.ts +1 -1
  181. package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
  182. package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
  183. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  184. package/lib/typescript/module/ui/components/ProfileButton.d.ts +46 -0
  185. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -0
  186. package/lib/typescript/module/ui/components/ProfileMenu.d.ts +39 -0
  187. package/lib/typescript/module/ui/components/ProfileMenu.d.ts.map +1 -0
  188. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +2 -2
  189. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  190. package/lib/typescript/module/ui/components/Surface.d.ts +2 -2
  191. package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
  192. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +3 -2
  193. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  194. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +3 -2
  195. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  196. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +3 -3
  197. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
  198. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +3 -3
  199. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
  200. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +4 -4
  201. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
  202. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
  203. package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
  204. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +1 -1
  205. package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
  206. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +2 -2
  207. package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +1 -1
  208. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +3 -2
  209. package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
  210. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +3 -2
  211. package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
  212. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +3 -2
  213. package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
  214. package/lib/typescript/module/ui/components/TextField/helpers.d.ts +3 -3
  215. package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
  216. package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
  217. package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
  218. package/lib/typescript/module/ui/components/TextField.d.ts +4 -4
  219. package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
  220. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +3 -3
  221. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  222. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +3 -3
  223. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  224. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +1 -1
  225. package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +1 -1
  226. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +3 -3
  227. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +1 -1
  229. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
  230. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +1 -1
  231. package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/components/feedback/constants.d.ts +1 -1
  233. package/lib/typescript/module/ui/components/feedback/constants.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts +1 -1
  235. package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  237. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  238. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
  239. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  240. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
  241. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  242. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
  243. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  244. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
  245. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  246. package/lib/typescript/module/ui/components/payment/constants.d.ts +1 -1
  247. package/lib/typescript/module/ui/components/payment/constants.d.ts.map +1 -1
  248. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +1 -1
  249. package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
  250. package/lib/typescript/module/ui/components/theming.d.ts +1 -1
  251. package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
  252. package/lib/typescript/module/ui/context/OxyContext.d.ts +14 -29
  253. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  254. package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
  255. package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
  256. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -2
  257. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  258. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +1 -1
  259. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  260. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  261. package/lib/typescript/module/ui/hooks/queryClient.d.ts +1 -1
  262. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
  263. package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
  264. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  265. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
  266. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  267. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +1 -1
  268. package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
  269. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +1 -1
  270. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  271. package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
  272. package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/index.d.ts +30 -28
  274. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  275. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
  276. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  277. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  278. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  279. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
  280. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +1 -1
  282. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  283. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +4 -4
  284. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  285. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts +1 -1
  286. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  287. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts +1 -1
  288. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  289. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +1 -1
  290. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  291. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts +1 -1
  292. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  293. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +1 -1
  294. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  295. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
  296. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  297. package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
  298. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  299. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
  300. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  301. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts +1 -1
  302. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  303. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
  304. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
  306. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts +1 -1
  308. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts +1 -1
  310. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  311. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts +1 -1
  312. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
  314. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts +1 -1
  316. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  317. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  318. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  319. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +1 -1
  320. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  321. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +1 -1
  322. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  323. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +2 -2
  324. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  325. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +1 -1
  326. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  327. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
  328. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  329. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts +1 -1
  330. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts +1 -1
  332. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts +1 -1
  334. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts +1 -1
  336. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  337. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts +1 -1
  338. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
  340. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  342. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +1 -1
  344. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +1 -1
  346. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts +1 -1
  348. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +1 -1
  350. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  351. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +1 -1
  352. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  353. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +1 -1
  354. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  355. package/lib/typescript/module/ui/server.d.ts +2 -2
  356. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  357. package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
  358. package/lib/typescript/module/ui/types/fileManagement.d.ts.map +1 -1
  359. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  360. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  361. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +24 -0
  362. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
  363. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
  364. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  365. package/package.json +21 -20
  366. package/src/index.ts +8 -5
  367. package/src/ui/components/AccountMenuButton.tsx +9 -11
  368. package/src/ui/components/AccountSwitcher.tsx +71 -37
  369. package/src/ui/components/ProfileButton.tsx +270 -0
  370. package/src/ui/components/ProfileMenu.tsx +416 -0
  371. package/src/ui/context/OxyContext.tsx +217 -130
  372. package/src/ui/context/hooks/useAuthOperations.ts +35 -2
  373. package/src/ui/hooks/queries/useAccountQueries.ts +2 -2
  374. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  375. package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
  376. package/src/ui/index.ts +2 -0
  377. package/src/ui/screens/AccountSettingsScreen.tsx +9 -5
  378. package/src/ui/screens/AccountSwitcherScreen.tsx +3 -3
  379. package/src/ui/screens/CreateAccountScreen.tsx +6 -4
  380. package/src/ui/screens/EditProfileFieldScreen.tsx +8 -7
  381. package/src/ui/screens/FileManagementScreen.tsx +13 -13
  382. package/src/ui/screens/HistoryViewScreen.tsx +7 -7
  383. package/src/ui/screens/LanguageSelectorScreen.tsx +5 -5
  384. package/src/ui/screens/ManageAccountScreen.tsx +17 -18
  385. package/src/ui/screens/PremiumSubscriptionScreen.tsx +3 -3
  386. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -9
  387. package/src/ui/screens/ProfileScreen.tsx +1 -1
  388. package/src/ui/screens/SavesCollectionsScreen.tsx +5 -5
  389. package/src/ui/screens/SearchSettingsScreen.tsx +6 -6
  390. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  391. package/src/ui/screens/trust/TrustCenterScreen.tsx +5 -5
  392. package/src/ui/screens/trust/TrustRewardsScreen.tsx +4 -4
  393. package/src/ui/utils/__tests__/activeAuthuser.test.ts +75 -0
  394. package/src/ui/utils/activeAuthuser.ts +74 -8
  395. package/lib/commonjs/ui/components/ActiveAccountBanner.js +0 -144
  396. package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +0 -1
  397. package/lib/module/ui/components/ActiveAccountBanner.js +0 -141
  398. package/lib/module/ui/components/ActiveAccountBanner.js.map +0 -1
  399. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts +0 -4
  400. package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  401. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts +0 -4
  402. package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +0 -1
  403. package/src/ui/components/ActiveAccountBanner.tsx +0 -130
@@ -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);