@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
@@ -1,17 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
4
- import { View, Text, TextInput, TouchableOpacity, StyleSheet, ActivityIndicator, Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar } from 'react-native';
5
- import { useOxy } from "../context/OxyContext.js";
6
- import { useThemeColors, createCommonStyles } from "../styles/index.js";
7
- import Avatar from "../components/Avatar.js";
4
+ import { View, Text, StyleSheet, Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar } from 'react-native';
5
+ import { useOxy } from '../context/OxyContext';
6
+ import { useThemeColors, createCommonStyles } from '../styles';
7
+ import Avatar from '../components/Avatar';
8
8
  import { Ionicons } from '@expo/vector-icons';
9
- import Svg, { Path, Circle, Defs, LinearGradient, Stop } from 'react-native-svg';
10
- import { toast } from "../../lib/sonner.js";
11
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
+ import HighFive from '../../assets/illustrations/HighFive';
10
+ import { toast } from '../../lib/sonner';
11
+ import GroupedPillButtons from '../components/internal/GroupedPillButtons';
12
+ import TextField from '../components/internal/TextField';
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
14
  const SignInScreen = ({
13
15
  navigate,
14
16
  goBack,
17
+ onAuthenticated,
15
18
  theme
16
19
  }) => {
17
20
  // Form data states
@@ -266,42 +269,39 @@ const SignInScreen = ({
266
269
  animateTransition(currentStep - 1);
267
270
  }
268
271
  }, [currentStep, progressAnim, animateTransition]);
