react-native-screen-transitions 3.0.0-rc.1 → 3.0.0-rc.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 (118) hide show
  1. package/lib/commonjs/blank-stack/components/Overlay.js +8 -11
  2. package/lib/commonjs/blank-stack/components/Overlay.js.map +1 -1
  3. package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +2 -3
  4. package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +1 -1
  5. package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.js.map +1 -0
  6. package/lib/{module/blank-stack/utils/with-stack-navigation/_utils → commonjs/blank-stack/utils/with-stack-navigation/helpers}/calculate-active-screens-limit.js.map +1 -1
  7. package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.js.map +1 -0
  8. package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.js.map +1 -0
  9. package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.js.map +1 -0
  10. package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-closing-route-keys.js.map +1 -0
  11. package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-previous.js.map +1 -0
  12. package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-stack-navigation-state.js +4 -4
  13. package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js.map +1 -0
  14. package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js +2 -2
  15. package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js.map +1 -1
  16. package/lib/commonjs/shared/configs/presets.js +8 -2
  17. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  18. package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +6 -1
  19. package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
  20. package/lib/module/blank-stack/components/Overlay.js +8 -11
  21. package/lib/module/blank-stack/components/Overlay.js.map +1 -1
  22. package/lib/module/blank-stack/hooks/use-overlay-animation.js +2 -3
  23. package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +1 -1
  24. package/lib/module/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.js.map +1 -0
  25. package/lib/module/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.js.map +1 -0
  26. package/lib/module/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.js.map +1 -0
  27. package/lib/module/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.js.map +1 -0
  28. package/lib/module/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.js.map +1 -0
  29. package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-closing-route-keys.js.map +1 -0
  30. package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-previous.js.map +1 -0
  31. package/lib/module/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-stack-navigation-state.js +4 -4
  32. package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js.map +1 -0
  33. package/lib/module/blank-stack/utils/with-stack-navigation/index.js +2 -2
  34. package/lib/module/blank-stack/utils/with-stack-navigation/index.js.map +1 -1
  35. package/lib/module/shared/configs/presets.js +8 -2
  36. package/lib/module/shared/configs/presets.js.map +1 -1
  37. package/lib/module/shared/hooks/animation/use-screen-animation.js +6 -1
  38. package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
  39. package/lib/typescript/blank-stack/components/Overlay.d.ts.map +1 -1
  40. package/lib/typescript/blank-stack/types.d.ts +19 -105
  41. package/lib/typescript/blank-stack/types.d.ts.map +1 -1
  42. package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.d.ts.map +1 -0
  43. package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.d.ts.map +1 -0
  44. package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.d.ts.map +1 -0
  45. package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.d.ts.map +1 -0
  46. package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.d.ts.map +1 -0
  47. package/lib/typescript/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-closing-route-keys.d.ts.map +1 -1
  48. package/lib/typescript/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-previous.d.ts.map +1 -1
  49. package/lib/typescript/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.d.ts.map +1 -0
  50. package/lib/typescript/native-stack/types.d.ts +7 -1
  51. package/lib/typescript/native-stack/types.d.ts.map +1 -1
  52. package/lib/typescript/shared/configs/index.d.ts.map +1 -1
  53. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  54. package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -1
  55. package/lib/typescript/shared/index.d.ts +14 -14
  56. package/lib/typescript/shared/index.d.ts.map +1 -1
  57. package/lib/typescript/shared/types/core.types.d.ts +0 -4
  58. package/lib/typescript/shared/types/core.types.d.ts.map +1 -1
  59. package/package.json +1 -1
  60. package/src/blank-stack/components/Overlay.tsx +7 -11
  61. package/src/blank-stack/hooks/use-overlay-animation.tsx +11 -11
  62. package/src/blank-stack/types.ts +26 -102
  63. package/src/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-stack-navigation-state.tsx +4 -4
  64. package/src/blank-stack/utils/with-stack-navigation/index.tsx +2 -2
  65. package/src/native-stack/types.ts +8 -1
  66. package/src/shared/configs/presets.ts +8 -2
  67. package/src/shared/hooks/animation/use-screen-animation.tsx +12 -4
  68. package/src/shared/types/core.types.ts +4 -6
  69. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +0 -1
  70. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +0 -1
  71. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +0 -1
  72. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +0 -1
  73. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +0 -1
  74. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +0 -1
  75. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +0 -1
  76. package/lib/commonjs/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +0 -1
  77. package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +0 -1
  78. package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +0 -1
  79. package/lib/module/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +0 -1
  80. package/lib/module/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +0 -1
  81. package/lib/module/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +0 -1
  82. package/lib/module/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +0 -1
  83. package/lib/module/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +0 -1
  84. package/lib/typescript/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +0 -1
  85. package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +0 -1
  86. package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +0 -1
  87. package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +0 -1
  88. package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +0 -1
  89. package/lib/typescript/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +0 -1
  90. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_utils → helpers}/are-descriptors-equal.js +0 -0
  91. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_utils → helpers}/calculate-active-screens-limit.js +0 -0
  92. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_utils → helpers}/compose-descriptors.js +0 -0
  93. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_utils → helpers}/have-same-route-keys.js +0 -0
  94. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_utils → helpers}/routes-are-identical.js +0 -0
  95. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-closing-route-keys.js +0 -0
  96. /package/lib/commonjs/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-previous.js +0 -0
  97. /package/lib/module/blank-stack/utils/with-stack-navigation/{_utils → helpers}/are-descriptors-equal.js +0 -0
  98. /package/lib/module/blank-stack/utils/with-stack-navigation/{_utils → helpers}/calculate-active-screens-limit.js +0 -0
  99. /package/lib/module/blank-stack/utils/with-stack-navigation/{_utils → helpers}/compose-descriptors.js +0 -0
  100. /package/lib/module/blank-stack/utils/with-stack-navigation/{_utils → helpers}/have-same-route-keys.js +0 -0
  101. /package/lib/module/blank-stack/utils/with-stack-navigation/{_utils → helpers}/routes-are-identical.js +0 -0
  102. /package/lib/module/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-closing-route-keys.js +0 -0
  103. /package/lib/module/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-previous.js +0 -0
  104. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_utils → helpers}/are-descriptors-equal.d.ts +0 -0
  105. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_utils → helpers}/calculate-active-screens-limit.d.ts +0 -0
  106. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_utils → helpers}/compose-descriptors.d.ts +0 -0
  107. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_utils → helpers}/have-same-route-keys.d.ts +0 -0
  108. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_utils → helpers}/routes-are-identical.d.ts +0 -0
  109. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-closing-route-keys.d.ts +0 -0
  110. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-previous.d.ts +0 -0
  111. /package/lib/typescript/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-stack-navigation-state.d.ts +0 -0
  112. /package/src/blank-stack/utils/with-stack-navigation/{_utils → helpers}/are-descriptors-equal.ts +0 -0
  113. /package/src/blank-stack/utils/with-stack-navigation/{_utils → helpers}/calculate-active-screens-limit.ts +0 -0
  114. /package/src/blank-stack/utils/with-stack-navigation/{_utils → helpers}/compose-descriptors.ts +0 -0
  115. /package/src/blank-stack/utils/with-stack-navigation/{_utils → helpers}/have-same-route-keys.ts +0 -0
  116. /package/src/blank-stack/utils/with-stack-navigation/{_utils → helpers}/routes-are-identical.ts +0 -0
  117. /package/src/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-closing-route-keys.tsx +0 -0
  118. /package/src/blank-stack/utils/with-stack-navigation/{_hooks → hooks}/use-previous.tsx +0 -0
