@oxyhq/services 5.4.0 → 5.4.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 (395) hide show
  1. package/package.json +3 -2
  2. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
  3. package/src/core/index.ts +103 -0
  4. package/src/lib/sonner.ts +9 -4
  5. package/src/ui/components/OxyProvider.tsx +5 -5
  6. package/src/ui/context/OxyContext.tsx +61 -41
  7. package/src/ui/screens/AccountManagementDemo.tsx +1 -1
  8. package/src/ui/screens/AccountOverviewScreen.tsx +44 -26
  9. package/src/ui/screens/AccountSettingsScreen.tsx +25 -19
  10. package/src/ui/screens/AppInfoScreen.tsx +5 -5
  11. package/src/ui/screens/FileManagementScreen.tsx +246 -211
  12. package/src/ui/screens/SignInScreen.tsx +382 -326
  13. package/src/ui/screens/SignUpScreen.tsx +443 -273
  14. package/src/ui/screens/karma/KarmaFAQScreen.tsx +50 -29
  15. package/lib/commonjs/assets/OxyLogo.svg +0 -1
  16. package/lib/commonjs/assets/assets/OxyLogo.svg +0 -1
  17. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  18. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  19. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  20. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  21. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  22. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  23. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  24. package/lib/commonjs/assets/assets/icons/OxyServices.tsx +0 -67
  25. package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +0 -1
  26. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  27. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  28. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  29. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  30. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  31. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  32. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  33. package/lib/commonjs/assets/icons/OxyServices.js +0 -53
  34. package/lib/commonjs/assets/icons/OxyServices.js.map +0 -1
  35. package/lib/commonjs/assets/icons/logo_OxyServices.svg +0 -1
  36. package/lib/commonjs/constants/version.js +0 -28
  37. package/lib/commonjs/constants/version.js.map +0 -1
  38. package/lib/commonjs/core/index.js +0 -1543
  39. package/lib/commonjs/core/index.js.map +0 -1
  40. package/lib/commonjs/index.js +0 -160
  41. package/lib/commonjs/index.js.map +0 -1
  42. package/lib/commonjs/lib/react-native-polyfills.js +0 -181
  43. package/lib/commonjs/lib/react-native-polyfills.js.map +0 -1
  44. package/lib/commonjs/lib/sonner-safe.js +0 -41
  45. package/lib/commonjs/lib/sonner-safe.js.map +0 -1
  46. package/lib/commonjs/lib/sonner.js +0 -18
  47. package/lib/commonjs/lib/sonner.js.map +0 -1
  48. package/lib/commonjs/lib/sonner.web.js +0 -17
  49. package/lib/commonjs/lib/sonner.web.js.map +0 -1
  50. package/lib/commonjs/models/interfaces.js +0 -2
  51. package/lib/commonjs/models/interfaces.js.map +0 -1
  52. package/lib/commonjs/models/secureSession.js +0 -2
  53. package/lib/commonjs/models/secureSession.js.map +0 -1
  54. package/lib/commonjs/node/index.js +0 -54
  55. package/lib/commonjs/node/index.js.map +0 -1
  56. package/lib/commonjs/package.json +0 -1
  57. package/lib/commonjs/ui/components/Avatar.js +0 -98
  58. package/lib/commonjs/ui/components/Avatar.js.map +0 -1
  59. package/lib/commonjs/ui/components/FollowButton.js +0 -246
  60. package/lib/commonjs/ui/components/FollowButton.js.map +0 -1
  61. package/lib/commonjs/ui/components/FontLoader.js +0 -181
  62. package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
  63. package/lib/commonjs/ui/components/GroupedItem.js +0 -109
  64. package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
  65. package/lib/commonjs/ui/components/GroupedSection.js +0 -33
  66. package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
  67. package/lib/commonjs/ui/components/OxyLogo.js +0 -56
  68. package/lib/commonjs/ui/components/OxyLogo.js.map +0 -1
  69. package/lib/commonjs/ui/components/OxyProvider.js +0 -517
  70. package/lib/commonjs/ui/components/OxyProvider.js.map +0 -1
  71. package/lib/commonjs/ui/components/OxySignInButton.js +0 -178
  72. package/lib/commonjs/ui/components/OxySignInButton.js.map +0 -1
  73. package/lib/commonjs/ui/components/ProfileCard.js +0 -124
  74. package/lib/commonjs/ui/components/ProfileCard.js.map +0 -1
  75. package/lib/commonjs/ui/components/QuickActions.js +0 -87
  76. package/lib/commonjs/ui/components/QuickActions.js.map +0 -1
  77. package/lib/commonjs/ui/components/Section.js +0 -36
  78. package/lib/commonjs/ui/components/Section.js.map +0 -1
  79. package/lib/commonjs/ui/components/SectionTitle.js +0 -35
  80. package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
  81. package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
  82. package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
  83. package/lib/commonjs/ui/components/icon/OxyIcon.js +0 -27
  84. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +0 -1
  85. package/lib/commonjs/ui/components/icon/index.js +0 -14
  86. package/lib/commonjs/ui/components/icon/index.js.map +0 -1
  87. package/lib/commonjs/ui/components/index.js +0 -97
  88. package/lib/commonjs/ui/components/index.js.map +0 -1
  89. package/lib/commonjs/ui/context/OxyContext.js +0 -568
  90. package/lib/commonjs/ui/context/OxyContext.js.map +0 -1
  91. package/lib/commonjs/ui/index.js +0 -128
  92. package/lib/commonjs/ui/index.js.map +0 -1
  93. package/lib/commonjs/ui/navigation/OxyRouter.js +0 -264
  94. package/lib/commonjs/ui/navigation/OxyRouter.js.map +0 -1
  95. package/lib/commonjs/ui/navigation/types.js +0 -6
  96. package/lib/commonjs/ui/navigation/types.js.map +0 -1
  97. package/lib/commonjs/ui/screens/AccountCenterScreen.js +0 -313
  98. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +0 -1
  99. package/lib/commonjs/ui/screens/AccountManagementDemo.js +0 -299
  100. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +0 -1
  101. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +0 -837
  102. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
  103. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -836
  104. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +0 -1
  105. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -788
  106. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
  107. package/lib/commonjs/ui/screens/AppInfoScreen.js +0 -664
  108. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +0 -1
  109. package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
  110. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
  111. package/lib/commonjs/ui/screens/FileManagementScreen.js +0 -2497
  112. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +0 -1
  113. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -1620
  114. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  115. package/lib/commonjs/ui/screens/ProfileScreen.js +0 -450
  116. package/lib/commonjs/ui/screens/ProfileScreen.js.map +0 -1
  117. package/lib/commonjs/ui/screens/SessionManagementScreen.js +0 -449
  118. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
  119. package/lib/commonjs/ui/screens/SignInScreen.js +0 -956
  120. package/lib/commonjs/ui/screens/SignInScreen.js.map +0 -1
  121. package/lib/commonjs/ui/screens/SignUpScreen.js +0 -762
  122. package/lib/commonjs/ui/screens/SignUpScreen.js.map +0 -1
  123. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +0 -88
  124. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  125. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +0 -364
  126. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  127. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +0 -202
  128. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
  129. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +0 -148
  130. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  131. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +0 -127
  132. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  133. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +0 -105
  134. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  135. package/lib/commonjs/ui/styles/FONTS.md +0 -126
  136. package/lib/commonjs/ui/styles/fonts.js +0 -84
  137. package/lib/commonjs/ui/styles/fonts.js.map +0 -1
  138. package/lib/commonjs/ui/styles/index.js +0 -28
  139. package/lib/commonjs/ui/styles/index.js.map +0 -1
  140. package/lib/commonjs/ui/styles/theme.js +0 -121
  141. package/lib/commonjs/ui/styles/theme.js.map +0 -1
  142. package/lib/commonjs/utils/deviceManager.js +0 -173
  143. package/lib/commonjs/utils/deviceManager.js.map +0 -1
  144. package/lib/commonjs/utils/index.js +0 -13
  145. package/lib/commonjs/utils/index.js.map +0 -1
  146. package/lib/commonjs/utils/polyfills.js +0 -42
  147. package/lib/commonjs/utils/polyfills.js.map +0 -1
  148. package/lib/module/assets/OxyLogo.svg +0 -1
  149. package/lib/module/assets/assets/OxyLogo.svg +0 -1
  150. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  151. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  152. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  153. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  154. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  155. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  156. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  157. package/lib/module/assets/assets/icons/OxyServices.tsx +0 -67
  158. package/lib/module/assets/assets/icons/logo_OxyServices.svg +0 -1
  159. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  160. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  161. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  162. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  163. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  164. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  165. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  166. package/lib/module/assets/icons/OxyServices.js +0 -46
  167. package/lib/module/assets/icons/OxyServices.js.map +0 -1
  168. package/lib/module/assets/icons/logo_OxyServices.svg +0 -1
  169. package/lib/module/constants/version.js +0 -21
  170. package/lib/module/constants/version.js.map +0 -1
  171. package/lib/module/core/index.js +0 -1517
  172. package/lib/module/core/index.js.map +0 -1
  173. package/lib/module/index.js +0 -48
  174. package/lib/module/index.js.map +0 -1
  175. package/lib/module/lib/react-native-polyfills.js +0 -179
  176. package/lib/module/lib/react-native-polyfills.js.map +0 -1
  177. package/lib/module/lib/sonner-safe.js +0 -37
  178. package/lib/module/lib/sonner-safe.js.map +0 -1
  179. package/lib/module/lib/sonner.js +0 -8
  180. package/lib/module/lib/sonner.js.map +0 -1
  181. package/lib/module/lib/sonner.web.js +0 -4
  182. package/lib/module/lib/sonner.web.js.map +0 -1
  183. package/lib/module/models/interfaces.js +0 -2
  184. package/lib/module/models/interfaces.js.map +0 -1
  185. package/lib/module/models/secureSession.js +0 -2
  186. package/lib/module/models/secureSession.js.map +0 -1
  187. package/lib/module/node/index.js +0 -23
  188. package/lib/module/node/index.js.map +0 -1
  189. package/lib/module/package.json +0 -1
  190. package/lib/module/ui/components/Avatar.js +0 -93
  191. package/lib/module/ui/components/Avatar.js.map +0 -1
  192. package/lib/module/ui/components/FollowButton.js +0 -241
  193. package/lib/module/ui/components/FollowButton.js.map +0 -1
  194. package/lib/module/ui/components/FontLoader.js +0 -176
  195. package/lib/module/ui/components/FontLoader.js.map +0 -1
  196. package/lib/module/ui/components/GroupedItem.js +0 -104
  197. package/lib/module/ui/components/GroupedItem.js.map +0 -1
  198. package/lib/module/ui/components/GroupedSection.js +0 -28
  199. package/lib/module/ui/components/GroupedSection.js.map +0 -1
  200. package/lib/module/ui/components/OxyLogo.js +0 -49
  201. package/lib/module/ui/components/OxyLogo.js.map +0 -1
  202. package/lib/module/ui/components/OxyProvider.js +0 -511
  203. package/lib/module/ui/components/OxyProvider.js.map +0 -1
  204. package/lib/module/ui/components/OxySignInButton.js +0 -172
  205. package/lib/module/ui/components/OxySignInButton.js.map +0 -1
  206. package/lib/module/ui/components/ProfileCard.js +0 -119
  207. package/lib/module/ui/components/ProfileCard.js.map +0 -1
  208. package/lib/module/ui/components/QuickActions.js +0 -82
  209. package/lib/module/ui/components/QuickActions.js.map +0 -1
  210. package/lib/module/ui/components/Section.js +0 -31
  211. package/lib/module/ui/components/Section.js.map +0 -1
  212. package/lib/module/ui/components/SectionTitle.js +0 -30
  213. package/lib/module/ui/components/SectionTitle.js.map +0 -1
  214. package/lib/module/ui/components/bottomSheet/index.js +0 -5
  215. package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
  216. package/lib/module/ui/components/icon/OxyIcon.js +0 -22
  217. package/lib/module/ui/components/icon/OxyIcon.js.map +0 -1
  218. package/lib/module/ui/components/icon/index.js +0 -4
  219. package/lib/module/ui/components/icon/index.js.map +0 -1
  220. package/lib/module/ui/components/index.js +0 -18
  221. package/lib/module/ui/components/index.js.map +0 -1
  222. package/lib/module/ui/context/OxyContext.js +0 -563
  223. package/lib/module/ui/context/OxyContext.js.map +0 -1
  224. package/lib/module/ui/index.js +0 -24
  225. package/lib/module/ui/index.js.map +0 -1
  226. package/lib/module/ui/navigation/OxyRouter.js +0 -257
  227. package/lib/module/ui/navigation/OxyRouter.js.map +0 -1
  228. package/lib/module/ui/navigation/types.js +0 -4
  229. package/lib/module/ui/navigation/types.js.map +0 -1
  230. package/lib/module/ui/screens/AccountCenterScreen.js +0 -308
  231. package/lib/module/ui/screens/AccountCenterScreen.js.map +0 -1
  232. package/lib/module/ui/screens/AccountManagementDemo.js +0 -296
  233. package/lib/module/ui/screens/AccountManagementDemo.js.map +0 -1
  234. package/lib/module/ui/screens/AccountOverviewScreen.js +0 -831
  235. package/lib/module/ui/screens/AccountOverviewScreen.js.map +0 -1
  236. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -830
  237. package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
  238. package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -782
  239. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
  240. package/lib/module/ui/screens/AppInfoScreen.js +0 -658
  241. package/lib/module/ui/screens/AppInfoScreen.js.map +0 -1
  242. package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
  243. package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
  244. package/lib/module/ui/screens/FileManagementScreen.js +0 -2492
  245. package/lib/module/ui/screens/FileManagementScreen.js.map +0 -1
  246. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -1615
  247. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
  248. package/lib/module/ui/screens/ProfileScreen.js +0 -444
  249. package/lib/module/ui/screens/ProfileScreen.js.map +0 -1
  250. package/lib/module/ui/screens/SessionManagementScreen.js +0 -444
  251. package/lib/module/ui/screens/SessionManagementScreen.js.map +0 -1
  252. package/lib/module/ui/screens/SignInScreen.js +0 -950
  253. package/lib/module/ui/screens/SignInScreen.js.map +0 -1
  254. package/lib/module/ui/screens/SignUpScreen.js +0 -755
  255. package/lib/module/ui/screens/SignUpScreen.js.map +0 -1
  256. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +0 -83
  257. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
  258. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +0 -358
  259. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
  260. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +0 -197
  261. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
  262. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +0 -142
  263. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
  264. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +0 -122
  265. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
  266. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +0 -100
  267. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
  268. package/lib/module/ui/styles/FONTS.md +0 -126
  269. package/lib/module/ui/styles/fonts.js +0 -81
  270. package/lib/module/ui/styles/fonts.js.map +0 -1
  271. package/lib/module/ui/styles/index.js +0 -5
  272. package/lib/module/ui/styles/index.js.map +0 -1
  273. package/lib/module/ui/styles/theme.js +0 -114
  274. package/lib/module/ui/styles/theme.js.map +0 -1
  275. package/lib/module/utils/deviceManager.js +0 -167
  276. package/lib/module/utils/deviceManager.js.map +0 -1
  277. package/lib/module/utils/index.js +0 -4
  278. package/lib/module/utils/index.js.map +0 -1
  279. package/lib/module/utils/polyfills.js +0 -36
  280. package/lib/module/utils/polyfills.js.map +0 -1
  281. package/lib/typescript/assets/icons/OxyServices.d.ts +0 -29
  282. package/lib/typescript/assets/icons/OxyServices.d.ts.map +0 -1
  283. package/lib/typescript/constants/version.d.ts +0 -14
  284. package/lib/typescript/constants/version.d.ts.map +0 -1
  285. package/lib/typescript/core/index.d.ts +0 -563
  286. package/lib/typescript/core/index.d.ts.map +0 -1
  287. package/lib/typescript/index.d.ts +0 -20
  288. package/lib/typescript/index.d.ts.map +0 -1
  289. package/lib/typescript/lib/react-native-polyfills.d.ts +0 -8
  290. package/lib/typescript/lib/react-native-polyfills.d.ts.map +0 -1
  291. package/lib/typescript/lib/sonner-safe.d.ts +0 -11
  292. package/lib/typescript/lib/sonner-safe.d.ts.map +0 -1
  293. package/lib/typescript/lib/sonner.d.ts +0 -3
  294. package/lib/typescript/lib/sonner.d.ts.map +0 -1
  295. package/lib/typescript/lib/sonner.web.d.ts +0 -2
  296. package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
  297. package/lib/typescript/models/interfaces.d.ts +0 -179
  298. package/lib/typescript/models/interfaces.d.ts.map +0 -1
  299. package/lib/typescript/models/secureSession.d.ts +0 -27
  300. package/lib/typescript/models/secureSession.d.ts.map +0 -1
  301. package/lib/typescript/node/index.d.ts +0 -11
  302. package/lib/typescript/node/index.d.ts.map +0 -1
  303. package/lib/typescript/ui/components/Avatar.d.ts +0 -62
  304. package/lib/typescript/ui/components/Avatar.d.ts.map +0 -1
  305. package/lib/typescript/ui/components/FollowButton.d.ts +0 -92
  306. package/lib/typescript/ui/components/FollowButton.d.ts.map +0 -1
  307. package/lib/typescript/ui/components/FontLoader.d.ts +0 -15
  308. package/lib/typescript/ui/components/FontLoader.d.ts.map +0 -1
  309. package/lib/typescript/ui/components/GroupedItem.d.ts +0 -17
  310. package/lib/typescript/ui/components/GroupedItem.d.ts.map +0 -1
  311. package/lib/typescript/ui/components/GroupedSection.d.ts +0 -19
  312. package/lib/typescript/ui/components/GroupedSection.d.ts.map +0 -1
  313. package/lib/typescript/ui/components/OxyLogo.d.ts +0 -29
  314. package/lib/typescript/ui/components/OxyLogo.d.ts.map +0 -1
  315. package/lib/typescript/ui/components/OxyProvider.d.ts +0 -12
  316. package/lib/typescript/ui/components/OxyProvider.d.ts.map +0 -1
  317. package/lib/typescript/ui/components/OxySignInButton.d.ts +0 -70
  318. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +0 -1
  319. package/lib/typescript/ui/components/ProfileCard.d.ts +0 -20
  320. package/lib/typescript/ui/components/ProfileCard.d.ts.map +0 -1
  321. package/lib/typescript/ui/components/QuickActions.d.ts +0 -15
  322. package/lib/typescript/ui/components/QuickActions.d.ts.map +0 -1
  323. package/lib/typescript/ui/components/Section.d.ts +0 -11
  324. package/lib/typescript/ui/components/Section.d.ts.map +0 -1
  325. package/lib/typescript/ui/components/SectionTitle.d.ts +0 -9
  326. package/lib/typescript/ui/components/SectionTitle.d.ts.map +0 -1
  327. package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
  328. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
  329. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +0 -10
  330. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +0 -1
  331. package/lib/typescript/ui/components/icon/index.d.ts +0 -3
  332. package/lib/typescript/ui/components/icon/index.d.ts.map +0 -1
  333. package/lib/typescript/ui/components/index.d.ts +0 -13
  334. package/lib/typescript/ui/components/index.d.ts.map +0 -1
  335. package/lib/typescript/ui/context/OxyContext.d.ts +0 -42
  336. package/lib/typescript/ui/context/OxyContext.d.ts.map +0 -1
  337. package/lib/typescript/ui/index.d.ts +0 -15
  338. package/lib/typescript/ui/index.d.ts.map +0 -1
  339. package/lib/typescript/ui/navigation/OxyRouter.d.ts +0 -5
  340. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +0 -1
  341. package/lib/typescript/ui/navigation/types.d.ts +0 -116
  342. package/lib/typescript/ui/navigation/types.d.ts.map +0 -1
  343. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +0 -5
  344. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  345. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +0 -8
  346. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +0 -1
  347. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +0 -5
  348. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  349. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +0 -5
  350. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  351. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  352. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  353. package/lib/typescript/ui/screens/AppInfoScreen.d.ts +0 -5
  354. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +0 -1
  355. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
  356. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
  357. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +0 -8
  358. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +0 -1
  359. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
  360. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
  361. package/lib/typescript/ui/screens/ProfileScreen.d.ts +0 -9
  362. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +0 -1
  363. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +0 -5
  364. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  365. package/lib/typescript/ui/screens/SignInScreen.d.ts +0 -5
  366. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +0 -1
  367. package/lib/typescript/ui/screens/SignUpScreen.d.ts +0 -5
  368. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +0 -1
  369. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
  370. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +0 -1
  371. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
  372. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
  373. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +0 -5
  374. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
  375. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
  376. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
  377. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
  378. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +0 -1
  379. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
  380. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
  381. package/lib/typescript/ui/styles/fonts.d.ts +0 -21
  382. package/lib/typescript/ui/styles/fonts.d.ts.map +0 -1
  383. package/lib/typescript/ui/styles/index.d.ts +0 -3
  384. package/lib/typescript/ui/styles/index.d.ts.map +0 -1
  385. package/lib/typescript/ui/styles/theme.d.ts +0 -68
  386. package/lib/typescript/ui/styles/theme.d.ts.map +0 -1
  387. package/lib/typescript/utils/deviceManager.d.ts +0 -66
  388. package/lib/typescript/utils/deviceManager.d.ts.map +0 -1
  389. package/lib/typescript/utils/index.d.ts +0 -3
  390. package/lib/typescript/utils/index.d.ts.map +0 -1
  391. package/lib/typescript/utils/polyfills.d.ts +0 -6
  392. package/lib/typescript/utils/polyfills.d.ts.map +0 -1
  393. package/src/lib/react-native-polyfills.ts +0 -219
  394. package/src/lib/sonner-safe.ts +0 -37
  395. package/src/lib/sonner.web.ts +0 -1
