@oxyhq/services 5.4.3 → 5.4.4

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 (189) hide show
  1. package/README.md +14 -0
  2. package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
  3. package/lib/commonjs/assets/icons/OxyServices.js +1 -1
  4. package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
  5. package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
  6. package/lib/commonjs/core/index.js +2 -2
  7. package/lib/commonjs/index.js +22 -22
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/node/createAuth.js +95 -0
  10. package/lib/commonjs/node/createAuth.js.map +1 -0
  11. package/lib/commonjs/node/index.js +15 -6
  12. package/lib/commonjs/node/index.js.map +1 -1
  13. package/lib/commonjs/package.json +1 -0
  14. package/lib/commonjs/ui/components/Avatar.js +3 -3
  15. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  16. package/lib/commonjs/ui/components/FollowButton.js +3 -3
  17. package/lib/commonjs/ui/components/GroupedSection.js +1 -1
  18. package/lib/commonjs/ui/components/OxyLogo.js +1 -1
  19. package/lib/commonjs/ui/components/OxyProvider.js +146 -141
  20. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  21. package/lib/commonjs/ui/components/OxySignInButton.js +2 -2
  22. package/lib/commonjs/ui/components/ProfileCard.js +2 -2
  23. package/lib/commonjs/ui/components/Section.js +1 -1
  24. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  25. package/lib/commonjs/ui/components/icon/index.js +1 -1
  26. package/lib/commonjs/ui/components/index.js +12 -12
  27. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
  28. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
  29. package/lib/commonjs/ui/components/internal/TextField.js +576 -0
  30. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
  31. package/lib/commonjs/ui/context/OxyContext.js +1 -1
  32. package/lib/commonjs/ui/index.js +19 -11
  33. package/lib/commonjs/ui/index.js.map +1 -1
  34. package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
  35. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  36. package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -18
  37. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  39. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -4
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +5 -5
  42. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
  43. package/lib/commonjs/ui/screens/AppInfoScreen.js +6 -6
  44. package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
  45. package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
  46. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
  47. package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
  48. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  49. package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
  50. package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
  51. package/lib/commonjs/ui/screens/SignInScreen.js +182 -304
  52. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
  54. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
  56. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  57. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
  58. package/lib/commonjs/ui/store/index.js +52 -0
  59. package/lib/commonjs/ui/store/index.js.map +1 -0
  60. package/lib/commonjs/ui/styles/index.js +2 -2
  61. package/lib/commonjs/ui/styles/theme.js +1 -1
  62. package/lib/commonjs/utils/index.js +1 -1
  63. package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
  64. package/lib/module/assets/icons/OxyServices.js +1 -1
  65. package/lib/module/assets/icons/OxyServices.js.map +1 -1
  66. package/lib/module/assets/illustrations/HighFive.js +55 -0
  67. package/lib/module/assets/illustrations/HighFive.js.map +1 -0
  68. package/lib/module/core/index.js +2 -2
  69. package/lib/module/core/index.js.map +1 -1
  70. package/lib/module/index.js +10 -10
  71. package/lib/module/index.js.map +1 -1
  72. package/lib/module/node/createAuth.js +90 -0
  73. package/lib/module/node/createAuth.js.map +1 -0
  74. package/lib/module/node/index.js +8 -4
  75. package/lib/module/node/index.js.map +1 -1
  76. package/lib/module/package.json +1 -0
  77. package/lib/module/ui/components/Avatar.js +2 -2
  78. package/lib/module/ui/components/Avatar.js.map +1 -1
  79. package/lib/module/ui/components/FollowButton.js +3 -3
  80. package/lib/module/ui/components/FollowButton.js.map +1 -1
  81. package/lib/module/ui/components/GroupedSection.js +1 -1
  82. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  83. package/lib/module/ui/components/OxyLogo.js +1 -1
  84. package/lib/module/ui/components/OxyLogo.js.map +1 -1
  85. package/lib/module/ui/components/OxyProvider.js +143 -138
  86. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  87. package/lib/module/ui/components/OxySignInButton.js +2 -2
  88. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  89. package/lib/module/ui/components/ProfileCard.js +2 -2
  90. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  91. package/lib/module/ui/components/Section.js +1 -1
  92. package/lib/module/ui/components/Section.js.map +1 -1
  93. package/lib/module/ui/components/SectionTitle.js +1 -1
  94. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  95. package/lib/module/ui/components/icon/index.js +1 -1
  96. package/lib/module/ui/components/icon/index.js.map +1 -1
  97. package/lib/module/ui/components/index.js +12 -12
  98. package/lib/module/ui/components/index.js.map +1 -1
  99. package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
  100. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
  101. package/lib/module/ui/components/internal/TextField.js +571 -0
  102. package/lib/module/ui/components/internal/TextField.js.map +1 -0
  103. package/lib/module/ui/context/OxyContext.js +1 -1
  104. package/lib/module/ui/context/OxyContext.js.map +1 -1
  105. package/lib/module/ui/index.js +12 -10
  106. package/lib/module/ui/index.js.map +1 -1
  107. package/lib/module/ui/navigation/OxyRouter.js +23 -18
  108. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  109. package/lib/module/ui/screens/AccountCenterScreen.js +5 -5
  110. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  111. package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
  112. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  113. package/lib/module/ui/screens/AccountOverviewScreen.js +4 -4
  114. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  115. package/lib/module/ui/screens/AccountSettingsScreen.js +5 -5
  116. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  117. package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
  118. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  119. package/lib/module/ui/screens/AppInfoScreen.js +6 -6
  120. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  121. package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
  122. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
  123. package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
  124. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
  125. package/lib/module/ui/screens/FileManagementScreen.js +3 -3
  126. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  127. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  128. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  129. package/lib/module/ui/screens/ProfileScreen.js +2 -2
  130. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  131. package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
  132. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  133. package/lib/module/ui/screens/SignInScreen.js +182 -304
  134. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  135. package/lib/module/ui/screens/SignUpScreen.js +810 -712
  136. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  137. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
  138. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  139. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  140. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  141. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  142. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  143. package/lib/module/ui/store/index.js +44 -0
  144. package/lib/module/ui/store/index.js.map +1 -0
  145. package/lib/module/ui/styles/index.js +2 -2
  146. package/lib/module/ui/styles/index.js.map +1 -1
  147. package/lib/module/ui/styles/theme.js +1 -1
  148. package/lib/module/ui/styles/theme.js.map +1 -1
  149. package/lib/module/utils/index.js +1 -1
  150. package/lib/module/utils/index.js.map +1 -1
  151. package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
  152. package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
  153. package/lib/typescript/node/createAuth.d.ts +7 -0
  154. package/lib/typescript/node/createAuth.d.ts.map +1 -0
  155. package/lib/typescript/node/index.d.ts +2 -0
  156. package/lib/typescript/node/index.d.ts.map +1 -1
  157. package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
  158. package/lib/typescript/types/express.d.ts +5 -0
  159. package/lib/typescript/types/react-redux.d.ts +5 -0
  160. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  161. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
  162. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
  163. package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
  164. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
  165. package/lib/typescript/ui/index.d.ts +2 -0
  166. package/lib/typescript/ui/index.d.ts.map +1 -1
  167. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  168. package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
  169. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
  170. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  171. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  172. package/lib/typescript/ui/store/index.d.ts +19 -0
  173. package/lib/typescript/ui/store/index.d.ts.map +1 -0
  174. package/package.json +10 -25
  175. package/src/assets/illustrations/HighFive.tsx +41 -0
  176. package/src/node/createAuth.ts +116 -0
  177. package/src/node/index.ts +4 -0
  178. package/src/types/expo-vector-icons.d.ts +3 -0
  179. package/src/types/express.d.ts +5 -0
  180. package/src/types/react-redux.d.ts +5 -0
  181. package/src/ui/components/OxyProvider.tsx +136 -135
  182. package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
  183. package/src/ui/components/internal/TextField.tsx +694 -0
  184. package/src/ui/index.ts +6 -2
  185. package/src/ui/navigation/OxyRouter.tsx +8 -3
  186. package/src/ui/screens/FeedbackScreen.tsx +1042 -0
  187. package/src/ui/screens/SignInScreen.tsx +179 -222
  188. package/src/ui/screens/SignUpScreen.tsx +772 -608
  189. package/src/ui/store/index.ts +51 -0
