react-native-screens 3.29.0 → 3.30.1
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.
- package/README.md +7 -7
- package/RNScreens.podspec +3 -3
- package/android/CMakeLists.txt +27 -0
- package/android/build.gradle +21 -2
- package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +17 -14
- package/android/src/main/cpp/jni-adapter.cpp +110 -0
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +13 -8
- package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +8 -8
- package/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +38 -5
- package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +32 -42
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +76 -48
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +38 -35
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +43 -37
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +23 -23
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +73 -71
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +3 -3
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +5 -5
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +3 -3
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +3 -3
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +4 -4
- package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +13 -16
- package/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt +105 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +2 -2
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +1 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +14 -10
- package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +8 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +4 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +3 -3
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +9 -13
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +3 -7
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +3 -7
- package/android/src/main/jni/rnscreens.h +1 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +0 -1
- package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +2 -2
- package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +1 -1
- package/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java +32 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h +41 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp +15 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h +31 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +6 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +1 -5
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +1 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +8 -3
- package/cpp/RNScreensTurboModule.cpp +107 -0
- package/cpp/RNScreensTurboModule.h +43 -0
- package/gesture-handler/package.json +6 -0
- package/ios/RNSConvert.h +2 -0
- package/ios/RNSConvert.mm +5 -2
- package/ios/RNSEnums.h +1 -0
- package/ios/RNSModalScreen.h +8 -0
- package/ios/RNSModalScreen.mm +36 -0
- package/ios/RNSModule.h +19 -0
- package/ios/RNSModule.mm +174 -0
- package/ios/RNSScreen.h +4 -1
- package/ios/RNSScreen.mm +48 -26
- package/ios/RNSScreenStack.h +6 -0
- package/ios/RNSScreenStack.mm +81 -15
- package/ios/RNSScreenStackAnimator.mm +89 -1
- package/ios/RNSScreenStackHeaderConfig.mm +7 -1
- package/ios/RNSScreenWindowTraits.h +1 -1
- package/ios/RNSScreenWindowTraits.mm +24 -50
- package/ios/RNSSearchBar.mm +24 -0
- package/ios/utils/RNSUIBarButtonItem.h +2 -0
- package/lib/commonjs/TransitionProgressContext.js +3 -4
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/components/FullWindowOverlay.js +28 -0
- package/lib/commonjs/components/FullWindowOverlay.js.map +1 -0
- package/lib/commonjs/components/FullWindowOverlay.web.js +9 -0
- package/lib/commonjs/components/FullWindowOverlay.web.js.map +1 -0
- package/lib/commonjs/components/Screen.js +161 -0
- package/lib/commonjs/components/Screen.js.map +1 -0
- package/lib/commonjs/components/Screen.web.js +46 -0
- package/lib/commonjs/components/Screen.web.js.map +1 -0
- package/lib/commonjs/components/ScreenContainer.js +33 -0
- package/lib/commonjs/components/ScreenContainer.js.map +1 -0
- package/lib/commonjs/components/ScreenContainer.web.js +11 -0
- package/lib/commonjs/components/ScreenContainer.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStack.js +45 -0
- package/lib/commonjs/components/ScreenStack.js.map +1 -0
- package/lib/commonjs/components/ScreenStack.web.js +9 -0
- package/lib/commonjs/components/ScreenStack.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.js +53 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +27 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -0
- package/lib/commonjs/components/SearchBar.js +59 -0
- package/lib/commonjs/components/SearchBar.js.map +1 -0
- package/lib/commonjs/components/SearchBar.web.js +11 -0
- package/lib/commonjs/components/SearchBar.web.js.map +1 -0
- package/lib/commonjs/components/helpers/DelayedFreeze.js +32 -0
- package/lib/commonjs/components/helpers/DelayedFreeze.js.map +1 -0
- package/lib/commonjs/core.js +41 -0
- package/lib/commonjs/core.js.map +1 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +1 -2
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js +13 -0
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/NativeScreensModule.js +10 -0
- package/lib/commonjs/fabric/NativeScreensModule.js.map +1 -0
- package/lib/commonjs/fabric/NativeScreensModule.web.js +8 -0
- package/lib/commonjs/fabric/NativeScreensModule.web.js.map +1 -0
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +1 -2
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +3 -5
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +19 -0
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js.map +1 -0
- package/lib/commonjs/gesture-handler/RNScreensTurboModule.js +8 -0
- package/lib/commonjs/gesture-handler/RNScreensTurboModule.js.map +1 -0
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js +202 -0
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js.map +1 -0
- package/lib/commonjs/gesture-handler/constraints.js +64 -0
- package/lib/commonjs/gesture-handler/constraints.js.map +1 -0
- package/lib/commonjs/gesture-handler/defaults.js +38 -0
- package/lib/commonjs/gesture-handler/defaults.js.map +1 -0
- package/lib/commonjs/gesture-handler/fabricUtils.js +30 -0
- package/lib/commonjs/gesture-handler/fabricUtils.js.map +1 -0
- package/lib/commonjs/gesture-handler/fabricUtils.web.js +17 -0
- package/lib/commonjs/gesture-handler/fabricUtils.web.js.map +1 -0
- package/lib/commonjs/gesture-handler/index.js +14 -0
- package/lib/commonjs/gesture-handler/index.js.map +1 -0
- package/lib/commonjs/index.js +183 -100
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-stack/contexts/GHContext.js +11 -0
- package/lib/commonjs/native-stack/contexts/GHContext.js.map +1 -0
- package/lib/commonjs/native-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +20 -24
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/types.js.map +1 -1
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +3 -4
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +3 -4
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +2 -2
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getStatusBarHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +2 -2
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +2 -4
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js +2 -2
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +1 -2
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js +11 -7
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +50 -15
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +3 -4
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +6 -9
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js +1 -2
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +6 -14
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +3 -4
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +2 -2
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +2 -2
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js +2 -2
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/commonjs/utils.js +2 -4
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/TransitionProgressContext.js.map +1 -1
- package/lib/module/components/FullWindowOverlay.js +21 -0
- package/lib/module/components/FullWindowOverlay.js.map +1 -0
- package/lib/module/components/FullWindowOverlay.web.js +3 -0
- package/lib/module/components/FullWindowOverlay.web.js.map +1 -0
- package/lib/module/components/Screen.js +156 -0
- package/lib/module/components/Screen.js.map +1 -0
- package/lib/module/components/Screen.web.js +38 -0
- package/lib/module/components/Screen.web.js.map +1 -0
- package/lib/module/components/ScreenContainer.js +26 -0
- package/lib/module/components/ScreenContainer.js.map +1 -0
- package/lib/module/components/ScreenContainer.web.js +5 -0
- package/lib/module/components/ScreenContainer.web.js.map +1 -0
- package/lib/module/components/ScreenStack.js +40 -0
- package/lib/module/components/ScreenStack.js.map +1 -0
- package/lib/module/components/ScreenStack.web.js +3 -0
- package/lib/module/components/ScreenStack.web.js.map +1 -0
- package/lib/module/components/ScreenStackHeaderConfig.js +43 -0
- package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/module/components/ScreenStackHeaderConfig.web.js +14 -0
- package/lib/module/components/ScreenStackHeaderConfig.web.js.map +1 -0
- package/lib/module/components/SearchBar.js +52 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/SearchBar.web.js +5 -0
- package/lib/module/components/SearchBar.web.js.map +1 -0
- package/lib/module/components/helpers/DelayedFreeze.js +25 -0
- package/lib/module/components/helpers/DelayedFreeze.js.map +1 -0
- package/lib/module/core.js +31 -0
- package/lib/module/core.js.map +1 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/fabric/ModalScreenNativeComponent.js +8 -0
- package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -0
- package/lib/module/fabric/NativeScreensModule.js +5 -0
- package/lib/module/fabric/NativeScreensModule.js.map +1 -0
- package/lib/module/fabric/NativeScreensModule.web.js +2 -0
- package/lib/module/fabric/NativeScreensModule.web.js.map +1 -0
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/module/gesture-handler/GestureDetectorProvider.js +12 -0
- package/lib/module/gesture-handler/GestureDetectorProvider.js.map +1 -0
- package/lib/module/gesture-handler/RNScreensTurboModule.js +2 -0
- package/lib/module/gesture-handler/RNScreensTurboModule.js.map +1 -0
- package/lib/module/gesture-handler/ScreenGestureDetector.js +194 -0
- package/lib/module/gesture-handler/ScreenGestureDetector.js.map +1 -0
- package/lib/module/gesture-handler/constraints.js +56 -0
- package/lib/module/gesture-handler/constraints.js.map +1 -0
- package/lib/module/gesture-handler/defaults.js +32 -0
- package/lib/module/gesture-handler/defaults.js.map +1 -0
- package/lib/module/gesture-handler/fabricUtils.js +23 -0
- package/lib/module/gesture-handler/fabricUtils.js.map +1 -0
- package/lib/module/gesture-handler/fabricUtils.web.js +10 -0
- package/lib/module/gesture-handler/fabricUtils.web.js.map +1 -0
- package/lib/module/gesture-handler/index.js +5 -0
- package/lib/module/gesture-handler/index.js.map +1 -0
- package/lib/module/index.js +31 -64
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-stack/contexts/GHContext.js +4 -0
- package/lib/module/native-stack/contexts/GHContext.js.map +1 -0
- package/lib/module/native-stack/index.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +17 -20
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/types.js.map +1 -1
- package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
- package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/getStatusBarHeight.js.map +1 -1
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/useBackPressSubscription.js +2 -4
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/views/FontProcessor.js +1 -2
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/native-stack/views/HeaderConfig.js +8 -5
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +49 -14
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +2 -4
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js +6 -14
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/module/reanimated/index.js.map +1 -1
- package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useTransitionProgress.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/TransitionProgressContext.d.ts +1 -0
- package/lib/typescript/TransitionProgressContext.d.ts.map +1 -0
- package/lib/typescript/components/FullWindowOverlay.d.ts +6 -0
- package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -0
- package/lib/typescript/components/FullWindowOverlay.web.d.ts +6 -0
- package/lib/typescript/components/FullWindowOverlay.web.d.ts.map +1 -0
- package/lib/typescript/components/Screen.d.ts +20 -0
- package/lib/typescript/components/Screen.d.ts.map +1 -0
- package/lib/typescript/components/Screen.web.d.ts +11 -0
- package/lib/typescript/components/Screen.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContainer.d.ts +7 -0
- package/lib/typescript/components/ScreenContainer.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContainer.web.d.ts +5 -0
- package/lib/typescript/components/ScreenContainer.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStack.d.ts +5 -0
- package/lib/typescript/components/ScreenStack.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStack.web.d.ts +3 -0
- package/lib/typescript/components/ScreenStack.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +13 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +13 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -0
- package/lib/typescript/components/SearchBar.d.ts +26 -0
- package/lib/typescript/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/components/SearchBar.web.d.ts +5 -0
- package/lib/typescript/components/SearchBar.web.d.ts.map +1 -0
- package/lib/typescript/components/helpers/DelayedFreeze.d.ts +8 -0
- package/lib/typescript/components/helpers/DelayedFreeze.d.ts.map +1 -0
- package/lib/typescript/core.d.ts +7 -0
- package/lib/typescript/core.d.ts.map +1 -0
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +68 -0
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/NativeScreensModule.d.ts +6 -0
- package/lib/typescript/fabric/NativeScreensModule.d.ts.map +1 -0
- package/lib/typescript/fabric/NativeScreensModule.web.d.ts +3 -0
- package/lib/typescript/fabric/NativeScreensModule.web.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +2 -1
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +3 -1
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts +5 -0
- package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts +13 -0
- package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts +5 -0
- package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/constraints.d.ts +6 -0
- package/lib/typescript/gesture-handler/constraints.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/defaults.d.ts +20 -0
- package/lib/typescript/gesture-handler/defaults.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/fabricUtils.d.ts +8 -0
- package/lib/typescript/gesture-handler/fabricUtils.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/fabricUtils.web.d.ts +6 -0
- package/lib/typescript/gesture-handler/fabricUtils.web.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/index.d.ts +2 -0
- package/lib/typescript/gesture-handler/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +11 -31
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/contexts/GHContext.d.ts +4 -0
- package/lib/typescript/native-stack/contexts/GHContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/index.d.ts +1 -0
- package/lib/typescript/native-stack/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
- package/lib/typescript/native-stack/types.d.ts +39 -2
- package/lib/typescript/native-stack/types.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +1 -0
- package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts +1 -0
- package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -0
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -0
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +2 -2
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +2 -2
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts.map +1 -0
- package/lib/typescript/reanimated/index.d.ts +1 -0
- package/lib/typescript/reanimated/index.d.ts.map +1 -0
- package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +2 -3
- package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts +4 -9
- package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +11 -2
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/useTransitionProgress.d.ts +1 -0
- package/lib/typescript/useTransitionProgress.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +1 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/native-stack/README.md +2 -1
- package/native-stack/package.json +1 -1
- package/package.json +17 -11
- package/react-native.config.js +2 -1
- package/reanimated/package.json +1 -1
- package/src/components/FullWindowOverlay.tsx +25 -0
- package/src/components/FullWindowOverlay.web.tsx +6 -0
- package/src/components/Screen.tsx +218 -0
- package/src/components/Screen.web.tsx +43 -0
- package/src/components/ScreenContainer.tsx +33 -0
- package/src/components/ScreenContainer.web.tsx +6 -0
- package/src/components/ScreenStack.tsx +41 -0
- package/src/components/ScreenStack.web.tsx +3 -0
- package/src/components/ScreenStackHeaderConfig.tsx +76 -0
- package/src/components/ScreenStackHeaderConfig.web.tsx +39 -0
- package/src/components/SearchBar.tsx +91 -0
- package/src/components/SearchBar.web.tsx +6 -0
- package/src/components/helpers/DelayedFreeze.tsx +27 -0
- package/src/core.ts +43 -0
- package/src/fabric/ModalScreenNativeComponent.ts +104 -0
- package/src/fabric/NativeScreensModule.ts +7 -0
- package/src/fabric/NativeScreensModule.web.ts +1 -0
- package/src/fabric/ScreenNativeComponent.ts +1 -1
- package/src/fabric/SearchBarNativeComponent.ts +2 -0
- package/src/gesture-handler/GestureDetectorProvider.tsx +16 -0
- package/src/gesture-handler/RNScreensTurboModule.ts +13 -0
- package/src/gesture-handler/ScreenGestureDetector.tsx +241 -0
- package/src/gesture-handler/constraints.ts +87 -0
- package/src/gesture-handler/defaults.ts +38 -0
- package/src/gesture-handler/fabricUtils.ts +39 -0
- package/src/gesture-handler/fabricUtils.web.ts +10 -0
- package/src/gesture-handler/index.tsx +4 -0
- package/src/index.tsx +65 -112
- package/src/native-stack/contexts/GHContext.tsx +7 -0
- package/src/native-stack/types.tsx +62 -1
- package/src/native-stack/views/HeaderConfig.tsx +11 -0
- package/src/native-stack/views/NativeStackView.tsx +65 -13
- package/src/types.tsx +13 -1
- package/lib/commonjs/index.native.js +0 -418
- package/lib/commonjs/index.native.js.map +0 -1
- package/lib/module/index.native.js +0 -415
- package/lib/module/index.native.js.map +0 -1
- package/lib/typescript/index.native.d.ts +0 -2
- package/src/index.native.tsx +0 -619
package/ios/RNSModule.mm
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#import "RNSModule.h"
|
|
2
|
+
#import <React/RCTBridge+Private.h>
|
|
3
|
+
#import <React/RCTBridge.h>
|
|
4
|
+
#import <React/RCTUIManager.h>
|
|
5
|
+
#import <React/RCTUIManagerUtils.h>
|
|
6
|
+
#import <React/RCTUtils.h>
|
|
7
|
+
#include <jsi/jsi.h>
|
|
8
|
+
#import "RNSScreenStack.h"
|
|
9
|
+
#import "RNScreensTurboModule.h"
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
@implementation RNSModule {
|
|
14
|
+
std::atomic<bool> isActiveTransition;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
RCT_EXPORT_MODULE()
|
|
18
|
+
|
|
19
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
20
|
+
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
|
|
21
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
22
|
+
@synthesize bridge = _bridge;
|
|
23
|
+
|
|
24
|
+
- (dispatch_queue_t)methodQueue
|
|
25
|
+
{
|
|
26
|
+
// It seems that due to how UIBlocks work with uiManager, we need to call the methods there
|
|
27
|
+
// for the blocks to be dispatched before the batch is completed
|
|
28
|
+
return dispatch_get_main_queue();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (NSDictionary *)constantsToExport
|
|
32
|
+
{
|
|
33
|
+
[self installHostObject];
|
|
34
|
+
return @{};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
+ (BOOL)requiresMainQueueSetup
|
|
38
|
+
{
|
|
39
|
+
return NO;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
- (RNSScreenStackView *)getScreenStackView:(NSNumber *)reactTag
|
|
43
|
+
{
|
|
44
|
+
RCTAssertMainQueue();
|
|
45
|
+
RNSScreenStackView *view;
|
|
46
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
47
|
+
view = (RNSScreenStackView *)[self.viewRegistry_DEPRECATED viewForReactTag:reactTag];
|
|
48
|
+
#else
|
|
49
|
+
view = (RNSScreenStackView *)[self.bridge.uiManager viewForReactTag:reactTag];
|
|
50
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
51
|
+
return view;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
- (NSArray<NSNumber *> *)startTransition:(NSNumber *)stackTag
|
|
55
|
+
{
|
|
56
|
+
RCTAssertMainQueue();
|
|
57
|
+
RNSScreenStackView *stackView = [self getStackView:stackTag];
|
|
58
|
+
if (stackView == nil || isActiveTransition) {
|
|
59
|
+
return @[ @(-1), @(-1) ];
|
|
60
|
+
}
|
|
61
|
+
NSArray<NSNumber *> *screenTags = @[ @(-1), @(-1) ];
|
|
62
|
+
auto screens = stackView.reactViewController.childViewControllers;
|
|
63
|
+
unsigned long screenCount = [screens count];
|
|
64
|
+
if (screenCount > 1) {
|
|
65
|
+
UIView *topScreen = screens[screenCount - 1].view;
|
|
66
|
+
UIView *belowTopScreen = screens[screenCount - 2].view;
|
|
67
|
+
belowTopScreen.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0);
|
|
68
|
+
isActiveTransition = true;
|
|
69
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
70
|
+
screenTags = @[ @(topScreen.tag), @(belowTopScreen.tag) ];
|
|
71
|
+
#else
|
|
72
|
+
screenTags = @[ topScreen.reactTag, belowTopScreen.reactTag ];
|
|
73
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
74
|
+
[stackView startScreenTransition];
|
|
75
|
+
}
|
|
76
|
+
return screenTags;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
- (bool)updateTransition:(NSNumber *)stackTag progress:(double)progress
|
|
80
|
+
{
|
|
81
|
+
RCTAssertMainQueue();
|
|
82
|
+
RNSScreenStackView *stackView = [self getStackView:stackTag];
|
|
83
|
+
if (stackView == nil || !isActiveTransition) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
[stackView updateScreenTransition:progress];
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
- (bool)finishTransition:(NSNumber *)stackTag canceled:(bool)canceled
|
|
91
|
+
{
|
|
92
|
+
RCTAssertMainQueue();
|
|
93
|
+
RNSScreenStackView *stackView = [self getStackView:stackTag];
|
|
94
|
+
if (stackView == nil || !isActiveTransition) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
[stackView finishScreenTransition:canceled];
|
|
98
|
+
if (!canceled) {
|
|
99
|
+
stackView.disableSwipeBack = NO;
|
|
100
|
+
}
|
|
101
|
+
isActiveTransition = false;
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
- (void)disableSwipeBackForTopScreen:(NSNumber *)stackTag
|
|
106
|
+
{
|
|
107
|
+
RCTAssertMainQueue();
|
|
108
|
+
RNSScreenStackView *stackView = [self getStackView:stackTag];
|
|
109
|
+
if (stackView == nil) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
stackView.disableSwipeBack = YES;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
- (RNSScreenStackView *)getStackView:(NSNumber *)stackTag
|
|
116
|
+
{
|
|
117
|
+
RNSScreenStackView *view = [self getScreenStackView:stackTag];
|
|
118
|
+
if (view != nil && ![view isKindOfClass:[RNSScreenStackView class]]) {
|
|
119
|
+
RCTLogError(@"Invalid view type, expecting RNSScreenStackView, got: %@", view);
|
|
120
|
+
return nil;
|
|
121
|
+
}
|
|
122
|
+
return view;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
126
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
127
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
128
|
+
{
|
|
129
|
+
[self installHostObject];
|
|
130
|
+
return std::make_shared<facebook::react::NativeScreensModuleSpecJSI>(params);
|
|
131
|
+
}
|
|
132
|
+
#endif
|
|
133
|
+
|
|
134
|
+
- (void)installHostObject
|
|
135
|
+
{
|
|
136
|
+
/*
|
|
137
|
+
installHostObject method is called from constantsToExport and getTurboModule,
|
|
138
|
+
because depending on the selected architecture, only one method will be called.
|
|
139
|
+
For `Paper`, it will be constantsToExport, and for `Fabric`, it will be getTurboModule.
|
|
140
|
+
*/
|
|
141
|
+
RCTBridge *bridge = [RCTBridge currentBridge];
|
|
142
|
+
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge;
|
|
143
|
+
if (cxxBridge != nil) {
|
|
144
|
+
auto jsiRuntime = (jsi::Runtime *)cxxBridge.runtime;
|
|
145
|
+
if (jsiRuntime != nil) {
|
|
146
|
+
auto &runtime = *jsiRuntime;
|
|
147
|
+
__weak auto weakSelf = self;
|
|
148
|
+
|
|
149
|
+
const auto &startTransition = [weakSelf](int stackTag) -> std::array<int, 2> {
|
|
150
|
+
auto screensTags = [weakSelf startTransition:@(stackTag)];
|
|
151
|
+
return {[screensTags[0] intValue], [screensTags[1] intValue]};
|
|
152
|
+
};
|
|
153
|
+
const auto &updateTransition = [weakSelf](int stackTag, double progress) {
|
|
154
|
+
[weakSelf updateTransition:@(stackTag) progress:progress];
|
|
155
|
+
};
|
|
156
|
+
const auto &finishTransition = [weakSelf](int stackTag, bool canceled) {
|
|
157
|
+
[weakSelf finishTransition:@(stackTag) canceled:canceled];
|
|
158
|
+
};
|
|
159
|
+
const auto &disableSwipeBackForTopScreen = [weakSelf](int stackTag) {
|
|
160
|
+
[weakSelf disableSwipeBackForTopScreen:@(stackTag)];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
auto rnScreensModule = std::make_shared<RNScreens::RNScreensTurboModule>(
|
|
164
|
+
startTransition, updateTransition, finishTransition, disableSwipeBackForTopScreen);
|
|
165
|
+
auto rnScreensModuleHostObject = jsi::Object::createFromHostObject(runtime, rnScreensModule);
|
|
166
|
+
runtime.global().setProperty(
|
|
167
|
+
runtime, RNScreens::RNScreensTurboModule::MODULE_NAME, std::move(rnScreensModuleHostObject));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@end
|
|
173
|
+
|
|
174
|
+
NS_ASSUME_NONNULL_END
|
package/ios/RNSScreen.h
CHANGED
|
@@ -42,6 +42,7 @@ namespace react = facebook::react;
|
|
|
42
42
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
43
43
|
- (void)setViewToSnapshot:(UIView *)snapshot;
|
|
44
44
|
- (void)resetViewToScreen;
|
|
45
|
+
- (CGFloat)calculateHeaderHeightIsModal:(BOOL)isModal;
|
|
45
46
|
#endif
|
|
46
47
|
|
|
47
48
|
@end
|
|
@@ -121,7 +122,9 @@ namespace react = facebook::react;
|
|
|
121
122
|
- (void)updateBounds;
|
|
122
123
|
- (void)notifyDismissedWithCount:(int)dismissCount;
|
|
123
124
|
- (instancetype)initWithFrame:(CGRect)frame;
|
|
124
|
-
#
|
|
125
|
+
#else
|
|
126
|
+
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
127
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
125
128
|
|
|
126
129
|
- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward;
|
|
127
130
|
- (void)notifyDismissCancelledWithDismissCount:(int)dismissCount;
|
package/ios/RNSScreen.mm
CHANGED
|
@@ -38,13 +38,13 @@ namespace react = facebook::react;
|
|
|
38
38
|
@end
|
|
39
39
|
|
|
40
40
|
@implementation RNSScreenView {
|
|
41
|
-
__weak RCTBridge *_bridge;
|
|
42
41
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
43
42
|
RCTSurfaceTouchHandler *_touchHandler;
|
|
44
43
|
react::RNSScreenShadowNode::ConcreteState::Shared _state;
|
|
45
44
|
// on fabric, they are not available by default so we need them exposed here too
|
|
46
45
|
NSMutableArray<UIView *> *_reactSubviews;
|
|
47
46
|
#else
|
|
47
|
+
__weak RCTBridge *_bridge;
|
|
48
48
|
RCTTouchHandler *_touchHandler;
|
|
49
49
|
CGRect _reactFrame;
|
|
50
50
|
#endif
|
|
@@ -61,8 +61,7 @@ namespace react = facebook::react;
|
|
|
61
61
|
}
|
|
62
62
|
return self;
|
|
63
63
|
}
|
|
64
|
-
#
|
|
65
|
-
|
|
64
|
+
#else
|
|
66
65
|
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
|
67
66
|
{
|
|
68
67
|
if (self = [super init]) {
|
|
@@ -72,6 +71,7 @@ namespace react = facebook::react;
|
|
|
72
71
|
|
|
73
72
|
return self;
|
|
74
73
|
}
|
|
74
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
75
75
|
|
|
76
76
|
- (void)initCommonProps
|
|
77
77
|
{
|
|
@@ -107,7 +107,12 @@ namespace react = facebook::react;
|
|
|
107
107
|
{
|
|
108
108
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
109
109
|
if (_state != nullptr) {
|
|
110
|
-
|
|
110
|
+
RNSScreenStackHeaderConfig *config = [self findHeaderConfig];
|
|
111
|
+
// in large title, ScrollView handles the offset of content so we cannot set it here also.
|
|
112
|
+
CGFloat headerHeight =
|
|
113
|
+
config.largeTitle ? 0 : [_controller calculateHeaderHeightIsModal:self.isPresentedAsNativeModal];
|
|
114
|
+
auto newState =
|
|
115
|
+
react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size), RCTPointFromCGPoint(CGPointMake(0, headerHeight))};
|
|
111
116
|
_state->updateState(std::move(newState));
|
|
112
117
|
UINavigationController *navctr = _controller.navigationController;
|
|
113
118
|
[navctr.view setNeedsLayout];
|
|
@@ -194,6 +199,7 @@ namespace react = facebook::react;
|
|
|
194
199
|
case RNSScreenStackAnimationSimplePush:
|
|
195
200
|
case RNSScreenStackAnimationSlideFromBottom:
|
|
196
201
|
case RNSScreenStackAnimationFadeFromBottom:
|
|
202
|
+
case RNSScreenStackAnimationSlideFromLeft:
|
|
197
203
|
// Default
|
|
198
204
|
break;
|
|
199
205
|
}
|
|
@@ -229,7 +235,7 @@ namespace react = facebook::react;
|
|
|
229
235
|
}
|
|
230
236
|
}
|
|
231
237
|
|
|
232
|
-
#if !TARGET_OS_TV
|
|
238
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
233
239
|
- (void)setStatusBarStyle:(RNSStatusBarStyle)statusBarStyle
|
|
234
240
|
{
|
|
235
241
|
_hasStatusBarStyleSet = YES;
|
|
@@ -560,13 +566,19 @@ namespace react = facebook::react;
|
|
|
560
566
|
}
|
|
561
567
|
}
|
|
562
568
|
|
|
563
|
-
- (RNSScreenStackHeaderConfig *
|
|
569
|
+
- (nullable RNSScreenStackHeaderConfig *)findHeaderConfig
|
|
564
570
|
{
|
|
571
|
+
// Fast path
|
|
572
|
+
if ([self.reactSubviews.lastObject isKindOfClass:RNSScreenStackHeaderConfig.class]) {
|
|
573
|
+
return (RNSScreenStackHeaderConfig *)self.reactSubviews.lastObject;
|
|
574
|
+
}
|
|
575
|
+
|
|
565
576
|
for (UIView *view in self.reactSubviews) {
|
|
566
577
|
if ([view isKindOfClass:RNSScreenStackHeaderConfig.class]) {
|
|
567
578
|
return (RNSScreenStackHeaderConfig *)view;
|
|
568
579
|
}
|
|
569
580
|
}
|
|
581
|
+
|
|
570
582
|
return nil;
|
|
571
583
|
}
|
|
572
584
|
|
|
@@ -598,7 +610,7 @@ namespace react = facebook::react;
|
|
|
598
610
|
self.controller.modalPresentationStyle == UIModalPresentationOverCurrentContext;
|
|
599
611
|
}
|
|
600
612
|
|
|
601
|
-
#if !TARGET_OS_TV
|
|
613
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
602
614
|
/**
|
|
603
615
|
* Updates settings for sheet presentation controller.
|
|
604
616
|
* Note that this method should not be called inside `stackPresentation` setter, because on Paper we don't have
|
|
@@ -815,7 +827,7 @@ namespace react = facebook::react;
|
|
|
815
827
|
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
|
|
816
828
|
{
|
|
817
829
|
[super finalizeUpdates:updateMask];
|
|
818
|
-
#if !TARGET_OS_TV
|
|
830
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
819
831
|
[self updatePresentationStyle];
|
|
820
832
|
#endif // !TARGET_OS_TV
|
|
821
833
|
}
|
|
@@ -826,7 +838,7 @@ namespace react = facebook::react;
|
|
|
826
838
|
- (void)didSetProps:(NSArray<NSString *> *)changedProps
|
|
827
839
|
{
|
|
828
840
|
[super didSetProps:changedProps];
|
|
829
|
-
#if !TARGET_OS_TV
|
|
841
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
830
842
|
[self updatePresentationStyle];
|
|
831
843
|
#endif // !TARGET_OS_TV
|
|
832
844
|
}
|
|
@@ -1059,7 +1071,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
|
|
|
1059
1071
|
|
|
1060
1072
|
- (CGSize)getStatusBarHeightIsModal:(BOOL)isModal
|
|
1061
1073
|
{
|
|
1062
|
-
#if !TARGET_OS_TV
|
|
1074
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
1063
1075
|
CGSize fallbackStatusBarSize = [[UIApplication sharedApplication] statusBarFrame].size;
|
|
1064
1076
|
|
|
1065
1077
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
|
|
@@ -1105,17 +1117,11 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
|
|
|
1105
1117
|
{
|
|
1106
1118
|
UINavigationController *navctr = [self getVisibleNavigationControllerIsModal:isModal];
|
|
1107
1119
|
|
|
1108
|
-
// If navigation controller
|
|
1109
|
-
//
|
|
1110
|
-
//
|
|
1111
|
-
// just want to return status bar height (if it's hidden, it will simply return 0).
|
|
1120
|
+
// If there's no navigation controller for the modal (or the navigation bar is hidden), we simply don't want to
|
|
1121
|
+
// return header height, as modal possibly does not have header when navigation controller is nil,
|
|
1122
|
+
// and we don't want to count status bar if navigation bar is hidden (inset could be negative).
|
|
1112
1123
|
if (navctr == nil || navctr.isNavigationBarHidden) {
|
|
1113
|
-
|
|
1114
|
-
return 0;
|
|
1115
|
-
} else {
|
|
1116
|
-
CGSize statusBarSize = [self getStatusBarHeightIsModal:isModal];
|
|
1117
|
-
return MIN(statusBarSize.width, statusBarSize.height);
|
|
1118
|
-
}
|
|
1124
|
+
return 0;
|
|
1119
1125
|
}
|
|
1120
1126
|
|
|
1121
1127
|
CGFloat navbarHeight = navctr.navigationBar.frame.size.height;
|
|
@@ -1220,15 +1226,28 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
|
|
|
1220
1226
|
UIViewController *lastViewController = [[self childViewControllers] lastObject];
|
|
1221
1227
|
if ([self.presentedViewController isKindOfClass:[RNSScreen class]]) {
|
|
1222
1228
|
lastViewController = self.presentedViewController;
|
|
1229
|
+
|
|
1230
|
+
if (!includingModals) {
|
|
1231
|
+
return nil;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1223
1234
|
// we don't want to allow controlling of status bar appearance when we present non-fullScreen modal
|
|
1224
1235
|
// and it is not possible if `modalPresentationCapturesStatusBarAppearance` is not set to YES, so even
|
|
1225
1236
|
// if we went into a modal here and ask it, it wouldn't take any effect. For fullScreen modals, the system
|
|
1226
1237
|
// asks them by itself, so we can stop traversing here.
|
|
1227
1238
|
// for screen orientation, we need to start the search again from that modal
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1239
|
+
UIViewController *modalOrChild = [(RNSScreen *)lastViewController findChildVCForConfigAndTrait:trait
|
|
1240
|
+
includingModals:includingModals];
|
|
1241
|
+
if (modalOrChild != nil) {
|
|
1242
|
+
return modalOrChild;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
// if searched VC was not found, we don't want to search for configs of child VCs any longer,
|
|
1246
|
+
// and we don't want to rely on lastViewController.
|
|
1247
|
+
// That's because the modal did not find a child VC that has an orientation set,
|
|
1248
|
+
// and it doesn't itself have an orientation set. Hence, we fallback to the standard behavior.
|
|
1249
|
+
// Please keep in mind that this behavior might be wrong and could lead to undiscovered bugs.
|
|
1250
|
+
// For more information, see https://github.com/software-mansion/react-native-screens/pull/2008.
|
|
1232
1251
|
}
|
|
1233
1252
|
|
|
1234
1253
|
UIViewController *selfOrNil = [self hasTraitSet:trait] ? self : nil;
|
|
@@ -1486,7 +1505,7 @@ RCT_EXPORT_VIEW_PROPERTY(sheetCornerRadius, CGFloat);
|
|
|
1486
1505
|
RCT_EXPORT_VIEW_PROPERTY(sheetExpandsWhenScrolledToEdge, BOOL);
|
|
1487
1506
|
#endif
|
|
1488
1507
|
|
|
1489
|
-
#if !TARGET_OS_TV
|
|
1508
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
1490
1509
|
// See:
|
|
1491
1510
|
// 1. https://github.com/software-mansion/react-native-screens/pull/1543
|
|
1492
1511
|
// 2. https://github.com/software-mansion/react-native-screens/pull/1596
|
|
@@ -1509,10 +1528,13 @@ RCT_EXPORT_VIEW_PROPERTY(sheetExpandsWhenScrolledToEdge, BOOL);
|
|
|
1509
1528
|
}
|
|
1510
1529
|
#endif // !TARGET_OS_TV
|
|
1511
1530
|
|
|
1531
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
1532
|
+
#else
|
|
1512
1533
|
- (UIView *)view
|
|
1513
1534
|
{
|
|
1514
1535
|
return [[RNSScreenView alloc] initWithBridge:self.bridge];
|
|
1515
1536
|
}
|
|
1537
|
+
#endif
|
|
1516
1538
|
|
|
1517
1539
|
+ (BOOL)requiresMainQueueSetup
|
|
1518
1540
|
{
|
|
@@ -1551,7 +1573,7 @@ RCT_ENUM_CONVERTER(
|
|
|
1551
1573
|
@"simple_push" : @(RNSScreenStackAnimationSimplePush),
|
|
1552
1574
|
@"slide_from_bottom" : @(RNSScreenStackAnimationSlideFromBottom),
|
|
1553
1575
|
@"slide_from_right" : @(RNSScreenStackAnimationDefault),
|
|
1554
|
-
@"slide_from_left" : @(
|
|
1576
|
+
@"slide_from_left" : @(RNSScreenStackAnimationSlideFromLeft),
|
|
1555
1577
|
@"ios" : @(RNSScreenStackAnimationDefault),
|
|
1556
1578
|
}),
|
|
1557
1579
|
RNSScreenStackAnimationDefault,
|
package/ios/RNSScreenStack.h
CHANGED
|
@@ -22,6 +22,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
22
22
|
|
|
23
23
|
- (void)markChildUpdated;
|
|
24
24
|
- (void)didUpdateChildren;
|
|
25
|
+
- (void)startScreenTransition;
|
|
26
|
+
- (void)updateScreenTransition:(double)progress;
|
|
27
|
+
- (void)finishScreenTransition:(BOOL)canceled;
|
|
28
|
+
|
|
29
|
+
@property (nonatomic) BOOL customAnimation;
|
|
30
|
+
@property (nonatomic) BOOL disableSwipeBack;
|
|
25
31
|
|
|
26
32
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
27
33
|
#else
|
package/ios/RNSScreenStack.mm
CHANGED
|
@@ -92,7 +92,7 @@ namespace react = facebook::react;
|
|
|
92
92
|
|
|
93
93
|
@end
|
|
94
94
|
|
|
95
|
-
#if !TARGET_OS_TV
|
|
95
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
96
96
|
@interface RNSScreenEdgeGestureRecognizer : UIScreenEdgePanGestureRecognizer
|
|
97
97
|
@end
|
|
98
98
|
|
|
@@ -150,7 +150,7 @@ namespace react = facebook::react;
|
|
|
150
150
|
_presentedModals = [NSMutableArray new];
|
|
151
151
|
_controller = [RNSNavigationController new];
|
|
152
152
|
_controller.delegate = self;
|
|
153
|
-
#if !TARGET_OS_TV
|
|
153
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
154
154
|
[self setupGestureHandlers];
|
|
155
155
|
#endif
|
|
156
156
|
// we have to initialize viewControllers with a non empty array for
|
|
@@ -501,15 +501,27 @@ namespace react = facebook::react;
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
// changeRootController does not have presentedViewController but it does not mean that no modals are in presentation
|
|
505
|
-
//
|
|
504
|
+
// changeRootController does not have presentedViewController but it does not mean that no modals are in presentation;
|
|
505
|
+
// modals could be presented by another stack (nested / outer), third-party view controller or they could be using
|
|
506
|
+
// UIModalPresentationCurrentContext / UIModalPresentationOverCurrentContext presentation styles; in the last case
|
|
507
|
+
// for some reason system asks top-level (react root) vc to present instead of our stack, despite the fact that
|
|
508
|
+
// `definesPresentationContext` returns `YES` for UINavigationController.
|
|
509
|
+
// So we first need to find top-level controller manually:
|
|
506
510
|
UIViewController *reactRootVc = [self findReactRootViewController];
|
|
507
511
|
UIViewController *topMostVc = [RNSScreenStackView findTopMostPresentedViewControllerFromViewController:reactRootVc];
|
|
508
512
|
|
|
509
513
|
if (topMostVc != reactRootVc) {
|
|
510
514
|
changeRootController = topMostVc;
|
|
515
|
+
|
|
516
|
+
// Here we handle just the simplest case where the top level VC was dismissed. In any more complex
|
|
517
|
+
// scenario we will still have problems, see: https://github.com/software-mansion/react-native-screens/issues/1813
|
|
518
|
+
if ([_presentedModals containsObject:topMostVc] && ![controllers containsObject:topMostVc]) {
|
|
519
|
+
[changeRootController dismissViewControllerAnimated:YES completion:finish];
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
511
522
|
}
|
|
512
523
|
|
|
524
|
+
// We didn't detect any controllers for dismissal, thus we start presenting new VCs
|
|
513
525
|
finish();
|
|
514
526
|
}
|
|
515
527
|
|
|
@@ -634,6 +646,22 @@ namespace react = facebook::react;
|
|
|
634
646
|
{
|
|
635
647
|
[super layoutSubviews];
|
|
636
648
|
_controller.view.frame = self.bounds;
|
|
649
|
+
|
|
650
|
+
// We need to update the bounds of the modal views here, since
|
|
651
|
+
// for contained modals they are not updated by modals themselves.
|
|
652
|
+
for (UIViewController *modal in _presentedModals) {
|
|
653
|
+
// Because `layoutSubviews` method is also called on grabbing the modal,
|
|
654
|
+
// we don't want to update the frame when modal is being dismissed.
|
|
655
|
+
// We also want to get the frame in correct position. In the best case, it
|
|
656
|
+
// should be modal's superview (UITransitionView), which frame is being changed correctly.
|
|
657
|
+
// Otherwise, when superview is nil, we will fallback to the bounds of the ScreenStack.
|
|
658
|
+
BOOL isModalBeingDismissed = [modal isKindOfClass:[RNSScreen class]] && ((RNSScreen *)modal).isBeingDismissed;
|
|
659
|
+
CGRect correctFrame = modal.view.superview != nil ? modal.view.superview.frame : self.bounds;
|
|
660
|
+
|
|
661
|
+
if (!CGRectEqualToRect(modal.view.frame, correctFrame) && !isModalBeingDismissed) {
|
|
662
|
+
modal.view.frame = correctFrame;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
637
665
|
}
|
|
638
666
|
|
|
639
667
|
- (void)dismissOnReload
|
|
@@ -669,7 +697,7 @@ namespace react = facebook::react;
|
|
|
669
697
|
// Also, we need to return the animator when full width swiping even if the animation is not custom,
|
|
670
698
|
// otherwise the screen will be just popped immediately due to no animation
|
|
671
699
|
((operation == UINavigationControllerOperationPop && shouldCancelDismiss) || _isFullWidthSwiping ||
|
|
672
|
-
[RNSScreenStackAnimator isCustomAnimation:screen.stackAnimation])) {
|
|
700
|
+
[RNSScreenStackAnimator isCustomAnimation:screen.stackAnimation] || _customAnimation)) {
|
|
673
701
|
return [[RNSScreenStackAnimator alloc] initWithOperation:operation];
|
|
674
702
|
}
|
|
675
703
|
return nil;
|
|
@@ -698,9 +726,12 @@ namespace react = facebook::react;
|
|
|
698
726
|
|
|
699
727
|
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
|
|
700
728
|
{
|
|
729
|
+
if (_disableSwipeBack) {
|
|
730
|
+
return NO;
|
|
731
|
+
}
|
|
701
732
|
RNSScreenView *topScreen = _reactSubviews.lastObject;
|
|
702
733
|
|
|
703
|
-
#if TARGET_OS_TV
|
|
734
|
+
#if TARGET_OS_TV || TARGET_OS_VISION
|
|
704
735
|
[self cancelTouchesInParent];
|
|
705
736
|
return YES;
|
|
706
737
|
#else
|
|
@@ -718,12 +749,14 @@ namespace react = facebook::react;
|
|
|
718
749
|
// Now we're dealing with RNSScreenEdgeGestureRecognizer (or _UIParallaxTransitionPanGestureRecognizer)
|
|
719
750
|
if (topScreen.customAnimationOnSwipe && [RNSScreenStackAnimator isCustomAnimation:topScreen.stackAnimation]) {
|
|
720
751
|
if ([gestureRecognizer isKindOfClass:[RNSScreenEdgeGestureRecognizer class]]) {
|
|
752
|
+
UIRectEdge edges = ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges;
|
|
753
|
+
BOOL isRTL = _controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft;
|
|
754
|
+
BOOL isSlideFromLeft = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft;
|
|
721
755
|
// if we do not set any explicit `semanticContentAttribute`, it is `UISemanticContentAttributeUnspecified` instead
|
|
722
756
|
// of `UISemanticContentAttributeForceLeftToRight`, so we just check if it is RTL or not
|
|
723
|
-
BOOL isCorrectEdge = (
|
|
724
|
-
|
|
725
|
-
(
|
|
726
|
-
((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeLeft);
|
|
757
|
+
BOOL isCorrectEdge = (isRTL && edges == UIRectEdgeRight) ||
|
|
758
|
+
(!isRTL && isSlideFromLeft && edges == UIRectEdgeRight) ||
|
|
759
|
+
(isRTL && isSlideFromLeft && edges == UIRectEdgeLeft) || (!isRTL && edges == UIRectEdgeLeft);
|
|
727
760
|
if (isCorrectEdge) {
|
|
728
761
|
[self cancelTouchesInParent];
|
|
729
762
|
return YES;
|
|
@@ -743,7 +776,7 @@ namespace react = facebook::react;
|
|
|
743
776
|
#endif // TARGET_OS_TV
|
|
744
777
|
}
|
|
745
778
|
|
|
746
|
-
#if !TARGET_OS_TV
|
|
779
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
747
780
|
- (void)setupGestureHandlers
|
|
748
781
|
{
|
|
749
782
|
// gesture recognizers for custom stack animations
|
|
@@ -787,7 +820,10 @@ namespace react = facebook::react;
|
|
|
787
820
|
}
|
|
788
821
|
}
|
|
789
822
|
|
|
823
|
+
bool isInverted = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft;
|
|
824
|
+
|
|
790
825
|
float transitionProgress = (translation / distance);
|
|
826
|
+
transitionProgress = isInverted ? transitionProgress * -1 : transitionProgress;
|
|
791
827
|
|
|
792
828
|
switch (gestureRecognizer.state) {
|
|
793
829
|
case UIGestureRecognizerStateBegan: {
|
|
@@ -809,7 +845,10 @@ namespace react = facebook::react;
|
|
|
809
845
|
case UIGestureRecognizerStateEnded: {
|
|
810
846
|
// values taken from
|
|
811
847
|
// https://github.com/react-navigation/react-navigation/blob/54739828598d7072c1bf7b369659e3682db3edc5/packages/stack/src/views/Stack/Card.tsx#L316
|
|
812
|
-
|
|
848
|
+
float snapPoint = distance / 2;
|
|
849
|
+
float gestureDistance = translation + velocity * 0.3;
|
|
850
|
+
gestureDistance = isInverted ? gestureDistance * -1 : gestureDistance;
|
|
851
|
+
BOOL shouldFinishTransition = gestureDistance > snapPoint;
|
|
813
852
|
if (shouldFinishTransition) {
|
|
814
853
|
[_interactionController finishInteractiveTransition];
|
|
815
854
|
} else {
|
|
@@ -908,8 +947,8 @@ namespace react = facebook::react;
|
|
|
908
947
|
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
|
909
948
|
{
|
|
910
949
|
if (CGRectContainsPoint(_controller.navigationBar.frame, point)) {
|
|
911
|
-
|
|
912
|
-
UIView *headerConfig =
|
|
950
|
+
RNSScreenView *topMostScreen = (RNSScreenView *)_reactSubviews.lastObject;
|
|
951
|
+
UIView *headerConfig = topMostScreen.findHeaderConfig;
|
|
913
952
|
if ([headerConfig isKindOfClass:[RNSScreenStackHeaderConfig class]]) {
|
|
914
953
|
UIView *headerHitTestResult = [headerConfig hitTest:point withEvent:event];
|
|
915
954
|
if (headerHitTestResult != nil) {
|
|
@@ -920,7 +959,7 @@ namespace react = facebook::react;
|
|
|
920
959
|
return [super hitTest:point withEvent:event];
|
|
921
960
|
}
|
|
922
961
|
|
|
923
|
-
#if !TARGET_OS_TV
|
|
962
|
+
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
924
963
|
|
|
925
964
|
- (BOOL)isScrollViewPanGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
|
926
965
|
{
|
|
@@ -1021,6 +1060,33 @@ namespace react = facebook::react;
|
|
|
1021
1060
|
});
|
|
1022
1061
|
}
|
|
1023
1062
|
|
|
1063
|
+
- (void)startScreenTransition
|
|
1064
|
+
{
|
|
1065
|
+
if (_interactionController == nil) {
|
|
1066
|
+
_customAnimation = YES;
|
|
1067
|
+
_interactionController = [UIPercentDrivenInteractiveTransition new];
|
|
1068
|
+
[_controller popViewControllerAnimated:YES];
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
- (void)updateScreenTransition:(double)progress
|
|
1073
|
+
{
|
|
1074
|
+
[_interactionController updateInteractiveTransition:progress];
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
- (void)finishScreenTransition:(BOOL)canceled
|
|
1078
|
+
{
|
|
1079
|
+
_customAnimation = NO;
|
|
1080
|
+
if (canceled) {
|
|
1081
|
+
[_interactionController updateInteractiveTransition:0.0];
|
|
1082
|
+
[_interactionController cancelInteractiveTransition];
|
|
1083
|
+
} else {
|
|
1084
|
+
[_interactionController updateInteractiveTransition:1.0];
|
|
1085
|
+
[_interactionController finishInteractiveTransition];
|
|
1086
|
+
}
|
|
1087
|
+
_interactionController = nil;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1024
1090
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
1025
1091
|
#pragma mark - Fabric specific
|
|
1026
1092
|
|