@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.
Files changed (275) hide show
  1. package/SystemBundles/03e0ad8b8bcf16e659904adab730cbe9c1832c4a36017809f129fea7fb07b4fc.bundle +13453 -0
  2. package/SystemBundles/03e0ad8b8bcf16e659904adab730cbe9c1832c4a36017809f129fea7fb07b4fc.map +4627 -0
  3. package/SystemModules/amzn__react-navigation__stack-8.modules.txt +32 -0
  4. package/SystemModules/amzn__react-navigation__stack-8.private.modules.txt +91 -0
  5. package/SystemModules/keplerscript-system-bundle-config.json +4 -4
  6. package/kepler-compatibility.json +2 -2
  7. package/lib/module/TransitionConfigs/CardStyleInterpolators.js +57 -1
  8. package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
  9. package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js +30 -16
  10. package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
  11. package/lib/module/TransitionConfigs/TransitionPresets.js +32 -4
  12. package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
  13. package/lib/module/TransitionConfigs/TransitionSpecs.js +32 -2
  14. package/lib/module/TransitionConfigs/TransitionSpecs.js.map +1 -1
  15. package/lib/module/index.js +13 -11
  16. package/lib/module/index.js.map +1 -1
  17. package/lib/module/navigators/createStackNavigator.js +46 -48
  18. package/lib/module/navigators/createStackNavigator.js.map +1 -1
  19. package/lib/module/package.json +1 -0
  20. package/lib/module/types.js +2 -0
  21. package/lib/module/types.js.map +1 -1
  22. package/lib/module/utils/CardAnimationContext.js +3 -1
  23. package/lib/module/utils/CardAnimationContext.js.map +1 -1
  24. package/lib/module/utils/GestureHandlerRefContext.js +3 -1
  25. package/lib/module/utils/GestureHandlerRefContext.js.map +1 -1
  26. package/lib/module/utils/ModalPresentationContext.js +3 -2
  27. package/lib/module/utils/ModalPresentationContext.js.map +1 -1
  28. package/lib/module/utils/conditional.js +3 -1
  29. package/lib/module/utils/conditional.js.map +1 -1
  30. package/lib/module/utils/findLastIndex.js +4 -2
  31. package/lib/module/utils/findLastIndex.js.map +1 -1
  32. package/lib/module/utils/gestureActivationCriteria.js +60 -0
  33. package/lib/module/utils/gestureActivationCriteria.js.map +1 -0
  34. package/lib/module/utils/getDistanceForDirection.js +5 -3
  35. package/lib/module/utils/getDistanceForDirection.js.map +1 -1
  36. package/lib/module/utils/getInvertedMultiplier.js +5 -4
  37. package/lib/module/utils/getInvertedMultiplier.js.map +1 -1
  38. package/lib/module/utils/getModalRoutesKeys.js +12 -0
  39. package/lib/module/utils/getModalRoutesKeys.js.map +1 -0
  40. package/lib/module/utils/getShadowStyle.js +24 -0
  41. package/lib/module/utils/getShadowStyle.js.map +1 -0
  42. package/lib/module/utils/{debounce.js → throttle.js} +5 -4
  43. package/lib/module/utils/throttle.js.map +1 -0
  44. package/lib/module/utils/useCardAnimation.js +4 -2
  45. package/lib/module/utils/useCardAnimation.js.map +1 -1
  46. package/lib/module/utils/useGestureHandlerRef.js +5 -3
  47. package/lib/module/utils/useGestureHandlerRef.js.map +1 -1
  48. package/lib/module/utils/useKeyboardManager.js +8 -6
  49. package/lib/module/utils/useKeyboardManager.js.map +1 -1
  50. package/lib/module/views/GestureHandler.android.js +3 -1
  51. package/lib/module/views/GestureHandler.android.js.map +1 -1
  52. package/lib/module/views/GestureHandler.ios.js +3 -1
  53. package/lib/module/views/GestureHandler.ios.js.map +1 -1
  54. package/lib/module/views/GestureHandler.js +6 -1
  55. package/lib/module/views/GestureHandler.js.map +1 -1
  56. package/lib/module/views/GestureHandler.kepler.js +4 -0
  57. package/lib/module/views/GestureHandler.kepler.js.map +1 -0
  58. package/lib/module/views/GestureHandlerNative.js +13 -9
  59. package/lib/module/views/GestureHandlerNative.js.map +1 -1
  60. package/lib/module/views/Header/Header.js +12 -8
  61. package/lib/module/views/Header/Header.js.map +1 -1
  62. package/lib/module/views/Header/HeaderContainer.js +103 -93
  63. package/lib/module/views/Header/HeaderContainer.js.map +1 -1
  64. package/lib/module/views/Header/HeaderSegment.js +43 -31
  65. package/lib/module/views/Header/HeaderSegment.js.map +1 -1
  66. package/lib/module/views/Screens.js +17 -9
  67. package/lib/module/views/Screens.js.map +1 -1
  68. package/lib/module/views/Stack/Card.js +313 -338
  69. package/lib/module/views/Stack/Card.js.map +1 -1
  70. package/lib/module/views/Stack/CardA11yWrapper.js +43 -0
  71. package/lib/module/views/Stack/CardA11yWrapper.js.map +1 -0
  72. package/lib/module/views/Stack/CardContainer.js +116 -90
  73. package/lib/module/views/Stack/CardContainer.js.map +1 -1
  74. package/lib/module/views/Stack/CardContent.js +74 -0
  75. package/lib/module/views/Stack/CardContent.js.map +1 -0
  76. package/lib/module/views/Stack/CardStack.js +246 -181
  77. package/lib/module/views/Stack/CardStack.js.map +1 -1
  78. package/lib/module/views/Stack/StackView.js +80 -64
  79. package/lib/module/views/Stack/StackView.js.map +1 -1
  80. package/lib/typescript/package.json +1 -0
  81. package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts +8 -0
  82. package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts.map +1 -1
  83. package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts +3 -3
  84. package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -1
  85. package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts +8 -0
  86. package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts.map +1 -1
  87. package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts +10 -0
  88. package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts.map +1 -1
  89. package/lib/typescript/src/index.d.ts +8 -8
  90. package/lib/typescript/src/index.d.ts.map +1 -1
  91. package/lib/typescript/src/navigators/createStackNavigator.d.ts +15 -7
  92. package/lib/typescript/src/navigators/createStackNavigator.d.ts.map +1 -1
  93. package/lib/typescript/src/types.d.ts +84 -24
  94. package/lib/typescript/src/types.d.ts.map +1 -1
  95. package/lib/typescript/src/utils/CardAnimationContext.d.ts +1 -2
  96. package/lib/typescript/src/utils/CardAnimationContext.d.ts.map +1 -1
  97. package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts +1 -2
  98. package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts.map +1 -1
  99. package/lib/typescript/src/utils/ModalPresentationContext.d.ts +1 -2
  100. package/lib/typescript/src/utils/ModalPresentationContext.d.ts.map +1 -1
  101. package/lib/typescript/src/utils/conditional.d.ts +1 -1
  102. package/lib/typescript/src/utils/conditional.d.ts.map +1 -1
  103. package/lib/typescript/src/utils/findLastIndex.d.ts +1 -1
  104. package/lib/typescript/src/utils/findLastIndex.d.ts.map +1 -1
  105. package/lib/typescript/src/utils/gestureActivationCriteria.d.ts +57 -0
  106. package/lib/typescript/src/utils/gestureActivationCriteria.d.ts.map +1 -0
  107. package/lib/typescript/src/utils/getDistanceForDirection.d.ts +1 -1
  108. package/lib/typescript/src/utils/getDistanceForDirection.d.ts.map +1 -1
  109. package/lib/typescript/src/utils/getInvertedMultiplier.d.ts +1 -1
  110. package/lib/typescript/src/utils/getInvertedMultiplier.d.ts.map +1 -1
  111. package/lib/typescript/src/utils/getModalRoutesKeys.d.ts +4 -0
  112. package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +1 -0
  113. package/lib/typescript/src/utils/getShadowStyle.d.ts +27 -0
  114. package/lib/typescript/src/utils/getShadowStyle.d.ts.map +1 -0
  115. package/lib/typescript/src/utils/throttle.d.ts +2 -0
  116. package/lib/typescript/src/utils/throttle.d.ts.map +1 -0
  117. package/lib/typescript/src/utils/useCardAnimation.d.ts +1 -1
  118. package/lib/typescript/src/utils/useCardAnimation.d.ts.map +1 -1
  119. package/lib/typescript/src/utils/useGestureHandlerRef.d.ts +1 -1
  120. package/lib/typescript/src/utils/useGestureHandlerRef.d.ts.map +1 -1
  121. package/lib/typescript/src/utils/useKeyboardManager.d.ts +1 -1
  122. package/lib/typescript/src/utils/useKeyboardManager.d.ts.map +1 -1
  123. package/lib/typescript/src/views/GestureHandler.d.ts +3 -2
  124. package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -1
  125. package/lib/typescript/src/views/GestureHandler.kepler.d.ts +2 -0
  126. package/lib/typescript/src/views/GestureHandler.kepler.d.ts.map +1 -0
  127. package/lib/typescript/src/views/GestureHandlerNative.d.ts +4 -5
  128. package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
  129. package/lib/typescript/src/views/Header/Header.d.ts +1 -2
  130. package/lib/typescript/src/views/Header/Header.d.ts.map +1 -1
  131. package/lib/typescript/src/views/Header/HeaderContainer.d.ts +4 -5
  132. package/lib/typescript/src/views/Header/HeaderContainer.d.ts.map +1 -1
  133. package/lib/typescript/src/views/Header/HeaderSegment.d.ts +2 -2
  134. package/lib/typescript/src/views/Header/HeaderSegment.d.ts.map +1 -1
  135. package/lib/typescript/src/views/Screens.d.ts +7 -5
  136. package/lib/typescript/src/views/Screens.d.ts.map +1 -1
  137. package/lib/typescript/src/views/Stack/Card.d.ts +14 -42
  138. package/lib/typescript/src/views/Stack/Card.d.ts.map +1 -1
  139. package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts +15 -0
  140. package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts.map +1 -0
  141. package/lib/typescript/src/views/Stack/CardContainer.d.ts +6 -8
  142. package/lib/typescript/src/views/Stack/CardContainer.d.ts.map +1 -1
  143. package/lib/typescript/src/views/Stack/CardContent.d.ts +13 -0
  144. package/lib/typescript/src/views/Stack/CardContent.d.ts.map +1 -0
  145. package/lib/typescript/src/views/Stack/CardStack.d.ts +8 -7
  146. package/lib/typescript/src/views/Stack/CardStack.d.ts.map +1 -1
  147. package/lib/typescript/src/views/Stack/StackView.d.ts +10 -81
  148. package/lib/typescript/src/views/Stack/StackView.d.ts.map +1 -1
  149. package/oss-attribution/attribution.txt +76 -0
  150. package/oss-attribution/licenseInfos.json +27 -0
  151. package/package.json +105 -1
  152. package/src/TransitionConfigs/CardStyleInterpolators.tsx +72 -6
  153. package/src/TransitionConfigs/HeaderStyleInterpolators.tsx +43 -25
  154. package/src/TransitionConfigs/TransitionPresets.tsx +35 -5
  155. package/src/TransitionConfigs/TransitionSpecs.tsx +30 -2
  156. package/src/index.tsx +12 -7
  157. package/src/navigators/createStackNavigator.tsx +47 -63
  158. package/src/types.tsx +116 -24
  159. package/src/utils/CardAnimationContext.tsx +3 -3
  160. package/src/utils/GestureHandlerRefContext.tsx +2 -2
  161. package/src/utils/ModalPresentationContext.tsx +1 -3
  162. package/src/utils/conditional.tsx +1 -1
  163. package/src/utils/findLastIndex.tsx +2 -5
  164. package/src/utils/gestureActivationCriteria.tsx +70 -0
  165. package/src/utils/getDistanceForDirection.tsx +5 -4
  166. package/src/utils/getInvertedMultiplier.tsx +5 -6
  167. package/src/utils/getModalRoutesKeys.ts +21 -0
  168. package/src/utils/getShadowStyle.tsx +37 -0
  169. package/src/utils/throttle.tsx +16 -0
  170. package/src/utils/useCardAnimation.tsx +2 -2
  171. package/src/utils/useGestureHandlerRef.tsx +3 -3
  172. package/src/utils/useKeyboardManager.tsx +5 -7
  173. package/src/views/GestureHandler.kepler.tsx +1 -0
  174. package/src/views/GestureHandler.tsx +2 -2
  175. package/src/views/GestureHandlerNative.tsx +5 -5
  176. package/src/views/Header/Header.tsx +8 -7
  177. package/src/views/Header/HeaderContainer.tsx +23 -18
  178. package/src/views/Header/HeaderSegment.tsx +41 -43
  179. package/src/views/Screens.tsx +4 -2
  180. package/src/views/Stack/Card.tsx +480 -462
  181. package/src/views/Stack/CardA11yWrapper.tsx +67 -0
  182. package/src/views/Stack/CardContainer.tsx +127 -108
  183. package/src/views/Stack/CardContent.tsx +92 -0
  184. package/src/views/Stack/CardStack.tsx +375 -243
  185. package/src/views/Stack/StackView.tsx +73 -62
  186. package/SystemBundles/c55a41e7975f46f901d6afe3b0331d043bdbf1f54f96209de0215cf6f6fd5377.bundle +0 -28130
  187. package/SystemBundles/c55a41e7975f46f901d6afe3b0331d043bdbf1f54f96209de0215cf6f6fd5377.map +0 -8489
  188. package/SystemModules/amzn__react-navigation__stack-7.modules.txt +0 -95
  189. package/SystemModules/amzn__react-navigation__stack-7.private.modules.txt +0 -191
  190. package/THIRD_PARTY_NOTICES.txt +0 -24
  191. package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js +0 -353
  192. package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js.map +0 -1
  193. package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js +0 -259
  194. package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js.map +0 -1
  195. package/lib/commonjs/TransitionConfigs/TransitionPresets.js +0 -134
  196. package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +0 -1
  197. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js +0 -100
  198. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js.map +0 -1
  199. package/lib/commonjs/index.js +0 -69
  200. package/lib/commonjs/index.js.map +0 -1
  201. package/lib/commonjs/navigators/createStackNavigator.js +0 -82
  202. package/lib/commonjs/navigators/createStackNavigator.js.map +0 -1
  203. package/lib/commonjs/types.js +0 -6
  204. package/lib/commonjs/types.js.map +0 -1
  205. package/lib/commonjs/utils/CardAnimationContext.js +0 -11
  206. package/lib/commonjs/utils/CardAnimationContext.js.map +0 -1
  207. package/lib/commonjs/utils/GestureHandlerRefContext.js +0 -11
  208. package/lib/commonjs/utils/GestureHandlerRefContext.js.map +0 -1
  209. package/lib/commonjs/utils/ModalPresentationContext.js +0 -12
  210. package/lib/commonjs/utils/ModalPresentationContext.js.map +0 -1
  211. package/lib/commonjs/utils/conditional.js +0 -32
  212. package/lib/commonjs/utils/conditional.js.map +0 -1
  213. package/lib/commonjs/utils/debounce.js +0 -19
  214. package/lib/commonjs/utils/debounce.js.map +0 -1
  215. package/lib/commonjs/utils/findLastIndex.js +0 -15
  216. package/lib/commonjs/utils/findLastIndex.js.map +0 -1
  217. package/lib/commonjs/utils/getDistanceForDirection.js +0 -20
  218. package/lib/commonjs/utils/getDistanceForDirection.js.map +0 -1
  219. package/lib/commonjs/utils/getInvertedMultiplier.js +0 -20
  220. package/lib/commonjs/utils/getInvertedMultiplier.js.map +0 -1
  221. package/lib/commonjs/utils/memoize.js +0 -33
  222. package/lib/commonjs/utils/memoize.js.map +0 -1
  223. package/lib/commonjs/utils/useCardAnimation.js +0 -19
  224. package/lib/commonjs/utils/useCardAnimation.js.map +0 -1
  225. package/lib/commonjs/utils/useGestureHandlerRef.js +0 -19
  226. package/lib/commonjs/utils/useGestureHandlerRef.js.map +0 -1
  227. package/lib/commonjs/utils/useKeyboardManager.js +0 -96
  228. package/lib/commonjs/utils/useKeyboardManager.js.map +0 -1
  229. package/lib/commonjs/views/GestureHandler.android.js +0 -17
  230. package/lib/commonjs/views/GestureHandler.android.js.map +0 -1
  231. package/lib/commonjs/views/GestureHandler.ios.js +0 -17
  232. package/lib/commonjs/views/GestureHandler.ios.js.map +0 -1
  233. package/lib/commonjs/views/GestureHandler.js +0 -24
  234. package/lib/commonjs/views/GestureHandler.js.map +0 -1
  235. package/lib/commonjs/views/GestureHandlerNative.js +0 -34
  236. package/lib/commonjs/views/GestureHandlerNative.js.map +0 -1
  237. package/lib/commonjs/views/Header/Header.js +0 -61
  238. package/lib/commonjs/views/Header/Header.js.map +0 -1
  239. package/lib/commonjs/views/Header/HeaderContainer.js +0 -127
  240. package/lib/commonjs/views/Header/HeaderContainer.js.map +0 -1
  241. package/lib/commonjs/views/Header/HeaderSegment.js +0 -139
  242. package/lib/commonjs/views/Header/HeaderSegment.js.map +0 -1
  243. package/lib/commonjs/views/ModalStatusBarManager.js +0 -42
  244. package/lib/commonjs/views/ModalStatusBarManager.js.map +0 -1
  245. package/lib/commonjs/views/Screens.js +0 -44
  246. package/lib/commonjs/views/Screens.js.map +0 -1
  247. package/lib/commonjs/views/Stack/Card.js +0 -469
  248. package/lib/commonjs/views/Stack/Card.js.map +0 -1
  249. package/lib/commonjs/views/Stack/CardContainer.js +0 -259
  250. package/lib/commonjs/views/Stack/CardContainer.js.map +0 -1
  251. package/lib/commonjs/views/Stack/CardSheet.js +0 -54
  252. package/lib/commonjs/views/Stack/CardSheet.js.map +0 -1
  253. package/lib/commonjs/views/Stack/CardStack.js +0 -443
  254. package/lib/commonjs/views/Stack/CardStack.js.map +0 -1
  255. package/lib/commonjs/views/Stack/StackView.js +0 -333
  256. package/lib/commonjs/views/Stack/StackView.js.map +0 -1
  257. package/lib/module/utils/debounce.js.map +0 -1
  258. package/lib/module/utils/memoize.js +0 -27
  259. package/lib/module/utils/memoize.js.map +0 -1
  260. package/lib/module/views/ModalStatusBarManager.js +0 -34
  261. package/lib/module/views/ModalStatusBarManager.js.map +0 -1
  262. package/lib/module/views/Stack/CardSheet.js +0 -46
  263. package/lib/module/views/Stack/CardSheet.js.map +0 -1
  264. package/lib/typescript/src/utils/debounce.d.ts +0 -2
  265. package/lib/typescript/src/utils/debounce.d.ts.map +0 -1
  266. package/lib/typescript/src/utils/memoize.d.ts +0 -2
  267. package/lib/typescript/src/utils/memoize.d.ts.map +0 -1
  268. package/lib/typescript/src/views/ModalStatusBarManager.d.ts +0 -12
  269. package/lib/typescript/src/views/ModalStatusBarManager.d.ts.map +0 -1
  270. package/lib/typescript/src/views/Stack/CardSheet.d.ts +0 -15
  271. package/lib/typescript/src/views/Stack/CardSheet.d.ts.map +0 -1
  272. package/src/utils/debounce.tsx +0 -17
  273. package/src/utils/memoize.tsx +0 -33
  274. package/src/views/ModalStatusBarManager.tsx +0 -50
  275. package/src/views/Stack/CardSheet.tsx +0 -61
