@react-navigation/stack 7.0.0-alpha.8 → 7.0.0-alpha.9

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 (33) hide show
  1. package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
  2. package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +1 -1
  3. package/lib/commonjs/views/Header/Header.js.map +1 -1
  4. package/lib/commonjs/views/Header/HeaderContainer.js.map +1 -1
  5. package/lib/commonjs/views/Screens.js.map +1 -1
  6. package/lib/commonjs/views/Stack/Card.js +5 -0
  7. package/lib/commonjs/views/Stack/Card.js.map +1 -1
  8. package/lib/commonjs/views/Stack/CardStack.js +3 -1
  9. package/lib/commonjs/views/Stack/CardStack.js.map +1 -1
  10. package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
  11. package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
  12. package/lib/module/views/Header/Header.js.map +1 -1
  13. package/lib/module/views/Header/HeaderContainer.js.map +1 -1
  14. package/lib/module/views/Screens.js.map +1 -1
  15. package/lib/module/views/Stack/Card.js +5 -0
  16. package/lib/module/views/Stack/Card.js.map +1 -1
  17. package/lib/module/views/Stack/CardStack.js +3 -1
  18. package/lib/module/views/Stack/CardStack.js.map +1 -1
  19. package/lib/typescript/src/types.d.ts +33 -3
  20. package/lib/typescript/src/types.d.ts.map +1 -1
  21. package/lib/typescript/src/views/Screens.d.ts +1 -0
  22. package/lib/typescript/src/views/Screens.d.ts.map +1 -1
  23. package/lib/typescript/src/views/Stack/Card.d.ts.map +1 -1
  24. package/lib/typescript/src/views/Stack/CardStack.d.ts.map +1 -1
  25. package/package.json +18 -18
  26. package/src/TransitionConfigs/CardStyleInterpolators.tsx +5 -5
  27. package/src/TransitionConfigs/TransitionPresets.tsx +2 -2
  28. package/src/types.tsx +34 -3
  29. package/src/views/Header/Header.tsx +2 -2
  30. package/src/views/Header/HeaderContainer.tsx +2 -2
  31. package/src/views/Screens.tsx +1 -0
  32. package/src/views/Stack/Card.tsx +16 -9
  33. package/src/views/Stack/CardStack.tsx +16 -14
@@ -304,8 +304,8 @@ export class CardStack extends React.Component<Props, State> {
304
304
  optionsForTransitionConfig.presentation === 'modal'
305
305
  ? ModalTransition
306
306
  : optionsForTransitionConfig.presentation === 'transparentModal'
307
- ? ModalFadeTransition
308
- : DefaultTransition;
307
+ ? ModalFadeTransition
308
+ : DefaultTransition;
309
309
 
310
310
  const {
311
311
  animationEnabled = Platform.OS !== 'web' &&
@@ -560,16 +560,16 @@ export class CardStack extends React.Component<Props, State> {
560
560
  detachPreviousScreen = options.presentation === 'transparentModal'
561
561
  ? false
562
562
  : getIsModalPresentation(options.cardStyleInterpolator)
563
- ? i !==
564
- findLastIndex(scenes, (scene) => {
565
- const { cardStyleInterpolator } = scene.descriptor.options;
566
-
567
- return (
568
- cardStyleInterpolator === forModalPresentationIOS ||
569
- cardStyleInterpolator?.name === 'forModalPresentationIOS'
570
- );
571
- })
572
- : true,
563
+ ? i !==
564
+ findLastIndex(scenes, (scene) => {
565
+ const { cardStyleInterpolator } = scene.descriptor.options;
566
+
567
+ return (
568
+ cardStyleInterpolator === forModalPresentationIOS ||
569
+ cardStyleInterpolator?.name === 'forModalPresentationIOS'
570
+ );
571
+ })
572
+ : true,
573
573
  } = options;
574
574
 
575
575
  if (detachPreviousScreen === false) {
@@ -650,8 +650,8 @@ export class CardStack extends React.Component<Props, State> {
650
650
  index === routes.length - 1
651
651
  ? STATE_ON_TOP // the screen is on top after the transition
652
652
  : index >= routes.length - activeScreensLimit
653
- ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit
654
- : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit
653
+ ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit
654
+ : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit
655
655
  isScreenActive = sceneForActivity
656
656
  ? sceneForActivity.progress.current.interpolate({
657
657
  inputRange: [0, 1 - EPSILON, 1],
@@ -665,6 +665,7 @@ export class CardStack extends React.Component<Props, State> {
665
665
  headerShown = true,
666
666
  headerTransparent,
667
667
  freezeOnBlur,
668
+ autoHideHomeIndicator,
668
669
  } = scene.descriptor.options;
669
670
 
670
671
  const safeAreaInsetTop = insets.top;
@@ -698,6 +699,7 @@ export class CardStack extends React.Component<Props, State> {
698
699
  enabled={detachInactiveScreens}
699
700
  active={isScreenActive}
700
701
  freezeOnBlur={freezeOnBlur}
702
+ homeIndicatorHidden={autoHideHomeIndicator}
701
703
  pointerEvents="box-none"
702
704
  >
703
705
  <CardContainer