@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
@@ -7,13 +7,12 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _OxyContext = require("../context/OxyContext");
10
- var _Avatar = _interopRequireDefault(require("../components/Avatar"));
11
10
  var _OxyIcon = _interopRequireDefault(require("../components/icon/OxyIcon"));
12
- var _vectorIcons = require("@expo/vector-icons");
13
11
  var _sonner = require("../../lib/sonner");
14
12
  var _fonts = require("../styles/fonts");
15
13
  var _confirmAction = require("../utils/confirmAction");
16
14
  var _authStore = require("../stores/authStore");
15
+ var _components = require("../components");
17
16
  var _jsxRuntime = require("react/jsx-runtime");
18
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
18
  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); }
@@ -57,6 +56,17 @@ const AccountSettingsScreen = ({
57
56
  const [tempBio, setTempBio] = (0, _react.useState)('');
58
57
  const [tempLocation, setTempLocation] = (0, _react.useState)('');
59
58
  const [tempLinks, setTempLinks] = (0, _react.useState)([]);
59
+ const [tempLinksWithMetadata, setTempLinksWithMetadata] = (0, _react.useState)([]);
60
+ const [isAddingLink, setIsAddingLink] = (0, _react.useState)(false);
61
+ const [newLinkUrl, setNewLinkUrl] = (0, _react.useState)('');
62
+ const [isFetchingMetadata, setIsFetchingMetadata] = (0, _react.useState)(false);
63
+
64
+ // Location management state
65
+ const [tempLocations, setTempLocations] = (0, _react.useState)([]);
66
+ const [isAddingLocation, setIsAddingLocation] = (0, _react.useState)(false);
67
+ const [newLocationQuery, setNewLocationQuery] = (0, _react.useState)('');
68
+ const [locationSearchResults, setLocationSearchResults] = (0, _react.useState)([]);
69
+ const [isSearchingLocations, setIsSearchingLocations] = (0, _react.useState)(false);
60
70
 
61
71
  // Memoize theme-related calculations to prevent unnecessary recalculations
62
72
  const themeStyles = (0, _react.useMemo)(() => {
@@ -72,7 +82,7 @@ const AccountSettingsScreen = ({
72
82
  const animateSaveButton = (0, _react.useCallback)(toValue => {
73
83
  _reactNative.Animated.spring(saveButtonScale, {
74
84
  toValue,
75
- useNativeDriver: true,
85
+ useNativeDriver: _reactNative.Platform.OS !== 'web',
76
86
  tension: 150,
77
87
  friction: 8
78
88
  }).start();
@@ -89,7 +99,59 @@ const AccountSettingsScreen = ({
89
99
  setEmail(user.email || '');
90
100
  setBio(user.bio || '');
91
101
  setLocation(user.location || '');
92
- setLinks(Array.isArray(user.links) ? user.links.map(l => typeof l === 'string' ? l : l.link).filter(Boolean) : user.website ? [user.website] : []);
102
+
103
+ // Handle locations - convert single location to array format
104
+ if (user.locations && Array.isArray(user.locations)) {
105
+ setTempLocations(user.locations.map((loc, index) => ({
106
+ id: loc.id || `existing-${index}`,
107
+ name: loc.name,
108
+ label: loc.label,
109
+ coordinates: loc.coordinates
110
+ })));
111
+ } else if (user.location) {
112
+ // Convert single location string to array format
113
+ setTempLocations([{
114
+ id: 'existing-0',
115
+ name: user.location,
116
+ label: 'Location'
117
+ }]);
118
+ } else {
119
+ setTempLocations([]);
120
+ }
121
+
122
+ // Handle links - simple and direct like other fields
123
+ if (user.linksMetadata && Array.isArray(user.linksMetadata)) {
124
+ const urls = user.linksMetadata.map(l => l.url);
125
+ setLinks(urls);
126
+ const metadataWithIds = user.linksMetadata.map((link, index) => ({
127
+ ...link,
128
+ id: link.id || `existing-${index}`
129
+ }));
130
+ setTempLinksWithMetadata(metadataWithIds);
131
+ } else if (Array.isArray(user.links)) {
132
+ const simpleLinks = user.links.map(l => typeof l === 'string' ? l : l.link).filter(Boolean);
133
+ setLinks(simpleLinks);
134
+ const linksWithMetadata = simpleLinks.map((url, index) => ({
135
+ url,
136
+ title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
137
+ description: `Link to ${url}`,
138
+ image: undefined,
139
+ id: `existing-${index}`
140
+ }));
141
+ setTempLinksWithMetadata(linksWithMetadata);
142
+ } else if (user.website) {
143
+ setLinks([user.website]);
144
+ setTempLinksWithMetadata([{
145
+ url: user.website,
146
+ title: user.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
147
+ description: `Link to ${user.website}`,
148
+ image: undefined,
149
+ id: 'existing-0'
150
+ }]);
151
+ } else {
152
+ setLinks([]);
153
+ setTempLinksWithMetadata([]);
154
+ }
93
155
  setAvatarUrl(user.avatar?.url || '');
94
156
  }
95
157
  }, [user]);
@@ -103,9 +165,14 @@ const AccountSettingsScreen = ({
103
165
  username,
104
166
  email,
105
167
  bio,
106
- location,
107
- links
168
+ location: tempLocations.length > 0 ? tempLocations[0].name : '',
169
+ // Keep backward compatibility
170
+ locations: tempLocations.length > 0 ? tempLocations : undefined,
171
+ links,
172
+ linksMetadata: tempLinksWithMetadata.length > 0 ? tempLinksWithMetadata : undefined
108
173
  };
174
+ console.log('Saving updates:', updates);
175
+ console.log('Links metadata being saved:', tempLinksWithMetadata);
109
176
 
110
177
  // Handle name field
111
178
  if (displayName || lastName) {
@@ -160,10 +227,11 @@ const AccountSettingsScreen = ({
160
227
  setTempBio(currentValue);
161
228
  break;
162
229
  case 'location':
163
- setTempLocation(currentValue);
230
+ // Don't reset the locations - keep the existing data
164
231
  break;
165
232
  case 'links':
166
- setTempLinks([...links]);
233
+ // Don't reset the metadata - keep the existing rich metadata
234
+ // The tempLinksWithMetadata should already contain the rich data from the database
167
235
  break;
168
236
  }
169
237
  setEditingField(type);
@@ -186,10 +254,13 @@ const AccountSettingsScreen = ({
186
254
  setBio(tempBio);
187
255
  break;
188
256
  case 'location':
189
- setLocation(tempLocation);
257
+ // Locations are handled in the main save function
190
258
  break;
191
259
  case 'links':
192
- setLinks(tempLinks);
260
+ // Save both URLs and metadata
261
+ setLinks(tempLinksWithMetadata.map(link => link.url));
262
+ // Store full metadata for database
263
+ setTempLinksWithMetadata(tempLinksWithMetadata);
193
264
  break;
194
265
  }
195
266
 
@@ -202,91 +273,439 @@ const AccountSettingsScreen = ({
202
273
  const cancelEditing = () => {
203
274
  setEditingField(null);
204
275
  };
205
- const getFieldLabel = type => {
206
- const labels = {
207
- displayName: 'Display Name',
208
- username: 'Username',
209
- email: 'Email',
210
- bio: 'Bio',
211
- location: 'Location',
212
- links: 'Links'
213
- };
214
- return labels[type] || 'Field';
276
+ const fetchLinkMetadata = async url => {
277
+ try {
278
+ setIsFetchingMetadata(true);
279
+ console.log('Fetching metadata for URL:', url);
280
+
281
+ // Use the backend API to fetch metadata
282
+ const metadata = await oxyServices.fetchLinkMetadata(url);
283
+ console.log('Received metadata:', metadata);
284
+ return {
285
+ ...metadata,
286
+ id: Date.now().toString()
287
+ };
288
+ } catch (error) {
289
+ console.error('Error fetching metadata:', error);
290
+ // Fallback to basic metadata
291
+ return {
292
+ url: url.startsWith('http') ? url : 'https://' + url,
293
+ title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
294
+ description: 'Link',
295
+ image: undefined,
296
+ id: Date.now().toString()
297
+ };
298
+ } finally {
299
+ setIsFetchingMetadata(false);
300
+ }
215
301
  };
216
- const getFieldIcon = type => {
217
- const icons = {
218
- displayName: {
219
- name: 'person',
220
- color: '#007AFF'
221
- },
222
- username: {
223
- name: 'at',
224
- color: '#5856D6'
225
- },
226
- email: {
227
- name: 'mail',
228
- color: '#FF9500'
229
- },
230
- bio: {
231
- name: 'document-text',
232
- color: '#34C759'
233
- },
234
- location: {
235
- name: 'location',
236
- color: '#FF3B30'
237
- },
238
- links: {
239
- name: 'link',
240
- color: '#32D74B'
302
+ const searchLocations = async query => {
303
+ if (!query.trim() || query.length < 3) {
304
+ setLocationSearchResults([]);
305
+ return;
306
+ }
307
+ try {
308
+ setIsSearchingLocations(true);
309
+ const response = await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(query)}&limit=5&addressdetails=1`);
310
+ const data = await response.json();
311
+ setLocationSearchResults(data);
312
+ } catch (error) {
313
+ console.error('Error searching locations:', error);
314
+ setLocationSearchResults([]);
315
+ } finally {
316
+ setIsSearchingLocations(false);
317
+ }
318
+ };
319
+ const addLocation = locationData => {
320
+ const newLocation = {
321
+ id: Date.now().toString(),
322
+ name: locationData.display_name,
323
+ label: locationData.type === 'city' ? 'City' : locationData.type === 'country' ? 'Country' : locationData.type === 'state' ? 'State' : 'Location',
324
+ coordinates: {
325
+ lat: parseFloat(locationData.lat),
326
+ lon: parseFloat(locationData.lon)
241
327
  }
242
328
  };
243
- return icons[type] || {
244
- name: 'person',
245
- color: '#007AFF'
246
- };
329
+ setTempLocations(prev => [...prev, newLocation]);
330
+ setNewLocationQuery('');
331
+ setLocationSearchResults([]);
332
+ setIsAddingLocation(false);
333
+ };
334
+ const removeLocation = id => {
335
+ setTempLocations(prev => prev.filter(loc => loc.id !== id));
336
+ };
337
+ const moveLocation = (fromIndex, toIndex) => {
338
+ setTempLocations(prev => {
339
+ const newLocations = [...prev];
340
+ const [movedLocation] = newLocations.splice(fromIndex, 1);
341
+ newLocations.splice(toIndex, 0, movedLocation);
342
+ return newLocations;
343
+ });
344
+ };
345
+ const addLink = async () => {
346
+ if (!newLinkUrl.trim()) return;
347
+ const url = newLinkUrl.trim();
348
+ console.log('Adding link:', url);
349
+ const metadata = await fetchLinkMetadata(url);
350
+ console.log('Final metadata for adding:', metadata);
351
+ setTempLinksWithMetadata(prev => [...prev, metadata]);
352
+ setNewLinkUrl('');
353
+ setIsAddingLink(false);
354
+ };
355
+ const removeLink = id => {
356
+ setTempLinksWithMetadata(prev => prev.filter(link => link.id !== id));
357
+ };
358
+ const moveLink = (fromIndex, toIndex) => {
359
+ setTempLinksWithMetadata(prev => {
360
+ const newLinks = [...prev];
361
+ const [movedLink] = newLinks.splice(fromIndex, 1);
362
+ newLinks.splice(toIndex, 0, movedLink);
363
+ return newLinks;
364
+ });
247
365
  };
248
366
  const renderEditingField = type => {
249
367
  if (type === 'displayName') {
250
368
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
251
- style: styles.editingFieldContainer,
369
+ style: [styles.editingFieldContainer, {
370
+ backgroundColor: themeStyles.backgroundColor
371
+ }],
252
372
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
253
373
  style: styles.editingFieldContent,
254
374
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
255
- style: [styles.newValueSection, {
256
- flexDirection: 'row',
257
- gap: 12
258
- }],
259
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
260
- style: {
261
- flex: 1
262
- },
263
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
264
- style: styles.editingFieldLabel,
265
- children: "First Name"
266
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
267
- style: styles.editingFieldInput,
268
- value: tempDisplayName,
269
- onChangeText: setTempDisplayName,
270
- placeholder: "Enter your first name",
271
- placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
272
- autoFocus: true,
273
- selectionColor: themeStyles.primaryColor
274
- })]
375
+ style: styles.newValueSection,
376
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
377
+ style: styles.editingFieldHeader,
378
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
379
+ style: [styles.editingFieldLabel, {
380
+ color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
381
+ }],
382
+ children: "Edit Display Name"
383
+ })
275
384
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
276
385
  style: {
277
- flex: 1
386
+ flexDirection: 'row',
387
+ gap: 12
278
388
  },
279
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
280
- style: styles.editingFieldLabel,
281
- children: "Last Name"
282
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
283
- style: styles.editingFieldInput,
284
- value: tempLastName,
285
- onChangeText: setTempLastName,
286
- placeholder: "Enter your last name",
287
- placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
288
- selectionColor: themeStyles.primaryColor
389
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
390
+ style: {
391
+ flex: 1
392
+ },
393
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
394
+ style: styles.editingFieldLabel,
395
+ children: "First Name"
396
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
397
+ style: styles.editingFieldInput,
398
+ value: tempDisplayName,
399
+ onChangeText: setTempDisplayName,
400
+ placeholder: "Enter your first name",
401
+ placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
402
+ autoFocus: true,
403
+ selectionColor: themeStyles.primaryColor
404
+ })]
405
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
406
+ style: {
407
+ flex: 1
408
+ },
409
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
410
+ style: styles.editingFieldLabel,
411
+ children: "Last Name"
412
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
413
+ style: styles.editingFieldInput,
414
+ value: tempLastName,
415
+ onChangeText: setTempLastName,
416
+ placeholder: "Enter your last name",
417
+ placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
418
+ selectionColor: themeStyles.primaryColor
419
+ })]
420
+ })]
421
+ })]
422
+ })
423
+ })
424
+ });
425
+ }
426
+ if (type === 'location') {
427
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
428
+ style: [styles.editingFieldContainer, {
429
+ backgroundColor: themeStyles.backgroundColor
430
+ }],
431
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
432
+ style: styles.editingFieldContent,
433
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
434
+ style: styles.newValueSection,
435
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
436
+ style: styles.editingFieldHeader,
437
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
438
+ style: [styles.editingFieldLabel, {
439
+ color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
440
+ }],
441
+ children: "Manage Your Locations"
442
+ })
443
+ }), isAddingLocation ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
444
+ style: styles.addLocationSection,
445
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
446
+ style: styles.addLocationLabel,
447
+ children: ["Add New Location", isSearchingLocations && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
448
+ style: styles.searchingText,
449
+ children: " \u2022 Searching..."
450
+ })]
451
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
452
+ style: styles.addLocationInputContainer,
453
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
454
+ style: styles.addLocationInput,
455
+ value: newLocationQuery,
456
+ onChangeText: text => {
457
+ setNewLocationQuery(text);
458
+ searchLocations(text);
459
+ },
460
+ placeholder: "Search for a location...",
461
+ placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
462
+ autoFocus: true,
463
+ selectionColor: themeStyles.primaryColor
464
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
465
+ style: styles.addLocationButtons,
466
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
467
+ style: [styles.addLocationButton, styles.cancelButton],
468
+ onPress: () => {
469
+ setIsAddingLocation(false);
470
+ setNewLocationQuery('');
471
+ setLocationSearchResults([]);
472
+ },
473
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
474
+ style: styles.cancelButtonText,
475
+ children: "Cancel"
476
+ })
477
+ })
478
+ })]
479
+ }), locationSearchResults.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
480
+ style: styles.searchResults,
481
+ children: locationSearchResults.map(result => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
482
+ style: styles.searchResultItem,
483
+ onPress: () => addLocation(result),
484
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
485
+ style: styles.searchResultName,
486
+ numberOfLines: 2,
487
+ children: result.display_name
488
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
489
+ style: styles.searchResultType,
490
+ children: result.type
491
+ })]
492
+ }, result.place_id))
493
+ })]
494
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
495
+ style: styles.addLocationTrigger,
496
+ onPress: () => setIsAddingLocation(true),
497
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
498
+ name: "add",
499
+ size: 20,
500
+ color: themeStyles.primaryColor
501
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
502
+ style: styles.addLocationTriggerText,
503
+ children: "Add a new location"
289
504
  })]
505
+ }), tempLocations.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
506
+ style: styles.locationsList,
507
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
508
+ style: styles.locationsListTitle,
509
+ children: ["Your Locations (", tempLocations.length, ")"]
510
+ }), tempLocations.map((location, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
511
+ style: styles.locationItem,
512
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
513
+ style: styles.locationItemContent,
514
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
515
+ style: styles.locationItemDragHandle,
516
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
517
+ style: styles.reorderButtons,
518
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
519
+ style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
520
+ onPress: () => index > 0 && moveLocation(index, index - 1),
521
+ disabled: index === 0,
522
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
523
+ name: "chevron-up",
524
+ size: 12,
525
+ color: index === 0 ? "#ccc" : "#666"
526
+ })
527
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
528
+ style: [styles.reorderButton, index === tempLocations.length - 1 && styles.reorderButtonDisabled],
529
+ onPress: () => index < tempLocations.length - 1 && moveLocation(index, index + 1),
530
+ disabled: index === tempLocations.length - 1,
531
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
532
+ name: "chevron-down",
533
+ size: 12,
534
+ color: index === tempLocations.length - 1 ? "#ccc" : "#666"
535
+ })
536
+ })]
537
+ })
538
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
539
+ style: styles.locationItemInfo,
540
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
541
+ style: styles.locationItemHeader,
542
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
543
+ style: styles.locationItemName,
544
+ numberOfLines: 1,
545
+ children: location.name
546
+ }), location.label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
547
+ style: styles.locationLabel,
548
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
549
+ style: styles.locationLabelText,
550
+ children: location.label
551
+ })
552
+ })]
553
+ }), location.coordinates && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
554
+ style: styles.locationCoordinates,
555
+ children: [location.coordinates.lat.toFixed(4), ", ", location.coordinates.lon.toFixed(4)]
556
+ })]
557
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
558
+ style: styles.locationItemActions,
559
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
560
+ style: styles.locationItemButton,
561
+ onPress: () => removeLocation(location.id),
562
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
563
+ name: "trash",
564
+ size: 14,
565
+ color: "#FF3B30"
566
+ })
567
+ })
568
+ })]
569
+ }), index < tempLocations.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
570
+ style: styles.locationItemDivider
571
+ })]
572
+ }, location.id)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
573
+ style: styles.reorderHint,
574
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
575
+ style: styles.reorderHintText,
576
+ children: "Use \u2191\u2193 buttons to reorder your locations"
577
+ })
578
+ })]
579
+ })]
580
+ })
581
+ })
582
+ });
583
+ }
584
+ if (type === 'links') {
585
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
586
+ style: [styles.editingFieldContainer, {
587
+ backgroundColor: themeStyles.backgroundColor
588
+ }],
589
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
590
+ style: styles.editingFieldContent,
591
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
592
+ style: styles.newValueSection,
593
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
594
+ style: styles.editingFieldHeader,
595
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
596
+ style: [styles.editingFieldLabel, {
597
+ color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
598
+ }],
599
+ children: "Manage Your Links"
600
+ })
601
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
602
+ items: [
603
+ // Add new link item
604
+ ...(isAddingLink ? [{
605
+ id: 'add-link-input',
606
+ icon: 'add',
607
+ iconColor: '#32D74B',
608
+ title: 'Add New Link',
609
+ subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
610
+ multiRow: true,
611
+ customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
612
+ style: styles.addLinkInputContainer,
613
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
614
+ style: styles.addLinkInput,
615
+ value: newLinkUrl,
616
+ onChangeText: setNewLinkUrl,
617
+ placeholder: "Enter URL (e.g., https://example.com)",
618
+ placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
619
+ keyboardType: "url",
620
+ autoFocus: true,
621
+ selectionColor: themeStyles.primaryColor
622
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
623
+ style: styles.addLinkButtons,
624
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
625
+ style: [styles.addLinkButton, styles.cancelButton],
626
+ onPress: () => {
627
+ setIsAddingLink(false);
628
+ setNewLinkUrl('');
629
+ },
630
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
631
+ style: styles.cancelButtonText,
632
+ children: "Cancel"
633
+ })
634
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
635
+ style: [styles.addLinkButton, styles.addButton, {
636
+ opacity: isFetchingMetadata ? 0.5 : 1
637
+ }],
638
+ onPress: addLink,
639
+ disabled: isFetchingMetadata,
640
+ children: isFetchingMetadata ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
641
+ size: "small",
642
+ color: "#fff"
643
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
644
+ style: styles.addButtonText,
645
+ children: "Add"
646
+ })
647
+ })]
648
+ })]
649
+ })
650
+ }] : [{
651
+ id: 'add-link-trigger',
652
+ icon: 'add',
653
+ iconColor: '#32D74B',
654
+ title: 'Add a new link',
655
+ subtitle: 'Tap to add a new link to your profile',
656
+ onPress: () => setIsAddingLink(true)
657
+ }]),
658
+ // Existing links
659
+ ...tempLinksWithMetadata.map((link, index) => ({
660
+ id: link.id,
661
+ image: link.image || undefined,
662
+ imageSize: 32,
663
+ icon: link.image ? undefined : 'link',
664
+ iconColor: '#32D74B',
665
+ title: link.title || link.url,
666
+ subtitle: link.description && link.description !== link.title ? link.description : link.url,
667
+ multiRow: true,
668
+ customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
669
+ style: styles.linkItemActions,
670
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
671
+ style: styles.reorderButtons,
672
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
673
+ style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
674
+ onPress: () => index > 0 && moveLink(index, index - 1),
675
+ disabled: index === 0,
676
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
677
+ name: "chevron-up",
678
+ size: 12,
679
+ color: index === 0 ? "#ccc" : "#666"
680
+ })
681
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
682
+ style: [styles.reorderButton, index === tempLinksWithMetadata.length - 1 && styles.reorderButtonDisabled],
683
+ onPress: () => index < tempLinksWithMetadata.length - 1 && moveLink(index, index + 1),
684
+ disabled: index === tempLinksWithMetadata.length - 1,
685
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
686
+ name: "chevron-down",
687
+ size: 12,
688
+ color: index === tempLinksWithMetadata.length - 1 ? "#ccc" : "#666"
689
+ })
690
+ })]
691
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
692
+ style: styles.linkItemButton,
693
+ onPress: () => removeLink(link.id),
694
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
695
+ name: "trash",
696
+ size: 14,
697
+ color: "#FF3B30"
698
+ })
699
+ })]
700
+ })
701
+ }))],
702
+ theme: theme
703
+ }), tempLinksWithMetadata.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
704
+ style: styles.reorderHint,
705
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
706
+ style: styles.reorderHintText,
707
+ children: "Use \u2191\u2193 buttons to reorder your links"
708
+ })
290
709
  })]
291
710
  })
292
711
  })
@@ -391,14 +810,21 @@ const AccountSettingsScreen = ({
391
810
  }
392
811
  };
393
812
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
394
- style: styles.editingFieldContainer,
813
+ style: [styles.editingFieldContainer, {
814
+ backgroundColor: themeStyles.backgroundColor
815
+ }],
395
816
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
396
817
  style: styles.editingFieldContent,
397
818
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
398
819
  style: styles.newValueSection,
399
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
400
- style: styles.editingFieldLabel,
401
- children: `Enter ${config.label.toLowerCase()}:`
820
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
821
+ style: styles.editingFieldHeader,
822
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
823
+ style: [styles.editingFieldLabel, {
824
+ color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
825
+ }],
826
+ children: `Enter ${config.label.toLowerCase()}:`
827
+ })
402
828
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
403
829
  style: [config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput, {
404
830
  backgroundColor: themeStyles.isDarkTheme ? '#333' : '#fff',
@@ -419,34 +845,6 @@ const AccountSettingsScreen = ({
419
845
  })
420
846
  });
421
847
  };
422
- const renderField = (type, label, value, placeholder, icon, iconColor, multiline = false, keyboardType = 'default', isFirst = false, isLast = false) => {
423
- const itemStyles = [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem];
424
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
425
- style: itemStyles,
426
- onPress: () => startEditing(type, value),
427
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
428
- style: styles.settingInfo,
429
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
430
- name: icon,
431
- size: 20,
432
- color: iconColor,
433
- style: styles.settingIcon
434
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
435
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
436
- style: styles.settingLabel,
437
- children: label
438
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
439
- style: styles.settingDescription,
440
- children: value || placeholder
441
- })]
442
- })]
443
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
444
- name: "chevron-forward",
445
- size: 16,
446
- color: "#ccc"
447
- })]
448
- });
449
- };
450
848
  if (authLoading || !isAuthenticated) {
451
849
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
452
850
  style: [styles.container, {
@@ -463,93 +861,64 @@ const AccountSettingsScreen = ({
463
861
  style: [styles.container, {
464
862
  backgroundColor: themeStyles.backgroundColor
465
863
  }],
466
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
467
- style: styles.header,
468
- children: editingField ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
469
- style: styles.editingHeader,
470
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
471
- style: styles.editingHeaderTop,
472
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
473
- style: styles.cancelButton,
474
- onPress: cancelEditing,
475
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
476
- name: "close",
477
- size: 24,
478
- color: "#666"
479
- })
480
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
481
- style: {
482
- transform: [{
483
- scale: saveButtonScale
484
- }]
485
- },
486
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
487
- style: [styles.saveHeaderButton, {
488
- opacity: isSaving ? 0.7 : 1,
489
- backgroundColor: editingField ? getFieldIcon(editingField).color : '#007AFF'
490
- }],
491
- onPress: () => saveField(editingField),
492
- disabled: isSaving,
493
- children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
494
- size: "small",
495
- color: "#fff"
496
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
497
- style: styles.saveButtonText,
498
- children: "Save"
499
- })
500
- })
501
- })]
502
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
503
- style: styles.editingHeaderBottom,
504
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
505
- style: styles.headerTitleWithIcon,
506
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
507
- name: getFieldIcon(editingField).name,
508
- size: 50,
509
- color: getFieldIcon(editingField).color,
510
- style: styles.headerIcon
511
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
512
- style: styles.headerTitleLarge,
513
- children: getFieldLabel(editingField)
514
- })]
515
- })
516
- })]
517
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
518
- style: styles.normalHeader,
864
+ children: [editingField ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
865
+ style: [styles.editingHeader, {
866
+ backgroundColor: '#FFFFFF',
867
+ borderBottomColor: themeStyles.isDarkTheme ? '#38383A' : '#E9ECEF'
868
+ }],
869
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
870
+ style: styles.editingHeaderContent,
519
871
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
520
- style: styles.cancelButton,
521
- onPress: onClose || goBack,
522
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
523
- name: "close",
524
- size: 24,
525
- color: "#666"
872
+ style: styles.editingBackButton,
873
+ onPress: cancelEditing,
874
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
875
+ name: "chevron-back",
876
+ size: 20,
877
+ color: themeStyles.primaryColor
526
878
  })
527
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
528
- style: styles.headerTitle,
529
- children: "Account Settings"
530
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
531
- style: {
532
- transform: [{
533
- scale: saveButtonScale
534
- }]
535
- },
536
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
537
- style: [styles.saveIconButton, {
538
- opacity: isSaving ? 0.7 : 1
539
- }],
540
- onPress: handleSave,
541
- disabled: isSaving,
542
- children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
543
- size: "small",
544
- color: themeStyles.primaryColor
545
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
546
- name: "checkmark",
547
- size: 24,
879
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
880
+ style: styles.editingTitleContainer
881
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
882
+ style: [styles.editingSaveButton, {
883
+ opacity: isSaving ? 0.5 : 1
884
+ }],
885
+ onPress: () => saveField(editingField),
886
+ disabled: isSaving,
887
+ children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
888
+ size: "small",
889
+ color: themeStyles.primaryColor
890
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
891
+ style: [styles.editingSaveButtonText, {
548
892
  color: themeStyles.primaryColor
549
- })
893
+ }],
894
+ children: "Save"
550
895
  })
551
896
  })]
552
- })
897
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
898
+ style: styles.editingHeaderBottom,
899
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
900
+ name: editingField === 'displayName' ? 'person' : editingField === 'username' ? 'at' : editingField === 'email' ? 'mail' : editingField === 'bio' ? 'document-text' : editingField === 'location' ? 'location' : editingField === 'links' ? 'link' : 'person',
901
+ size: 56,
902
+ color: editingField === 'displayName' ? '#007AFF' : editingField === 'username' ? '#5856D6' : editingField === 'email' ? '#FF9500' : editingField === 'bio' ? '#34C759' : editingField === 'location' ? '#FF3B30' : editingField === 'links' ? '#32D74B' : '#007AFF',
903
+ style: styles.editingBottomIcon
904
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
905
+ style: [styles.editingBottomTitle, {
906
+ color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
907
+ }],
908
+ children: editingField === 'displayName' ? 'Display Name' : editingField === 'username' ? 'Username' : editingField === 'email' ? 'Email' : editingField === 'bio' ? 'Bio' : editingField === 'location' ? 'Location' : editingField === 'links' ? 'Links' : 'Field'
909
+ })]
910
+ })]
911
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
912
+ title: "Edit Profile",
913
+ theme: theme,
914
+ onBack: goBack || onClose,
915
+ rightAction: {
916
+ icon: 'checkmark',
917
+ onPress: handleSave,
918
+ loading: isSaving,
919
+ disabled: isSaving
920
+ },
921
+ elevation: "subtle"
553
922
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
554
923
  style: editingField ? styles.contentEditing : styles.content,
555
924
  children: editingField ?
@@ -567,101 +936,162 @@ const AccountSettingsScreen = ({
567
936
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
568
937
  style: styles.sectionTitle,
569
938
  children: "Profile Picture"
570
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
571
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
572
- onPress: handleAvatarUpdate,
573
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
574
- style: styles.userIcon,
575
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
576
- uri: avatarUrl,
577
- name: displayName || username,
578
- size: 50,
579
- theme: theme
580
- })
581
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
582
- style: styles.settingInfo,
583
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
584
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
585
- style: styles.settingLabel,
586
- children: "Profile Photo"
587
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
588
- style: styles.settingDescription,
589
- children: avatarUrl ? 'Tap to change your profile picture' : 'Tap to add a profile picture'
590
- })]
591
- })
592
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
593
- name: "chevron-forward",
594
- size: 16,
595
- color: "#ccc"
596
- })]
939
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
940
+ items: [{
941
+ id: 'profile-photo',
942
+ icon: avatarUrl ? undefined : 'person',
943
+ iconColor: '#007AFF',
944
+ image: avatarUrl || undefined,
945
+ imageSize: 40,
946
+ title: 'Profile Photo',
947
+ subtitle: avatarUrl ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
948
+ onPress: handleAvatarUpdate
949
+ }],
950
+ theme: theme
597
951
  })]
598
952
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
599
953
  style: styles.section,
600
954
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
601
955
  style: styles.sectionTitle,
602
956
  children: "Basic Information"
603
- }), renderField('displayName', 'Display Name', [displayName, lastName].filter(Boolean).join(' '),
604
- // Show full name
605
- 'Add your display name', 'person', '#007AFF', false, 'default', true, false), renderField('username', 'Username', username, 'Choose a username', 'at', '#5856D6', false, 'default', false, false), renderField('email', 'Email', email, 'Add your email address', 'mail', '#FF9500', false, 'email-address', false, true)]
957
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
958
+ items: [{
959
+ id: 'display-name',
960
+ icon: 'person',
961
+ iconColor: '#007AFF',
962
+ title: 'Display Name',
963
+ subtitle: [displayName, lastName].filter(Boolean).join(' ') || 'Add your display name',
964
+ onPress: () => startEditing('displayName', '')
965
+ }, {
966
+ id: 'username',
967
+ icon: 'at',
968
+ iconColor: '#5856D6',
969
+ title: 'Username',
970
+ subtitle: username || 'Choose a username',
971
+ onPress: () => startEditing('username', username)
972
+ }, {
973
+ id: 'email',
974
+ icon: 'mail',
975
+ iconColor: '#FF9500',
976
+ title: 'Email',
977
+ subtitle: email || 'Add your email address',
978
+ onPress: () => startEditing('email', email)
979
+ }],
980
+ theme: theme
981
+ })]
606
982
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
607
983
  style: styles.section,
608
984
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
609
985
  style: styles.sectionTitle,
610
986
  children: "About You"
611
- }), renderField('bio', 'Bio', bio, 'Tell people about yourself', 'document-text', '#34C759', true, 'default', true, false), renderField('location', 'Location', location, 'Add your location', 'location', '#FF3B30', false, 'default', false, false), renderField('links', 'Links', links.join(', '), 'Add your links', 'link', '#32D74B', false, 'url', false, true)]
987
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
988
+ items: [{
989
+ id: 'bio',
990
+ icon: 'document-text',
991
+ iconColor: '#34C759',
992
+ title: 'Bio',
993
+ subtitle: bio || 'Tell people about yourself',
994
+ onPress: () => startEditing('bio', bio)
995
+ }, {
996
+ id: 'locations',
997
+ icon: 'location',
998
+ iconColor: '#FF3B30',
999
+ title: 'Locations',
1000
+ subtitle: tempLocations.length > 0 ? `${tempLocations.length} location${tempLocations.length !== 1 ? 's' : ''} added` : 'Add your locations',
1001
+ onPress: () => startEditing('location', ''),
1002
+ customContentBelow: tempLocations.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1003
+ style: styles.linksPreviewContainer,
1004
+ children: [tempLocations.slice(0, 2).map((location, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1005
+ style: styles.linkPreviewItem,
1006
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1007
+ style: styles.linkPreviewImage,
1008
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1009
+ style: styles.linkPreviewImageText,
1010
+ children: location.name.charAt(0).toUpperCase()
1011
+ })
1012
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1013
+ style: styles.linkPreviewContent,
1014
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1015
+ style: styles.linkPreviewTitle,
1016
+ numberOfLines: 1,
1017
+ children: location.name
1018
+ }), location.label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1019
+ style: styles.linkPreviewSubtitle,
1020
+ children: location.label
1021
+ })]
1022
+ })]
1023
+ }, location.id || index)), tempLocations.length > 2 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
1024
+ style: styles.linkPreviewMore,
1025
+ children: ["+", tempLocations.length - 2, " more"]
1026
+ })]
1027
+ })
1028
+ }, {
1029
+ id: 'links',
1030
+ icon: 'link',
1031
+ iconColor: '#32D74B',
1032
+ title: 'Links',
1033
+ subtitle: tempLinksWithMetadata.length > 0 ? `${tempLinksWithMetadata.length} link${tempLinksWithMetadata.length !== 1 ? 's' : ''} added` : 'Add your links',
1034
+ onPress: () => startEditing('links', ''),
1035
+ multiRow: true,
1036
+ customContentBelow: tempLinksWithMetadata.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1037
+ style: styles.linksPreviewContainer,
1038
+ children: [tempLinksWithMetadata.slice(0, 2).map((link, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1039
+ style: styles.linkPreviewItem,
1040
+ children: [link.image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
1041
+ source: {
1042
+ uri: link.image
1043
+ },
1044
+ style: styles.linkPreviewImage
1045
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1046
+ style: styles.linkPreviewImage,
1047
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1048
+ style: styles.linkPreviewImageText,
1049
+ children: link.title?.charAt(0).toUpperCase() || link.url.charAt(0).toUpperCase()
1050
+ })
1051
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1052
+ style: styles.linkPreviewTitle,
1053
+ numberOfLines: 1,
1054
+ children: link.title || link.url
1055
+ })]
1056
+ }, link.id || index)), tempLinksWithMetadata.length > 2 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
1057
+ style: styles.linkPreviewMore,
1058
+ children: ["+", tempLinksWithMetadata.length - 2, " more"]
1059
+ })]
1060
+ })
1061
+ }],
1062
+ theme: theme
1063
+ })]
612
1064
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
613
1065
  style: styles.section,
614
1066
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
615
1067
  style: styles.sectionTitle,
616
1068
  children: "Quick Actions"
617
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
618
- style: [styles.settingItem, styles.firstSettingItem],
619
- onPress: () => _sonner.toast.info('Privacy settings coming soon!'),
620
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
621
- style: styles.settingInfo,
622
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
623
- name: "shield-checkmark",
624
- size: 20,
625
- color: "#8E8E93",
626
- style: styles.settingIcon
627
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
628
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
629
- style: styles.settingLabel,
630
- children: "Privacy Settings"
631
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
632
- style: styles.settingDescription,
633
- children: "Control who can see your profile"
634
- })]
635
- })]
636
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
637
- name: "chevron-forward",
638
- size: 16,
639
- color: "#ccc"
640
- })]
641
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
642
- style: [styles.settingItem, styles.lastSettingItem],
643
- onPress: () => _sonner.toast.info('Account verification coming soon!'),
644
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
645
- style: styles.settingInfo,
646
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
647
- name: "checkmark-circle",
648
- size: 20,
649
- color: "#30D158",
650
- style: styles.settingIcon
651
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
652
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
653
- style: styles.settingLabel,
654
- children: "Verify Account"
655
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
656
- style: styles.settingDescription,
657
- children: "Get a verified badge"
658
- })]
659
- })]
660
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
661
- name: "chevron-forward",
662
- size: 16,
663
- color: "#ccc"
664
- })]
1069
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
1070
+ items: [{
1071
+ id: 'preview-profile',
1072
+ icon: 'eye',
1073
+ iconColor: '#007AFF',
1074
+ title: 'Preview Profile',
1075
+ subtitle: 'See how your profile looks to others',
1076
+ onPress: () => navigate?.('Profile', {
1077
+ userId: user?.id
1078
+ })
1079
+ }, {
1080
+ id: 'privacy-settings',
1081
+ icon: 'shield-checkmark',
1082
+ iconColor: '#8E8E93',
1083
+ title: 'Privacy Settings',
1084
+ subtitle: 'Control who can see your profile',
1085
+ onPress: () => _sonner.toast.info('Privacy settings coming soon!')
1086
+ }, {
1087
+ id: 'verify-account',
1088
+ icon: 'checkmark-circle',
1089
+ iconColor: '#30D158',
1090
+ title: 'Verify Account',
1091
+ subtitle: 'Get a verified badge',
1092
+ onPress: () => _sonner.toast.info('Account verification coming soon!')
1093
+ }],
1094
+ theme: theme
665
1095
  })]
666
1096
  })]
667
1097
  })
@@ -673,203 +1103,416 @@ const styles = _reactNative.StyleSheet.create({
673
1103
  flex: 1,
674
1104
  backgroundColor: '#f2f2f2'
675
1105
  },
676
- header: {
677
- paddingHorizontal: 20,
678
- paddingVertical: 10,
1106
+ content: {
1107
+ flex: 1,
1108
+ padding: 16
1109
+ },
1110
+ contentEditing: {
1111
+ flex: 1,
1112
+ padding: 0
1113
+ },
1114
+ section: {
1115
+ marginBottom: 24
1116
+ },
1117
+ sectionTitle: {
1118
+ fontSize: 16,
1119
+ fontWeight: '600',
1120
+ color: '#333',
1121
+ marginBottom: 12,
1122
+ fontFamily: _fonts.fontFamilies.phuduSemiBold
1123
+ },
1124
+ userIcon: {
1125
+ marginRight: 12
1126
+ },
1127
+ // Editing-only mode styles
1128
+ editingOnlyContainer: {
1129
+ flex: 1
1130
+ },
1131
+ editingFieldContainer: {
679
1132
  backgroundColor: '#fff',
680
- borderBottomWidth: 1,
681
- borderBottomColor: '#e0e0e0'
1133
+ padding: 16,
1134
+ flex: 1
1135
+ },
1136
+ editingFieldHeader: {
1137
+ marginBottom: 8,
1138
+ flexDirection: 'row',
1139
+ alignItems: 'center'
682
1140
  },
683
- normalHeader: {
1141
+ editingFieldTitleContainer: {
684
1142
  flexDirection: 'row',
685
- justifyContent: 'space-between',
686
1143
  alignItems: 'center'
687
1144
  },
1145
+ editingFieldIcon: {
1146
+ marginRight: 12
1147
+ },
1148
+ editingFieldTitle: {
1149
+ fontSize: 20,
1150
+ fontWeight: '600',
1151
+ color: '#000'
1152
+ },
1153
+ editingFieldContent: {
1154
+ flex: 1
1155
+ },
1156
+ newValueSection: {
1157
+ flex: 1
1158
+ },
1159
+ editingFieldLabel: {
1160
+ fontSize: 16,
1161
+ fontWeight: '600',
1162
+ color: '#333',
1163
+ marginBottom: 12,
1164
+ fontFamily: _fonts.fontFamilies.phuduSemiBold
1165
+ },
1166
+ editingFieldInput: {
1167
+ backgroundColor: '#fff',
1168
+ borderWidth: 2,
1169
+ borderColor: '#e0e0e0',
1170
+ borderRadius: 12,
1171
+ padding: 16,
1172
+ fontSize: 17,
1173
+ minHeight: 52,
1174
+ fontWeight: '400'
1175
+ },
1176
+ editingFieldTextArea: {
1177
+ backgroundColor: '#fff',
1178
+ borderWidth: 2,
1179
+ borderColor: '#e0e0e0',
1180
+ borderRadius: 12,
1181
+ padding: 16,
1182
+ fontSize: 17,
1183
+ minHeight: 120,
1184
+ textAlignVertical: 'top',
1185
+ fontWeight: '400'
1186
+ },
1187
+ // Custom editing header styles
688
1188
  editingHeader: {
689
- flexDirection: 'column'
1189
+ paddingTop: _reactNative.Platform.OS === 'ios' ? 50 : 16,
1190
+ paddingBottom: 0,
1191
+ borderBottomWidth: 1,
1192
+ backgroundColor: '#fff'
690
1193
  },
691
- editingHeaderTop: {
1194
+ editingHeaderContent: {
692
1195
  flexDirection: 'row',
693
- justifyContent: 'space-between',
694
1196
  alignItems: 'center',
695
- marginBottom: 16
1197
+ paddingHorizontal: 16,
1198
+ minHeight: 44
696
1199
  },
697
- editingHeaderBottom: {
698
- flexDirection: 'row',
1200
+ editingBackButton: {
1201
+ width: 32,
1202
+ height: 32,
1203
+ borderRadius: 16,
1204
+ backgroundColor: '#F8F9FA',
699
1205
  alignItems: 'center',
700
- justifyContent: 'flex-start'
701
- },
702
- headerTitle: {
703
- fontSize: 24,
704
- fontWeight: 'bold',
705
- color: '#000',
706
- fontFamily: _fonts.fontFamilies.phuduBold
1206
+ justifyContent: 'center',
1207
+ marginRight: 12
707
1208
  },
708
- headerTitleWithIcon: {
1209
+ editingTitleContainer: {
1210
+ flex: 1,
709
1211
  flexDirection: 'column',
710
1212
  alignItems: 'flex-start',
711
- flex: 1,
712
- justifyContent: 'flex-start',
713
- maxWidth: '90%'
1213
+ justifyContent: 'flex-end',
1214
+ paddingBottom: 8
714
1215
  },
715
- headerTitleLarge: {
716
- fontSize: 48,
717
- fontWeight: '800',
718
- color: '#000',
719
- fontFamily: _fonts.fontFamilies.phuduExtraBold,
720
- textAlign: 'left'
1216
+ editingTitleIcon: {
1217
+ marginBottom: 4,
1218
+ alignSelf: 'flex-start'
721
1219
  },
722
- headerIcon: {
723
- marginBottom: 2
724
- },
725
- cancelButton: {
726
- padding: 5
1220
+ editingTitle: {
1221
+ fontSize: 18,
1222
+ fontWeight: '700',
1223
+ fontFamily: _fonts.fontFamilies.phuduBold,
1224
+ letterSpacing: -0.3,
1225
+ lineHeight: 22,
1226
+ textAlign: 'left',
1227
+ alignSelf: 'flex-start'
727
1228
  },
728
- saveHeaderButton: {
1229
+ editingSaveButton: {
729
1230
  paddingHorizontal: 16,
730
1231
  paddingVertical: 8,
731
- borderRadius: 20,
1232
+ borderRadius: 18,
1233
+ backgroundColor: '#F8F9FA',
732
1234
  minWidth: 60,
733
1235
  alignItems: 'center',
734
1236
  justifyContent: 'center'
735
1237
  },
736
- saveIconButton: {
737
- padding: 5
738
- },
739
- saveButtonText: {
740
- color: '#fff',
1238
+ editingSaveButtonText: {
741
1239
  fontSize: 16,
742
1240
  fontWeight: '600',
743
1241
  fontFamily: _fonts.fontFamilies.phuduSemiBold
744
1242
  },
745
- content: {
746
- flex: 1,
747
- padding: 16
1243
+ editingHeaderBottom: {
1244
+ flexDirection: 'column',
1245
+ alignItems: 'flex-start',
1246
+ paddingHorizontal: 16,
1247
+ paddingBottom: 8,
1248
+ paddingTop: 8
748
1249
  },
749
- contentEditing: {
750
- flex: 1,
751
- padding: 0
1250
+ editingBottomIcon: {
1251
+ marginBottom: 8,
1252
+ alignSelf: 'flex-start'
752
1253
  },
753
- section: {
754
- marginBottom: 24
1254
+ editingBottomTitle: {
1255
+ fontSize: 32,
1256
+ fontWeight: '700',
1257
+ fontFamily: _fonts.fontFamilies.phuduBold,
1258
+ letterSpacing: -0.5,
1259
+ lineHeight: 36,
1260
+ textAlign: 'left',
1261
+ alignSelf: 'flex-start'
755
1262
  },
756
- sectionTitle: {
757
- fontSize: 16,
1263
+ // Links management styles
1264
+ addLinkSection: {
1265
+ marginBottom: 16,
1266
+ padding: 12,
1267
+ backgroundColor: '#F8F9FA',
1268
+ borderRadius: 8,
1269
+ borderWidth: 1,
1270
+ borderColor: '#E9ECEF'
1271
+ },
1272
+ addLinkLabel: {
1273
+ fontSize: 14,
758
1274
  fontWeight: '600',
759
1275
  color: '#333',
760
- marginBottom: 12,
761
- fontFamily: _fonts.fontFamilies.phuduSemiBold
1276
+ marginBottom: 8
1277
+ },
1278
+ addLinkInputContainer: {
1279
+ gap: 8
762
1280
  },
763
- settingItem: {
1281
+ addLinkInput: {
764
1282
  backgroundColor: '#fff',
765
- padding: 16,
1283
+ borderWidth: 1,
1284
+ borderColor: '#E9ECEF',
1285
+ borderRadius: 6,
1286
+ padding: 10,
1287
+ fontSize: 14,
1288
+ minHeight: 36
1289
+ },
1290
+ addLinkButtons: {
766
1291
  flexDirection: 'row',
1292
+ gap: 6
1293
+ },
1294
+ addLinkButton: {
1295
+ flex: 1,
1296
+ paddingVertical: 8,
1297
+ paddingHorizontal: 12,
1298
+ borderRadius: 6,
767
1299
  alignItems: 'center',
768
- justifyContent: 'space-between',
769
- marginBottom: 2
1300
+ justifyContent: 'center'
770
1301
  },
771
- firstSettingItem: {
772
- borderTopLeftRadius: 24,
773
- borderTopRightRadius: 24
1302
+ cancelButton: {
1303
+ backgroundColor: '#F8F9FA',
1304
+ borderWidth: 1,
1305
+ borderColor: '#E9ECEF'
774
1306
  },
775
- lastSettingItem: {
776
- borderBottomLeftRadius: 24,
777
- borderBottomRightRadius: 24,
778
- marginBottom: 8
1307
+ cancelButtonText: {
1308
+ fontSize: 14,
1309
+ fontWeight: '600',
1310
+ color: '#6C757D'
779
1311
  },
780
- settingInfo: {
1312
+ addButton: {
1313
+ backgroundColor: '#007AFF'
1314
+ },
1315
+ addButtonText: {
1316
+ fontSize: 14,
1317
+ fontWeight: '600',
1318
+ color: '#fff'
1319
+ },
1320
+ addLinkTrigger: {
781
1321
  flexDirection: 'row',
782
1322
  alignItems: 'center',
783
- flex: 1
1323
+ padding: 12,
1324
+ backgroundColor: '#F8F9FA',
1325
+ borderRadius: 8,
1326
+ borderWidth: 1,
1327
+ borderColor: '#E9ECEF',
1328
+ borderStyle: 'dashed',
1329
+ marginBottom: 16
784
1330
  },
785
- settingIcon: {
786
- marginRight: 12
1331
+ addLinkTriggerText: {
1332
+ fontSize: 14,
1333
+ fontWeight: '600',
1334
+ color: '#007AFF',
1335
+ marginLeft: 6
1336
+ },
1337
+ linksList: {
1338
+ gap: 8
787
1339
  },
788
- settingLabel: {
1340
+ linksListTitle: {
789
1341
  fontSize: 16,
790
- fontWeight: '500',
1342
+ fontWeight: '700',
791
1343
  color: '#333',
792
- marginBottom: 2
1344
+ marginBottom: 6
1345
+ },
1346
+ linkItem: {
1347
+ backgroundColor: '#fff',
1348
+ borderRadius: 8,
1349
+ borderWidth: 1,
1350
+ borderColor: '#E9ECEF',
1351
+ overflow: 'hidden'
1352
+ },
1353
+ linkItemContent: {
1354
+ flexDirection: 'row',
1355
+ padding: 12,
1356
+ alignItems: 'center'
1357
+ },
1358
+ linkItemDragHandle: {
1359
+ width: 24,
1360
+ height: 24,
1361
+ alignItems: 'center',
1362
+ justifyContent: 'center',
1363
+ marginRight: 8
793
1364
  },
794
- settingDescription: {
1365
+ linkItemInfo: {
1366
+ flex: 1,
1367
+ marginRight: 8
1368
+ },
1369
+ linkItemTitle: {
795
1370
  fontSize: 14,
796
- color: '#666'
1371
+ fontWeight: '600',
1372
+ color: '#333',
1373
+ marginBottom: 2
797
1374
  },
798
- userIcon: {
799
- marginRight: 12
1375
+ linkItemDescription: {
1376
+ fontSize: 12,
1377
+ color: '#666',
1378
+ marginBottom: 2
800
1379
  },
801
- // Inline editing styles
802
- editingContainer: {
803
- flex: 1
1380
+ linkItemUrl: {
1381
+ fontSize: 12,
1382
+ color: '#6C757D'
804
1383
  },
805
- editingActions: {
1384
+ linkItemActions: {
806
1385
  flexDirection: 'row',
1386
+ gap: 6
1387
+ },
1388
+ linkItemButton: {
1389
+ width: 28,
1390
+ height: 28,
1391
+ borderRadius: 14,
1392
+ backgroundColor: '#F8F9FA',
1393
+ alignItems: 'center',
1394
+ justifyContent: 'center'
1395
+ },
1396
+ linkItemDivider: {
1397
+ height: 1,
1398
+ backgroundColor: '#E9ECEF',
1399
+ marginHorizontal: 12
1400
+ },
1401
+ reorderHint: {
1402
+ padding: 8,
807
1403
  alignItems: 'center'
808
1404
  },
809
- editingButton: {
810
- padding: 8
1405
+ reorderHintText: {
1406
+ fontSize: 12,
1407
+ color: '#999',
1408
+ fontStyle: 'italic'
811
1409
  },
812
- editingButtonText: {
813
- fontSize: 16,
814
- fontWeight: '500'
1410
+ reorderButtons: {
1411
+ flexDirection: 'column',
1412
+ gap: 2
815
1413
  },
816
- inlineInput: {
817
- backgroundColor: '#f8f8f8',
1414
+ reorderButton: {
1415
+ width: 20,
1416
+ height: 16,
1417
+ borderRadius: 3,
1418
+ backgroundColor: '#F8F9FA',
1419
+ alignItems: 'center',
1420
+ justifyContent: 'center',
818
1421
  borderWidth: 1,
819
- borderColor: '#e0e0e0',
820
- borderRadius: 8,
821
- padding: 12,
822
- fontSize: 16,
823
- minHeight: 44
1422
+ borderColor: '#E9ECEF'
824
1423
  },
825
- inlineTextArea: {
826
- backgroundColor: '#f8f8f8',
827
- borderWidth: 1,
828
- borderColor: '#e0e0e0',
829
- borderRadius: 8,
830
- padding: 12,
831
- fontSize: 16,
832
- minHeight: 100,
833
- textAlignVertical: 'top'
1424
+ reorderButtonDisabled: {
1425
+ opacity: 0.3
834
1426
  },
835
- // Editing-only mode styles
836
- editingOnlyContainer: {
837
- flex: 1
1427
+ linkItemImage: {
1428
+ width: 32,
1429
+ height: 32,
1430
+ borderRadius: 16,
1431
+ backgroundColor: '#007AFF',
1432
+ alignItems: 'center',
1433
+ justifyContent: 'center',
1434
+ marginRight: 8
838
1435
  },
839
- editingFieldContainer: {
840
- backgroundColor: '#fff',
841
- padding: 16,
842
- flex: 1
1436
+ linkItemImageText: {
1437
+ fontSize: 12,
1438
+ fontWeight: '600',
1439
+ color: '#fff'
843
1440
  },
844
- editingFieldHeader: {
845
- marginBottom: 16
1441
+ fetchingText: {
1442
+ fontSize: 12,
1443
+ color: '#007AFF',
1444
+ fontStyle: 'italic'
846
1445
  },
847
- editingFieldTitleContainer: {
1446
+ linksFieldContent: {
1447
+ flex: 1,
1448
+ marginLeft: 12
1449
+ },
1450
+ linksPreview: {
1451
+ marginTop: 4,
1452
+ flexDirection: 'column'
1453
+ },
1454
+ linksPreviewContainer: {
1455
+ marginTop: 4,
1456
+ flexDirection: 'column',
1457
+ width: '100%'
1458
+ },
1459
+ linkPreviewItem: {
848
1460
  flexDirection: 'row',
849
- alignItems: 'center'
1461
+ alignItems: 'center',
1462
+ marginBottom: 4
850
1463
  },
851
- editingFieldIcon: {
852
- marginRight: 12
1464
+ linkPreviewImage: {
1465
+ width: 20,
1466
+ height: 20,
1467
+ borderRadius: 10,
1468
+ backgroundColor: '#007AFF',
1469
+ alignItems: 'center',
1470
+ justifyContent: 'center',
1471
+ marginRight: 6
853
1472
  },
854
- editingFieldTitle: {
855
- fontSize: 20,
1473
+ linkPreviewImageText: {
1474
+ fontSize: 10,
856
1475
  fontWeight: '600',
857
- color: '#000'
1476
+ color: '#fff'
858
1477
  },
859
- editingFieldContent: {
1478
+ linkPreviewTitle: {
1479
+ fontSize: 13,
1480
+ color: '#666',
860
1481
  flex: 1
861
1482
  },
862
- newValueSection: {
1483
+ linkPreviewContent: {
863
1484
  flex: 1
864
1485
  },
865
- editingFieldLabel: {
866
- fontSize: 16,
1486
+ linkPreviewSubtitle: {
1487
+ fontSize: 11,
1488
+ color: '#999',
1489
+ marginTop: 1
1490
+ },
1491
+ linkPreviewMore: {
1492
+ fontSize: 12,
1493
+ color: '#999',
1494
+ fontStyle: 'italic'
1495
+ },
1496
+ // Location management styles
1497
+ addLocationSection: {
1498
+ marginBottom: 16
1499
+ },
1500
+ addLocationLabel: {
1501
+ fontSize: 14,
867
1502
  fontWeight: '600',
868
1503
  color: '#333',
869
- marginBottom: 12,
1504
+ marginBottom: 8,
870
1505
  fontFamily: _fonts.fontFamilies.phuduSemiBold
871
1506
  },
872
- editingFieldInput: {
1507
+ searchingText: {
1508
+ fontSize: 12,
1509
+ color: '#007AFF',
1510
+ fontStyle: 'italic'
1511
+ },
1512
+ addLocationInputContainer: {
1513
+ marginBottom: 8
1514
+ },
1515
+ addLocationInput: {
873
1516
  backgroundColor: '#fff',
874
1517
  borderWidth: 2,
875
1518
  borderColor: '#e0e0e0',
@@ -877,18 +1520,129 @@ const styles = _reactNative.StyleSheet.create({
877
1520
  padding: 16,
878
1521
  fontSize: 17,
879
1522
  minHeight: 52,
880
- fontWeight: '400'
1523
+ fontWeight: '400',
1524
+ marginBottom: 8
881
1525
  },
882
- editingFieldTextArea: {
1526
+ addLocationButtons: {
1527
+ flexDirection: 'row',
1528
+ gap: 8
1529
+ },
1530
+ addLocationButton: {
1531
+ flex: 1,
1532
+ paddingVertical: 12,
1533
+ paddingHorizontal: 16,
1534
+ borderRadius: 8,
1535
+ alignItems: 'center',
1536
+ justifyContent: 'center'
1537
+ },
1538
+ addLocationTrigger: {
1539
+ flexDirection: 'row',
1540
+ alignItems: 'center',
1541
+ paddingVertical: 12,
1542
+ paddingHorizontal: 16,
1543
+ backgroundColor: '#F8F9FA',
1544
+ borderRadius: 8,
1545
+ marginBottom: 16
1546
+ },
1547
+ addLocationTriggerText: {
1548
+ marginLeft: 8,
1549
+ fontSize: 16,
1550
+ color: '#007AFF',
1551
+ fontWeight: '500'
1552
+ },
1553
+ searchResults: {
883
1554
  backgroundColor: '#fff',
884
- borderWidth: 2,
1555
+ borderWidth: 1,
885
1556
  borderColor: '#e0e0e0',
886
- borderRadius: 12,
887
- padding: 16,
888
- fontSize: 17,
889
- minHeight: 120,
890
- textAlignVertical: 'top',
891
- fontWeight: '400'
1557
+ borderRadius: 8,
1558
+ maxHeight: 200
1559
+ },
1560
+ searchResultItem: {
1561
+ padding: 12,
1562
+ borderBottomWidth: 1,
1563
+ borderBottomColor: '#f0f0f0'
1564
+ },
1565
+ searchResultName: {
1566
+ fontSize: 14,
1567
+ fontWeight: '500',
1568
+ color: '#333',
1569
+ marginBottom: 2
1570
+ },
1571
+ searchResultType: {
1572
+ fontSize: 12,
1573
+ color: '#666',
1574
+ textTransform: 'capitalize'
1575
+ },
1576
+ locationsList: {
1577
+ marginTop: 8
1578
+ },
1579
+ locationsListTitle: {
1580
+ fontSize: 14,
1581
+ fontWeight: '600',
1582
+ color: '#333',
1583
+ marginBottom: 12,
1584
+ fontFamily: _fonts.fontFamilies.phuduSemiBold
1585
+ },
1586
+ locationItem: {
1587
+ marginBottom: 8
1588
+ },
1589
+ locationItemContent: {
1590
+ flexDirection: 'row',
1591
+ alignItems: 'center',
1592
+ padding: 12,
1593
+ backgroundColor: '#F8F9FA',
1594
+ borderRadius: 8
1595
+ },
1596
+ locationItemDragHandle: {
1597
+ marginRight: 12
1598
+ },
1599
+ locationItemInfo: {
1600
+ flex: 1
1601
+ },
1602
+ locationItemHeader: {
1603
+ flexDirection: 'row',
1604
+ alignItems: 'center',
1605
+ marginBottom: 4
1606
+ },
1607
+ locationItemName: {
1608
+ fontSize: 14,
1609
+ fontWeight: '500',
1610
+ color: '#333',
1611
+ flex: 1
1612
+ },
1613
+ locationLabel: {
1614
+ backgroundColor: '#007AFF',
1615
+ paddingHorizontal: 6,
1616
+ paddingVertical: 2,
1617
+ borderRadius: 4,
1618
+ marginLeft: 8
1619
+ },
1620
+ locationLabelText: {
1621
+ fontSize: 10,
1622
+ fontWeight: '600',
1623
+ color: '#fff',
1624
+ textTransform: 'uppercase'
1625
+ },
1626
+ locationCoordinates: {
1627
+ fontSize: 12,
1628
+ color: '#666',
1629
+ fontFamily: 'monospace'
1630
+ },
1631
+ locationItemActions: {
1632
+ marginLeft: 8
1633
+ },
1634
+ locationItemButton: {
1635
+ width: 28,
1636
+ height: 28,
1637
+ borderRadius: 14,
1638
+ backgroundColor: '#F8F9FA',
1639
+ alignItems: 'center',
1640
+ justifyContent: 'center'
1641
+ },
1642
+ locationItemDivider: {
1643
+ height: 1,
1644
+ backgroundColor: '#E9ECEF',
1645
+ marginHorizontal: 12
892
1646
  }
893
1647
  });
894
1648
  var _default = exports.default = /*#__PURE__*/_react.default.memo(AccountSettingsScreen);