@@ -6,18 +6,21 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _OxyContext = require("../context/OxyContext.js");
10
- var _index = require("../styles/index.js");
11
- var _Avatar = _interopRequireDefault(require("../components/Avatar.js"));
9
+ var _OxyContext = require("../context/OxyContext");
10
+ var _styles = require("../styles");
11
+ var _Avatar = _interopRequireDefault(require("../components/Avatar"));
12
12
  var _vectorIcons = require("@expo/vector-icons");
13
- var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
14
- var _sonner = require("../../lib/sonner.js");
13
+ var _HighFive = _interopRequireDefault(require("../../assets/illustrations/HighFive"));
14
+ var _sonner = require("../../lib/sonner");
15
+ var _GroupedPillButtons = _interopRequireDefault(require("../components/internal/GroupedPillButtons"));
16
+ var _TextField = _interopRequireDefault(require("../components/internal/TextField"));
15
17
  var _jsxRuntime = require("react/jsx-runtime");
16
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
19
  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); }
18
20
  const SignInScreen = ({
19
21
  navigate,
20
22
  goBack,
23
+ onAuthenticated,
21
24
  theme
22
25
  }) => {
23
26
  // Form data states
@@ -49,8 +52,8 @@ const SignInScreen = ({
49
52
  sessions,
50
53
  oxyServices
51
54
  } = (0, _OxyContext.useOxy)();
52
- const colors = (0, _index.useThemeColors)(theme);
53
- const commonStyles = (0, _index.createCommonStyles)(theme);
55
+ const colors = (0, _styles.useThemeColors)(theme);
56
+ const commonStyles = (0, _styles.createCommonStyles)(theme);
54
57
 
55
58
  // Check if this should be treated as "Add Account" mode
56
59
  const isAddAccountMode = (0, _react.useMemo)(() => user && isAuthenticated && sessions && sessions.length > 0, [user, isAuthenticated, sessions]);
@@ -272,42 +275,39 @@ const SignInScreen = ({
272
275
  animateTransition(currentStep - 1);
273
276
  }
274
277
  }, [currentStep, progressAnim, animateTransition]);
275
- const handleUsernameNext = (0, _react.useCallback)(() => {
278
+
279
+ // Custom next handlers for validation
280
+ const handleUsernameContinue = (0, _react.useCallback)(() => {
276
281
  if (!username) {
277
- _sonner.toast.error('Please enter your username');
282
+ _sonner.toast.error('Please enter your username.');
278
283
  return;
279
284
  }
280
- if (validationStatus === 'invalid') {
281
- // Don't show toast if we already have an error message displayed
282
- if (!errorMessage) {
283
- _sonner.toast.error('Please enter a valid username');
284
- }
285
+ if (validationStatus !== 'valid' || !userProfile) {
286
+ _sonner.toast.error('Please enter a valid username.');
285
287
  return;
286
288
  }
287
- if (validationStatus === 'validating') {
288
- _sonner.toast.error('Please wait while we validate your username');
289
+ setErrorMessage('');
290
+ nextStep();
291
+ }, [username, validationStatus, userProfile, setErrorMessage, nextStep]);
292
+ const handleSignIn = (0, _react.useCallback)(async () => {
293
+ if (!password) {
294
+ _sonner.toast.error('Please enter your password.');
289
295
  return;
290
296
  }
291
- if (validationStatus === 'valid' && userProfile) {
292
- setErrorMessage('');
293
- nextStep();
294
- } else {
295
- _sonner.toast.error('Please enter a valid username');
296
- }
297
- }, [username, validationStatus, userProfile, errorMessage, nextStep]);
298
- const handleLogin = (0, _react.useCallback)(async () => {
299
- if (!username || !password) {
300
- _sonner.toast.error('Please enter both username and password');
297
+ if (!username || !userProfile) {
298
+ _sonner.toast.error('Please enter a valid username first.');
301
299
  return;
302
300
  }
303
301
  try {
304
302
  setErrorMessage('');
305
- await login(username, password);
306
- // The authentication state change will be handled through context
303
+ const user = await login(username, password);
304
+ if (onAuthenticated) {
305
+ onAuthenticated(user);
306
+ }
307
307
  } catch (error) {
308
308
  _sonner.toast.error(error.message || 'Login failed');
309
309
  }
310
- }, [username, password, login]);
310
+ }, [username, password, login, onAuthenticated, setErrorMessage, userProfile]);
311
311
 
312
312
  // Memoized step components
313
313
  const renderUsernameStep = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
@@ -319,109 +319,16 @@ const SignInScreen = ({
319
319
  scale: scaleAnim
320
320
  }]
321
321
  }],
322
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
323
- style: styles.modernImageContainer,
324
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.default, {
325
- width: 280,
326
- height: 160,
327
- viewBox: "0 0 280 160",
328
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.Defs, {
329
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
330
- id: "primaryGradient",
331
- x1: "0%",
332
- y1: "0%",
333
- x2: "100%",
334
- y2: "100%",
335
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
336
- offset: "0%",
337
- stopColor: colors.primary,
338
- stopOpacity: "0.8"
339
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
340
- offset: "100%",
341
- stopColor: colors.primary,
342
- stopOpacity: "0.2"
343
- })]
344
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
345
- id: "secondaryGradient",
346
- x1: "0%",
347
- y1: "0%",
348
- x2: "100%",
349
- y2: "100%",
350
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
351
- offset: "0%",
352
- stopColor: colors.primary,
353
- stopOpacity: "0.1"
354
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
355
- offset: "100%",
356
- stopColor: colors.primary,
357
- stopOpacity: "0.3"
358
- })]
359
- })]
360
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
361
- cx: "80",
362
- cy: "80",
363
- r: "45",
364
- fill: "url(#primaryGradient)"
365
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
366
- cx: "200",
367
- cy: "80",
368
- r: "35",
369
- fill: "url(#secondaryGradient)"
370
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
371
- d: "M40 120 Q80 40 140 80 Q200 120 240 60",
372
- stroke: colors.primary,
373
- strokeWidth: "4",
374
- fill: "none",
375
- strokeLinecap: "round"
376
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
377
- cx: "60",
378
- cy: "50",
379
- r: "8",
380
- fill: colors.primary,
381
- opacity: "0.6"
382
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
383
- cx: "220",
384
- cy: "120",
385
- r: "6",
386
- fill: colors.primary,
387
- opacity: "0.4"
388
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
389
- cx: "250",
390
- cy: "40",
391
- r: "4",
392
- fill: colors.primary,
393
- opacity: "0.8"
394
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
395
- cx: "140",
396
- cy: "80",
397
- r: "25",
398
- fill: colors.background,
399
- opacity: "0.9"
400
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
401
- cx: "135",
402
- cy: "75",
403
- r: "3",
404
- fill: colors.primary
405
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
406
- cx: "145",
407
- cy: "75",
408
- r: "3",
409
- fill: colors.primary
410
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
411
- d: "M132 85 Q140 92 148 85",
412
- stroke: colors.primary,
413
- strokeWidth: "2",
414
- fill: "none",
415
- strokeLinecap: "round"
416
- })]
417
- })
322
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HighFive.default, {
323
+ width: 100,
324
+ height: 100
418
325
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
419
326
  style: styles.modernHeader,
420
327
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
421
328
  style: [styles.modernTitle, {
422
329
  color: colors.text
423
330
  }],
424
- children: isAddAccountMode ? 'Add Account' : 'Welcome Back'
331
+ children: isAddAccountMode ? 'Add Another Account' : 'Sign In'
425
332
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
426
333
  style: [styles.modernSubtitle, {
427
334
  color: colors.secondaryText
@@ -461,118 +368,129 @@ const SignInScreen = ({
461
368
  }],
462
369
  children: errorMessage
463
370
  })]