package/package.json CHANGED
@@ -1 +1,105 @@
1
- {"name": "@amazon-devices/react-navigation__stack", "description": "Stack navigator component for iOS and Android with animated transitions and gestures", "version": "7.0.9000000000", "keywords": ["react-native-component", "react-component", "react-native", "react-navigation", "ios", "android", "stack"], "license": "See license in LICENSE", "repository": {"type": "git", "url": "https://github.com/react-navigation/react-navigation.git", "directory": "packages/stack"}, "bugs": {"url": "https://github.com/react-navigation/react-navigation/issues"}, "homepage": "https://reactnavigation.org/docs/stack-navigator/", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "source": "src/index.tsx", "module": "lib/module/index.js", "types": "lib/typescript/src/index.d.ts", "files": ["src", "lib", "!**/__tests__", "kepler-compatibility.json", "SystemModules", "SystemBundles", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "sideEffects": false, "kepler": {"temporary-alias-for-package": {"name": "@react-navigation/stack", "version": "6.3.19"}}, "publishConfig": {"access": "public"}, "scripts": {"clean": "del lib"}, "dependencies": {"@amazon-devices/react-navigation__elements": "^7.0.0", "color": "4.2.3", "warn-once": "0.1.0"}, "devDependencies": {"@amazon-devices/react-native-kepler": "^2.0.0+rn0.72.0", "@amazon-devices/react-navigation__native": "^7.0.0", "@testing-library/react-native": "11.5.0", "@types/color": "3.0.2", "@types/jest": "26.0.15", "@types/react": "17.0.2", "@types/react-native": "0.72.5", "del-cli": "5.0.0", "react-native-builder-bob": "0.20.4", "react-native-gesture-handler": "~2.13.0", "@amazon-devices/react-native-safe-area-context": "^2.0.0+3.2.0", "@amazon-devices/react-native-screens": "^2.0.0+3.25.0", "typescript": "4.9.4"}, "peerDependencies": {"@amazon-devices/react-native-kepler": "^2.0.0+rn0.72.0", "@amazon-devices/react-navigation__native": "^7.0.0", "react": "*", "react-native": "*", "react-native-gesture-handler": ">= 2.0.0", "@amazon-devices/react-native-safe-area-context": "^2.0.0+3.2.0", "@amazon-devices/react-native-screens": "^2.0.0+3.25.0"}, "react-native-builder-bob": {"source": "src", "output": "lib", "targets": ["commonjs", "module", ["typescript", {"project": "tsconfig.build.json"}]]}}
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
- ? progress.interpolate({
160
- inputRange: [0, 1, 1.0001, 2],
161
- outputRange: [0, 0, hasNotchIos ? 38 : 0, 10],
162
- })
163
- : 10;
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, I18nManager } from 'react-native';
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 = 27;
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: progress.interpolate({
63
- inputRange: [0, 1, 2],
64
- outputRange: I18nManager.getConstants().isRTL
65
- ? [-rightOffset, 0, leftLabelOffset]
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.4, 1, 1.5],
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: progress.interpolate({
85
- inputRange: [0.5, 1, 2],
86
- outputRange: I18nManager.getConstants().isRTL
87
- ? [-titleLeftOffset, 0, rightOffset]
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: progress.interpolate({
97
- inputRange: [0, 1, 2],
98
- outputRange: I18nManager.getConstants().isRTL
99
- ? [-layouts.screen.width, 0, layouts.screen.width]
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: I18nManager.getConstants().isRTL
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: I18nManager.getConstants().isRTL
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 >= ANDROID_VERSION_10
139
- ? ScaleFromCenterAndroid
140
- : Platform.Version >= ANDROID_VERSION_PIE
141
- ? RevealFromBottomAndroid
142
- : FadeFromBottomAndroid,
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.35, 0.45, 0, 1),
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.35, 0.45, 0, 1),
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 { default as createStackNavigator } from './navigators/createStackNavigator';
9
+ export { createStackNavigator } from './navigators/createStackNavigator';
10
10
 
11
11
  /**
12
12
  * Views
13
13
  */
14
- export { default as Header } from './views/Header/Header';
15
- export { default as StackView } from './views/Stack/StackView';
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 { default as CardAnimationContext } from './utils/CardAnimationContext';
31
- export { default as GestureHandlerRefContext } from './utils/GestureHandlerRefContext';
32
- export { default as useCardAnimation } from './utils/useCardAnimation';
33
- export { default as useGestureHandlerRef } from './utils/useGestureHandlerRef';
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';