react-native-screens 3.32.0 → 3.34.0
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 +17 -13
- package/RNScreens.podspec +10 -52
- package/android/CMakeLists.txt +48 -4
- package/android/build.gradle +9 -81
- package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +25 -16
- package/android/src/fabric/java/com/swmansion/rnscreens/NativeProxy.kt +53 -0
- package/android/src/main/cpp/NativeProxy.cpp +51 -0
- package/android/src/main/cpp/NativeProxy.h +35 -0
- package/android/src/main/cpp/OnLoad.cpp +8 -0
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +5 -2
- package/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +2 -2
- package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +36 -17
- package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +134 -38
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +52 -30
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt +17 -7
- package/android/src/main/java/com/swmansion/rnscreens/ScreenEventDispatcher.kt +10 -2
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +56 -27
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragmentWrapper.kt +8 -1
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +50 -19
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +60 -37
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragmentWrapper.kt +4 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +85 -58
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +128 -37
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +19 -4
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +16 -10
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +28 -25
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +173 -78
- package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +59 -24
- package/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt +30 -8
- package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +3 -1
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +101 -50
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +29 -22
- package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +7 -2
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +5 -5
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt +8 -4
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +7 -6
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +4 -3
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +9 -4
- package/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/utils/DeviceUtils.kt +1 -5
- package/android/src/main/java/com/swmansion/rnscreens/utils/ScreenDummyLayoutHelper.kt +245 -0
- package/android/src/main/jni/CMakeLists.txt +5 -4
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +3 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +1 -0
- package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +10 -5
- package/android/src/paper/java/com/swmansion/rnscreens/NativeProxy.kt +19 -0
- package/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java +4 -0
- package/common/cpp/react/renderer/components/rnscreens/FrameCorrectionModes.h +51 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp +2 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h +1 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h +140 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +51 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +23 -1
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +20 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +23 -1
- package/common/cpp/react/renderer/components/rnscreens/utils/RectUtil.h +36 -0
- package/cpp/RNSScreenRemovalListener.cpp +25 -0
- package/cpp/RNSScreenRemovalListener.h +20 -0
- package/ios/RNSConvert.h +1 -0
- package/ios/RNSModalScreen.mm +22 -0
- package/ios/RNSModule.mm +1 -1
- package/ios/RNSScreen.h +2 -1
- package/ios/RNSScreen.mm +27 -19
- package/ios/RNSScreenStack.mm +24 -77
- package/ios/RNSScreenStackAnimator.mm +43 -6
- package/ios/RNSScreenStackHeaderConfig.mm +49 -11
- package/ios/RNSScreenStackHeaderSubview.mm +8 -0
- package/ios/utils/UIView+RNSUtility.h +23 -0
- package/ios/utils/UIView+RNSUtility.mm +55 -0
- package/lib/commonjs/components/ScreenStack.js +8 -1
- package/lib/commonjs/components/ScreenStack.js.map +1 -1
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +2 -0
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/components/ScreenStack.js +8 -1
- package/lib/module/components/ScreenStack.js.map +1 -1
- package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +2 -0
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/typescript/components/ScreenStack.d.ts.map +1 -1
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +10 -0
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +10 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/native-stack/README.md +110 -99
- package/package.json +6 -3
- package/react-native.config.js +17 -15
- package/src/TransitionProgressContext.tsx +1 -1
- package/src/components/Screen.tsx +4 -4
- package/src/components/ScreenStack.tsx +11 -1
- package/src/components/ScreenStackHeaderConfig.tsx +5 -5
- package/src/components/ScreenStackHeaderConfig.web.tsx +6 -6
- package/src/components/SearchBar.tsx +4 -4
- package/src/core.ts +1 -1
- package/src/fabric/ModalScreenNativeComponent.ts +1 -0
- package/src/fabric/ScreenNativeComponent.ts +1 -0
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +1 -1
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +1 -1
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +1 -1
- package/src/fabric/SearchBarNativeComponent.ts +1 -1
- package/src/gesture-handler/ScreenGestureDetector.tsx +5 -5
- package/src/gesture-handler/constraints.ts +5 -5
- package/src/gesture-handler/fabricUtils.ts +1 -1
- package/src/native-stack/contexts/GHContext.tsx +1 -1
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +3 -3
- package/src/native-stack/types.tsx +14 -4
- package/src/native-stack/utils/getDefaultHeaderHeight.tsx +1 -1
- package/src/native-stack/utils/getStatusBarHeight.tsx +1 -1
- package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +1 -1
- package/src/native-stack/utils/useBackPressSubscription.tsx +1 -1
- package/src/native-stack/utils/useHeaderHeight.tsx +1 -1
- package/src/native-stack/views/FontProcessor.tsx +1 -1
- package/src/native-stack/views/HeaderConfig.tsx +1 -1
- package/src/native-stack/views/NativeStackView.tsx +11 -9
- package/src/reanimated/ReanimatedHeaderHeightContext.tsx +1 -1
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +5 -5
- package/src/reanimated/ReanimatedScreen.tsx +2 -2
- package/src/reanimated/ReanimatedScreenProvider.tsx +1 -1
- package/src/reanimated/useReanimatedHeaderHeight.tsx +1 -1
- package/src/reanimated/useReanimatedTransitionProgress.tsx +1 -1
- package/src/types.tsx +15 -5
- package/src/useTransitionProgress.tsx +1 -1
- package/windows/README.md +4 -1
package/ios/RNSScreenStack.mm
CHANGED
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
#import "RNSScreenStackHeaderConfig.h"
|
|
27
27
|
#import "RNSScreenWindowTraits.h"
|
|
28
28
|
|
|
29
|
+
#import "UIView+RNSUtility.h"
|
|
30
|
+
|
|
29
31
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
30
32
|
namespace react = facebook::react;
|
|
31
33
|
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -116,12 +118,8 @@ namespace react = facebook::react;
|
|
|
116
118
|
BOOL _invalidated;
|
|
117
119
|
BOOL _isFullWidthSwiping;
|
|
118
120
|
UIPercentDrivenInteractiveTransition *_interactionController;
|
|
119
|
-
BOOL _hasLayout;
|
|
120
121
|
__weak RNSScreenStackManager *_manager;
|
|
121
122
|
BOOL _updateScheduled;
|
|
122
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
123
|
-
UIView *_snapshot;
|
|
124
|
-
#endif
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
@@ -140,7 +138,6 @@ namespace react = facebook::react;
|
|
|
140
138
|
- (instancetype)initWithManager:(RNSScreenStackManager *)manager
|
|
141
139
|
{
|
|
142
140
|
if (self = [super init]) {
|
|
143
|
-
_hasLayout = NO;
|
|
144
141
|
_invalidated = NO;
|
|
145
142
|
_manager = manager;
|
|
146
143
|
[self initCommonProps];
|
|
@@ -270,18 +267,9 @@ namespace react = facebook::react;
|
|
|
270
267
|
- (void)maybeAddToParentAndUpdateContainer
|
|
271
268
|
{
|
|
272
269
|
BOOL wasScreenMounted = _controller.parentViewController != nil;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
BOOL isScreenReadyForShowing = self.window && _hasLayout;
|
|
277
|
-
#endif
|
|
278
|
-
if (!isScreenReadyForShowing && !wasScreenMounted) {
|
|
279
|
-
// We wait with adding to parent controller until the stack is mounted and has its initial
|
|
280
|
-
// layout done.
|
|
281
|
-
// If we add it before layout, some of the items (specifically items from the navigation bar),
|
|
282
|
-
// won't be able to position properly. Also the position and size of such items, even if it
|
|
283
|
-
// happens to change, won't be properly updated (this is perhaps some internal issue of UIKit).
|
|
284
|
-
// If we add it when window is not attached, some of the view transitions will be bloced (i.e.
|
|
270
|
+
if (!self.window && !wasScreenMounted) {
|
|
271
|
+
// We wait with adding to parent controller until the stack is mounted.
|
|
272
|
+
// If we add it when window is not attached, some of the view transitions will be blocked (i.e.
|
|
285
273
|
// modal transitions) and the internal view controler's state will get out of sync with what's
|
|
286
274
|
// on screen without us knowing.
|
|
287
275
|
return;
|
|
@@ -735,43 +723,8 @@ namespace react = facebook::react;
|
|
|
735
723
|
// item is close to an edge and we start pulling from edge we want the Touchable to be cancelled.
|
|
736
724
|
// Without the below code the Touchable will remain active (highlighted) for the duration of back
|
|
737
725
|
// gesture and onPress may fire when we release the finger.
|
|
738
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
739
|
-
// On Fabric there is no view that exposes touchHandler above us in the view hierarchy, however it is still
|
|
740
|
-
// utilised. `RCTSurfaceView` should be present above us, which hosts `RCTFabricSurface` instance, which in turn
|
|
741
|
-
// hosts `RCTSurfaceTouchHandler` as a private field. When initialised, `RCTSurfaceTouchHandler` is attached to the
|
|
742
|
-
// surface view as a gestureRecognizer <- and this is where we can lay our hands on it.
|
|
743
|
-
UIView *parent = _controller.view;
|
|
744
|
-
while (parent != nil && ![parent isKindOfClass:RCTSurfaceView.class]) {
|
|
745
|
-
parent = parent.superview;
|
|
746
|
-
}
|
|
747
726
|
|
|
748
|
-
|
|
749
|
-
if (parent == nil) {
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
RCTSurfaceTouchHandler *touchHandler = nil;
|
|
754
|
-
// Experimentation shows that RCTSurfaceTouchHandler is the only gestureRecognizer registered here,
|
|
755
|
-
// so we should not be afraid of any performance hit here.
|
|
756
|
-
for (UIGestureRecognizer *recognizer in parent.gestureRecognizers) {
|
|
757
|
-
if ([recognizer isKindOfClass:RCTSurfaceTouchHandler.class]) {
|
|
758
|
-
touchHandler = static_cast<RCTSurfaceTouchHandler *>(recognizer);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
[touchHandler rnscreens_cancelTouches];
|
|
763
|
-
#else
|
|
764
|
-
// On Paper we can access touchHandler hosted by `RCTRootContentView` which should be above ScreenStack
|
|
765
|
-
// in view hierarchy.
|
|
766
|
-
UIView *parent = _controller.view;
|
|
767
|
-
while (parent != nil && ![parent respondsToSelector:@selector(touchHandler)]) {
|
|
768
|
-
parent = parent.superview;
|
|
769
|
-
}
|
|
770
|
-
if (parent != nil) {
|
|
771
|
-
RCTTouchHandler *touchHandler = [parent performSelector:@selector(touchHandler)];
|
|
772
|
-
[touchHandler rnscreens_cancelTouches];
|
|
773
|
-
}
|
|
774
|
-
#endif // RCT_NEW_ARCH_ENABLED
|
|
727
|
+
[[self rnscreens_findTouchHandlerInAncestorChain] rnscreens_cancelTouches];
|
|
775
728
|
}
|
|
776
729
|
|
|
777
730
|
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
|
|
@@ -905,6 +858,7 @@ namespace react = facebook::react;
|
|
|
905
858
|
[_interactionController cancelInteractiveTransition];
|
|
906
859
|
}
|
|
907
860
|
_interactionController = nil;
|
|
861
|
+
_isFullWidthSwiping = NO;
|
|
908
862
|
}
|
|
909
863
|
default: {
|
|
910
864
|
break;
|
|
@@ -1109,7 +1063,6 @@ namespace react = facebook::react;
|
|
|
1109
1063
|
// set yet, however the layout call is already enqueued on ui thread. Enqueuing update call on the
|
|
1110
1064
|
// ui queue will guarantee that the update will run after layout.
|
|
1111
1065
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1112
|
-
self->_hasLayout = YES;
|
|
1113
1066
|
[self maybeAddToParentAndUpdateContainer];
|
|
1114
1067
|
});
|
|
1115
1068
|
}
|
|
@@ -1161,14 +1114,14 @@ namespace react = facebook::react;
|
|
|
1161
1114
|
|
|
1162
1115
|
[_reactSubviews insertObject:(RNSScreenView *)childComponentView atIndex:index];
|
|
1163
1116
|
((RNSScreenView *)childComponentView).reactSuperview = self;
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
});
|
|
1117
|
+
// Container update is done after all mount operations are executed in
|
|
1118
|
+
// `- [RNSScreenStackView mountingTransactionDidMount: withSurfaceTelemetry:]`
|
|
1167
1119
|
}
|
|
1168
1120
|
|
|
1169
1121
|
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
|
1170
1122
|
{
|
|
1171
1123
|
RNSScreenView *screenChildComponent = (RNSScreenView *)childComponentView;
|
|
1124
|
+
|
|
1172
1125
|
// We should only do a snapshot of a screen that is on the top.
|
|
1173
1126
|
// We also check `_presentedModals` since if you push 2 modals, second one is not a "child" of _controller.
|
|
1174
1127
|
// Also, when dissmised with a gesture, the screen already is not under the window, so we don't need to apply
|
|
@@ -1176,7 +1129,7 @@ namespace react = facebook::react;
|
|
|
1176
1129
|
if (screenChildComponent.window != nil &&
|
|
1177
1130
|
((screenChildComponent == _controller.visibleViewController.view && _presentedModals.count < 2) ||
|
|
1178
1131
|
screenChildComponent == [_presentedModals.lastObject view])) {
|
|
1179
|
-
[screenChildComponent.controller setViewToSnapshot
|
|
1132
|
+
[screenChildComponent.controller setViewToSnapshot];
|
|
1180
1133
|
}
|
|
1181
1134
|
|
|
1182
1135
|
RCTAssert(
|
|
@@ -1196,28 +1149,22 @@ namespace react = facebook::react;
|
|
|
1196
1149
|
screenChildComponent.reactSuperview = nil;
|
|
1197
1150
|
[_reactSubviews removeObject:screenChildComponent];
|
|
1198
1151
|
[screenChildComponent removeFromSuperview];
|
|
1199
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1200
|
-
[self maybeAddToParentAndUpdateContainer];
|
|
1201
|
-
});
|
|
1202
1152
|
}
|
|
1203
1153
|
|
|
1204
|
-
- (void)
|
|
1154
|
+
- (void)mountingTransactionDidMount:(const facebook::react::MountingTransaction &)transaction
|
|
1155
|
+
withSurfaceTelemetry:(const facebook::react::SurfaceTelemetry &)surfaceTelemetry
|
|
1205
1156
|
{
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
if (mutation.type == react::ShadowViewMutation::Type::Remove && mutation.parentShadowView.componentName != nil &&
|
|
1218
|
-
strcmp(mutation.parentShadowView.componentName, "RNSScreenStack") == 0) {
|
|
1219
|
-
[self takeSnapshot];
|
|
1220
|
-
return;
|
|
1157
|
+
for (const auto &mutation : transaction.getMutations()) {
|
|
1158
|
+
if (mutation.parentShadowView.tag == self.tag &&
|
|
1159
|
+
(mutation.type == react::ShadowViewMutation::Type::Insert ||
|
|
1160
|
+
mutation.type == react::ShadowViewMutation::Type::Remove)) {
|
|
1161
|
+
// we need to wait until children have their layout set. At this point they don't have the layout
|
|
1162
|
+
// set yet, however the layout call is already enqueued on ui thread. Enqueuing update call on the
|
|
1163
|
+
// ui queue will guarantee that the update will run after layout.
|
|
1164
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1165
|
+
[self maybeAddToParentAndUpdateContainer];
|
|
1166
|
+
});
|
|
1167
|
+
break;
|
|
1221
1168
|
}
|
|
1222
1169
|
}
|
|
1223
1170
|
}
|
|
@@ -9,6 +9,9 @@ static const float RNSFadeOpenTransitionDurationProportion = 0.2 / 0.35;
|
|
|
9
9
|
static const float RNSSlideCloseTransitionDurationProportion = 0.25 / 0.35;
|
|
10
10
|
static const float RNSFadeCloseTransitionDurationProportion = 0.15 / 0.35;
|
|
11
11
|
static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
12
|
+
// same value is used in other projects using similar approach for transistions
|
|
13
|
+
// and it looks the most similar to the value used by Apple
|
|
14
|
+
static constexpr float RNSShadowViewMaxAlpha = 0.1;
|
|
12
15
|
|
|
13
16
|
@implementation RNSScreenStackAnimator {
|
|
14
17
|
UINavigationControllerOperation _operation;
|
|
@@ -71,17 +74,22 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
71
74
|
// we are swiping with full width gesture
|
|
72
75
|
if (screen.customAnimationOnSwipe) {
|
|
73
76
|
[self animateTransitionWithStackAnimation:screen.stackAnimation
|
|
77
|
+
shadowEnabled:screen.fullScreenSwipeShadowEnabled
|
|
74
78
|
transitionContext:transitionContext
|
|
75
79
|
toVC:toViewController
|
|
76
80
|
fromVC:fromViewController];
|
|
77
81
|
} else {
|
|
78
82
|
// we have to provide an animation when swiping, otherwise the screen will be popped immediately,
|
|
79
83
|
// so in case of no custom animation on swipe set, we provide the one closest to the default
|
|
80
|
-
[self
|
|
84
|
+
[self animateSimplePushWithShadowEnabled:screen.fullScreenSwipeShadowEnabled
|
|
85
|
+
transitionContext:transitionContext
|
|
86
|
+
toVC:toViewController
|
|
87
|
+
fromVC:fromViewController];
|
|
81
88
|
}
|
|
82
89
|
} else {
|
|
83
90
|
// we are going forward or provided custom animation on swipe or clicked native header back button
|
|
84
91
|
[self animateTransitionWithStackAnimation:screen.stackAnimation
|
|
92
|
+
shadowEnabled:screen.fullScreenSwipeShadowEnabled
|
|
85
93
|
transitionContext:transitionContext
|
|
86
94
|
toVC:toViewController
|
|
87
95
|
fromVC:fromViewController];
|
|
@@ -89,9 +97,10 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
|
|
92
|
-
- (void)
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
- (void)animateSimplePushWithShadowEnabled:(BOOL)shadowEnabled
|
|
101
|
+
transitionContext:(id<UIViewControllerContextTransitioning>)transitionContext
|
|
102
|
+
toVC:(UIViewController *)toViewController
|
|
103
|
+
fromVC:(UIViewController *)fromViewController
|
|
95
104
|
{
|
|
96
105
|
float containerWidth = transitionContext.containerView.bounds.size.width;
|
|
97
106
|
float belowViewWidth = containerWidth * 0.3;
|
|
@@ -105,15 +114,32 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
105
114
|
leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0);
|
|
106
115
|
}
|
|
107
116
|
|
|
117
|
+
UIView *shadowView;
|
|
118
|
+
if (shadowEnabled) {
|
|
119
|
+
shadowView = [[UIView alloc] initWithFrame:fromViewController.view.frame];
|
|
120
|
+
shadowView.backgroundColor = [UIColor blackColor];
|
|
121
|
+
}
|
|
122
|
+
|
|
108
123
|
if (_operation == UINavigationControllerOperationPush) {
|
|
109
124
|
toViewController.view.transform = rightTransform;
|
|
110
125
|
[[transitionContext containerView] addSubview:toViewController.view];
|
|
126
|
+
if (shadowView) {
|
|
127
|
+
[[transitionContext containerView] insertSubview:shadowView belowSubview:toViewController.view];
|
|
128
|
+
shadowView.alpha = 0.0;
|
|
129
|
+
}
|
|
130
|
+
|
|
111
131
|
[UIView animateWithDuration:[self transitionDuration:transitionContext]
|
|
112
132
|
animations:^{
|
|
113
133
|
fromViewController.view.transform = leftTransform;
|
|
114
134
|
toViewController.view.transform = CGAffineTransformIdentity;
|
|
135
|
+
if (shadowView) {
|
|
136
|
+
shadowView.alpha = RNSShadowViewMaxAlpha;
|
|
137
|
+
}
|
|
115
138
|
}
|
|
116
139
|
completion:^(BOOL finished) {
|
|
140
|
+
if (shadowView) {
|
|
141
|
+
[shadowView removeFromSuperview];
|
|
142
|
+
}
|
|
117
143
|
fromViewController.view.transform = CGAffineTransformIdentity;
|
|
118
144
|
toViewController.view.transform = CGAffineTransformIdentity;
|
|
119
145
|
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
|
|
@@ -121,12 +147,22 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
121
147
|
} else if (_operation == UINavigationControllerOperationPop) {
|
|
122
148
|
toViewController.view.transform = leftTransform;
|
|
123
149
|
[[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view];
|
|
150
|
+
if (shadowView) {
|
|
151
|
+
[[transitionContext containerView] insertSubview:shadowView belowSubview:fromViewController.view];
|
|
152
|
+
shadowView.alpha = RNSShadowViewMaxAlpha;
|
|
153
|
+
}
|
|
124
154
|
|
|
125
155
|
void (^animationBlock)(void) = ^{
|
|
126
156
|
toViewController.view.transform = CGAffineTransformIdentity;
|
|
127
157
|
fromViewController.view.transform = rightTransform;
|
|
158
|
+
if (shadowView) {
|
|
159
|
+
shadowView.alpha = 0.0;
|
|
160
|
+
}
|
|
128
161
|
};
|
|
129
162
|
void (^completionBlock)(BOOL) = ^(BOOL finished) {
|
|
163
|
+
if (shadowView) {
|
|
164
|
+
[shadowView removeFromSuperview];
|
|
165
|
+
}
|
|
130
166
|
fromViewController.view.transform = CGAffineTransformIdentity;
|
|
131
167
|
toViewController.view.transform = CGAffineTransformIdentity;
|
|
132
168
|
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
|
|
@@ -381,12 +417,13 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
381
417
|
}
|
|
382
418
|
|
|
383
419
|
- (void)animateTransitionWithStackAnimation:(RNSScreenStackAnimation)animation
|
|
420
|
+
shadowEnabled:(BOOL)shadowEnabled
|
|
384
421
|
transitionContext:(id<UIViewControllerContextTransitioning>)transitionContext
|
|
385
422
|
toVC:(UIViewController *)toVC
|
|
386
423
|
fromVC:(UIViewController *)fromVC
|
|
387
424
|
{
|
|
388
425
|
if (animation == RNSScreenStackAnimationSimplePush) {
|
|
389
|
-
[self
|
|
426
|
+
[self animateSimplePushWithShadowEnabled:shadowEnabled transitionContext:transitionContext toVC:toVC fromVC:fromVC];
|
|
390
427
|
return;
|
|
391
428
|
} else if (animation == RNSScreenStackAnimationSlideFromLeft) {
|
|
392
429
|
[self animateSlideFromLeftWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC];
|
|
@@ -402,7 +439,7 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
|
|
|
402
439
|
return;
|
|
403
440
|
}
|
|
404
441
|
// simple_push is the default custom animation
|
|
405
|
-
[self
|
|
442
|
+
[self animateSimplePushWithShadowEnabled:shadowEnabled transitionContext:transitionContext toVC:toVC fromVC:fromVC];
|
|
406
443
|
}
|
|
407
444
|
|
|
408
445
|
@end
|
|
@@ -141,8 +141,8 @@ namespace react = facebook::react;
|
|
|
141
141
|
nextVC = nav.topViewController;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
// we want updates sent to the VC below modal too since it is also visible
|
|
145
|
-
BOOL isPresentingVC = nextVC != nil && vc.presentedViewController == nextVC;
|
|
144
|
+
// we want updates sent to the VC directly below modal too since it is also visible
|
|
145
|
+
BOOL isPresentingVC = nextVC != nil && vc.presentedViewController == nextVC && vc == nav.topViewController;
|
|
146
146
|
|
|
147
147
|
BOOL isInFullScreenModal = nav == nil && _screenView.stackPresentation == RNSScreenStackPresentationFullScreenModal;
|
|
148
148
|
// if nav is nil, it means we can be in a fullScreen modal, so there is no nextVC, but we still want to update
|
|
@@ -494,8 +494,17 @@ namespace react = facebook::react;
|
|
|
494
494
|
config.direction == UISemanticContentAttributeForceRightToLeft) &&
|
|
495
495
|
// iOS 12 cancels swipe gesture when direction is changed. See #1091
|
|
496
496
|
navctr.view.semanticContentAttribute != config.direction) {
|
|
497
|
+
// This is needed for swipe back gesture direction
|
|
497
498
|
navctr.view.semanticContentAttribute = config.direction;
|
|
499
|
+
|
|
500
|
+
// This is responsible for the direction of the navigationBar and its contents
|
|
498
501
|
navctr.navigationBar.semanticContentAttribute = config.direction;
|
|
502
|
+
[[UIButton appearanceWhenContainedInInstancesOfClasses:@[ navctr.navigationBar.class ]]
|
|
503
|
+
setSemanticContentAttribute:config.direction];
|
|
504
|
+
[[UIView appearanceWhenContainedInInstancesOfClasses:@[ navctr.navigationBar.class ]]
|
|
505
|
+
setSemanticContentAttribute:config.direction];
|
|
506
|
+
[[UISearchBar appearanceWhenContainedInInstancesOfClasses:@[ navctr.navigationBar.class ]]
|
|
507
|
+
setSemanticContentAttribute:config.direction];
|
|
499
508
|
}
|
|
500
509
|
|
|
501
510
|
if (shouldHide) {
|
|
@@ -580,6 +589,12 @@ namespace react = facebook::react;
|
|
|
580
589
|
navitem.standardAppearance = appearance;
|
|
581
590
|
navitem.compactAppearance = appearance;
|
|
582
591
|
|
|
592
|
+
// appearance does not apply to the tvOS so we need to use lagacy customization
|
|
593
|
+
#if TARGET_OS_TV
|
|
594
|
+
navctr.navigationBar.titleTextAttributes = appearance.titleTextAttributes;
|
|
595
|
+
navctr.navigationBar.backgroundColor = appearance.backgroundColor;
|
|
596
|
+
#endif
|
|
597
|
+
|
|
583
598
|
UINavigationBarAppearance *scrollEdgeAppearance =
|
|
584
599
|
[[UINavigationBarAppearance alloc] initWithBarAppearance:appearance];
|
|
585
600
|
if (config.largeTitleBackgroundColor != nil) {
|
|
@@ -606,8 +621,6 @@ namespace react = facebook::react;
|
|
|
606
621
|
#endif
|
|
607
622
|
}
|
|
608
623
|
#if !TARGET_OS_TV
|
|
609
|
-
// Workaround for the wrong rotation of back button arrow in RTL mode.
|
|
610
|
-
navitem.hidesBackButton = true;
|
|
611
624
|
navitem.hidesBackButton = config.hideBackButton;
|
|
612
625
|
#endif
|
|
613
626
|
navitem.leftBarButtonItem = nil;
|
|
@@ -615,6 +628,8 @@ namespace react = facebook::react;
|
|
|
615
628
|
navitem.titleView = nil;
|
|
616
629
|
|
|
617
630
|
for (RNSScreenStackHeaderSubview *subview in config.reactSubviews) {
|
|
631
|
+
// This code should be kept in sync on Fabric with analogous switch statement in
|
|
632
|
+
// `- [RNSScreenStackHeaderConfig replaceNavigationBarViewsWithSnapshotOfSubview:]` method.
|
|
618
633
|
switch (subview.type) {
|
|
619
634
|
case RNSScreenStackHeaderSubviewTypeLeft: {
|
|
620
635
|
#if !TARGET_OS_TV
|
|
@@ -665,13 +680,6 @@ namespace react = facebook::react;
|
|
|
665
680
|
}
|
|
666
681
|
}
|
|
667
682
|
|
|
668
|
-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
|
|
669
|
-
// Position the contents in the navigation bar, regarding to the direction.
|
|
670
|
-
for (UIView *view in navctr.navigationBar.subviews) {
|
|
671
|
-
view.semanticContentAttribute = config.direction;
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
|
|
675
683
|
// This assignment should be done after `navitem.titleView = ...` assignment (iOS 16.0 bug).
|
|
676
684
|
// See: https://github.com/software-mansion/react-native-screens/issues/1570 (comments)
|
|
677
685
|
navitem.title = config.title;
|
|
@@ -749,8 +757,38 @@ namespace react = facebook::react;
|
|
|
749
757
|
|
|
750
758
|
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
|
751
759
|
{
|
|
760
|
+
// For explanation of why we can make a snapshot here despite the fact that our children are already
|
|
761
|
+
// unmounted see https://github.com/software-mansion/react-native-screens/pull/2261
|
|
762
|
+
[self replaceNavigationBarViewsWithSnapshotOfSubview:(RNSScreenStackHeaderSubview *)childComponentView];
|
|
752
763
|
[_reactSubviews removeObject:(RNSScreenStackHeaderSubview *)childComponentView];
|
|
753
764
|
[childComponentView removeFromSuperview];
|
|
765
|
+
[self updateViewControllerIfNeeded];
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
- (void)replaceNavigationBarViewsWithSnapshotOfSubview:(RNSScreenStackHeaderSubview *)childComponentView
|
|
769
|
+
{
|
|
770
|
+
UINavigationItem *navitem = _screenView.controller.navigationItem;
|
|
771
|
+
UIView *snapshot = [childComponentView snapshotViewAfterScreenUpdates:NO];
|
|
772
|
+
|
|
773
|
+
// This code should be kept in sync with analogous switch statement in
|
|
774
|
+
// `+ [RNSScreenStackHeaderConfig updateViewController: withConfig: animated:]` method.
|
|
775
|
+
switch (childComponentView.type) {
|
|
776
|
+
case RNSScreenStackHeaderSubviewTypeLeft:
|
|
777
|
+
navitem.leftBarButtonItem.customView = snapshot;
|
|
778
|
+
break;
|
|
779
|
+
case RNSScreenStackHeaderSubviewTypeCenter:
|
|
780
|
+
case RNSScreenStackHeaderSubviewTypeTitle:
|
|
781
|
+
navitem.titleView = snapshot;
|
|
782
|
+
break;
|
|
783
|
+
case RNSScreenStackHeaderSubviewTypeRight:
|
|
784
|
+
navitem.rightBarButtonItem.customView = snapshot;
|
|
785
|
+
break;
|
|
786
|
+
case RNSScreenStackHeaderSubviewTypeSearchBar:
|
|
787
|
+
case RNSScreenStackHeaderSubviewTypeBackButton:
|
|
788
|
+
break;
|
|
789
|
+
default:
|
|
790
|
+
RCTLogError(@"[RNScreens] Unhandled subview type: %ld", childComponentView.type);
|
|
791
|
+
}
|
|
754
792
|
}
|
|
755
793
|
|
|
756
794
|
static RCTResizeMode resizeModeFromCppEquiv(react::ImageResizeMode resizeMode)
|
|
@@ -72,9 +72,17 @@ namespace react = facebook::react;
|
|
|
72
72
|
self);
|
|
73
73
|
} else {
|
|
74
74
|
self.bounds = CGRect{CGPointZero, frame.size};
|
|
75
|
+
// We're forcing the parent view to layout this subview with correct frame size,
|
|
76
|
+
// see: https://github.com/software-mansion/react-native-screens/pull/2248
|
|
77
|
+
[self.superview layoutIfNeeded];
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
+ (BOOL)shouldBeRecycled
|
|
82
|
+
{
|
|
83
|
+
return NO;
|
|
84
|
+
}
|
|
85
|
+
|
|
78
86
|
#else
|
|
79
87
|
#pragma mark - Paper specific
|
|
80
88
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
|
|
3
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
4
|
+
#import <React/RCTSurfaceTouchHandler.h>
|
|
5
|
+
#else
|
|
6
|
+
#import <React/RCTTouchHandler.h>
|
|
7
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
8
|
+
|
|
9
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
|
+
#define RNS_TOUCH_HANDLER_ARCH_TYPE RCTSurfaceTouchHandler
|
|
11
|
+
#else
|
|
12
|
+
#define RNS_TOUCH_HANDLER_ARCH_TYPE RCTTouchHandler
|
|
13
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
16
|
+
|
|
17
|
+
@interface UIView (RNSUtility)
|
|
18
|
+
|
|
19
|
+
- (nullable RNS_TOUCH_HANDLER_ARCH_TYPE *)rnscreens_findTouchHandlerInAncestorChain;
|
|
20
|
+
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
#import "UIView+RNSUtility.h"
|
|
3
|
+
|
|
4
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
5
|
+
#import <React/RCTSurfaceView.h>
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
@implementation UIView (RNSUtility)
|
|
9
|
+
|
|
10
|
+
- (nullable RNS_TOUCH_HANDLER_ARCH_TYPE *)rnscreens_findTouchHandlerInAncestorChain
|
|
11
|
+
{
|
|
12
|
+
UIView *parent = self.superview;
|
|
13
|
+
|
|
14
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
15
|
+
// On Fabric there is no view that exposes touchHandler above us in the view hierarchy, however it is still
|
|
16
|
+
// utilised. `RCTSurfaceView` should be present above us, which hosts `RCTFabricSurface` instance, which in turn
|
|
17
|
+
// hosts `RCTSurfaceTouchHandler` as a private field. When initialised, `RCTSurfaceTouchHandler` is attached to the
|
|
18
|
+
// surface view as a gestureRecognizer <- and this is where we can lay our hands on it.
|
|
19
|
+
|
|
20
|
+
while (parent != nil && ![parent isKindOfClass:RCTSurfaceView.class]) {
|
|
21
|
+
parent = parent.superview;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// This could be possible in modal context
|
|
25
|
+
if (parent == nil) {
|
|
26
|
+
return nil;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Experimentation shows that RCTSurfaceTouchHandler is the only gestureRecognizer registered here,
|
|
30
|
+
// so we should not be afraid of any performance hit here.
|
|
31
|
+
for (UIGestureRecognizer *recognizer in parent.gestureRecognizers) {
|
|
32
|
+
if ([recognizer isKindOfClass:RCTSurfaceTouchHandler.class]) {
|
|
33
|
+
return static_cast<RNS_TOUCH_HANDLER_ARCH_TYPE *>(recognizer);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#else
|
|
38
|
+
|
|
39
|
+
// On Paper we can access touchHandler hosted by `RCTRootContentView` which should be above ScreenStack
|
|
40
|
+
// in view hierarchy.
|
|
41
|
+
while (parent != nil && ![parent respondsToSelector:@selector(touchHandler)]) {
|
|
42
|
+
parent = parent.superview;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (parent != nil) {
|
|
46
|
+
RCTTouchHandler *touchHandler = [parent performSelector:@selector(touchHandler)];
|
|
47
|
+
return static_cast<RNS_TOUCH_HANDLER_ARCH_TYPE *>(touchHandler);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
51
|
+
|
|
52
|
+
return nil;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
@@ -11,6 +11,9 @@ var _ScreenStackNativeComponent = _interopRequireDefault(require("../fabric/Scre
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // Native components
|
|
13
13
|
const NativeScreenStack = _ScreenStackNativeComponent.default;
|
|
14
|
+
function isFabric() {
|
|
15
|
+
return 'nativeFabricUIManager' in global;
|
|
16
|
+
}
|
|
14
17
|
function ScreenStack(props) {
|
|
15
18
|
const {
|
|
16
19
|
children,
|
|
@@ -28,8 +31,12 @@ function ScreenStack(props) {
|
|
|
28
31
|
} = child;
|
|
29
32
|
const descriptor = props?.descriptor ?? props?.descriptors?.[key];
|
|
30
33
|
const isFreezeEnabled = descriptor?.options?.freezeOnBlur ?? (0, _reactNativeScreens.freezeEnabled)();
|
|
34
|
+
|
|
35
|
+
// On Fabric, when screen is frozen, animated and reanimated values are not updated
|
|
36
|
+
// due to component being unmounted. To avoid this, we don't freeze the previous screen there
|
|
37
|
+
const freezePreviousScreen = isFabric() ? size - index > 2 : size - index > 1;
|
|
31
38
|
return /*#__PURE__*/_react.default.createElement(_DelayedFreeze.default, {
|
|
32
|
-
freeze: isFreezeEnabled &&
|
|
39
|
+
freeze: isFreezeEnabled && freezePreviousScreen
|
|
33
40
|
}, child);
|
|
34
41
|
});
|
|
35
42
|
_react.default.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeScreens","_DelayedFreeze","_ScreenStackNativeComponent","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","NativeScreenStack","ScreenStackNativeComponent","ScreenStack","props","children","gestureDetectorBridge","rest","ref","React","useRef","size","Children","count","childrenWithFreeze","map","child","index","descriptor","descriptors","isFreezeEnabled","options","freezeOnBlur","freezeEnabled","createElement","freeze","useEffect","current","stackUseEffectCallback","_default","exports"],"sourceRoot":"../../../src","sources":["components/ScreenStack.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,2BAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA8E,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA,KAD9E;AAEA,MAAMQ,iBAAwD,GAC5DC,mCAAiC;AAEnC,SAASC,WAAWA,CAACC,KAAuB,EAAE;EAC5C,MAAM;IAAEC,QAAQ;IAAEC,qBAAqB;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAC1D,MAAMI,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAC,IAAI,CAAC;EAC9B,MAAMC,IAAI,GAAGF,cAAK,CAACG,QAAQ,CAACC,KAAK,CAACR,QAAQ,CAAC;EAC3C;EACA,MAAMS,kBAAkB,GAAGL,cAAK,CAACG,QAAQ,CAACG,GAAG,CAACV,QAAQ,EAAE,CAACW,KAAK,EAAEC,KAAK,KAAK;IACxE;IACA,MAAM;MAAEb,KAAK;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeScreens","_DelayedFreeze","_ScreenStackNativeComponent","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","NativeScreenStack","ScreenStackNativeComponent","isFabric","global","ScreenStack","props","children","gestureDetectorBridge","rest","ref","React","useRef","size","Children","count","childrenWithFreeze","map","child","index","descriptor","descriptors","isFreezeEnabled","options","freezeOnBlur","freezeEnabled","freezePreviousScreen","createElement","freeze","useEffect","current","stackUseEffectCallback","_default","exports"],"sourceRoot":"../../../src","sources":["components/ScreenStack.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,2BAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA8E,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA,KAD9E;AAEA,MAAMQ,iBAAwD,GAC5DC,mCAAiC;AAEnC,SAASC,QAAQA,CAAA,EAAG;EAClB,OAAO,uBAAuB,IAAIC,MAAM;AAC1C;AAEA,SAASC,WAAWA,CAACC,KAAuB,EAAE;EAC5C,MAAM;IAAEC,QAAQ;IAAEC,qBAAqB;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAC1D,MAAMI,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAC,IAAI,CAAC;EAC9B,MAAMC,IAAI,GAAGF,cAAK,CAACG,QAAQ,CAACC,KAAK,CAACR,QAAQ,CAAC;EAC3C;EACA,MAAMS,kBAAkB,GAAGL,cAAK,CAACG,QAAQ,CAACG,GAAG,CAACV,QAAQ,EAAE,CAACW,KAAK,EAAEC,KAAK,KAAK;IACxE;IACA,MAAM;MAAEb,KAAK;MAAEV;IAAI,CAAC,GAAGsB,KAAK;IAC5B,MAAME,UAAU,GAAGd,KAAK,EAAEc,UAAU,IAAId,KAAK,EAAEe,WAAW,GAAGzB,GAAG,CAAC;IACjE,MAAM0B,eAAe,GACnBF,UAAU,EAAEG,OAAO,EAAEC,YAAY,IAAI,IAAAC,iCAAa,EAAC,CAAC;;IAEtD;IACA;IACA,MAAMC,oBAAoB,GAAGvB,QAAQ,CAAC,CAAC,GACnCU,IAAI,GAAGM,KAAK,GAAG,CAAC,GAChBN,IAAI,GAAGM,KAAK,GAAG,CAAC;IAEpB,oBACEzC,MAAA,CAAAQ,OAAA,CAAAyC,aAAA,CAAC7C,cAAA,CAAAI,OAAa;MAAC0C,MAAM,EAAEN,eAAe,IAAII;IAAqB,GAC5DR,KACY,CAAC;EAEpB,CAAC,CAAC;EAEFP,cAAK,CAACkB,SAAS,CAAC,MAAM;IACpB,IAAIrB,qBAAqB,EAAE;MACzBA,qBAAqB,CAACsB,OAAO,CAACC,sBAAsB,CAACrB,GAAG,CAAC;IAC3D;EACF,CAAC,CAAC;EACF,oBACEhC,MAAA,CAAAQ,OAAA,CAAAyC,aAAA,CAAC1B,iBAAiB,EAAAd,QAAA,KAAKsB,IAAI;IAAEC,GAAG,EAAEA;EAAI,IACnCM,kBACgB,CAAC;AAExB;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAA/C,OAAA,GAEcmB,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/ModalScreenNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAU7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,
|
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/ModalScreenNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAU7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GA6Fe,IAAAG,+BAAsB,EAAc,gBAAgB,EAAE;EACnEC,aAAa,EAAE;AACjB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/ScreenNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAU7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,
|
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/ScreenNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAU7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GA6Fe,IAAAG,+BAAsB,EAAc,WAAW,EAAE;EAC9DC,aAAa,EAAE;AACjB,CAAC,CAAC"}
|
|
@@ -108,6 +108,7 @@ const RouteView = _ref2 => {
|
|
|
108
108
|
render: renderScene
|
|
109
109
|
} = descriptors[route.key];
|
|
110
110
|
const {
|
|
111
|
+
fullScreenSwipeShadowEnabled = false,
|
|
111
112
|
gestureEnabled,
|
|
112
113
|
headerShown,
|
|
113
114
|
hideKeyboardOnSwipe,
|
|
@@ -204,6 +205,7 @@ const RouteView = _ref2 => {
|
|
|
204
205
|
customAnimationOnSwipe: customAnimationOnSwipe,
|
|
205
206
|
freezeOnBlur: freezeOnBlur,
|
|
206
207
|
fullScreenSwipeEnabled: fullScreenSwipeEnabled,
|
|
208
|
+
fullScreenSwipeShadowEnabled: fullScreenSwipeShadowEnabled,
|
|
207
209
|
hideKeyboardOnSwipe: hideKeyboardOnSwipe,
|
|
208
210
|
homeIndicatorHidden: homeIndicatorHidden,
|
|
209
211
|
gestureEnabled: isAndroid ? false : gestureEnabled,
|