464
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
371
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
465
372
  style: [styles.modernInputContainer, {
466
373
  transform: [{
467
374
  scale: inputScaleAnim
468
375
  }]
469
376
  }],
470
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
471
- style: [styles.inputWrapper, {
472
- borderColor: validationStatus === 'valid' ? colors.success : validationStatus === 'invalid' ? colors.error : isInputFocused ? colors.primary : colors.border
473
- }],
474
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
475
- name: "person-outline",
476
- size: 20,
477
- color: isInputFocused ? colors.primary : colors.secondaryText,
478
- style: styles.inputIcon
479
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
480
- style: [styles.modernInput, {
481
- color: colors.text
482
- }],
483
- placeholder: "Enter your username",
484
- placeholderTextColor: colors.placeholder,
485
- value: username,
486
- onChangeText: handleUsernameChange,
487
- onFocus: handleInputFocus,
488
- onBlur: handleInputBlur,
489
- autoCapitalize: "none",
490
- testID: "username-input"
491
- }), validationStatus === 'validating' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
492
- size: "small",
493
- color: colors.primary,
494
- style: styles.validationIndicator
495
- }), validationStatus === 'valid' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
496
- name: "checkmark-circle",
497
- size: 20,
498
- color: colors.success,
499
- style: styles.validationIndicator
500
- }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
501
- name: "close-circle",
502
- size: 20,
503
- color: colors.error,
504
- style: styles.validationIndicator
505
- })]
506
- }), validationStatus === 'valid' && userProfile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
507
- style: [styles.validationSuccessCard, {
508
- backgroundColor: colors.success + '15'
509
- }],
510
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
377
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
378
+ label: "Username",
379
+ icon: "person-outline",
380
+ value: username,
381
+ onChangeText: handleUsernameChange,
382
+ onFocus: handleInputFocus,
383
+ onBlur: handleInputBlur,
384
+ autoCapitalize: "none",
385
+ autoCorrect: false,
386
+ testID: "username-input",
387
+ colors: colors,
388
+ variant: "filled",
389
+ error: validationStatus === 'invalid' && username.length >= 3 ? 'Username not found' : undefined,
390
+ loading: validationStatus === 'validating',
391
+ success: validationStatus === 'valid'
392
+ })
393
+ }), validationStatus === 'valid' && userProfile && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
394
+ style: [styles.validationSuccessCard, {
395
+ backgroundColor: colors.success + '10',
396
+ borderWidth: 1,
397
+ borderColor: colors.success + '30',
398
+ padding: 16
399
+ }],
400
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
401
+ style: {
402
+ width: 32,
403
+ height: 32,
404
+ borderRadius: 16,
405
+ backgroundColor: colors.success + '20',
406
+ justifyContent: 'center',
407
+ alignItems: 'center',
408
+ marginRight: 12
409
+ },
410
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
511
411
  name: "checkmark-circle",
