@oxyhq/services 6.8.0 → 6.9.1

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 (558) hide show
  1. package/lib/commonjs/ui/components/ActivityIndicator.js +4 -4
  2. package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -1
  3. package/lib/commonjs/ui/components/BottomSheet.js +6 -6
  4. package/lib/commonjs/ui/components/BottomSheet.js.map +1 -1
  5. package/lib/commonjs/ui/components/BottomSheetRouter.js +70 -3
  6. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  7. package/lib/commonjs/ui/components/CrossFadeIcon.js +1 -1
  8. package/lib/commonjs/ui/components/CrossFadeIcon.js.map +1 -1
  9. package/lib/commonjs/ui/components/FollowButton.js +3 -5
  10. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  11. package/lib/commonjs/ui/components/FontLoader.js +1 -1
  12. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  13. package/lib/commonjs/ui/components/GroupedItem.js +1 -4
  14. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  15. package/lib/commonjs/ui/components/GroupedSection.js +1 -2
  16. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  17. package/lib/commonjs/ui/components/Header.js.map +1 -1
  18. package/lib/commonjs/ui/components/HelperText.js +2 -2
  19. package/lib/commonjs/ui/components/HelperText.js.map +1 -1
  20. package/lib/commonjs/ui/components/Icon.js +5 -5
  21. package/lib/commonjs/ui/components/Icon.js.map +1 -1
  22. package/lib/commonjs/ui/components/IconButton/IconButton.js +0 -2
  23. package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -1
  24. package/lib/commonjs/ui/components/OxyProvider.js +17 -11
  25. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  26. package/lib/commonjs/ui/components/SignInModal.js +1 -1
  27. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  28. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +6 -8
  29. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -1
  30. package/lib/commonjs/ui/components/TextField/Adornment/utils.js +3 -3
  31. package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
  32. package/lib/commonjs/ui/components/TextField/helpers.js +2 -3
  33. package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
  34. package/lib/commonjs/ui/components/TextField.js +6 -9
  35. package/lib/commonjs/ui/components/TextField.js.map +1 -1
  36. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +3 -3
  37. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +1 -1
  38. package/lib/commonjs/ui/components/Typography/AnimatedText.js +12 -15
  39. package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -1
  40. package/lib/commonjs/ui/components/feedback/FormInput.js +1 -1
  41. package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -1
  42. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +1 -2
  43. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  44. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +0 -2
  45. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  46. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +1 -2
  47. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  48. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +0 -2
  49. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  50. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +15 -18
  51. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  52. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -4
  53. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  54. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +1 -2
  55. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  56. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +1 -2
  57. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  58. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +1 -2
  59. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
  60. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +1 -2
  61. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  62. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +1 -2
  63. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  64. package/lib/commonjs/ui/components/payment/paymentStyles.js +2 -2
  65. package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
  66. package/lib/commonjs/ui/components/styles/overlay.js +4 -4
  67. package/lib/commonjs/ui/components/styles/overlay.js.map +1 -1
  68. package/lib/commonjs/ui/components/styles/shadow.js +58 -63
  69. package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
  70. package/lib/commonjs/ui/components/theming.js +7 -7
  71. package/lib/commonjs/ui/components/theming.js.map +1 -1
  72. package/lib/commonjs/ui/context/OxyContext.js +1 -2
  73. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  74. package/lib/commonjs/ui/context/ThemeContext.js.map +1 -1
  75. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  76. package/lib/commonjs/ui/hooks/useAssets.js +11 -27
  77. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  78. package/lib/commonjs/ui/hooks/useFileFiltering.js +1 -1
  79. package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -1
  80. package/lib/commonjs/ui/index.js +19 -19
  81. package/lib/commonjs/ui/index.js.map +1 -1
  82. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
  83. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/FAQScreen.js +1 -2
  85. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/FeedbackScreen.js +2 -3
  87. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/FileManagementScreen.js +9 -9
  89. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/FollowersListScreen.js +0 -1
  91. package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/FollowingListScreen.js +0 -1
  93. package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +3 -4
  95. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -3
  97. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -11
  99. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
  101. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/UserListScreen.js +1 -2
  103. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -2
  105. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +5 -5
  107. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  109. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  110. package/lib/commonjs/ui/stores/followStore.js +2 -2
  111. package/lib/commonjs/ui/stores/followStore.js.map +1 -1
  112. package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
  113. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  114. package/lib/commonjs/ui/utils/fileManagement.js +2 -2
  115. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  116. package/lib/commonjs/ui/utils/userUtils.js +1 -1
  117. package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
  118. package/lib/module/ui/components/ActivityIndicator.js +4 -4
  119. package/lib/module/ui/components/ActivityIndicator.js.map +1 -1
  120. package/lib/module/ui/components/BottomSheet.js +7 -7
  121. package/lib/module/ui/components/BottomSheet.js.map +1 -1
  122. package/lib/module/ui/components/BottomSheetRouter.js +72 -5
  123. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  124. package/lib/module/ui/components/CrossFadeIcon.js +1 -1
  125. package/lib/module/ui/components/CrossFadeIcon.js.map +1 -1
  126. package/lib/module/ui/components/ErrorBoundary.js.map +1 -1
  127. package/lib/module/ui/components/FollowButton.js +3 -5
  128. package/lib/module/ui/components/FollowButton.js.map +1 -1
  129. package/lib/module/ui/components/FontLoader.js +1 -1
  130. package/lib/module/ui/components/FontLoader.js.map +1 -1
  131. package/lib/module/ui/components/GroupedItem.js +1 -2
  132. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  133. package/lib/module/ui/components/GroupedSection.js +1 -1
  134. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  135. package/lib/module/ui/components/Header.js.map +1 -1
  136. package/lib/module/ui/components/HelperText.js +2 -2
  137. package/lib/module/ui/components/HelperText.js.map +1 -1
  138. package/lib/module/ui/components/Icon.js +5 -4
  139. package/lib/module/ui/components/Icon.js.map +1 -1
  140. package/lib/module/ui/components/IconButton/IconButton.js +0 -1
  141. package/lib/module/ui/components/IconButton/IconButton.js.map +1 -1
  142. package/lib/module/ui/components/OxyProvider.js +18 -12
  143. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  144. package/lib/module/ui/components/SignInModal.js +1 -1
  145. package/lib/module/ui/components/SignInModal.js.map +1 -1
  146. package/lib/module/ui/components/TextField/Addons/Underline.js.map +1 -1
  147. package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +6 -8
  148. package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -1
  149. package/lib/module/ui/components/TextField/Adornment/utils.js +3 -3
  150. package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
  151. package/lib/module/ui/components/TextField/helpers.js +2 -3
  152. package/lib/module/ui/components/TextField/helpers.js.map +1 -1
  153. package/lib/module/ui/components/TextField.js +6 -9
  154. package/lib/module/ui/components/TextField.js.map +1 -1
  155. package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +3 -3
  156. package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +1 -1
  157. package/lib/module/ui/components/Typography/AnimatedText.js +12 -14
  158. package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -1
  159. package/lib/module/ui/components/feedback/FormInput.js +1 -1
  160. package/lib/module/ui/components/feedback/FormInput.js.map +1 -1
  161. package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
  162. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  163. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +0 -1
  164. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  165. package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
  166. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  167. package/lib/module/ui/components/fileManagement/UploadPreview.js +0 -1
  168. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  169. package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -18
  170. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  171. package/lib/module/ui/components/modals/DeleteAccountModal.js +3 -3
  172. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  173. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  174. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  175. package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
  176. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  177. package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
  178. package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
  179. package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
  180. package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  181. package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
  182. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  183. package/lib/module/ui/components/payment/paymentStyles.js +2 -2
  184. package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
  185. package/lib/module/ui/components/styles/overlay.js +4 -4
  186. package/lib/module/ui/components/styles/overlay.js.map +1 -1
  187. package/lib/module/ui/components/styles/shadow.js +58 -63
  188. package/lib/module/ui/components/styles/shadow.js.map +1 -1
  189. package/lib/module/ui/components/theming.js +7 -7
  190. package/lib/module/ui/components/theming.js.map +1 -1
  191. package/lib/module/ui/context/OxyContext.js +1 -1
  192. package/lib/module/ui/context/OxyContext.js.map +1 -1
  193. package/lib/module/ui/context/ThemeContext.js.map +1 -1
  194. package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  195. package/lib/module/ui/hooks/useAssets.js +11 -27
  196. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  197. package/lib/module/ui/hooks/useFileFiltering.js +1 -1
  198. package/lib/module/ui/hooks/useFileFiltering.js.map +1 -1
  199. package/lib/module/ui/index.js +19 -1
  200. package/lib/module/ui/index.js.map +1 -1
  201. package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
  202. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  203. package/lib/module/ui/screens/FAQScreen.js +1 -1
  204. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  205. package/lib/module/ui/screens/FeedbackScreen.js +2 -2
  206. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  207. package/lib/module/ui/screens/FileManagementScreen.js +9 -9
  208. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  209. package/lib/module/ui/screens/FollowersListScreen.js +0 -1
  210. package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
  211. package/lib/module/ui/screens/FollowingListScreen.js +0 -1
  212. package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
  213. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +3 -3
  214. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  215. package/lib/module/ui/screens/PaymentGatewayScreen.js +2 -2
  216. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  217. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +10 -11
  218. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  219. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  220. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  221. package/lib/module/ui/screens/UserListScreen.js +1 -1
  222. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  223. package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -2
  224. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  225. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +5 -5
  226. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  227. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  228. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  229. package/lib/module/ui/stores/followStore.js +2 -2
  230. package/lib/module/ui/stores/followStore.js.map +1 -1
  231. package/lib/module/ui/utils/avatarUtils.js +1 -1
  232. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  233. package/lib/module/ui/utils/fileManagement.js +2 -2
  234. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  235. package/lib/module/ui/utils/userUtils.js +1 -1
  236. package/lib/module/ui/utils/userUtils.js.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
  238. package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +1 -1
  240. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +1 -1
  243. package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
  248. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts +1 -1
  250. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +1 -1
  252. package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
  255. package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/components/Icon.d.ts +2 -2
  257. package/lib/typescript/commonjs/ui/components/Icon.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts +3 -3
  259. package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +1 -1
  262. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/components/Surface.d.ts +1 -1
  264. package/lib/typescript/commonjs/ui/components/Surface.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -2
  266. package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +1 -1
  268. package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
  271. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
  273. package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts +1 -1
  275. package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/ui/components/TextField/types.d.ts +1 -1
  277. package/lib/typescript/commonjs/ui/components/TextField/types.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/components/TextField.d.ts +3 -3
  279. package/lib/typescript/commonjs/ui/components/TextField.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.d.ts +1 -1
  281. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +2 -2
  283. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/components/Typography/AnimatedText.d.ts +2 -2
  285. package/lib/typescript/commonjs/ui/components/Typography/AnimatedText.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +1 -1
  287. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
  289. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts +1 -1
  291. package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  293. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +1 -1
  296. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  298. package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts +1 -1
  300. package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts +1 -1
  302. package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
  304. package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
  306. package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/components/styles/shadow.d.ts +1 -1
  309. package/lib/typescript/commonjs/ui/components/styles/shadow.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +2 -1
  311. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
  313. package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +1 -1
  315. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +2 -2
  318. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/ui/index.d.ts +19 -1
  321. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts +1 -1
  323. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +1 -1
  325. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +1 -1
  327. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +1 -1
  329. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
  331. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  333. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +1 -1
  336. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  338. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts +1 -1
  340. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +1 -1
  342. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
  344. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +1 -1
  346. package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/components/BottomSheet.d.ts +1 -1
  348. package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +1 -1
  351. package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +1 -1
  353. package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +1 -1
  354. package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
  355. package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
  356. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
  357. package/lib/typescript/module/ui/components/GroupedItem.d.ts +1 -1
  358. package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +1 -1
  359. package/lib/typescript/module/ui/components/GroupedSection.d.ts +1 -1
  360. package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +1 -1
  361. package/lib/typescript/module/ui/components/Header.d.ts.map +1 -1
  362. package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
  363. package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
  364. package/lib/typescript/module/ui/components/Icon.d.ts +2 -2
  365. package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
  366. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
  367. package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
  368. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  369. package/lib/typescript/module/ui/components/SignInModal.d.ts +1 -1
  370. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  371. package/lib/typescript/module/ui/components/Surface.d.ts +1 -1
  372. package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
  373. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +2 -2
  374. package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
  375. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +1 -1
  376. package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
  377. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
  378. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
  379. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
  380. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
  381. package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
  382. package/lib/typescript/module/ui/components/TextField/helpers.d.ts +1 -1
  383. package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
  384. package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
  385. package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
  386. package/lib/typescript/module/ui/components/TextField.d.ts +3 -3
  387. package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
  388. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +1 -1
  389. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  390. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +2 -2
  391. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  392. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +2 -2
  393. package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +1 -1
  395. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
  396. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
  397. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  398. package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts +1 -1
  399. package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  400. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  401. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  402. package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  403. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +1 -1
  404. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  405. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  406. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  407. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
  408. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  409. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
  410. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  411. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
  412. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  413. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
  414. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  415. package/lib/typescript/module/ui/components/styles/overlay.d.ts.map +1 -1
  416. package/lib/typescript/module/ui/components/styles/shadow.d.ts +1 -1
  417. package/lib/typescript/module/ui/components/styles/shadow.d.ts.map +1 -1
  418. package/lib/typescript/module/ui/context/OxyContext.d.ts +2 -1
  419. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  420. package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
  421. package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
  422. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +1 -1
  423. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
  424. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  425. package/lib/typescript/module/ui/hooks/useAssets.d.ts +2 -2
  426. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  427. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -1
  428. package/lib/typescript/module/ui/index.d.ts +19 -1
  429. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  430. package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
  431. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  432. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
  433. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  434. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
  435. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  436. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
  437. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  438. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
  439. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  440. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  441. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  442. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  443. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
  444. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  446. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  447. package/lib/typescript/module/ui/stores/assetStore.d.ts +1 -1
  448. package/lib/typescript/module/ui/stores/assetStore.d.ts.map +1 -1
  449. package/lib/typescript/module/ui/utils/avatarUtils.d.ts +1 -1
  450. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  451. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
  452. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  453. package/lib/typescript/types/expo-crypto.d.ts +1 -1
  454. package/lib/typescript/types/expo-secure-store.d.ts +4 -4
  455. package/package.json +1 -1
  456. package/src/types/expo-crypto.d.ts +1 -1
  457. package/src/types/expo-secure-store.d.ts +4 -4
  458. package/src/ui/components/ActivityIndicator.tsx +6 -6
  459. package/src/ui/components/BottomSheet.tsx +11 -12
  460. package/src/ui/components/BottomSheetRouter.tsx +69 -7
  461. package/src/ui/components/CrossFadeIcon.tsx +2 -2
  462. package/src/ui/components/ErrorBoundary.tsx +1 -1
  463. package/src/ui/components/FollowButton.tsx +3 -5
  464. package/src/ui/components/FontLoader.tsx +2 -1
  465. package/src/ui/components/GroupedItem.tsx +3 -3
  466. package/src/ui/components/GroupedSection.tsx +2 -1
  467. package/src/ui/components/Header.tsx +1 -1
  468. package/src/ui/components/HelperText.tsx +5 -5
  469. package/src/ui/components/Icon.tsx +5 -5
  470. package/src/ui/components/IconButton/IconButton.tsx +8 -8
  471. package/src/ui/components/OxyProvider.tsx +16 -10
  472. package/src/ui/components/SignInModal.tsx +2 -1
  473. package/src/ui/components/Surface.tsx +4 -4
  474. package/src/ui/components/TextField/Addons/Outline.tsx +4 -4
  475. package/src/ui/components/TextField/Addons/Underline.tsx +1 -1
  476. package/src/ui/components/TextField/Adornment/TextFieldAdornment.tsx +5 -8
  477. package/src/ui/components/TextField/Adornment/TextFieldAffix.tsx +6 -6
  478. package/src/ui/components/TextField/Adornment/TextFieldIcon.tsx +4 -4
  479. package/src/ui/components/TextField/Adornment/utils.ts +3 -3
  480. package/src/ui/components/TextField/Label/InputLabel.tsx +1 -1
  481. package/src/ui/components/TextField/TextFieldFlat.tsx +3 -3
  482. package/src/ui/components/TextField/TextFieldOutlined.tsx +5 -5
  483. package/src/ui/components/TextField/helpers.tsx +4 -5
  484. package/src/ui/components/TextField/types.tsx +1 -1
  485. package/src/ui/components/TextField.tsx +8 -11
  486. package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +6 -6
  487. package/src/ui/components/TouchableRipple/TouchableRipple.tsx +8 -8
  488. package/src/ui/components/Typography/AnimatedText.tsx +5 -6
  489. package/src/ui/components/feedback/FormInput.tsx +1 -1
  490. package/src/ui/components/fileManagement/AnimatedButton.tsx +2 -1
  491. package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
  492. package/src/ui/components/fileManagement/FileViewer.tsx +2 -1
  493. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  494. package/src/ui/components/internal/GroupedPillButtons.tsx +2 -6
  495. package/src/ui/components/modals/DeleteAccountModal.tsx +4 -3
  496. package/src/ui/components/payment/PaymentDetailsStep.tsx +2 -1
  497. package/src/ui/components/payment/PaymentMethodStep.tsx +2 -1
  498. package/src/ui/components/payment/PaymentReviewStep.tsx +2 -1
  499. package/src/ui/components/payment/PaymentSuccessStep.tsx +2 -1
  500. package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -1
  501. package/src/ui/components/payment/paymentStyles.ts +2 -2
  502. package/src/ui/components/styles/overlay.tsx +6 -6
  503. package/src/ui/components/styles/shadow.tsx +9 -14
  504. package/src/ui/components/theming.tsx +7 -7
  505. package/src/ui/context/OxyContext.tsx +2 -1
  506. package/src/ui/context/ThemeContext.tsx +1 -1
  507. package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
  508. package/src/ui/hooks/queries/useSecurityQueries.ts +1 -1
  509. package/src/ui/hooks/useAssets.ts +3 -23
  510. package/src/ui/hooks/useFileFiltering.ts +1 -2
  511. package/src/ui/index.ts +19 -1
  512. package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
  513. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  514. package/src/ui/screens/FAQScreen.tsx +2 -1
  515. package/src/ui/screens/FeedbackScreen.tsx +3 -2
  516. package/src/ui/screens/FileManagementScreen.tsx +10 -10
  517. package/src/ui/screens/FollowersListScreen.tsx +1 -1
  518. package/src/ui/screens/FollowingListScreen.tsx +1 -1
  519. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +4 -3
  520. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -2
  521. package/src/ui/screens/PremiumSubscriptionScreen.tsx +5 -7
  522. package/src/ui/screens/ProfileScreen.tsx +1 -1
  523. package/src/ui/screens/UserListScreen.tsx +2 -1
  524. package/src/ui/screens/WelcomeNewUserScreen.tsx +3 -2
  525. package/src/ui/screens/karma/KarmaCenterScreen.tsx +5 -5
  526. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
  527. package/src/ui/stores/assetStore.ts +1 -1
  528. package/src/ui/stores/followStore.ts +2 -2
  529. package/src/ui/utils/avatarUtils.ts +2 -2
  530. package/src/ui/utils/fileManagement.ts +4 -4
  531. package/src/ui/utils/userUtils.ts +1 -1
  532. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +0 -73
  533. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +0 -1
  534. package/lib/commonjs/ui/context/hooks/useLanguageManagement.js +0 -112
  535. package/lib/commonjs/ui/context/hooks/useLanguageManagement.js.map +0 -1
  536. package/lib/commonjs/ui/context/hooks/useSessionManagement.js +0 -279
  537. package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +0 -1
  538. package/lib/module/ui/context/hooks/useDeviceManagement.js +0 -68
  539. package/lib/module/ui/context/hooks/useDeviceManagement.js.map +0 -1
  540. package/lib/module/ui/context/hooks/useLanguageManagement.js +0 -107
  541. package/lib/module/ui/context/hooks/useLanguageManagement.js.map +0 -1
  542. package/lib/module/ui/context/hooks/useSessionManagement.js +0 -274
  543. package/lib/module/ui/context/hooks/useSessionManagement.js.map +0 -1
  544. package/lib/typescript/commonjs/ui/context/hooks/useDeviceManagement.d.ts +0 -27
  545. package/lib/typescript/commonjs/ui/context/hooks/useDeviceManagement.d.ts.map +0 -1
  546. package/lib/typescript/commonjs/ui/context/hooks/useLanguageManagement.d.ts +0 -25
  547. package/lib/typescript/commonjs/ui/context/hooks/useLanguageManagement.d.ts.map +0 -1
  548. package/lib/typescript/commonjs/ui/context/hooks/useSessionManagement.d.ts +0 -41
  549. package/lib/typescript/commonjs/ui/context/hooks/useSessionManagement.d.ts.map +0 -1
  550. package/lib/typescript/module/ui/context/hooks/useDeviceManagement.d.ts +0 -27
  551. package/lib/typescript/module/ui/context/hooks/useDeviceManagement.d.ts.map +0 -1
  552. package/lib/typescript/module/ui/context/hooks/useLanguageManagement.d.ts +0 -25
  553. package/lib/typescript/module/ui/context/hooks/useLanguageManagement.d.ts.map +0 -1
  554. package/lib/typescript/module/ui/context/hooks/useSessionManagement.d.ts +0 -41
  555. package/lib/typescript/module/ui/context/hooks/useSessionManagement.d.ts.map +0 -1
  556. package/src/ui/context/hooks/useDeviceManagement.ts +0 -108
  557. package/src/ui/context/hooks/useLanguageManagement.ts +0 -152
  558. package/src/ui/context/hooks/useSessionManagement.ts +0 -399
