@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,93 +0,0 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
/*
|
|
3
|
-
* Portions of this file are copyright (c) 2023 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
|
-
import React from 'react';
|
|
16
|
-
import { Platform } from 'react-native';
|
|
17
|
-
import { InnerScreen } from '../components/Screen';
|
|
18
|
-
// @ts-ignore file to be used only if `react-native-reanimated` available in the project
|
|
19
|
-
import Animated, { useEvent, useSharedValue } from 'react-native-reanimated';
|
|
20
|
-
import ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';
|
|
21
|
-
import { useSafeAreaFrame, useSafeAreaInsets
|
|
22
|
-
// amznmod_react - change imports to kepler packages
|
|
23
|
-
} from '@amazon-devices/react-native-safe-area-context';
|
|
24
|
-
import getDefaultHeaderHeight from '../native-stack/utils/getDefaultHeaderHeight';
|
|
25
|
-
import getStatusBarHeight from '../native-stack/utils/getStatusBarHeight';
|
|
26
|
-
import ReanimatedHeaderHeightContext from './ReanimatedHeaderHeightContext';
|
|
27
|
-
const AnimatedScreen = Animated.createAnimatedComponent(InnerScreen);
|
|
28
|
-
|
|
29
|
-
// We use prop added to global by reanimated since it seems safer than the one from RN. See:
|
|
30
|
-
// https://github.com/software-mansion/react-native-reanimated/blob/3fe8b35b05e82b2f2aefda1fb97799cf81e4b7bb/src/reanimated2/UpdateProps.ts#L46
|
|
31
|
-
// @ts-expect-error nativeFabricUIManager is not yet included in the RN types
|
|
32
|
-
const ENABLE_FABRIC = !!global?._IS_FABRIC;
|
|
33
|
-
const ReanimatedNativeStackScreen = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
34
|
-
const {
|
|
35
|
-
children,
|
|
36
|
-
...rest
|
|
37
|
-
} = props;
|
|
38
|
-
const {
|
|
39
|
-
stackPresentation = 'push',
|
|
40
|
-
hasLargeHeader
|
|
41
|
-
} = rest;
|
|
42
|
-
const dimensions = useSafeAreaFrame();
|
|
43
|
-
const topInset = useSafeAreaInsets().top;
|
|
44
|
-
const isStatusBarTranslucent = rest.statusBarTranslucent ?? false;
|
|
45
|
-
const statusBarHeight = getStatusBarHeight(topInset, dimensions, isStatusBarTranslucent);
|
|
46
|
-
|
|
47
|
-
// Default header height, normally used in `useHeaderHeight` hook.
|
|
48
|
-
// Here, it is used for returning a default value for shared value.
|
|
49
|
-
const defaultHeaderHeight = getDefaultHeaderHeight(dimensions, statusBarHeight, stackPresentation, hasLargeHeader);
|
|
50
|
-
const cachedHeaderHeight = React.useRef(defaultHeaderHeight);
|
|
51
|
-
const headerHeight = useSharedValue(defaultHeaderHeight);
|
|
52
|
-
const progress = useSharedValue(0);
|
|
53
|
-
const closing = useSharedValue(0);
|
|
54
|
-
const goingForward = useSharedValue(0);
|
|
55
|
-
return /*#__PURE__*/React.createElement(AnimatedScreen
|
|
56
|
-
// @ts-ignore some problems with ref and onTransitionProgressReanimated being "fake" prop for parsing of `useEvent` return value
|
|
57
|
-
, _extends({
|
|
58
|
-
ref: ref,
|
|
59
|
-
onTransitionProgressReanimated: useEvent(event => {
|
|
60
|
-
'worklet';
|
|
61
|
-
|
|
62
|
-
progress.value = event.progress;
|
|
63
|
-
closing.value = event.closing;
|
|
64
|
-
goingForward.value = event.goingForward;
|
|
65
|
-
}, [
|
|
66
|
-
// This should not be necessary, but is not properly managed by `react-native-reanimated`
|
|
67
|
-
// @ts-ignore wrong type
|
|
68
|
-
Platform.OS === 'android' ? 'onTransitionProgress' :
|
|
69
|
-
// for some reason there is a difference in required event name between architectures
|
|
70
|
-
ENABLE_FABRIC ? 'onTransitionProgress' : 'topTransitionProgress']),
|
|
71
|
-
onHeaderHeightChangeReanimated: useEvent(event => {
|
|
72
|
-
'worklet';
|
|
73
|
-
|
|
74
|
-
if (event.headerHeight !== cachedHeaderHeight.current) {
|
|
75
|
-
headerHeight.value = event.headerHeight;
|
|
76
|
-
cachedHeaderHeight.current = event.headerHeight;
|
|
77
|
-
}
|
|
78
|
-
}, [
|
|
79
|
-
// @ts-ignore wrong type
|
|
80
|
-
Platform.OS === 'android' ? 'onHeaderHeightChange' : ENABLE_FABRIC ? 'onHeaderHeightChange' : 'topHeaderHeightChange'])
|
|
81
|
-
}, rest), /*#__PURE__*/React.createElement(ReanimatedHeaderHeightContext.Provider, {
|
|
82
|
-
value: headerHeight
|
|
83
|
-
}, /*#__PURE__*/React.createElement(ReanimatedTransitionProgressContext.Provider, {
|
|
84
|
-
value: {
|
|
85
|
-
progress,
|
|
86
|
-
closing,
|
|
87
|
-
goingForward
|
|
88
|
-
}
|
|
89
|
-
}, children)));
|
|
90
|
-
});
|
|
91
|
-
ReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';
|
|
92
|
-
export default ReanimatedNativeStackScreen;
|
|
93
|
-
//# sourceMappingURL=ReanimatedNativeStackScreen.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { InnerScreen } from '../components/Screen';
|
|
4
|
-
// @ts-ignore file to be used only if `react-native-reanimated` available in the project
|
|
5
|
-
import Animated from 'react-native-reanimated';
|
|
6
|
-
const AnimatedScreen = Animated.createAnimatedComponent(InnerScreen);
|
|
7
|
-
const ReanimatedScreen = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
-
return /*#__PURE__*/React.createElement(AnimatedScreen
|
|
9
|
-
// @ts-ignore some problems with ref and onTransitionProgressReanimated being "fake" prop for parsing of `useEvent` return value
|
|
10
|
-
, _extends({
|
|
11
|
-
ref: ref
|
|
12
|
-
}, props));
|
|
13
|
-
});
|
|
14
|
-
ReanimatedScreen.displayName = 'ReanimatedScreen';
|
|
15
|
-
export default ReanimatedScreen;
|
|
16
|
-
//# sourceMappingURL=ReanimatedScreen.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ScreenContext } from '../components/Screen';
|
|
4
|
-
import ReanimatedNativeStackScreen from './ReanimatedNativeStackScreen';
|
|
5
|
-
import AnimatedScreen from './ReanimatedScreen';
|
|
6
|
-
class ReanimatedScreenWrapper extends React.Component {
|
|
7
|
-
ref = null;
|
|
8
|
-
setNativeProps(props) {
|
|
9
|
-
this.ref?.setNativeProps(props);
|
|
10
|
-
}
|
|
11
|
-
setRef = ref => {
|
|
12
|
-
this.ref = ref;
|
|
13
|
-
this.props.onComponentRef?.(ref);
|
|
14
|
-
};
|
|
15
|
-
render() {
|
|
16
|
-
const ReanimatedScreen = this.props.isNativeStack ? ReanimatedNativeStackScreen : AnimatedScreen;
|
|
17
|
-
return /*#__PURE__*/React.createElement(ReanimatedScreen, _extends({}, this.props, {
|
|
18
|
-
// @ts-ignore some problems with ref
|
|
19
|
-
ref: this.setRef
|
|
20
|
-
}));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default function ReanimatedScreenProvider(props) {
|
|
24
|
-
return (
|
|
25
|
-
/*#__PURE__*/
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
React.createElement(ScreenContext.Provider, {
|
|
28
|
-
value: ReanimatedScreenWrapper
|
|
29
|
-
}, props.children)
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=ReanimatedScreenProvider.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as ReanimatedScreenProvider } from './ReanimatedScreenProvider';
|
|
2
|
-
export { default as useReanimatedTransitionProgress } from './useReanimatedTransitionProgress';
|
|
3
|
-
export { default as useReanimatedHeaderHeight } from './useReanimatedHeaderHeight';
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import ReanimatedHeaderHeightContext from './ReanimatedHeaderHeightContext';
|
|
3
|
-
export default function useReanimatedHeaderHeight() {
|
|
4
|
-
const height = React.useContext(ReanimatedHeaderHeightContext);
|
|
5
|
-
if (height === undefined) {
|
|
6
|
-
throw new Error("Couldn't find the header height using Reanimated. Are you inside a screen in a navigator with a header and your NavigationContainer is wrapped in ReanimatedScreenProvider?");
|
|
7
|
-
}
|
|
8
|
-
return height;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=useReanimatedHeaderHeight.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';
|
|
3
|
-
export default function useReanimatedTransitionProgress() {
|
|
4
|
-
const progress = React.useContext(ReanimatedTransitionProgressContext);
|
|
5
|
-
if (progress === undefined) {
|
|
6
|
-
throw new Error("Couldn't find values for reanimated transition progress. Are you inside a screen in Native Stack?");
|
|
7
|
-
}
|
|
8
|
-
return progress;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=useReanimatedTransitionProgress.js.map
|
package/lib/module/types.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import TransitionProgressContext from './TransitionProgressContext';
|
|
3
|
-
export default function useTransitionProgress() {
|
|
4
|
-
const progress = React.useContext(TransitionProgressContext);
|
|
5
|
-
if (progress === undefined) {
|
|
6
|
-
throw new Error("Couldn't find values for transition progress. Are you inside a screen in Native Stack?");
|
|
7
|
-
}
|
|
8
|
-
return progress;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=useTransitionProgress.js.map
|
package/lib/module/utils.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { BackHandler, Platform } from 'react-native';
|
|
2
|
-
export const isSearchBarAvailableForCurrentPlatform = ['ios', 'android'].includes(Platform.OS);
|
|
3
|
-
export function executeNativeBackPress() {
|
|
4
|
-
// This function invokes the native back press event
|
|
5
|
-
BackHandler.exitApp();
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Exposes information useful for downstream navigation library implementers,
|
|
11
|
-
* so they can keep reasonable backward compatibility, if desired.
|
|
12
|
-
*
|
|
13
|
-
* We don't mean for this object to only grow in number of fields, however at the same time
|
|
14
|
-
* we won't be very hasty to reduce it. Expect gradual changes.
|
|
15
|
-
*/
|
|
16
|
-
export const compatibilityFlags = {
|
|
17
|
-
/**
|
|
18
|
-
* Because of a bug introduced in https://github.com/software-mansion/react-native-screens/pull/1646
|
|
19
|
-
* react-native-screens v3.21 changed how header's backTitle handles whitespace strings in https://github.com/software-mansion/react-native-screens/pull/1726
|
|
20
|
-
* To allow for backwards compatibility in @react-navigation/native-stack we need a way to check if this version or newer is used.
|
|
21
|
-
* See https://github.com/react-navigation/react-navigation/pull/11423 for more context.
|
|
22
|
-
*/
|
|
23
|
-
isNewBackTitleImplementation: true,
|
|
24
|
-
/**
|
|
25
|
-
* With version 4.0.0 the header implementation has been changed. To allow for backward compat
|
|
26
|
-
* with native-stack@v6 we want to expose a way to check whether the new implementation
|
|
27
|
-
* is in use or not.
|
|
28
|
-
*
|
|
29
|
-
* See:
|
|
30
|
-
* * https://github.com/software-mansion/react-native-screens/pull/2325
|
|
31
|
-
* * https://github.com/react-navigation/react-navigation/pull/12125
|
|
32
|
-
*/
|
|
33
|
-
usesHeaderFlexboxImplementation: true
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Animated } from 'react-native';
|
|
5
|
-
|
|
6
|
-
type TransitionProgressContextBody = {
|
|
7
|
-
progress: Animated.Value;
|
|
8
|
-
closing: Animated.Value;
|
|
9
|
-
goingForward: Animated.Value;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default React.createContext<TransitionProgressContextBody | undefined>(
|
|
13
|
-
undefined,
|
|
14
|
-
);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Platform, type ViewProps } from 'react-native';
|
|
3
|
-
// @ts-expect-error importing private component
|
|
4
|
-
|
|
5
|
-
import AppContainer from 'react-native/Libraries/ReactNative/AppContainer';
|
|
6
|
-
import ScreenContentWrapper from './ScreenContentWrapper';
|
|
7
|
-
import { StackPresentationTypes } from '../types';
|
|
8
|
-
|
|
9
|
-
type ContainerProps = ViewProps & {
|
|
10
|
-
stackPresentation: StackPresentationTypes;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This view must *not* be flattened.
|
|
16
|
-
* See https://github.com/software-mansion/react-native-screens/pull/1825
|
|
17
|
-
* for detailed explanation.
|
|
18
|
-
*/
|
|
19
|
-
let DebugContainer: React.ComponentType<ContainerProps> = props => {
|
|
20
|
-
return <ScreenContentWrapper {...props} />;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
-
DebugContainer = (props: ContainerProps) => {
|
|
25
|
-
const { stackPresentation, ...rest } = props;
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
Platform.OS === 'ios' &&
|
|
29
|
-
stackPresentation !== 'push' &&
|
|
30
|
-
stackPresentation !== 'formSheet'
|
|
31
|
-
) {
|
|
32
|
-
// This is necessary for LogBox
|
|
33
|
-
return (
|
|
34
|
-
<AppContainer>
|
|
35
|
-
<ScreenContentWrapper {...rest} />
|
|
36
|
-
</AppContainer>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return <ScreenContentWrapper {...rest} />;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
DebugContainer.displayName = 'DebugContainer';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default DebugContainer;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Platform,
|
|
4
|
-
StyleProp,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
View,
|
|
7
|
-
ViewStyle,
|
|
8
|
-
useWindowDimensions,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
|
|
11
|
-
// Native components
|
|
12
|
-
import FullWindowOverlayNativeComponent from '../fabric/FullWindowOverlayNativeComponent';
|
|
13
|
-
const NativeFullWindowOverlay: React.ComponentType<
|
|
14
|
-
PropsWithChildren<{
|
|
15
|
-
style: StyleProp<ViewStyle>;
|
|
16
|
-
}>
|
|
17
|
-
> = FullWindowOverlayNativeComponent as any;
|
|
18
|
-
|
|
19
|
-
function FullWindowOverlay(props: { children: ReactNode }) {
|
|
20
|
-
const { width, height } = useWindowDimensions();
|
|
21
|
-
if (Platform.OS !== 'ios') {
|
|
22
|
-
console.warn('Using FullWindowOverlay is only valid on iOS devices.');
|
|
23
|
-
return <View {...props} />;
|
|
24
|
-
}
|
|
25
|
-
return (
|
|
26
|
-
<NativeFullWindowOverlay
|
|
27
|
-
style={[StyleSheet.absoluteFill, { width, height }]}>
|
|
28
|
-
{props.children}
|
|
29
|
-
</NativeFullWindowOverlay>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default FullWindowOverlay;
|