@oxyhq/services 5.7.5 → 5.8.2

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 (303) hide show
  1. package/README.md +76 -76
  2. package/lib/commonjs/core/index.js +177 -102
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +69 -28
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/ui/components/Avatar.js +15 -6
  7. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  8. package/lib/commonjs/ui/components/FollowButton.js +100 -12
  9. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  10. package/lib/commonjs/ui/components/GroupedItem.js +58 -13
  11. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  12. package/lib/commonjs/ui/components/GroupedSection.js +7 -1
  13. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  14. package/lib/commonjs/ui/components/Header.js +356 -0
  15. package/lib/commonjs/ui/components/Header.js.map +1 -0
  16. package/lib/commonjs/ui/components/OxyProvider.js +28 -7
  17. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  18. package/lib/commonjs/ui/components/index.js +7 -0
  19. package/lib/commonjs/ui/components/index.js.map +1 -1
  20. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
  21. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/TextField.js +606 -546
  23. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.md +436 -0
  25. package/lib/commonjs/ui/context/OxyContext.js +181 -199
  26. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/index.js +6 -0
  28. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/useFollow.js +59 -2
  30. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
  32. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/OxyRouter.js +11 -1
  34. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
  36. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  38. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
  40. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1160 -406
  42. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
  44. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
  46. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
  48. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
  50. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
  52. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
  54. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
  56. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
  58. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
  60. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
  62. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
  63. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
  64. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  65. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
  66. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  67. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
  68. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  69. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
  70. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  71. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
  72. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
  74. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
  76. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
  78. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
  80. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
  82. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  83. package/lib/commonjs/ui/stores/authStore.js +36 -6
  84. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  85. package/lib/commonjs/ui/stores/followStore.js +106 -1
  86. package/lib/commonjs/ui/stores/followStore.js.map +1 -1
  87. package/lib/commonjs/ui/styles/authStyles.js +337 -0
  88. package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
  89. package/lib/commonjs/ui/styles/index.js +11 -0
  90. package/lib/commonjs/ui/styles/index.js.map +1 -1
  91. package/lib/module/core/index.js +177 -41
  92. package/lib/module/core/index.js.map +1 -1
  93. package/lib/module/index.js +24 -4
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/ui/components/Avatar.js +15 -6
  96. package/lib/module/ui/components/Avatar.js.map +1 -1
  97. package/lib/module/ui/components/FollowButton.js +101 -13
  98. package/lib/module/ui/components/FollowButton.js.map +1 -1
  99. package/lib/module/ui/components/GroupedItem.js +59 -14
  100. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  101. package/lib/module/ui/components/GroupedSection.js +7 -1
  102. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  103. package/lib/module/ui/components/Header.js +351 -0
  104. package/lib/module/ui/components/Header.js.map +1 -0
  105. package/lib/module/ui/components/OxyProvider.js +30 -9
  106. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  107. package/lib/module/ui/components/index.js +1 -0
  108. package/lib/module/ui/components/index.js.map +1 -1
  109. package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
  110. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  111. package/lib/module/ui/components/internal/TextField.js +607 -547
  112. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  113. package/lib/module/ui/components/internal/TextField.md +436 -0
  114. package/lib/module/ui/context/OxyContext.js +180 -198
  115. package/lib/module/ui/context/OxyContext.js.map +1 -1
  116. package/lib/module/ui/hooks/index.js +1 -1
  117. package/lib/module/ui/hooks/index.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.js +57 -1
  119. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  120. package/lib/module/ui/hooks/useSessionSocket.js +5 -2
  121. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  122. package/lib/module/ui/navigation/OxyRouter.js +11 -1
  123. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  124. package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
  125. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  126. package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
  127. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  128. package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
  129. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  130. package/lib/module/ui/screens/AccountSettingsScreen.js +1161 -407
  131. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
  133. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AppInfoScreen.js +248 -465
  135. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  136. package/lib/module/ui/screens/FeedbackScreen.js +3 -3
  137. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  138. package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
  139. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  140. package/lib/module/ui/screens/ProfileScreen.js +214 -37
  141. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  142. package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
  143. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  144. package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
  145. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  146. package/lib/module/ui/screens/SignInScreen.js +32 -305
  147. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SignUpScreen.js +5 -5
  149. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  150. package/lib/module/ui/screens/UserLinksScreen.js +85 -0
  151. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
  152. package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
  153. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  154. package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
  155. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  156. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
  157. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  158. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
  159. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  160. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
  161. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  162. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
  163. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  164. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
  165. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  166. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
  167. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  168. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
  169. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  170. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
  171. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  172. package/lib/module/ui/stores/authStore.js +36 -6
  173. package/lib/module/ui/stores/authStore.js.map +1 -1
  174. package/lib/module/ui/stores/followStore.js +106 -1
  175. package/lib/module/ui/stores/followStore.js.map +1 -1
  176. package/lib/module/ui/styles/authStyles.js +332 -0
  177. package/lib/module/ui/styles/authStyles.js.map +1 -0
  178. package/lib/module/ui/styles/index.js +1 -0
  179. package/lib/module/ui/styles/index.js.map +1 -1
  180. package/lib/typescript/core/index.d.ts +68 -24
  181. package/lib/typescript/core/index.d.ts.map +1 -1
  182. package/lib/typescript/index.d.ts +13 -3
  183. package/lib/typescript/index.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
  185. package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
  186. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
  188. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  189. package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
  190. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
  191. package/lib/typescript/ui/components/Header.d.ts +24 -0
  192. package/lib/typescript/ui/components/Header.d.ts.map +1 -0
  193. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  194. package/lib/typescript/ui/components/index.d.ts +1 -0
  195. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  196. package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
  197. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  198. package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
  199. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  200. package/lib/typescript/ui/hooks/index.d.ts +1 -1
  201. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  202. package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
  203. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  204. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  205. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  206. package/lib/typescript/ui/navigation/types.d.ts +9 -2
  207. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  208. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  209. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  210. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  211. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  212. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
  215. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
  219. package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
  220. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
  221. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
  223. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  224. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  228. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
  230. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  231. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
  232. package/lib/typescript/ui/stores/authStore.d.ts +3 -1
  233. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  234. package/lib/typescript/ui/stores/followStore.d.ts +10 -0
  235. package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
  236. package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
  237. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
  238. package/lib/typescript/ui/styles/index.d.ts +1 -0
  239. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  240. package/package.json +1 -4
  241. package/src/core/index.ts +195 -41
  242. package/src/index.ts +64 -4
  243. package/src/ui/components/Avatar.tsx +11 -5
  244. package/src/ui/components/FollowButton.tsx +95 -11
  245. package/src/ui/components/GroupedItem.tsx +57 -9
  246. package/src/ui/components/GroupedSection.tsx +12 -0
  247. package/src/ui/components/Header.tsx +405 -0
  248. package/src/ui/components/OxyProvider.tsx +37 -15
  249. package/src/ui/components/index.ts +1 -0
  250. package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
  251. package/src/ui/components/internal/TextField.md +436 -0
  252. package/src/ui/components/internal/TextField.tsx +720 -620
  253. package/src/ui/context/OxyContext.tsx +211 -195
  254. package/src/ui/hooks/index.ts +1 -1
  255. package/src/ui/hooks/useFollow.ts +63 -0
  256. package/src/ui/hooks/useSessionSocket.ts +5 -2
  257. package/src/ui/navigation/OxyRouter.tsx +11 -1
  258. package/src/ui/navigation/types.ts +10 -2
  259. package/src/ui/screens/AccountCenterScreen.tsx +5 -5
  260. package/src/ui/screens/AccountManagementDemo.tsx +9 -9
  261. package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
  262. package/src/ui/screens/AccountSettingsScreen.tsx +1173 -403
  263. package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
  264. package/src/ui/screens/AppInfoScreen.tsx +270 -497
  265. package/src/ui/screens/FeedbackScreen.tsx +3 -3
  266. package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
  267. package/src/ui/screens/ProfileScreen.tsx +196 -33
  268. package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
  269. package/src/ui/screens/SessionManagementScreen.tsx +14 -22
  270. package/src/ui/screens/SignInScreen.tsx +27 -294
  271. package/src/ui/screens/SignUpScreen.tsx +5 -5
  272. package/src/ui/screens/UserLinksScreen.tsx +96 -0
  273. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
  274. package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
  275. package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
  276. package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
  277. package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
  278. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
  279. package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
  280. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
  281. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
  282. package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
  283. package/src/ui/stores/authStore.ts +34 -7
  284. package/src/ui/stores/followStore.ts +102 -1
  285. package/src/ui/styles/authStyles.ts +352 -0
  286. package/src/ui/styles/index.ts +1 -0
  287. package/lib/commonjs/core/auth-manager.js +0 -440
  288. package/lib/commonjs/core/auth-manager.js.map +0 -1
  289. package/lib/commonjs/core/use-auth.js +0 -244
  290. package/lib/commonjs/core/use-auth.js.map +0 -1
  291. package/lib/module/core/auth-manager.js +0 -432
  292. package/lib/module/core/auth-manager.js.map +0 -1
  293. package/lib/module/core/use-auth.js +0 -235
  294. package/lib/module/core/use-auth.js.map +0 -1
  295. package/lib/typescript/core/auth-manager.d.ts +0 -136
  296. package/lib/typescript/core/auth-manager.d.ts.map +0 -1
  297. package/lib/typescript/core/use-auth.d.ts +0 -79
  298. package/lib/typescript/core/use-auth.d.ts.map +0 -1
  299. package/src/__tests__/middleware.test.ts +0 -105
  300. package/src/__tests__/setup.ts +0 -10
  301. package/src/__tests__/zero-config-auth.test.ts +0 -607
  302. package/src/core/auth-manager.ts +0 -500
  303. package/src/core/use-auth.tsx +0 -245