512
412
  size: 16,
513
413
  color: colors.success
514
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
414
+ })
415
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
416
+ style: {
417
+ flex: 1
418
+ },
419
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
515
420
  style: [styles.validationText, {
516
- color: colors.success
421
+ color: colors.success,
422
+ fontWeight: '600',
423
+ marginBottom: 2
517
424
  }],
518
- children: ["Found user: ", userProfile.displayName]
425
+ children: ["Welcome back, ", userProfile?.displayName || userProfile?.name || username, "!"]
426
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
427
+ style: [styles.validationText, {
428
+ color: colors.secondaryText,
429
+ fontSize: 11,
430
+ opacity: 0.8
431
+ }],
432
+ children: "Ready to continue where you left off"
519
433
  })]
520
- }), validationStatus === 'invalid' && username.length >= 3 && !errorMessage && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
521
- style: [styles.validationErrorCard, {
522
- backgroundColor: colors.error + '15'
523
- }],
524
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
434
+ })]
435
+ }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
436
+ style: [styles.validationErrorCard, {
437
+ backgroundColor: colors.error + '10',
438
+ borderWidth: 1,
439
+ borderColor: colors.error + '30',
440
+ padding: 16
441
+ }],
442
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
443
+ style: {
444
+ width: 32,
445
+ height: 32,
446
+ borderRadius: 16,
447
+ backgroundColor: colors.error + '20',
448
+ justifyContent: 'center',
449
+ alignItems: 'center',
450
+ marginRight: 12
451
+ },
452
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
525
453
  name: "alert-circle",
