@amazon-devices/react-navigation__stack 2.0.1758683737

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 (242) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +5 -0
  3. package/SystemBundles/ed2637c0b74cd42ce066fca701acc5cb0850978c5296fae5bd715d5e4c67b128.bundle +29321 -0
  4. package/SystemBundles/ed2637c0b74cd42ce066fca701acc5cb0850978c5296fae5bd715d5e4c67b128.map +1 -0
  5. package/SystemModules/amzn__react-navigation__stack-2.modules.txt +95 -0
  6. package/SystemModules/amzn__react-navigation__stack-2.private.modules.txt +258 -0
  7. package/SystemModules/keplerscript-system-bundle-config.json +7 -0
  8. package/THIRD_PARTY_NOTICES.txt +24 -0
  9. package/kepler-compatibility.json +8 -0
  10. package/kepler-transformed-package-info.json +3 -0
  11. package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js +353 -0
  12. package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js.map +1 -0
  13. package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js +259 -0
  14. package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -0
  15. package/lib/commonjs/TransitionConfigs/TransitionPresets.js +134 -0
  16. package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +1 -0
  17. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js +100 -0
  18. package/lib/commonjs/TransitionConfigs/TransitionSpecs.js.map +1 -0
  19. package/lib/commonjs/index.js +69 -0
  20. package/lib/commonjs/index.js.map +1 -0
  21. package/lib/commonjs/navigators/createStackNavigator.js +82 -0
  22. package/lib/commonjs/navigators/createStackNavigator.js.map +1 -0
  23. package/lib/commonjs/types.js +6 -0
  24. package/lib/commonjs/types.js.map +1 -0
  25. package/lib/commonjs/utils/CardAnimationContext.js +11 -0
  26. package/lib/commonjs/utils/CardAnimationContext.js.map +1 -0
  27. package/lib/commonjs/utils/GestureHandlerRefContext.js +11 -0
  28. package/lib/commonjs/utils/GestureHandlerRefContext.js.map +1 -0
  29. package/lib/commonjs/utils/ModalPresentationContext.js +12 -0
  30. package/lib/commonjs/utils/ModalPresentationContext.js.map +1 -0
  31. package/lib/commonjs/utils/conditional.js +32 -0
  32. package/lib/commonjs/utils/conditional.js.map +1 -0
  33. package/lib/commonjs/utils/debounce.js +19 -0
  34. package/lib/commonjs/utils/debounce.js.map +1 -0
  35. package/lib/commonjs/utils/findLastIndex.js +15 -0
  36. package/lib/commonjs/utils/findLastIndex.js.map +1 -0
  37. package/lib/commonjs/utils/getDistanceForDirection.js +20 -0
  38. package/lib/commonjs/utils/getDistanceForDirection.js.map +1 -0
  39. package/lib/commonjs/utils/getInvertedMultiplier.js +20 -0
  40. package/lib/commonjs/utils/getInvertedMultiplier.js.map +1 -0
  41. package/lib/commonjs/utils/memoize.js +33 -0
  42. package/lib/commonjs/utils/memoize.js.map +1 -0
  43. package/lib/commonjs/utils/useCardAnimation.js +19 -0
  44. package/lib/commonjs/utils/useCardAnimation.js.map +1 -0
  45. package/lib/commonjs/utils/useGestureHandlerRef.js +19 -0
  46. package/lib/commonjs/utils/useGestureHandlerRef.js.map +1 -0
  47. package/lib/commonjs/utils/useKeyboardManager.js +96 -0
  48. package/lib/commonjs/utils/useKeyboardManager.js.map +1 -0
  49. package/lib/commonjs/views/GestureHandler.android.js +17 -0
  50. package/lib/commonjs/views/GestureHandler.android.js.map +1 -0
  51. package/lib/commonjs/views/GestureHandler.ios.js +17 -0
  52. package/lib/commonjs/views/GestureHandler.ios.js.map +1 -0
  53. package/lib/commonjs/views/GestureHandler.js +24 -0
  54. package/lib/commonjs/views/GestureHandler.js.map +1 -0
  55. package/lib/commonjs/views/GestureHandlerNative.js +34 -0
  56. package/lib/commonjs/views/GestureHandlerNative.js.map +1 -0
  57. package/lib/commonjs/views/Header/Header.js +61 -0
  58. package/lib/commonjs/views/Header/Header.js.map +1 -0
  59. package/lib/commonjs/views/Header/HeaderContainer.js +127 -0
  60. package/lib/commonjs/views/Header/HeaderContainer.js.map +1 -0
  61. package/lib/commonjs/views/Header/HeaderSegment.js +139 -0
  62. package/lib/commonjs/views/Header/HeaderSegment.js.map +1 -0
  63. package/lib/commonjs/views/ModalStatusBarManager.js +42 -0
  64. package/lib/commonjs/views/ModalStatusBarManager.js.map +1 -0
  65. package/lib/commonjs/views/Screens.js +44 -0
  66. package/lib/commonjs/views/Screens.js.map +1 -0
  67. package/lib/commonjs/views/Stack/Card.js +469 -0
  68. package/lib/commonjs/views/Stack/Card.js.map +1 -0
  69. package/lib/commonjs/views/Stack/CardContainer.js +259 -0
  70. package/lib/commonjs/views/Stack/CardContainer.js.map +1 -0
  71. package/lib/commonjs/views/Stack/CardSheet.js +54 -0
  72. package/lib/commonjs/views/Stack/CardSheet.js.map +1 -0
  73. package/lib/commonjs/views/Stack/CardStack.js +442 -0
  74. package/lib/commonjs/views/Stack/CardStack.js.map +1 -0
  75. package/lib/commonjs/views/Stack/StackView.js +333 -0
  76. package/lib/commonjs/views/Stack/StackView.js.map +1 -0
  77. package/lib/module/TransitionConfigs/CardStyleInterpolators.js +338 -0
  78. package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -0
  79. package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js +248 -0
  80. package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -0
  81. package/lib/module/TransitionConfigs/TransitionPresets.js +128 -0
  82. package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -0
  83. package/lib/module/TransitionConfigs/TransitionSpecs.js +94 -0
  84. package/lib/module/TransitionConfigs/TransitionSpecs.js.map +1 -0
  85. package/lib/module/index.js +33 -0
  86. package/lib/module/index.js.map +1 -0
  87. package/lib/module/navigators/createStackNavigator.js +73 -0
  88. package/lib/module/navigators/createStackNavigator.js.map +1 -0
  89. package/lib/module/types.js +2 -0
  90. package/lib/module/types.js.map +1 -0
  91. package/lib/module/utils/CardAnimationContext.js +3 -0
  92. package/lib/module/utils/CardAnimationContext.js.map +1 -0
  93. package/lib/module/utils/GestureHandlerRefContext.js +3 -0
  94. package/lib/module/utils/GestureHandlerRefContext.js.map +1 -0
  95. package/lib/module/utils/ModalPresentationContext.js +4 -0
  96. package/lib/module/utils/ModalPresentationContext.js.map +1 -0
  97. package/lib/module/utils/conditional.js +26 -0
  98. package/lib/module/utils/conditional.js.map +1 -0
  99. package/lib/module/utils/debounce.js +13 -0
  100. package/lib/module/utils/debounce.js.map +1 -0
  101. package/lib/module/utils/findLastIndex.js +9 -0
  102. package/lib/module/utils/findLastIndex.js.map +1 -0
  103. package/lib/module/utils/getDistanceForDirection.js +13 -0
  104. package/lib/module/utils/getDistanceForDirection.js.map +1 -0
  105. package/lib/module/utils/getInvertedMultiplier.js +14 -0
  106. package/lib/module/utils/getInvertedMultiplier.js.map +1 -0
  107. package/lib/module/utils/memoize.js +27 -0
  108. package/lib/module/utils/memoize.js.map +1 -0
  109. package/lib/module/utils/useCardAnimation.js +10 -0
  110. package/lib/module/utils/useCardAnimation.js.map +1 -0
  111. package/lib/module/utils/useGestureHandlerRef.js +10 -0
  112. package/lib/module/utils/useGestureHandlerRef.js.map +1 -0
  113. package/lib/module/utils/useKeyboardManager.js +88 -0
  114. package/lib/module/utils/useKeyboardManager.js.map +1 -0
  115. package/lib/module/views/GestureHandler.android.js +2 -0
  116. package/lib/module/views/GestureHandler.android.js.map +1 -0
  117. package/lib/module/views/GestureHandler.ios.js +2 -0
  118. package/lib/module/views/GestureHandler.ios.js.map +1 -0
  119. package/lib/module/views/GestureHandler.js +16 -0
  120. package/lib/module/views/GestureHandler.js.map +1 -0
  121. package/lib/module/views/GestureHandlerNative.js +14 -0
  122. package/lib/module/views/GestureHandlerNative.js.map +1 -0
  123. package/lib/module/views/Header/Header.js +52 -0
  124. package/lib/module/views/Header/Header.js.map +1 -0
  125. package/lib/module/views/Header/HeaderContainer.js +118 -0
  126. package/lib/module/views/Header/HeaderContainer.js.map +1 -0
  127. package/lib/module/views/Header/HeaderSegment.js +130 -0
  128. package/lib/module/views/Header/HeaderSegment.js.map +1 -0
  129. package/lib/module/views/ModalStatusBarManager.js +34 -0
  130. package/lib/module/views/ModalStatusBarManager.js.map +1 -0
  131. package/lib/module/views/Screens.js +34 -0
  132. package/lib/module/views/Screens.js.map +1 -0
  133. package/lib/module/views/Stack/Card.js +458 -0
  134. package/lib/module/views/Stack/Card.js.map +1 -0
  135. package/lib/module/views/Stack/CardContainer.js +250 -0
  136. package/lib/module/views/Stack/CardContainer.js.map +1 -0
  137. package/lib/module/views/Stack/CardSheet.js +46 -0
  138. package/lib/module/views/Stack/CardSheet.js.map +1 -0
  139. package/lib/module/views/Stack/CardStack.js +432 -0
  140. package/lib/module/views/Stack/CardStack.js.map +1 -0
  141. package/lib/module/views/Stack/StackView.js +323 -0
  142. package/lib/module/views/Stack/StackView.js.map +1 -0
  143. package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts +35 -0
  144. package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts.map +1 -0
  145. package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts +23 -0
  146. package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -0
  147. package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts +42 -0
  148. package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts.map +1 -0
  149. package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts +36 -0
  150. package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts.map +1 -0
  151. package/lib/typescript/src/index.d.ts +29 -0
  152. package/lib/typescript/src/index.d.ts.map +1 -0
  153. package/lib/typescript/src/navigators/createStackNavigator.d.ts +8 -0
  154. package/lib/typescript/src/navigators/createStackNavigator.d.ts.map +1 -0
  155. package/lib/typescript/src/types.d.ts +481 -0
  156. package/lib/typescript/src/types.d.ts.map +1 -0
  157. package/lib/typescript/src/utils/CardAnimationContext.d.ts +5 -0
  158. package/lib/typescript/src/utils/CardAnimationContext.d.ts.map +1 -0
  159. package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts +4 -0
  160. package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts.map +1 -0
  161. package/lib/typescript/src/utils/ModalPresentationContext.d.ts +4 -0
  162. package/lib/typescript/src/utils/ModalPresentationContext.d.ts.map +1 -0
  163. package/lib/typescript/src/utils/conditional.d.ts +10 -0
  164. package/lib/typescript/src/utils/conditional.d.ts.map +1 -0
  165. package/lib/typescript/src/utils/debounce.d.ts +2 -0
  166. package/lib/typescript/src/utils/debounce.d.ts.map +1 -0
  167. package/lib/typescript/src/utils/findLastIndex.d.ts +2 -0
  168. package/lib/typescript/src/utils/findLastIndex.d.ts.map +1 -0
  169. package/lib/typescript/src/utils/getDistanceForDirection.d.ts +3 -0
  170. package/lib/typescript/src/utils/getDistanceForDirection.d.ts.map +1 -0
  171. package/lib/typescript/src/utils/getInvertedMultiplier.d.ts +3 -0
  172. package/lib/typescript/src/utils/getInvertedMultiplier.d.ts.map +1 -0
  173. package/lib/typescript/src/utils/memoize.d.ts +2 -0
  174. package/lib/typescript/src/utils/memoize.d.ts.map +1 -0
  175. package/lib/typescript/src/utils/useCardAnimation.d.ts +2 -0
  176. package/lib/typescript/src/utils/useCardAnimation.d.ts.map +1 -0
  177. package/lib/typescript/src/utils/useGestureHandlerRef.d.ts +3 -0
  178. package/lib/typescript/src/utils/useGestureHandlerRef.d.ts.map +1 -0
  179. package/lib/typescript/src/utils/useKeyboardManager.d.ts +6 -0
  180. package/lib/typescript/src/utils/useKeyboardManager.d.ts.map +1 -0
  181. package/lib/typescript/src/views/GestureHandler.android.d.ts +2 -0
  182. package/lib/typescript/src/views/GestureHandler.android.d.ts.map +1 -0
  183. package/lib/typescript/src/views/GestureHandler.d.ts +14 -0
  184. package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -0
  185. package/lib/typescript/src/views/GestureHandler.ios.d.ts +2 -0
  186. package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -0
  187. package/lib/typescript/src/views/GestureHandlerNative.d.ts +6 -0
  188. package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -0
  189. package/lib/typescript/src/views/Header/Header.d.ts +5 -0
  190. package/lib/typescript/src/views/Header/Header.d.ts.map +1 -0
  191. package/lib/typescript/src/views/Header/HeaderContainer.d.ts +20 -0
  192. package/lib/typescript/src/views/Header/HeaderContainer.d.ts.map +1 -0
  193. package/lib/typescript/src/views/Header/HeaderSegment.d.ts +14 -0
  194. package/lib/typescript/src/views/Header/HeaderSegment.d.ts.map +1 -0
  195. package/lib/typescript/src/views/ModalStatusBarManager.d.ts +12 -0
  196. package/lib/typescript/src/views/ModalStatusBarManager.d.ts.map +1 -0
  197. package/lib/typescript/src/views/Screens.d.ts +13 -0
  198. package/lib/typescript/src/views/Screens.d.ts.map +1 -0
  199. package/lib/typescript/src/views/Stack/Card.d.ts +76 -0
  200. package/lib/typescript/src/views/Stack/Card.d.ts.map +1 -0
  201. package/lib/typescript/src/views/Stack/CardContainer.d.ts +63 -0
  202. package/lib/typescript/src/views/Stack/CardContainer.d.ts.map +1 -0
  203. package/lib/typescript/src/views/Stack/CardSheet.d.ts +15 -0
  204. package/lib/typescript/src/views/Stack/CardSheet.d.ts.map +1 -0
  205. package/lib/typescript/src/views/Stack/CardStack.d.ts +67 -0
  206. package/lib/typescript/src/views/Stack/CardStack.d.ts.map +1 -0
  207. package/lib/typescript/src/views/Stack/StackView.d.ts +122 -0
  208. package/lib/typescript/src/views/Stack/StackView.d.ts.map +1 -0
  209. package/package.json +1 -0
  210. package/src/TransitionConfigs/CardStyleInterpolators.tsx +394 -0
  211. package/src/TransitionConfigs/HeaderStyleInterpolators.tsx +268 -0
  212. package/src/TransitionConfigs/TransitionPresets.tsx +152 -0
  213. package/src/TransitionConfigs/TransitionSpecs.tsx +96 -0
  214. package/src/index.tsx +51 -0
  215. package/src/navigators/createStackNavigator.tsx +136 -0
  216. package/src/types.tsx +547 -0
  217. package/src/utils/CardAnimationContext.tsx +7 -0
  218. package/src/utils/GestureHandlerRefContext.tsx +5 -0
  219. package/src/utils/ModalPresentationContext.tsx +5 -0
  220. package/src/utils/conditional.tsx +33 -0
  221. package/src/utils/debounce.tsx +17 -0
  222. package/src/utils/findLastIndex.tsx +12 -0
  223. package/src/utils/getDistanceForDirection.tsx +18 -0
  224. package/src/utils/getInvertedMultiplier.tsx +18 -0
  225. package/src/utils/memoize.tsx +33 -0
  226. package/src/utils/useCardAnimation.tsx +15 -0
  227. package/src/utils/useGestureHandlerRef.tsx +15 -0
  228. package/src/utils/useKeyboardManager.tsx +105 -0
  229. package/src/views/GestureHandler.android.tsx +1 -0
  230. package/src/views/GestureHandler.ios.tsx +1 -0
  231. package/src/views/GestureHandler.tsx +23 -0
  232. package/src/views/GestureHandlerNative.tsx +23 -0
  233. package/src/views/Header/Header.tsx +72 -0
  234. package/src/views/Header/HeaderContainer.tsx +186 -0
  235. package/src/views/Header/HeaderSegment.tsx +205 -0
  236. package/src/views/ModalStatusBarManager.tsx +50 -0
  237. package/src/views/Screens.tsx +43 -0
  238. package/src/views/Stack/Card.tsx +628 -0
  239. package/src/views/Stack/CardContainer.tsx +320 -0
  240. package/src/views/Stack/CardSheet.tsx +61 -0
  241. package/src/views/Stack/CardStack.tsx +717 -0
  242. package/src/views/Stack/StackView.tsx +474 -0