@@ -6,12 +6,18 @@ interface GroupedSectionItem {
6
6
  id: string;
7
7
  icon?: string;
8
8
  iconColor?: string;
9
+ image?: string;
10
+ imageSize?: number;
9
11
  title: string;
10
12
  subtitle?: string;
11
13
  onPress?: () => void;
12
14
  showChevron?: boolean;
13
15
  disabled?: boolean;
16
+ selected?: boolean;
14
17
  customContent?: React.ReactNode;
18
+ customIcon?: React.ReactNode;
19
+ multiRow?: boolean;
20
+ customContentBelow?: React.ReactNode;
15
21
  }
16
22
 
17
23
  interface GroupedSectionProps {
@@ -27,6 +33,8 @@ const GroupedSection: React.FC<GroupedSectionProps> = ({ items, theme }) => {
27
33
  key={item.id}
28
34
  icon={item.icon}
29
35
  iconColor={item.iconColor}
36
+ image={item.image}
37
+ imageSize={item.imageSize}
30
38
  title={item.title}
31
39
  subtitle={item.subtitle}
32
40
  theme={theme}
@@ -35,7 +43,11 @@ const GroupedSection: React.FC<GroupedSectionProps> = ({ items, theme }) => {
35
43
  isLast={index === items.length - 1}
36
44
  showChevron={item.showChevron}
37
45
  disabled={item.disabled}
46
+ selected={item.selected}
38
47
  customContent={item.customContent}
48
+ customIcon={item.customIcon}
49
+ multiRow={item.multiRow}
50
+ customContentBelow={item.customContentBelow}
39
51
  />
40
52
  ))}
