@oxyhq/services 5.8.9 → 5.8.11

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 (38) hide show
  1. package/lib/commonjs/ui/components/OxyProvider.js +9 -3
  2. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  3. package/lib/commonjs/ui/screens/FeedbackScreen.js +4 -0
  4. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  5. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +4 -0
  6. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  7. package/lib/commonjs/ui/screens/SignInScreen.js +27 -16
  8. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  9. package/lib/commonjs/ui/screens/SignUpScreen.js +18 -4
  10. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  11. package/lib/commonjs/ui/styles/authStyles.js +2 -1
  12. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  13. package/lib/module/ui/components/OxyProvider.js +9 -3
  14. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  15. package/lib/module/ui/screens/FeedbackScreen.js +4 -0
  16. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  17. package/lib/module/ui/screens/RecoverAccountScreen.js +4 -0
  18. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  19. package/lib/module/ui/screens/SignInScreen.js +27 -16
  20. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  21. package/lib/module/ui/screens/SignUpScreen.js +18 -4
  22. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  23. package/lib/module/ui/styles/authStyles.js +2 -1
  24. package/lib/module/ui/styles/authStyles.js.map +1 -1
  25. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  26. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  27. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  28. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  29. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  30. package/lib/typescript/ui/styles/authStyles.d.ts +1 -0
  31. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/ui/components/OxyProvider.tsx +9 -3
  34. package/src/ui/screens/FeedbackScreen.tsx +4 -0
  35. package/src/ui/screens/RecoverAccountScreen.tsx +4 -0
  36. package/src/ui/screens/SignInScreen.tsx +20 -16
  37. package/src/ui/screens/SignUpScreen.tsx +14 -4
  38. package/src/ui/styles/authStyles.ts +1 -0
@@ -66,6 +66,13 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
66
66
  const logoAnim = useRef(new Animated.Value(0)).current;
67
67
  const progressAnim = useRef(new Animated.Value(initialStep ? 1.0 : 0.5)).current;
68
68
 
69
+ // Ensure animations are properly initialized
70
+ useEffect(() => {
71
+ fadeAnim.setValue(1);
72
+ slideAnim.setValue(0);
73
+ scaleAnim.setValue(1);
74
+ }, [fadeAnim, slideAnim, scaleAnim]);
75
+
69
76
  const { login, isLoading, user, isAuthenticated, sessions, oxyServices } = useOxy();
70
77
 
71
78
  const colors = useThemeColors(theme);
@@ -229,17 +236,10 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
229
236
 
230
237
  // Animation functions