526
454
  size: 16,
527
455
  color: colors.error
528
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
456
+ })
457
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
458
+ style: {
459
+ flex: 1
460
+ },
461
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
529
462
  style: [styles.validationText, {
530
- color: colors.error
463
+ color: colors.error,
464
+ fontWeight: '600',
465
+ marginBottom: 2
531
466
  }],
532
467
  children: "Username not found"
468
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
469
+ style: [styles.validationText, {
470
+ color: colors.secondaryText,
471
+ fontSize: 11,
472
+ opacity: 0.8
473
+ }],
474
+ children: "Check spelling or sign up"
533
475
  })]
534
476
  })]
535
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
536
- style: [styles.modernButton, {
537
- backgroundColor: colors.primary,
538
- opacity: !username || validationStatus !== 'valid' ? 0.5 : 1,
539
- shadowColor: colors.primary
540
- }],
541
- onPress: handleUsernameNext,
542
- disabled: !username || validationStatus !== 'valid' || isValidating,
543
- testID: "username-next-button",
544
- children: isValidating ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
545
- color: "#FFFFFF",
546
- size: "small"
547
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
548
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
549
- style: styles.modernButtonText,
550
- children: "Continue"
551
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
552
- name: "arrow-forward",
553
- size: 20,
554
- color: "#FFFFFF",
555
- style: styles.buttonIcon
556
- })]
557
- })
558
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
559
- style: styles.footerTextContainer,
560
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
561
- style: [styles.footerText, {
562
- color: colors.secondaryText
563
- }],
564
- children: ["Don't have an account?", ' ']
565
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
477
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedPillButtons.default, {
478
+ buttons: [{
479
+ text: 'Sign Up',
566
480
  onPress: () => navigate('SignUp'),
567
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
568
- style: [styles.modernLinkText, {
569
- color: colors.primary
570
- }],
571
- children: "Sign Up"
572
- })
573
- })]
481
+ icon: 'person-add',
482
+ variant: 'transparent'
483
+ }, {
484
+ text: 'Continue',
485
+ onPress: handleUsernameContinue,
486
+ icon: 'arrow-forward',
487
+ variant: 'primary',
488
+ loading: isValidating,
489
+ testID: 'username-next-button'
490
+ }],
491
+ colors: colors
574
492
  })]