269
- const handleUsernameNext = useCallback(() => {
272
+
273
+ // Custom next handlers for validation
274
+ const handleUsernameContinue = useCallback(() => {
270
275
  if (!username) {
271
- toast.error('Please enter your username');
276
+ toast.error('Please enter your username.');
272
277
  return;
273
278
  }
274
- if (validationStatus === 'invalid') {
275
- // Don't show toast if we already have an error message displayed
276
- if (!errorMessage) {
277
- toast.error('Please enter a valid username');
278
- }
279
+ if (validationStatus !== 'valid' || !userProfile) {
280
+ toast.error('Please enter a valid username.');
279
281
  return;
280
282
  }
281
- if (validationStatus === 'validating') {
282
- toast.error('Please wait while we validate your username');
283
+ setErrorMessage('');
284
+ nextStep();
285
+ }, [username, validationStatus, userProfile, setErrorMessage, nextStep]);
286
+ const handleSignIn = useCallback(async () => {
287
+ if (!password) {
288
+ toast.error('Please enter your password.');
283
289
  return;
284
290
  }
285
- if (validationStatus === 'valid' && userProfile) {
286
- setErrorMessage('');
287
- nextStep();
288
- } else {
289
- toast.error('Please enter a valid username');
290
- }
291
- }, [username, validationStatus, userProfile, errorMessage, nextStep]);
292
- const handleLogin = useCallback(async () => {
293
- if (!username || !password) {
294
- toast.error('Please enter both username and password');
291
+ if (!username || !userProfile) {
292
+ toast.error('Please enter a valid username first.');
295
293
  return;
296
294
  }
297
295
  try {
298
296
  setErrorMessage('');
299
- await login(username, password);
300
- // The authentication state change will be handled through context
297
+ const user = await login(username, password);
298
+ if (onAuthenticated) {
299
+ onAuthenticated(user);
300
+ }
301
301
  } catch (error) {
302
302
  toast.error(error.message || 'Login failed');
303
303
  }
304
- }, [username, password, login]);
304
+ }, [username, password, login, onAuthenticated, setErrorMessage, userProfile]);
305
305
 
306
306
  // Memoized step components
307
307
  const renderUsernameStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
@@ -313,109 +313,16 @@ const SignInScreen = ({
313
313
  scale: scaleAnim
314
314
  }]
315
315
  }],
316
- children: [/*#__PURE__*/_jsx(View, {
317
- style: styles.modernImageContainer,
318
- children: /*#__PURE__*/_jsxs(Svg, {
319
- width: 280,
320
- height: 160,
321
- viewBox: "0 0 280 160",
322
- children: [/*#__PURE__*/_jsxs(Defs, {
323
- children: [/*#__PURE__*/_jsxs(LinearGradient, {
324
- id: "primaryGradient",
325
- x1: "0%",
326
- y1: "0%",
327
- x2: "100%",
328
- y2: "100%",
329
- children: [/*#__PURE__*/_jsx(Stop, {
330
- offset: "0%",
331
- stopColor: colors.primary,
332
- stopOpacity: "0.8"
333
- }), /*#__PURE__*/_jsx(Stop, {
334
- offset: "100%",
335
- stopColor: colors.primary,
336
- stopOpacity: "0.2"
337
- })]
338
- }), /*#__PURE__*/_jsxs(LinearGradient, {
339
- id: "secondaryGradient",
340
- x1: "0%",
341
- y1: "0%",
342
- x2: "100%",
343
- y2: "100%",
344
- children: [/*#__PURE__*/_jsx(Stop, {
345
- offset: "0%",
346
- stopColor: colors.primary,
347
- stopOpacity: "0.1"
348
- }), /*#__PURE__*/_jsx(Stop, {
349
- offset: "100%",
350
- stopColor: colors.primary,
351
- stopOpacity: "0.3"
352
- })]
353
- })]
354
- }), /*#__PURE__*/_jsx(Circle, {
355
- cx: "80",
356
- cy: "80",
357
- r: "45",
358
- fill: "url(#primaryGradient)"
359
- }), /*#__PURE__*/_jsx(Circle, {
360
- cx: "200",
361
- cy: "80",
362
- r: "35",
363
- fill: "url(#secondaryGradient)"
364
- }), /*#__PURE__*/_jsx(Path, {
365
- d: "M40 120 Q80 40 140 80 Q200 120 240 60",
366
- stroke: colors.primary,
367
- strokeWidth: "4",
368
- fill: "none",
369
- strokeLinecap: "round"
370
- }), /*#__PURE__*/_jsx(Circle, {
371
- cx: "60",
372
- cy: "50",
373
- r: "8",
374
- fill: colors.primary,
375
- opacity: "0.6"
376
- }), /*#__PURE__*/_jsx(Circle, {
377
- cx: "220",
378
- cy: "120",
379
- r: "6",
380
- fill: colors.primary,
381
- opacity: "0.4"
382
- }), /*#__PURE__*/_jsx(Circle, {
383
- cx: "250",
384
- cy: "40",
385
- r: "4",
386
- fill: colors.primary,
387
- opacity: "0.8"
388
- }), /*#__PURE__*/_jsx(Circle, {
389
- cx: "140",
390
- cy: "80",
391
- r: "25",
392
- fill: colors.background,
393
- opacity: "0.9"
394
- }), /*#__PURE__*/_jsx(Circle, {
395
- cx: "135",
396
- cy: "75",
397
- r: "3",
398
- fill: colors.primary
399
- }), /*#__PURE__*/_jsx(Circle, {
400
- cx: "145",
401
- cy: "75",
402
- r: "3",
403
- fill: colors.primary
404
- }), /*#__PURE__*/_jsx(Path, {
405
- d: "M132 85 Q140 92 148 85",
406
- stroke: colors.primary,
407
- strokeWidth: "2",
408
- fill: "none",
409
- strokeLinecap: "round"
410
- })]
411
- })
316
+ children: [/*#__PURE__*/_jsx(HighFive, {
317
+ width: 100,
318
+ height: 100
412
319
  }), /*#__PURE__*/_jsxs(View, {
413
320
  style: styles.modernHeader,
414
321
  children: [/*#__PURE__*/_jsx(Text, {
415
322
  style: [styles.modernTitle, {
416
323
  color: colors.text
417
324
  }],
418
- children: isAddAccountMode ? 'Add Account' : 'Welcome Back'
325
+ children: isAddAccountMode ? 'Add Another Account' : 'Sign In'
419
326
  }), /*#__PURE__*/_jsx(Text, {
420
327
  style: [styles.modernSubtitle, {
421
328
  color: colors.secondaryText
@@ -455,118 +362,129 @@ const SignInScreen = ({
455
362
  }],
456
363
  children: errorMessage
457
364
  })]
458
- }) : null, /*#__PURE__*/_jsxs(Animated.View, {
365
+ }) : null, /*#__PURE__*/_jsx(Animated.View, {
459
366
  style: [styles.modernInputContainer, {
460
367
  transform: [{
461
368
  scale: inputScaleAnim
462
369
  }]
463
370
  }],
464
- children: [/*#__PURE__*/_jsxs(View, {
465
- style: [styles.inputWrapper, {
466
- borderColor: validationStatus === 'valid' ? colors.success : validationStatus === 'invalid' ? colors.error : isInputFocused ? colors.primary : colors.border
467
- }],
468
- children: [/*#__PURE__*/_jsx(Ionicons, {
469
- name: "person-outline",
470
- size: 20,
471
- color: isInputFocused ? colors.primary : colors.secondaryText,
472
- style: styles.inputIcon
473
- }), /*#__PURE__*/_jsx(TextInput, {
474
- style: [styles.modernInput, {
475
- color: colors.text
476
- }],
477
- placeholder: "Enter your username",
478
- placeholderTextColor: colors.placeholder,
479
- value: username,
480
- onChangeText: handleUsernameChange,
481
- onFocus: handleInputFocus,
482
- onBlur: handleInputBlur,
483
- autoCapitalize: "none",
484
- testID: "username-input"
485
- }), validationStatus === 'validating' && /*#__PURE__*/_jsx(ActivityIndicator, {
486
- size: "small",
487
- color: colors.primary,
488
- style: styles.validationIndicator
489
- }), validationStatus === 'valid' && /*#__PURE__*/_jsx(Ionicons, {
490
- name: "checkmark-circle",
491
- size: 20,
492
- color: colors.success,
493
- style: styles.validationIndicator
494
- }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/_jsx(Ionicons, {
495
- name: "close-circle",
496
- size: 20,
497
- color: colors.error,
498
- style: styles.validationIndicator
499
- })]
500
- }), validationStatus === 'valid' && userProfile && /*#__PURE__*/_jsxs(View, {
501
- style: [styles.validationSuccessCard, {
502
- backgroundColor: colors.success + '15'
503
- }],
504
- children: [/*#__PURE__*/_jsx(Ionicons, {
371
+ children: /*#__PURE__*/_jsx(TextField, {
372
+ label: "Username",
373
+ icon: "person-outline",
374
+ value: username,
375
+ onChangeText: handleUsernameChange,
376
+ onFocus: handleInputFocus,
377
+ onBlur: handleInputBlur,
378
+ autoCapitalize: "none",
379
+ autoCorrect: false,
380
+ testID: "username-input",
381
+ colors: colors,
382
+ variant: "filled",
383
+ error: validationStatus === 'invalid' && username.length >= 3 ? 'Username not found' : undefined,
384
+ loading: validationStatus === 'validating',
385
+ success: validationStatus === 'valid'
386
+ })
387
+ }), validationStatus === 'valid' && userProfile && /*#__PURE__*/_jsxs(View, {
388
+ style: [styles.validationSuccessCard, {
389
+ backgroundColor: colors.success + '10',
390
+ borderWidth: 1,
391
+ borderColor: colors.success + '30',
392
+ padding: 16
393
+ }],
394
+ children: [/*#__PURE__*/_jsx(View, {
395
+ style: {
396
+ width: 32,
397
+ height: 32,
398
+ borderRadius: 16,
399
+ backgroundColor: colors.success + '20',
400
+ justifyContent: 'center',
401
+ alignItems: 'center',
402
+ marginRight: 12
403
+ },
404
+ children: /*#__PURE__*/_jsx(Ionicons, {
505
405
  name: "checkmark-circle",
506
406
  size: 16,
507
407
  color: colors.success
508
- }), /*#__PURE__*/_jsxs(Text, {
408
+ })
409
+ }), /*#__PURE__*/_jsxs(View, {
410
+ style: {
411
+ flex: 1
412
+ },
413
+ children: [/*#__PURE__*/_jsxs(Text, {
509
414
  style: [styles.validationText, {
510
- color: colors.success
415
+ color: colors.success,
416
+ fontWeight: '600',
417
+ marginBottom: 2
511
418
  }],
512
- children: ["Found user: ", userProfile.displayName]
419
+ children: ["Welcome back, ", userProfile?.displayName || userProfile?.name || username, "!"]
420
+ }), /*#__PURE__*/_jsx(Text, {
421
+ style: [styles.validationText, {
422
+ color: colors.secondaryText,
423
+ fontSize: 11,
424
+ opacity: 0.8
425
+ }],
426
+ children: "Ready to continue where you left off"
513
427
  })]
514
- }), validationStatus === 'invalid' && username.length >= 3 && !errorMessage && /*#__PURE__*/_jsxs(View, {
515
- style: [styles.validationErrorCard, {
516
- backgroundColor: colors.error + '15'
517
- }],
518
- children: [/*#__PURE__*/_jsx(Ionicons, {
428
+ })]
429
+ }), validationStatus === 'invalid' && username.length >= 3 && /*#__PURE__*/_jsxs(View, {
430
+ style: [styles.validationErrorCard, {
431
+ backgroundColor: colors.error + '10',
432
+ borderWidth: 1,
433
+ borderColor: colors.error + '30',
434
+ padding: 16
435
+ }],
436
+ children: [/*#__PURE__*/_jsx(View, {
437
+ style: {
438
+ width: 32,
439
+ height: 32,
440
+ borderRadius: 16,
441
+ backgroundColor: colors.error + '20',
442
+ justifyContent: 'center',
443
+ alignItems: 'center',
444
+ marginRight: 12
445
+ },
446
+ children: /*#__PURE__*/_jsx(Ionicons, {
519
447
  name: "alert-circle",
520
448
  size: 16,
521
449
  color: colors.error
522
- }), /*#__PURE__*/_jsx(Text, {
450
+ })
451
+ }), /*#__PURE__*/_jsxs(View, {
452
+ style: {
453
+ flex: 1
454
+ },
455
+ children: [/*#__PURE__*/_jsx(Text, {
523
456
  style: [styles.validationText, {
524
- color: colors.error
457
+ color: colors.error,
458
+ fontWeight: '600',
459
+ marginBottom: 2
525
460
  }],
526
461
  children: "Username not found"
462
+ }), /*#__PURE__*/_jsx(Text, {
463
+ style: [styles.validationText, {
464
+ color: colors.secondaryText,
465
+ fontSize: 11,
466
+ opacity: 0.8
467
+ }],
468
+ children: "Check spelling or sign up"
527
469
  })]
528
470
  })]
529
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
530
- style: [styles.modernButton, {
531
- backgroundColor: colors.primary,
532
- opacity: !username || validationStatus !== 'valid' ? 0.5 : 1,
533
- shadowColor: colors.primary
534
- }],
535
- onPress: handleUsernameNext,
536
- disabled: !username || validationStatus !== 'valid' || isValidating,
537
- testID: "username-next-button",
538
- children: isValidating ? /*#__PURE__*/_jsx(ActivityIndicator, {
539
- color: "#FFFFFF",
540
- size: "small"
541
- }) : /*#__PURE__*/_jsxs(_Fragment, {
542
- children: [/*#__PURE__*/_jsx(Text, {
543
- style: styles.modernButtonText,
544
- children: "Continue"
545
- }), /*#__PURE__*/_jsx(Ionicons, {
546
- name: "arrow-forward",
547
- size: 20,
548
- color: "#FFFFFF",
549
- style: styles.buttonIcon
550
- })]
551
- })
552
- }), /*#__PURE__*/_jsxs(View, {
553
- style: styles.footerTextContainer,
554
- children: [/*#__PURE__*/_jsxs(Text, {
555
- style: [styles.footerText, {
556
- color: colors.secondaryText
557
- }],
558
- children: ["Don't have an account?", ' ']
559
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
471
+ }), /*#__PURE__*/_jsx(GroupedPillButtons, {
472
+ buttons: [{
473
+ text: 'Sign Up',
560
474
  onPress: () => navigate('SignUp'),
561
- children: /*#__PURE__*/_jsx(Text, {
562
- style: [styles.modernLinkText, {
563
- color: colors.primary
564
- }],
565
- children: "Sign Up"
566
- })
567
- })]
475
+ icon: 'person-add',
476
+ variant: 'transparent'
477
+ }, {
478
+ text: 'Continue',
479
+ onPress: handleUsernameContinue,
480
+ icon: 'arrow-forward',
481
+ variant: 'primary',
482
+ loading: isValidating,
483
+ testID: 'username-next-button'
484
+ }],
485
+ colors: colors
568
486
  })]
569
- }), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameNext, navigate, styles]);
487
+ }), [fadeAnim, slideAnim, scaleAnim, colors, isAddAccountMode, user?.username, errorMessage, inputScaleAnim, isInputFocused, username, validationStatus, userProfile, isValidating, handleInputFocus, handleInputBlur, handleUsernameChange, handleUsernameContinue, navigate, styles]);
570
488
  const renderPasswordStep = useMemo(() => /*#__PURE__*/_jsxs(Animated.View, {
571
489
  style: [styles.stepContainer, {
572
490
  opacity: fadeAnim,
@@ -640,79 +558,36 @@ const SignInScreen = ({
640
558
  scale: inputScaleAnim
641
559
  }]
642
560
  }],
643
- children: /*#__PURE__*/_jsxs(View, {
644
- style: [styles.inputWrapper, {
645
- borderColor: isInputFocused ? colors.primary : colors.border
646
- }],
647
- children: [/*#__PURE__*/_jsx(Ionicons, {
648
- name: "lock-closed-outline",
649
- size: 20,
650
- color: isInputFocused ? colors.primary : colors.secondaryText,
651
- style: styles.inputIcon
652
- }), /*#__PURE__*/_jsx(TextInput, {
653
- style: [styles.modernInput, {
654
- color: colors.text
655
- }],
656
- placeholder: "Enter your password",
657
- placeholderTextColor: colors.placeholder,
658
- value: password,
659
- onChangeText: handlePasswordChange,
660
- onFocus: handleInputFocus,
661
- onBlur: handleInputBlur,
662
- secureTextEntry: !showPassword,
663
- autoCapitalize: "none",
664
- testID: "password-input"
665
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
666
- style: styles.passwordToggle,
667
- onPress: () => setShowPassword(!showPassword),
668
- children: /*#__PURE__*/_jsx(Ionicons, {
669
- name: showPassword ? "eye-off" : "eye",
670
- size: 20,
671
- color: colors.secondaryText
672
- })
673
- })]
561
+ children: /*#__PURE__*/_jsx(TextField, {
562
+ label: "Password",
563
+ icon: "lock-closed-outline",
564
+ value: password,
565
+ onChangeText: handlePasswordChange,
566
+ onFocus: handleInputFocus,
567
+ onBlur: handleInputBlur,
568
+ secureTextEntry: !showPassword,
569
+ autoCapitalize: "none",
570
+ autoCorrect: false,
571
+ testID: "password-input",
572
+ colors: colors,
573
+ variant: "filled",
574
+ error: errorMessage
674
575
  })
675
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
676
- style: [styles.modernButton, {
677
- backgroundColor: colors.primary,
678
- opacity: !password ? 0.5 : 1,
679
- shadowColor: colors.primary
680
- }],
681
- onPress: handleLogin,
682
- disabled: !password || isLoading,
683
- testID: "login-button",
684
- children: isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
685
- color: "#FFFFFF",
686
- size: "small"
687
- }) : /*#__PURE__*/_jsxs(_Fragment, {
688
- children: [/*#__PURE__*/_jsx(Text, {
689
- style: styles.modernButtonText,
690
- children: "Sign In"
691
- }), /*#__PURE__*/_jsx(Ionicons, {
692
- name: "log-in",
693
- size: 20,
694
- color: "#FFFFFF",
695
- style: styles.buttonIcon
696
- })]
697
- })
698
- }), /*#__PURE__*/_jsx(View, {
699
- style: styles.modernNavigationButtons,
700
- children: /*#__PURE__*/_jsxs(TouchableOpacity, {
701
- style: [styles.modernBackButton, {
702
- borderColor: colors.border
703
- }],
576
+ }), /*#__PURE__*/_jsx(GroupedPillButtons, {
577
+ buttons: [{
578
+ text: 'Back',
704
579
  onPress: prevStep,
705
- children: [/*#__PURE__*/_jsx(Ionicons, {
706
- name: "arrow-back",
707
- size: 18,
708
- color: colors.text
709
- }), /*#__PURE__*/_jsx(Text, {
710
- style: [styles.modernBackButtonText, {
711
- color: colors.text
712
- }],
713
- children: "Back"
714
- })]
715
- })
580
+ icon: 'arrow-back',
581
+ variant: 'transparent'
582
+ }, {
583
+ text: 'Sign In',
584
+ onPress: handleSignIn,
585
+ icon: 'log-in',
586
+ variant: 'primary',
587
+ loading: isLoading,
588
+ testID: 'login-button'
589
+ }],
590
+ colors: colors
716
591
  }), /*#__PURE__*/_jsxs(View, {
717
592
  style: styles.securityNotice,
718
593
  children: [/*#__PURE__*/_jsx(Ionicons, {
@@ -726,7 +601,7 @@ const SignInScreen = ({
726
601
  children: "Your data is encrypted and secure"
727
602
  })]
728
603
  })]
729
- }), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleLogin, isLoading, prevStep, styles]);
604
+ }), [fadeAnim, slideAnim, scaleAnim, colors, userProfile, username, theme, logoAnim, errorMessage, inputScaleAnim, isInputFocused, password, showPassword, handleInputFocus, handleInputBlur, handlePasswordChange, handleSignIn, isLoading, prevStep, styles]);
730
605
  const renderCurrentStep = useCallback(() => {
731
606
  switch (currentStep) {
732
607
  case 0:
@@ -762,30 +637,25 @@ const createStyles = (colors, theme) => StyleSheet.create({
762
637
  scrollContent: {
763
638
  flexGrow: 1,
764
639
  paddingHorizontal: 24,
765
- paddingTop: 40,
766
- paddingBottom: 40
640
+ paddingTop: 4,
641
+ paddingBottom: 20
767
642
  },
768
643
  stepContainer: {
769
644
  flex: 1,
770
- justifyContent: 'center',
771
- alignItems: 'center',
772
- minHeight: 600
773
- },
774
- modernImageContainer: {
775
- alignItems: 'center',
776
- marginBottom: 40
645
+ justifyContent: 'flex-start',
646
+ alignItems: 'flex-start'
777
647
  },
778
648
  modernHeader: {
779
649
  alignItems: 'flex-start',
780
650
  width: '100%',
781
- marginBottom: 32
651
+ marginBottom: 24
782
652
  },
783
653
  modernTitle: {
784
654
  fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
785
655
  fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
786
- fontSize: 42,
656
+ fontSize: 62,
787
657
  lineHeight: 48,
788
- marginBottom: 12,
658
+ marginBottom: 18,
789
659
  textAlign: 'left',
790
660
  letterSpacing: -1
791
661
  },
@@ -896,6 +766,12 @@ const createStyles = (colors, theme) => StyleSheet.create({
896
766
  buttonIcon: {
897
767
  marginLeft: 4
898
768
  },
769
+ // Enhanced Label Styles
770
+ modernLabel: {
771
+ fontSize: 12,
772
+ fontWeight: '500',
773
+ marginBottom: 2
774
+ },
899
775
  modernLinkText: {
900
776
  fontSize: 14,
901
777
  lineHeight: 20,
@@ -905,7 +781,7 @@ const createStyles = (colors, theme) => StyleSheet.create({
905
781
  footerTextContainer: {
906
782
  flexDirection: 'row',
907
783
  justifyContent: 'center',
908
- marginTop: 28
784
+ marginTop: 16
909
785
  },
910
786
  footerText: {
911
787
  fontSize: 15
@@ -965,8 +841,10 @@ const createStyles = (colors, theme) => StyleSheet.create({
965
841
  modernNavigationButtons: {
966
842
  flexDirection: 'row',
967
843
  justifyContent: 'center',
968
- marginTop: 24,
969
- marginBottom: 16
844
+ marginTop: 16,
845
+ marginBottom: 8,
846
+ width: '100%',
847
+ gap: 8
970
848
  },
971
849
  modernBackButton: {
972
850
  flexDirection: 'row',