231
238
  const animateTransition = useCallback((nextStep: number) => {
232
- // Scale down current content
233
- Animated.timing(scaleAnim, {
234
- toValue: 0.95,
235
- duration: 150,
236
- useNativeDriver: Platform.OS !== 'web',
237
- }).start();
238
-
239
- // Fade out
239
+ // Use a shorter fade out duration to minimize white flash
240
240
  Animated.timing(fadeAnim, {
241
- toValue: 0,
242
- duration: 200,
241
+ toValue: 0.3, // Don't fade completely to 0, keep some opacity
242
+ duration: 100, // Faster fade out
243
243
  useNativeDriver: Platform.OS !== 'web',
244
244
  }).start(() => {
245
245
  setCurrentStep(nextStep);
@@ -248,23 +248,23 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
248
248
  slideAnim.setValue(-50);
249
249
  scaleAnim.setValue(0.95);
250
250
 
251
- // Animate in new content
251
+ // Animate in new content with faster timing
252
252
  Animated.parallel([
253
253
  Animated.timing(fadeAnim, {
254
254
  toValue: 1,
255
- duration: 300,
255
+ duration: 200, // Faster fade in
256
256
  useNativeDriver: Platform.OS !== 'web',
257
257
  }),
258
258
  Animated.spring(slideAnim, {
259
259
  toValue: 0,
260
- tension: 80,
261
- friction: 8,
260
+ tension: 100, // Higher tension for faster animation
261
+ friction: 6, // Lower friction for faster animation
262
262
  useNativeDriver: Platform.OS !== 'web',
263
263
  }),
264
264
  Animated.spring(scaleAnim, {
265
265
  toValue: 1,
266
- tension: 80,
267
- friction: 8,
266
+ tension: 100, // Higher tension for faster animation
267
+ friction: 6, // Lower friction for faster animation
268
268
  useNativeDriver: Platform.OS !== 'web',
269
269
  })
270
270
  ]).start();
@@ -407,6 +407,8 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
407
407
  <KeyboardAvoidingView
408
408
  style={[styles.container, { backgroundColor: colors.background }]}
409
409
  behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
410
+ keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : 20}
411
+ enabled={Platform.OS !== 'web'}
410
412
  >
411
413
  <StatusBar
412
414
  barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
@@ -417,6 +419,8 @@ const SignInScreen: React.FC<BaseScreenProps> = ({
417
419
  contentContainerStyle={styles.scrollContent}
418
420
  showsVerticalScrollIndicator={false}
419
421
  keyboardShouldPersistTaps="handled"
422
+ keyboardDismissMode="interactive"
423
+ automaticallyAdjustKeyboardInsets={Platform.OS === 'ios'}
420
424
  >
421
425
  {renderCurrentStep()}
422
426
  </ScrollView>
@@ -634,6 +634,12 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
634
634
  const fadeAnim = useRef(new Animated.Value(1)).current;
635
635
  const slideAnim = useRef(new Animated.Value(0)).current;
636
636
 
637
+ // Ensure animations are properly initialized
638
+ useEffect(() => {
639
+ fadeAnim.setValue(1);
640
+ slideAnim.setValue(0);
641
+ }, [fadeAnim, slideAnim]);
642
+
637
643
  // Memoized styles
638
644
  const styles = useMemo(() => createAuthStyles(colors, theme), [colors, theme]);
639
645
 
@@ -653,8 +659,8 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
653
659
  // Animation functions
654
660
  const animateTransition = useCallback((nextStep: number) => {
655
661
  Animated.timing(fadeAnim, {
656
- toValue: 0,
657
- duration: 250,
662
+ toValue: 0.3, // Don't fade completely to 0, keep some opacity
663
+ duration: 100, // Faster fade out
658
664
  useNativeDriver: Platform.OS !== 'web',
659
665
  }).start(() => {
660
666
  setCurrentStep(nextStep);
@@ -663,12 +669,12 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
663
669
  Animated.parallel([
664
670
  Animated.timing(fadeAnim, {
665
671
  toValue: 1,
666
- duration: 250,
672
+ duration: 200, // Faster fade in
667
673
  useNativeDriver: Platform.OS !== 'web',
668
674
  }),
669
675
  Animated.timing(slideAnim, {
670
676
  toValue: 0,
671
- duration: 300,
677
+ duration: 250, // Slightly faster slide
672
678
  useNativeDriver: Platform.OS !== 'web',
673
679
  })
674
680
  ]).start();
@@ -825,6 +831,8 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
825
831
  <KeyboardAvoidingView
826
832
  style={[styles.container, { backgroundColor: colors.background }]}
827
833
  behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
834
+ keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : 20}
835
+ enabled={Platform.OS !== 'web'}
828
836
  >
829
837
  <StatusBar
830
838
  barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
@@ -834,6 +842,8 @@ const SignUpScreen: React.FC<BaseScreenProps> = ({
834
842
  contentContainerStyle={styles.scrollContent}
835
843
  showsVerticalScrollIndicator={false}
836
844
  keyboardShouldPersistTaps="handled"
845
+ keyboardDismissMode="interactive"
846
+ automaticallyAdjustKeyboardInsets={Platform.OS === 'ios'}
837
847
  >
838
848
  {renderCurrentStep()}
839
849
  </ScrollView>
@@ -29,6 +29,7 @@ export const createAuthStyles = (colors: AuthThemeColors, theme: string) => Styl
29
29
  flex: 1,
30
30
  justifyContent: 'flex-start',
31
31
  alignItems: 'flex-start',
32
+ backgroundColor: colors.background, // Ensure background is maintained during transitions
32
33
  },
33
34
 
34
35
  // Header styles