41
53
  </View>
@@ -0,0 +1,405 @@
1
+ import React from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ TouchableOpacity,
6
+ StyleSheet,
7
+ Platform,
8
+ Animated,
9
+ } from 'react-native';
10
+ import { Ionicons } from '@expo/vector-icons';
11
+ import OxyIcon from './icon/OxyIcon';
12
+ import { fontFamilies } from '../styles/fonts';
13
+
14
+ export interface HeaderProps {
15
+ title: string;
16
+ subtitle?: string;
17
+ onBack?: () => void;
18
+ onClose?: () => void;
19
+ rightAction?: {
20
+ icon?: string;
21
+ onPress: () => void;
22
+ loading?: boolean;
23
+ disabled?: boolean;
24
+ text?: string;
25
+ };
26
+ theme: 'light' | 'dark';
27
+ showBackButton?: boolean;
28
+ showCloseButton?: boolean;
29
+ variant?: 'default' | 'large' | 'minimal' | 'gradient';
30
+ elevation?: 'none' | 'subtle' | 'prominent';
31
+ subtitleVariant?: 'default' | 'small' | 'large' | 'muted';
32
+ titleAlignment?: 'left' | 'center' | 'right';
33
+ }
34
+
35
+ const Header: React.FC<HeaderProps> = ({
36
+ title,
37
+ subtitle,
38
+ onBack,
39
+ onClose,
40
+ rightAction,
41
+ theme,
42
+ showBackButton = true,
43
+ showCloseButton = false,
44
+ variant = 'default',
45
+ elevation = 'subtle',
46
+ subtitleVariant = 'default',
47
+ titleAlignment = 'left',
48
+ }) => {
49
+ const isDarkTheme = theme === 'dark';
50
+
51
+ // Modern color palette
52
+ const colors = {
53
+ background: isDarkTheme ? '#1C1C1E' : '#FFFFFF',
54
+ surface: isDarkTheme ? '#2C2C2E' : '#F8F9FA',
55
+ primary: '#007AFF',
56
+ secondary: isDarkTheme ? '#8E8E93' : '#6C757D',
57
+ text: {
58
+ primary: isDarkTheme ? '#FFFFFF' : '#1A1A1A',
59
+ secondary: isDarkTheme ? '#8E8E93' : '#6C757D',
60
+ tertiary: isDarkTheme ? '#636366' : '#ADB5BD',
61
+ },
62
+ border: isDarkTheme ? '#38383A' : '#E9ECEF',
63
+ accent: '#5856D6',
64
+ success: '#34C759',
65
+ warning: '#FF9500',
66
+ error: '#FF3B30',
67
+ };
68
+
69
+ const renderBackButton = () => {
70
+ if (!showBackButton || !onBack) return null;
71
+
72
+ return (
73
+ <TouchableOpacity
74
+ style={[
75
+ styles.backButton,
76
+ { backgroundColor: colors.surface }
77
+ ]}
78
+ onPress={onBack}
79
+ activeOpacity={0.7}
80
+ >
81
+ <OxyIcon name="chevron-back" size={18} color={colors.primary} />
82
+ </TouchableOpacity>
83
+ );
84
+ };
85
+
86
+ const renderCloseButton = () => {
87
+ if (!showCloseButton || !onClose) return null;
88
+
89
+ return (
90
+ <TouchableOpacity
91
+ style={[
92
+ styles.closeButton,
93
+ { backgroundColor: colors.surface }
94
+ ]}
95
+ onPress={onClose}
96
+ activeOpacity={0.7}
97
+ >
98
+ <Ionicons name="close" size={18} color={colors.text.primary} />
99
+ </TouchableOpacity>
100
+ );
101
+ };
102
+
103
+ const renderRightAction = () => {
104
+ if (!rightAction) return null;
105
+
106
+ const isTextAction = rightAction.text;
107
+
108
+ return (
109
+ <TouchableOpacity
110
+ style={[
111
+ styles.rightActionButton,
112
+ isTextAction ? styles.textActionButton : styles.iconActionButton,
113
+ {
114
+ backgroundColor: isTextAction ? colors.primary : colors.surface,
115
+ opacity: rightAction.disabled ? 0.5 : 1
116
+ }
117
+ ]}
118
+ onPress={rightAction.onPress}
119
+ disabled={rightAction.disabled || rightAction.loading}
120
+ activeOpacity={0.7}
121
+ >
122
+ {rightAction.loading ? (
123
+ <View style={styles.loadingContainer}>
124
+ <View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
125
+ <View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
126
+ <View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
127
+ </View>
128
+ ) : isTextAction ? (
129
+ <Text style={[styles.actionText, { color: '#FFFFFF' }]}>
130
+ {rightAction.text}
131
+ </Text>
132
+ ) : (
133
+ <Ionicons name={rightAction.icon as any} size={18} color={colors.primary} />
134
+ )}
135
+ </TouchableOpacity>
136
+ );
137
+ };
138
+
139
+ const renderTitle = () => {
140
+ const titleStyle = variant === 'large' ? styles.titleLarge :
141
+ variant === 'minimal' ? styles.titleMinimal :
142
+ styles.titleDefault;
143
+
144
+ const subtitleStyle = variant === 'large' ? styles.subtitleLarge :
145
+ variant === 'minimal' ? styles.subtitleMinimal :
146
+ subtitleVariant === 'small' ? styles.subtitleSmall :
147
+ subtitleVariant === 'large' ? styles.subtitleLarge :
148
+ subtitleVariant === 'muted' ? styles.subtitleMuted :
149
+ styles.subtitleDefault;
150
+
151
+ const getTitleAlignment = () => {
152
+ switch (titleAlignment) {
153
+ case 'center':
154
+ return styles.titleContainerCenter;
155
+ case 'right':
156
+ return styles.titleContainerRight;
157
+ default:
158
+ return styles.titleContainerLeft;
159
+ }
160
+ };
161
+
162
+ return (
163
+ <View style={[
164
+ styles.titleContainer,
165
+ getTitleAlignment(),
166
+ variant === 'minimal' && styles.titleContainerMinimal
167
+ ]}>
168
+ <Text style={[titleStyle, { color: colors.text.primary }]}>
169
+ {title}
170
+ </Text>
171
+ {subtitle && (
172
+ <Text style={[subtitleStyle, { color: colors.text.secondary }]}>
173
+ {subtitle}
174
+ </Text>
175
+ )}
176
+ </View>
177
+ );
178
+ };
179
+
180
+ const getElevationStyle = () => {
181
+ switch (elevation) {
182
+ case 'none':
183
+ return {};
184
+ case 'subtle':
185
+ return Platform.select({
186
+ web: {
187
+ boxShadow: isDarkTheme
188
+ ? '0 1px 3px rgba(0,0,0,0.3)'
189
+ : '0 1px 3px rgba(0,0,0,0.1)',
190
+ },
191
+ default: {
192
+ shadowColor: '#000000',
193
+ shadowOffset: { width: 0, height: 1 },
194
+ shadowOpacity: isDarkTheme ? 0.3 : 0.1,
195
+ shadowRadius: 3,
196
+ elevation: 2,
197
+ },
198
+ });
199
+ case 'prominent':
200
+ return Platform.select({
201
+ web: {
202
+ boxShadow: isDarkTheme
203
+ ? '0 4px 12px rgba(0,0,0,0.4)'
204
+ : '0 4px 12px rgba(0,0,0,0.15)',
205
+ },
206
+ default: {
207
+ shadowColor: '#000000',
208
+ shadowOffset: { width: 0, height: 4 },
209
+ shadowOpacity: isDarkTheme ? 0.4 : 0.15,
210
+ shadowRadius: 12,
211
+ elevation: 8,
212
+ },
213
+ });
214
+ default:
215
+ return {};
216
+ }
217
+ };
218
+
219
+ const getBackgroundStyle = () => {
220
+ if (variant === 'gradient') {
221
+ return {
222
+ backgroundColor: isDarkTheme ? '#1C1C1E' : '#FFFFFF',
223
+ // Add gradient overlay effect
224
+ borderBottomWidth: 1,
225
+ borderBottomColor: colors.border,
226
+ };
227
+ }
228
+
229
+ return {
230
+ backgroundColor: colors.background,
231
+ borderBottomWidth: elevation === 'none' ? 0 : 1,
232
+ borderBottomColor: colors.border,
233
+ };
234
+ };
235
+
236
+ return (
237
+ <View style={[
238
+ styles.container,
239
+ getBackgroundStyle(),
240
+ getElevationStyle(),
241
+ ]}>
242
+ <View style={[
243
+ styles.content,
244
+ variant === 'minimal' && styles.contentMinimal
245
+ ]}>
246
+ {renderBackButton()}
247
+ {renderTitle()}
248
+ {renderRightAction()}
249
+ {renderCloseButton()}
250
+ </View>
251
+ </View>
252
+ );
253
+ };
254
+
255
+ const styles = StyleSheet.create({
256
+ container: {
257
+ paddingTop: Platform.OS === 'ios' ? 50 : 16,
258
+ paddingBottom: 12,
259
+ position: 'absolute',
260
+ top: 0,
261
+ left: 0,
262
+ right: 0,
263
+ zIndex: 1000,
264
+ ...Platform.select({
265
+ web: {
266
+ position: 'sticky' as any,
267
+ },
268
+ default: {},
269
+ }),
270
+ },
271
+ content: {
272
+ flexDirection: 'row',
273
+ alignItems: 'center',
274
+ paddingHorizontal: 16,
275
+ position: 'relative',
276
+ minHeight: 40,
277
+ },
278
+ contentMinimal: {
279
+ paddingHorizontal: 12,
280
+ minHeight: 36,
281
+ },
282
+ backButton: {
283
+ width: 32,
284
+ height: 32,
285
+ borderRadius: 16,
286
+ alignItems: 'center',
287
+ justifyContent: 'center',
288
+ marginRight: 10,
289
+ },
290
+ closeButton: {
291
+ width: 32,
292
+ height: 32,
293
+ borderRadius: 16,
294
+ alignItems: 'center',
295
+ justifyContent: 'center',
296
+ marginLeft: 10,
297
+ },
298
+ titleContainer: {
299
+ flex: 1,
300
+ alignItems: 'flex-start',
301
+ justifyContent: 'center',
302
+ },
303
+ titleContainerLeft: {
304
+ alignItems: 'flex-start',
305
+ },
306
+ titleContainerCenter: {
307
+ alignItems: 'center',
308
+ },
309
+ titleContainerRight: {
310
+ alignItems: 'flex-end',
311
+ },
312
+ titleContainerMinimal: {
313
+ alignItems: 'center',
314
+ marginHorizontal: 16,
315
+ },
316
+ titleDefault: {
317
+ fontSize: 18,
318
+ fontWeight: '700',
319
+ fontFamily: fontFamilies.phuduBold,
320
+ letterSpacing: -0.5,
321
+ lineHeight: 22,
322
+ },
323
+ titleLarge: {
324
+ fontSize: 28,
325
+ fontWeight: '800',
326
+ fontFamily: fontFamilies.phuduExtraBold,
327
+ letterSpacing: -1,
328
+ lineHeight: 34,
329
+ marginBottom: 3,
330
+ },
331
+ titleMinimal: {
332
+ fontSize: 16,
333
+ fontWeight: '600',
334
+ fontFamily: fontFamilies.phuduSemiBold,
335
+ letterSpacing: -0.3,
336
+ lineHeight: 20,
337
+ },
338
+ subtitleDefault: {
339
+ fontSize: 14,
340
+ fontWeight: '400',
341
+ lineHeight: 17,
342
+ marginTop: 1,
343
+ },
344
+ subtitleLarge: {
345
+ fontSize: 16,
346
+ fontWeight: '400',
347
+ lineHeight: 19,
348
+ marginTop: 3,
349
+ },
350
+ subtitleMinimal: {
351
+ fontSize: 13,
352
+ fontWeight: '400',
353
+ lineHeight: 15,
354
+ marginTop: 1,
355
+ },
356
+ subtitleSmall: {
357
+ fontSize: 12,
358
+ fontWeight: '400',
359
+ lineHeight: 14,
360
+ marginTop: 0,
361
+ },
362
+ subtitleMuted: {
363
+ fontSize: 14,
364
+ fontWeight: '400',
365
+ lineHeight: 17,
366
+ marginTop: 1,
367
+ opacity: 0.7,
368
+ },
369
+ rightActionButton: {
370
+ alignItems: 'center',
371
+ justifyContent: 'center',
372
+ marginLeft: 10,
373
+ },
374
+ iconActionButton: {
375
+ width: 32,
376
+ height: 32,
377
+ borderRadius: 16,
378
+ },
379
+ textActionButton: {
380
+ paddingHorizontal: 14,
381
+ paddingVertical: 6,
382
+ borderRadius: 18,
383
+ minWidth: 56,
384
+ },
385
+ actionText: {
386
+ fontSize: 14,
387
+ fontWeight: '600',
388
+ fontFamily: fontFamilies.phuduSemiBold,
389
+ letterSpacing: -0.2,
390
+ },
391
+ loadingContainer: {
392
+ flexDirection: 'row',
393
+ alignItems: 'center',
394
+ justifyContent: 'center',
395
+ gap: 2,
396
+ },
397
+ loadingDot: {
398
+ width: 4,
399
+ height: 4,
400
+ borderRadius: 2,
401
+ opacity: 0.6,
402
+ },
403
+ });
404
+
405
+ export default Header;
@@ -30,6 +30,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
30
30
  onAuthStateChange,
