@oxy.so/services 6.2.0 → 8.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 (922) hide show
  1. package/README.md +80 -136
  2. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -21
  5. package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  7. package/lib/commonjs/assets/fonts/icons/manifest.json +5 -21
  8. package/lib/commonjs/index.js +21 -15
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/commonjs/ui/boot/runProviderColdBoot.js +2 -1
  11. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +2 -3
  13. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyAuthChooser.js +15 -32
  15. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
  17. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -1
  19. package/lib/commonjs/ui/components/ProfileButton.js +1 -1
  20. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  21. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +2 -2
  22. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  23. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +6 -17
  24. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
  25. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +1 -1
  26. package/lib/commonjs/ui/components/authChooser/primitives.js +1 -102
  27. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
  28. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
  29. package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -1
  30. package/lib/commonjs/ui/components/authChooser/styles.js +0 -33
  31. package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -1
  32. package/lib/commonjs/ui/components/authChooser/types.js +0 -8
  33. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
  34. package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +1 -1
  35. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +153 -58
  36. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -1
  37. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js +325 -0
  38. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -0
  39. package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js +52 -56
  40. package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
  41. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +48 -38
  42. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  43. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +141 -0
  44. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -0
  45. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +496 -201
  46. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
  47. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +211 -42
  48. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  49. package/lib/commonjs/ui/components/signIn/ReauthStep.js +186 -0
  50. package/lib/commonjs/ui/components/signIn/ReauthStep.js.map +1 -0
  51. package/lib/commonjs/ui/components/signIn/accountFlowParts.js +103 -26
  52. package/lib/commonjs/ui/components/signIn/accountFlowParts.js.map +1 -1
  53. package/lib/commonjs/ui/components/signIn/signInFlowStore.js +50 -0
  54. package/lib/commonjs/ui/components/signIn/signInFlowStore.js.map +1 -0
  55. package/lib/commonjs/ui/components/signIn/signInMethods.js +11 -25
  56. package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -1
  57. package/lib/commonjs/ui/context/OxyContext.js +125 -119
  58. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  59. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +11 -10
  60. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  61. package/lib/commonjs/ui/context/useOxyAccountGraph.js +4 -4
  62. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  63. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +1 -1
  64. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +19 -9
  65. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  66. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +4 -4
  67. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  68. package/lib/commonjs/ui/hooks/queries/queryKeys.js +23 -3
  69. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  70. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +8 -8
  71. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  72. package/lib/commonjs/ui/hooks/queries/useAuthMethods.js +27 -15
  73. package/lib/commonjs/ui/hooks/queries/useAuthMethods.js.map +1 -1
  74. package/lib/commonjs/ui/hooks/queries/useFileQueries.js +5 -2
  75. package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -1
  76. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +8 -8
  77. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  78. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +4 -3
  79. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  80. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -6
  81. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  82. package/lib/commonjs/ui/hooks/useAssets.js +36 -20
  83. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  84. package/lib/commonjs/ui/hooks/useAvatarPicker.js +6 -4
  85. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  86. package/lib/commonjs/ui/hooks/useDeviceManagement.js +5 -5
  87. package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -1
  88. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +2 -2
  89. package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -1
  90. package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +1 -4
  91. package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -1
  92. package/lib/commonjs/ui/hooks/useFollow.js +2 -2
  93. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  94. package/lib/commonjs/ui/hooks/useFollowTarget.js +5 -5
  95. package/lib/commonjs/ui/hooks/useFollowTarget.js.map +1 -1
  96. package/lib/commonjs/ui/hooks/useI18n.js +4 -1
  97. package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
  98. package/lib/commonjs/ui/hooks/useResolvedFileUrls.js +2 -2
  99. package/lib/commonjs/ui/hooks/useResolvedFileUrls.js.map +1 -1
  100. package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
  101. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  102. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +0 -16
  103. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  104. package/lib/commonjs/ui/navigation/routes.js +6 -4
  105. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  106. package/lib/commonjs/ui/navigation/surfaceRegistry.js +1 -1
  107. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  108. package/lib/commonjs/ui/oauth/browserBridge.js +247 -0
  109. package/lib/commonjs/ui/oauth/browserBridge.js.map +1 -0
  110. package/lib/commonjs/ui/oauth/completeOAuthCode.js +1 -1
  111. package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -1
  112. package/lib/commonjs/ui/oauth/explicitOAuthConsent.js +1 -1
  113. package/lib/commonjs/ui/oauth/explicitOAuthConsent.js.map +1 -1
  114. package/lib/commonjs/ui/runtime/createOxyRuntime.js +9 -8
  115. package/lib/commonjs/ui/runtime/createOxyRuntime.js.map +1 -1
  116. package/lib/commonjs/ui/runtime/runtimeContext.js.map +1 -1
  117. package/lib/commonjs/ui/screens/AccountMembersScreen.js +7 -7
  118. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  119. package/lib/commonjs/ui/screens/AccountSecurityPanelScreen.js +35 -0
  120. package/lib/commonjs/ui/screens/AccountSecurityPanelScreen.js.map +1 -0
  121. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +3 -3
  122. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  123. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +1 -1
  124. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  125. package/lib/commonjs/ui/screens/AppInfoScreen.js +5 -5
  126. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  127. package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
  128. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  129. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +1 -1
  130. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
  131. package/lib/commonjs/ui/screens/CreateAccountScreen.js +1 -1
  132. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  133. package/lib/commonjs/ui/screens/DeleteAccountScreen.js +19 -0
  134. package/lib/commonjs/ui/screens/DeleteAccountScreen.js.map +1 -0
  135. package/lib/commonjs/ui/screens/DomainsScreen.js +217 -0
  136. package/lib/commonjs/ui/screens/DomainsScreen.js.map +1 -0
  137. package/lib/commonjs/ui/screens/EditProfileScreen.js +1 -1
  138. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  139. package/lib/commonjs/ui/screens/FileManagementScreen.js +25 -11
  140. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  141. package/lib/commonjs/ui/screens/HelpSupportScreen.js +1 -17
  142. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  143. package/lib/commonjs/ui/screens/LinkCommonsScreen.js +14 -0
  144. package/lib/commonjs/ui/screens/LinkCommonsScreen.js.map +1 -0
  145. package/lib/commonjs/ui/screens/ManageAccountScreen.js +57 -61
  146. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  147. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +52 -62
  148. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  149. package/lib/commonjs/ui/screens/ProfileScreen.js +5 -13
  150. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  151. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +15 -24
  152. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  153. package/lib/commonjs/ui/screens/SignInAuthenticatorScreen.js +14 -0
  154. package/lib/commonjs/ui/screens/SignInAuthenticatorScreen.js.map +1 -0
  155. package/lib/commonjs/ui/screens/SignInPasswordScreen.js +20 -0
  156. package/lib/commonjs/ui/screens/SignInPasswordScreen.js.map +1 -0
  157. package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
  158. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  159. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +1 -1
  160. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  161. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +25 -17
  162. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  163. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +2 -2
  164. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  165. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +8 -14
  166. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  167. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +11 -9
  168. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  169. package/lib/commonjs/ui/session/authStore.js +4 -4
  170. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  171. package/lib/commonjs/ui/session/backgroundSession.js +5 -40
  172. package/lib/commonjs/ui/session/backgroundSession.js.map +1 -1
  173. package/lib/commonjs/ui/session/createSessionClient.js +3 -3
  174. package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
  175. package/lib/commonjs/ui/session/deviceCredentialTracker.js +42 -0
  176. package/lib/commonjs/ui/session/deviceCredentialTracker.js.map +1 -0
  177. package/lib/commonjs/ui/session/identityBinding.js +3 -3
  178. package/lib/commonjs/ui/session/identityBinding.js.map +1 -1
  179. package/lib/commonjs/ui/session/index.js +6 -6
  180. package/lib/commonjs/ui/session/index.js.map +1 -1
  181. package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js +2 -2
  182. package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js.map +1 -1
  183. package/lib/commonjs/ui/session/tokenTransport.js +3 -3
  184. package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
  185. package/lib/commonjs/ui/stores/assetStore.js +12 -0
  186. package/lib/commonjs/ui/stores/assetStore.js.map +1 -1
  187. package/lib/commonjs/ui/stores/followStore.js +6 -6
  188. package/lib/commonjs/ui/stores/followStore.js.map +1 -1
  189. package/lib/commonjs/ui/utils/accountDeletionHandoff.js +1 -4
  190. package/lib/commonjs/ui/utils/accountDeletionHandoff.js.map +1 -1
  191. package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
  192. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  193. package/lib/commonjs/ui/utils/deviceCredential.js +11 -4
  194. package/lib/commonjs/ui/utils/deviceCredential.js.map +1 -1
  195. package/lib/commonjs/ui/utils/fileManagement.js +0 -10
  196. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  197. package/lib/commonjs/ui/utils/sessionHelpers.js +2 -2
  198. package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
  199. package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  200. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  201. package/lib/module/assets/assets/fonts/icons/manifest.json +5 -21
  202. package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  203. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  204. package/lib/module/assets/fonts/icons/manifest.json +5 -21
  205. package/lib/module/index.js +6 -6
  206. package/lib/module/index.js.map +1 -1
  207. package/lib/module/ui/boot/runProviderColdBoot.js +2 -1
  208. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  209. package/lib/module/ui/components/OxyAccountDialogScreen.js +2 -3
  210. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  211. package/lib/module/ui/components/OxyAuthChooser.js +15 -32
  212. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  213. package/lib/module/ui/components/OxySignInButton.js +1 -1
  214. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  215. package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -1
  216. package/lib/module/ui/components/ProfileButton.js +1 -1
  217. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  218. package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
  219. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  220. package/lib/module/ui/components/authChooser/SignInRequestView.js +6 -17
  221. package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
  222. package/lib/module/ui/components/authChooser/TroubleDisclosure.js +1 -1
  223. package/lib/module/ui/components/authChooser/primitives.js +2 -103
  224. package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
  225. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
  226. package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -1
  227. package/lib/module/ui/components/authChooser/styles.js +0 -33
  228. package/lib/module/ui/components/authChooser/styles.js.map +1 -1
  229. package/lib/module/ui/components/authChooser/types.js +0 -8
  230. package/lib/module/ui/components/authChooser/types.js.map +1 -1
  231. package/lib/module/ui/components/signIn/InlineCommonsQr.js +1 -1
  232. package/lib/module/ui/components/signIn/OxyAccountPicker.js +155 -58
  233. package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -1
  234. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js +321 -0
  235. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -0
  236. package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js +54 -58
  237. package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
  238. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +48 -38
  239. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  240. package/lib/module/ui/components/signIn/OxyPasswordPanel.js +136 -0
  241. package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -0
  242. package/lib/module/ui/components/signIn/OxySignInPanel.js +496 -201
  243. package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
  244. package/lib/module/ui/components/signIn/OxySignUpPanel.js +212 -43
  245. package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  246. package/lib/module/ui/components/signIn/ReauthStep.js +181 -0
  247. package/lib/module/ui/components/signIn/ReauthStep.js.map +1 -0
  248. package/lib/module/ui/components/signIn/accountFlowParts.js +97 -26
  249. package/lib/module/ui/components/signIn/accountFlowParts.js.map +1 -1
  250. package/lib/module/ui/components/signIn/signInFlowStore.js +44 -0
  251. package/lib/module/ui/components/signIn/signInFlowStore.js.map +1 -0
  252. package/lib/module/ui/components/signIn/signInMethods.js +11 -25
  253. package/lib/module/ui/components/signIn/signInMethods.js.map +1 -1
  254. package/lib/module/ui/context/OxyContext.js +121 -115
  255. package/lib/module/ui/context/OxyContext.js.map +1 -1
  256. package/lib/module/ui/context/hooks/useAuthOperations.js +7 -7
  257. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  258. package/lib/module/ui/context/useOxyAccountGraph.js +4 -4
  259. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  260. package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
  261. package/lib/module/ui/hooks/mutations/useAccountMutations.js +19 -9
  262. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  263. package/lib/module/ui/hooks/mutations/useServicesMutations.js +4 -4
  264. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  265. package/lib/module/ui/hooks/queries/queryKeys.js +23 -3
  266. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  267. package/lib/module/ui/hooks/queries/useAccountQueries.js +8 -8
  268. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  269. package/lib/module/ui/hooks/queries/useAuthMethods.js +25 -14
  270. package/lib/module/ui/hooks/queries/useAuthMethods.js.map +1 -1
  271. package/lib/module/ui/hooks/queries/useFileQueries.js +5 -2
  272. package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -1
  273. package/lib/module/ui/hooks/queries/usePaymentQueries.js +8 -8
  274. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  275. package/lib/module/ui/hooks/queries/useSecurityQueries.js +4 -3
  276. package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  277. package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -6
  278. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  279. package/lib/module/ui/hooks/useAssets.js +36 -20
  280. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  281. package/lib/module/ui/hooks/useAvatarPicker.js +6 -4
  282. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  283. package/lib/module/ui/hooks/useDeviceManagement.js +4 -4
  284. package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -1
  285. package/lib/module/ui/hooks/useDeviceSwitcher.js +2 -2
  286. package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -1
  287. package/lib/module/ui/hooks/useFileDownloadUrl.js +1 -4
  288. package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -1
  289. package/lib/module/ui/hooks/useFollow.js +2 -2
  290. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  291. package/lib/module/ui/hooks/useFollowTarget.js +5 -5
  292. package/lib/module/ui/hooks/useFollowTarget.js.map +1 -1
  293. package/lib/module/ui/hooks/useI18n.js +6 -3
  294. package/lib/module/ui/hooks/useI18n.js.map +1 -1
  295. package/lib/module/ui/hooks/useResolvedFileUrls.js +2 -2
  296. package/lib/module/ui/hooks/useResolvedFileUrls.js.map +1 -1
  297. package/lib/module/ui/hooks/useSessionManagement.js +3 -3
  298. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  299. package/lib/module/ui/icons/subsetGlyphMaps.js +0 -16
  300. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  301. package/lib/module/ui/navigation/routes.js +6 -4
  302. package/lib/module/ui/navigation/routes.js.map +1 -1
  303. package/lib/module/ui/navigation/surfaceRegistry.js +1 -1
  304. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  305. package/lib/module/ui/oauth/browserBridge.js +239 -0
  306. package/lib/module/ui/oauth/browserBridge.js.map +1 -0
  307. package/lib/module/ui/oauth/completeOAuthCode.js +1 -1
  308. package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -1
  309. package/lib/module/ui/oauth/explicitOAuthConsent.js +1 -1
  310. package/lib/module/ui/oauth/explicitOAuthConsent.js.map +1 -1
  311. package/lib/module/ui/runtime/createOxyRuntime.js +4 -3
  312. package/lib/module/ui/runtime/createOxyRuntime.js.map +1 -1
  313. package/lib/module/ui/runtime/runtimeContext.js.map +1 -1
  314. package/lib/module/ui/screens/AccountMembersScreen.js +7 -7
  315. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  316. package/lib/module/ui/screens/AccountSecurityPanelScreen.js +32 -0
  317. package/lib/module/ui/screens/AccountSecurityPanelScreen.js.map +1 -0
  318. package/lib/module/ui/screens/AccountSettingsScreen.js +3 -3
  319. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  320. package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
  321. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  322. package/lib/module/ui/screens/AppInfoScreen.js +5 -5
  323. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  324. package/lib/module/ui/screens/AvatarCropScreen.js +3 -3
  325. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  326. package/lib/module/ui/screens/ChangeAvatarScreen.js +1 -1
  327. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
  328. package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
  329. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  330. package/lib/module/ui/screens/DeleteAccountScreen.js +17 -0
  331. package/lib/module/ui/screens/DeleteAccountScreen.js.map +1 -0
  332. package/lib/module/ui/screens/DomainsScreen.js +212 -0
  333. package/lib/module/ui/screens/DomainsScreen.js.map +1 -0
  334. package/lib/module/ui/screens/EditProfileScreen.js +1 -1
  335. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  336. package/lib/module/ui/screens/FileManagementScreen.js +25 -11
  337. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  338. package/lib/module/ui/screens/HelpSupportScreen.js +1 -17
  339. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  340. package/lib/module/ui/screens/LinkCommonsScreen.js +12 -0
  341. package/lib/module/ui/screens/LinkCommonsScreen.js.map +1 -0
  342. package/lib/module/ui/screens/ManageAccountScreen.js +58 -62
  343. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  344. package/lib/module/ui/screens/PrivacySettingsScreen.js +53 -63
  345. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  346. package/lib/module/ui/screens/ProfileScreen.js +5 -13
  347. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  348. package/lib/module/ui/screens/SearchSettingsScreen.js +16 -25
  349. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  350. package/lib/module/ui/screens/SignInAuthenticatorScreen.js +12 -0
  351. package/lib/module/ui/screens/SignInAuthenticatorScreen.js.map +1 -0
  352. package/lib/module/ui/screens/SignInPasswordScreen.js +18 -0
  353. package/lib/module/ui/screens/SignInPasswordScreen.js.map +1 -0
  354. package/lib/module/ui/screens/UserListScreen.js +3 -3
  355. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  356. package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
  357. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  358. package/lib/module/ui/screens/trust/TrustCenterScreen.js +26 -18
  359. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  360. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +2 -2
  361. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  362. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +9 -15
  363. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  364. package/lib/module/ui/screens/trust/TrustRulesScreen.js +12 -10
  365. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  366. package/lib/module/ui/session/authStore.js +1 -1
  367. package/lib/module/ui/session/authStore.js.map +1 -1
  368. package/lib/module/ui/session/backgroundSession.js +5 -40
  369. package/lib/module/ui/session/backgroundSession.js.map +1 -1
  370. package/lib/module/ui/session/createSessionClient.js +1 -1
  371. package/lib/module/ui/session/createSessionClient.js.map +1 -1
  372. package/lib/module/ui/session/deviceCredentialTracker.js +38 -0
  373. package/lib/module/ui/session/deviceCredentialTracker.js.map +1 -0
  374. package/lib/module/ui/session/identityBinding.js +1 -1
  375. package/lib/module/ui/session/identityBinding.js.map +1 -1
  376. package/lib/module/ui/session/index.js +1 -1
  377. package/lib/module/ui/session/index.js.map +1 -1
  378. package/lib/module/ui/session/sharedDeviceCredentialStore.js +1 -1
  379. package/lib/module/ui/session/sharedDeviceCredentialStore.js.map +1 -1
  380. package/lib/module/ui/session/tokenTransport.js +3 -3
  381. package/lib/module/ui/session/tokenTransport.js.map +1 -1
  382. package/lib/module/ui/stores/assetStore.js +12 -0
  383. package/lib/module/ui/stores/assetStore.js.map +1 -1
  384. package/lib/module/ui/stores/followStore.js +6 -6
  385. package/lib/module/ui/stores/followStore.js.map +1 -1
  386. package/lib/module/ui/utils/accountDeletionHandoff.js +2 -5
  387. package/lib/module/ui/utils/accountDeletionHandoff.js.map +1 -1
  388. package/lib/module/ui/utils/avatarUtils.js +1 -1
  389. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  390. package/lib/module/ui/utils/deviceCredential.js +10 -3
  391. package/lib/module/ui/utils/deviceCredential.js.map +1 -1
  392. package/lib/module/ui/utils/fileManagement.js +0 -9
  393. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  394. package/lib/module/ui/utils/sessionHelpers.js +2 -2
  395. package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
  396. package/lib/typescript/commonjs/index.d.ts +5 -5
  397. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +3 -2
  399. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +2 -3
  401. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +7 -7
  403. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +2 -1
  405. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +1 -1
  407. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +3 -4
  409. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
  410. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +1 -1
  411. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +1 -34
  412. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +2 -1
  414. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts +1 -1
  416. package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +2 -1
  418. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -1
  419. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts +0 -33
  420. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -1
  421. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +1 -12
  422. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +1 -1
  424. package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts +10 -4
  426. package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts +19 -0
  428. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -0
  429. package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts +10 -6
  430. package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts +6 -6
  432. package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
  433. package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts +15 -0
  434. package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -0
  435. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +21 -19
  436. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +16 -7
  438. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts +34 -0
  440. package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts +38 -12
  442. package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/ui/components/signIn/signInFlowStore.d.ts +20 -0
  444. package/lib/typescript/commonjs/ui/components/signIn/signInFlowStore.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +8 -21
  446. package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +2 -1
  449. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -39
  451. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +2 -1
  453. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  454. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +1 -1
  455. package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +1 -1
  457. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
  458. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  459. package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts +5 -1
  460. package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +19 -1
  462. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts +13 -20
  464. package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +1 -1
  466. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +4 -4
  468. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  469. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +3 -5
  470. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +5 -5
  472. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +1 -1
  474. package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts +1 -1
  475. package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
  476. package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +1 -1
  478. package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts.map +1 -1
  479. package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts +9 -7
  480. package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
  481. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
  482. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
  483. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  484. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +0 -16
  486. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  487. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +1 -1
  488. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  490. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  491. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +7 -5
  492. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  493. package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts +97 -0
  494. package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts.map +1 -0
  495. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts +6 -2
  496. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts.map +1 -1
  497. package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts +2 -1
  498. package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts.map +1 -1
  499. package/lib/typescript/commonjs/ui/runtime/types.d.ts +2 -1
  500. package/lib/typescript/commonjs/ui/runtime/types.d.ts.map +1 -1
  501. package/lib/typescript/commonjs/ui/screens/AccountSecurityPanelScreen.d.ts +11 -0
  502. package/lib/typescript/commonjs/ui/screens/AccountSecurityPanelScreen.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/ui/screens/DeleteAccountScreen.d.ts +6 -0
  504. package/lib/typescript/commonjs/ui/screens/DeleteAccountScreen.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/ui/screens/{SavesCollectionsScreen.d.ts → DomainsScreen.d.ts} +1 -1
  506. package/lib/typescript/commonjs/ui/screens/DomainsScreen.d.ts.map +1 -0
  507. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  508. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  509. package/lib/typescript/commonjs/ui/screens/LinkCommonsScreen.d.ts +6 -0
  510. package/lib/typescript/commonjs/ui/screens/LinkCommonsScreen.d.ts.map +1 -0
  511. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  512. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  514. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  515. package/lib/typescript/commonjs/ui/screens/SignInAuthenticatorScreen.d.ts +6 -0
  516. package/lib/typescript/commonjs/ui/screens/SignInAuthenticatorScreen.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/ui/screens/SignInPasswordScreen.d.ts +6 -0
  518. package/lib/typescript/commonjs/ui/screens/SignInPasswordScreen.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  520. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  522. package/lib/typescript/commonjs/ui/session/authStore.d.ts +1 -1
  523. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  524. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +3 -4
  525. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +1 -1
  526. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +2 -1
  527. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
  528. package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts +23 -0
  529. package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts.map +1 -0
  530. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +1 -1
  531. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -1
  532. package/lib/typescript/commonjs/ui/session/index.d.ts +1 -1
  533. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  534. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +1 -1
  535. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -1
  536. package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts +1 -1
  537. package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +3 -2
  539. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
  540. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts +7 -0
  541. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts.map +1 -1
  542. package/lib/typescript/commonjs/ui/types/navigation.d.ts +1 -1
  543. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  544. package/lib/typescript/commonjs/ui/utils/accountDeletionHandoff.d.ts.map +1 -1
  545. package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts +10 -3
  546. package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts.map +1 -1
  547. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -5
  548. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  549. package/lib/typescript/module/index.d.ts +5 -5
  550. package/lib/typescript/module/index.d.ts.map +1 -1
  551. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +3 -2
  552. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  553. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +2 -3
  554. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  555. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +7 -7
  556. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  557. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +2 -1
  558. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -1
  559. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +1 -1
  560. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  561. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +3 -4
  562. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
  563. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +1 -1
  564. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +1 -34
  565. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
  566. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +2 -1
  567. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
  568. package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts +1 -1
  569. package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
  570. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +2 -1
  571. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -1
  572. package/lib/typescript/module/ui/components/authChooser/styles.d.ts +0 -33
  573. package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -1
  574. package/lib/typescript/module/ui/components/authChooser/types.d.ts +1 -12
  575. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
  576. package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +1 -1
  577. package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
  578. package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts +10 -4
  579. package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
  580. package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts +19 -0
  581. package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -0
  582. package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts +10 -6
  583. package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -1
  584. package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts +6 -6
  585. package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
  586. package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts +15 -0
  587. package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -0
  588. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +21 -19
  589. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  590. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +16 -7
  591. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  592. package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts +34 -0
  593. package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts.map +1 -0
  594. package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts +38 -12
  595. package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
  596. package/lib/typescript/module/ui/components/signIn/signInFlowStore.d.ts +20 -0
  597. package/lib/typescript/module/ui/components/signIn/signInFlowStore.d.ts.map +1 -0
  598. package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +8 -21
  599. package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts.map +1 -1
  600. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  601. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -1
  602. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  603. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -39
  604. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  605. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +2 -1
  606. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  607. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +1 -1
  608. package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
  609. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +1 -1
  610. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
  611. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  612. package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts +5 -1
  613. package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  614. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +19 -1
  615. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  616. package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts +13 -20
  617. package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
  618. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +1 -1
  619. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  620. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +4 -4
  621. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  622. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +3 -5
  623. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  624. package/lib/typescript/module/ui/hooks/useAssets.d.ts +5 -5
  625. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  626. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
  627. package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts +1 -1
  628. package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
  629. package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
  630. package/lib/typescript/module/ui/hooks/useFollow.d.ts +1 -1
  631. package/lib/typescript/module/ui/hooks/useI18n.d.ts.map +1 -1
  632. package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts +9 -7
  633. package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
  634. package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
  635. package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
  636. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  637. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  638. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +0 -16
  639. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  640. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +1 -1
  641. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  642. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  643. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  644. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +7 -5
  645. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  646. package/lib/typescript/module/ui/oauth/browserBridge.d.ts +97 -0
  647. package/lib/typescript/module/ui/oauth/browserBridge.d.ts.map +1 -0
  648. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts +6 -2
  649. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts.map +1 -1
  650. package/lib/typescript/module/ui/runtime/runtimeContext.d.ts +2 -1
  651. package/lib/typescript/module/ui/runtime/runtimeContext.d.ts.map +1 -1
  652. package/lib/typescript/module/ui/runtime/types.d.ts +2 -1
  653. package/lib/typescript/module/ui/runtime/types.d.ts.map +1 -1
  654. package/lib/typescript/module/ui/screens/AccountSecurityPanelScreen.d.ts +11 -0
  655. package/lib/typescript/module/ui/screens/AccountSecurityPanelScreen.d.ts.map +1 -0
  656. package/lib/typescript/module/ui/screens/DeleteAccountScreen.d.ts +6 -0
  657. package/lib/typescript/module/ui/screens/DeleteAccountScreen.d.ts.map +1 -0
  658. package/lib/typescript/module/ui/screens/{SavesCollectionsScreen.d.ts → DomainsScreen.d.ts} +1 -1
  659. package/lib/typescript/module/ui/screens/DomainsScreen.d.ts.map +1 -0
  660. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  661. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  662. package/lib/typescript/module/ui/screens/LinkCommonsScreen.d.ts +6 -0
  663. package/lib/typescript/module/ui/screens/LinkCommonsScreen.d.ts.map +1 -0
  664. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  665. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  666. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  667. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  668. package/lib/typescript/module/ui/screens/SignInAuthenticatorScreen.d.ts +6 -0
  669. package/lib/typescript/module/ui/screens/SignInAuthenticatorScreen.d.ts.map +1 -0
  670. package/lib/typescript/module/ui/screens/SignInPasswordScreen.d.ts +6 -0
  671. package/lib/typescript/module/ui/screens/SignInPasswordScreen.d.ts.map +1 -0
  672. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  673. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  674. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  675. package/lib/typescript/module/ui/session/authStore.d.ts +1 -1
  676. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  677. package/lib/typescript/module/ui/session/backgroundSession.d.ts +3 -4
  678. package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +1 -1
  679. package/lib/typescript/module/ui/session/createSessionClient.d.ts +2 -1
  680. package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
  681. package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts +23 -0
  682. package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts.map +1 -0
  683. package/lib/typescript/module/ui/session/identityBinding.d.ts +1 -1
  684. package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -1
  685. package/lib/typescript/module/ui/session/index.d.ts +1 -1
  686. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  687. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +1 -1
  688. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -1
  689. package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts +1 -1
  690. package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
  691. package/lib/typescript/module/ui/session/tokenTransport.d.ts +3 -2
  692. package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
  693. package/lib/typescript/module/ui/stores/assetStore.d.ts +7 -0
  694. package/lib/typescript/module/ui/stores/assetStore.d.ts.map +1 -1
  695. package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
  696. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  697. package/lib/typescript/module/ui/utils/accountDeletionHandoff.d.ts.map +1 -1
  698. package/lib/typescript/module/ui/utils/deviceCredential.d.ts +10 -3
  699. package/lib/typescript/module/ui/utils/deviceCredential.d.ts.map +1 -1
  700. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -5
  701. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  702. package/package.json +4 -5
  703. package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  704. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  705. package/src/assets/fonts/icons/manifest.json +5 -21
  706. package/src/index.ts +8 -8
  707. package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +4 -4
  708. package/src/ui/boot/runProviderColdBoot.ts +3 -9
  709. package/src/ui/components/OxyAccountDialogScreen.tsx +2 -3
  710. package/src/ui/components/OxyAuthChooser.tsx +13 -36
  711. package/src/ui/components/OxySignInButton.tsx +1 -1
  712. package/src/ui/components/OxySignInRequestSurface.tsx +2 -1
  713. package/src/ui/components/ProfileButton.tsx +1 -1
  714. package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -6
  715. package/src/ui/components/authChooser/SignInRequestView.tsx +5 -23
  716. package/src/ui/components/authChooser/TroubleDisclosure.tsx +1 -1
  717. package/src/ui/components/authChooser/primitives.tsx +2 -96
  718. package/src/ui/components/authChooser/requestSurfaces.tsx +2 -1
  719. package/src/ui/components/authChooser/signInFailureMessage.ts +1 -1
  720. package/src/ui/components/authChooser/signInProgress.ts +2 -1
  721. package/src/ui/components/authChooser/styles.ts +0 -33
  722. package/src/ui/components/authChooser/types.ts +1 -13
  723. package/src/ui/components/signIn/InlineCommonsQr.tsx +2 -2
  724. package/src/ui/components/signIn/OxyAccountPicker.tsx +131 -66
  725. package/src/ui/components/signIn/OxyAuthenticatorPanel.tsx +294 -0
  726. package/src/ui/components/signIn/OxyDeleteAccountPanel.tsx +48 -61
  727. package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +43 -35
  728. package/src/ui/components/signIn/OxyPasswordPanel.tsx +117 -0
  729. package/src/ui/components/signIn/OxySignInPanel.tsx +534 -214
  730. package/src/ui/components/signIn/OxySignUpPanel.tsx +186 -56
  731. package/src/ui/components/signIn/ReauthStep.tsx +201 -0
  732. package/src/ui/components/signIn/accountFlowParts.tsx +139 -33
  733. package/src/ui/components/signIn/signInFlowStore.ts +41 -0
  734. package/src/ui/components/signIn/signInMethods.ts +10 -29
  735. package/src/ui/context/OxyContext.tsx +124 -145
  736. package/src/ui/context/hooks/useAuthOperations.ts +9 -8
  737. package/src/ui/context/oxyContextTypes.ts +4 -41
  738. package/src/ui/context/useOxyAccountGraph.ts +6 -5
  739. package/src/ui/hooks/accountDialogSnapshot.ts +1 -1
  740. package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
  741. package/src/ui/hooks/mutations/useAccountMutations.ts +11 -10
  742. package/src/ui/hooks/mutations/useServicesMutations.ts +4 -4
  743. package/src/ui/hooks/queries/queryKeys.ts +26 -2
  744. package/src/ui/hooks/queries/useAccountQueries.ts +8 -8
  745. package/src/ui/hooks/queries/useAuthMethods.ts +22 -19
  746. package/src/ui/hooks/queries/useFileQueries.ts +2 -2
  747. package/src/ui/hooks/queries/usePaymentQueries.ts +8 -8
  748. package/src/ui/hooks/queries/useSecurityQueries.ts +4 -3
  749. package/src/ui/hooks/queries/useServicesQueries.ts +6 -6
  750. package/src/ui/hooks/useAssets.ts +26 -31
  751. package/src/ui/hooks/useAvatarPicker.ts +4 -4
  752. package/src/ui/hooks/useDeviceManagement.ts +4 -4
  753. package/src/ui/hooks/useDeviceSwitcher.ts +2 -7
  754. package/src/ui/hooks/useFileDownloadUrl.ts +1 -5
  755. package/src/ui/hooks/useFollow.ts +2 -2
  756. package/src/ui/hooks/useFollowTarget.ts +5 -5
  757. package/src/ui/hooks/useI18n.ts +6 -3
  758. package/src/ui/hooks/useResolvedFileUrls.ts +8 -6
  759. package/src/ui/hooks/useSessionManagement.ts +3 -3
  760. package/src/ui/icons/subsetGlyphMaps.ts +0 -16
  761. package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +1 -1
  762. package/src/ui/navigation/accountDialogManager.ts +1 -1
  763. package/src/ui/navigation/routes.ts +11 -8
  764. package/src/ui/navigation/surfaceRegistry.ts +8 -6
  765. package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +8 -8
  766. package/src/ui/oauth/__tests__/browserBridge.test.ts +198 -0
  767. package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +1 -1
  768. package/src/ui/oauth/__tests__/explicitOAuthConsent.test.ts +11 -11
  769. package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +7 -7
  770. package/src/ui/oauth/browserBridge.ts +234 -0
  771. package/src/ui/oauth/completeOAuthCode.ts +1 -1
  772. package/src/ui/oauth/explicitOAuthConsent.ts +1 -1
  773. package/src/ui/runtime/createOxyRuntime.ts +8 -16
  774. package/src/ui/runtime/runtimeContext.tsx +2 -1
  775. package/src/ui/runtime/types.ts +2 -1
  776. package/src/ui/screens/AccountMembersScreen.tsx +7 -7
  777. package/src/ui/screens/AccountSecurityPanelScreen.tsx +26 -0
  778. package/src/ui/screens/AccountSettingsScreen.tsx +3 -3
  779. package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
  780. package/src/ui/screens/AppInfoScreen.tsx +5 -5
  781. package/src/ui/screens/AvatarCropScreen.tsx +3 -3
  782. package/src/ui/screens/ChangeAvatarScreen.tsx +1 -1
  783. package/src/ui/screens/CreateAccountScreen.tsx +1 -1
  784. package/src/ui/screens/DeleteAccountScreen.tsx +13 -0
  785. package/src/ui/screens/DomainsScreen.tsx +187 -0
  786. package/src/ui/screens/EditProfileScreen.tsx +1 -1
  787. package/src/ui/screens/FileManagementScreen.tsx +15 -21
  788. package/src/ui/screens/HelpSupportScreen.tsx +0 -15
  789. package/src/ui/screens/LinkCommonsScreen.tsx +13 -0
  790. package/src/ui/screens/ManageAccountScreen.tsx +47 -82
  791. package/src/ui/screens/PrivacySettingsScreen.tsx +48 -67
  792. package/src/ui/screens/ProfileScreen.tsx +5 -10
  793. package/src/ui/screens/SearchSettingsScreen.tsx +15 -27
  794. package/src/ui/screens/SignInAuthenticatorScreen.tsx +13 -0
  795. package/src/ui/screens/SignInPasswordScreen.tsx +13 -0
  796. package/src/ui/screens/UserListScreen.tsx +3 -3
  797. package/src/ui/screens/WelcomeNewUserScreen.tsx +1 -1
  798. package/src/ui/screens/trust/TrustCenterScreen.tsx +25 -29
  799. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +2 -2
  800. package/src/ui/screens/trust/TrustRewardsScreen.tsx +9 -19
  801. package/src/ui/screens/trust/TrustRulesScreen.tsx +14 -14
  802. package/src/ui/session/__tests__/authStore.test.ts +1 -1
  803. package/src/ui/session/__tests__/backgroundSession.test.ts +2 -61
  804. package/src/ui/session/__tests__/createSessionClient.test.ts +7 -9
  805. package/src/ui/session/__tests__/sharedDeviceCredentialStore.test.ts +1 -1
  806. package/src/ui/session/__tests__/tokenTransport.test.ts +9 -7
  807. package/src/ui/session/authStore.ts +1 -7
  808. package/src/ui/session/backgroundSession.ts +5 -41
  809. package/src/ui/session/createSessionClient.ts +2 -6
  810. package/src/ui/session/deviceCredentialTracker.ts +49 -0
  811. package/src/ui/session/identityBinding.ts +1 -6
  812. package/src/ui/session/index.ts +1 -1
  813. package/src/ui/session/nativeSecureStorage.ts +1 -1
  814. package/src/ui/session/sharedDeviceCredentialStore.ts +1 -6
  815. package/src/ui/session/tokenTransport.ts +5 -4
  816. package/src/ui/stores/__tests__/followStore.test.ts +13 -15
  817. package/src/ui/stores/assetStore.ts +15 -0
  818. package/src/ui/stores/followStore.ts +7 -7
  819. package/src/ui/types/navigation.ts +2 -1
  820. package/src/ui/utils/accountDeletionHandoff.ts +2 -4
  821. package/src/ui/utils/avatarUtils.ts +1 -1
  822. package/src/ui/utils/deviceCredential.ts +11 -4
  823. package/src/ui/utils/fileManagement.ts +0 -12
  824. package/src/ui/utils/sessionHelpers.ts +2 -2
  825. package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js +0 -236
  826. package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js.map +0 -1
  827. package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js +0 -170
  828. package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js.map +0 -1
  829. package/lib/commonjs/ui/components/signIn/passkeyError.js +0 -46
  830. package/lib/commonjs/ui/components/signIn/passkeyError.js.map +0 -1
  831. package/lib/commonjs/ui/context/passkeyFlow.js +0 -114
  832. package/lib/commonjs/ui/context/passkeyFlow.js.map +0 -1
  833. package/lib/commonjs/ui/screens/FAQScreen.js +0 -162
  834. package/lib/commonjs/ui/screens/FAQScreen.js.map +0 -1
  835. package/lib/commonjs/ui/screens/FeedbackScreen.js +0 -601
  836. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +0 -1
  837. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -968
  838. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  839. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +0 -132
  840. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +0 -1
  841. package/lib/commonjs/webauthn/passkeyClient.js +0 -39
  842. package/lib/commonjs/webauthn/passkeyClient.js.map +0 -1
  843. package/lib/commonjs/webauthn/passkeyClient.native.js +0 -34
  844. package/lib/commonjs/webauthn/passkeyClient.native.js.map +0 -1
  845. package/lib/commonjs/webauthn/passkeyClient.web.js +0 -57
  846. package/lib/commonjs/webauthn/passkeyClient.web.js.map +0 -1
  847. package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js +0 -231
  848. package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js.map +0 -1
  849. package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js +0 -165
  850. package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js.map +0 -1
  851. package/lib/module/ui/components/signIn/passkeyError.js +0 -40
  852. package/lib/module/ui/components/signIn/passkeyError.js.map +0 -1
  853. package/lib/module/ui/context/passkeyFlow.js +0 -107
  854. package/lib/module/ui/context/passkeyFlow.js.map +0 -1
  855. package/lib/module/ui/screens/FAQScreen.js +0 -157
  856. package/lib/module/ui/screens/FAQScreen.js.map +0 -1
  857. package/lib/module/ui/screens/FeedbackScreen.js +0 -599
  858. package/lib/module/ui/screens/FeedbackScreen.js.map +0 -1
  859. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -963
  860. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  861. package/lib/module/ui/screens/SavesCollectionsScreen.js +0 -127
  862. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +0 -1
  863. package/lib/module/webauthn/passkeyClient.js +0 -33
  864. package/lib/module/webauthn/passkeyClient.js.map +0 -1
  865. package/lib/module/webauthn/passkeyClient.native.js +0 -28
  866. package/lib/module/webauthn/passkeyClient.native.js.map +0 -1
  867. package/lib/module/webauthn/passkeyClient.web.js +0 -52
  868. package/lib/module/webauthn/passkeyClient.web.js.map +0 -1
  869. package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts +0 -24
  870. package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +0 -1
  871. package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts +0 -20
  872. package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +0 -1
  873. package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts +0 -16
  874. package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts.map +0 -1
  875. package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +0 -92
  876. package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +0 -1
  877. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts +0 -5
  878. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +0 -1
  879. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +0 -5
  880. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +0 -1
  881. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
  882. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
  883. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +0 -1
  884. package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts +0 -20
  885. package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts.map +0 -1
  886. package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts +0 -15
  887. package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts.map +0 -1
  888. package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts +0 -36
  889. package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts.map +0 -1
  890. package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts +0 -24
  891. package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +0 -1
  892. package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts +0 -20
  893. package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +0 -1
  894. package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts +0 -16
  895. package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts.map +0 -1
  896. package/lib/typescript/module/ui/context/passkeyFlow.d.ts +0 -92
  897. package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +0 -1
  898. package/lib/typescript/module/ui/screens/FAQScreen.d.ts +0 -5
  899. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +0 -1
  900. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +0 -5
  901. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +0 -1
  902. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
  903. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
  904. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +0 -1
  905. package/lib/typescript/module/webauthn/passkeyClient.d.ts +0 -20
  906. package/lib/typescript/module/webauthn/passkeyClient.d.ts.map +0 -1
  907. package/lib/typescript/module/webauthn/passkeyClient.native.d.ts +0 -15
  908. package/lib/typescript/module/webauthn/passkeyClient.native.d.ts.map +0 -1
  909. package/lib/typescript/module/webauthn/passkeyClient.web.d.ts +0 -36
  910. package/lib/typescript/module/webauthn/passkeyClient.web.d.ts.map +0 -1
  911. package/src/ui/components/signIn/OxyCreateAccountPanel.tsx +0 -207
  912. package/src/ui/components/signIn/OxyRecoverAccountPanel.tsx +0 -154
  913. package/src/ui/components/signIn/passkeyError.ts +0 -44
  914. package/src/ui/context/__tests__/passkeyFlow.test.ts +0 -239
  915. package/src/ui/context/passkeyFlow.ts +0 -145
  916. package/src/ui/screens/FAQScreen.tsx +0 -200
  917. package/src/ui/screens/FeedbackScreen.tsx +0 -766
  918. package/src/ui/screens/PremiumSubscriptionScreen.tsx +0 -1103
  919. package/src/ui/screens/SavesCollectionsScreen.tsx +0 -167
  920. package/src/webauthn/passkeyClient.native.ts +0 -26
  921. package/src/webauthn/passkeyClient.ts +0 -31
  922. package/src/webauthn/passkeyClient.web.ts +0 -56
