react-native-screens 3.20.0 → 3.21.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 +4 -1
- package/RNScreens.podspec +1 -1
- package/android/build.gradle +24 -6
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +4 -0
- package/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt +60 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +7 -9
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +12 -4
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +10 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +32 -8
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +36 -15
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +29 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +26 -0
- package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +15 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +5 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +3 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +1 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +1 -2
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
- package/ios/RNSConvert.h +8 -2
- package/ios/RNSConvert.mm +28 -2
- package/ios/RNSEnums.h +6 -0
- package/ios/RNSFullWindowOverlay.h +5 -5
- package/ios/RNSFullWindowOverlay.mm +13 -13
- package/ios/RNSScreen.h +14 -6
- package/ios/RNSScreen.mm +129 -28
- package/ios/RNSScreenContainer.h +2 -2
- package/ios/RNSScreenContainer.mm +5 -5
- package/ios/RNSScreenNavigationContainer.mm +3 -3
- package/ios/RNSScreenStack.h +4 -4
- package/ios/RNSScreenStack.mm +62 -23
- package/ios/RNSScreenStackHeaderConfig.h +10 -3
- package/ios/RNSScreenStackHeaderConfig.mm +138 -81
- package/ios/RNSScreenStackHeaderSubview.h +5 -6
- package/ios/RNSScreenStackHeaderSubview.mm +20 -11
- package/ios/RNSScreenWindowTraits.mm +21 -2
- package/ios/RNSSearchBar.h +5 -4
- package/ios/RNSSearchBar.mm +87 -12
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -8
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -8
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +7 -7
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/commonjs/index.js +8 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.native.js +51 -10
- package/lib/commonjs/index.native.js.map +1 -1
- package/lib/commonjs/native-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -16
- 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/HeaderHeightContext.js.map +1 -1
- 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/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js +3 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +14 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/commonjs/utils.js +8 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -5
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -6
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -6
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js +4 -6
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.native.js +53 -11
- package/lib/module/index.native.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +18 -16
- 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/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- 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 -0
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/native-stack/views/HeaderConfig.js +3 -1
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +15 -1
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.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 +6 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/TransitionProgressContext.d.ts +1 -1
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +62 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +34 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +9 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +9 -0
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +46 -0
- package/lib/typescript/index.d.ts +3 -3
- package/lib/typescript/native-stack/types.d.ts +64 -10
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -1
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -1
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -1
- package/lib/typescript/types.d.ts +90 -11
- package/lib/typescript/useTransitionProgress.d.ts +3 -3
- package/lib/typescript/utils.d.ts +1 -0
- package/native-stack/README.md +59 -1
- package/package.json +11 -14
- package/src/fabric/FullWindowOverlayNativeComponent.ts +6 -0
- package/src/fabric/ScreenContainerNativeComponent.ts +6 -0
- package/src/fabric/ScreenNativeComponent.ts +97 -0
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +9 -0
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +43 -0
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +20 -0
- package/src/fabric/ScreenStackNativeComponent.ts +12 -0
- package/src/fabric/SearchBarNativeComponent.ts +73 -0
- package/src/index.native.tsx +109 -14
- package/src/index.tsx +5 -3
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +23 -19
- package/src/native-stack/types.tsx +55 -0
- package/src/native-stack/views/FontProcessor.tsx +1 -0
- package/src/native-stack/views/HeaderConfig.tsx +3 -1
- package/src/native-stack/views/NativeStackView.tsx +14 -2
- package/src/types.tsx +84 -2
- package/src/utils.ts +6 -0
- package/createNativeStackNavigator/README.md +0 -522
- package/createNativeStackNavigator/package.json +0 -6
- package/lib/commonjs/createNativeStackNavigator.js +0 -374
- package/lib/commonjs/createNativeStackNavigator.js.map +0 -1
- package/lib/module/createNativeStackNavigator.js +0 -366
- package/lib/module/createNativeStackNavigator.js.map +0 -1
- package/lib/typescript/createNativeStackNavigator.d.ts +0 -51
- package/src/createNativeStackNavigator.tsx +0 -594
- package/src/fabric/FullWindowOverlayNativeComponent.js +0 -19
- package/src/fabric/ScreenContainerNativeComponent.js +0 -19
- package/src/fabric/ScreenNativeComponent.js +0 -97
- package/src/fabric/ScreenNavigationContainerNativeComponent.js +0 -19
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -54
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -31
- package/src/fabric/ScreenStackNativeComponent.js +0 -23
- package/src/fabric/SearchBarNativeComponent.js +0 -62
- /package/android/src/main/res/{anim → base/anim}/rns_default_enter_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_enter_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_exit_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_exit_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_from_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_to_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_20.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_250.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_350.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_medium.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_left.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_right.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_left.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_right.xml +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:shareInterpolator="false">
|
|
5
|
+
|
|
6
|
+
<alpha
|
|
7
|
+
android:fromAlpha="0.0"
|
|
8
|
+
android:toAlpha="1.0"
|
|
9
|
+
android:fillEnabled="true"
|
|
10
|
+
android:fillBefore="true"
|
|
11
|
+
android:fillAfter="true"
|
|
12
|
+
android:interpolator="@android:anim/linear_interpolator"
|
|
13
|
+
android:startOffset="50"
|
|
14
|
+
android:duration="83" />
|
|
15
|
+
|
|
16
|
+
<translate
|
|
17
|
+
android:fromXDelta="10%"
|
|
18
|
+
android:toXDelta="0"
|
|
19
|
+
android:fillEnabled="true"
|
|
20
|
+
android:fillBefore="true"
|
|
21
|
+
android:fillAfter="true"
|
|
22
|
+
android:startOffset="0"
|
|
23
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
24
|
+
android:duration="450" />
|
|
25
|
+
|
|
26
|
+
<extend
|
|
27
|
+
android:fromExtendLeft="10%"
|
|
28
|
+
android:fromExtendTop="0"
|
|
29
|
+
android:fromExtendRight="0"
|
|
30
|
+
android:fromExtendBottom="0"
|
|
31
|
+
android:toExtendLeft="10%"
|
|
32
|
+
android:toExtendTop="0"
|
|
33
|
+
android:toExtendRight="0"
|
|
34
|
+
android:toExtendBottom="0"
|
|
35
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
36
|
+
android:startOffset="0"
|
|
37
|
+
android:duration="450" />
|
|
38
|
+
</set>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:shareInterpolator="false">
|
|
5
|
+
|
|
6
|
+
<alpha
|
|
7
|
+
android:fromAlpha="1.0"
|
|
8
|
+
android:toAlpha="0.0"
|
|
9
|
+
android:fillEnabled="true"
|
|
10
|
+
android:fillBefore="true"
|
|
11
|
+
android:fillAfter="true"
|
|
12
|
+
android:interpolator="@anim/rns_standard_accelerate_interpolator"
|
|
13
|
+
android:startOffset="0"
|
|
14
|
+
android:duration="450" />
|
|
15
|
+
|
|
16
|
+
<translate
|
|
17
|
+
android:fromXDelta="0"
|
|
18
|
+
android:toXDelta="-10%"
|
|
19
|
+
android:fillEnabled="true"
|
|
20
|
+
android:fillBefore="true"
|
|
21
|
+
android:fillAfter="true"
|
|
22
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
23
|
+
android:startOffset="0"
|
|
24
|
+
android:duration="450" />
|
|
25
|
+
|
|
26
|
+
<extend
|
|
27
|
+
android:fromExtendLeft="0"
|
|
28
|
+
android:fromExtendTop="0"
|
|
29
|
+
android:fromExtendRight="10%"
|
|
30
|
+
android:fromExtendBottom="0"
|
|
31
|
+
android:toExtendLeft="0"
|
|
32
|
+
android:toExtendTop="0"
|
|
33
|
+
android:toExtendRight="10%"
|
|
34
|
+
android:toExtendBottom="0"
|
|
35
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
36
|
+
android:startOffset="0"
|
|
37
|
+
android:duration="450" />
|
|
38
|
+
</set>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:shareInterpolator="false">
|
|
5
|
+
|
|
6
|
+
<alpha
|
|
7
|
+
android:fromAlpha="1.0"
|
|
8
|
+
android:toAlpha="1.0"
|
|
9
|
+
android:fillEnabled="true"
|
|
10
|
+
android:fillBefore="true"
|
|
11
|
+
android:fillAfter="true"
|
|
12
|
+
android:interpolator="@android:interpolator/linear"
|
|
13
|
+
android:startOffset="0"
|
|
14
|
+
android:duration="450" />
|
|
15
|
+
|
|
16
|
+
<translate
|
|
17
|
+
android:fromXDelta="-10%"
|
|
18
|
+
android:toXDelta="0"
|
|
19
|
+
android:fillEnabled="true"
|
|
20
|
+
android:fillBefore="true"
|
|
21
|
+
android:fillAfter="true"
|
|
22
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
23
|
+
android:startOffset="0"
|
|
24
|
+
android:duration="450" />
|
|
25
|
+
|
|
26
|
+
<extend
|
|
27
|
+
android:fromExtendLeft="0"
|
|
28
|
+
android:fromExtendTop="0"
|
|
29
|
+
android:fromExtendRight="10%"
|
|
30
|
+
android:fromExtendBottom="0"
|
|
31
|
+
android:toExtendLeft="0"
|
|
32
|
+
android:toExtendTop="0"
|
|
33
|
+
android:toExtendRight="10%"
|
|
34
|
+
android:toExtendBottom="0"
|
|
35
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
36
|
+
android:startOffset="0"
|
|
37
|
+
android:duration="450" />
|
|
38
|
+
</set>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:shareInterpolator="false">
|
|
5
|
+
|
|
6
|
+
<alpha
|
|
7
|
+
android:fromAlpha="1.0"
|
|
8
|
+
android:toAlpha="0.0"
|
|
9
|
+
android:fillEnabled="true"
|
|
10
|
+
android:fillBefore="true"
|
|
11
|
+
android:fillAfter="true"
|
|
12
|
+
android:interpolator="@android:interpolator/linear"
|
|
13
|
+
android:startOffset="35"
|
|
14
|
+
android:duration="83" />
|
|
15
|
+
|
|
16
|
+
<translate
|
|
17
|
+
android:fromXDelta="0"
|
|
18
|
+
android:toXDelta="10%"
|
|
19
|
+
android:fillEnabled="true"
|
|
20
|
+
android:fillBefore="true"
|
|
21
|
+
android:fillAfter="true"
|
|
22
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
23
|
+
android:startOffset="0"
|
|
24
|
+
android:duration="450" />
|
|
25
|
+
|
|
26
|
+
<extend
|
|
27
|
+
android:fromExtendLeft="10%"
|
|
28
|
+
android:fromExtendTop="0"
|
|
29
|
+
android:fromExtendRight="0"
|
|
30
|
+
android:fromExtendBottom="0"
|
|
31
|
+
android:toExtendLeft="10%"
|
|
32
|
+
android:toExtendTop="0"
|
|
33
|
+
android:toExtendRight="0"
|
|
34
|
+
android:toExtendBottom="0"
|
|
35
|
+
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
|
|
36
|
+
android:startOffset="0"
|
|
37
|
+
android:duration="450" />
|
|
38
|
+
</set>
|
package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java
CHANGED
|
@@ -23,6 +23,21 @@ public class RNSScreenManagerDelegate<T extends View, U extends BaseViewManagerI
|
|
|
23
23
|
@Override
|
|
24
24
|
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
25
25
|
switch (propName) {
|
|
26
|
+
case "sheetAllowedDetents":
|
|
27
|
+
mViewManager.setSheetAllowedDetents(view, (String) value);
|
|
28
|
+
break;
|
|
29
|
+
case "sheetLargestUndimmedDetent":
|
|
30
|
+
mViewManager.setSheetLargestUndimmedDetent(view, (String) value);
|
|
31
|
+
break;
|
|
32
|
+
case "sheetGrabberVisible":
|
|
33
|
+
mViewManager.setSheetGrabberVisible(view, value == null ? false : (boolean) value);
|
|
34
|
+
break;
|
|
35
|
+
case "sheetCornerRadius":
|
|
36
|
+
mViewManager.setSheetCornerRadius(view, value == null ? -1f : ((Double) value).floatValue());
|
|
37
|
+
break;
|
|
38
|
+
case "sheetExpandsWhenScrolledToEdge":
|
|
39
|
+
mViewManager.setSheetExpandsWhenScrolledToEdge(view, value == null ? false : (boolean) value);
|
|
40
|
+
break;
|
|
26
41
|
case "customAnimationOnSwipe":
|
|
27
42
|
mViewManager.setCustomAnimationOnSwipe(view, value == null ? false : (boolean) value);
|
|
28
43
|
break;
|
package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java
CHANGED
|
@@ -14,6 +14,11 @@ import androidx.annotation.Nullable;
|
|
|
14
14
|
import com.facebook.react.bridge.ReadableMap;
|
|
15
15
|
|
|
16
16
|
public interface RNSScreenManagerInterface<T extends View> {
|
|
17
|
+
void setSheetAllowedDetents(T view, @Nullable String value);
|
|
18
|
+
void setSheetLargestUndimmedDetent(T view, @Nullable String value);
|
|
19
|
+
void setSheetGrabberVisible(T view, boolean value);
|
|
20
|
+
void setSheetCornerRadius(T view, float value);
|
|
21
|
+
void setSheetExpandsWhenScrolledToEdge(T view, boolean value);
|
|
17
22
|
void setCustomAnimationOnSwipe(T view, boolean value);
|
|
18
23
|
void setFullScreenSwipeEnabled(T view, boolean value);
|
|
19
24
|
void setHomeIndicatorHidden(T view, boolean value);
|
|
@@ -34,6 +34,9 @@ public class RNSScreenStackHeaderConfigManagerDelegate<T extends View, U extends
|
|
|
34
34
|
case "backTitleFontSize":
|
|
35
35
|
mViewManager.setBackTitleFontSize(view, value == null ? 0 : ((Double) value).intValue());
|
|
36
36
|
break;
|
|
37
|
+
case "backTitleVisible":
|
|
38
|
+
mViewManager.setBackTitleVisible(view, value == null ? true : (boolean) value);
|
|
39
|
+
break;
|
|
37
40
|
case "color":
|
|
38
41
|
mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
39
42
|
break;
|
|
@@ -17,6 +17,7 @@ public interface RNSScreenStackHeaderConfigManagerInterface<T extends View> {
|
|
|
17
17
|
void setBackTitle(T view, @Nullable String value);
|
|
18
18
|
void setBackTitleFontFamily(T view, @Nullable String value);
|
|
19
19
|
void setBackTitleFontSize(T view, int value);
|
|
20
|
+
void setBackTitleVisible(T view, boolean value);
|
|
20
21
|
void setColor(T view, @Nullable Integer value);
|
|
21
22
|
void setDirection(T view, @Nullable String value);
|
|
22
23
|
void setHidden(T view, boolean value);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
+
|
|
3
|
+
#include "RCTImageComponentView+RNSScreenStackHeaderConfig.h"
|
|
4
|
+
|
|
5
|
+
@implementation RCTImageComponentView (RNSScreenStackHeaderConfig)
|
|
6
|
+
|
|
7
|
+
- (UIImage *)image
|
|
8
|
+
{
|
|
9
|
+
return _imageView.image;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
package/ios/RNSConvert.h
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#ifdef
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
2
|
#import <react/renderer/components/rnscreens/Props.h>
|
|
3
3
|
#import "RNSEnums.h"
|
|
4
4
|
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
+ (RNSScreenSwipeDirection)RNSScreenSwipeDirectionFromCppEquivalent:
|
|
20
20
|
(facebook::react::RNSScreenSwipeDirection)swipeDirection;
|
|
21
21
|
|
|
22
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents:
|
|
23
|
+
(facebook::react::RNSScreenSheetAllowedDetents)allowedDetents;
|
|
24
|
+
|
|
25
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent:
|
|
26
|
+
(facebook::react::RNSScreenSheetLargestUndimmedDetent)detent;
|
|
27
|
+
|
|
22
28
|
+ (NSDictionary *)gestureResponseDistanceDictFromCppStruct:
|
|
23
29
|
(const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance;
|
|
24
30
|
|
|
@@ -27,4 +33,4 @@
|
|
|
27
33
|
|
|
28
34
|
@end
|
|
29
35
|
|
|
30
|
-
#endif //
|
|
36
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
package/ios/RNSConvert.mm
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#import "RNSConvert.h"
|
|
2
2
|
|
|
3
|
-
#ifdef
|
|
3
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
4
4
|
@implementation RNSConvert
|
|
5
5
|
|
|
6
6
|
+ (RNSScreenStackPresentation)RNSScreenStackPresentationFromCppEquivalent:
|
|
@@ -89,6 +89,32 @@
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents:
|
|
93
|
+
(facebook::react::RNSScreenSheetAllowedDetents)allowedDetents
|
|
94
|
+
{
|
|
95
|
+
switch (allowedDetents) {
|
|
96
|
+
case facebook::react::RNSScreenSheetAllowedDetents::All:
|
|
97
|
+
return RNSScreenDetentTypeAll;
|
|
98
|
+
case facebook::react::RNSScreenSheetAllowedDetents::Large:
|
|
99
|
+
return RNSScreenDetentTypeLarge;
|
|
100
|
+
case facebook::react::RNSScreenSheetAllowedDetents::Medium:
|
|
101
|
+
return RNSScreenDetentTypeMedium;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent:
|
|
106
|
+
(facebook::react::RNSScreenSheetLargestUndimmedDetent)detent
|
|
107
|
+
{
|
|
108
|
+
switch (detent) {
|
|
109
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::All:
|
|
110
|
+
return RNSScreenDetentTypeAll;
|
|
111
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::Large:
|
|
112
|
+
return RNSScreenDetentTypeLarge;
|
|
113
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::Medium:
|
|
114
|
+
return RNSScreenDetentTypeMedium;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
92
118
|
+ (NSDictionary *)gestureResponseDistanceDictFromCppStruct:
|
|
93
119
|
(const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance
|
|
94
120
|
{
|
|
@@ -117,4 +143,4 @@
|
|
|
117
143
|
|
|
118
144
|
@end
|
|
119
145
|
|
|
120
|
-
#endif //
|
|
146
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
package/ios/RNSEnums.h
CHANGED
|
@@ -57,3 +57,9 @@ typedef NS_ENUM(NSInteger, RNSScreenStackHeaderSubviewType) {
|
|
|
57
57
|
RNSScreenStackHeaderSubviewTypeCenter,
|
|
58
58
|
RNSScreenStackHeaderSubviewTypeSearchBar,
|
|
59
59
|
};
|
|
60
|
+
|
|
61
|
+
typedef NS_ENUM(NSInteger, RNSScreenDetentType) {
|
|
62
|
+
RNSScreenDetentTypeMedium,
|
|
63
|
+
RNSScreenDetentTypeLarge,
|
|
64
|
+
RNSScreenDetentTypeAll,
|
|
65
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#import <React/RCTViewManager.h>
|
|
2
2
|
|
|
3
|
-
#ifdef
|
|
3
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
4
4
|
#import <React/RCTViewComponentView.h>
|
|
5
5
|
#else
|
|
6
6
|
#import <React/RCTInvalidating.h>
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
@end
|
|
17
17
|
|
|
18
18
|
@interface RNSFullWindowOverlay :
|
|
19
|
-
#ifdef
|
|
19
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
20
20
|
RCTViewComponentView
|
|
21
21
|
#else
|
|
22
22
|
RCTView <RCTInvalidating>
|
|
23
|
-
#endif //
|
|
23
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
24
24
|
|
|
25
|
-
#ifdef
|
|
25
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
26
26
|
@property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics;
|
|
27
27
|
@property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics;
|
|
28
|
-
#endif //
|
|
28
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
29
29
|
|
|
30
30
|
@end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import "RNSFullWindowOverlay.h"
|
|
4
4
|
|
|
5
|
-
#ifdef
|
|
5
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
6
6
|
#import <React/RCTConversions.h>
|
|
7
7
|
#import <React/RCTFabricComponentsPlugins.h>
|
|
8
8
|
#import <React/RCTSurfaceTouchHandler.h>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#import <react/renderer/components/rnscreens/RCTComponentViewHelpers.h>
|
|
12
12
|
#else
|
|
13
13
|
#import <React/RCTTouchHandler.h>
|
|
14
|
-
#endif //
|
|
14
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
15
15
|
|
|
16
16
|
@implementation RNSFullWindowOverlayContainer
|
|
17
17
|
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
__weak RCTBridge *_bridge;
|
|
64
64
|
RNSFullWindowOverlayContainer *_container;
|
|
65
65
|
CGRect _reactFrame;
|
|
66
|
-
#ifdef
|
|
66
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
67
67
|
RCTSurfaceTouchHandler *_touchHandler;
|
|
68
68
|
#else
|
|
69
69
|
RCTTouchHandler *_touchHandler;
|
|
70
|
-
#endif //
|
|
70
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
#ifdef
|
|
73
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
74
74
|
- (instancetype)init
|
|
75
75
|
{
|
|
76
76
|
if (self = [super init]) {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
return self;
|
|
82
82
|
}
|
|
83
|
-
#endif //
|
|
83
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
84
84
|
|
|
85
85
|
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
|
86
86
|
{
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
} else {
|
|
130
130
|
if (_touchHandler == nil) {
|
|
131
|
-
#ifdef
|
|
131
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
132
132
|
_touchHandler = [RCTSurfaceTouchHandler new];
|
|
133
133
|
#else
|
|
134
134
|
_touchHandler = [[RCTTouchHandler alloc] initWithBridge:_bridge];
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
#ifdef
|
|
141
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
142
142
|
#pragma mark - Fabric Specific
|
|
143
143
|
|
|
144
144
|
// When the component unmounts we remove it from window's children,
|
|
@@ -205,27 +205,27 @@
|
|
|
205
205
|
_container = nil;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
#endif //
|
|
208
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
209
209
|
|
|
210
210
|
@end
|
|
211
211
|
|
|
212
|
-
#ifdef
|
|
212
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
213
213
|
Class<RCTComponentViewProtocol> RNSFullWindowOverlayCls(void)
|
|
214
214
|
{
|
|
215
215
|
return RNSFullWindowOverlay.class;
|
|
216
216
|
}
|
|
217
|
-
#endif //
|
|
217
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
218
218
|
|
|
219
219
|
@implementation RNSFullWindowOverlayManager
|
|
220
220
|
|
|
221
221
|
RCT_EXPORT_MODULE()
|
|
222
222
|
|
|
223
|
-
#ifdef
|
|
223
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
224
224
|
#else
|
|
225
225
|
- (UIView *)view
|
|
226
226
|
{
|
|
227
227
|
return [[RNSFullWindowOverlay alloc] initWithBridge:self.bridge];
|
|
228
228
|
}
|
|
229
|
-
#endif //
|
|
229
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
230
230
|
|
|
231
231
|
@end
|
package/ios/RNSScreen.h
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#import "RNSEnums.h"
|
|
5
5
|
#import "RNSScreenContainer.h"
|
|
6
6
|
|
|
7
|
-
#if
|
|
7
|
+
#if RCT_NEW_ARCH_ENABLED
|
|
8
8
|
#import <React/RCTViewComponentView.h>
|
|
9
9
|
#else
|
|
10
10
|
#import <React/RCTView.h>
|
|
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
33
33
|
- (UIViewController *)findChildVCForConfigAndTrait:(RNSWindowTrait)trait includingModals:(BOOL)includingModals;
|
|
34
34
|
- (void)notifyFinishTransitioning;
|
|
35
35
|
- (RNSScreenView *)screenView;
|
|
36
|
-
#ifdef
|
|
36
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
37
37
|
- (void)setViewToSnapshot:(UIView *)snapshot;
|
|
38
38
|
- (void)resetViewToScreen;
|
|
39
39
|
#endif
|
|
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
41
41
|
@end
|
|
42
42
|
|
|
43
43
|
@interface RNSScreenView :
|
|
44
|
-
#ifdef
|
|
44
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
45
45
|
RCTViewComponentView
|
|
46
46
|
#else
|
|
47
47
|
RCTView
|
|
@@ -75,9 +75,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
75
75
|
@property (nonatomic) UIInterfaceOrientationMask screenOrientation;
|
|
76
76
|
@property (nonatomic) BOOL statusBarHidden;
|
|
77
77
|
@property (nonatomic) BOOL homeIndicatorHidden;
|
|
78
|
+
|
|
79
|
+
// Props controlling UISheetPresentationController
|
|
80
|
+
@property (nonatomic) RNSScreenDetentType sheetAllowedDetents;
|
|
81
|
+
@property (nonatomic) RNSScreenDetentType sheetLargestUndimmedDetent;
|
|
82
|
+
@property (nonatomic) BOOL sheetGrabberVisible;
|
|
83
|
+
@property (nonatomic) CGFloat sheetCornerRadius;
|
|
84
|
+
@property (nonatomic) BOOL sheetExpandsWhenScrolledToEdge;
|
|
78
85
|
#endif // !TARGET_OS_TV
|
|
79
86
|
|
|
80
|
-
#ifdef
|
|
87
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
81
88
|
// we recreate the behavior of `reactSetFrame` on new architecture
|
|
82
89
|
@property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics;
|
|
83
90
|
@property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics;
|
|
@@ -90,11 +97,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
90
97
|
@property (nonatomic, copy) RCTDirectEventBlock onWillDisappear;
|
|
91
98
|
@property (nonatomic, copy) RCTDirectEventBlock onNativeDismissCancelled;
|
|
92
99
|
@property (nonatomic, copy) RCTDirectEventBlock onTransitionProgress;
|
|
93
|
-
#endif //
|
|
100
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
94
101
|
|
|
95
102
|
- (void)notifyFinishTransitioning;
|
|
96
103
|
|
|
97
|
-
#ifdef
|
|
104
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
98
105
|
- (void)notifyWillAppear;
|
|
99
106
|
- (void)notifyWillDisappear;
|
|
100
107
|
- (void)notifyAppear;
|
|
@@ -104,6 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
104
111
|
#endif
|
|
105
112
|
|
|
106
113
|
- (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward;
|
|
114
|
+
- (void)notifyDismissCancelledWithDismissCount:(int)dismissCount;
|
|
107
115
|
- (BOOL)isModal;
|
|
108
116
|
|
|
109
117
|
@end
|