@@ -1,274 +0,0 @@
1
- "use strict";
2
-
3
- import { useCallback, useMemo, useRef, useState } from 'react';
4
- import { mergeSessions, normalizeAndSortSessions, sessionsArraysEqual } from '@oxyhq/core';
5
- import { fetchSessionsWithFallback, validateSessionBatch } from "../../utils/sessionHelpers.js";
6
- import { getStorageKeys } from "../../utils/storageHelpers.js";
7
- import { handleAuthError, isInvalidSessionError } from "../../utils/errorHandlers.js";
8
- import { clearQueryCache } from "../../hooks/queryClient.js";
9
- const DEFAULT_SAVE_ERROR_MESSAGE = 'Failed to save session data';
10
- const CLEAR_STORAGE_ERROR = 'Failed to clear storage';
11
-
12
- /**
13
- * Manage session state, persistence, and high-level multi-session operations.
14
- *
15
- * @param options - Session management configuration
16
- */
17
- export const useSessionManagement = ({
18
- oxyServices,
19
- storage,
20
- storageKeyPrefix,
21
- loginSuccess,
22
- logoutStore,
23
- applyLanguagePreference,
24
- onAuthStateChange,
25
- onError,
26
- setAuthError,
27
- logger,
28
- setTokenReady,
29
- queryClient
30
- }) => {
31
- const [sessions, setSessions] = useState([]);
32
- const [activeSessionId, setActiveSessionId] = useState(null);
33
- const refreshInFlightRef = useRef(null);
34
- const removedSessionsRef = useRef(new Set());
35
- const lastRefreshRef = useRef(0);
36
- const storageKeys = useMemo(() => getStorageKeys(storageKeyPrefix), [storageKeyPrefix]);
37
- const saveSessionIds = useCallback(async sessionIds => {
38
- if (!storage) return;
39
- try {
40
- const uniqueIds = Array.from(new Set(sessionIds));
41
- await storage.setItem(storageKeys.sessionIds, JSON.stringify(uniqueIds));
42
- } catch (error) {
43
- if (logger) {
44
- logger(DEFAULT_SAVE_ERROR_MESSAGE, error);
45
- } else if (__DEV__) {
46
- console.warn('Failed to save session IDs:', error);
47
- }
48
- }
49
- }, [logger, storage, storageKeys.sessionIds]);
50
- const updateSessions = useCallback((incoming, options = {}) => {
51
- setSessions(prevSessions => {
52
- const processed = options.merge ? mergeSessions(prevSessions, incoming, activeSessionId, false) : normalizeAndSortSessions(incoming, activeSessionId, false);
53
- if (storage) {
54
- void saveSessionIds(processed.map(session => session.sessionId));
55
- }
56
- if (sessionsArraysEqual(prevSessions, processed)) {
57
- return prevSessions;
58
- }
59
- return processed;
60
- });
61
- }, [activeSessionId, saveSessionIds, storage]);
62
- const saveActiveSessionId = useCallback(async sessionId => {
63
- if (!storage) return;
64
- try {
65
- await storage.setItem(storageKeys.activeSessionId, sessionId);
66
- } catch (error) {
67
- handleAuthError(error, {
68
- defaultMessage: DEFAULT_SAVE_ERROR_MESSAGE,
69
- code: 'SESSION_PERSISTENCE_ERROR',
70
- onError,
71
- setAuthError,
72
- logger
73
- });
74
- }
75
- }, [logger, onError, setAuthError, storage, storageKeys.activeSessionId]);
76
- const removeActiveSessionId = useCallback(async () => {
77
- if (!storage) return;
78
- try {
79
- await storage.removeItem(storageKeys.activeSessionId);
80
- } catch (error) {
81
- handleAuthError(error, {
82
- defaultMessage: DEFAULT_SAVE_ERROR_MESSAGE,
83
- code: 'SESSION_PERSISTENCE_ERROR',
84
- onError,
85
- setAuthError,
86
- logger
87
- });
88
- }
89
- }, [logger, onError, setAuthError, storage, storageKeys.activeSessionId]);
90
- const clearSessionStorage = useCallback(async () => {
91
- if (!storage) return;
92
- try {
93
- await storage.removeItem(storageKeys.activeSessionId);
94
- await storage.removeItem(storageKeys.sessionIds);
95
- } catch (error) {
96
- handleAuthError(error, {
97
- defaultMessage: CLEAR_STORAGE_ERROR,
98
- code: 'STORAGE_ERROR',
99
- onError,
100
- setAuthError,
101
- logger
102
- });
103
- }
104
- }, [logger, onError, setAuthError, storage, storageKeys.activeSessionId, storageKeys.sessionIds]);
105
- const clearSessionState = useCallback(async () => {
106
- setSessions([]);
107
- setActiveSessionId(null);
108
- logoutStore();
109
-
110
- // Clear TanStack Query cache (in-memory)
111
- if (queryClient) {
112
- queryClient.clear();
113
- }
114
-
115
- // Clear persisted query cache
116
- if (storage) {
117
- try {
118
- await clearQueryCache(storage);
119
- } catch (error) {
120
- if (logger) {
121
- logger('Failed to clear persisted query cache', error);
122
- }
123
- }
124
- }
125
- await clearSessionStorage();
126
- onAuthStateChange?.(null);
127
- }, [clearSessionStorage, logoutStore, onAuthStateChange, queryClient, storage, logger]);
128
- const activateSession = useCallback(async (sessionId, user) => {
129
- await oxyServices.getTokenBySession(sessionId);
130
- setTokenReady?.(true);
131
- setActiveSessionId(sessionId);
132
- loginSuccess(user);
133
- await saveActiveSessionId(sessionId);
134
- await applyLanguagePreference(user);
135
- onAuthStateChange?.(user);
136
- }, [applyLanguagePreference, loginSuccess, onAuthStateChange, oxyServices, saveActiveSessionId, setTokenReady]);
137
- const trackRemovedSession = useCallback(sessionId => {
138
- removedSessionsRef.current.add(sessionId);
139
- setTimeout(() => {
140
- removedSessionsRef.current.delete(sessionId);
141
- }, 5000);
142
- }, []);
143
- const findReplacementSession = useCallback(async sessionIds => {
144
- if (!sessionIds.length) {
145
- return null;
146
- }
147
- const validationResults = await validateSessionBatch(oxyServices, sessionIds, {
148
- maxConcurrency: 3
149
- });
150
- const validSession = validationResults.find(result => result.valid);
151
- if (!validSession) {
152
- return null;
153
- }
154
- const validation = await oxyServices.validateSession(validSession.sessionId, {
155
- useHeaderValidation: true
156
- });
157
- if (!validation?.valid || !validation.user) {
158
- return null;
159
- }
160
- const user = validation.user;
161
- await activateSession(validSession.sessionId, user);
162
- return user;
163
- }, [activateSession, oxyServices]);
164
- const switchSession = useCallback(async sessionId => {
165
- try {
166
- const validation = await oxyServices.validateSession(sessionId, {
167
- useHeaderValidation: true
168
- });
169
- if (!validation?.valid) {
170
- throw new Error('Session is invalid or expired');
171
- }
172
- if (!validation.user) {
173
- throw new Error('User data not available from session validation');
174
- }
175
- const user = validation.user;
176
- await activateSession(sessionId, user);
177
- try {
178
- const deviceSessions = await fetchSessionsWithFallback(oxyServices, sessionId, {
179
- fallbackUserId: user.id,
180
- logger
181
- });
182
- updateSessions(deviceSessions, {
183
- merge: true
184
- });
185
- } catch (error) {
186
- if (__DEV__) {
187
- console.warn('Failed to synchronize sessions after switch:', error);
188
- }
189
- }
190
- return user;
191
- } catch (error) {
192
- const invalidSession = isInvalidSessionError(error);
193
- if (invalidSession) {
194
- updateSessions(sessions.filter(session => session.sessionId !== sessionId), {
195
- merge: false
196
- });
197
- if (sessionId === activeSessionId) {
198
- const otherSessionIds = sessions.filter(session => session.sessionId !== sessionId && !removedSessionsRef.current.has(session.sessionId)).map(session => session.sessionId);
199
- const replacementUser = await findReplacementSession(otherSessionIds);
200
- if (replacementUser) {
201
- return replacementUser;
202
- }
203
- }
204
- }
205
- handleAuthError(error, {
206
- defaultMessage: 'Failed to switch session',
207
- code: invalidSession ? 'INVALID_SESSION' : 'SESSION_SWITCH_ERROR',
208
- onError,
209
- setAuthError,
210
- logger
211
- });
212
- throw error instanceof Error ? error : new Error('Failed to switch session');
213
- }
214
- }, [activateSession, activeSessionId, findReplacementSession, logger, loginSuccess, onError, oxyServices, sessions, setAuthError, updateSessions]);
215
- const refreshSessions = useCallback(async activeUserId => {
216
- if (!activeSessionId) return;
217
- if (refreshInFlightRef.current) {
218
- await refreshInFlightRef.current;
219
- return;
220
- }
221
- const now = Date.now();
222
- if (now - lastRefreshRef.current < 500) {
223
- return;
224
- }
225
- lastRefreshRef.current = now;
226
- const refreshPromise = (async () => {
227
- try {
228
- const deviceSessions = await fetchSessionsWithFallback(oxyServices, activeSessionId, {
229
- fallbackUserId: activeUserId,
230
- logger
231
- });
232
- updateSessions(deviceSessions, {
233
- merge: true
234
- });
235
- } catch (error) {
236
- if (isInvalidSessionError(error)) {
237
- const otherSessions = sessions.filter(session => session.sessionId !== activeSessionId && !removedSessionsRef.current.has(session.sessionId)).map(session => session.sessionId);
238
- const replacementUser = await findReplacementSession(otherSessions);
239
- if (!replacementUser) {
240
- await clearSessionState();
241
- }
242
- return;
243
- }
244
- handleAuthError(error, {
245
- defaultMessage: 'Failed to refresh sessions',
246
- code: 'SESSION_REFRESH_ERROR',
247
- onError,
248
- setAuthError,
249
- logger
250
- });
251
- } finally {
252
- refreshInFlightRef.current = null;
253
- lastRefreshRef.current = Date.now();
254
- }
255
- })();
256
- refreshInFlightRef.current = refreshPromise;
257
- await refreshPromise;
258
- }, [activeSessionId, clearSessionState, findReplacementSession, logger, onError, oxyServices, sessions, setAuthError, updateSessions]);
259
- const isRefreshInFlight = Boolean(refreshInFlightRef.current);
260
- return {
261
- sessions,
262
- activeSessionId,
263
- setActiveSessionId,
264
- updateSessions,
265
- switchSession,
266
- refreshSessions,
267
- clearSessionState,
268
- saveActiveSessionId,
269
- trackRemovedSession,
270
- storageKeys,
271
- isRefreshInFlight
272
- };
273
- };
274
- //# sourceMappingURL=useSessionManagement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useMemo","useRef","useState","mergeSessions","normalizeAndSortSessions","sessionsArraysEqual","fetchSessionsWithFallback","validateSessionBatch","getStorageKeys","handleAuthError","isInvalidSessionError","clearQueryCache","DEFAULT_SAVE_ERROR_MESSAGE","CLEAR_STORAGE_ERROR","useSessionManagement","oxyServices","storage","storageKeyPrefix","loginSuccess","logoutStore","applyLanguagePreference","onAuthStateChange","onError","setAuthError","logger","setTokenReady","queryClient","sessions","setSessions","activeSessionId","setActiveSessionId","refreshInFlightRef","removedSessionsRef","Set","lastRefreshRef","storageKeys","saveSessionIds","sessionIds","uniqueIds","Array","from","setItem","JSON","stringify","error","__DEV__","console","warn","updateSessions","incoming","options","prevSessions","processed","merge","map","session","sessionId","saveActiveSessionId","defaultMessage","code","removeActiveSessionId","removeItem","clearSessionStorage","clearSessionState","clear","activateSession","user","getTokenBySession","trackRemovedSession","current","add","setTimeout","delete","findReplacementSession","length","validationResults","maxConcurrency","validSession","find","result","valid","validation","validateSession","useHeaderValidation","switchSession","Error","deviceSessions","fallbackUserId","id","invalidSession","filter","otherSessionIds","has","replacementUser","refreshSessions","activeUserId","now","Date","refreshPromise","otherSessions","isRefreshInFlight","Boolean"],"sourceRoot":"../../../../../src","sources":["ui/context/hooks/useSessionManagement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAG9D,SAASC,aAAa,EAAEC,wBAAwB,EAAEC,mBAAmB,QAAQ,aAAa;AAC1F,SAASC,yBAAyB,EAAuBC,oBAAoB,QAAQ,+BAA4B;AACjH,SAASC,cAAc,QAA+B,+BAA4B;AAClF,SAASC,eAAe,EAAEC,qBAAqB,QAAQ,8BAA2B;AAGlF,SAASC,eAAe,QAAQ,4BAAyB;AA+BzD,MAAMC,0BAA0B,GAAG,6BAA6B;AAChE,MAAMC,mBAAmB,GAAG,yBAAyB;;AAErD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,WAAW;EACXC,OAAO;EACPC,gBAAgB;EAChBC,YAAY;EACZC,WAAW;EACXC,uBAAuB;EACvBC,iBAAiB;EACjBC,OAAO;EACPC,YAAY;EACZC,MAAM;EACNC,aAAa;EACbC;AAC2B,CAAC,KAAiC;EAC7D,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG1B,QAAQ,CAAkB,EAAE,CAAC;EAC7D,MAAM,CAAC2B,eAAe,EAAEC,kBAAkB,CAAC,GAAG5B,QAAQ,CAAgB,IAAI,CAAC;EAE3E,MAAM6B,kBAAkB,GAAG9B,MAAM,CAAuB,IAAI,CAAC;EAC7D,MAAM+B,kBAAkB,GAAG/B,MAAM,CAAc,IAAIgC,GAAG,CAAC,CAAC,CAAC;EACzD,MAAMC,cAAc,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L1C,QAAQ;IACRE,eAAe;IACfC,kBAAkB;IAClBkB,cAAc;IACdoC,aAAa;IACbU,eAAe;IACf/B,iBAAiB;IACjBN,mBAAmB;IACnBW,mBAAmB;IACnBjC,WAAW;IACXiE;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- import type { ApiError } from '@oxyhq/core';
2
- import type { OxyServices } from '@oxyhq/core';
3
- export interface UseDeviceManagementOptions {
4
- oxyServices: OxyServices;
5
- activeSessionId: string | null;
6
- onError?: (error: ApiError) => void;
7
- clearSessionState: () => Promise<void>;
8
- logger?: (message: string, error?: unknown) => void;
9
- }
10
- export interface UseDeviceManagementResult {
11
- getDeviceSessions: () => Promise<Array<{
12
- sessionId: string;
13
- deviceId: string;
14
- deviceName?: string;
15
- lastActive?: string;
16
- expiresAt?: string;
17
- }>>;
18
- logoutAllDeviceSessions: () => Promise<void>;
19
- updateDeviceName: (deviceName: string) => Promise<void>;
20
- }
21
- /**
22
- * Provide device session management helpers tied to the current active session.
23
- *
24
- * @param options - Device management configuration
25
- */
26
- export declare const useDeviceManagement: ({ oxyServices, activeSessionId, onError, clearSessionState, logger, }: UseDeviceManagementOptions) => UseDeviceManagementResult;
27
- //# sourceMappingURL=useDeviceManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDeviceManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useDeviceManagement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,OAAO,CAC9B,KAAK,CAAC;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CACH,CAAC;IACF,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,uEAMjC,0BAA0B,KAAG,yBAkE/B,CAAC"}
@@ -1,25 +0,0 @@
1
- import type { ApiError, User } from '@oxyhq/core';
2
- import { type LanguageMetadata } from '@oxyhq/core';
3
- import type { StorageInterface } from '../../utils/storageHelpers';
4
- export interface UseLanguageManagementOptions {
5
- storage: StorageInterface | null;
6
- languageKey: string;
7
- onError?: (error: ApiError) => void;
8
- logger?: (message: string, error?: unknown) => void;
9
- }
10
- export interface UseLanguageManagementResult {
11
- currentLanguage: string;
12
- metadata: LanguageMetadata | null;
13
- languageName: string;
14
- nativeLanguageName: string;
15
- setLanguage: (languageId: string) => Promise<void>;
16
- applyLanguagePreference: (user: User | null) => Promise<void>;
17
- hydrateLanguage: () => Promise<void>;
18
- }
19
- /**
20
- * Manage UI language state, persistence, and metadata derivation.
21
- *
22
- * @param options - Configuration for storage access and error reporting
23
- */
24
- export declare const useLanguageManagement: ({ storage, languageKey, onError, logger, }: UseLanguageManagementOptions) => UseLanguageManagementResult;
25
- //# sourceMappingURL=useLanguageManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLanguageManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useLanguageManagement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,uBAAuB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAID;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,4CAKnC,4BAA4B,KAAG,2BA4GjC,CAAC"}
@@ -1,41 +0,0 @@
1
- import type { ApiError, User } from '@oxyhq/core';
2
- import type { ClientSession } from '@oxyhq/core';
3
- import { getStorageKeys, type StorageInterface } from '../../utils/storageHelpers';
4
- import type { OxyServices } from '@oxyhq/core';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- export interface UseSessionManagementOptions {
7
- oxyServices: OxyServices;
8
- storage: StorageInterface | null;
9
- storageKeyPrefix?: string;
10
- loginSuccess: (user: User) => void;
11
- logoutStore: () => void;
12
- applyLanguagePreference: (user: User) => Promise<void>;
13
- onAuthStateChange?: (user: User | null) => void;
14
- onError?: (error: ApiError) => void;
15
- setAuthError?: (message: string | null) => void;
16
- logger?: (message: string, error?: unknown) => void;
17
- setTokenReady?: (ready: boolean) => void;
18
- queryClient?: QueryClient | null;
19
- }
20
- export interface UseSessionManagementResult {
21
- sessions: ClientSession[];
22
- activeSessionId: string | null;
23
- setActiveSessionId: (sessionId: string | null) => void;
24
- updateSessions: (incoming: ClientSession[], options?: {
25
- merge?: boolean;
26
- }) => void;
27
- switchSession: (sessionId: string) => Promise<User>;
28
- refreshSessions: (activeUserId?: string) => Promise<void>;
29
- clearSessionState: () => Promise<void>;
30
- saveActiveSessionId: (sessionId: string) => Promise<void>;
31
- trackRemovedSession: (sessionId: string) => void;
32
- storageKeys: ReturnType<typeof getStorageKeys>;
33
- isRefreshInFlight: boolean;
34
- }
35
- /**
36
- * Manage session state, persistence, and high-level multi-session operations.
37
- *
38
- * @param options - Session management configuration
39
- */
40
- export declare const useSessionManagement: ({ oxyServices, storage, storageKeyPrefix, loginSuccess, logoutStore, applyLanguagePreference, onAuthStateChange, onError, setAuthError, logger, setTokenReady, queryClient, }: UseSessionManagementOptions) => UseSessionManagementResult;
41
- //# sourceMappingURL=useSessionManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSessionManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useSessionManagement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,KAAK,EAA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I,CAAC,CAAC;IACpD,eAAe,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/C,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAKD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,+KAalC,2BAA2B,KAAG,0BA+UhC,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { ApiError } from '@oxyhq/core';
2
- import type { OxyServices } from '@oxyhq/core';
3
- export interface UseDeviceManagementOptions {
4
- oxyServices: OxyServices;
5
- activeSessionId: string | null;
6
- onError?: (error: ApiError) => void;
7
- clearSessionState: () => Promise<void>;
8
- logger?: (message: string, error?: unknown) => void;
9
- }
10
- export interface UseDeviceManagementResult {
11
- getDeviceSessions: () => Promise<Array<{
12
- sessionId: string;
13
- deviceId: string;
14
- deviceName?: string;
15
- lastActive?: string;
16
- expiresAt?: string;
17
- }>>;
18
- logoutAllDeviceSessions: () => Promise<void>;
19
- updateDeviceName: (deviceName: string) => Promise<void>;
20
- }
21
- /**
22
- * Provide device session management helpers tied to the current active session.
23
- *
24
- * @param options - Device management configuration
25
- */
26
- export declare const useDeviceManagement: ({ oxyServices, activeSessionId, onError, clearSessionState, logger, }: UseDeviceManagementOptions) => UseDeviceManagementResult;
27
- //# sourceMappingURL=useDeviceManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDeviceManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useDeviceManagement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,OAAO,CAC9B,KAAK,CAAC;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CACH,CAAC;IACF,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,uEAMjC,0BAA0B,KAAG,yBAkE/B,CAAC"}
@@ -1,25 +0,0 @@
1
- import type { ApiError, User } from '@oxyhq/core';
2
- import { type LanguageMetadata } from '@oxyhq/core';
3
- import type { StorageInterface } from '../../utils/storageHelpers';
4
- export interface UseLanguageManagementOptions {
5
- storage: StorageInterface | null;
6
- languageKey: string;
7
- onError?: (error: ApiError) => void;
8
- logger?: (message: string, error?: unknown) => void;
9
- }
10
- export interface UseLanguageManagementResult {
11
- currentLanguage: string;
12
- metadata: LanguageMetadata | null;
13
- languageName: string;
14
- nativeLanguageName: string;
15
- setLanguage: (languageId: string) => Promise<void>;
16
- applyLanguagePreference: (user: User | null) => Promise<void>;
17
- hydrateLanguage: () => Promise<void>;
18
- }
19
- /**
20
- * Manage UI language state, persistence, and metadata derivation.
21
- *
22
- * @param options - Configuration for storage access and error reporting
23
- */
24
- export declare const useLanguageManagement: ({ storage, languageKey, onError, logger, }: UseLanguageManagementOptions) => UseLanguageManagementResult;
25
- //# sourceMappingURL=useLanguageManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLanguageManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useLanguageManagement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,uBAAuB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAID;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,4CAKnC,4BAA4B,KAAG,2BA4GjC,CAAC"}
@@ -1,41 +0,0 @@
1
- import type { ApiError, User } from '@oxyhq/core';
2
- import type { ClientSession } from '@oxyhq/core';
3
- import { getStorageKeys, type StorageInterface } from '../../utils/storageHelpers';
4
- import type { OxyServices } from '@oxyhq/core';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- export interface UseSessionManagementOptions {
7
- oxyServices: OxyServices;
8
- storage: StorageInterface | null;
9
- storageKeyPrefix?: string;
10
- loginSuccess: (user: User) => void;
11
- logoutStore: () => void;
12
- applyLanguagePreference: (user: User) => Promise<void>;
13
- onAuthStateChange?: (user: User | null) => void;
14
- onError?: (error: ApiError) => void;
15
- setAuthError?: (message: string | null) => void;
16
- logger?: (message: string, error?: unknown) => void;
17
- setTokenReady?: (ready: boolean) => void;
18
- queryClient?: QueryClient | null;
19
- }
20
- export interface UseSessionManagementResult {
21
- sessions: ClientSession[];
22
- activeSessionId: string | null;
23
- setActiveSessionId: (sessionId: string | null) => void;
24
- updateSessions: (incoming: ClientSession[], options?: {
25
- merge?: boolean;
26
- }) => void;
27
- switchSession: (sessionId: string) => Promise<User>;
28
- refreshSessions: (activeUserId?: string) => Promise<void>;
29
- clearSessionState: () => Promise<void>;
30
- saveActiveSessionId: (sessionId: string) => Promise<void>;
31
- trackRemovedSession: (sessionId: string) => void;
32
- storageKeys: ReturnType<typeof getStorageKeys>;
33
- isRefreshInFlight: boolean;
34
- }
35
- /**
36
- * Manage session state, persistence, and high-level multi-session operations.
37
- *
38
- * @param options - Session management configuration
39
- */
40
- export declare const useSessionManagement: ({ oxyServices, storage, storageKeyPrefix, loginSuccess, logoutStore, applyLanguagePreference, onAuthStateChange, onError, setAuthError, logger, setTokenReady, queryClient, }: UseSessionManagementOptions) => UseSessionManagementResult;
41
- //# sourceMappingURL=useSessionManagement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":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AAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnF,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,eAAe,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/C,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAKD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,+KAalC,2BAA2B,KAAG,0BA+UhC,CAAC"}
@@ -1,108 +0,0 @@
1
- import { useCallback } from 'react';
2
- import type { ApiError } from '@oxyhq/core';
3
- import { DeviceManager } from '@oxyhq/core';
4
- import type { OxyServices } from '@oxyhq/core';
5
- import { handleAuthError } from '../../utils/errorHandlers';
6
-
7
- export interface UseDeviceManagementOptions {
8
- oxyServices: OxyServices;
9
- activeSessionId: string | null;
10
- onError?: (error: ApiError) => void;
11
- clearSessionState: () => Promise<void>;
12
- logger?: (message: string, error?: unknown) => void;
13
- }
14
-
15
- export interface UseDeviceManagementResult {
16
- getDeviceSessions: () => Promise<
17
- Array<{
18
- sessionId: string;
19
- deviceId: string;
20
- deviceName?: string;
21
- lastActive?: string;
22
- expiresAt?: string;
23
- }>
24
- >;
25
- logoutAllDeviceSessions: () => Promise<void>;
26
- updateDeviceName: (deviceName: string) => Promise<void>;
27
- }
28
-
29
- /**
30
- * Provide device session management helpers tied to the current active session.
31
- *
32
- * @param options - Device management configuration
33
- */
34
- export const useDeviceManagement = ({
35
- oxyServices,
36
- activeSessionId,
37
- onError,
38
- clearSessionState,
39
- logger,
40
- }: UseDeviceManagementOptions): UseDeviceManagementResult => {
41
- const getDeviceSessions = useCallback(async (): Promise<
42
- Array<{
43
- sessionId: string;
44
- deviceId: string;
45
- deviceName?: string;
46
- lastActive?: string;
47
- expiresAt?: string;
48
- }>
49
- > => {
50
- if (!activeSessionId) throw new Error('No active session');
51
- try {
52
- return await oxyServices.getDeviceSessions(activeSessionId);
53
- } catch (error) {
54
- handleAuthError(error, {
55
- defaultMessage: 'Failed to get device sessions',
56
- code: 'GET_DEVICE_SESSIONS_ERROR',
57
- onError,
58
- logger,
59
- });
60
- throw error instanceof Error ? error : new Error('Failed to get device sessions');
61
- }
62
- }, [activeSessionId, logger, onError, oxyServices]);
63
-
64
- const logoutAllDeviceSessions = useCallback(async (): Promise<void> => {
65
- if (!activeSessionId) throw new Error('No active session');
66
-
67
- try {
68
- await oxyServices.logoutAllDeviceSessions(activeSessionId);
69
- await clearSessionState();
70
- } catch (error) {
71
- handleAuthError(error, {
72
- defaultMessage: 'Failed to logout all device sessions',
73
- code: 'LOGOUT_ALL_DEVICES_ERROR',
74
- onError,
75
- logger,
76
- });
77
- throw error instanceof Error ? error : new Error('Failed to logout all device sessions');
78
- }
79
- }, [activeSessionId, clearSessionState, logger, onError, oxyServices]);
80
-
81
- const updateDeviceName = useCallback(
82
- async (deviceName: string): Promise<void> => {
83
- if (!activeSessionId) throw new Error('No active session');
84
-
85
- try {
86
- await oxyServices.updateDeviceName(activeSessionId, deviceName);
87
- await DeviceManager.updateDeviceName(deviceName);
88
- } catch (error) {
89
- handleAuthError(error, {
90
- defaultMessage: 'Failed to update device name',
91
- code: 'UPDATE_DEVICE_NAME_ERROR',
92
- onError,
93
- logger,
94
- });
95
- throw error instanceof Error ? error : new Error('Failed to update device name');
96
- }
97
- },
98
- [activeSessionId, logger, onError, oxyServices],
99
- );
100
-
101
- return {
102
- getDeviceSessions,
103
- logoutAllDeviceSessions,
104
- updateDeviceName,
105
- };
106
- };
107
-
108
-