@amazon-devices/react-native-screens 3.0.9000000000 → 3.0.9000000003
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/SystemModules/amzn__react-native-screens-3.private.modules.txt +116 -61
- package/kepler-compatibility.json +5 -2
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/components/DebugContainer.js.map +1 -1
- package/lib/commonjs/components/DebugContainer.web.js.map +1 -1
- package/lib/commonjs/components/Screen.web.js.map +1 -1
- package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -1
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -1
- package/lib/commonjs/components/ScreenStackItem.js.map +1 -1
- package/lib/commonjs/components/SearchBar.js.map +1 -1
- package/lib/commonjs/components/helpers/usePrevious.js.map +1 -1
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js.map +1 -1
- package/lib/commonjs/index.js +0 -210
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.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/useAnimatedHeaderHeight.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/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/module/components/Screen.web.js.map +1 -1
- package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -1
- package/lib/module/components/ScreenStackHeaderConfig.web.js.map +1 -1
- package/lib/module/components/SearchBar.js.map +1 -1
- package/lib/module/components/helpers/usePrevious.js.map +1 -1
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/typescript/components/Screen.web.d.ts +1 -1
- package/lib/typescript/components/Screen.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +5 -5
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +6 -6
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -1
- package/lib/typescript/components/SearchBar.d.ts.map +1 -1
- package/lib/typescript/components/helpers/usePrevious.d.ts.map +1 -1
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +2 -2
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +2 -2
- package/lib/typescript/types.d.ts.map +1 -1
- package/oss-attribution/attribution.txt +77 -0
- package/oss-attribution/licenseInfos.json +27 -0
- package/package.json +1 -1
- package/src/index.tsx +0 -55
- package/SystemBundles/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.bundle +0 -45301
- package/SystemBundles/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.map +0 -13711
- package/lib/commonjs/TransitionProgressContext.js +0 -12
- package/lib/commonjs/components/DebugContainer.js +0 -39
- package/lib/commonjs/components/DebugContainer.web.js +0 -15
- package/lib/commonjs/components/FullWindowOverlay.js +0 -31
- package/lib/commonjs/components/FullWindowOverlay.web.js +0 -9
- package/lib/commonjs/components/Screen.js +0 -286
- package/lib/commonjs/components/Screen.web.js +0 -47
- package/lib/commonjs/components/ScreenContainer.js +0 -32
- package/lib/commonjs/components/ScreenContainer.web.js +0 -10
- package/lib/commonjs/components/ScreenContentWrapper.js +0 -17
- package/lib/commonjs/components/ScreenContentWrapper.web.js +0 -10
- package/lib/commonjs/components/ScreenFooter.js +0 -25
- package/lib/commonjs/components/ScreenFooter.web.js +0 -11
- package/lib/commonjs/components/ScreenStack.js +0 -67
- package/lib/commonjs/components/ScreenStack.web.js +0 -10
- package/lib/commonjs/components/ScreenStackHeaderConfig.js +0 -90
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +0 -27
- package/lib/commonjs/components/ScreenStackItem.js +0 -107
- package/lib/commonjs/components/SearchBar.js +0 -63
- package/lib/commonjs/components/SearchBar.web.js +0 -10
- package/lib/commonjs/components/helpers/DelayedFreeze.js +0 -31
- package/lib/commonjs/components/helpers/usePrevious.js +0 -15
- package/lib/commonjs/contexts.js +0 -11
- package/lib/commonjs/core.js +0 -40
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -26
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js +0 -14
- package/lib/commonjs/fabric/NativeScreensModule.js +0 -10
- package/lib/commonjs/fabric/NativeScreensModule.web.js +0 -8
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -30
- package/lib/commonjs/fabric/ScreenContentWrapperNativeComponent.js +0 -18
- package/lib/commonjs/fabric/ScreenFooterNativeComponent.js +0 -10
- package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -70
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -12
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -32
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -15
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -32
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +0 -18
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +0 -19
- package/lib/commonjs/gesture-handler/RNScreensTurboModule.js +0 -8
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js +0 -201
- package/lib/commonjs/gesture-handler/constraints.js +0 -64
- package/lib/commonjs/gesture-handler/defaults.js +0 -45
- package/lib/commonjs/gesture-handler/fabricUtils.js +0 -66
- package/lib/commonjs/gesture-handler/fabricUtils.web.js +0 -17
- package/lib/commonjs/gesture-handler/index.js +0 -14
- package/lib/commonjs/native-stack/contexts/GHContext.js +0 -12
- package/lib/commonjs/native-stack/index.js +0 -49
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +0 -76
- package/lib/commonjs/native-stack/types.js +0 -6
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +0 -12
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +0 -12
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +0 -75
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js +0 -35
- package/lib/commonjs/native-stack/utils/getStatusBarHeight.js +0 -22
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +0 -19
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +0 -52
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js +0 -19
- package/lib/commonjs/native-stack/views/FontProcessor.js +0 -19
- package/lib/commonjs/native-stack/views/FooterComponent.js +0 -17
- package/lib/commonjs/native-stack/views/HeaderConfig.js +0 -149
- package/lib/commonjs/native-stack/views/NativeStackView.js +0 -420
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +0 -12
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +0 -95
- package/lib/commonjs/reanimated/ReanimatedScreen.js +0 -22
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +0 -39
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +0 -12
- package/lib/commonjs/reanimated/index.js +0 -28
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +0 -19
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +0 -19
- package/lib/commonjs/types.js +0 -6
- package/lib/commonjs/useTransitionProgress.js +0 -19
- package/lib/commonjs/utils.js +0 -43
- package/lib/module/TransitionProgressContext.js +0 -5
- package/lib/module/components/DebugContainer.js +0 -30
- package/lib/module/components/DebugContainer.web.js +0 -6
- package/lib/module/components/FullWindowOverlay.js +0 -24
- package/lib/module/components/FullWindowOverlay.web.js +0 -3
- package/lib/module/components/Screen.js +0 -282
- package/lib/module/components/Screen.web.js +0 -40
- package/lib/module/components/ScreenContainer.js +0 -26
- package/lib/module/components/ScreenContainer.web.js +0 -4
- package/lib/module/components/ScreenContentWrapper.js +0 -10
- package/lib/module/components/ScreenContentWrapper.web.js +0 -4
- package/lib/module/components/ScreenFooter.js +0 -18
- package/lib/module/components/ScreenFooter.web.js +0 -6
- package/lib/module/components/ScreenStack.js +0 -63
- package/lib/module/components/ScreenStack.web.js +0 -4
- package/lib/module/components/ScreenStackHeaderConfig.js +0 -81
- package/lib/module/components/ScreenStackHeaderConfig.web.js +0 -14
- package/lib/module/components/ScreenStackItem.js +0 -98
- package/lib/module/components/SearchBar.js +0 -57
- package/lib/module/components/SearchBar.web.js +0 -4
- package/lib/module/components/helpers/DelayedFreeze.js +0 -24
- package/lib/module/components/helpers/usePrevious.js +0 -9
- package/lib/module/contexts.js +0 -4
- package/lib/module/core.js +0 -31
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -20
- package/lib/module/fabric/ModalScreenNativeComponent.js +0 -10
- package/lib/module/fabric/NativeScreensModule.js +0 -5
- package/lib/module/fabric/NativeScreensModule.web.js +0 -2
- package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -24
- package/lib/module/fabric/ScreenContentWrapperNativeComponent.js +0 -10
- package/lib/module/fabric/ScreenFooterNativeComponent.js +0 -3
- package/lib/module/fabric/ScreenNativeComponent.js +0 -66
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -6
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -29
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -11
- package/lib/module/fabric/ScreenStackNativeComponent.js +0 -28
- package/lib/module/fabric/SearchBarNativeComponent.js +0 -12
- package/lib/module/gesture-handler/GestureDetectorProvider.js +0 -12
- package/lib/module/gesture-handler/RNScreensTurboModule.js +0 -2
- package/lib/module/gesture-handler/ScreenGestureDetector.js +0 -193
- package/lib/module/gesture-handler/constraints.js +0 -56
- package/lib/module/gesture-handler/defaults.js +0 -39
- package/lib/module/gesture-handler/fabricUtils.js +0 -61
- package/lib/module/gesture-handler/fabricUtils.web.js +0 -10
- package/lib/module/gesture-handler/index.js +0 -5
- package/lib/module/index.js +0 -33
- package/lib/module/native-stack/contexts/GHContext.js +0 -6
- package/lib/module/native-stack/index.js +0 -22
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +0 -73
- package/lib/module/native-stack/types.js +0 -2
- package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js +0 -4
- package/lib/module/native-stack/utils/HeaderHeightContext.js +0 -4
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js +0 -68
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js +0 -29
- package/lib/module/native-stack/utils/getStatusBarHeight.js +0 -16
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js +0 -10
- package/lib/module/native-stack/utils/useBackPressSubscription.js +0 -45
- package/lib/module/native-stack/utils/useHeaderHeight.js +0 -10
- package/lib/module/native-stack/views/FontProcessor.js +0 -12
- package/lib/module/native-stack/views/FooterComponent.js +0 -10
- package/lib/module/native-stack/views/HeaderConfig.js +0 -139
- package/lib/module/native-stack/views/NativeStackView.js +0 -423
- package/lib/module/reanimated/ReanimatedHeaderHeightContext.js +0 -5
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +0 -93
- package/lib/module/reanimated/ReanimatedScreen.js +0 -16
- package/lib/module/reanimated/ReanimatedScreenProvider.js +0 -32
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js +0 -5
- package/lib/module/reanimated/index.js +0 -4
- package/lib/module/reanimated/useReanimatedHeaderHeight.js +0 -10
- package/lib/module/reanimated/useReanimatedTransitionProgress.js +0 -10
- package/lib/module/types.js +0 -2
- package/lib/module/useTransitionProgress.js +0 -10
- package/lib/module/utils.js +0 -35
- package/src/TransitionProgressContext.tsx +0 -14
- package/src/components/DebugContainer.tsx +0 -46
- package/src/components/DebugContainer.web.tsx +0 -7
- package/src/components/FullWindowOverlay.tsx +0 -33
- package/src/components/FullWindowOverlay.web.tsx +0 -6
- package/src/components/Screen.tsx +0 -392
- package/src/components/Screen.web.tsx +0 -46
- package/src/components/ScreenContainer.tsx +0 -28
- package/src/components/ScreenContainer.web.tsx +0 -5
- package/src/components/ScreenContentWrapper.tsx +0 -9
- package/src/components/ScreenContentWrapper.web.tsx +0 -5
- package/src/components/ScreenFooter.tsx +0 -20
- package/src/components/ScreenFooter.web.tsx +0 -7
- package/src/components/ScreenStack.tsx +0 -112
- package/src/components/ScreenStack.web.tsx +0 -5
- package/src/components/ScreenStackHeaderConfig.tsx +0 -122
- package/src/components/ScreenStackHeaderConfig.web.tsx +0 -39
- package/src/components/ScreenStackItem.tsx +0 -174
- package/src/components/SearchBar.tsx +0 -102
- package/src/components/SearchBar.web.tsx +0 -5
- package/src/components/helpers/DelayedFreeze.tsx +0 -27
- package/src/components/helpers/usePrevious.tsx +0 -11
- package/src/contexts.tsx +0 -9
- package/src/core.ts +0 -45
- package/src/fabric/FullWindowOverlayNativeComponent.ts +0 -23
- package/src/fabric/ModalScreenNativeComponent.ts +0 -115
- package/src/fabric/NativeScreensModule.ts +0 -8
- package/src/fabric/NativeScreensModule.web.ts +0 -1
- package/src/fabric/ScreenContainerNativeComponent.ts +0 -28
- package/src/fabric/ScreenContentWrapperNativeComponent.ts +0 -14
- package/src/fabric/ScreenFooterNativeComponent.ts +0 -6
- package/src/fabric/ScreenNativeComponent.ts +0 -171
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +0 -12
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +0 -97
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +0 -26
- package/src/fabric/ScreenStackNativeComponent.ts +0 -34
- package/src/fabric/SearchBarNativeComponent.ts +0 -83
- package/src/gesture-handler/GestureDetectorProvider.tsx +0 -16
- package/src/gesture-handler/RNScreensTurboModule.ts +0 -13
- package/src/gesture-handler/ScreenGestureDetector.tsx +0 -241
- package/src/gesture-handler/constraints.ts +0 -87
- package/src/gesture-handler/defaults.ts +0 -46
- package/src/gesture-handler/fabricUtils.ts +0 -86
- package/src/gesture-handler/fabricUtils.web.ts +0 -10
- package/src/gesture-handler/index.tsx +0 -4
- package/src/native-stack/contexts/GHContext.tsx +0 -9
- package/src/native-stack/index.tsx +0 -27
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +0 -110
- package/src/native-stack/types.tsx +0 -659
- package/src/native-stack/utils/AnimatedHeaderHeightContext.tsx +0 -8
- package/src/native-stack/utils/HeaderHeightContext.tsx +0 -5
- package/src/native-stack/utils/SafeAreaProviderCompat.tsx +0 -78
- package/src/native-stack/utils/getDefaultHeaderHeight.tsx +0 -41
- package/src/native-stack/utils/getStatusBarHeight.tsx +0 -22
- package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +0 -15
- package/src/native-stack/utils/useBackPressSubscription.tsx +0 -66
- package/src/native-stack/utils/useHeaderHeight.tsx +0 -15
- package/src/native-stack/views/FontProcessor.tsx +0 -14
- package/src/native-stack/views/FooterComponent.tsx +0 -10
- package/src/native-stack/views/HeaderConfig.tsx +0 -202
- package/src/native-stack/views/NativeStackView.tsx +0 -550
- package/src/reanimated/ReanimatedHeaderHeightContext.tsx +0 -7
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +0 -132
- package/src/reanimated/ReanimatedScreen.tsx +0 -26
- package/src/reanimated/ReanimatedScreenProvider.tsx +0 -43
- package/src/reanimated/ReanimatedTransitionProgressContext.tsx +0 -13
- package/src/reanimated/index.tsx +0 -3
- package/src/reanimated/useReanimatedHeaderHeight.tsx +0 -14
- package/src/reanimated/useReanimatedTransitionProgress.tsx +0 -14
- package/src/types.tsx +0 -869
- package/src/useTransitionProgress.tsx +0 -15
- package/src/utils.ts +0 -40
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
HeaderSubviewTypes,
|
|
6
|
-
ScreenStackHeaderConfigProps,
|
|
7
|
-
SearchBarProps,
|
|
8
|
-
} from '../types';
|
|
9
|
-
import {
|
|
10
|
-
Image,
|
|
11
|
-
ImageProps,
|
|
12
|
-
Platform,
|
|
13
|
-
StyleSheet,
|
|
14
|
-
View,
|
|
15
|
-
ViewProps,
|
|
16
|
-
} from 'react-native';
|
|
17
|
-
|
|
18
|
-
// Native components
|
|
19
|
-
import ScreenStackHeaderConfigNativeComponent from '../fabric/ScreenStackHeaderConfigNativeComponent';
|
|
20
|
-
import ScreenStackHeaderSubviewNativeComponent from '../fabric/ScreenStackHeaderSubviewNativeComponent';
|
|
21
|
-
|
|
22
|
-
export const ScreenStackHeaderSubview: React.ComponentType<
|
|
23
|
-
React.PropsWithChildren<ViewProps & { type?: HeaderSubviewTypes }>
|
|
24
|
-
> = ScreenStackHeaderSubviewNativeComponent as any;
|
|
25
|
-
|
|
26
|
-
export const ScreenStackHeaderConfig = React.forwardRef<
|
|
27
|
-
View,
|
|
28
|
-
ScreenStackHeaderConfigProps
|
|
29
|
-
>((props, ref) => (
|
|
30
|
-
<ScreenStackHeaderConfigNativeComponent
|
|
31
|
-
{...props}
|
|
32
|
-
ref={ref}
|
|
33
|
-
style={styles.headerConfig}
|
|
34
|
-
pointerEvents="box-none"
|
|
35
|
-
/>
|
|
36
|
-
));
|
|
37
|
-
|
|
38
|
-
ScreenStackHeaderConfig.displayName = 'ScreenStackHeaderConfig';
|
|
39
|
-
|
|
40
|
-
export const ScreenStackHeaderBackButtonImage = (
|
|
41
|
-
props: ImageProps,
|
|
42
|
-
): JSX.Element => (
|
|
43
|
-
<ScreenStackHeaderSubview type="back" style={styles.headerSubview}>
|
|
44
|
-
<Image resizeMode="center" fadeDuration={0} {...props} />
|
|
45
|
-
</ScreenStackHeaderSubview>
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
export const ScreenStackHeaderRightView = (
|
|
49
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
50
|
-
): JSX.Element => {
|
|
51
|
-
const { style, ...rest } = props;
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<ScreenStackHeaderSubview
|
|
55
|
-
{...rest}
|
|
56
|
-
type="right"
|
|
57
|
-
style={[styles.headerSubview, style]}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const ScreenStackHeaderLeftView = (
|
|
63
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
64
|
-
): JSX.Element => {
|
|
65
|
-
const { style, ...rest } = props;
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<ScreenStackHeaderSubview
|
|
69
|
-
{...rest}
|
|
70
|
-
type="left"
|
|
71
|
-
style={[styles.headerSubview, style]}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const ScreenStackHeaderCenterView = (
|
|
77
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
78
|
-
): JSX.Element => {
|
|
79
|
-
const { style, ...rest } = props;
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<ScreenStackHeaderSubview
|
|
83
|
-
{...rest}
|
|
84
|
-
type="center"
|
|
85
|
-
style={[styles.headerSubviewCenter, style]}
|
|
86
|
-
/>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const ScreenStackHeaderSearchBarView = (
|
|
91
|
-
props: React.PropsWithChildren<SearchBarProps>,
|
|
92
|
-
): JSX.Element => (
|
|
93
|
-
<ScreenStackHeaderSubview
|
|
94
|
-
{...props}
|
|
95
|
-
type="searchBar"
|
|
96
|
-
style={styles.headerSubview}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const styles = StyleSheet.create({
|
|
101
|
-
headerSubview: {
|
|
102
|
-
flexDirection: 'row',
|
|
103
|
-
alignItems: 'center',
|
|
104
|
-
justifyContent: 'center',
|
|
105
|
-
},
|
|
106
|
-
headerSubviewCenter: {
|
|
107
|
-
flexDirection: 'row',
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
justifyContent: 'center',
|
|
110
|
-
flexShrink: 1,
|
|
111
|
-
},
|
|
112
|
-
headerConfig: {
|
|
113
|
-
position: 'absolute',
|
|
114
|
-
top: '-100%',
|
|
115
|
-
width: '100%',
|
|
116
|
-
flexDirection: 'row',
|
|
117
|
-
justifyContent: 'space-between',
|
|
118
|
-
// We only want to center align the subviews on iOS.
|
|
119
|
-
// See https://github.com/software-mansion/react-native-screens/pull/2456
|
|
120
|
-
alignItems: Platform.OS === 'ios' ? 'center' : undefined,
|
|
121
|
-
},
|
|
122
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Image, ImageProps, View, ViewProps } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
HeaderSubviewTypes,
|
|
5
|
-
ScreenStackHeaderConfigProps,
|
|
6
|
-
SearchBarProps,
|
|
7
|
-
} from '../types';
|
|
8
|
-
|
|
9
|
-
export const ScreenStackHeaderBackButtonImage = (
|
|
10
|
-
props: ImageProps,
|
|
11
|
-
): JSX.Element => (
|
|
12
|
-
<View>
|
|
13
|
-
<Image resizeMode="center" fadeDuration={0} {...props} />
|
|
14
|
-
</View>
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
export const ScreenStackHeaderRightView = (
|
|
18
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
19
|
-
): JSX.Element => <View {...props} />;
|
|
20
|
-
|
|
21
|
-
export const ScreenStackHeaderLeftView = (
|
|
22
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
23
|
-
): JSX.Element => <View {...props} />;
|
|
24
|
-
|
|
25
|
-
export const ScreenStackHeaderCenterView = (
|
|
26
|
-
props: React.PropsWithChildren<ViewProps>,
|
|
27
|
-
): JSX.Element => <View {...props} />;
|
|
28
|
-
|
|
29
|
-
export const ScreenStackHeaderSearchBarView = (
|
|
30
|
-
props: React.PropsWithChildren<Omit<SearchBarProps, 'ref'>>,
|
|
31
|
-
): JSX.Element => <View {...props} />;
|
|
32
|
-
|
|
33
|
-
export const ScreenStackHeaderConfig = (
|
|
34
|
-
props: React.PropsWithChildren<ScreenStackHeaderConfigProps>,
|
|
35
|
-
): JSX.Element => <View {...props} />;
|
|
36
|
-
|
|
37
|
-
export const ScreenStackHeaderSubview: React.ComponentType<
|
|
38
|
-
React.PropsWithChildren<ViewProps & { type?: HeaderSubviewTypes }>
|
|
39
|
-
> = View;
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Platform,
|
|
4
|
-
type StyleProp,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
type ViewStyle,
|
|
7
|
-
View,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import warnOnce from 'warn-once';
|
|
10
|
-
|
|
11
|
-
import DebugContainer from './DebugContainer';
|
|
12
|
-
import { ScreenProps, ScreenStackHeaderConfigProps } from '../types';
|
|
13
|
-
import { ScreenStackHeaderConfig } from './ScreenStackHeaderConfig';
|
|
14
|
-
import Screen from './Screen';
|
|
15
|
-
import ScreenStack from './ScreenStack';
|
|
16
|
-
import { RNSScreensRefContext } from '../contexts';
|
|
17
|
-
import { FooterComponent } from './ScreenFooter';
|
|
18
|
-
|
|
19
|
-
type Props = Omit<
|
|
20
|
-
ScreenProps,
|
|
21
|
-
'enabled' | 'isNativeStack' | 'hasLargeHeader'
|
|
22
|
-
> & {
|
|
23
|
-
screenId: string;
|
|
24
|
-
headerConfig?: ScreenStackHeaderConfigProps;
|
|
25
|
-
contentStyle?: StyleProp<ViewStyle>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
function ScreenStackItem(
|
|
29
|
-
{
|
|
30
|
-
children,
|
|
31
|
-
headerConfig,
|
|
32
|
-
activityState,
|
|
33
|
-
shouldFreeze,
|
|
34
|
-
stackPresentation,
|
|
35
|
-
contentStyle,
|
|
36
|
-
style,
|
|
37
|
-
screenId,
|
|
38
|
-
// eslint-disable-next-line camelcase
|
|
39
|
-
unstable_sheetFooter,
|
|
40
|
-
...rest
|
|
41
|
-
}: Props,
|
|
42
|
-
ref: React.ForwardedRef<View>,
|
|
43
|
-
) {
|
|
44
|
-
const currentScreenRef = React.useRef<View | null>(null);
|
|
45
|
-
const screenRefs = React.useContext(RNSScreensRefContext);
|
|
46
|
-
|
|
47
|
-
React.useImperativeHandle(ref, () => currentScreenRef.current!);
|
|
48
|
-
|
|
49
|
-
const isHeaderInModal =
|
|
50
|
-
// amznmod_react - return false for Modal on kepler because native component is not implemented yet
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
Platform.OS === 'android' || Platform.OS === 'kepler'
|
|
53
|
-
? false
|
|
54
|
-
: stackPresentation !== 'push' && headerConfig?.hidden === false;
|
|
55
|
-
|
|
56
|
-
const headerHiddenPreviousRef = React.useRef(headerConfig?.hidden);
|
|
57
|
-
|
|
58
|
-
React.useEffect(() => {
|
|
59
|
-
warnOnce(
|
|
60
|
-
Platform.OS !== 'android' &&
|
|
61
|
-
stackPresentation !== 'push' &&
|
|
62
|
-
headerHiddenPreviousRef.current !== headerConfig?.hidden,
|
|
63
|
-
`Dynamically changing header's visibility in modals will result in remounting the screen and losing all local state.`,
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
headerHiddenPreviousRef.current = headerConfig?.hidden;
|
|
67
|
-
}, [headerConfig?.hidden, stackPresentation]);
|
|
68
|
-
|
|
69
|
-
const content = (
|
|
70
|
-
<>
|
|
71
|
-
<DebugContainer
|
|
72
|
-
style={[
|
|
73
|
-
stackPresentation === 'formSheet'
|
|
74
|
-
? Platform.OS === 'ios'
|
|
75
|
-
? styles.absolute
|
|
76
|
-
: null
|
|
77
|
-
: styles.container,
|
|
78
|
-
contentStyle,
|
|
79
|
-
]}
|
|
80
|
-
stackPresentation={stackPresentation ?? 'push'}>
|
|
81
|
-
{children}
|
|
82
|
-
</DebugContainer>
|
|
83
|
-
{/**
|
|
84
|
-
* `HeaderConfig` needs to be the direct child of `Screen` without any intermediate `View`
|
|
85
|
-
* We don't render it conditionally based on visibility to make it possible to dynamically render a custom `header`
|
|
86
|
-
* Otherwise dynamically rendering a custom `header` leaves the native header visible
|
|
87
|
-
*
|
|
88
|
-
* https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md#screenstackheaderconfig
|
|
89
|
-
*
|
|
90
|
-
* HeaderConfig must not be first child of a Screen.
|
|
91
|
-
* See https://github.com/software-mansion/react-native-screens/pull/1825
|
|
92
|
-
* for detailed explanation.
|
|
93
|
-
*/}
|
|
94
|
-
<ScreenStackHeaderConfig {...headerConfig} />
|
|
95
|
-
{/* eslint-disable-next-line camelcase */}
|
|
96
|
-
{stackPresentation === 'formSheet' && unstable_sheetFooter && (
|
|
97
|
-
<FooterComponent>{unstable_sheetFooter()}</FooterComponent>
|
|
98
|
-
)}
|
|
99
|
-
</>
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
// We take backgroundColor from contentStyle and apply it on Screen.
|
|
103
|
-
// This allows to workaround one issue with truncated
|
|
104
|
-
// content with formSheet presentation.
|
|
105
|
-
let internalScreenStyle;
|
|
106
|
-
|
|
107
|
-
if (stackPresentation === 'formSheet' && contentStyle) {
|
|
108
|
-
const flattenContentStyles = StyleSheet.flatten(contentStyle);
|
|
109
|
-
internalScreenStyle = {
|
|
110
|
-
backgroundColor: flattenContentStyles?.backgroundColor,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return (
|
|
115
|
-
<Screen
|
|
116
|
-
ref={node => {
|
|
117
|
-
currentScreenRef.current = node;
|
|
118
|
-
|
|
119
|
-
if (screenRefs === null) {
|
|
120
|
-
console.warn(
|
|
121
|
-
'Looks like RNSScreensRefContext is missing. Make sure the ScreenStack component is wrapped in it',
|
|
122
|
-
);
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const currentRefs = screenRefs.current;
|
|
127
|
-
|
|
128
|
-
if (node === null) {
|
|
129
|
-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
130
|
-
delete currentRefs[screenId];
|
|
131
|
-
} else {
|
|
132
|
-
currentRefs[screenId] = { current: node };
|
|
133
|
-
}
|
|
134
|
-
}}
|
|
135
|
-
enabled
|
|
136
|
-
isNativeStack
|
|
137
|
-
activityState={activityState}
|
|
138
|
-
shouldFreeze={shouldFreeze}
|
|
139
|
-
stackPresentation={stackPresentation}
|
|
140
|
-
hasLargeHeader={headerConfig?.largeTitle ?? false}
|
|
141
|
-
style={[style, internalScreenStyle]}
|
|
142
|
-
{...rest}>
|
|
143
|
-
{isHeaderInModal ? (
|
|
144
|
-
<ScreenStack style={styles.container}>
|
|
145
|
-
<Screen
|
|
146
|
-
enabled
|
|
147
|
-
isNativeStack
|
|
148
|
-
activityState={activityState}
|
|
149
|
-
shouldFreeze={shouldFreeze}
|
|
150
|
-
hasLargeHeader={headerConfig?.largeTitle ?? false}
|
|
151
|
-
style={StyleSheet.absoluteFill}>
|
|
152
|
-
{content}
|
|
153
|
-
</Screen>
|
|
154
|
-
</ScreenStack>
|
|
155
|
-
) : (
|
|
156
|
-
content
|
|
157
|
-
)}
|
|
158
|
-
</Screen>
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export default React.forwardRef(ScreenStackItem);
|
|
163
|
-
|
|
164
|
-
const styles = StyleSheet.create({
|
|
165
|
-
container: {
|
|
166
|
-
flex: 1,
|
|
167
|
-
},
|
|
168
|
-
absolute: {
|
|
169
|
-
position: 'absolute',
|
|
170
|
-
top: 0,
|
|
171
|
-
start: 0,
|
|
172
|
-
end: 0,
|
|
173
|
-
},
|
|
174
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { SearchBarCommands, SearchBarProps } from '../types';
|
|
5
|
-
import { isSearchBarAvailableForCurrentPlatform } from '../utils';
|
|
6
|
-
import { View } from 'react-native';
|
|
7
|
-
|
|
8
|
-
// Native components
|
|
9
|
-
import SearchBarNativeComponent, {
|
|
10
|
-
Commands as SearchBarNativeCommands,
|
|
11
|
-
NativeProps as SearchBarNativeProps,
|
|
12
|
-
SearchBarEvent,
|
|
13
|
-
SearchButtonPressedEvent,
|
|
14
|
-
ChangeTextEvent,
|
|
15
|
-
} from '../fabric/SearchBarNativeComponent';
|
|
16
|
-
import { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
17
|
-
|
|
18
|
-
const NativeSearchBar: React.ComponentType<
|
|
19
|
-
SearchBarNativeProps & { ref?: React.RefObject<SearchBarCommands> }
|
|
20
|
-
> &
|
|
21
|
-
typeof NativeSearchBarCommands =
|
|
22
|
-
SearchBarNativeComponent as unknown as React.ComponentType<SearchBarNativeProps> &
|
|
23
|
-
SearchBarCommandsType;
|
|
24
|
-
const NativeSearchBarCommands: SearchBarCommandsType =
|
|
25
|
-
SearchBarNativeCommands as SearchBarCommandsType;
|
|
26
|
-
|
|
27
|
-
type NativeSearchBarRef = React.ElementRef<typeof NativeSearchBar>;
|
|
28
|
-
|
|
29
|
-
type SearchBarCommandsType = {
|
|
30
|
-
blur: (viewRef: NativeSearchBarRef) => void;
|
|
31
|
-
focus: (viewRef: NativeSearchBarRef) => void;
|
|
32
|
-
clearText: (viewRef: NativeSearchBarRef) => void;
|
|
33
|
-
toggleCancelButton: (viewRef: NativeSearchBarRef, flag: boolean) => void;
|
|
34
|
-
setText: (viewRef: NativeSearchBarRef, text: string) => void;
|
|
35
|
-
cancelSearch: (viewRef: NativeSearchBarRef) => void;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
function SearchBar(props: SearchBarProps, ref: React.Ref<SearchBarCommands>) {
|
|
39
|
-
const searchBarRef = React.useRef<SearchBarCommands | null>(null);
|
|
40
|
-
|
|
41
|
-
React.useImperativeHandle(ref, () => ({
|
|
42
|
-
blur: () => {
|
|
43
|
-
_callMethodWithRef(ref => NativeSearchBarCommands.blur(ref));
|
|
44
|
-
},
|
|
45
|
-
focus: () => {
|
|
46
|
-
_callMethodWithRef(ref => NativeSearchBarCommands.focus(ref));
|
|
47
|
-
},
|
|
48
|
-
toggleCancelButton: (flag: boolean) => {
|
|
49
|
-
_callMethodWithRef(ref =>
|
|
50
|
-
NativeSearchBarCommands.toggleCancelButton(ref, flag),
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
clearText: () => {
|
|
54
|
-
_callMethodWithRef(ref => NativeSearchBarCommands.clearText(ref));
|
|
55
|
-
},
|
|
56
|
-
setText: (text: string) => {
|
|
57
|
-
_callMethodWithRef(ref => NativeSearchBarCommands.setText(ref, text));
|
|
58
|
-
},
|
|
59
|
-
cancelSearch: () => {
|
|
60
|
-
_callMethodWithRef(ref => NativeSearchBarCommands.cancelSearch(ref));
|
|
61
|
-
},
|
|
62
|
-
}));
|
|
63
|
-
|
|
64
|
-
const _callMethodWithRef = React.useCallback(
|
|
65
|
-
(method: (ref: SearchBarCommands) => void) => {
|
|
66
|
-
const ref = searchBarRef.current;
|
|
67
|
-
if (ref) {
|
|
68
|
-
method(ref);
|
|
69
|
-
} else {
|
|
70
|
-
console.warn(
|
|
71
|
-
'Reference to native search bar component has not been updated yet',
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
[searchBarRef],
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
if (!isSearchBarAvailableForCurrentPlatform) {
|
|
79
|
-
console.warn(
|
|
80
|
-
'Importing SearchBar is only valid on iOS and Android devices.',
|
|
81
|
-
);
|
|
82
|
-
return View as unknown as React.ReactNode;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<NativeSearchBar
|
|
87
|
-
ref={searchBarRef}
|
|
88
|
-
{...props}
|
|
89
|
-
onSearchFocus={props.onFocus as DirectEventHandler<SearchBarEvent>}
|
|
90
|
-
onSearchBlur={props.onBlur as DirectEventHandler<SearchBarEvent>}
|
|
91
|
-
onSearchButtonPress={
|
|
92
|
-
props.onSearchButtonPress as DirectEventHandler<SearchButtonPressedEvent>
|
|
93
|
-
}
|
|
94
|
-
onCancelButtonPress={
|
|
95
|
-
props.onCancelButtonPress as DirectEventHandler<SearchBarEvent>
|
|
96
|
-
}
|
|
97
|
-
onChangeText={props.onChangeText as DirectEventHandler<ChangeTextEvent>}
|
|
98
|
-
/>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export default React.forwardRef<SearchBarCommands, SearchBarProps>(SearchBar);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Freeze } from 'react-freeze';
|
|
3
|
-
|
|
4
|
-
interface FreezeWrapperProps {
|
|
5
|
-
freeze: boolean;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// This component allows one more render before freezing the screen.
|
|
10
|
-
// Allows activityState to reach the native side and useIsFocused to work correctly.
|
|
11
|
-
function DelayedFreeze({ freeze, children }: FreezeWrapperProps) {
|
|
12
|
-
// flag used for determining whether freeze should be enabled
|
|
13
|
-
const [freezeState, setFreezeState] = React.useState(false);
|
|
14
|
-
|
|
15
|
-
React.useEffect(() => {
|
|
16
|
-
const id = setImmediate(() => {
|
|
17
|
-
setFreezeState(freeze);
|
|
18
|
-
});
|
|
19
|
-
return () => {
|
|
20
|
-
clearImmediate(id);
|
|
21
|
-
};
|
|
22
|
-
}, [freeze]);
|
|
23
|
-
|
|
24
|
-
return <Freeze freeze={freeze ? freezeState : false}>{children}</Freeze>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default DelayedFreeze;
|
package/src/contexts.tsx
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { GestureProviderProps, ScreensRefsHolder } from './types';
|
|
3
|
-
|
|
4
|
-
export const GHContext = React.createContext(
|
|
5
|
-
(props: PropsWithChildren<GestureProviderProps>) => <>{props.children}</>,
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
export const RNSScreensRefContext =
|
|
9
|
-
React.createContext<React.MutableRefObject<ScreensRefsHolder> | null>(null);
|
package/src/core.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Platform, UIManager } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export const isNativePlatformSupported =
|
|
6
|
-
Platform.OS === 'ios' ||
|
|
7
|
-
Platform.OS === 'android' ||
|
|
8
|
-
Platform.OS === 'windows'||
|
|
9
|
-
// amznmod_react - add Kepler support
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
Platform.OS === 'kepler';
|
|
12
|
-
|
|
13
|
-
let ENABLE_SCREENS = isNativePlatformSupported;
|
|
14
|
-
|
|
15
|
-
export function enableScreens(shouldEnableScreens = true) {
|
|
16
|
-
ENABLE_SCREENS = shouldEnableScreens;
|
|
17
|
-
|
|
18
|
-
if (!isNativePlatformSupported) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (ENABLE_SCREENS && !UIManager.getViewManagerConfig('RNSScreen')) {
|
|
23
|
-
console.error(
|
|
24
|
-
`Screen native module hasn't been linked. Please check the react-native-screens README for more details`,
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let ENABLE_FREEZE = false;
|
|
30
|
-
|
|
31
|
-
export function enableFreeze(shouldEnableReactFreeze = true) {
|
|
32
|
-
if (!isNativePlatformSupported) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ENABLE_FREEZE = shouldEnableReactFreeze;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function screensEnabled() {
|
|
40
|
-
return ENABLE_SCREENS;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function freezeEnabled() {
|
|
44
|
-
return ENABLE_FREEZE;
|
|
45
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
/*
|
|
3
|
-
* Portions of this file are copyright (c) 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
|
|
6
|
-
*
|
|
7
|
-
* Amazon modifications are indicated by [amznmod_* comments].
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Changelog:
|
|
12
|
-
* Set up react-native-screens package to build for Kepler
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// amznmod_react - register component on Kepler
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
19
|
-
import type { ViewProps } from 'react-native';
|
|
20
|
-
|
|
21
|
-
interface NativeProps extends ViewProps {}
|
|
22
|
-
|
|
23
|
-
export default codegenNativeComponent<NativeProps>('RNSFullWindowOverlay', {});
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
-
import type { ViewProps, ColorValue } from 'react-native';
|
|
5
|
-
import type {
|
|
6
|
-
DirectEventHandler,
|
|
7
|
-
WithDefault,
|
|
8
|
-
Int32,
|
|
9
|
-
Float,
|
|
10
|
-
Double,
|
|
11
|
-
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
-
type ScreenEvent = Readonly<{}>;
|
|
15
|
-
|
|
16
|
-
type ScreenDismissedEvent = Readonly<{
|
|
17
|
-
dismissCount: Int32;
|
|
18
|
-
}>;
|
|
19
|
-
|
|
20
|
-
type TransitionProgressEvent = Readonly<{
|
|
21
|
-
progress: Double;
|
|
22
|
-
closing: Int32;
|
|
23
|
-
goingForward: Int32;
|
|
24
|
-
}>;
|
|
25
|
-
|
|
26
|
-
type HeaderHeightChangeEvent = Readonly<{
|
|
27
|
-
headerHeight: Double;
|
|
28
|
-
}>;
|
|
29
|
-
|
|
30
|
-
type SheetDetentChangedEvent = Readonly<{
|
|
31
|
-
index: Int32;
|
|
32
|
-
isStable: boolean;
|
|
33
|
-
}>;
|
|
34
|
-
|
|
35
|
-
type GestureResponseDistanceType = Readonly<{
|
|
36
|
-
start: Float;
|
|
37
|
-
end: Float;
|
|
38
|
-
top: Float;
|
|
39
|
-
bottom: Float;
|
|
40
|
-
}>;
|
|
41
|
-
|
|
42
|
-
type StackPresentation =
|
|
43
|
-
| 'push'
|
|
44
|
-
| 'modal'
|
|
45
|
-
| 'transparentModal'
|
|
46
|
-
| 'fullScreenModal'
|
|
47
|
-
| 'formSheet'
|
|
48
|
-
| 'containedModal'
|
|
49
|
-
| 'containedTransparentModal';
|
|
50
|
-
|
|
51
|
-
type StackAnimation =
|
|
52
|
-
| 'default'
|
|
53
|
-
| 'flip'
|
|
54
|
-
| 'simple_push'
|
|
55
|
-
| 'none'
|
|
56
|
-
| 'fade'
|
|
57
|
-
| 'slide_from_right'
|
|
58
|
-
| 'slide_from_left'
|
|
59
|
-
| 'slide_from_bottom'
|
|
60
|
-
| 'fade_from_bottom'
|
|
61
|
-
| 'ios_from_right'
|
|
62
|
-
| 'ios_from_left';
|
|
63
|
-
|
|
64
|
-
type SwipeDirection = 'vertical' | 'horizontal';
|
|
65
|
-
|
|
66
|
-
type ReplaceAnimation = 'pop' | 'push';
|
|
67
|
-
|
|
68
|
-
export interface NativeProps extends ViewProps {
|
|
69
|
-
onAppear?: DirectEventHandler<ScreenEvent>;
|
|
70
|
-
onDisappear?: DirectEventHandler<ScreenEvent>;
|
|
71
|
-
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
|
|
72
|
-
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
|
|
73
|
-
onWillAppear?: DirectEventHandler<ScreenEvent>;
|
|
74
|
-
onWillDisappear?: DirectEventHandler<ScreenEvent>;
|
|
75
|
-
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
|
|
76
|
-
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
|
|
77
|
-
onGestureCancel?: DirectEventHandler<ScreenEvent>;
|
|
78
|
-
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
|
|
79
|
-
onSheetDetentChanged?: DirectEventHandler<SheetDetentChangedEvent>;
|
|
80
|
-
sheetAllowedDetents?: number[];
|
|
81
|
-
sheetLargestUndimmedDetent?: WithDefault<Int32, -1>;
|
|
82
|
-
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
83
|
-
sheetCornerRadius?: WithDefault<Float, -1.0>;
|
|
84
|
-
sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;
|
|
85
|
-
sheetInitialDetent?: WithDefault<Int32, 0>;
|
|
86
|
-
sheetElevation?: WithDefault<Int32, 24>;
|
|
87
|
-
customAnimationOnSwipe?: boolean;
|
|
88
|
-
fullScreenSwipeEnabled?: boolean;
|
|
89
|
-
fullScreenSwipeShadowEnabled?: WithDefault<boolean, true>;
|
|
90
|
-
homeIndicatorHidden?: boolean;
|
|
91
|
-
preventNativeDismiss?: boolean;
|
|
92
|
-
gestureEnabled?: WithDefault<boolean, true>;
|
|
93
|
-
statusBarColor?: ColorValue;
|
|
94
|
-
statusBarHidden?: boolean;
|
|
95
|
-
screenOrientation?: string;
|
|
96
|
-
statusBarAnimation?: string;
|
|
97
|
-
statusBarStyle?: string;
|
|
98
|
-
statusBarTranslucent?: boolean;
|
|
99
|
-
gestureResponseDistance?: GestureResponseDistanceType;
|
|
100
|
-
stackPresentation?: WithDefault<StackPresentation, 'push'>;
|
|
101
|
-
stackAnimation?: WithDefault<StackAnimation, 'default'>;
|
|
102
|
-
transitionDuration?: WithDefault<Int32, 500>;
|
|
103
|
-
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
|
|
104
|
-
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
|
|
105
|
-
hideKeyboardOnSwipe?: boolean;
|
|
106
|
-
activityState?: WithDefault<Float, -1.0>;
|
|
107
|
-
navigationBarColor?: ColorValue;
|
|
108
|
-
navigationBarTranslucent?: boolean;
|
|
109
|
-
navigationBarHidden?: boolean;
|
|
110
|
-
nativeBackButtonDismissalEnabled?: boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export default codegenNativeComponent<NativeProps>('RNSModalScreen', {
|
|
114
|
-
interfaceOnly: true,
|
|
115
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default {};
|