@amazon-devices/react-navigation__stack 7.0.9000000000 → 8.0.9000000000-rn-83
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/SystemBundles/03e0ad8b8bcf16e659904adab730cbe9c1832c4a36017809f129fea7fb07b4fc.bundle +13453 -0
- package/SystemBundles/03e0ad8b8bcf16e659904adab730cbe9c1832c4a36017809f129fea7fb07b4fc.map +4627 -0
- package/SystemModules/amzn__react-navigation__stack-8.modules.txt +32 -0
- package/SystemModules/amzn__react-navigation__stack-8.private.modules.txt +91 -0
- package/SystemModules/keplerscript-system-bundle-config.json +4 -4
- package/kepler-compatibility.json +2 -2
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js +57 -1
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js +30 -16
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionPresets.js +32 -4
- package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionSpecs.js +32 -2
- package/lib/module/TransitionConfigs/TransitionSpecs.js.map +1 -1
- package/lib/module/index.js +13 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createStackNavigator.js +46 -48
- package/lib/module/navigators/createStackNavigator.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/CardAnimationContext.js +3 -1
- package/lib/module/utils/CardAnimationContext.js.map +1 -1
- package/lib/module/utils/GestureHandlerRefContext.js +3 -1
- package/lib/module/utils/GestureHandlerRefContext.js.map +1 -1
- package/lib/module/utils/ModalPresentationContext.js +3 -2
- package/lib/module/utils/ModalPresentationContext.js.map +1 -1
- package/lib/module/utils/conditional.js +3 -1
- package/lib/module/utils/conditional.js.map +1 -1
- package/lib/module/utils/findLastIndex.js +4 -2
- package/lib/module/utils/findLastIndex.js.map +1 -1
- package/lib/module/utils/gestureActivationCriteria.js +60 -0
- package/lib/module/utils/gestureActivationCriteria.js.map +1 -0
- package/lib/module/utils/getDistanceForDirection.js +5 -3
- package/lib/module/utils/getDistanceForDirection.js.map +1 -1
- package/lib/module/utils/getInvertedMultiplier.js +5 -4
- package/lib/module/utils/getInvertedMultiplier.js.map +1 -1
- package/lib/module/utils/getModalRoutesKeys.js +12 -0
- package/lib/module/utils/getModalRoutesKeys.js.map +1 -0
- package/lib/module/utils/getShadowStyle.js +24 -0
- package/lib/module/utils/getShadowStyle.js.map +1 -0
- package/lib/module/utils/{debounce.js → throttle.js} +5 -4
- package/lib/module/utils/throttle.js.map +1 -0
- package/lib/module/utils/useCardAnimation.js +4 -2
- package/lib/module/utils/useCardAnimation.js.map +1 -1
- package/lib/module/utils/useGestureHandlerRef.js +5 -3
- package/lib/module/utils/useGestureHandlerRef.js.map +1 -1
- package/lib/module/utils/useKeyboardManager.js +8 -6
- package/lib/module/utils/useKeyboardManager.js.map +1 -1
- package/lib/module/views/GestureHandler.android.js +3 -1
- package/lib/module/views/GestureHandler.android.js.map +1 -1
- package/lib/module/views/GestureHandler.ios.js +3 -1
- package/lib/module/views/GestureHandler.ios.js.map +1 -1
- package/lib/module/views/GestureHandler.js +6 -1
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/GestureHandler.kepler.js +4 -0
- package/lib/module/views/GestureHandler.kepler.js.map +1 -0
- package/lib/module/views/GestureHandlerNative.js +13 -9
- package/lib/module/views/GestureHandlerNative.js.map +1 -1
- package/lib/module/views/Header/Header.js +12 -8
- package/lib/module/views/Header/Header.js.map +1 -1
- package/lib/module/views/Header/HeaderContainer.js +103 -93
- package/lib/module/views/Header/HeaderContainer.js.map +1 -1
- package/lib/module/views/Header/HeaderSegment.js +43 -31
- package/lib/module/views/Header/HeaderSegment.js.map +1 -1
- package/lib/module/views/Screens.js +17 -9
- package/lib/module/views/Screens.js.map +1 -1
- package/lib/module/views/Stack/Card.js +313 -338
- package/lib/module/views/Stack/Card.js.map +1 -1
- package/lib/module/views/Stack/CardA11yWrapper.js +43 -0
- package/lib/module/views/Stack/CardA11yWrapper.js.map +1 -0
- package/lib/module/views/Stack/CardContainer.js +116 -90
- package/lib/module/views/Stack/CardContainer.js.map +1 -1
- package/lib/module/views/Stack/CardContent.js +74 -0
- package/lib/module/views/Stack/CardContent.js.map +1 -0
- package/lib/module/views/Stack/CardStack.js +246 -181
- package/lib/module/views/Stack/CardStack.js.map +1 -1
- package/lib/module/views/Stack/StackView.js +80 -64
- package/lib/module/views/Stack/StackView.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts +8 -0
- package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts +3 -3
- package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts +8 -0
- package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts +10 -0
- package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createStackNavigator.d.ts +15 -7
- package/lib/typescript/src/navigators/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +84 -24
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/CardAnimationContext.d.ts +1 -2
- package/lib/typescript/src/utils/CardAnimationContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts +1 -2
- package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/ModalPresentationContext.d.ts +1 -2
- package/lib/typescript/src/utils/ModalPresentationContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/conditional.d.ts +1 -1
- package/lib/typescript/src/utils/conditional.d.ts.map +1 -1
- package/lib/typescript/src/utils/findLastIndex.d.ts +1 -1
- package/lib/typescript/src/utils/findLastIndex.d.ts.map +1 -1
- package/lib/typescript/src/utils/gestureActivationCriteria.d.ts +57 -0
- package/lib/typescript/src/utils/gestureActivationCriteria.d.ts.map +1 -0
- package/lib/typescript/src/utils/getDistanceForDirection.d.ts +1 -1
- package/lib/typescript/src/utils/getDistanceForDirection.d.ts.map +1 -1
- package/lib/typescript/src/utils/getInvertedMultiplier.d.ts +1 -1
- package/lib/typescript/src/utils/getInvertedMultiplier.d.ts.map +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts +4 -0
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +1 -0
- package/lib/typescript/src/utils/getShadowStyle.d.ts +27 -0
- package/lib/typescript/src/utils/getShadowStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/throttle.d.ts +2 -0
- package/lib/typescript/src/utils/throttle.d.ts.map +1 -0
- package/lib/typescript/src/utils/useCardAnimation.d.ts +1 -1
- package/lib/typescript/src/utils/useCardAnimation.d.ts.map +1 -1
- package/lib/typescript/src/utils/useGestureHandlerRef.d.ts +1 -1
- package/lib/typescript/src/utils/useGestureHandlerRef.d.ts.map +1 -1
- package/lib/typescript/src/utils/useKeyboardManager.d.ts +1 -1
- package/lib/typescript/src/utils/useKeyboardManager.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.d.ts +3 -2
- package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.kepler.d.ts +2 -0
- package/lib/typescript/src/views/GestureHandler.kepler.d.ts.map +1 -0
- package/lib/typescript/src/views/GestureHandlerNative.d.ts +4 -5
- package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/Header.d.ts +1 -2
- package/lib/typescript/src/views/Header/Header.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/HeaderContainer.d.ts +4 -5
- package/lib/typescript/src/views/Header/HeaderContainer.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/HeaderSegment.d.ts +2 -2
- package/lib/typescript/src/views/Header/HeaderSegment.d.ts.map +1 -1
- package/lib/typescript/src/views/Screens.d.ts +7 -5
- package/lib/typescript/src/views/Screens.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/Card.d.ts +14 -42
- package/lib/typescript/src/views/Stack/Card.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts +15 -0
- package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts.map +1 -0
- package/lib/typescript/src/views/Stack/CardContainer.d.ts +6 -8
- package/lib/typescript/src/views/Stack/CardContainer.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/CardContent.d.ts +13 -0
- package/lib/typescript/src/views/Stack/CardContent.d.ts.map +1 -0
- package/lib/typescript/src/views/Stack/CardStack.d.ts +8 -7
- package/lib/typescript/src/views/Stack/CardStack.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/StackView.d.ts +10 -81
- package/lib/typescript/src/views/Stack/StackView.d.ts.map +1 -1
- package/oss-attribution/attribution.txt +76 -0
- package/oss-attribution/licenseInfos.json +27 -0
- package/package.json +105 -1
- package/src/TransitionConfigs/CardStyleInterpolators.tsx +72 -6
- package/src/TransitionConfigs/HeaderStyleInterpolators.tsx +43 -25
- package/src/TransitionConfigs/TransitionPresets.tsx +35 -5
- package/src/TransitionConfigs/TransitionSpecs.tsx +30 -2
- package/src/index.tsx +12 -7
- package/src/navigators/createStackNavigator.tsx +47 -63
- package/src/types.tsx +116 -24
- package/src/utils/CardAnimationContext.tsx +3 -3
- package/src/utils/GestureHandlerRefContext.tsx +2 -2
- package/src/utils/ModalPresentationContext.tsx +1 -3
- package/src/utils/conditional.tsx +1 -1
- package/src/utils/findLastIndex.tsx +2 -5
- package/src/utils/gestureActivationCriteria.tsx +70 -0
- package/src/utils/getDistanceForDirection.tsx +5 -4
- package/src/utils/getInvertedMultiplier.tsx +5 -6
- package/src/utils/getModalRoutesKeys.ts +21 -0
- package/src/utils/getShadowStyle.tsx +37 -0
- package/src/utils/throttle.tsx +16 -0
- package/src/utils/useCardAnimation.tsx +2 -2
- package/src/utils/useGestureHandlerRef.tsx +3 -3
- package/src/utils/useKeyboardManager.tsx +5 -7
- package/src/views/GestureHandler.kepler.tsx +1 -0
- package/src/views/GestureHandler.tsx +2 -2
- package/src/views/GestureHandlerNative.tsx +5 -5
- package/src/views/Header/Header.tsx +8 -7
- package/src/views/Header/HeaderContainer.tsx +23 -18
- package/src/views/Header/HeaderSegment.tsx +41 -43
- package/src/views/Screens.tsx +4 -2
- package/src/views/Stack/Card.tsx +480 -462
- package/src/views/Stack/CardA11yWrapper.tsx +67 -0
- package/src/views/Stack/CardContainer.tsx +127 -108
- package/src/views/Stack/CardContent.tsx +92 -0
- package/src/views/Stack/CardStack.tsx +375 -243
- package/src/views/Stack/StackView.tsx +73 -62
- package/SystemBundles/c55a41e7975f46f901d6afe3b0331d043bdbf1f54f96209de0215cf6f6fd5377.bundle +0 -28130
- package/SystemBundles/c55a41e7975f46f901d6afe3b0331d043bdbf1f54f96209de0215cf6f6fd5377.map +0 -8489
- package/SystemModules/amzn__react-navigation__stack-7.modules.txt +0 -95
- package/SystemModules/amzn__react-navigation__stack-7.private.modules.txt +0 -191
- package/THIRD_PARTY_NOTICES.txt +0 -24
- package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js +0 -353
- package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js.map +0 -1
- package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js +0 -259
- package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js.map +0 -1
- package/lib/commonjs/TransitionConfigs/TransitionPresets.js +0 -134
- package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +0 -1
- package/lib/commonjs/TransitionConfigs/TransitionSpecs.js +0 -100
- package/lib/commonjs/TransitionConfigs/TransitionSpecs.js.map +0 -1
- package/lib/commonjs/index.js +0 -69
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/navigators/createStackNavigator.js +0 -82
- package/lib/commonjs/navigators/createStackNavigator.js.map +0 -1
- package/lib/commonjs/types.js +0 -6
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils/CardAnimationContext.js +0 -11
- package/lib/commonjs/utils/CardAnimationContext.js.map +0 -1
- package/lib/commonjs/utils/GestureHandlerRefContext.js +0 -11
- package/lib/commonjs/utils/GestureHandlerRefContext.js.map +0 -1
- package/lib/commonjs/utils/ModalPresentationContext.js +0 -12
- package/lib/commonjs/utils/ModalPresentationContext.js.map +0 -1
- package/lib/commonjs/utils/conditional.js +0 -32
- package/lib/commonjs/utils/conditional.js.map +0 -1
- package/lib/commonjs/utils/debounce.js +0 -19
- package/lib/commonjs/utils/debounce.js.map +0 -1
- package/lib/commonjs/utils/findLastIndex.js +0 -15
- package/lib/commonjs/utils/findLastIndex.js.map +0 -1
- package/lib/commonjs/utils/getDistanceForDirection.js +0 -20
- package/lib/commonjs/utils/getDistanceForDirection.js.map +0 -1
- package/lib/commonjs/utils/getInvertedMultiplier.js +0 -20
- package/lib/commonjs/utils/getInvertedMultiplier.js.map +0 -1
- package/lib/commonjs/utils/memoize.js +0 -33
- package/lib/commonjs/utils/memoize.js.map +0 -1
- package/lib/commonjs/utils/useCardAnimation.js +0 -19
- package/lib/commonjs/utils/useCardAnimation.js.map +0 -1
- package/lib/commonjs/utils/useGestureHandlerRef.js +0 -19
- package/lib/commonjs/utils/useGestureHandlerRef.js.map +0 -1
- package/lib/commonjs/utils/useKeyboardManager.js +0 -96
- package/lib/commonjs/utils/useKeyboardManager.js.map +0 -1
- package/lib/commonjs/views/GestureHandler.android.js +0 -17
- package/lib/commonjs/views/GestureHandler.android.js.map +0 -1
- package/lib/commonjs/views/GestureHandler.ios.js +0 -17
- package/lib/commonjs/views/GestureHandler.ios.js.map +0 -1
- package/lib/commonjs/views/GestureHandler.js +0 -24
- package/lib/commonjs/views/GestureHandler.js.map +0 -1
- package/lib/commonjs/views/GestureHandlerNative.js +0 -34
- package/lib/commonjs/views/GestureHandlerNative.js.map +0 -1
- package/lib/commonjs/views/Header/Header.js +0 -61
- package/lib/commonjs/views/Header/Header.js.map +0 -1
- package/lib/commonjs/views/Header/HeaderContainer.js +0 -127
- package/lib/commonjs/views/Header/HeaderContainer.js.map +0 -1
- package/lib/commonjs/views/Header/HeaderSegment.js +0 -139
- package/lib/commonjs/views/Header/HeaderSegment.js.map +0 -1
- package/lib/commonjs/views/ModalStatusBarManager.js +0 -42
- package/lib/commonjs/views/ModalStatusBarManager.js.map +0 -1
- package/lib/commonjs/views/Screens.js +0 -44
- package/lib/commonjs/views/Screens.js.map +0 -1
- package/lib/commonjs/views/Stack/Card.js +0 -469
- package/lib/commonjs/views/Stack/Card.js.map +0 -1
- package/lib/commonjs/views/Stack/CardContainer.js +0 -259
- package/lib/commonjs/views/Stack/CardContainer.js.map +0 -1
- package/lib/commonjs/views/Stack/CardSheet.js +0 -54
- package/lib/commonjs/views/Stack/CardSheet.js.map +0 -1
- package/lib/commonjs/views/Stack/CardStack.js +0 -443
- package/lib/commonjs/views/Stack/CardStack.js.map +0 -1
- package/lib/commonjs/views/Stack/StackView.js +0 -333
- package/lib/commonjs/views/Stack/StackView.js.map +0 -1
- package/lib/module/utils/debounce.js.map +0 -1
- package/lib/module/utils/memoize.js +0 -27
- package/lib/module/utils/memoize.js.map +0 -1
- package/lib/module/views/ModalStatusBarManager.js +0 -34
- package/lib/module/views/ModalStatusBarManager.js.map +0 -1
- package/lib/module/views/Stack/CardSheet.js +0 -46
- package/lib/module/views/Stack/CardSheet.js.map +0 -1
- package/lib/typescript/src/utils/debounce.d.ts +0 -2
- package/lib/typescript/src/utils/debounce.d.ts.map +0 -1
- package/lib/typescript/src/utils/memoize.d.ts +0 -2
- package/lib/typescript/src/utils/memoize.d.ts.map +0 -1
- package/lib/typescript/src/views/ModalStatusBarManager.d.ts +0 -12
- package/lib/typescript/src/views/ModalStatusBarManager.d.ts.map +0 -1
- package/lib/typescript/src/views/Stack/CardSheet.d.ts +0 -15
- package/lib/typescript/src/views/Stack/CardSheet.d.ts.map +0 -1
- package/src/utils/debounce.tsx +0 -17
- package/src/utils/memoize.tsx +0 -33
- package/src/views/ModalStatusBarManager.tsx +0 -50
- package/src/views/Stack/CardSheet.tsx +0 -61
package/package.json
CHANGED
|
@@ -1 +1,105 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@amazon-devices/react-navigation__stack",
|
|
3
|
+
"description": "Stack navigator component for iOS and Android with animated transitions and gestures",
|
|
4
|
+
"version": "8.0.9000000000-rn-83",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react-native-component",
|
|
7
|
+
"react-component",
|
|
8
|
+
"react-native",
|
|
9
|
+
"react-navigation",
|
|
10
|
+
"ios",
|
|
11
|
+
"android",
|
|
12
|
+
"stack"
|
|
13
|
+
],
|
|
14
|
+
"license": "See license in LICENSE",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/react-navigation/react-navigation.git",
|
|
18
|
+
"directory": "packages/stack"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/react-navigation/react-navigation/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://reactnavigation.org/docs/stack-navigator/",
|
|
24
|
+
"main": "./lib/module/index.js",
|
|
25
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"source": "./src/index.tsx",
|
|
29
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
30
|
+
"default": "./lib/module/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"src",
|
|
36
|
+
"lib",
|
|
37
|
+
"!**/__tests__",
|
|
38
|
+
"kepler-compatibility.json",
|
|
39
|
+
"SystemModules",
|
|
40
|
+
"SystemBundles",
|
|
41
|
+
"oss-attribution",
|
|
42
|
+
"kepler-transformed-package-info.json"
|
|
43
|
+
],
|
|
44
|
+
"sideEffects": false,
|
|
45
|
+
"kepler": {
|
|
46
|
+
"temporary-alias-for-package": {
|
|
47
|
+
"name": "@react-navigation/stack",
|
|
48
|
+
"version": "7.1.1"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"clean": "del lib"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@amazon-devices/react-navigation__elements": "^8.0.1",
|
|
59
|
+
"color": "^4.2.3",
|
|
60
|
+
"use-latest-callback": "^0.2.4"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@jest/globals": "^30.0.0",
|
|
64
|
+
"@amazon-devices/react-navigation__native": "^8.0.1",
|
|
65
|
+
"@testing-library/react-native": "^13.2.0",
|
|
66
|
+
"@types/color": "^4.2.0",
|
|
67
|
+
"@types/react": "~19.0.10",
|
|
68
|
+
"del-cli": "^6.0.0",
|
|
69
|
+
"react": "19.0.0",
|
|
70
|
+
"react-native": "0.79.3",
|
|
71
|
+
"react-native-builder-bob": "^0.40.12",
|
|
72
|
+
"@amazon-devices/react-native-gesture-handler": "^4.0.0",
|
|
73
|
+
"@amazon-devices/react-native-safe-area-context": "^8.0.1",
|
|
74
|
+
"@amazon-devices/react-native-screens": "^3.0.0",
|
|
75
|
+
"react-test-renderer": "19.0.0",
|
|
76
|
+
"typescript": "^5.8.3"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@amazon-devices/react-native-kepler": "*",
|
|
80
|
+
"@amazon-devices/react-navigation__native": "^8.0.1",
|
|
81
|
+
"react": ">= 18.2.0",
|
|
82
|
+
"react-native": "*",
|
|
83
|
+
"@amazon-devices/react-native-gesture-handler": "^4.0.0",
|
|
84
|
+
"@amazon-devices/react-native-safe-area-context": "^8.0.1",
|
|
85
|
+
"@amazon-devices/react-native-screens": "^3.0.0"
|
|
86
|
+
},
|
|
87
|
+
"react-native-builder-bob": {
|
|
88
|
+
"source": "src",
|
|
89
|
+
"output": "lib",
|
|
90
|
+
"targets": [
|
|
91
|
+
[
|
|
92
|
+
"module",
|
|
93
|
+
{
|
|
94
|
+
"esm": true
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
"typescript",
|
|
99
|
+
{
|
|
100
|
+
"project": "tsconfig.build.json"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
StackCardInterpolatedStyle,
|
|
5
5
|
StackCardInterpolationProps,
|
|
6
6
|
} from '../types';
|
|
7
|
-
import conditional from '../utils/conditional';
|
|
7
|
+
import { conditional } from '../utils/conditional';
|
|
8
8
|
|
|
9
9
|
const { add, multiply } = Animated;
|
|
10
10
|
|
|
@@ -63,6 +63,19 @@ export function forHorizontalIOS({
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* iOS-style slide in from the left.
|
|
68
|
+
*/
|
|
69
|
+
export function forHorizontalIOSInverted({
|
|
70
|
+
inverted,
|
|
71
|
+
...rest
|
|
72
|
+
}: StackCardInterpolationProps): StackCardInterpolatedStyle {
|
|
73
|
+
return forHorizontalIOS({
|
|
74
|
+
...rest,
|
|
75
|
+
inverted: Animated.multiply(inverted, -1),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
66
79
|
/**
|
|
67
80
|
* Standard iOS-style slide in from the bottom (used for modals).
|
|
68
81
|
*/
|
|
@@ -156,15 +169,16 @@ export function forModalPresentationIOS({
|
|
|
156
169
|
const borderRadius = isLandscape
|
|
157
170
|
? 0
|
|
158
171
|
: isFirst
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
172
|
+
? progress.interpolate({
|
|
173
|
+
inputRange: [0, 1, 1.0001, 2],
|
|
174
|
+
outputRange: [0, 0, hasNotchIos ? 38 : 0, 10],
|
|
175
|
+
})
|
|
176
|
+
: 10;
|
|
164
177
|
|
|
165
178
|
return {
|
|
166
179
|
cardStyle: {
|
|
167
180
|
overflow: 'hidden',
|
|
181
|
+
borderCurve: 'continuous',
|
|
168
182
|
borderTopLeftRadius: borderRadius,
|
|
169
183
|
borderTopRightRadius: borderRadius,
|
|
170
184
|
// We don't need these for the animation
|
|
@@ -323,6 +337,58 @@ export function forScaleFromCenterAndroid({
|
|
|
323
337
|
};
|
|
324
338
|
}
|
|
325
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Standard Android-style fade from right for Android 14.
|
|
342
|
+
*/
|
|
343
|
+
export function forFadeFromRightAndroid({
|
|
344
|
+
current,
|
|
345
|
+
next,
|
|
346
|
+
inverted,
|
|
347
|
+
closing,
|
|
348
|
+
}: StackCardInterpolationProps): StackCardInterpolatedStyle {
|
|
349
|
+
const translateFocused = multiply(
|
|
350
|
+
current.progress.interpolate({
|
|
351
|
+
inputRange: [0, 1],
|
|
352
|
+
outputRange: [96, 0],
|
|
353
|
+
extrapolate: 'clamp',
|
|
354
|
+
}),
|
|
355
|
+
inverted
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
const translateUnfocused = next
|
|
359
|
+
? multiply(
|
|
360
|
+
next.progress.interpolate({
|
|
361
|
+
inputRange: [0, 1],
|
|
362
|
+
outputRange: [0, -96],
|
|
363
|
+
extrapolate: 'clamp',
|
|
364
|
+
}),
|
|
365
|
+
inverted
|
|
366
|
+
)
|
|
367
|
+
: 0;
|
|
368
|
+
|
|
369
|
+
const opacity = conditional(
|
|
370
|
+
closing,
|
|
371
|
+
current.progress.interpolate({
|
|
372
|
+
inputRange: [0, 1],
|
|
373
|
+
outputRange: [0, 1],
|
|
374
|
+
extrapolate: 'clamp',
|
|
375
|
+
}),
|
|
376
|
+
current.progress
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
return {
|
|
380
|
+
cardStyle: {
|
|
381
|
+
opacity,
|
|
382
|
+
transform: [
|
|
383
|
+
// Translation for the animation of the current card
|
|
384
|
+
{ translateX: translateFocused },
|
|
385
|
+
// Translation for the animation of the card on top of this
|
|
386
|
+
{ translateX: translateUnfocused },
|
|
387
|
+
],
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
|
|
326
392
|
/**
|
|
327
393
|
* Standard bottom sheet slide in from the bottom for Android.
|
|
328
394
|
*/
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Animated,
|
|
1
|
+
import { Animated, Platform } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
StackHeaderInterpolatedStyle,
|
|
5
5
|
StackHeaderInterpolationProps,
|
|
6
6
|
} from '../types';
|
|
7
7
|
|
|
8
|
-
const { add } = Animated;
|
|
8
|
+
const { add, multiply } = Animated;
|
|
9
|
+
|
|
10
|
+
// Width of the screen in split layout on portrait mode on iPad Mini
|
|
11
|
+
// Keep in sync with HeaderBackButton.tsx
|
|
12
|
+
const IPAD_MINI_MEDIUM_WIDTH = 414;
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* Standard UIKit style animation for the header where the title fades into the back button label.
|
|
@@ -13,10 +17,15 @@ const { add } = Animated;
|
|
|
13
17
|
export function forUIKit({
|
|
14
18
|
current,
|
|
15
19
|
next,
|
|
20
|
+
direction,
|
|
16
21
|
layouts,
|
|
17
22
|
}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {
|
|
18
23
|
const defaultOffset = 100;
|
|
19
|
-
const leftSpacing =
|
|
24
|
+
const leftSpacing =
|
|
25
|
+
27 +
|
|
26
|
+
(Platform.OS === 'ios' && layouts.screen.width >= IPAD_MINI_MEDIUM_WIDTH
|
|
27
|
+
? 5 // Additional padding on iPad specified in Header.tsx
|
|
28
|
+
: 0);
|
|
20
29
|
|
|
21
30
|
// The title and back button title should cross-fade to each other
|
|
22
31
|
// When screen is fully open, the title should be in center, and back title should be on left
|
|
@@ -34,6 +43,8 @@ export function forUIKit({
|
|
|
34
43
|
// The back title also animates in from this position
|
|
35
44
|
const rightOffset = layouts.screen.width / 4;
|
|
36
45
|
|
|
46
|
+
const multiplier = direction === 'rtl' ? -1 : 1;
|
|
47
|
+
|
|
37
48
|
const progress = add(
|
|
38
49
|
current.progress.interpolate({
|
|
39
50
|
inputRange: [0, 1],
|
|
@@ -59,12 +70,13 @@ export function forUIKit({
|
|
|
59
70
|
leftLabelStyle: {
|
|
60
71
|
transform: [
|
|
61
72
|
{
|
|
62
|
-
translateX:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
: [leftLabelOffset, 0, -rightOffset],
|
|
67
|
-
|
|
73
|
+
translateX: multiply(
|
|
74
|
+
multiplier,
|
|
75
|
+
progress.interpolate({
|
|
76
|
+
inputRange: [0, 1, 2],
|
|
77
|
+
outputRange: [leftLabelOffset, 0, -rightOffset],
|
|
78
|
+
})
|
|
79
|
+
),
|
|
68
80
|
},
|
|
69
81
|
],
|
|
70
82
|
},
|
|
@@ -76,29 +88,31 @@ export function forUIKit({
|
|
|
76
88
|
},
|
|
77
89
|
titleStyle: {
|
|
78
90
|
opacity: progress.interpolate({
|
|
79
|
-
inputRange: [0, 0.
|
|
80
|
-
outputRange: [0, 0.1, 1, 0],
|
|
91
|
+
inputRange: [0, 0.5, 0.75, 1, 1.5],
|
|
92
|
+
outputRange: [0, 0, 0.1, 1, 0],
|
|
81
93
|
}),
|
|
82
94
|
transform: [
|
|
83
95
|
{
|
|
84
|
-
translateX:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
: [rightOffset, 0, -titleLeftOffset],
|
|
89
|
-
|
|
96
|
+
translateX: multiply(
|
|
97
|
+
multiplier,
|
|
98
|
+
progress.interpolate({
|
|
99
|
+
inputRange: [0.5, 1, 2],
|
|
100
|
+
outputRange: [rightOffset, 0, -titleLeftOffset],
|
|
101
|
+
})
|
|
102
|
+
),
|
|
90
103
|
},
|
|
91
104
|
],
|
|
92
105
|
},
|
|
93
106
|
backgroundStyle: {
|
|
94
107
|
transform: [
|
|
95
108
|
{
|
|
96
|
-
translateX:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
: [layouts.screen.width, 0, -layouts.screen.width],
|
|
101
|
-
|
|
109
|
+
translateX: multiply(
|
|
110
|
+
multiplier,
|
|
111
|
+
progress.interpolate({
|
|
112
|
+
inputRange: [0, 1, 2],
|
|
113
|
+
outputRange: [layouts.screen.width, 0, -layouts.screen.width],
|
|
114
|
+
})
|
|
115
|
+
),
|
|
102
116
|
},
|
|
103
117
|
],
|
|
104
118
|
},
|
|
@@ -151,8 +165,10 @@ export function forFade({
|
|
|
151
165
|
export function forSlideLeft({
|
|
152
166
|
current,
|
|
153
167
|
next,
|
|
168
|
+
direction,
|
|
154
169
|
layouts: { screen },
|
|
155
170
|
}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {
|
|
171
|
+
const isRTL = direction === 'rtl';
|
|
156
172
|
const progress = add(
|
|
157
173
|
current.progress.interpolate({
|
|
158
174
|
inputRange: [0, 1],
|
|
@@ -170,7 +186,7 @@ export function forSlideLeft({
|
|
|
170
186
|
|
|
171
187
|
const translateX = progress.interpolate({
|
|
172
188
|
inputRange: [0, 1, 2],
|
|
173
|
-
outputRange:
|
|
189
|
+
outputRange: isRTL
|
|
174
190
|
? [-screen.width, 0, screen.width]
|
|
175
191
|
: [screen.width, 0, -screen.width],
|
|
176
192
|
});
|
|
@@ -191,8 +207,10 @@ export function forSlideLeft({
|
|
|
191
207
|
export function forSlideRight({
|
|
192
208
|
current,
|
|
193
209
|
next,
|
|
210
|
+
direction,
|
|
194
211
|
layouts: { screen },
|
|
195
212
|
}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {
|
|
213
|
+
const isRTL = direction === 'rtl';
|
|
196
214
|
const progress = add(
|
|
197
215
|
current.progress.interpolate({
|
|
198
216
|
inputRange: [0, 1],
|
|
@@ -210,7 +228,7 @@ export function forSlideRight({
|
|
|
210
228
|
|
|
211
229
|
const translateX = progress.interpolate({
|
|
212
230
|
inputRange: [0, 1, 2],
|
|
213
|
-
outputRange:
|
|
231
|
+
outputRange: isRTL
|
|
214
232
|
? [screen.width, 0, -screen.width]
|
|
215
233
|
: [-screen.width, 0, screen.width],
|
|
216
234
|
});
|
|
@@ -5,7 +5,9 @@ import {
|
|
|
5
5
|
forBottomSheetAndroid,
|
|
6
6
|
forFadeFromBottomAndroid,
|
|
7
7
|
forFadeFromCenter as forFadeCard,
|
|
8
|
+
forFadeFromRightAndroid,
|
|
8
9
|
forHorizontalIOS,
|
|
10
|
+
forHorizontalIOSInverted,
|
|
9
11
|
forModalPresentationIOS,
|
|
10
12
|
forRevealFromBottomAndroid,
|
|
11
13
|
forScaleFromCenterAndroid,
|
|
@@ -24,6 +26,7 @@ import {
|
|
|
24
26
|
|
|
25
27
|
const ANDROID_VERSION_PIE = 28;
|
|
26
28
|
const ANDROID_VERSION_10 = 29;
|
|
29
|
+
const ANDROID_VERSION_14 = 34;
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* Standard iOS navigation transition.
|
|
@@ -103,6 +106,19 @@ export const ScaleFromCenterAndroid: TransitionPreset = {
|
|
|
103
106
|
headerStyleInterpolator: forFade,
|
|
104
107
|
};
|
|
105
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Standard Android navigation transition when opening or closing an Activity on Android 14.
|
|
111
|
+
*/
|
|
112
|
+
export const FadeFromRightAndroid: TransitionPreset = {
|
|
113
|
+
gestureDirection: 'horizontal',
|
|
114
|
+
transitionSpec: {
|
|
115
|
+
open: FadeInFromBottomAndroidSpec,
|
|
116
|
+
close: FadeOutToBottomAndroidSpec,
|
|
117
|
+
},
|
|
118
|
+
cardStyleInterpolator: forFadeFromRightAndroid,
|
|
119
|
+
headerStyleInterpolator: forFade,
|
|
120
|
+
};
|
|
121
|
+
|
|
106
122
|
/**
|
|
107
123
|
* Standard bottom sheet slide transition for Android 10.
|
|
108
124
|
*/
|
|
@@ -133,13 +149,17 @@ export const ModalFadeTransition: TransitionPreset = {
|
|
|
133
149
|
* Default navigation transition for the current platform.
|
|
134
150
|
*/
|
|
135
151
|
export const DefaultTransition = Platform.select({
|
|
152
|
+
// @ts-ignore - add default value for kepler (leaving for easy override)
|
|
153
|
+
kepler: ScaleFromCenterAndroid,
|
|
136
154
|
ios: SlideFromRightIOS,
|
|
137
155
|
android:
|
|
138
|
-
Platform.Version >=
|
|
139
|
-
?
|
|
140
|
-
: Platform.Version >=
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
Number(Platform.Version) >= ANDROID_VERSION_14
|
|
157
|
+
? FadeFromRightAndroid
|
|
158
|
+
: Number(Platform.Version) >= ANDROID_VERSION_10
|
|
159
|
+
? ScaleFromCenterAndroid
|
|
160
|
+
: Number(Platform.Version) >= ANDROID_VERSION_PIE
|
|
161
|
+
? RevealFromBottomAndroid
|
|
162
|
+
: FadeFromBottomAndroid,
|
|
143
163
|
default: ScaleFromCenterAndroid,
|
|
144
164
|
});
|
|
145
165
|
|
|
@@ -147,6 +167,16 @@ export const DefaultTransition = Platform.select({
|
|
|
147
167
|
* Default modal transition for the current platform.
|
|
148
168
|
*/
|
|
149
169
|
export const ModalTransition = Platform.select({
|
|
170
|
+
// @ts-ignore - add default value for kepler (leaving for easy override)
|
|
171
|
+
kepler: BottomSheetAndroid,
|
|
150
172
|
ios: ModalPresentationIOS,
|
|
151
173
|
default: BottomSheetAndroid,
|
|
152
174
|
});
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Slide from left transition.
|
|
178
|
+
*/
|
|
179
|
+
export const SlideFromLeftIOS: TransitionPreset = {
|
|
180
|
+
...SlideFromRightIOS,
|
|
181
|
+
cardStyleInterpolator: forHorizontalIOSInverted,
|
|
182
|
+
};
|
|
@@ -51,7 +51,7 @@ export const RevealFromBottomAndroidSpec: TransitionSpec = {
|
|
|
51
51
|
duration: 425,
|
|
52
52
|
// This is super rough approximation of the path used for the curve by android
|
|
53
53
|
// See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml
|
|
54
|
-
easing: Easing.bezier(0.
|
|
54
|
+
easing: Easing.bezier(0.20833, 0.82, 0.25, 1),
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -65,7 +65,35 @@ export const ScaleFromCenterAndroidSpec: TransitionSpec = {
|
|
|
65
65
|
duration: 400,
|
|
66
66
|
// This is super rough approximation of the path used for the curve by android
|
|
67
67
|
// See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml
|
|
68
|
-
easing: Easing.bezier(0.
|
|
68
|
+
easing: Easing.bezier(0.20833, 0.82, 0.25, 1),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Approximate configuration for activity open animation from Android 14.
|
|
74
|
+
* See https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r51/core/res/res/anim/activity_open_enter.xml
|
|
75
|
+
*/
|
|
76
|
+
export const FadeInFromRightAndroidSpec: TransitionSpec = {
|
|
77
|
+
animation: 'timing',
|
|
78
|
+
config: {
|
|
79
|
+
duration: 450,
|
|
80
|
+
// This is super rough approximation of the path used for the curve by android
|
|
81
|
+
// See https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r51/core/res/res/interpolator/fast_out_extra_slow_in.xml
|
|
82
|
+
easing: Easing.bezier(0.20833, 0.82, 0.25, 1),
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Approximate configuration for activity close animation from Android 14.
|
|
88
|
+
* See https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r51/core/res/res/anim/activity_close_exit.xml
|
|
89
|
+
*/
|
|
90
|
+
export const FadeOutToLeftAndroidSpec: TransitionSpec = {
|
|
91
|
+
animation: 'timing',
|
|
92
|
+
config: {
|
|
93
|
+
duration: 450,
|
|
94
|
+
// This is super rough approximation of the path used for the curve by android
|
|
95
|
+
// See https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r51/core/res/res/interpolator/fast_out_extra_slow_in.xml
|
|
96
|
+
easing: Easing.bezier(0.20833, 0.82, 0.25, 1),
|
|
69
97
|
},
|
|
70
98
|
};
|
|
71
99
|
|
package/src/index.tsx
CHANGED
|
@@ -6,13 +6,13 @@ import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
|
|
|
6
6
|
/**
|
|
7
7
|
* Navigators
|
|
8
8
|
*/
|
|
9
|
-
export {
|
|
9
|
+
export { createStackNavigator } from './navigators/createStackNavigator';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Views
|
|
13
13
|
*/
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
14
|
+
export { Header } from './views/Header/Header';
|
|
15
|
+
export { StackView } from './views/Stack/StackView';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Transition presets
|
|
@@ -27,25 +27,30 @@ export {
|
|
|
27
27
|
/**
|
|
28
28
|
* Utilities
|
|
29
29
|
*/
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
30
|
+
export { CardAnimationContext } from './utils/CardAnimationContext';
|
|
31
|
+
export { GestureHandlerRefContext } from './utils/GestureHandlerRefContext';
|
|
32
|
+
export { useCardAnimation } from './utils/useCardAnimation';
|
|
33
|
+
export { useGestureHandlerRef } from './utils/useGestureHandlerRef';
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Types
|
|
37
37
|
*/
|
|
38
38
|
export type {
|
|
39
|
+
StackAnimationName,
|
|
39
40
|
StackCardInterpolatedStyle,
|
|
40
41
|
StackCardInterpolationProps,
|
|
41
42
|
StackCardStyleInterpolator,
|
|
42
43
|
StackHeaderInterpolatedStyle,
|
|
43
44
|
StackHeaderInterpolationProps,
|
|
45
|
+
StackHeaderLeftProps,
|
|
44
46
|
StackHeaderProps,
|
|
47
|
+
StackHeaderRightProps,
|
|
45
48
|
StackHeaderStyleInterpolator,
|
|
46
49
|
StackNavigationEventMap,
|
|
47
50
|
StackNavigationOptions,
|
|
48
51
|
StackNavigationProp,
|
|
52
|
+
StackNavigatorProps,
|
|
53
|
+
StackOptionsArgs,
|
|
49
54
|
StackScreenProps,
|
|
50
55
|
TransitionPreset,
|
|
51
56
|
} from './types';
|