@@ -0,0 +1,323 @@
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 { HeaderShownContext, SafeAreaProviderCompat } from '@amazon-devices/react-navigation__elements';
3
+ import { StackActions } from '@amazon-devices/react-navigation__native';
4
+ import * as React from 'react';
5
+ import { StyleSheet, View } from 'react-native';
6
+ import { SafeAreaInsetsContext } from '@amazon-devices/react-native-safe-area-context';
7
+ import ModalPresentationContext from '../../utils/ModalPresentationContext';
8
+ import { GestureHandlerRootView } from '../GestureHandler';
9
+ import HeaderContainer from '../Header/HeaderContainer';
10
+ import CardStack from './CardStack';
11
+ const GestureHandlerWrapper = GestureHandlerRootView ?? View;
12
+
13
+ /**
14
+ * Compare two arrays with primitive values as the content.
15
+ * We need to make sure that both values and order match.
16
+ */
17
+ const isArrayEqual = (a, b) => a.length === b.length && a.every((it, index) => it === b[index]);
18
+ export default class StackView extends React.Component {
19
+ static getDerivedStateFromProps(props, state) {
20
+ // If there was no change in routes, we don't need to compute anything
21
+ if ((props.state.routes === state.previousRoutes || isArrayEqual(props.state.routes.map(r => r.key), state.previousRoutes.map(r => r.key))) && state.routes.length) {
22
+ let routes = state.routes;
23
+ let previousRoutes = state.previousRoutes;
24
+ let descriptors = props.descriptors;
25
+ let previousDescriptors = state.previousDescriptors;
26
+ if (props.descriptors !== state.previousDescriptors) {
27
+ descriptors = state.routes.reduce((acc, route) => {
28
+ acc[route.key] = props.descriptors[route.key] || state.descriptors[route.key];
29
+ return acc;
30
+ }, {});
31
+ previousDescriptors = props.descriptors;
32
+ }
33
+ if (props.state.routes !== state.previousRoutes) {
34
+ // if any route objects have changed, we should update them
35
+ const map = props.state.routes.reduce((acc, route) => {
36
+ acc[route.key] = route;
37
+ return acc;
38
+ }, {});
39
+ routes = state.routes.map(route => map[route.key] || route);
40
+ previousRoutes = props.state.routes;
41
+ }
42
+ return {
43
+ routes,
44
+ previousRoutes,
45
+ descriptors,
46
+ previousDescriptors
47
+ };
48
+ }
49
+
50
+ // Here we determine which routes were added or removed to animate them
51
+ // We keep a copy of the route being removed in local state to be able to animate it
52
+
53
+ let routes = props.state.index < props.state.routes.length - 1 ?
54
+ // Remove any extra routes from the state
55
+ // The last visible route should be the focused route, i.e. at current index
56
+ props.state.routes.slice(0, props.state.index + 1) : props.state.routes;
57
+
58
+ // Now we need to determine which routes were added and removed
59
+ let {
60
+ openingRouteKeys,
61
+ closingRouteKeys,
62
+ replacingRouteKeys,
63
+ previousRoutes
64
+ } = state;
65
+ const previousFocusedRoute = previousRoutes[previousRoutes.length - 1];
66
+ const nextFocusedRoute = routes[routes.length - 1];
67
+ const isAnimationEnabled = key => {
68
+ const descriptor = props.descriptors[key] || state.descriptors[key];
69
+ return descriptor ? descriptor.options.animationEnabled !== false : true;
70
+ };
71
+ const getAnimationTypeForReplace = key => {
72
+ const descriptor = props.descriptors[key] || state.descriptors[key];
73
+ return descriptor.options.animationTypeForReplace ?? 'push';
74
+ };
75
+ if (previousFocusedRoute && previousFocusedRoute.key !== nextFocusedRoute.key) {
76
+ // We only need to animate routes if the focused route changed
77
+ // Animating previous routes won't be visible coz the focused route is on top of everything
78
+
79
+ if (!previousRoutes.some(r => r.key === nextFocusedRoute.key)) {
80
+ // A new route has come to the focus, we treat this as a push
81
+ // A replace can also trigger this, the animation should look like push
82
+
83
+ if (isAnimationEnabled(nextFocusedRoute.key) && !openingRouteKeys.includes(nextFocusedRoute.key)) {
84
+ // In this case, we need to animate pushing the focused route
85
+ // We don't care about animating any other added routes because they won't be visible
86
+ openingRouteKeys = [...openingRouteKeys, nextFocusedRoute.key];
87
+ closingRouteKeys = closingRouteKeys.filter(key => key !== nextFocusedRoute.key);
88
+ replacingRouteKeys = replacingRouteKeys.filter(key => key !== nextFocusedRoute.key);
89
+ if (!routes.some(r => r.key === previousFocusedRoute.key)) {
90
+ // The previous focused route isn't present in state, we treat this as a replace
91
+
92
+ openingRouteKeys = openingRouteKeys.filter(key => key !== previousFocusedRoute.key);
93
+ if (getAnimationTypeForReplace(nextFocusedRoute.key) === 'pop') {
94
+ closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];
95
+
96
+ // By default, new routes have a push animation, so we add it to `openingRouteKeys` before
97
+ // But since user configured it to animate the old screen like a pop, we need to add this without animation
98
+ // So remove it from `openingRouteKeys` which will remove the animation
99
+ openingRouteKeys = openingRouteKeys.filter(key => key !== nextFocusedRoute.key);
100
+
101
+ // Keep the route being removed at the end to animate it out
102
+ routes = [...routes, previousFocusedRoute];
103
+ } else {
104
+ replacingRouteKeys = [...replacingRouteKeys, previousFocusedRoute.key];
105
+ closingRouteKeys = closingRouteKeys.filter(key => key !== previousFocusedRoute.key);
106
+
107
+ // Keep the old route in the state because it's visible under the new route, and removing it will feel abrupt
108
+ // We need to insert it just before the focused one (the route being pushed)
109
+ // After the push animation is completed, routes being replaced will be removed completely
110
+ routes = routes.slice();
111
+ routes.splice(routes.length - 1, 0, previousFocusedRoute);
112
+ }
113
+ }
114
+ }
115
+ } else if (!routes.some(r => r.key === previousFocusedRoute.key)) {
116
+ // The previously focused route was removed, we treat this as a pop
117
+
118
+ if (isAnimationEnabled(previousFocusedRoute.key) && !closingRouteKeys.includes(previousFocusedRoute.key)) {
119
+ closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];
120
+
121
+ // Sometimes a route can be closed before the opening animation finishes
122
+ // So we also need to remove it from the opening list
123
+ openingRouteKeys = openingRouteKeys.filter(key => key !== previousFocusedRoute.key);
124
+ replacingRouteKeys = replacingRouteKeys.filter(key => key !== previousFocusedRoute.key);
125
+
126
+ // Keep a copy of route being removed in the state to be able to animate it
127
+ routes = [...routes, previousFocusedRoute];
128
+ }
129
+ } else {
130
+ // Looks like some routes were re-arranged and no focused routes were added/removed
131
+ // i.e. the currently focused route already existed and the previously focused route still exists
132
+ // We don't know how to animate this
133
+ }
134
+ } else if (replacingRouteKeys.length || closingRouteKeys.length) {
135
+ // Keep the routes we are closing or replacing if animation is enabled for them
136
+ routes = routes.slice();
137
+ routes.splice(routes.length - 1, 0, ...state.routes.filter(({
138
+ key
139
+ }) => isAnimationEnabled(key) ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key) : false));
140
+ }
141
+ if (!routes.length) {
142
+ throw new Error('There should always be at least one route in the navigation state.');
143
+ }
144
+ const descriptors = routes.reduce((acc, route) => {
145
+ acc[route.key] = props.descriptors[route.key] || state.descriptors[route.key];
146
+ return acc;
147
+ }, {});
148
+ return {
149
+ routes,
150
+ previousRoutes: props.state.routes,
151
+ previousDescriptors: props.descriptors,
152
+ openingRouteKeys,
153
+ closingRouteKeys,
154
+ replacingRouteKeys,
155
+ descriptors
156
+ };
157
+ }
158
+ state = {
159
+ routes: [],
160
+ previousRoutes: [],
161
+ previousDescriptors: {},
162
+ openingRouteKeys: [],
163
+ closingRouteKeys: [],
164
+ replacingRouteKeys: [],
165
+ descriptors: {}
166
+ };
167
+ getPreviousRoute = ({
168
+ route
169
+ }) => {
170
+ const {
171
+ closingRouteKeys,
172
+ replacingRouteKeys
173
+ } = this.state;
174
+ const routes = this.state.routes.filter(r => r.key === route.key || !closingRouteKeys.includes(r.key) && !replacingRouteKeys.includes(r.key));
175
+ const index = routes.findIndex(r => r.key === route.key);
176
+ return routes[index - 1];
177
+ };
178
+ renderScene = ({
179
+ route
180
+ }) => {
181
+ const descriptor = this.state.descriptors[route.key] || this.props.descriptors[route.key];
182
+ if (!descriptor) {
183
+ return null;
184
+ }
185
+ return descriptor.render();
186
+ };
187
+ renderHeader = props => {
188
+ return /*#__PURE__*/React.createElement(HeaderContainer, props);
189
+ };
190
+ handleOpenRoute = ({
191
+ route
192
+ }) => {
193
+ const {
194
+ state,
195
+ navigation
196
+ } = this.props;
197
+ const {
198
+ closingRouteKeys,
199
+ replacingRouteKeys
200
+ } = this.state;
201
+ if (closingRouteKeys.some(key => key === route.key) && replacingRouteKeys.every(key => key !== route.key) && state.routeNames.includes(route.name) && !state.routes.some(r => r.key === route.key)) {
202
+ // If route isn't present in current state, but was closing, assume that a close animation was cancelled
203
+ // So we need to add this route back to the state
204
+ navigation.navigate(route);
205
+ } else {
206
+ this.setState(state => ({
207
+ routes: state.replacingRouteKeys.length ? state.routes.filter(r => !state.replacingRouteKeys.includes(r.key)) : state.routes,
208
+ openingRouteKeys: state.openingRouteKeys.filter(key => key !== route.key),
209
+ closingRouteKeys: state.closingRouteKeys.filter(key => key !== route.key),
210
+ replacingRouteKeys: []
211
+ }));
212
+ }
213
+ };
214
+ handleCloseRoute = ({
215
+ route
216
+ }) => {
217
+ const {
218
+ state,
219
+ navigation
220
+ } = this.props;
221
+ if (state.routes.some(r => r.key === route.key)) {
222
+ // If a route exists in state, trigger a pop
223
+ // This will happen in when the route was closed from the card component
224
+ // e.g. When the close animation triggered from a gesture ends
225
+ navigation.dispatch({
226
+ ...StackActions.pop(),
227
+ source: route.key,
228
+ target: state.key
229
+ });
230
+ } else {
231
+ // We need to clean up any state tracking the route and pop it immediately
232
+ this.setState(state => ({
233
+ routes: state.routes.filter(r => r.key !== route.key),
234
+ openingRouteKeys: state.openingRouteKeys.filter(key => key !== route.key),
235
+ closingRouteKeys: state.closingRouteKeys.filter(key => key !== route.key)
236
+ }));
237
+ }
238
+ };
239
+ handleTransitionStart = ({
240
+ route
241
+ }, closing) => this.props.navigation.emit({
242
+ type: 'transitionStart',
243
+ data: {
244
+ closing
245
+ },
246
+ target: route.key
247
+ });
248
+ handleTransitionEnd = ({
249
+ route
250
+ }, closing) => this.props.navigation.emit({
251
+ type: 'transitionEnd',
252
+ data: {
253
+ closing
254
+ },
255
+ target: route.key
256
+ });
257
+ handleGestureStart = ({
258
+ route
259
+ }) => {
260
+ this.props.navigation.emit({
261
+ type: 'gestureStart',
262
+ target: route.key
263
+ });
264
+ };
265
+ handleGestureEnd = ({
266
+ route
267
+ }) => {
268
+ this.props.navigation.emit({
269
+ type: 'gestureEnd',
270
+ target: route.key
271
+ });
272
+ };
273
+ handleGestureCancel = ({
274
+ route
275
+ }) => {
276
+ this.props.navigation.emit({
277
+ type: 'gestureCancel',
278
+ target: route.key
279
+ });
280
+ };
281
+ render() {
282
+ const {
283
+ state,
284
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
285
+ descriptors: _,
286
+ ...rest
287
+ } = this.props;
288
+ const {
289
+ routes,
290
+ descriptors,
291
+ openingRouteKeys,
292
+ closingRouteKeys
293
+ } = this.state;
294
+ return /*#__PURE__*/React.createElement(GestureHandlerWrapper, {
295
+ style: styles.container
296
+ }, /*#__PURE__*/React.createElement(SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, insets => /*#__PURE__*/React.createElement(ModalPresentationContext.Consumer, null, isParentModal => /*#__PURE__*/React.createElement(HeaderShownContext.Consumer, null, isParentHeaderShown => /*#__PURE__*/React.createElement(CardStack, _extends({
297
+ insets: insets,
298
+ isParentHeaderShown: isParentHeaderShown,
299
+ isParentModal: isParentModal,
300
+ getPreviousRoute: this.getPreviousRoute,
301
+ routes: routes,
302
+ openingRouteKeys: openingRouteKeys,
303
+ closingRouteKeys: closingRouteKeys,
304
+ onOpenRoute: this.handleOpenRoute,
305
+ onCloseRoute: this.handleCloseRoute,
306
+ onTransitionStart: this.handleTransitionStart,
307
+ onTransitionEnd: this.handleTransitionEnd,
308
+ renderHeader: this.renderHeader,
309
+ renderScene: this.renderScene,
310
+ state: state,
311
+ descriptors: descriptors,
312
+ onGestureStart: this.handleGestureStart,
313
+ onGestureEnd: this.handleGestureEnd,
314
+ onGestureCancel: this.handleGestureCancel
315
+ }, rest)))))));
316
+ }
317
+ }
318
+ const styles = StyleSheet.create({
319
+ container: {
320
+ flex: 1
321
+ }
322
+ });
323
+ //# sourceMappingURL=StackView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["HeaderShownContext","SafeAreaProviderCompat","StackActions","React","StyleSheet","View","SafeAreaInsetsContext","ModalPresentationContext","GestureHandlerRootView","HeaderContainer","CardStack","GestureHandlerWrapper","isArrayEqual","a","b","length","every","it","index","StackView","Component","getDerivedStateFromProps","props","state","routes","previousRoutes","map","r","key","descriptors","previousDescriptors","reduce","acc","route","slice","openingRouteKeys","closingRouteKeys","replacingRouteKeys","previousFocusedRoute","nextFocusedRoute","isAnimationEnabled","descriptor","options","animationEnabled","getAnimationTypeForReplace","animationTypeForReplace","some","includes","filter","splice","Error","getPreviousRoute","findIndex","renderScene","render","renderHeader","createElement","handleOpenRoute","navigation","routeNames","name","navigate","setState","handleCloseRoute","dispatch","pop","source","target","handleTransitionStart","closing","emit","type","data","handleTransitionEnd","handleGestureStart","handleGestureEnd","handleGestureCancel","_","rest","style","styles","container","Consumer","insets","isParentModal","isParentHeaderShown","_extends","onOpenRoute","onCloseRoute","onTransitionStart","onTransitionEnd","onGestureStart","onGestureEnd","onGestureCancel","create","flex"],"sourceRoot":"../../../../src","sources":["views/Stack/StackView.tsx"],"mappings":";AAAA,SACEA,kBAAkB,EAClBC,sBAAsB,QACjB,kCAAkC;AACzC,SAGEC,YAAY,QAEP,gCAAgC;AACvC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAEEC,qBAAqB,QAChB,sCAAsC;AAO7C,OAAOC,wBAAwB,MAAM,sCAAsC;AAC3E,SAASC,sBAAsB,QAAQ,mBAAmB;AAC1D,OAAOC,eAAe,MAEf,2BAA2B;AAClC,OAAOC,SAAS,MAAM,aAAa;AA0BnC,MAAMC,qBAAqB,GAAGH,sBAAsB,IAAIH,IAAI;;AAE5D;AACA;AACA;AACA;AACA,MAAMO,YAAY,GAAGA,CAACC,CAAQ,EAAEC,CAAQ,KACtCD,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,IAAIF,CAAC,CAACG,KAAK,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKD,EAAE,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AAElE,eAAe,MAAMC,SAAS,SAAShB,KAAK,CAACiB,SAAS,CAAe;EACnE,OAAOC,wBAAwBA,CAC7BC,KAAsB,EACtBC,KAAsB,EACtB;IACA;IACA,IACE,CAACD,KAAK,CAACC,KAAK,CAACC,MAAM,KAAKD,KAAK,CAACE,cAAc,IAC1Cb,YAAY,CACVU,KAAK,CAACC,KAAK,CAACC,MAAM,CAACE,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,GAAG,CAAC,EACpCL,KAAK,CAACE,cAAc,CAACC,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAAC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A,WAAY;MACzB8D,cAAc,EAAE,IAAI,CAACjB,kBAAmB;MACxCkB,YAAY,EAAE,IAAI,CAACjB,gBAAiB;MACpCkB,eAAe,EAAE,IAAI,CAACjB;IAAoB,GACtCE,IAAI,CACT,CAEwB,CAEE,CAEP,CACV,CACH,CAAC;EAE5B;AACF;AAEA,MAAME,MAAM,GAAG5E,UAAU,CAAC0F,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ import type { StackCardInterpolatedStyle, StackCardInterpolationProps } from '../types';
2
+ /**
3
+ * Standard iOS-style slide in from the right.
4
+ */
5
+ export declare function forHorizontalIOS({ current, next, inverted, layouts: { screen }, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
6
+ /**
7
+ * Standard iOS-style slide in from the bottom (used for modals).
8
+ */
9
+ export declare function forVerticalIOS({ current, inverted, layouts: { screen }, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
10
+ /**
11
+ * Standard iOS-style modal animation in iOS 13.
12
+ */
13
+ export declare function forModalPresentationIOS({ index, current, next, inverted, layouts: { screen }, insets, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
14
+ /**
15
+ * Standard Android-style fade in from the bottom for Android Oreo.
16
+ */
17
+ export declare function forFadeFromBottomAndroid({ current, inverted, layouts: { screen }, closing, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
18
+ /**
19
+ * Standard Android-style reveal from the bottom for Android Pie.
20
+ */
21
+ export declare function forRevealFromBottomAndroid({ current, next, inverted, layouts: { screen }, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
22
+ /**
23
+ * Standard Android-style zoom for Android 10.
24
+ */
25
+ export declare function forScaleFromCenterAndroid({ current, next, closing, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
26
+ /**
27
+ * Standard bottom sheet slide in from the bottom for Android.
28
+ */
29
+ export declare function forBottomSheetAndroid({ current, inverted, layouts: { screen }, closing, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
30
+ /**
31
+ * Simple fade animation for dialogs
32
+ */
33
+ export declare function forFadeFromCenter({ current: { progress }, }: StackCardInterpolationProps): StackCardInterpolatedStyle;
34
+ export declare function forNoAnimation(): StackCardInterpolatedStyle;
35
+ //# sourceMappingURL=CardStyleInterpolators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardStyleInterpolators.d.ts","sourceRoot":"","sources":["../../../../src/TransitionConfigs/CardStyleInterpolators.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAKlB;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,2BAA2B,GAAG,0BAA0B,CA6C1D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,2BAA2B,GAAG,0BAA0B,CAe1D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,EACnB,MAAM,GACP,EAAE,2BAA2B,GAAG,0BAA0B,CAgF1D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,EACnB,OAAO,GACR,EAAE,2BAA2B,GAAG,0BAA0B,CA0B1D;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,2BAA2B,GAAG,0BAA0B,CAiD1D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,OAAO,EACP,IAAI,EACJ,OAAO,GACR,EAAE,2BAA2B,GAAG,0BAA0B,CAwC1D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,OAAO,EAAE,EAAE,MAAM,EAAE,EACnB,OAAO,GACR,EAAE,2BAA2B,GAAG,0BAA0B,CAiC1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EAAE,EAAE,QAAQ,EAAE,GACtB,EAAE,2BAA2B,GAAG,0BAA0B,CAgB1D;AAED,wBAAgB,cAAc,IAAI,0BAA0B,CAE3D"}
@@ -0,0 +1,23 @@
1
+ import type { StackHeaderInterpolatedStyle, StackHeaderInterpolationProps } from '../types';
2
+ /**
3
+ * Standard UIKit style animation for the header where the title fades into the back button label.
4
+ */
5
+ export declare function forUIKit({ current, next, layouts, }: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle;
6
+ /**
7
+ * Simple fade animation for the header elements.
8
+ */
9
+ export declare function forFade({ current, next, }: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle;
10
+ /**
11
+ * Simple translate animation to translate the header to left.
12
+ */
13
+ export declare function forSlideLeft({ current, next, layouts: { screen }, }: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle;
14
+ /**
15
+ * Simple translate animation to translate the header to right.
16
+ */
17
+ export declare function forSlideRight({ current, next, layouts: { screen }, }: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle;
18
+ /**
19
+ * Simple translate animation to translate the header to slide up.
20
+ */
21
+ export declare function forSlideUp({ current, next, layouts: { header }, }: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle;
22
+ export declare function forNoAnimation(): StackHeaderInterpolatedStyle;
23
+ //# sourceMappingURL=HeaderStyleInterpolators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderStyleInterpolators.d.ts","sourceRoot":"","sources":["../../../../src/TransitionConfigs/HeaderStyleInterpolators.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,IAAI,EACJ,OAAO,GACR,EAAE,6BAA6B,GAAG,4BAA4B,CAyF9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,IAAI,GACL,EAAE,6BAA6B,GAAG,4BAA4B,CAgC9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,IAAI,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,6BAA6B,GAAG,4BAA4B,CA+B9D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,6BAA6B,GAAG,4BAA4B,CA+B9D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,IAAI,EACJ,OAAO,EAAE,EAAE,MAAM,EAAE,GACpB,EAAE,6BAA6B,GAAG,4BAA4B,CA6B9D;AAED,wBAAgB,cAAc,IAAI,4BAA4B,CAE7D"}
@@ -0,0 +1,42 @@
1
+ import type { TransitionPreset } from '../types';
2
+ /**
3
+ * Standard iOS navigation transition.
4
+ */
5
+ export declare const SlideFromRightIOS: TransitionPreset;
6
+ /**
7
+ * Standard iOS navigation transition for modals.
8
+ */
9
+ export declare const ModalSlideFromBottomIOS: TransitionPreset;
10
+ /**
11
+ * Standard iOS modal presentation style (introduced in iOS 13).
12
+ */
13
+ export declare const ModalPresentationIOS: TransitionPreset;
14
+ /**
15
+ * Standard Android navigation transition when opening or closing an Activity on Android < 9 (Oreo).
16
+ */
17
+ export declare const FadeFromBottomAndroid: TransitionPreset;
18
+ /**
19
+ * Standard Android navigation transition when opening or closing an Activity on Android 9 (Pie).
20
+ */
21
+ export declare const RevealFromBottomAndroid: TransitionPreset;
22
+ /**
23
+ * Standard Android navigation transition when opening or closing an Activity on Android 10 (Q).
24
+ */
25
+ export declare const ScaleFromCenterAndroid: TransitionPreset;
26
+ /**
27
+ * Standard bottom sheet slide transition for Android 10.
28
+ */
29
+ export declare const BottomSheetAndroid: TransitionPreset;
30
+ /**
31
+ * Fade transition for transparent modals.
32
+ */
33
+ export declare const ModalFadeTransition: TransitionPreset;
34
+ /**
35
+ * Default navigation transition for the current platform.
36
+ */
37
+ export declare const DefaultTransition: TransitionPreset;
38
+ /**
39
+ * Default modal transition for the current platform.
40
+ */
41
+ export declare const ModalTransition: TransitionPreset;
42
+ //# sourceMappingURL=TransitionPresets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionPresets.d.ts","sourceRoot":"","sources":["../../../../src/TransitionConfigs/TransitionPresets.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAyBjD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAQ/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAQrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAQlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAQnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAQrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAQpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAQhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAQjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,kBAS5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,kBAG1B,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { TransitionSpec } from '../types';
2
+ /**
3
+ * Exact values from UINavigationController's animation configuration.
4
+ */
5
+ export declare const TransitionIOSSpec: TransitionSpec;
6
+ /**
7
+ * Configuration for activity open animation from Android Nougat.
8
+ * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml
9
+ */
10
+ export declare const FadeInFromBottomAndroidSpec: TransitionSpec;
11
+ /**
12
+ * Configuration for activity close animation from Android Nougat.
13
+ * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_close_exit.xml
14
+ */
15
+ export declare const FadeOutToBottomAndroidSpec: TransitionSpec;
16
+ /**
17
+ * Approximate configuration for activity open animation from Android Pie.
18
+ * See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml
19
+ */
20
+ export declare const RevealFromBottomAndroidSpec: TransitionSpec;
21
+ /**
22
+ * Approximate configuration for activity open animation from Android Q.
23
+ * See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml
24
+ */
25
+ export declare const ScaleFromCenterAndroidSpec: TransitionSpec;
26
+ /**
27
+ * Configuration for bottom sheet slide in animation from Material Design.
28
+ * See https://github.com/material-components/material-components-android/blob/fd3639092e1ffef9dc11bcedf79f32801d85e898/lib/java/com/google/android/material/bottomsheet/res/anim/mtrl_bottom_sheet_slide_in.xml
29
+ */
30
+ export declare const BottomSheetSlideInSpec: TransitionSpec;
31
+ /**
32
+ * Configuration for bottom sheet slide out animation from Material Design.
33
+ * See https://github.com/material-components/material-components-android/blob/fd3639092e1ffef9dc11bcedf79f32801d85e898/lib/java/com/google/android/material/bottomsheet/res/anim/mtrl_bottom_sheet_slide_in.xml
34
+ */
35
+ export declare const BottomSheetSlideOutSpec: TransitionSpec;
36
+ //# sourceMappingURL=TransitionSpecs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransitionSpecs.d.ts","sourceRoot":"","sources":["../../../../src/TransitionConfigs/TransitionSpecs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAU/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,cAMzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,cAMxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,cAQzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,cAQxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAOpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAOrC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import * as CardStyleInterpolators from './TransitionConfigs/CardStyleInterpolators';
2
+ import * as HeaderStyleInterpolators from './TransitionConfigs/HeaderStyleInterpolators';
3
+ import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
4
+ import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
5
+ /**
6
+ * Navigators
7
+ */
8
+ export { default as createStackNavigator } from './navigators/createStackNavigator';
9
+ /**
10
+ * Views
11
+ */
12
+ export { default as Header } from './views/Header/Header';
13
+ export { default as StackView } from './views/Stack/StackView';
14
+ /**
15
+ * Transition presets
16
+ */
17
+ export { CardStyleInterpolators, HeaderStyleInterpolators, TransitionPresets, TransitionSpecs, };
18
+ /**
19
+ * Utilities
20
+ */
21
+ export { default as CardAnimationContext } from './utils/CardAnimationContext';
22
+ export { default as GestureHandlerRefContext } from './utils/GestureHandlerRefContext';
23
+ export { default as useCardAnimation } from './utils/useCardAnimation';
24
+ export { default as useGestureHandlerRef } from './utils/useGestureHandlerRef';
25
+ /**
26
+ * Types
27
+ */
28
+ export type { StackCardInterpolatedStyle, StackCardInterpolationProps, StackCardStyleInterpolator, StackHeaderInterpolatedStyle, StackHeaderInterpolationProps, StackHeaderProps, StackHeaderStyleInterpolator, StackNavigationEventMap, StackNavigationOptions, StackNavigationProp, StackScreenProps, TransitionPreset, } from './types';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,4CAA4C,CAAC;AACrF,OAAO,KAAK,wBAAwB,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,iBAAiB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAEvE;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEpF;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,GAChB,CAAC;AAEF;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAE/E;;GAEG;AACH,YAAY,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions } from '@amazon-devices/react-navigation__native';
3
+ import type { StackNavigationConfig, StackNavigationEventMap, StackNavigationOptions } from '../types';
4
+ type Props = DefaultNavigatorOptions<ParamListBase, StackNavigationState<ParamListBase>, StackNavigationOptions, StackNavigationEventMap> & StackRouterOptions & StackNavigationConfig;
5
+ declare function StackNavigator({ id, initialRouteName, children, screenListeners, screenOptions, ...rest }: Props): JSX.Element;
6
+ declare const _default: <ParamList extends ParamListBase>() => import("@amazon-devices/react-navigation__native").TypedNavigator<ParamList, StackNavigationState<ParamListBase>, StackNavigationOptions, StackNavigationEventMap, typeof StackNavigator>;
7
+ export default _default;
8
+ //# sourceMappingURL=createStackNavigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createStackNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createStackNavigator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,uBAAuB,EAEvB,aAAa,EAGb,oBAAoB,EAEpB,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,KAAK,EAEV,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAGlB,KAAK,KAAK,GAAG,uBAAuB,CAClC,aAAa,EACb,oBAAoB,CAAC,aAAa,CAAC,EACnC,sBAAsB,EACtB,uBAAuB,CACxB,GACC,kBAAkB,GAClB,qBAAqB,CAAC;AAExB,iBAAS,cAAc,CAAC,EACtB,EAAE,EACF,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,aAAa,EACb,GAAG,IAAI,EACR,EAAE,KAAK,eAyFP;;AAED,wBAKkB"}