31
31
  storageKeyPrefix,
32
32
  showInternalToaster = true,
33
+ baseURL, // Add support for baseURL
33
34
  ...bottomSheetProps
34
35
  } = props;
35
36
 
@@ -41,6 +42,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
41
42
  return (
42
43
  <OxyContextProvider
43
44
  oxyServices={oxyServices}
45
+ baseURL={baseURL}
44
46
  storageKeyPrefix={storageKeyPrefix}
45
47
  onAuthStateChange={onAuthStateChange}
46
48
  >
@@ -53,6 +55,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
53
55
  return (
54
56
  <OxyContextProvider
55
57
  oxyServices={oxyServices}
58
+ baseURL={baseURL}
56
59
  storageKeyPrefix={storageKeyPrefix}
57
60
  onAuthStateChange={onAuthStateChange}
58
61
  bottomSheetRef={internalBottomSheetRef}
@@ -85,7 +88,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
85
88
  * and reimplemented using BottomSheetModal for better Android compatibility
86
89
  */
87
90
  const OxyBottomSheet: React.FC<OxyProviderProps> = ({
88
- oxyServices,
91
+ oxyServices: providedOxyServices,
89
92
  initialScreen = 'SignIn',
90
93
  onClose,
91
94
  onAuthenticated,
@@ -95,6 +98,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
95
98
  autoPresent = false,
96
99
  showInternalToaster = true,
97
100
  }) => {
101
+ // Helper function to determine if native driver should be used
102
+ const shouldUseNativeDriver = () => {
103
+ return Platform.OS === 'ios';
104
+ };
105
+ // Get oxyServices from context if not provided as prop
106
+ const contextOxy = useOxy();
107
+ const oxyServices = providedOxyServices || contextOxy?.oxyServices;
98
108
  // Use the internal ref (which is passed as a prop from OxyProvider)
99
109
  const modalRef = useRef<BottomSheetModalRef>(null);
100
110
  const navigationRef = useRef<((screen: string, props?: Record<string, any>) => void) | null>(null);
@@ -116,13 +126,17 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
116
126
  };
117
127
  }
118
128
  });