575
- }), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameNext, navigate, styles]);
493
+ }), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameContinue, navigate, styles]);
576
494
  const renderPasswordStep = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
577
495
  style: [styles.stepContainer, {
578
496
  opacity: fadeAnim,
@@ -646,79 +564,36 @@ const SignInScreen = ({
646
564
  scale: inputScaleAnim
647
565
  }]
648
566
  }],
649
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
650
- style: [styles.inputWrapper, {
651
- borderColor: isInputFocused ? colors.primary : colors.border
652
- }],
653
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
654
- name: "lock-closed-outline",
655
- size: 20,
656
- color: isInputFocused ? colors.primary : colors.secondaryText,
657
- style: styles.inputIcon
658
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
659
- style: [styles.modernInput, {
660
- color: colors.text
661
- }],
662
- placeholder: "Enter your password",
663
- placeholderTextColor: colors.placeholder,
664
- value: password,
665
- onChangeText: handlePasswordChange,
666
- onFocus: handleInputFocus,
667
- onBlur: handleInputBlur,
668
- secureTextEntry: !showPassword,
669
- autoCapitalize: "none",
670
- testID: "password-input"
671
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
672
- style: styles.passwordToggle,
673
- onPress: () => setShowPassword(!showPassword),
674
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
675
- name: showPassword ? "eye-off" : "eye",
676
- size: 20,
677
- color: colors.secondaryText
678
- })
679
- })]
567
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
568
+ label: "Password",
569
+ icon: "lock-closed-outline",
570
+ value: password,
571
+ onChangeText: handlePasswordChange,
572
+ onFocus: handleInputFocus,
573
+ onBlur: handleInputBlur,
574
+ secureTextEntry: !showPassword,
575
+ autoCapitalize: "none",
576
+ autoCorrect: false,
577
+ testID: "password-input",
578
+ colors: colors,
579
+ variant: "filled",
580
+ error: errorMessage
680
581
  })