@@ -1,1103 +0,0 @@
1
- import type React from 'react';
2
- import { useState, useEffect, useCallback } from 'react';
3
- import { View, ScrollView, ActivityIndicator } from 'react-native';
4
- import type { BaseScreenProps } from '../types/navigation';
5
- import { toast } from '@oxy.so/bloom/toast';
6
- import { surfaces } from '@oxy.so/bloom/surfaces';
7
- import { useTheme } from '@oxy.so/bloom/theme';
8
- import { Button } from '@oxy.so/bloom/button';
9
- import { Chip } from '@oxy.so/bloom/chip';
10
- import { Badge } from '@oxy.so/bloom/badge';
11
- import { Card, CardBody } from '@oxy.so/bloom/card';
12
- import { H2, H4, H5, Text } from '@oxy.so/bloom/typography';
13
- import { BenefitList, BenefitRow } from '../components/BenefitList';
14
- import {
15
- SegmentedControl,
16
- SegmentedControlItem,
17
- SegmentedControlItemText,
18
- } from '@oxy.so/bloom/segmented-control';
19
- import Ionicons from '../icons/Ionicons';
20
- import { useI18n } from '../hooks/useI18n';
21
- import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
22
- import { useOxy } from '../context/OxyContext';
23
-
24
- type IoniconName = React.ComponentProps<typeof Ionicons>['name'];
25
-
26
- interface SubscriptionPlan {
27
- id: string;
28
- name: string;
29
- description: string;
30
- price: number;
31
- currency: string;
32
- interval: 'month' | 'year';
33
- features: string[];
34
- appScope: 'ecosystem' | 'specific';
35
- applicableApps: string[]; // ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'] etc.
36
- includedFeatures: string[]; // Feature IDs that are included in this plan
37
- isPopular?: boolean;
38
- isCurrentPlan?: boolean;
39
- }
40
-
41
- interface IndividualFeature {
42
- id: string;
43
- name: string;
44
- description: string;
45
- price: number;
46
- currency: string;
47
- interval: 'month' | 'year';
48
- category: 'analytics' | 'customization' | 'content' | 'networking' | 'productivity';
49
- appScope: 'ecosystem' | 'specific';
50
- applicableApps: string[]; // Apps where this feature is available
51
- canBePurchasedSeparately: boolean;
52
- includedInPlans: string[]; // Plan IDs that include this feature
53
- isSubscribed?: boolean;
54
- isIncludedInCurrentPlan?: boolean;
55
- }
56
-
57
- interface UserSubscription {
58
- id: string;
59
- planId: string;
60
- status: 'active' | 'canceled' | 'past_due' | 'trialing';
61
- currentPeriodStart: string;
62
- currentPeriodEnd: string;
63
- cancelAtPeriodEnd: boolean;
64
- trialEnd?: string;
65
- }
66
-
67
- const TAB_PLANS = 'plans';
68
- const TAB_FEATURES = 'features';
69
- type ActiveTab = typeof TAB_PLANS | typeof TAB_FEATURES;
70
-
71
- const BILLING_MONTH = 'month';
72
- const BILLING_YEAR = 'year';
73
- type BillingInterval = typeof BILLING_MONTH | typeof BILLING_YEAR;
74
-
75
- /** Yearly billing discount applied when extrapolating a monthly price. */
76
- const YEARLY_DISCOUNT = 0.8;
77
- const MONTHS_PER_YEAR = 12;
78
- /** Simulated payment latency for the mocked subscribe/feature flows (ms). */
79
- const SUBSCRIBE_DELAY_MS = 2000;
80
- const FEATURE_DELAY_MS = 1500;
81
- /** One subscription period for the mocked renewal date (30 days, in ms). */
82
- const PERIOD_MS = 30 * 24 * 60 * 60 * 1000;
83
-
84
- const FEATURE_CATEGORIES: IndividualFeature['category'][] = [
85
- 'analytics',
86
- 'customization',
87
- 'content',
88
- 'networking',
89
- 'productivity',
90
- ];
91
-
92
- // Pure package-name → display-name mapping (module scope so the nav-header
93
- // subtitle can reference it before the component's render helpers).
94
- const getAppDisplayName = (packageName: string): string => {
95
- const appNames: Record<string, string> = {
96
- 'mention': 'Mention',
97
- 'oxy-social': 'Oxy Social',
98
- 'oxy-workspace': 'Oxy Workspace',
99
- 'oxy-creator': 'Oxy Creator',
100
- 'oxy-analytics': 'Oxy Analytics',
101
- 'oxy-studio': 'Oxy Studio',
102
- };
103
- return appNames[packageName] || packageName;
104
- };
105
-
106
- const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
107
- onClose,
108
- navigate,
109
- goBack,
110
- }) => {
111
- // Premium state belongs to the ACTIVE account (the org/project/bot when
112
- // switched, else the personal user), not the device-session owner.
113
- const { user } = useOxy();
114
- const [loading, setLoading] = useState(true);
115
- const [subscription, setSubscription] = useState<UserSubscription | null>(null);
116
- const [plans, setPlans] = useState<SubscriptionPlan[]>([]);
117
- const [individualFeatures, setIndividualFeatures] = useState<IndividualFeature[]>([]);
118
- const [selectedPlan, setSelectedPlan] = useState<string | null>(null);
119
- const [processingPayment, setProcessingPayment] = useState(false);
120
- const [billingInterval, setBillingInterval] = useState<BillingInterval>(BILLING_MONTH);
121
- const [activeTab, setActiveTab] = useState<ActiveTab>(TAB_PLANS);
122
- const [currentAppPackage, setCurrentAppPackage] = useState<string>('mention'); // Default to mention for demo
123
-
124
- const { t } = useI18n();
125
-
126
- useSurfaceHeader({ title: t('premium.title') || 'Oxy+ Subscriptions', subtitle: t('premium.forApp', { app: getAppDisplayName(currentAppPackage) }) || `for ${getAppDisplayName(currentAppPackage)}` });
127
- const bloomTheme = useTheme();
128
- const colors = bloomTheme.colors;
129
-
130
- // Oxy+ subscription plans
131
- const mockPlans: SubscriptionPlan[] = [
132
- {
133
- id: 'mention-plus',
134
- name: 'Mention+',
135
- description: 'Enhanced features for better social experience',
136
- price: 4.99,
137
- currency: 'USD',
138
- interval: 'month',
139
- appScope: 'specific',
140
- applicableApps: ['mention'], // Only available in mention app
141
- features: [
142
- 'Undo posts option',
143
- 'Improved reading mode',
144
- 'Organize bookmarks into folders',
145
- 'Early access to select features',
146
- 'Edit posts capability',
147
- 'Enhanced customization options'
148
- ],
149
- includedFeatures: ['reading-mode-plus', 'custom-themes']
150
- },
151
- {
152
- id: 'oxy-insider',
153
- name: 'Oxy+ Insider',
154
- description: 'Exclusive access to behind-the-scenes content',
155
- price: 9.99,
156
- currency: 'USD',
157
- interval: 'month',
158
- appScope: 'ecosystem',
159
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
160
- features: [
161
- 'Everything in Mention+',
162
- 'Behind-the-scenes updates from creators',
163
- 'Early access to new features',
164
- 'Dedicated support team',
165
- 'Exclusive content access',
166
- 'Beta feature testing'
167
- ],
168
- includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic'],
169
- isPopular: true
170
- },
171
- {
172
- id: 'oxy-connect',
173
- name: 'Oxy+ Connect',
174
- description: 'Advanced networking and community features',
175
- price: 14.99,
176
- currency: 'USD',
177
- interval: 'month',
178
- appScope: 'ecosystem',
179
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
180
- features: [
181
- 'Everything in Oxy+ Insider',
182
- 'Create and join private groups',
183
- 'Advanced search and filtering tools',
184
- 'Customizable profile highlighting',
185
- 'Enhanced connection features',
186
- 'Priority in community events'
187
- ],
188
- includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'group-management']
189
- },
190
- {
191
- id: 'oxy-premium',
192
- name: 'Oxy+ Premium',
193
- description: 'Complete premium experience with all perks',
194
- price: 24.99,
195
- currency: 'USD',
196
- interval: 'month',
197
- appScope: 'ecosystem',
198
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics'],
199
- features: [
200
- 'Everything in Oxy+ Connect',
201
- 'Priority customer support',
202
- 'Access to premium content and events',
203
- 'Advanced analytics dashboard',
204
- 'VIP community status',
205
- 'Exclusive premium events'
206
- ],
207
- includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'analytics-advanced', 'group-management']
208
- },
209
- {
210
- id: 'oxy-creator',
211
- name: 'Oxy+ Creator',
212
- description: 'Professional tools for content creators',
213
- price: 39.99,
214
- currency: 'USD',
215
- interval: 'month',
216
- appScope: 'ecosystem',
217
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics', 'oxy-studio'],
218
- features: [
219
- 'Everything in Oxy+ Premium',
220
- 'Advanced analytics and insights',
221
- 'Promotional tools and resources',
222
- 'Content monetization features',
223
- 'Creator support program',
224
- 'Revenue sharing opportunities'
225
- ],
226
- includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'analytics-advanced', 'group-management', 'creator-tools', 'monetization-features']
227
- }
228
- ];
229
-
230
- // Individual feature subscriptions
231
- const mockIndividualFeatures: IndividualFeature[] = [
232
- {
233
- id: 'analytics-basic',
234
- name: 'Basic Analytics',
235
- description: 'View post performance and engagement metrics',
236
- price: 2.99,
237
- currency: 'USD',
238
- interval: 'month',
239
- category: 'analytics',
240
- appScope: 'ecosystem',
241
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace'],
242
- canBePurchasedSeparately: true,
243
- includedInPlans: ['oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
244
- },
245
- {
246
- id: 'analytics-advanced',
247
- name: 'Advanced Analytics',
248
- description: 'Detailed insights, trends, and audience demographics',
249
- price: 7.99,
250
- currency: 'USD',
251
- interval: 'month',
252
- category: 'analytics',
253
- appScope: 'ecosystem',
254
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics'],
255
- canBePurchasedSeparately: true,
256
- includedInPlans: ['oxy-premium', 'oxy-creator']
257
- },
258
- {
259
- id: 'custom-themes',
260
- name: 'Custom Themes',
261
- description: 'Personalize your app with custom colors and layouts',
262
- price: 1.99,
263
- currency: 'USD',
264
- interval: 'month',
265
- category: 'customization',
266
- appScope: 'ecosystem',
267
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
268
- canBePurchasedSeparately: false, // Included in all plans
269
- includedInPlans: ['mention-plus', 'oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
270
- },
271
- {
272
- id: 'reading-mode-plus',
273
- name: 'Reading Mode Plus',
274
- description: 'Enhanced reading experience with focus modes',
275
- price: 1.99,
276
- currency: 'USD',
277
- interval: 'month',
278
- category: 'content',
279
- appScope: 'specific',
280
- applicableApps: ['mention', 'oxy-social'],
281
- canBePurchasedSeparately: false, // Included in all plans
282
- includedInPlans: ['mention-plus', 'oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
283
- },
284
- {
285
- id: 'group-management',
286
- name: 'Group Management',
287
- description: 'Create and manage private groups and communities',
288
- price: 4.99,
289
- currency: 'USD',
290
- interval: 'month',
291
- category: 'networking',
292
- appScope: 'ecosystem',
293
- applicableApps: ['mention', 'oxy-social', 'oxy-workspace'],
294
- canBePurchasedSeparately: true,
295
- includedInPlans: ['oxy-connect', 'oxy-premium', 'oxy-creator']
296
- },
297
- {
298
- id: 'creator-tools',
299
- name: 'Creator Tools Suite',
300
- description: 'Professional content creation and editing tools',
301
- price: 9.99,
302
- currency: 'USD',
303
- interval: 'month',
304
- category: 'productivity',
305
- appScope: 'specific',
306
- applicableApps: ['oxy-creator', 'oxy-studio'],
307
- canBePurchasedSeparately: true,
308
- includedInPlans: ['oxy-creator']
309
- },
310
- {
311
- id: 'monetization-features',
312
- name: 'Monetization Features',
313
- description: 'Revenue sharing, sponsorship tools, and creator fund access',
314
- price: 12.99,
315
- currency: 'USD',
316
- interval: 'month',
317
- category: 'productivity',
318
- appScope: 'specific',
319
- applicableApps: ['oxy-creator'],
320
- canBePurchasedSeparately: true,
321
- includedInPlans: ['oxy-creator']
322
- },
323
- {
324
- id: 'workspace-collaboration',
325
- name: 'Workspace Collaboration',
326
- description: 'Advanced team features and project management tools',
327
- price: 6.99,
328
- currency: 'USD',
329
- interval: 'month',
330
- category: 'productivity',
331
- appScope: 'specific',
332
- applicableApps: ['oxy-workspace'],
333
- canBePurchasedSeparately: true,
334
- includedInPlans: ['oxy-premium', 'oxy-creator']
335
- }
336
- ];
337
-
338
- useEffect(() => {
339
- detectCurrentApp();
340
- }, []);
341
-
342
- useEffect(() => {
343
- if (currentAppPackage) {
344
- loadSubscriptionData();
345
- }
346
- }, [currentAppPackage]);
347
-
348
- const detectCurrentApp = () => {
349
- const detectedApp = 'mention';
350
- setCurrentAppPackage(detectedApp);
351
- };
352
-
353
- const loadSubscriptionData = async () => {
354
- try {
355
- setLoading(true);
356
-
357
- const availablePlans = mockPlans.filter(plan =>
358
- plan.applicableApps.includes(currentAppPackage)
359
- );
360
- setPlans(availablePlans);
361
-
362
- let currentSubscription: UserSubscription | null = null;
363
- if (user?.isPremium) {
364
- currentSubscription = {
365
- id: 'sub_12345',
366
- planId: 'oxy-insider',
367
- status: 'active',
368
- currentPeriodStart: new Date().toISOString(),
369
- currentPeriodEnd: new Date(Date.now() + PERIOD_MS).toISOString(),
370
- cancelAtPeriodEnd: false
371
- };
372
- setSubscription(currentSubscription);
373
- }
374
-
375
- const availableFeatures = mockIndividualFeatures.filter(feature =>
376
- feature.applicableApps.includes(currentAppPackage)
377
- );
378
-
379
- const updatedFeatures = availableFeatures.map(feature => {
380
- const isIncludedInCurrentPlan = !!(currentSubscription &&
381
- feature.includedInPlans.includes(currentSubscription.planId));
382
-
383
- return {
384
- ...feature,
385
- isIncludedInCurrentPlan,
386
- isSubscribed: !!isIncludedInCurrentPlan
387
- };
388
- });
389
-
390
- setIndividualFeatures(updatedFeatures);
391
-
392
- } catch (error) {
393
- if (__DEV__) {
394
- console.error('Failed to load subscription data:', error);
395
- }
396
- toast.error('Failed to load subscription information');
397
- } finally {
398
- setLoading(false);
399
- }
400
- };
401
-
402
- const handleSubscribe = async (planId: string) => {
403
- try {
404
- const planToSubscribe = mockPlans.find(plan => plan.id === planId);
405
- if (!planToSubscribe?.applicableApps.includes(currentAppPackage)) {
406
- toast.error(t('premium.toasts.planUnavailable', { app: currentAppPackage }) || `This plan is not available for the current app (${currentAppPackage})`);
407
- return;
408
- }
409
-
410
- if (planId === 'mention-plus' && currentAppPackage !== 'mention') {
411
- toast.error(t('premium.toasts.mentionOnly') || 'Mention+ is only available in the Mention app');
412
- return;
413
- }
414
-
415
- setSelectedPlan(planId);
416
- setProcessingPayment(true);
417
- await new Promise(resolve => setTimeout(resolve, SUBSCRIBE_DELAY_MS));
418
- toast.success(t('premium.toasts.activated') || 'Subscription activated successfully!');
419
-
420
- setSubscription({
421
- id: `sub_${Date.now()}`,
422
- planId,
423
- status: 'active',
424
- currentPeriodStart: new Date().toISOString(),
425
- currentPeriodEnd: new Date(Date.now() + PERIOD_MS).toISOString(),
426
- cancelAtPeriodEnd: false
427
- });
428
-
429
- loadSubscriptionData();
430
-
431
- } catch (error) {
432
- if (__DEV__) {
433
- console.error('Payment failed:', error);
434
- }
435
- toast.error(t('premium.toasts.paymentFailed') || 'Payment failed. Please try again.');
436
- } finally {
437
- setProcessingPayment(false);
438
- }
439
- };
440
-
441
- const handleCancelSubscription = useCallback(async () => {
442
- const confirmed = await surfaces.confirm({
443
- title: t('premium.confirms.cancelSubTitle') || 'Cancel Subscription',
444
- description: t('premium.confirms.cancelSub') || 'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.',
445
- confirmLabel: t('premium.actions.cancelSubBtn') || 'Cancel Subscription',
446
- cancelLabel: t('common.cancel') || 'Cancel',
447
- destructive: true,
448
- });
449
- if (!confirmed) return;
450
- try {
451
- setSubscription(prev => prev ? {
452
- ...prev,
453
- cancelAtPeriodEnd: true
454
- } : null);
455
- toast.success(t('premium.toasts.willCancel') || 'Subscription will be canceled at the end of the billing period');
456
- } catch (error) {
457
- toast.error(t('premium.toasts.cancelFailed') || 'Failed to cancel subscription');
458
- }
459
- }, [t]);
460
-
461
- const handleReactivateSubscription = useCallback(async () => {
462
- try {
463
- setSubscription(prev => prev ? {
464
- ...prev,
465
- cancelAtPeriodEnd: false
466
- } : null);
467
- toast.success(t('premium.toasts.reactivated') || 'Subscription reactivated successfully');
468
- } catch (error) {
469
- toast.error(t('premium.toasts.reactivateFailed') || 'Failed to reactivate subscription');
470
- }
471
- }, [t]);
472
-
473
- const formatPrice = (price: number, interval: string) => {
474
- const yearlyPrice = interval === 'year' ? price : price * MONTHS_PER_YEAR * YEARLY_DISCOUNT;
475
- const displayPrice = billingInterval === 'year' ? yearlyPrice : price;
476
-
477
- return {
478
- price: displayPrice,
479
- formatted: `$${displayPrice.toFixed(2)}`,
480
- interval: billingInterval === 'year' ? 'year' : 'month'
481
- };
482
- };
483
-
484
- const getCurrentPlan = () => {
485
- if (!subscription) return null;
486
- return plans.find(plan => plan.id === subscription.planId);
487
- };
488
-
489
- const handleFeatureSubscribe = async (featureId: string) => {
490
- try {
491
- const featureToSubscribe = mockIndividualFeatures.find(feature => feature.id === featureId);
492
- if (!featureToSubscribe?.applicableApps.includes(currentAppPackage)) {
493
- toast.error(`This feature is not available for the current app (${currentAppPackage})`);
494
- return;
495
- }
496
-
497
- if (featureToSubscribe.appScope === 'specific') {
498
- const hasExactMatch = featureToSubscribe.applicableApps.length === 1 &&
499
- featureToSubscribe.applicableApps[0] === currentAppPackage;
500
- if (!hasExactMatch && featureToSubscribe.applicableApps.length === 1) {
501
- const requiredApp = featureToSubscribe.applicableApps[0];
502
- toast.error(`${featureToSubscribe.name} is only available in the ${requiredApp} app`);
503
- return;
504
- }
505
- }
506
-
507
- setProcessingPayment(true);
508
- await new Promise(resolve => setTimeout(resolve, FEATURE_DELAY_MS));
509
-
510
- setIndividualFeatures(prev =>
511
- prev.map(feature =>
512
- feature.id === featureId
513
- ? { ...feature, isSubscribed: true }
514
- : feature
515
- )
516
- );
517
-
518
- const feature = individualFeatures.find(f => f.id === featureId);
519
- toast.success((t('premium.toasts.featureSubscribed', { name: feature?.name ?? '' }) ?? `Subscribed to ${feature?.name} successfully!`));
520
-
521
- } catch (error) {
522
- if (__DEV__) {
523
- console.error('Feature subscription failed:', error);
524
- }
525
- toast.error(t('premium.toasts.featureSubscribeFailed') || 'Feature subscription failed. Please try again.');
526
- } finally {
527
- setProcessingPayment(false);
528
- }
529
- };
530
-
531
- const handleFeatureUnsubscribe = useCallback(async (featureId: string) => {
532
- const feature = individualFeatures.find(f => f.id === featureId);
533
- const confirmed = await surfaces.confirm({
534
- title: t('premium.confirms.unsubscribeFeatureTitle') || 'Unsubscribe from Feature',
535
- description: feature
536
- ? (t('premium.confirms.unsubscribeFeature', { name: feature.name }) ?? `Are you sure you want to unsubscribe from ${feature.name}?`)
537
- : '',
538
- confirmLabel: t('premium.actions.unsubscribe') || 'Unsubscribe',
539
- cancelLabel: t('common.cancel') || 'Cancel',
540
- destructive: true,
541
- });
542
- if (!confirmed) return;
543
- try {
544
- setIndividualFeatures(prev =>
545
- prev.map(f =>
546
- f.id === featureId
547
- ? { ...f, isSubscribed: false }
548
- : f
549
- )
550
- );
551
- toast.success((t('premium.toasts.featureUnsubscribed', { name: feature?.name ?? '' }) ?? `Unsubscribed from ${feature?.name}`));
552
- } catch (error) {
553
- toast.error(t('premium.toasts.featureUnsubscribeFailed') || 'Failed to unsubscribe from feature');
554
- }
555
- }, [individualFeatures, t]);
556
-
557
- const renderCurrentSubscription = () => {
558
- if (!subscription) return null;
559
-
560
- const currentPlan = getCurrentPlan();
561
- if (!currentPlan) return null;
562
-
563
- const statusChipColor =
564
- subscription.status === 'active' ? 'success' :
565
- subscription.status === 'trialing' ? 'warning' :
566
- 'error';
567
-
568
- return (
569
- <View className="mb-space-24">
570
- <H5 className="text-text mb-space-12">
571
- {t('premium.current.title') || 'Current Subscription'}
572
- </H5>
573
-
574
- <Card variant="outlined">
575
- <CardBody style={{ padding: 20 }}>
576
- <View className="flex-row justify-between items-start mb-space-12">
577
- <View className="flex-1 pr-space-12">
578
- <H4 className="text-text" numberOfLines={1}>{currentPlan.name}</H4>
579
- <Text className="text-text-secondary text-sm mt-space-2">
580
- {`$${currentPlan.price}/month`}
581
- </Text>
582
- </View>
583
- <Badge variant="subtle" color={statusChipColor} size="large" content={subscription.status.toUpperCase()} />
584
- </View>
585
-
586
- <Text className="text-text-secondary text-sm mb-space-16">
587
- {t('premium.current.renewsOn', { date: new Date(subscription.currentPeriodEnd).toLocaleDateString() }) || `Renews on ${new Date(subscription.currentPeriodEnd).toLocaleDateString()}`}
588
- </Text>
589
-
590
- {subscription.cancelAtPeriodEnd && (
591
- <View className="flex-row items-center bg-fill-secondary rounded-radius-12 p-space-12 mb-space-16">
592
- <Ionicons name="warning" size={16} color={colors.warning} />
593
- <Text className="text-text-secondary text-sm ml-space-8 flex-1">
594
- {t('premium.current.willCancelOn', { date: new Date(subscription.currentPeriodEnd).toLocaleDateString() }) || `Subscription will cancel on ${new Date(subscription.currentPeriodEnd).toLocaleDateString()}`}
595
- </Text>
596
- </View>
597
- )}
598
-
599
- <View className="flex-row gap-space-12">
600
- {subscription.cancelAtPeriodEnd ? (
601
- <Button
602
- appearance="solid" tone="accent"
603
- onPress={handleReactivateSubscription}
604
- className="flex-1"
605
- accessibilityLabel={t('premium.actions.reactivate') || 'Reactivate'}
606
- >
607
- {t('premium.actions.reactivate') || 'Reactivate'}
608
- </Button>
609
- ) : (
610
- <Button
611
- appearance="solid" tone="danger"
612
- onPress={handleCancelSubscription}
613
- className="flex-1"
614
- accessibilityLabel={t('premium.actions.cancelSubBtn') || 'Cancel Subscription'}
615
- >
616
- {t('premium.actions.cancelSubBtn') || 'Cancel Subscription'}
617
- </Button>
618
- )}
619
-
620
- <Button
621
- appearance="subtle" tone="neutral"
622
- onPress={() => navigate?.('PaymentGateway')}
623
- className="flex-1"
624
- accessibilityLabel={t('premium.actions.manageBilling') || 'Manage Billing'}
625
- >
626
- {t('premium.actions.manageBilling') || 'Manage Billing'}
627
- </Button>
628
- </View>
629
- </CardBody>
630
- </Card>
631
- </View>
632
- );
633
- };
634
-
635
- const renderBillingToggle = () => (
636
- <View className="mb-space-24">
637
- <SegmentedControl<BillingInterval>
638
- label={t('premium.billing.label') || 'Billing period'}
639
- type="tabs"
640
- value={billingInterval}
641
- onChange={setBillingInterval}
642
- >
643
- <SegmentedControlItem value={BILLING_MONTH}>
644
- <SegmentedControlItemText>
645
- {t('premium.billing.monthly') || 'Monthly'}
646
- </SegmentedControlItemText>
647
- </SegmentedControlItem>
648
- <SegmentedControlItem value={BILLING_YEAR}>
649
- <SegmentedControlItemText>
650
- {t('premium.billing.yearly') || 'Yearly'}
651
- </SegmentedControlItemText>
652
- </SegmentedControlItem>
653
- </SegmentedControl>
654
-
655
- {billingInterval === 'year' && (
656
- <Text className="text-text-secondary text-sm text-center mt-space-12 font-medium">
657
- {t('premium.billing.saveYearly') || 'Save 20% with yearly billing'}
658
- </Text>
659
- )}
660
- </View>
661
- );
662
-
663
- const renderPlanCard = (plan: SubscriptionPlan) => {
664
- const pricing = formatPrice(plan.price, plan.interval);
665
- const isSelected = selectedPlan === plan.id;
666
- const isCurrentPlan = subscription?.planId === plan.id;
667
- const isAppSpecific = plan.appScope === 'specific' && plan.applicableApps.length === 1;
668
- const isAvailableForCurrentApp = plan.applicableApps.includes(currentAppPackage);
669
-
670
- const getAppScopeText = () => {
671
- if (plan.appScope === 'ecosystem') {
672
- return t('premium.plan.scope.allApps') || 'Works across all Oxy apps';
673
- }
674
- if (isAppSpecific) {
675
- const appName = plan.applicableApps[0];
676
- return t('premium.plan.scope.exclusive', { app: appName }) || `Exclusive to ${appName} app`;
677
- }
678
- return t('premium.plan.scope.availableIn', { apps: plan.applicableApps.join(', ') }) || `Available in: ${plan.applicableApps.join(', ')}`;
679
- };
680
-
681
- const getAvailabilityStatus = () => {
682
- if (isAppSpecific && !isAvailableForCurrentApp) {
683
- const requiredApp = plan.applicableApps[0];
684
- return {
685
- available: false,
686
- reason: t('premium.plan.scope.exclusive', { app: requiredApp }) || `Only available in ${requiredApp} app`
687
- };
688
- }
689
- return { available: true, reason: null };
690
- };
691
-
692
- const availability = getAvailabilityStatus();
693
-
694
- return (
695
- <Card
696
- key={plan.id}
697
- variant="outlined"
698
- style={[
699
- { marginBottom: 16 },
700
- !availability.available ? { opacity: 0.6 } : null,
701
- (isSelected || plan.isPopular) ? { borderColor: colors.primary, borderWidth: 2 } : null,
702
- ]}
703
- >
704
- <CardBody style={{ padding: 20 }}>
705
- <View className="flex-row flex-wrap gap-space-8 mb-space-12">
706
- {plan.isPopular && (
707
- <Badge variant="solid" color="primary" size="large" content={t('premium.plan.badge.mostPopular') || 'Most Popular'} />
708
- )}
709
- {isAppSpecific && (
710
- <Badge
711
- variant="subtle"
712
- color={isAvailableForCurrentApp ? 'success' : 'warning'}
713
- size="large"
714
- content={isAvailableForCurrentApp
715
- ? (t('premium.plan.badge.appExclusive') || 'App Exclusive')
716
- : (t('premium.plan.badge.notAvailable') || 'Not Available')}
717
- />
718
- )}
719
- </View>
720
-
721
- <View className="mb-space-16">
722
- <H4 className="text-text mb-space-4">{plan.name}</H4>
723
- <Text className="text-text-secondary text-sm">
724
- {plan.description}
725
- </Text>
726
- <Text className="text-text-tertiary text-xs mt-space-4 italic">
727
- {getAppScopeText()}
728
- </Text>
729
- {!availability.available && (
730
- <Text className="text-xs mt-space-4 font-medium" style={{ color: colors.error }}>
731
- {availability.reason}
732
- </Text>
733
- )}
734
- </View>
735
-
736
- <View className="flex-row items-baseline mb-space-20">
737
- <H2 className="text-text">{pricing.formatted}</H2>
738
- <Text className="text-text-secondary text-sm ml-space-4">
739
- {t('premium.plan.perInterval', { interval: pricing.interval }) || `per ${pricing.interval}`}
740
- </Text>
741
- </View>
742
-
743
- <BenefitList className="mb-space-24">
744
- {plan.features.map((feature) => (
745
- <BenefitRow
746
- key={feature}
747
- icon={<Ionicons name="checkmark" size={18} color={colors.success} />}
748
- label={feature}
749
- />
750
- ))}
751
- </BenefitList>
752
-
753
- {isCurrentPlan ? (
754
- <Button
755
- appearance="subtle" tone="neutral"
756
- disabled
757
- icon={<Ionicons name="checkmark-circle" size={18} color={colors.success} />}
758
- accessibilityLabel={t('premium.plan.current') || 'Current Plan'}
759
- className="w-full"
760
- >
761
- {t('premium.plan.current') || 'Current Plan'}
762
- </Button>
763
- ) : !availability.available ? (
764
- <Button
765
- appearance="subtle" tone="neutral"
766
- disabled
767
- accessibilityLabel={t('premium.plan.notAvailableInApp') || 'Not Available in Current App'}
768
- className="w-full"
769
- >
770
- {t('premium.plan.notAvailableInApp') || 'Not Available in Current App'}
771
- </Button>
772
- ) : (
773
- <Button
774
- variant={plan.isPopular ? 'primary' : 'secondary'}
775
- onPress={() => handleSubscribe(plan.id)}
776
- disabled={processingPayment}
777
- loading={processingPayment && isSelected}
778
- accessibilityLabel={t('premium.actions.subscribeTo', { name: plan.name }) || `Subscribe to ${plan.name}`}
779
- className="w-full"
780
- >
781
- {t('premium.actions.subscribeTo', { name: plan.name }) || `Subscribe to ${plan.name}`}
782
- </Button>
783
- )}
784
- </CardBody>
785
- </Card>
786
- );
787
- };
788
-
789
- const renderTabNavigation = () => (
790
- <View className="mb-space-24">
791
- <SegmentedControl<ActiveTab>
792
- label={t('premium.tabs.label') || 'Subscription type'}
793
- type="tabs"
794
- value={activeTab}
795
- onChange={setActiveTab}
796
- >
797
- <SegmentedControlItem value={TAB_PLANS}>
798
- <SegmentedControlItemText>
799
- {t('premium.tabs.plans') || 'Full Plans'}
800
- </SegmentedControlItemText>
801
- </SegmentedControlItem>
802
- <SegmentedControlItem value={TAB_FEATURES}>
803
- <SegmentedControlItemText>
804
- {t('premium.tabs.features') || 'Individual Features'}
805
- </SegmentedControlItemText>
806
- </SegmentedControlItem>
807
- </SegmentedControl>
808
- </View>
809
- );
810
-
811
- const renderFeatureCard = (feature: IndividualFeature) => {
812
- const pricing = formatPrice(feature.price, feature.interval);
813
- const isSubscribed = feature.isSubscribed;
814
- const isIncludedInCurrentPlan = feature.isIncludedInCurrentPlan;
815
- const canPurchase = feature.canBePurchasedSeparately && !isIncludedInCurrentPlan;
816
-
817
- const getCategoryColor = (category: string) => {
818
- switch (category) {
819
- case 'analytics': return colors.warning;
820
- case 'customization': return colors.secondary;
821
- case 'content': return colors.success;
822
- case 'networking': return colors.info;
823
- case 'productivity': return colors.error;
824
- default: return colors.primary;
825
- }
826
- };
827
-
828
- const getCategoryIcon = (category: string): IoniconName => {
829
- switch (category) {
830
- case 'analytics': return 'analytics';
831
- case 'customization': return 'color-palette';
832
- case 'content': return 'document-text';
833
- case 'networking': return 'people';
834
- case 'productivity': return 'briefcase';
835
- default: return 'star';
836
- }
837
- };
838
-
839
- const getAppScopeText = () => {
840
- if (feature.appScope === 'ecosystem') {
841
- return t('premium.feature.scope.allApps');
842
- }
843
- return t('premium.feature.scope.availableIn', { apps: feature.applicableApps.join(', ') }) || `Available in: ${feature.applicableApps.join(', ')}`;
844
- };
845
-
846
- return (
847
- <Card
848
- key={feature.id}
849
- variant="outlined"
850
- style={[
851
- { marginBottom: 12 },
852
- isIncludedInCurrentPlan
853
- ? { borderColor: colors.primary, borderWidth: 2 }
854
- : isSubscribed
855
- ? { borderColor: colors.success, borderWidth: 2 }
856
- : null,
857
- ]}
858
- >
859
- <CardBody style={{ padding: 16 }}>
860
- <View className="flex-row items-start mb-space-12">
861
- <View
862
- className="bg-fill-secondary rounded-radius-max items-center justify-center mr-space-12"
863
- style={{ width: 40, height: 40 }}
864
- >
865
- <Ionicons
866
- name={getCategoryIcon(feature.category)}
867
- size={24}
868
- color={getCategoryColor(feature.category)}
869
- />
870
- </View>
871
- <View className="flex-1">
872
- <View className="flex-row items-center justify-between mb-space-4">
873
- <H5 className="text-text flex-1 pr-space-8" numberOfLines={1}>{feature.name}</H5>
874
- {isIncludedInCurrentPlan && (
875
- <Badge variant="solid" color="primary" size="large" content={t('premium.feature.included') || 'Included'} />
876
- )}
877
- </View>
878
- <Text className="text-text-secondary text-sm">
879
- {feature.description}
880
- </Text>
881
- <Text className="text-text-tertiary text-xs mt-space-4 italic">
882
- {getAppScopeText()}
883
- </Text>
884
- </View>
885
- </View>
886
-
887
- {!isIncludedInCurrentPlan && (
888
- <View className="items-center mb-space-16">
889
- <H4 className="text-text">{pricing.formatted}</H4>
890
- <Text className="text-text-secondary text-sm mt-space-2">
891
- {t('premium.plan.perInterval', { interval: pricing.interval }) || `per ${pricing.interval}`}
892
- </Text>
893
- </View>
894
- )}
895
-
896
- {isIncludedInCurrentPlan ? (
897
- <Button
898
- appearance="solid" tone="accent"
899
- disabled
900
- icon={<Ionicons name="checkmark-circle" size={16} color={colors.primaryForeground} />}
901
- accessibilityLabel={t('premium.feature.includedInPlan') || 'Included in your plan'}
902
- className="w-full"
903
- >
904
- {t('premium.feature.includedInPlan') || 'Included in your plan'}
905
- </Button>
906
- ) : isSubscribed ? (
907
- <View className="flex-row gap-space-8">
908
- <Button
909
- appearance="subtle" tone="neutral"
910
- disabled
911
- icon={<Ionicons name="checkmark" size={16} color={colors.success} />}
912
- accessibilityLabel={t('premium.feature.subscribed') || 'Subscribed'}
913
- className="flex-1"
914
- >
915
- {t('premium.feature.subscribed') || 'Subscribed'}
916
- </Button>
917
- <Button
918
- appearance="subtle" tone="neutral"
919
- onPress={() => handleFeatureUnsubscribe(feature.id)}
920
- accessibilityLabel={t('premium.actions.unsubscribe') || 'Unsubscribe'}
921
- className="flex-1"
922
- >
923
- {t('premium.actions.unsubscribe') || 'Unsubscribe'}
924
- </Button>
925
- </View>
926
- ) : canPurchase ? (
927
- <Button
928
- appearance="solid" tone="accent"
929
- onPress={() => handleFeatureSubscribe(feature.id)}
930
- disabled={processingPayment}
931
- loading={processingPayment}
932
- accessibilityLabel={t('premium.actions.subscribe') || 'Subscribe'}
933
- className="w-full"
934
- >
935
- {t('premium.actions.subscribe') || 'Subscribe'}
936
- </Button>
937
- ) : (
938
- <Button
939
- appearance="subtle" tone="neutral"
940
- disabled
941
- accessibilityLabel={t('premium.feature.plansOnly') || 'Only available in subscription plans'}
942
- className="w-full"
943
- >
944
- {t('premium.feature.plansOnly') || 'Only available in subscription plans'}
945
- </Button>
946
- )}
947
- </CardBody>
948
- </Card>
949
- );
950
- };
951
-
952
- const renderIndividualFeatures = () => (
953
- <View className="mb-space-24">
954
- <H4 className="text-text mb-space-8">
955
- {t('premium.features.title') || 'Individual Features'}
956
- </H4>
957
- <Text className="text-text-secondary text-base mb-space-16">
958
- {t('premium.features.subtitle') || 'Subscribe to specific features you need. Some features are included in subscription plans.'}
959
- </Text>
960
-
961
- {FEATURE_CATEGORIES.map(category => {
962
- const categoryFeatures = individualFeatures.filter(f => f.category === category);
963
- if (categoryFeatures.length === 0) return null;
964
-
965
- return (
966
- <View key={category} className="mb-space-24">
967
- <H5 className="text-text mb-space-12">
968
- {category.charAt(0).toUpperCase() + category.slice(1)}
969
- </H5>
970
- {categoryFeatures.map(renderFeatureCard)}
971
- </View>
972
- );
973
- })}
974
- </View>
975
- );
976
-
977
- // Show different app contexts for testing (development only).
978
- const [showAppSwitcher] = useState(__DEV__);
979
-
980
- const renderAppSwitcher = () => {
981
- if (!showAppSwitcher) return null;
982
-
983
- const testApps = ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'];
984
-
985
- return (
986
- <View className="bg-fill-secondary border border-border-image rounded-radius-12 p-space-16 mb-space-24">
987
- <Text className="text-text-secondary text-sm font-medium mb-space-12">
988
- {t('premium.dev.appContext') || 'Test App Context (Dev Only)'}
989
- </Text>
990
- <ScrollView horizontal showsHorizontalScrollIndicator={false}>
991
- <View className="flex-row gap-space-8">
992
- {testApps.map(app => (
993
- <Chip
994
- key={app}
995
- variant={currentAppPackage === app ? 'solid' : 'outlined'}
996
- color="primary"
997
- onPress={() => setCurrentAppPackage(app)}
998
- >
999
- {app}
1000
- </Chip>
1001
- ))}
1002
- </View>
1003
- </ScrollView>
1004
- </View>
1005
- );
1006
- };
1007
-
1008
- if (loading) {
1009
- return (
1010
- <>
1011
- <View className="items-center justify-center px-screen-margin py-space-40">
1012
- <ActivityIndicator size="large" color={colors.primary} />
1013
- <Text className="text-text-secondary text-base text-center mt-space-16">
1014
- {t('premium.loading') || 'Loading subscription plans...'}
1015
- </Text>
1016
- </View>
1017
- </>
1018
- );
1019
- }
1020
-
1021
- return (
1022
- <>
1023
-
1024
- <View className="px-screen-margin pb-space-32">
1025
- <View className="pt-space-20">
1026
- {renderAppSwitcher()}
1027
-
1028
- {subscription && renderCurrentSubscription()}
1029
-
1030
- {!subscription && (
1031
- <View className="mb-space-24">
1032
- <H2 className="text-text mb-space-8">
1033
- {t('premium.choosePlan') || 'Choose Your Plan'}
1034
- </H2>
1035
- <Text className="text-text-secondary text-base">
1036
- {t('premium.choosePlanSubtitle') || 'Unlock premium features and take your experience to the next level'}
1037
- </Text>
1038
- </View>
1039
- )}
1040
-
1041
- {!subscription && renderTabNavigation()}
1042
-
1043
- {!subscription && activeTab === TAB_PLANS && renderBillingToggle()}
1044
-
1045
- {activeTab === TAB_PLANS ? (
1046
- <View className="mb-space-24">
1047
- {!subscription && (
1048
- <H4 className="text-text mb-space-12">
1049
- {t('premium.availablePlans') || 'Available Plans'}
1050
- </H4>
1051
- )}
1052
-
1053
- {plans.map(renderPlanCard)}
1054
- </View>
1055
- ) : (
1056
- renderIndividualFeatures()
1057
- )}
1058
-
1059
- {/* Why go premium */}
1060
- <View className="mb-space-24">
1061
- <H4 className="text-text mb-space-12">
1062
- {t('premium.why') || 'Why Go Premium?'}
1063
- </H4>
1064
-
1065
- <BenefitList>
1066
- {([
1067
- {
1068
- icon: 'flash' as IoniconName,
1069
- color: colors.primary,
1070
- title: t('premium.benefits.performance.title') || 'Enhanced Performance',
1071
- desc: t('premium.benefits.performance.desc') || 'Faster processing and priority access to our servers',
1072
- },
1073
- {
1074
- icon: 'shield-checkmark' as IoniconName,
1075
- color: colors.success,
1076
- title: t('premium.benefits.security.title') || 'Advanced Security',
1077
- desc: t('premium.benefits.security.desc') || 'Enhanced encryption and security features',
1078
- },
1079
- {
1080
- icon: 'headset' as IoniconName,
1081
- color: colors.warning,
1082
- title: t('premium.benefits.support.title') || 'Priority Support',
1083
- desc: t('premium.benefits.support.desc') || 'Get help faster with our premium support team',
1084
- },
1085
- ]).map((benefit) => (
1086
- <BenefitRow
1087
- key={benefit.title}
1088
- icon={<Ionicons name={benefit.icon} size={18} color={benefit.color} />}
1089
- accessibilityLabel={`${benefit.title}. ${benefit.desc}`}
1090
- >
1091
- <Text className="text-text font-medium text-sm">{benefit.title}</Text>
1092
- {`\n${benefit.desc}`}
1093
- </BenefitRow>
1094
- ))}
1095
- </BenefitList>
1096
- </View>
1097
- </View>
1098
- </View>
1099
- </>
1100
- );
1101
- };
1102
-
1103
- export default PremiumSubscriptionScreen;