129
+
119
130
  // Add a method to navigate between screens
120
131
  // @ts-ignore
121
132
  bottomSheetRef.current._navigateToScreen = (screenName: string, props?: Record<string, any>) => {
133
+ console.log('_navigateToScreen called with:', screenName, props);
122
134
  if (navigationRef.current) {
135
+ console.log('Using navigationRef.current');
123
136
  navigationRef.current(screenName, props);
124
137
  return;
125
138
  }
139
+ console.log('navigationRef.current not available, using event system');
126
140
  if (typeof document !== 'undefined') {
127
141
  const event = new CustomEvent('oxy:navigate', { detail: { screen: screenName, props } });
128
142
  document.dispatchEvent(event);
@@ -130,6 +144,8 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
130
144
  (globalThis as any).oxyNavigateEvent = { screen: screenName, props };
131
145
  }
132
146
  };
147
+
148
+ console.log('Bottom sheet ref methods exposed:', Object.keys(bottomSheetRef.current));
133
149
  }
134
150
  }, [bottomSheetRef, modalRef]);
135
151
  // Keyboard handling (unchanged)
@@ -168,13 +184,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
168
184
  Animated.timing(fadeAnim, {
169
185
  toValue: 1,
170
186
  duration: 300,
171
- useNativeDriver: Platform.OS === 'ios',
187
+ useNativeDriver: shouldUseNativeDriver(),
172
188
  }),