681
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
682
- style: [styles.modernButton, {
683
- backgroundColor: colors.primary,
684
- opacity: !password ? 0.5 : 1,
685
- shadowColor: colors.primary
686
- }],
687
- onPress: handleLogin,
688
- disabled: !password || isLoading,
689
- testID: "login-button",
690
- children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
691
- color: "#FFFFFF",
692
- size: "small"
693
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
694
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
695
- style: styles.modernButtonText,
696
- children: "Sign In"
697
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
698
- name: "log-in",
699
- size: 20,
700
- color: "#FFFFFF",
701
- style: styles.buttonIcon
702
- })]
703
- })
704
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
705
- style: styles.modernNavigationButtons,
706
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
707
- style: [styles.modernBackButton, {
708
- borderColor: colors.border
709
- }],
582
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedPillButtons.default, {
583
+ buttons: [{
584
+ text: 'Back',
710
585
  onPress: prevStep,
711
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
712
- name: "arrow-back",
713
- size: 18,
714
- color: colors.text
715
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
716
- style: [styles.modernBackButtonText, {
717
- color: colors.text
718
- }],
719
- children: "Back"
720
- })]
721
- })
586
+ icon: 'arrow-back',
587
+ variant: 'transparent'
588
+ }, {
589
+ text: 'Sign In',
590
+ onPress: handleSignIn,
591
+ icon: 'log-in',
592
+ variant: 'primary',
593
+ loading: isLoading,
594
+ testID: 'login-button'
595
+ }],
596
+ colors: colors
722
597
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
723
598
  style: styles.securityNotice,
724
599
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
@@ -732,7 +607,7 @@ const SignInScreen = ({
732
607
  children: "Your data is encrypted and secure"
733
608
  })]
734
609
  })]
735
- }), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleLogin, isLoading, prevStep, styles]);
610
+ }), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleSignIn, isLoading, prevStep, styles]);
736
611
  const renderCurrentStep = (0, _react.useCallback)(() => {
737
612
  switch (currentStep) {
738
613
  case 0:
@@ -768,30 +643,25 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
768
643
  scrollContent: {
769
644
  flexGrow: 1,
770
645
  paddingHorizontal: 24,
771
- paddingTop: 40,
772
- paddingBottom: 40
646
+ paddingTop: 4,
647
+ paddingBottom: 20
773
648
  },
774
649
  stepContainer: {
775
650
  flex: 1,
776
- justifyContent: 'center',
777
- alignItems: 'center',
778
- minHeight: 600
779
- },
780
- modernImageContainer: {
781
- alignItems: 'center',
782
- marginBottom: 40
651
+ justifyContent: 'flex-start',
652
+ alignItems: 'flex-start'
783
653
  },
784
654
  modernHeader: {
785
655
  alignItems: 'flex-start',
786
656
  width: '100%',
787
- marginBottom: 32
657
+ marginBottom: 24
788
658
  },
789
659
  modernTitle: {
790
660
  fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
791
661
  fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
792
- fontSize: 42,
662
+ fontSize: 62,
793
663
  lineHeight: 48,
794
- marginBottom: 12,
664
+ marginBottom: 18,
795
665
  textAlign: 'left',
796
666
  letterSpacing: -1
797
667
  },
@@ -902,6 +772,12 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
902
772
  buttonIcon: {
903
773
  marginLeft: 4
904
774
  },
775
+ // Enhanced Label Styles
776
+ modernLabel: {
777
+ fontSize: 12,
778
+ fontWeight: '500',
779
+ marginBottom: 2
780
+ },
905
781
  modernLinkText: {
906
782
  fontSize: 14,
907
783
  lineHeight: 20,
@@ -911,7 +787,7 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
911
787
  footerTextContainer: {
912
788
  flexDirection: 'row',
913
789
  justifyContent: 'center',
914
- marginTop: 28
790
+ marginTop: 16
915
791
  },
916
792
  footerText: {
917
793
  fontSize: 15
@@ -971,8 +847,10 @@ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
971
847
  modernNavigationButtons: {
972
848
  flexDirection: 'row',
973
849
  justifyContent: 'center',
974
- marginTop: 24,
975
- marginBottom: 16
850
+ marginTop: 16,
851
+ marginBottom: 8,
852
+ width: '100%',
853
+ gap: 8
976
854
  },
977
855
  modernBackButton: {
978
856
  flexDirection: 'row',