@@ -1,98 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _styles = require("../styles");
10
- var _fonts = require("../styles/fonts");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- /**
14
- * Avatar component that displays either an image or text avatar
15
- * Falls back to displaying the first letter of the name if no image is provided
16
- */
17
- const Avatar = ({
18
- uri,
19
- text,
20
- name,
21
- size = 40,
22
- theme = 'light',
23
- backgroundColor,
24
- textColor = '#FFFFFF',
25
- style,
26
- imageStyle,
27
- textStyle,
28
- isLoading = false
29
- }) => {
30
- // Get theme colors
31
- const colors = (0, _styles.useThemeColors)(theme);
32
-
33
- // Use the primary color from theme as default background if not specified
34
- const bgColor = backgroundColor || colors.primary;
35
-
36
- // Calculate font size based on avatar size
37
- const fontSize = Math.floor(size * 0.4);
38
-
39
- // Determine what text to display for fallback
40
- const displayText = text || (name ? name.charAt(0).toUpperCase() : '');
41
-
42
- // Style for container based on size
43
- const containerStyle = {
44
- width: size,
45
- height: size,
46
- borderRadius: size / 2 // Make it circular
47
- };
48
- if (isLoading) {
49
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
50
- style: [styles.container, containerStyle, {
51
- backgroundColor: colors.inputBackground
52
- }, style],
53
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
54
- color: colors.primary,
55
- size: size > 50 ? 'large' : 'small'
56
- })
57
- });
58
- }
59
-
60
- // If an image URL is provided, use Image component
61
- if (uri) {
62
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
63
- source: {
64
- uri: uri
65
- },
66
- style: [styles.container, containerStyle, imageStyle]
67
- });
68
- }
69
-
70
- // Otherwise show text avatar
71
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
72
- style: [styles.container, containerStyle, {
73
- backgroundColor: bgColor
74
- }, style],
75
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
76
- style: [styles.text, {
77
- fontSize,
78
- fontFamily: _fonts.fontFamilies.phuduBold
79
- }, {
80
- color: textColor
81
- }, textStyle],
82
- children: displayText
83
- })
84
- });
85
- };
86
- const styles = _reactNative.StyleSheet.create({
87
- container: {
88
- overflow: 'hidden',
89
- justifyContent: 'center',
90
- alignItems: 'center'
91
- },
92
- text: {
93
- // Font family is applied directly in the component to use the constants
94
- fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined // Only apply fontWeight on web
95
- }
96
- });
97
- var _default = exports.default = Avatar;
98
- //# sourceMappingURL=Avatar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_styles","_fonts","_jsxRuntime","e","__esModule","default","Avatar","uri","text","name","size","theme","backgroundColor","textColor","style","imageStyle","textStyle","isLoading","colors","useThemeColors","bgColor","primary","fontSize","Math","floor","displayText","charAt","toUpperCase","containerStyle","width","height","borderRadius","jsx","View","styles","container","inputBackground","children","ActivityIndicator","color","Image","source","Text","fontFamily","fontFamilies","phuduBold","StyleSheet","create","overflow","justifyContent","alignItems","fontWeight","Platform","OS","undefined","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/Avatar.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkE/C;AACA;AACA;AACA;AACA,MAAMG,MAA6B,GAAGA,CAAC;EACnCC,GAAG;EACHC,IAAI;EACJC,IAAI;EACJC,IAAI,GAAG,EAAE;EACTC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,MAAM,CAACC,SAAS,EAAEP,cAAc,EAAEb,UAAU;IAAE,CACzD,CAAC;EAEV;;EAEA;EACA,oBACI,IAAAb,WAAA,CAAA8B,GAAA,EAACjC,YAAA,CAAAkC,IAAI;IAACnB,KAAK,EAAE,CAACoB,MAAM,CAACC,SAAS,EAAEP,cAAc,EAAE;MAAEhB,eAAe,EAAEQ;IAAQ,CAAC,EAAEN,KAAK,CAAE;IAAAuB,QAAA,eACjF,IAAAnC,WAAA,CAAA8B,GAAA,EAACjC,YAAA,CAAA2C,IAAI;MAAC5B,KAAK,EAAE,CACToB,MAAM,CAAC1B,IAAI,EACX;QACIc,QAAQ;QACRqB,UAAU,EAAEC,mBAAY,CAACC;MAC7B,CAAC,EACD;QAAEN,KAAK,EAAE1B;MAAU,CAAC,EACpBG,SAAS,CACX;MAAAqB,QAAA,EACGZ;IAAW,CACV;EAAC,CACL,CAAC;AAEf,CAAC;AAED,MAAMS,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC7BZ,SAAS,EAAE;IACPa,QAAQ,EAAE,QAAQ;IAClBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EAChB,CAAC;EACD1C,IAAI,EAAE;IACF;IACA2C,UAAU,EAAEC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,MAAM,GAAGC,SAAS,CAAE;EAC5D;AACJ,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnD,OAAA,GAEYC,MAAM","ignoreList":[]}
@@ -1,246 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
- var _OxyContext = require("../context/OxyContext");
11
- var _fonts = require("../styles/fonts");
12
- var _sonner = require("../../lib/sonner");
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
- /**
16
- * An animated follow button with interactive state changes and preventDefault support
17
- *
18
- * @example
19
- * ```tsx
20
- * // Basic usage
21
- * <FollowButton userId="123" />
22
- *
23
- * // With custom styling
24
- * <FollowButton
25
- * userId="123"
26
- * initiallyFollowing={true}
27
- * size="large"
28
- * style={{ borderRadius: 12 }}
29
- * onFollowChange={(isFollowing) => console.log(`User is now ${isFollowing ? 'followed' : 'unfollowed'}`)}
30
- * />
31
- *
32
- * // Inside a pressable container (prevents parent actions)
33
- * <TouchableOpacity onPress={() => navigateToProfile()}>
34
- * <View>
35
- * <Text>User Profile</Text>
36
- * <FollowButton
37
- * userId="123"
38
- * preventParentActions={true} // Default: true
39
- * />
40
- * </View>
41
- * </TouchableOpacity>
42
- *
43
- * // Custom onPress handler
44
- * <FollowButton
45
- * userId="123"
46
- * onPress={(event) => {
47
- * event.preventDefault(); // Custom preventDefault
48
- * // Custom logic here
49
- * }}
50
- * />
51
- * ```
52
- */
53
- const FollowButton = ({
54
- userId,
55
- initiallyFollowing = false,
56
- size = 'medium',
57
- onFollowChange,
58
- style,
59
- textStyle,
60
- disabled = false,
61
- showLoadingState = true,
62
- preventParentActions = true,
63
- onPress
64
- }) => {
65
- const {
66
- oxyServices,
67
- isAuthenticated
68
- } = (0, _OxyContext.useOxy)();
69
- const [isFollowing, setIsFollowing] = (0, _react.useState)(initiallyFollowing);
70
- const [isLoading, setIsLoading] = (0, _react.useState)(false);
71
-
72
- // Animation values
73
- const animationProgress = (0, _reactNativeReanimated.useSharedValue)(initiallyFollowing ? 1 : 0);
74
- const scale = (0, _reactNativeReanimated.useSharedValue)(1);
75
-
76
- // Update the animation value when isFollowing changes
77
- (0, _react.useEffect)(() => {
78
- animationProgress.value = (0, _reactNativeReanimated.withTiming)(isFollowing ? 1 : 0, {
79
- duration: 300,
80
- easing: _reactNativeReanimated.Easing.bezier(0.25, 0.1, 0.25, 1)
81
- });
82
- }, [isFollowing, animationProgress]);
83
-
84
- // The button press handler with preventDefault support
85
- const handlePress = async event => {
86
- // Prevent parent actions if enabled (e.g., if inside a link or pressable container)
87
- if (preventParentActions && event) {
88
- // For React Native Web compatibility
89
- if (_reactNative.Platform.OS === 'web' && event.preventDefault) {
90
- event.preventDefault();
91
- }
92
-
93
- // Stop event propagation to prevent parent TouchableOpacity/Pressable actions
94
- if (event.stopPropagation) {
95
- event.stopPropagation();
96
- }
97
-
98
- // For React Native, prevent gesture bubbling
99
- if (event.nativeEvent && event.nativeEvent.stopPropagation) {
100
- event.nativeEvent.stopPropagation();
101
- }
102
- }
103
-
104
- // If custom onPress is provided, use it instead of default behavior
105
- if (onPress) {
106
- onPress(event);
107
- return;
108
- }
109
- if (disabled || isLoading || !isAuthenticated) return;
110
-
111
- // Touch feedback animation
112
- scale.value = (0, _reactNativeReanimated.withSpring)(0.95, {
113
- damping: 10
114
- }, () => {
115
- scale.value = (0, _reactNativeReanimated.withSpring)(1);
116
- });
117
- setIsLoading(true);
118
- try {
119
- // This should be replaced with actual API call to your services
120
- if (isFollowing) {
121
- // Unfollow API call would go here
122
- // await oxyServices.user.unfollowUser(userId);
123
- console.log(`Unfollowing user: ${userId}`);
124
- await new Promise(resolve => setTimeout(resolve, 500)); // Simulating API call
125
- } else {
126
- // Follow API call would go here
127
- // await oxyServices.user.followUser(userId);
128
- console.log(`Following user: ${userId}`);
129
- await new Promise(resolve => setTimeout(resolve, 500)); // Simulating API call
130
- }
131
-
132
- // Toggle following state with animation
133
- const newFollowingState = !isFollowing;
134
- setIsFollowing(newFollowingState);
135
-
136
- // Call the callback if provided
137
- if (onFollowChange) {
138
- onFollowChange(newFollowingState);
139
- }
140
-
141
- // Show success toast
142
- _sonner.toast.success(newFollowingState ? 'Following user!' : 'Unfollowed user');
143
- } catch (error) {
144
- console.error('Follow action failed:', error);
145
- _sonner.toast.error('Failed to update follow status. Please try again.');
146
- } finally {
147
- setIsLoading(false);
148
- }
149
- };
150
-
151
- // Animated styles for the button
152
- const animatedButtonStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
153
- const backgroundColor = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#d169e5', '#FFFFFF']);
154
- const borderColor = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#d169e5', '#d169e5']);
155
-
156
- // Add a slight scaling effect during the transition
157
- const transitionScale = 1 + 0.05 * Math.sin(animationProgress.value * Math.PI);
158
- return {
159
- backgroundColor,
160
- borderColor,
161
- borderWidth: 1,
162
- transform: [{
163
- scale: scale.value * transitionScale
164
- }]
165
- };
166
- });
167
-
168
- // Animated styles for the text
169
- const animatedTextStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
170
- const color = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#FFFFFF', '#d169e5']);
171
- return {
172
- color
173
- };
174
- });
175
-
176
- // Get size-specific styles
177
- const getSizeStyles = () => {
178
- switch (size) {
179
- case 'small':
180
- return {
181
- button: {
182
- paddingVertical: 6,
183
- paddingHorizontal: 12
184
- },
185
- text: {
186
- fontSize: 12
187
- }
188
- };
189
- case 'large':
190
- return {
191
- button: {
192
- paddingVertical: 12,
193
- paddingHorizontal: 24
194
- },
195
- text: {
196
- fontSize: 18
197
- }
198
- };
199
- default:
200
- // medium
201
- return {
202
- button: {
203
- paddingVertical: 8,
204
- paddingHorizontal: 16
205
- },
206
- text: {
207
- fontSize: 14
208
- }
209
- };
210
- }
211
- };
212
- const sizeStyles = getSizeStyles();
213
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
214
- activeOpacity: 0.8,
215
- onPress: handlePress,
216
- disabled: disabled || isLoading || !isAuthenticated,
217
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
218
- style: [styles.button, sizeStyles.button, animatedButtonStyle, style],
219
- children: isLoading && showLoadingState ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
220
- size: "small",
221
- color: isFollowing ? '#d169e5' : '#FFFFFF'
222
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.Text, {
223
- style: [styles.text, sizeStyles.text, animatedTextStyle, textStyle],
224
- children: isFollowing ? 'Following' : 'Follow'
225
- })
226
- })
227
- });
228
- };
229
- const styles = _reactNative.StyleSheet.create({
230
- button: {
231
- justifyContent: 'center',
232
- alignItems: 'center',
233
- flexDirection: 'row',
234
- borderRadius: 100
235
- },
236
- text: {
237
- fontFamily: _reactNative.Platform.select({
238
- web: 'Phudu',
239
- default: _fonts.fontFamilies.phuduSemiBold
240
- }),
241
- fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined,
242
- textAlign: 'center'
243
- }
244
- });
245
- var _default = exports.default = FollowButton;
246
- //# sourceMappingURL=FollowButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OxyContext","_fonts","_sonner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FollowButton","userId","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","onPress","oxyServices","isAuthenticated","useOxy","isFollowing","setIsFollowing","useState","isLoading","setIsLoading","animationProgress","useSharedValue","scale","useEffect","value","withTiming","duration","easing","Easing","bezier","handlePress","event","Platform","OS","preventDefault","stopPropagation","nativeEvent","withSpring","damping","console","log","Promise","resolve","setTimeout","newFollowingState","toast","success","error","animatedButtonStyle","useAnimatedStyle","backgroundColor","interpolateColor","borderColor","transitionScale","Math","sin","PI","borderWidth","transform","animatedTextStyle","color","getSizeStyles","button","paddingVertical","paddingHorizontal","text","fontSize","sizeStyles","jsx","TouchableOpacity","activeOpacity","children","View","styles","ActivityIndicator","Text","StyleSheet","create","justifyContent","alignItems","flexDirection","borderRadius","fontFamily","select","web","fontFamilies","phuduSemiBold","fontWeight","undefined","textAlign","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAQA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gB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, "__esModule", {
4
- value: true
5
- });
6
- exports.setupFonts = exports.FontLoader = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var Font = _interopRequireWildcard(require("expo-font"));
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
- /**
13
- * Get the Phudu font sources for both native and web environments
14
- * This is specifically designed to work when distributed as an npm package
15
- */const getPhuduFonts = () => {
16
- try {
17
- // For both development and when used as a package
18
- // Load all static font weights
19
- return {
20
- 'Phudu-Light': require('../../assets/fonts/Phudu/Phudu-Light.ttf'),
21
- 'Phudu-Regular': require('../../assets/fonts/Phudu/Phudu-Regular.ttf'),
22
- 'Phudu-Medium': require('../../assets/fonts/Phudu/Phudu-Medium.ttf'),
23
- 'Phudu-SemiBold': require('../../assets/fonts/Phudu/Phudu-SemiBold.ttf'),
24
- 'Phudu-Bold': require('../../assets/fonts/Phudu/Phudu-Bold.ttf'),
25
- 'Phudu-ExtraBold': require('../../assets/fonts/Phudu/Phudu-ExtraBold.ttf'),
26
- 'Phudu-Black': require('../../assets/fonts/Phudu/Phudu-Black.ttf')
27
- };
28
- } catch (error) {
29
- console.warn('Failed to load Phudu fonts:', error);
30
- return null;
31
- }
32
- };
33
-
34
- /**
35
- * FontLoader component that loads custom fonts before rendering children
36
- * This works in both the package development and when consumed as an npm package
37
- */
38
- const FontLoader = ({
39
- children,
40
- fallbackContent
41
- }) => {
42
- const [fontState, setFontState] = (0, _react.useState)('loading');
43
- (0, _react.useEffect)(() => {
44
- const loadFonts = async () => {
45
- try {
46
- // Get all the font weights
47
- const phuduFonts = getPhuduFonts();
48
- if (!phuduFonts) {
49
- throw new Error('Phudu font files not found');
50
- }
51
-
52
- // Load all the static Phudu fonts with their respective weights
53
- await Font.loadAsync(phuduFonts);
54
- setFontState('loaded');
55
- } catch (error) {
56
- console.error('Error loading fonts:', error);
57
- // Fallback to render without custom fonts
58
- setFontState('error');
59
- }
60
- };
61
- loadFonts();
62
- }, []);
63
- if (fontState === 'loading') {
64
- // Render a loading placeholder while fonts are loading
65
- if (fallbackContent) {
66
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
67
- children: fallbackContent
68
- });
69
- }
70
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
71
- style: styles.loaderContainer,
72
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
73
- size: "small",
74
- color: "#d169e5"
75
- })
76
- });
77
- }
78
- if (fontState === 'error') {
79
- console.warn('Fonts failed to load. Using system fonts instead.');
80
- }
81
-
82
- // Return children even on error - the app will use system fonts as fallback
83
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
84
- children: children
85
- });
86
- };
87
-
88
- /**
89
- * Setup fonts for applications consuming this package
90
- * This should be called by applications using your package
91
- */
92
- exports.FontLoader = FontLoader;
93
- const setupFonts = async () => {
94
- try {
95
- const phuduFonts = getPhuduFonts();
96
- if (!phuduFonts) {
97
- throw new Error('Phudu font files not found');
98
- }
99
- if (_reactNative.Platform.OS === 'web') {
100
- // For web platform, dynamically inject CSS to load the fonts
101
- if (typeof document !== 'undefined') {
102
- // Create a style element
103
- const style = document.createElement('style');
104
-
105
- // Define @font-face rules for each font weight
106
- const fontFaceRules = `
107
- @font-face {
108
- font-family: 'Phudu';
109
- src: url(${phuduFonts['Phudu-Light']}) format('truetype');
110
- font-weight: 300;
111
- font-style: normal;
112
- }
113
- @font-face {
114
- font-family: 'Phudu';
115
- src: url(${phuduFonts['Phudu-Regular']}) format('truetype');
116
- font-weight: 400;
117
- font-style: normal;
118
- }
119
- @font-face {
120
- font-family: 'Phudu';
121
- src: url(${phuduFonts['Phudu-Medium']}) format('truetype');
122
- font-weight: 500;
123
- font-style: normal;
124
- }
125
- @font-face {
126
- font-family: 'Phudu';
127
- src: url(${phuduFonts['Phudu-SemiBold']}) format('truetype');
128
- font-weight: 600;
129
- font-style: normal;
130
- }
131
- @font-face {
132
- font-family: 'Phudu';
133
- src: url(${phuduFonts['Phudu-Bold']}) format('truetype');
134
- font-weight: 700;
135
- font-style: normal;
136
- }
137
- @font-face {
138
- font-family: 'Phudu';
139
- src: url(${phuduFonts['Phudu-ExtraBold']}) format('truetype');
140
- font-weight: 800;
141
- font-style: normal;
142
- }
143
- @font-face {
144
- font-family: 'Phudu';
145
- src: url(${phuduFonts['Phudu-Black']}) format('truetype');
146
- font-weight: 900;
147
- font-style: normal;
148
- }
149
- `;
150
- style.textContent = fontFaceRules;
151
- // Append to the document head
152
- document.head.appendChild(style);
153
- console.info('All Phudu web fonts have been dynamically loaded');
154
- }
155
- } else {
156
- // For native platforms, guidance for the package users
157
- console.info('Fonts should be linked in native projects to use Phudu fonts');
158
-
159
- // Attempt to load the fonts anyway (this works if the consumer has linked the assets)
160
- await Font.loadAsync(phuduFonts);
161
- }
162
- return true;
163
- } catch (error) {
164
- console.warn('Error setting up fonts:', error?.message || error);
165
- return false;
166
- }
167
- };
168
- exports.setupFonts = setupFonts;
169
- const styles = _reactNative.StyleSheet.create({
170
- loaderContainer: {
171
- position: 'absolute',
172
- top: 0,
173
- left: 0,
174
- right: 0,
175
- bottom: 0,
176
- justifyContent: 'center',
177
- alignItems: 'center',
178
- backgroundColor: 'transparent'
179
- }
180
- });
181
- //# sourceMappingURL=FontLoader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","Font","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getPhuduFonts","error","console","warn","FontLoader","children","fallbackContent","fontState","setFontState","useState","useEffect","loadFonts","phuduFonts","Error","loadAsync","jsx","Fragment","View","style","styles","loaderContainer","ActivityIndicator","size","color","exports","setupFonts","Platform","OS","document","createElement","fontFaceRules","textContent","head","appendChild","info","message","StyleSheet","create","position","top","left","right","bottom","justifyContent","alignItems","backgroundColor"],"sourceRoot":"../../../../src","sources":["ui/components/FontLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAkC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAA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AU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE;EACrB;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _vectorIcons = require("@expo/vector-icons");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const GroupedItem = ({
13
- icon,
14
- iconColor = '#007AFF',
15
- title,
16
- subtitle,
17
- theme,
18
- onPress,
19
- isFirst = false,
20
- isLast = false,
21
- showChevron = true,
22
- disabled = false,
23
- customContent
24
- }) => {
25
- const isDarkTheme = theme === 'dark';
26
- const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
27
- const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#FFFFFF';
28
- const itemStyles = [styles.groupedItem, isFirst && styles.firstGroupedItem, isLast && styles.lastGroupedItem, {
29
- backgroundColor: secondaryBackgroundColor
30
- }];
31
- const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
32
- style: styles.groupedItemContent,
33
- children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
34
- name: icon,
35
- size: 20,
36
- color: iconColor,
37
- style: styles.actionIcon
38
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
39
- style: styles.actionTextContainer,
40
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
41
- style: [styles.actionButtonText, {
42
- color: textColor
43
- }],
44
- children: title
45
- }), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
46
- style: [styles.actionButtonSubtext, {
47
- color: isDarkTheme ? '#BBBBBB' : '#666666'
48
- }],
49
- children: subtitle
50
- })]
51
- }), customContent, showChevron && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
52
- name: "chevron-forward",
53
- size: 16,
54
- color: isDarkTheme ? '#666666' : '#999999'
55
- })]
56
- });
57
- if (onPress && !disabled) {
58
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
59
- style: itemStyles,
60
- onPress: onPress,
61
- children: content
62
- });
63
- }
64
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
65
- style: itemStyles,
66
- children: content
67
- });
68
- };
69
- const styles = _reactNative.StyleSheet.create({
70
- groupedItem: {
71
- flexDirection: 'row',
72
- alignItems: 'center',
73
- justifyContent: 'space-between',
74
- marginBottom: 2,
75
- overflow: 'hidden'
76
- },
77
- firstGroupedItem: {
78
- borderTopLeftRadius: 24,
79
- borderTopRightRadius: 24
80
- },
81
- lastGroupedItem: {
82
- borderBottomLeftRadius: 24,
83
- borderBottomRightRadius: 24,
84
- marginBottom: 8
85
- },
86
- groupedItemContent: {
87
- flexDirection: 'row',
88
- alignItems: 'center',
89
- padding: 16,
90
- width: '100%'
91
- },
92
- actionIcon: {
93
- marginRight: 12
94
- },
95
- actionTextContainer: {
96
- flex: 1
97
- },
98
- actionButtonText: {
99
- fontSize: 16,
100
- fontWeight: '500',
101
- marginBottom: 2
102
- },
103
- actionButtonSubtext: {
104
- fontSize: 13,
105
- lineHeight: 18
106
- }
107
- });
108
- var _default = exports.default = GroupedItem;
109
- //# sourceMappingURL=GroupedItem.js.map