@@ -312,17 +312,17 @@ declare const _default: {
312
312
  accessibilityLargeContentTitle?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
313
313
  accessibilityRespondsToUserInteraction?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
314
314
  onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
315
- disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
315
+ onHoverIn?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
316
+ onHoverOut?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
316
317
  onPressIn?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
317
318
  onPressOut?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
318
319
  onLongPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
319
- pressRetentionOffset?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
320
- onHoverIn?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
321
- onHoverOut?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
322
320
  cancelable?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
323
321
  delayHoverIn?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
324
322
  delayHoverOut?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
325
323
  delayLongPress?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
324
+ disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
325
+ pressRetentionOffset?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
326
326
  android_disableSound?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
327
327
  android_ripple?: import("react-native").PressableAndroidRippleConfig | import("react-native-reanimated").SharedValue<import("react-native").PressableAndroidRippleConfig | null | undefined> | null | undefined;
328
328
  testOnly_pressed?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
@@ -433,17 +433,17 @@ declare const _default: {
433
433
  accessibilityLargeContentTitle?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
434
434
  accessibilityRespondsToUserInteraction?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
435
435
  onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
436
- disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
436
+ onHoverIn?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
437
+ onHoverOut?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
437
438
  onPressIn?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
438
439
  onPressOut?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
439
440
  onLongPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
440
- pressRetentionOffset?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
441
- onHoverIn?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
442
- onHoverOut?: ((event: import("react-native").MouseEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").MouseEvent) => void) | null | undefined> | null | undefined;
443
441
  cancelable?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
444
442
  delayHoverIn?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
445
443
  delayHoverOut?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
446
444
  delayLongPress?: number | import("react-native-reanimated").SharedValue<number | null | undefined> | null | undefined;
445
+ disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
446
+ pressRetentionOffset?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
447
447
  android_disableSound?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
448
448
  android_ripple?: import("react-native").PressableAndroidRippleConfig | import("react-native-reanimated").SharedValue<import("react-native").PressableAndroidRippleConfig | null | undefined> | null | undefined;
449
449
  testOnly_pressed?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
@@ -594,7 +594,7 @@ declare const _default: {
594
594
  centerContent?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
595
595
  contentInset?: import("react-native").Insets | import("react-native-reanimated").SharedValue<import("react-native").Insets | undefined> | undefined;
596
596
  contentOffset?: import("react-native").PointProp | import("react-native-reanimated").SharedValue<import("react-native").PointProp | undefined> | undefined;
597
- contentInsetAdjustmentBehavior?: "automatic" | "always" | "never" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"automatic" | "always" | "never" | "scrollableAxes" | undefined> | undefined;
597
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
598
598
  directionalLockEnabled?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
599
599
  maintainVisibleContentPosition?: {
600
600
  autoscrollToTopThreshold?: number | null | undefined;
@@ -769,7 +769,7 @@ declare const _default: {
769
769
  centerContent?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
770
770
  contentInset?: import("react-native").Insets | import("react-native-reanimated").SharedValue<import("react-native").Insets | undefined> | undefined;
771
771
  contentOffset?: import("react-native").PointProp | import("react-native-reanimated").SharedValue<import("react-native").PointProp | undefined> | undefined;
772
- contentInsetAdjustmentBehavior?: "automatic" | "always" | "never" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"automatic" | "always" | "never" | "scrollableAxes" | undefined> | undefined;
772
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
773
773
  directionalLockEnabled?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
774
774
  maintainVisibleContentPosition?: {
775
775
  autoscrollToTopThreshold?: number | null | undefined;
@@ -818,8 +818,8 @@ declare const _default: {
818
818
  horizontal?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
819
819
  data: ArrayLike<unknown> | import("react-native-reanimated").SharedValue<ArrayLike<unknown> | null | undefined> | null | undefined;
820
820
  children?: import("react").ReactNode | import("react-native-reanimated").SharedValue<import("react").ReactNode>;
821
- inverted?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
822
821
  pointerEvents?: "none" | "auto" | "box-none" | "box-only" | import("react-native-reanimated").SharedValue<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
822
+ inverted?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
823
823
  hitSlop?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
824
824
  needsOffscreenAlphaCompositing?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
825
825
  onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
@@ -950,7 +950,7 @@ declare const _default: {
950
950
  centerContent?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
951
951
  contentInset?: import("react-native").Insets | import("react-native-reanimated").SharedValue<import("react-native").Insets | undefined> | undefined;
952
952
  contentOffset?: import("react-native").PointProp | import("react-native-reanimated").SharedValue<import("react-native").PointProp | undefined> | undefined;
953
- contentInsetAdjustmentBehavior?: "automatic" | "always" | "never" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"automatic" | "always" | "never" | "scrollableAxes" | undefined> | undefined;
953
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
954
954
  directionalLockEnabled?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
955
955
  maintainVisibleContentPosition?: {
956
956
  autoscrollToTopThreshold?: number | null | undefined;
@@ -1060,8 +1060,8 @@ declare const _default: {
1060
1060
  horizontal?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
1061
1061
  data: ArrayLike<unknown> | import("react-native-reanimated").SharedValue<ArrayLike<unknown> | null | undefined> | null | undefined;
1062
1062
  children?: import("react").ReactNode | import("react-native-reanimated").SharedValue<import("react").ReactNode>;
1063
- inverted?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
1064
1063
  pointerEvents?: "none" | "auto" | "box-none" | "box-only" | import("react-native-reanimated").SharedValue<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
1064
+ inverted?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
1065
1065
  hitSlop?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
1066
1066
  needsOffscreenAlphaCompositing?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
1067
1067
  onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
@@ -1192,7 +1192,7 @@ declare const _default: {
1192
1192
  centerContent?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
1193
1193
  contentInset?: import("react-native").Insets | import("react-native-reanimated").SharedValue<import("react-native").Insets | undefined> | undefined;
1194
1194
  contentOffset?: import("react-native").PointProp | import("react-native-reanimated").SharedValue<import("react-native").PointProp | undefined> | undefined;
1195
- contentInsetAdjustmentBehavior?: "automatic" | "always" | "never" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"automatic" | "always" | "never" | "scrollableAxes" | undefined> | undefined;
1195
+ contentInsetAdjustmentBehavior?: "always" | "never" | "automatic" | "scrollableAxes" | import("react-native-reanimated").SharedValue<"always" | "never" | "automatic" | "scrollableAxes" | undefined> | undefined;
1196
1196
  directionalLockEnabled?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
1197
1197
  maintainVisibleContentPosition?: {
1198
1198
  autoscrollToTopThreshold?: number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,UAAU,MAAM,uCAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA2BivE,CAAC;;;;;;;;;;;;;;;;AAxBjzE,wBAaE;AAEF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,YAAY,EACX,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,GACvB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -83,9 +83,5 @@ export type ScreenTransitionConfig = {
83
83
  * The area of the screen where the gesture is activated.
84
84
  */
85
85
  gestureActivationArea?: GestureActivationArea;
86
- /**
87
- * Whether to enable transitions. It sets the presentation to containedTransparentModal, animation none, and headerShown to false.
88
- */
89
- enableTransitions?: boolean;
90
86
  };
91
87
  //# sourceMappingURL=core.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/core.types.ts"],"names":[],"mappings":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E,MAAM,CAAC;IAEjC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screen-transitions",
3
- "version": "3.0.0-rc.1",
3
+ "version": "3.0.0-rc.2",
4
4
  "description": "Easy screen transitions for React Native and Expo",
5
5
  "author": "Ed",
6
6
  "license": "MIT",
@@ -4,7 +4,6 @@ import {
4
4
  } from "@react-navigation/native";
5
5
  import { useMemo } from "react";
6
6
  import { Animated, StyleSheet, View } from "react-native";
7
- import { useSafeAreaInsets } from "react-native-safe-area-context";
8
7
  import { useScreenAnimation } from "../../shared/hooks/animation/use-screen-animation";
9
8
  import { KeysProvider, useKeys } from "../../shared/providers/keys.provider";
10
9
  import { TransitionStylesProvider } from "../../shared/providers/transition-styles.provider";
@@ -45,8 +44,6 @@ const getActiveFloatOverlay = (scenes: BlankStackScene[], index: number) => {
45
44
  };
46
45
 
47
46
  const OverlayHost = ({ scene, isFloating }: OverlayHostProps) => {
48
- const insets = useSafeAreaInsets();
49
-
50
47
  const OverlayComponent = scene.descriptor.options.overlay;
51
48
 
52
49
  const { overlayAnimation, optimisticActiveIndex } = useOverlayAnimation();
@@ -58,9 +55,9 @@ const OverlayHost = ({ scene, isFloating }: OverlayHostProps) => {
58
55
  );
59
56
  }, [scenes, scene.route.key]);
60
57
 
61
- const focusedRoute = useMemo(() => {
58
+ const focusedScene = useMemo(() => {
62
59
  if (overlaySceneIndex === -1) {
63
- return scene.route;
60
+ return scene;
64
61
  }
65
62
 
66
63
  const maxOffset = Math.max(scenes.length - overlaySceneIndex - 1, 0);
@@ -69,8 +66,8 @@ const OverlayHost = ({ scene, isFloating }: OverlayHostProps) => {
69
66
  maxOffset,
70
67
  );
71
68
 
72
- return scenes[overlaySceneIndex + normalizedIndex]?.route ?? scene.route;
73
- }, [overlaySceneIndex, optimisticActiveIndex, scenes, scene.route]);
69
+ return scenes[overlaySceneIndex + normalizedIndex] ?? scene;
70
+ }, [overlaySceneIndex, optimisticActiveIndex, scenes, scene]);
74
71
 
75
72
  const screenAnimation = useScreenAnimation();
76
73
 
@@ -79,13 +76,12 @@ const OverlayHost = ({ scene, isFloating }: OverlayHostProps) => {
79
76
  }
80
77
 
81
78
  const overlayProps: BlankStackOverlayProps = {
82
- route: scene.route,
83
- focusedRoute,
79
+ focusedRoute: focusedScene.route,
80
+ focusedIndex: optimisticActiveIndex,
81
+ overlayOptions: focusedScene.descriptor.options.overlayOptions,
84
82
  navigation: scene.descriptor.navigation,
85
83
  overlayAnimation,
86
84
  screenAnimation,
87
- focusedIndex: optimisticActiveIndex,
88
- insets,
89
85
  };
90
86
 
91
87
  return (
@@ -51,21 +51,21 @@ export const useOverlayAnimation = (): {
51
51
  return total;
52
52
  }, [progressValues]);
53
53
 
54
- const optimisticActiveIndexValue = useDerivedValue(() => {
55
- "worklet";
56
-
57
- const activeIndex = progressValues.length - 1;
54
+ const optimisticActiveIndex = useSharedValueState(
55
+ useDerivedValue(() => {
56
+ "worklet";
58
57
 
59
- const isOneDismissing = Number(
60
- progressValues.some((value) => value.closing.value > 0),
61
- );
58
+ const activeIndex = progressValues.length - 1;
62
59
 
63
- const optimisticIndex = activeIndex - isOneDismissing;
60
+ const isOneDismissing = Number(
61
+ progressValues.some((value) => value.closing.value > 0),
62
+ );
64
63
 
65
- return optimisticIndex;
66
- });
64
+ const optimisticIndex = activeIndex - isOneDismissing;
67
65
 
68
- const optimisticActiveIndex = useSharedValueState(optimisticActiveIndexValue);
66
+ return optimisticIndex;
67
+ }),
68
+ );
69
69
 
70
70
  const screen = useWindowDimensions();
71
71
 
@@ -12,8 +12,8 @@ import type {
12
12
  Theme,
13
13
  } from "@react-navigation/native";
14
14
  import type { DerivedValue } from "react-native-reanimated";
15
- import type { EdgeInsets } from "react-native-safe-area-context";
16
15
  import type { ScreenProps } from "react-native-screens";
16
+ import type { ScreenTransitionConfig } from "../shared";
17
17
  import type {
18
18
  OverlayInterpolationProps,
19
19
  ScreenInterpolationProps,
@@ -95,65 +95,41 @@ export type BlankStackNavigationConfig = {};
95
95
 
96
96
  export type BlankStackOverlayProps = {
97
97
  /**
98
- * Options for the back button.
98
+ * Route of the currently focused screen in the stack.
99
99
  */
100
- back?: {
101
- /**
102
- * Title of the previous screen.
103
- */
104
- title: string;
105
- };
100
+ focusedRoute: Route<string>;
101
+
106
102
  /**
107
- * Route object for the current screen.
103
+ * Index of the focused route in the stack.
108
104
  */
109
- route: Route<string>;
105
+ focusedIndex: number;
106
+
110
107
  /**
111
- * Route object for the currently focused screen in the stack.
108
+ * Options passed to the overlay component.
112
109
  */
113
- focusedRoute: Route<string>;
110
+ overlayOptions?: {
111
+ title?: string;
112
+ subtitle?: string;
113
+ [key: string]: unknown;
114
+ };
115
+
114
116
  /**
115
117
  * Navigation prop for the overlay.
116
118
  */
117
119
  navigation: BlankStackNavigationProp<ParamListBase>;
118
- /**
119
- * Safe area insets for the screen.
120
- */
121
- insets: EdgeInsets;
120
+
122
121
  /**
123
122
  * Animation values for the overlay.
124
123
  */
125
124
  overlayAnimation: DerivedValue<OverlayInterpolationProps>;
125
+
126
126
  /**
127
127
  * Animation values for the screen.
128
128
  */
129
129
  screenAnimation: DerivedValue<ScreenInterpolationProps>;
130
- /**
131
- * Index of the active route
132
- */
133
- focusedIndex: number;
134
130
  };
135
131
 
136
- export type BlankStackScreenTransitionConfig = {
137
- /**
138
- * The user-provided function to calculate styles based on animation progress.
139
- */
140
- screenStyleInterpolator?: ScreenStyleInterpolator;
141
- /**
142
- * The Reanimated animation config for opening and closing transitions.
143
- */
144
- transitionSpec?: TransitionSpec;
145
- /**
146
- * Whether the gesture is enabled.
147
- */
148
- gestureEnabled?: boolean;
149
- /**
150
- * The direction of the swipe gesture used to dismiss the screen.
151
- */
152
- gestureDirection?: GestureDirection | GestureDirection[];
153
- /**
154
- * How much the gesture's final velocity impacts the dismiss decision.
155
- */
156
- gestureVelocityImpact?: number;
132
+ export type BlankStackScreenTransitionConfig = ScreenTransitionConfig & {
157
133
  /**
158
134
  * Whether to detach the previous screen from the view hierarchy to save memory.
159
135
  * Set it to `false` if you need the previous screen to be seen through the active screen.
@@ -161,18 +137,6 @@ export type BlankStackScreenTransitionConfig = {
161
137
  * Defaults to `false` for the last screen for modals, otherwise `true`.
162
138
  */
163
139
  detachPreviousScreen?: boolean;
164
- /**
165
- * Distance threshold for gesture recognition throughout the screen.
166
- */
167
- gestureResponseDistance?: number;
168
- /**
169
- * Whether the gesture drives the progress.
170
- */
171
- gestureDrivesProgress?: boolean;
172
- /**
173
- * The area of the screen where the gesture is activated.
174
- */
175
- gestureActivationArea?: GestureActivationArea;
176
140
  };
177
141
 
178
142
  export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
@@ -180,6 +144,7 @@ export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
180
144
  * Function that given `OverlayProps` returns a React Element to display as a overlay.
181
145
  */
182
146
  overlay?: (props: BlankStackOverlayProps) => React.ReactNode;
147
+
183
148
  /**
184
149
  * Layout: How the Overlay is positioned
185
150
  * - 'float': Single persistent overlay above all screens (like iOS)
@@ -187,6 +152,7 @@ export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
187
152
  * @default 'screen'
188
153
  */
189
154
  overlayMode?: "float" | "screen";
155
+
190
156
  /**
191
157
  * Whether to show the overlay. The overlay is shown by default.
192
158
  * Setting this to `false` hides the overlay.
@@ -194,56 +160,14 @@ export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
194
160
  overlayShown?: boolean;
195
161
 
196
162
  /**
197
- * Whether the home indicator should prefer to stay hidden on this screen. Defaults to `false`.
198
- *
199
- * @platform ios
200
- */
201
- autoHideHomeIndicator?: boolean;
202
- /**
203
- * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
204
- *
205
- * @platform ios
206
- */
207
- keyboardHandlingEnabled?: boolean;
208
- /**
209
- * Sets the visibility of the navigation bar. Defaults to `false`.
210
- *
211
- * @platform android
212
- */
213
- navigationBarHidden?: boolean;
214
- /**
215
- * Sets the status bar animation (similar to the `StatusBar` component).
216
- * On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar.
217
- * Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
218
- *
219
- * Defaults to `fade` on iOS and `none` on Android.
220
- *
221
- * Only supported on Android and iOS.
222
- *
223
- * @platform android, ios
224
- */
225
- statusBarAnimation?: ScreenProps["statusBarAnimation"];
226
- /**
227
- * Whether the status bar should be hidden on this screen.
228
- * Requires setting `View controller-based status bar appearance -> YES` in your Info.plist file.
229
- *
230
- * Only supported on Android and iOS.
231
- *
232
- * @platform android, ios
163
+ * Options passed to the overlay component.
233
164
  */
234
- statusBarHidden?: boolean;
235
- /**
236
- * Sets the status bar color (similar to the `StatusBar` component).
237
- * Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
238
- * `auto` and `inverted` are supported only on iOS. On Android, they will fallback to `light`.
239
- *
240
- * Defaults to `auto` on iOS and `light` on Android.
241
- *
242
- * Only supported on Android and iOS.
243
- *
244
- * @platform android, ios
245
- */
246
- statusBarStyle?: ScreenProps["statusBarStyle"];
165
+ overlayOptions?: {
166
+ title?: string;
167
+ subtitle?: string;
168
+ [key: string]: unknown;
169
+ };
170
+
247
171
  /**
248
172
  * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
249
173
  * Defaults to `true` when `enableFreeze()` is run at the top of the application.
@@ -3,10 +3,10 @@ import { useLayoutEffect, useState } from "react";
3
3
  import useStableCallback from "../../../../shared/hooks/use-stable-callback";
4
4
  import type { BlankStackDescriptorMap } from "../../../types";
5
5
  import type { StackNavigationContextProps } from "../_types";
6
- import { areDescriptorsEqual } from "../_utils/are-descriptors-equal";
7
- import { composeDescriptors } from "../_utils/compose-descriptors";
8
- import { haveSameRouteKeys } from "../_utils/have-same-route-keys";
9
- import { routesAreIdentical } from "../_utils/routes-are-identical";
6
+ import { areDescriptorsEqual } from "../helpers/are-descriptors-equal";
7
+ import { composeDescriptors } from "../helpers/compose-descriptors";
8
+ import { haveSameRouteKeys } from "../helpers/have-same-route-keys";
9
+ import { routesAreIdentical } from "../helpers/routes-are-identical";
10
10
  import { useClosingRouteKeys } from "./use-closing-route-keys";
11
11
  import { usePrevious } from "./use-previous";
12
12
 
@@ -1,11 +1,11 @@
1
1
  import { type ComponentType, createContext, useContext, useMemo } from "react";
2
2
  import type { BlankStackScene } from "../../types";
3
- import { useStackNavigationState } from "./_hooks/use-stack-navigation-state";
3
+ import { useStackNavigationState } from "./hooks/use-stack-navigation-state";
4
4
  import type {
5
5
  StackNavigationContextProps,
6
6
  StackNavigationContextValue,
7
7
  } from "./_types";
8
- import { calculateActiveScreensLimit } from "./_utils/calculate-active-screens-limit";
8
+ import { calculateActiveScreensLimit } from "./helpers/calculate-active-screens-limit";
9
9
 
10
10
  export const StackNavigationContext =
11
11
  createContext<StackNavigationContextValue | null>(null);
@@ -143,7 +143,14 @@ export type NativeStackHeaderLeftProps = NativeStackHeaderRightProps & {
143
143
  href?: string;
144
144
  };
145
145
 
146
- export type NativeStackNavigationOptions = ScreenTransitionConfig & {
146
+ export type NativeStackScreenTransitionConfig = ScreenTransitionConfig & {
147
+ /**
148
+ * Whether to enable transitions. It sets the presentation to containedTransparentModal, animation none, and headerShown to false.
149
+ */
150
+ enableTransitions?: boolean;
151
+ };
152
+
153
+ export type NativeStackNavigationOptions = NativeStackScreenTransitionConfig & {
147
154
  /**
148
155
  * String that can be displayed in the header as a fallback for `headerTitle`.
149
156
  */
@@ -13,6 +13,7 @@ export const SlideFromTop = (
13
13
  config: Partial<ScreenTransitionConfig> = {},
14
14
  ): ScreenTransitionConfig => {
15
15
  return {
16
+ //@ts-expect-error - Should not lead to any issues
16
17
  enableTransitions: true,
17
18
  gestureEnabled: true,
18
19
  gestureDirection: "vertical-inverted",
@@ -45,6 +46,7 @@ export const ZoomIn = (
45
46
  config: Partial<ScreenTransitionConfig> = {},
46
47
  ): ScreenTransitionConfig => {
47
48
  return {
49
+ //@ts-expect-error - Should not lead to any issues
48
50
  enableTransitions: true,
49
51
  gestureEnabled: false,
50
52
  screenStyleInterpolator: ({ progress }) => {
@@ -83,6 +85,7 @@ export const SlideFromBottom = (
83
85
  config: Partial<ScreenTransitionConfig> = {},
84
86
  ): ScreenTransitionConfig => {
85
87
  return {
88
+ //@ts-expect-error - Should not lead to any issues
86
89
  enableTransitions: true,
87
90
  gestureEnabled: true,
88
91
  gestureDirection: "vertical",
@@ -114,6 +117,7 @@ export const DraggableCard = (
114
117
  config: Partial<ScreenTransitionConfig> = {},
115
118
  ): ScreenTransitionConfig => {
116
119
  return {
120
+ //@ts-expect-error - Should not lead to any issues
117
121
  enableTransitions: true,
118
122
  gestureEnabled: true,
119
123
  gestureDirection: ["horizontal", "vertical"],
@@ -159,6 +163,7 @@ export const ElasticCard = (
159
163
  } = { elasticFactor: 0.5 },
160
164
  ): ScreenTransitionConfig => {
161
165
  return {
166
+ //@ts-expect-error - Should not lead to any issues
162
167
  enableTransitions: true,
163
168
  gestureEnabled: true,
164
169
  gestureDirection: "bidirectional",
@@ -535,7 +540,7 @@ export const SharedAppleMusic = ({
535
540
  damping: 500,
536
541
  mass: 3,
537
542
  overshootClamping: true,
538
- //@ts-expect-error
543
+ //@ts-expect-error - Should not lead to any issues
539
544
  restSpeedThreshold: 0.02,
540
545
  },
541
546
  close: {
@@ -543,7 +548,7 @@ export const SharedAppleMusic = ({
543
548
  damping: 60,
544
549
  mass: 4,
545
550
  overshootClamping: false,
546
- //@ts-expect-error
551
+ //@ts-expect-error - Should not lead to any issues
547
552
  restSpeedThreshold: 0.02,
548
553
  restDisplacementThreshold: 0.002,
549
554
  },
@@ -559,6 +564,7 @@ export const SharedXImage = ({
559
564
  sharedBoundTag: string;
560
565
  }): ScreenTransitionConfig => {
561
566
  return {
567
+ //@ts-expect-error - Should not lead to any issues
562
568
  enableTransitions: true,
563
569
  gestureEnabled: true,
564
570
  gestureDirection: ["vertical", "vertical-inverted"],
@@ -3,16 +3,19 @@ import { useMemo } from "react";
3
3
  import { useWindowDimensions } from "react-native";
4
4
  import { type SharedValue, useDerivedValue } from "react-native-reanimated";
5
5
  import { useSafeAreaInsets } from "react-native-safe-area-context";
6
-
6
+ import type { NativeStackScreenTransitionConfig } from "../../../native-stack/types";
7
7
  import { DEFAULT_SCREEN_TRANSITION_STATE } from "../../constants";
8
- import { type TransitionDescriptor, useKeys } from "../../providers/keys.provider";
9
-
8
+ import {
9
+ type TransitionDescriptor,
10
+ useKeys,
11
+ } from "../../providers/keys.provider";
10
12
  import { AnimationStore } from "../../stores/animation.store";
11
13
  import { GestureStore, type GestureStoreMap } from "../../stores/gesture.store";
12
14
  import type {
13
15
  ScreenInterpolationProps,
14
16
  ScreenTransitionState,
15
17
  } from "../../types/animation.types";
18
+ import type { ScreenTransitionConfig } from "../../types/core.types";
16
19
  import { derivations } from "../../utils/animation/derivations";
17
20
  import { createBounds } from "../../utils/bounds";
18
21
 
@@ -66,6 +69,11 @@ const useBuildScreenTransitionState = (
66
69
  }, [key, descriptor?.route]);
67
70
  };
68
71
 
72
+ const hasTransitionsEnabled = (options?: ScreenTransitionConfig) => {
73
+ "worklet";
74
+ return !!(options as NativeStackScreenTransitionConfig)?.enableTransitions;
75
+ };
76
+
69
77
  export function _useScreenAnimation() {
70
78
  const dimensions = useWindowDimensions();
71
79
  const insets = useSafeAreaInsets();
@@ -87,7 +95,7 @@ export function _useScreenAnimation() {
87
95
 
88
96
  const previous = unwrap(prevAnimation, previousDescriptor?.route.key);
89
97
 
90
- const next = nextDescriptor?.options?.enableTransitions
98
+ const next = hasTransitionsEnabled(nextDescriptor?.options)
91
99
  ? unwrap(nextAnimation, nextDescriptor?.route.key)
92
100
  : undefined;
93
101
 
@@ -1,5 +1,8 @@
1
1
  import type { AnimatedProps } from "react-native-reanimated";
2
- import type { ScreenStyleInterpolator, TransitionSpec } from "./animation.types";
2
+ import type {
3
+ ScreenStyleInterpolator,
4
+ TransitionSpec,
5
+ } from "./animation.types";
3
6
  import type { GestureActivationArea, GestureDirection } from "./gesture.types";
4
7
 
5
8
  export type Layout = {
@@ -97,9 +100,4 @@ export type ScreenTransitionConfig = {
97
100
  * The area of the screen where the gesture is activated.
98
101
  */
99
102
  gestureActivationArea?: GestureActivationArea;
100
-
101
- /**
102
- * Whether to enable transitions. It sets the presentation to containedTransparentModal, animation none, and headerShown to false.
103
- */
104
- enableTransitions?: boolean;
105
103
  };
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_useStableCallback","_interopRequireDefault","e","__esModule","default","useClosingRouteKeys","keysRef","useRef","Set","finishedRef","shared","useSharedValue","add","useStableCallback","key","keys","current","has","delete","modify","prev","includes","push","remove","index","indexOf","splice","clear","size","length","useMemo","ref","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA6E,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtE,MAAMG,mBAAmB,GAAGA,CAAA,KAAM;EACxC,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAc,IAAIC,GAAG,CAAC,CAAC,CAAC;EAC9C,MAAMC,WAAW,GAAG,IAAAF,aAAM,EAAc,IAAIC,GAAG,CAAC,CAAC,CAAC;EAClD,MAAME,MAAM,GAAG,IAAAC,qCAAc,EAAW,EAAE,CAAC;EAE3C,MAAMC,GAAG,GAAG,IAAAC,0BAAiB,EAAEC,GAAW,IAAK;IAC9C,MAAMC,IAAI,GAAGT,OAAO,CAACU,OAAO;IA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AAK,CAAC,CAAC;IAC3BjB,MAAM,CAACS,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACTA,IAAI,CAACS,MAAM,GAAG,CAAC;MACf,OAAOT,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAO,IAAAU,cAAO,EACb,OAAO;IACNC,GAAG,EAAEzB,OAAO;IACZI,MAAM;IACNE,GAAG;IACHW,MAAM;IACNI;EACD,CAAC,CAAC,EACF,CAACjB,MAAM,EAAEE,GAAG,EAAEW,MAAM,EAAEI,KAAK,CAC5B,CAAC;AACF,CAAC;AAACK,OAAA,CAAA3B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","usePrevious","value","ref","useRef","useEffect","current","exports"],"sourceRoot":"../../../../../../src","sources":["blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,WAAW,GAAQC,KAAQ,IAAe;EACtD,MAAMC,GAAG,GAAG,IAAAC,aAAM,EAAI,IAAI,CAAC;EAE3B,IAAAC,gBAAS,EAAC,MAAM;IACfF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACpB,CAAC,CAAC;EAEF,OAAOC,GAAG,CAACG,OAAO;AACnB,CAAC;AAACC,OAAA,CAAAN,WAAA,GAAAA,WAAA","ignoreList":[]}