173
189
  Animated.spring(slideAnim, {
174
190
  toValue: 0,
175
191
  friction: 8,
176
192
  tension: 40,
177
- useNativeDriver: Platform.OS === 'ios',
193
+ useNativeDriver: shouldUseNativeDriver(),
178
194
  }),
179
195
  ]).start();
180
196
  };
@@ -186,13 +202,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
186
202
  Animated.timing(fadeAnim, {
187
203
  toValue: 1,
188
204
  duration: 300,
189
- useNativeDriver: Platform.OS === 'ios',
205
+ useNativeDriver: shouldUseNativeDriver(),
190
206
  }),
191
207
  Animated.spring(slideAnim, {
192
208
  toValue: 0,
193
209
  friction: 8,
194
210
  tension: 40,
195
- useNativeDriver: Platform.OS === 'ios',
211
+ useNativeDriver: shouldUseNativeDriver(),
196
212
  }),
197
213
  ]).start();
198
214
  }, 100);
@@ -204,7 +220,7 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
204
220
  Animated.timing(fadeAnim, {
205
221
  toValue: 0,
206
222
  duration: Platform.OS === 'android' ? 100 : 200,
207
- useNativeDriver: Platform.OS === 'ios',
223
+ useNativeDriver: shouldUseNativeDriver(),
208
224
  }).start(() => {
209
225
  modalRef.current?.dismiss();
210
226
  if (onClose) {
@@ -304,15 +320,21 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
304
320
  { opacity: fadeAnim, transform: [{ translateY: slideAnim }] }
305
321
  ]}
306
322
  >
307
- <OxyRouter
308
- oxyServices={oxyServices}
309
- initialScreen={initialScreen}
310
- onClose={handleClose}
311
- onAuthenticated={handleAuthenticated}
312
- theme={theme}
313
- navigationRef={navigationRef}
314
- containerWidth={800} // static, since dynamic sizing is used
315
- />
323
+ {oxyServices ? (
324
+ <OxyRouter
325
+ oxyServices={oxyServices}
326
+ initialScreen={initialScreen}
327
+ onClose={handleClose}
328
+ onAuthenticated={handleAuthenticated}
329
+ theme={theme}
330
+ navigationRef={navigationRef}
331
+ containerWidth={800} // static, since dynamic sizing is used
332
+ />
333
+ ) : (
334
+ <View style={styles.errorContainer}>
335
+ <Text>OxyServices not available</Text>
336
+ </View>
337
+ )}
316
338
  </Animated.View>
317
339
  </View>
318
340
  </BottomSheetScrollView>
@@ -5,6 +5,7 @@ export { default as SectionTitle } from './SectionTitle';
5
5
  export { default as GroupedItem } from './GroupedItem';
6
6
  export { default as GroupedSection } from './GroupedSection';
7
7
  export { default as QuickActions } from './QuickActions';
8
+ export { default as Header } from './Header';
8
9
 
9
10
  // Re-export existing components
10
11
  export { default as Avatar } from './Avatar';
@@ -247,7 +247,7 @@ const GroupedPillButtons: React.FC<GroupedPillButtonsProps> = ({
247
247
  const styles = StyleSheet.create({
248
248
  container: {
249
249
  flexDirection: 'row',
250
- justifyContent: 'center',
250
+ justifyContent: 'flex-end',
251
251
  marginTop: 16,
252
252
  marginBottom: 8,
253
253
  width: '100%',