@react-navigation/stack 6.3.4 → 6.3.5
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/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js +1 -1
- package/lib/commonjs/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
- package/lib/commonjs/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/commonjs/TransitionConfigs/TransitionPresets.js.map +1 -1
- package/lib/commonjs/TransitionConfigs/TransitionSpecs.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigators/createStackNavigator.js +1 -1
- package/lib/commonjs/navigators/createStackNavigator.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/CardAnimationContext.js.map +1 -1
- package/lib/commonjs/utils/GestureHandlerRefContext.js.map +1 -1
- package/lib/commonjs/utils/ModalPresentationContext.js.map +1 -1
- package/lib/commonjs/utils/conditional.js.map +1 -1
- package/lib/commonjs/utils/debounce.js.map +1 -1
- package/lib/commonjs/utils/getDistanceForDirection.js.map +1 -1
- package/lib/commonjs/utils/getInvertedMultiplier.js.map +1 -1
- package/lib/commonjs/utils/memoize.js.map +1 -1
- package/lib/commonjs/utils/useCardAnimation.js.map +1 -1
- package/lib/commonjs/utils/useGestureHandlerRef.js.map +1 -1
- package/lib/commonjs/utils/useKeyboardManager.js.map +1 -1
- package/lib/commonjs/views/GestureHandler.android.js.map +1 -1
- package/lib/commonjs/views/GestureHandler.ios.js.map +1 -1
- package/lib/commonjs/views/GestureHandler.js.map +1 -1
- package/lib/commonjs/views/GestureHandlerNative.js +1 -1
- package/lib/commonjs/views/GestureHandlerNative.js.map +1 -1
- package/lib/commonjs/views/Header/Header.js +1 -1
- package/lib/commonjs/views/Header/Header.js.map +1 -1
- package/lib/commonjs/views/Header/HeaderContainer.js.map +1 -1
- package/lib/commonjs/views/Header/HeaderSegment.js +1 -1
- package/lib/commonjs/views/Header/HeaderSegment.js.map +1 -1
- package/lib/commonjs/views/ModalStatusBarManager.js.map +1 -1
- package/lib/commonjs/views/Screens.js +1 -1
- package/lib/commonjs/views/Screens.js.map +1 -1
- package/lib/commonjs/views/Stack/Card.js +1 -1
- package/lib/commonjs/views/Stack/Card.js.map +1 -1
- package/lib/commonjs/views/Stack/CardContainer.js.map +1 -1
- package/lib/commonjs/views/Stack/CardSheet.js +1 -1
- package/lib/commonjs/views/Stack/CardSheet.js.map +1 -1
- package/lib/commonjs/views/Stack/CardStack.js.map +1 -1
- package/lib/commonjs/views/Stack/StackView.js +1 -1
- package/lib/commonjs/views/Stack/StackView.js.map +1 -1
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js +1 -1
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionSpecs.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createStackNavigator.js +1 -1
- package/lib/module/navigators/createStackNavigator.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/CardAnimationContext.js.map +1 -1
- package/lib/module/utils/GestureHandlerRefContext.js.map +1 -1
- package/lib/module/utils/ModalPresentationContext.js.map +1 -1
- package/lib/module/utils/conditional.js.map +1 -1
- package/lib/module/utils/debounce.js.map +1 -1
- package/lib/module/utils/getDistanceForDirection.js.map +1 -1
- package/lib/module/utils/getInvertedMultiplier.js.map +1 -1
- package/lib/module/utils/memoize.js.map +1 -1
- package/lib/module/utils/useCardAnimation.js.map +1 -1
- package/lib/module/utils/useGestureHandlerRef.js.map +1 -1
- package/lib/module/utils/useKeyboardManager.js.map +1 -1
- package/lib/module/views/GestureHandler.android.js.map +1 -1
- package/lib/module/views/GestureHandler.ios.js.map +1 -1
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/GestureHandlerNative.js +1 -1
- package/lib/module/views/GestureHandlerNative.js.map +1 -1
- package/lib/module/views/Header/Header.js +1 -1
- package/lib/module/views/Header/Header.js.map +1 -1
- package/lib/module/views/Header/HeaderContainer.js.map +1 -1
- package/lib/module/views/Header/HeaderSegment.js +1 -1
- package/lib/module/views/Header/HeaderSegment.js.map +1 -1
- package/lib/module/views/ModalStatusBarManager.js.map +1 -1
- package/lib/module/views/Screens.js +1 -1
- package/lib/module/views/Screens.js.map +1 -1
- package/lib/module/views/Stack/Card.js +1 -1
- package/lib/module/views/Stack/Card.js.map +1 -1
- package/lib/module/views/Stack/CardContainer.js.map +1 -1
- package/lib/module/views/Stack/CardSheet.js +1 -1
- package/lib/module/views/Stack/CardSheet.js.map +1 -1
- package/lib/module/views/Stack/CardStack.js.map +1 -1
- package/lib/module/views/Stack/StackView.js +1 -1
- package/lib/module/views/Stack/StackView.js.map +1 -1
- package/package.json +5 -5
- package/src/TransitionConfigs/CardStyleInterpolators.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardStack.tsx"],"names":["EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","FALLBACK_DESCRIPTOR","Object","freeze","options","getInterpolationIndex","scenes","index","cardStyleInterpolator","descriptor","interpolationIndex","i","cardStyleInterpolatorCurrent","getIsModal","scene","isParentModal","isModalPresentation","isModal","getHeaderHeights","insets","isParentHeaderShown","layout","previous","reduce","acc","curr","headerStatusBarHeight","top","headerStyle","style","StyleSheet","flatten","height","route","key","getDistanceFromOptions","presentation","gestureDirection","ModalTransition","DefaultTransition","getProgressFromGesture","gesture","distance","width","Math","max","interpolate","inputRange","outputRange","CardStack","React","Component","getDerivedStateFromProps","props","state","routes","descriptors","gestures","animationEnabled","Animated","Value","openingRouteKeys","includes","map","self","previousRoute","nextRoute","oldScene","currentGesture","previousGesture","undefined","nextGesture","nextDescriptor","previousDescriptor","optionsForTransitionConfig","length","defaultTransitionPreset","ModalFadeTransition","Platform","OS","gestureEnabled","transitionSpec","forNoAnimationCard","headerStyleInterpolator","cardOverlayEnabled","headerMode","header","progress","current","next","__memo","every","it","headerHeights","constructor","e","nativeEvent","setState","previousHeight","getPreviousRoute","previousScene","find","SafeAreaProviderCompat","initialMetrics","frame","render","closingRouteKeys","onOpenRoute","onCloseRoute","renderHeader","renderScene","onTransitionStart","onTransitionEnd","onGestureStart","onGestureEnd","onGestureCancel","detachInactiveScreens","focusedRoute","focusedHeaderHeight","isFloatHeaderAbsolute","slice","some","headerTransparent","headerShown","activeScreensLimit","detachPreviousScreen","lastIndexOf","forModalPresentationIOS","floatingHeader","mode","getPreviousScene","getFocusedRoute","onContentHeightChange","handleHeaderLayout","styles","floating","absolute","container","handleLayout","focused","isScreenActive","sceneForActivity","outputValue","extrapolate","headerTintColor","freezeOnBlur","safeAreaInsetTop","safeAreaInsetRight","right","safeAreaInsetBottom","bottom","safeAreaInsetLeft","left","headerHeight","headerDarkContent","isDark","flattenedHeaderStyle","backgroundColor","isNextScreenTransparent","detachCurrentScreen","absoluteFill","create","flex","position","zIndex"],"mappings":";;;;;;;AAAA;;AAUA;;AACA;;AACA;;AAQA;;AAIA;;AAaA;;AAEA;;AACA;;AACA;;;;;;;;;;AA0CA,MAAMA,OAAO,GAAG,IAAhB;AAEA,MAAMC,cAAc,GAAG,CAAvB;AACA,MAAMC,gCAAgC,GAAG,CAAzC;AACA,MAAMC,YAAY,GAAG,CAArB;AAEA,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,MAAP,CAAc;AAAEC,EAAAA,OAAO,EAAE;AAAX,CAAd,CAA5B;;AAEA,MAAMC,qBAAqB,GAAG,CAACC,MAAD,EAAkBC,KAAlB,KAAoC;AAChE,QAAM;AAAEC,IAAAA;AAAF,MAA4BF,MAAM,CAACC,KAAD,CAAN,CAAcE,UAAd,CAAyBL,OAA3D,CADgE,CAGhE;;AACA,MAAIM,kBAAkB,GAAG,CAAzB;;AAEA,OAAK,IA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,EAAE;AACR6B,IAAAA,MAAM,EAAE;AADA;AAVqB,CAAlB,CAAf","sourcesContent":["import {\n Background,\n getDefaultHeaderHeight,\n SafeAreaProviderCompat,\n} from '@react-navigation/elements';\nimport type {\n ParamListBase,\n Route,\n StackNavigationState,\n} from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n Platform,\n StyleSheet,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\n\nimport {\n forModalPresentationIOS,\n forNoAnimation as forNoAnimationCard,\n} from '../../TransitionConfigs/CardStyleInterpolators';\nimport {\n DefaultTransition,\n ModalFadeTransition,\n ModalTransition,\n} from '../../TransitionConfigs/TransitionPresets';\nimport type {\n Layout,\n Scene,\n StackDescriptor,\n StackDescriptorMap,\n StackHeaderMode,\n StackNavigationOptions,\n} from '../../types';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport { MaybeScreen, MaybeScreenContainer } from '../Screens';\nimport { getIsModalPresentation } from './Card';\nimport CardContainer from './CardContainer';\n\ntype GestureValues = {\n [key: string]: Animated.Value;\n};\n\ntype Props = {\n insets: EdgeInsets;\n state: StackNavigationState<ParamListBase>;\n descriptors: StackDescriptorMap;\n routes: Route<string>[];\n openingRouteKeys: string[];\n closingRouteKeys: string[];\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n getPreviousRoute: (props: {\n route: Route<string>;\n }) => Route<string> | undefined;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n isParentHeaderShown: boolean;\n isParentModal: boolean;\n onTransitionStart: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd: (props: { route: Route<string> }, closing: boolean) => void;\n onGestureStart: (props: { route: Route<string> }) => void;\n onGestureEnd: (props: { route: Route<string> }) => void;\n onGestureCancel: (props: { route: Route<string> }) => void;\n detachInactiveScreens?: boolean;\n};\n\ntype State = {\n routes: Route<string>[];\n descriptors: StackDescriptorMap;\n scenes: Scene[];\n gestures: GestureValues;\n layout: Layout;\n headerHeights: Record<string, number>;\n};\n\nconst EPSILON = 1e-5;\n\nconst STATE_INACTIVE = 0;\nconst STATE_TRANSITIONING_OR_BELOW_TOP = 1;\nconst STATE_ON_TOP = 2;\n\nconst FALLBACK_DESCRIPTOR = Object.freeze({ options: {} });\n\nconst getInterpolationIndex = (scenes: Scene[], index: number) => {\n const { cardStyleInterpolator } = scenes[index].descriptor.options;\n\n // Start from current card and count backwards the number of cards with same interpolation\n let interpolationIndex = 0;\n\n for (let i = index - 1; i >= 0; i--) {\n const cardStyleInterpolatorCurrent =\n scenes[i]?.descriptor.options.cardStyleInterpolator;\n\n if (cardStyleInterpolatorCurrent !== cardStyleInterpolator) {\n break;\n }\n\n interpolationIndex++;\n }\n\n return interpolationIndex;\n};\n\nconst getIsModal = (\n scene: Scene,\n interpolationIndex: number,\n isParentModal: boolean\n) => {\n if (isParentModal) {\n return true;\n }\n\n const { cardStyleInterpolator } = scene.descriptor.options;\n const isModalPresentation = getIsModalPresentation(cardStyleInterpolator);\n const isModal = isModalPresentation && interpolationIndex !== 0;\n\n return isModal;\n};\n\nconst getHeaderHeights = (\n scenes: Scene[],\n insets: EdgeInsets,\n isParentHeaderShown: boolean,\n isParentModal: boolean,\n layout: Layout,\n previous: Record<string, number>\n) => {\n return scenes.reduce<Record<string, number>>((acc, curr, index) => {\n const {\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n headerStyle,\n } = curr.descriptor.options;\n\n const style = StyleSheet.flatten(headerStyle || {});\n\n const height =\n 'height' in style && typeof style.height === 'number'\n ? style.height\n : previous[curr.route.key];\n\n const interpolationIndex = getInterpolationIndex(scenes, index);\n const isModal = getIsModal(curr, interpolationIndex, isParentModal);\n\n acc[curr.route.key] =\n typeof height === 'number'\n ? height\n : getDefaultHeaderHeight(layout, isModal, headerStatusBarHeight);\n\n return acc;\n }, {});\n};\n\nconst getDistanceFromOptions = (\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const {\n presentation,\n gestureDirection = presentation === 'modal'\n ? ModalTransition.gestureDirection\n : DefaultTransition.gestureDirection,\n } = (descriptor?.options || {}) as StackNavigationOptions;\n\n return getDistanceForDirection(layout, gestureDirection);\n};\n\nconst getProgressFromGesture = (\n gesture: Animated.Value,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const distance = getDistanceFromOptions(\n {\n // Make sure that we have a non-zero distance, otherwise there will be incorrect progress\n // This causes blank screen on web if it was previously inside container with display: none\n width: Math.max(1, layout.width),\n height: Math.max(1, layout.height),\n },\n descriptor\n );\n\n if (distance > 0) {\n return gesture.interpolate({\n inputRange: [0, distance],\n outputRange: [1, 0],\n });\n }\n\n return gesture.interpolate({\n inputRange: [distance, 0],\n outputRange: [0, 1],\n });\n};\n\nexport default class CardStack extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Props,\n state: State\n ): Partial<State> | null {\n if (\n props.routes === state.routes &&\n props.descriptors === state.descriptors\n ) {\n return null;\n }\n\n const gestures = props.routes.reduce<GestureValues>((acc, curr) => {\n const descriptor = props.descriptors[curr.key];\n const { animationEnabled } = descriptor?.options || {};\n\n acc[curr.key] =\n state.gestures[curr.key] ||\n new Animated.Value(\n props.openingRouteKeys.includes(curr.key) &&\n animationEnabled !== false\n ? getDistanceFromOptions(state.layout, descriptor)\n : 0\n );\n\n return acc;\n }, {});\n\n const scenes = props.routes.map((route, index, self) => {\n const previousRoute = self[index - 1];\n const nextRoute = self[index + 1];\n\n const oldScene = state.scenes[index];\n\n const currentGesture = gestures[route.key];\n const previousGesture = previousRoute\n ? gestures[previousRoute.key]\n : undefined;\n const nextGesture = nextRoute ? gestures[nextRoute.key] : undefined;\n\n const descriptor =\n props.descriptors[route.key] ||\n state.descriptors[route.key] ||\n (oldScene ? oldScene.descriptor : FALLBACK_DESCRIPTOR);\n\n const nextDescriptor =\n props.descriptors[nextRoute?.key] || state.descriptors[nextRoute?.key];\n\n const previousDescriptor =\n props.descriptors[previousRoute?.key] ||\n state.descriptors[previousRoute?.key];\n\n // When a screen is not the last, it should use next screen's transition config\n // Many transitions also animate the previous screen, so using 2 different transitions doesn't look right\n // For example combining a slide and a modal transition would look wrong otherwise\n // With this approach, combining different transition styles in the same navigator mostly looks right\n // This will still be broken when 2 transitions have different idle state (e.g. modal presentation),\n // but majority of the transitions look alright\n const optionsForTransitionConfig =\n index !== self.length - 1 &&\n nextDescriptor &&\n nextDescriptor.options.presentation !== 'transparentModal'\n ? nextDescriptor.options\n : descriptor.options;\n\n let defaultTransitionPreset =\n optionsForTransitionConfig.presentation === 'modal'\n ? ModalTransition\n : optionsForTransitionConfig.presentation === 'transparentModal'\n ? ModalFadeTransition\n : DefaultTransition;\n\n const {\n animationEnabled = Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n gestureEnabled = Platform.OS === 'ios' && animationEnabled,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n cardOverlayEnabled = (Platform.OS !== 'ios' &&\n optionsForTransitionConfig.presentation !== 'transparentModal') ||\n getIsModalPresentation(cardStyleInterpolator),\n } = optionsForTransitionConfig;\n\n const headerMode: StackHeaderMode =\n descriptor.options.headerMode ??\n (!(\n optionsForTransitionConfig.presentation === 'modal' ||\n optionsForTransitionConfig.presentation === 'transparentModal' ||\n nextDescriptor?.options.presentation === 'modal' ||\n nextDescriptor?.options.presentation === 'transparentModal' ||\n getIsModalPresentation(cardStyleInterpolator)\n ) &&\n Platform.OS === 'ios' &&\n descriptor.options.header === undefined\n ? 'float'\n : 'screen');\n\n const scene = {\n route,\n descriptor: {\n ...descriptor,\n options: {\n ...descriptor.options,\n animationEnabled,\n cardOverlayEnabled,\n cardStyleInterpolator,\n gestureDirection,\n gestureEnabled,\n headerStyleInterpolator,\n transitionSpec,\n headerMode,\n },\n },\n progress: {\n current: getProgressFromGesture(\n currentGesture,\n state.layout,\n descriptor\n ),\n next:\n nextGesture &&\n nextDescriptor?.options.presentation !== 'transparentModal'\n ? getProgressFromGesture(\n nextGesture,\n state.layout,\n nextDescriptor\n )\n : undefined,\n previous: previousGesture\n ? getProgressFromGesture(\n previousGesture,\n state.layout,\n previousDescriptor\n )\n : undefined,\n },\n __memo: [\n state.layout,\n descriptor,\n nextDescriptor,\n previousDescriptor,\n currentGesture,\n nextGesture,\n previousGesture,\n ],\n };\n\n if (\n oldScene &&\n scene.__memo.every((it, i) => {\n // @ts-expect-error: we haven't added __memo to the annotation to prevent usage elsewhere\n return oldScene.__memo[i] === it;\n })\n ) {\n return oldScene;\n }\n\n return scene;\n });\n\n return {\n routes: props.routes,\n scenes,\n gestures,\n descriptors: props.descriptors,\n headerHeights: getHeaderHeights(\n scenes,\n props.insets,\n props.isParentHeaderShown,\n props.isParentModal,\n state.layout,\n state.headerHeights\n ),\n };\n }\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n routes: [],\n scenes: [],\n gestures: {},\n layout: SafeAreaProviderCompat.initialMetrics.frame,\n descriptors: this.props.descriptors,\n // Used when card's header is null and mode is float to make transition\n // between screens with headers and those without headers smooth.\n // This is not a great heuristic here. We don't know synchronously\n // on mount what the header height is so we have just used the most\n // common cases here.\n headerHeights: {},\n };\n }\n\n private handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n const layout = { width, height };\n\n this.setState((state, props) => {\n if (height === state.layout.height && width === state.layout.width) {\n return null;\n }\n\n return {\n layout,\n headerHeights: getHeaderHeights(\n state.scenes,\n props.insets,\n props.isParentHeaderShown,\n props.isParentModal,\n layout,\n state.headerHeights\n ),\n };\n });\n };\n\n private handleHeaderLayout = ({\n route,\n height,\n }: {\n route: Route<string>;\n height: number;\n }) => {\n this.setState(({ headerHeights }) => {\n const previousHeight = headerHeights[route.key];\n\n if (previousHeight === height) {\n return null;\n }\n\n return {\n headerHeights: {\n ...headerHeights,\n [route.key]: height,\n },\n };\n });\n };\n\n private getFocusedRoute = () => {\n const { state } = this.props;\n\n return state.routes[state.index];\n };\n\n private getPreviousScene = ({ route }: { route: Route<string> }) => {\n const { getPreviousRoute } = this.props;\n const { scenes } = this.state;\n\n const previousRoute = getPreviousRoute({ route });\n\n if (previousRoute) {\n const previousScene = scenes.find(\n (scene) => scene.descriptor.route.key === previousRoute.key\n );\n\n return previousScene;\n }\n\n return undefined;\n };\n\n render() {\n const {\n insets,\n state,\n routes,\n closingRouteKeys,\n onOpenRoute,\n onCloseRoute,\n renderHeader,\n renderScene,\n isParentHeaderShown,\n isParentModal,\n onTransitionStart,\n onTransitionEnd,\n onGestureStart,\n onGestureEnd,\n onGestureCancel,\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n } = this.props;\n\n const { scenes, layout, gestures, headerHeights } = this.state;\n\n const focusedRoute = state.routes[state.index];\n const focusedHeaderHeight = headerHeights[focusedRoute.key];\n\n const isFloatHeaderAbsolute = this.state.scenes.slice(-2).some((scene) => {\n const options = scene.descriptor.options ?? {};\n const { headerMode, headerTransparent, headerShown = true } = options;\n\n if (\n headerTransparent ||\n headerShown === false ||\n headerMode === 'screen'\n ) {\n return true;\n }\n\n return false;\n });\n\n let activeScreensLimit = 1;\n\n for (let i = scenes.length - 1; i >= 0; i--) {\n const { options } = scenes[i].descriptor;\n const {\n // By default, we don't want to detach the previous screen of the active one for modals\n detachPreviousScreen = options.presentation === 'transparentModal'\n ? false\n : getIsModalPresentation(options.cardStyleInterpolator)\n ? i !==\n scenes\n .map((scene) => scene.descriptor.options.cardStyleInterpolator)\n .lastIndexOf(forModalPresentationIOS)\n : true,\n } = options;\n\n if (detachPreviousScreen === false) {\n activeScreensLimit++;\n } else {\n // Check at least last 2 screens before stopping\n // This will make sure that screen isn't detached when another screen is animating on top of the transparent one\n // For example, (Opaque -> Transparent -> Opaque)\n if (i <= scenes.length - 2) {\n break;\n }\n }\n }\n\n const floatingHeader = (\n <React.Fragment key=\"header\">\n {renderHeader({\n mode: 'float',\n layout,\n scenes,\n getPreviousScene: this.getPreviousScene,\n getFocusedRoute: this.getFocusedRoute,\n onContentHeightChange: this.handleHeaderLayout,\n style: [\n styles.floating,\n isFloatHeaderAbsolute && [\n // Without this, the header buttons won't be touchable on Android when headerTransparent: true\n { height: focusedHeaderHeight },\n styles.absolute,\n ],\n ],\n })}\n </React.Fragment>\n );\n\n return (\n <Background>\n {isFloatHeaderAbsolute ? null : floatingHeader}\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n style={styles.container}\n onLayout={this.handleLayout}\n >\n {routes.map((route, index, self) => {\n const focused = focusedRoute.key === route.key;\n const gesture = gestures[route.key];\n const scene = scenes[index];\n\n // For the screens that shouldn't be active, the value is 0\n // For those that should be active, but are not the top screen, the value is 1\n // For those on top of the stack and with interaction enabled, the value is 2\n // For the old implementation, it stays the same it was\n let isScreenActive: Animated.AnimatedInterpolation | 2 | 1 | 0 = 1;\n\n if (index < self.length - activeScreensLimit - 1) {\n // screen should be inactive because it is too deep in the stack\n isScreenActive = STATE_INACTIVE;\n } else {\n const sceneForActivity = scenes[self.length - 1];\n const outputValue =\n index === self.length - 1\n ? STATE_ON_TOP // the screen is on top after the transition\n : index >= self.length - activeScreensLimit\n ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit\n : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit\n isScreenActive = sceneForActivity\n ? sceneForActivity.progress.current.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, outputValue],\n extrapolate: 'clamp',\n })\n : STATE_TRANSITIONING_OR_BELOW_TOP;\n }\n\n const {\n headerShown = true,\n headerTransparent,\n headerStyle,\n headerTintColor,\n freezeOnBlur,\n } = scene.descriptor.options;\n\n const safeAreaInsetTop = insets.top;\n const safeAreaInsetRight = insets.right;\n const safeAreaInsetBottom = insets.bottom;\n const safeAreaInsetLeft = insets.left;\n\n const headerHeight =\n headerShown !== false ? headerHeights[route.key] : 0;\n\n let headerDarkContent: boolean | undefined;\n\n if (headerShown) {\n if (typeof headerTintColor === 'string') {\n headerDarkContent = Color(headerTintColor).isDark();\n } else {\n const flattenedHeaderStyle = StyleSheet.flatten(headerStyle);\n\n if (\n flattenedHeaderStyle &&\n 'backgroundColor' in flattenedHeaderStyle &&\n typeof flattenedHeaderStyle.backgroundColor === 'string'\n ) {\n headerDarkContent = !Color(\n flattenedHeaderStyle.backgroundColor\n ).isDark();\n }\n }\n }\n\n // Start from current card and count backwards the number of cards with same interpolation\n const interpolationIndex = getInterpolationIndex(scenes, index);\n const isModal = getIsModal(\n scene,\n interpolationIndex,\n isParentModal\n );\n\n const isNextScreenTransparent =\n scenes[index + 1]?.descriptor.options.presentation ===\n 'transparentModal';\n\n const detachCurrentScreen =\n scenes[index + 1]?.descriptor.options.detachPreviousScreen !==\n false;\n\n return (\n <MaybeScreen\n key={route.key}\n style={StyleSheet.absoluteFill}\n enabled={detachInactiveScreens}\n active={isScreenActive}\n freezeOnBlur={freezeOnBlur}\n pointerEvents=\"box-none\"\n >\n <CardContainer\n index={index}\n interpolationIndex={interpolationIndex}\n modal={isModal}\n active={index === self.length - 1}\n focused={focused}\n closing={closingRouteKeys.includes(route.key)}\n layout={layout}\n gesture={gesture}\n scene={scene}\n safeAreaInsetTop={safeAreaInsetTop}\n safeAreaInsetRight={safeAreaInsetRight}\n safeAreaInsetBottom={safeAreaInsetBottom}\n safeAreaInsetLeft={safeAreaInsetLeft}\n onGestureStart={onGestureStart}\n onGestureCancel={onGestureCancel}\n onGestureEnd={onGestureEnd}\n headerHeight={headerHeight}\n isParentHeaderShown={isParentHeaderShown}\n onHeaderHeightChange={this.handleHeaderLayout}\n getPreviousScene={this.getPreviousScene}\n getFocusedRoute={this.getFocusedRoute}\n headerDarkContent={headerDarkContent}\n hasAbsoluteFloatHeader={\n isFloatHeaderAbsolute && !headerTransparent\n }\n renderHeader={renderHeader}\n renderScene={renderScene}\n onOpenRoute={onOpenRoute}\n onCloseRoute={onCloseRoute}\n onTransitionStart={onTransitionStart}\n onTransitionEnd={onTransitionEnd}\n isNextScreenTransparent={isNextScreenTransparent}\n detachCurrentScreen={detachCurrentScreen}\n />\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n {isFloatHeaderAbsolute ? floatingHeader : null}\n </Background>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n absolute: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n floating: {\n zIndex: 1,\n },\n});\n"]}
|
|
1
|
+
{"version":3,"names":["EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","FALLBACK_DESCRIPTOR","Object","freeze","options","getInterpolationIndex","scenes","index","cardStyleInterpolator","descriptor","interpolationIndex","i","cardStyleInterpolatorCurrent","getIsModal","scene","isParentModal","isModalPresentation","getIsModalPresentation","isModal","getHeaderHeights","insets","isParentHeaderShown","layout","previous","reduce","acc","curr","headerStatusBarHeight","top","headerStyle","style","StyleSheet","flatten","height","route","key","getDefaultHeaderHeight","getDistanceFromOptions","presentation","gestureDirection","ModalTransition","DefaultTransition","getDistanceForDirection","getProgressFromGesture","gesture","distance","width","Math","max","interpolate","inputRange","outputRange","CardStack","React","Component","getDerivedStateFromProps","props","state","routes","descriptors","gestures","animationEnabled","Animated","Value","openingRouteKeys","includes","map","self","previousRoute","nextRoute","oldScene","currentGesture","previousGesture","undefined","nextGesture","nextDescriptor","previousDescriptor","optionsForTransitionConfig","length","defaultTransitionPreset","ModalFadeTransition","Platform","OS","gestureEnabled","transitionSpec","forNoAnimationCard","headerStyleInterpolator","cardOverlayEnabled","headerMode","header","progress","current","next","__memo","every","it","headerHeights","constructor","e","nativeEvent","setState","previousHeight","getPreviousRoute","previousScene","find","SafeAreaProviderCompat","initialMetrics","frame","render","closingRouteKeys","onOpenRoute","onCloseRoute","renderHeader","renderScene","onTransitionStart","onTransitionEnd","onGestureStart","onGestureEnd","onGestureCancel","detachInactiveScreens","focusedRoute","focusedHeaderHeight","isFloatHeaderAbsolute","slice","some","headerTransparent","headerShown","activeScreensLimit","detachPreviousScreen","lastIndexOf","forModalPresentationIOS","floatingHeader","mode","getPreviousScene","getFocusedRoute","onContentHeightChange","handleHeaderLayout","styles","floating","absolute","container","handleLayout","focused","isScreenActive","sceneForActivity","outputValue","extrapolate","headerTintColor","freezeOnBlur","safeAreaInsetTop","safeAreaInsetRight","right","safeAreaInsetBottom","bottom","safeAreaInsetLeft","left","headerHeight","headerDarkContent","Color","isDark","flattenedHeaderStyle","backgroundColor","isNextScreenTransparent","detachCurrentScreen","absoluteFill","create","flex","position","zIndex"],"sources":["CardStack.tsx"],"sourcesContent":["import {\n Background,\n getDefaultHeaderHeight,\n SafeAreaProviderCompat,\n} from '@react-navigation/elements';\nimport type {\n ParamListBase,\n Route,\n StackNavigationState,\n} from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n Platform,\n StyleSheet,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\n\nimport {\n forModalPresentationIOS,\n forNoAnimation as forNoAnimationCard,\n} from '../../TransitionConfigs/CardStyleInterpolators';\nimport {\n DefaultTransition,\n ModalFadeTransition,\n ModalTransition,\n} from '../../TransitionConfigs/TransitionPresets';\nimport type {\n Layout,\n Scene,\n StackDescriptor,\n StackDescriptorMap,\n StackHeaderMode,\n StackNavigationOptions,\n} from '../../types';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport { MaybeScreen, MaybeScreenContainer } from '../Screens';\nimport { getIsModalPresentation } from './Card';\nimport CardContainer from './CardContainer';\n\ntype GestureValues = {\n [key: string]: Animated.Value;\n};\n\ntype Props = {\n insets: EdgeInsets;\n state: StackNavigationState<ParamListBase>;\n descriptors: StackDescriptorMap;\n routes: Route<string>[];\n openingRouteKeys: string[];\n closingRouteKeys: string[];\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n getPreviousRoute: (props: {\n route: Route<string>;\n }) => Route<string> | undefined;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n isParentHeaderShown: boolean;\n isParentModal: boolean;\n onTransitionStart: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd: (props: { route: Route<string> }, closing: boolean) => void;\n onGestureStart: (props: { route: Route<string> }) => void;\n onGestureEnd: (props: { route: Route<string> }) => void;\n onGestureCancel: (props: { route: Route<string> }) => void;\n detachInactiveScreens?: boolean;\n};\n\ntype State = {\n routes: Route<string>[];\n descriptors: StackDescriptorMap;\n scenes: Scene[];\n gestures: GestureValues;\n layout: Layout;\n headerHeights: Record<string, number>;\n};\n\nconst EPSILON = 1e-5;\n\nconst STATE_INACTIVE = 0;\nconst STATE_TRANSITIONING_OR_BELOW_TOP = 1;\nconst STATE_ON_TOP = 2;\n\nconst FALLBACK_DESCRIPTOR = Object.freeze({ options: {} });\n\nconst getInterpolationIndex = (scenes: Scene[], index: number) => {\n const { cardStyleInterpolator } = scenes[index].descriptor.options;\n\n // Start from current card and count backwards the number of cards with same interpolation\n let interpolationIndex = 0;\n\n for (let i = index - 1; i >= 0; i--) {\n const cardStyleInterpolatorCurrent =\n scenes[i]?.descriptor.options.cardStyleInterpolator;\n\n if (cardStyleInterpolatorCurrent !== cardStyleInterpolator) {\n break;\n }\n\n interpolationIndex++;\n }\n\n return interpolationIndex;\n};\n\nconst getIsModal = (\n scene: Scene,\n interpolationIndex: number,\n isParentModal: boolean\n) => {\n if (isParentModal) {\n return true;\n }\n\n const { cardStyleInterpolator } = scene.descriptor.options;\n const isModalPresentation = getIsModalPresentation(cardStyleInterpolator);\n const isModal = isModalPresentation && interpolationIndex !== 0;\n\n return isModal;\n};\n\nconst getHeaderHeights = (\n scenes: Scene[],\n insets: EdgeInsets,\n isParentHeaderShown: boolean,\n isParentModal: boolean,\n layout: Layout,\n previous: Record<string, number>\n) => {\n return scenes.reduce<Record<string, number>>((acc, curr, index) => {\n const {\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n headerStyle,\n } = curr.descriptor.options;\n\n const style = StyleSheet.flatten(headerStyle || {});\n\n const height =\n 'height' in style && typeof style.height === 'number'\n ? style.height\n : previous[curr.route.key];\n\n const interpolationIndex = getInterpolationIndex(scenes, index);\n const isModal = getIsModal(curr, interpolationIndex, isParentModal);\n\n acc[curr.route.key] =\n typeof height === 'number'\n ? height\n : getDefaultHeaderHeight(layout, isModal, headerStatusBarHeight);\n\n return acc;\n }, {});\n};\n\nconst getDistanceFromOptions = (\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const {\n presentation,\n gestureDirection = presentation === 'modal'\n ? ModalTransition.gestureDirection\n : DefaultTransition.gestureDirection,\n } = (descriptor?.options || {}) as StackNavigationOptions;\n\n return getDistanceForDirection(layout, gestureDirection);\n};\n\nconst getProgressFromGesture = (\n gesture: Animated.Value,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const distance = getDistanceFromOptions(\n {\n // Make sure that we have a non-zero distance, otherwise there will be incorrect progress\n // This causes blank screen on web if it was previously inside container with display: none\n width: Math.max(1, layout.width),\n height: Math.max(1, layout.height),\n },\n descriptor\n );\n\n if (distance > 0) {\n return gesture.interpolate({\n inputRange: [0, distance],\n outputRange: [1, 0],\n });\n }\n\n return gesture.interpolate({\n inputRange: [distance, 0],\n outputRange: [0, 1],\n });\n};\n\nexport default class CardStack extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Props,\n state: State\n ): Partial<State> | null {\n if (\n props.routes === state.routes &&\n props.descriptors === state.descriptors\n ) {\n return null;\n }\n\n const gestures = props.routes.reduce<GestureValues>((acc, curr) => {\n const descriptor = props.descriptors[curr.key];\n const { animationEnabled } = descriptor?.options || {};\n\n acc[curr.key] =\n state.gestures[curr.key] ||\n new Animated.Value(\n props.openingRouteKeys.includes(curr.key) &&\n animationEnabled !== false\n ? getDistanceFromOptions(state.layout, descriptor)\n : 0\n );\n\n return acc;\n }, {});\n\n const scenes = props.routes.map((route, index, self) => {\n const previousRoute = self[index - 1];\n const nextRoute = self[index + 1];\n\n const oldScene = state.scenes[index];\n\n const currentGesture = gestures[route.key];\n const previousGesture = previousRoute\n ? gestures[previousRoute.key]\n : undefined;\n const nextGesture = nextRoute ? gestures[nextRoute.key] : undefined;\n\n const descriptor =\n props.descriptors[route.key] ||\n state.descriptors[route.key] ||\n (oldScene ? oldScene.descriptor : FALLBACK_DESCRIPTOR);\n\n const nextDescriptor =\n props.descriptors[nextRoute?.key] || state.descriptors[nextRoute?.key];\n\n const previousDescriptor =\n props.descriptors[previousRoute?.key] ||\n state.descriptors[previousRoute?.key];\n\n // When a screen is not the last, it should use next screen's transition config\n // Many transitions also animate the previous screen, so using 2 different transitions doesn't look right\n // For example combining a slide and a modal transition would look wrong otherwise\n // With this approach, combining different transition styles in the same navigator mostly looks right\n // This will still be broken when 2 transitions have different idle state (e.g. modal presentation),\n // but majority of the transitions look alright\n const optionsForTransitionConfig =\n index !== self.length - 1 &&\n nextDescriptor &&\n nextDescriptor.options.presentation !== 'transparentModal'\n ? nextDescriptor.options\n : descriptor.options;\n\n let defaultTransitionPreset =\n optionsForTransitionConfig.presentation === 'modal'\n ? ModalTransition\n : optionsForTransitionConfig.presentation === 'transparentModal'\n ? ModalFadeTransition\n : DefaultTransition;\n\n const {\n animationEnabled = Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n gestureEnabled = Platform.OS === 'ios' && animationEnabled,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n cardOverlayEnabled = (Platform.OS !== 'ios' &&\n optionsForTransitionConfig.presentation !== 'transparentModal') ||\n getIsModalPresentation(cardStyleInterpolator),\n } = optionsForTransitionConfig;\n\n const headerMode: StackHeaderMode =\n descriptor.options.headerMode ??\n (!(\n optionsForTransitionConfig.presentation === 'modal' ||\n optionsForTransitionConfig.presentation === 'transparentModal' ||\n nextDescriptor?.options.presentation === 'modal' ||\n nextDescriptor?.options.presentation === 'transparentModal' ||\n getIsModalPresentation(cardStyleInterpolator)\n ) &&\n Platform.OS === 'ios' &&\n descriptor.options.header === undefined\n ? 'float'\n : 'screen');\n\n const scene = {\n route,\n descriptor: {\n ...descriptor,\n options: {\n ...descriptor.options,\n animationEnabled,\n cardOverlayEnabled,\n cardStyleInterpolator,\n gestureDirection,\n gestureEnabled,\n headerStyleInterpolator,\n transitionSpec,\n headerMode,\n },\n },\n progress: {\n current: getProgressFromGesture(\n currentGesture,\n state.layout,\n descriptor\n ),\n next:\n nextGesture &&\n nextDescriptor?.options.presentation !== 'transparentModal'\n ? getProgressFromGesture(\n nextGesture,\n state.layout,\n nextDescriptor\n )\n : undefined,\n previous: previousGesture\n ? getProgressFromGesture(\n previousGesture,\n state.layout,\n previousDescriptor\n )\n : undefined,\n },\n __memo: [\n state.layout,\n descriptor,\n nextDescriptor,\n previousDescriptor,\n currentGesture,\n nextGesture,\n previousGesture,\n ],\n };\n\n if (\n oldScene &&\n scene.__memo.every((it, i) => {\n // @ts-expect-error: we haven't added __memo to the annotation to prevent usage elsewhere\n return oldScene.__memo[i] === it;\n })\n ) {\n return oldScene;\n }\n\n return scene;\n });\n\n return {\n routes: props.routes,\n scenes,\n gestures,\n descriptors: props.descriptors,\n headerHeights: getHeaderHeights(\n scenes,\n props.insets,\n props.isParentHeaderShown,\n props.isParentModal,\n state.layout,\n state.headerHeights\n ),\n };\n }\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n routes: [],\n scenes: [],\n gestures: {},\n layout: SafeAreaProviderCompat.initialMetrics.frame,\n descriptors: this.props.descriptors,\n // Used when card's header is null and mode is float to make transition\n // between screens with headers and those without headers smooth.\n // This is not a great heuristic here. We don't know synchronously\n // on mount what the header height is so we have just used the most\n // common cases here.\n headerHeights: {},\n };\n }\n\n private handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n const layout = { width, height };\n\n this.setState((state, props) => {\n if (height === state.layout.height && width === state.layout.width) {\n return null;\n }\n\n return {\n layout,\n headerHeights: getHeaderHeights(\n state.scenes,\n props.insets,\n props.isParentHeaderShown,\n props.isParentModal,\n layout,\n state.headerHeights\n ),\n };\n });\n };\n\n private handleHeaderLayout = ({\n route,\n height,\n }: {\n route: Route<string>;\n height: number;\n }) => {\n this.setState(({ headerHeights }) => {\n const previousHeight = headerHeights[route.key];\n\n if (previousHeight === height) {\n return null;\n }\n\n return {\n headerHeights: {\n ...headerHeights,\n [route.key]: height,\n },\n };\n });\n };\n\n private getFocusedRoute = () => {\n const { state } = this.props;\n\n return state.routes[state.index];\n };\n\n private getPreviousScene = ({ route }: { route: Route<string> }) => {\n const { getPreviousRoute } = this.props;\n const { scenes } = this.state;\n\n const previousRoute = getPreviousRoute({ route });\n\n if (previousRoute) {\n const previousScene = scenes.find(\n (scene) => scene.descriptor.route.key === previousRoute.key\n );\n\n return previousScene;\n }\n\n return undefined;\n };\n\n render() {\n const {\n insets,\n state,\n routes,\n closingRouteKeys,\n onOpenRoute,\n onCloseRoute,\n renderHeader,\n renderScene,\n isParentHeaderShown,\n isParentModal,\n onTransitionStart,\n onTransitionEnd,\n onGestureStart,\n onGestureEnd,\n onGestureCancel,\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n } = this.props;\n\n const { scenes, layout, gestures, headerHeights } = this.state;\n\n const focusedRoute = state.routes[state.index];\n const focusedHeaderHeight = headerHeights[focusedRoute.key];\n\n const isFloatHeaderAbsolute = this.state.scenes.slice(-2).some((scene) => {\n const options = scene.descriptor.options ?? {};\n const { headerMode, headerTransparent, headerShown = true } = options;\n\n if (\n headerTransparent ||\n headerShown === false ||\n headerMode === 'screen'\n ) {\n return true;\n }\n\n return false;\n });\n\n let activeScreensLimit = 1;\n\n for (let i = scenes.length - 1; i >= 0; i--) {\n const { options } = scenes[i].descriptor;\n const {\n // By default, we don't want to detach the previous screen of the active one for modals\n detachPreviousScreen = options.presentation === 'transparentModal'\n ? false\n : getIsModalPresentation(options.cardStyleInterpolator)\n ? i !==\n scenes\n .map((scene) => scene.descriptor.options.cardStyleInterpolator)\n .lastIndexOf(forModalPresentationIOS)\n : true,\n } = options;\n\n if (detachPreviousScreen === false) {\n activeScreensLimit++;\n } else {\n // Check at least last 2 screens before stopping\n // This will make sure that screen isn't detached when another screen is animating on top of the transparent one\n // For example, (Opaque -> Transparent -> Opaque)\n if (i <= scenes.length - 2) {\n break;\n }\n }\n }\n\n const floatingHeader = (\n <React.Fragment key=\"header\">\n {renderHeader({\n mode: 'float',\n layout,\n scenes,\n getPreviousScene: this.getPreviousScene,\n getFocusedRoute: this.getFocusedRoute,\n onContentHeightChange: this.handleHeaderLayout,\n style: [\n styles.floating,\n isFloatHeaderAbsolute && [\n // Without this, the header buttons won't be touchable on Android when headerTransparent: true\n { height: focusedHeaderHeight },\n styles.absolute,\n ],\n ],\n })}\n </React.Fragment>\n );\n\n return (\n <Background>\n {isFloatHeaderAbsolute ? null : floatingHeader}\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n style={styles.container}\n onLayout={this.handleLayout}\n >\n {routes.map((route, index, self) => {\n const focused = focusedRoute.key === route.key;\n const gesture = gestures[route.key];\n const scene = scenes[index];\n\n // For the screens that shouldn't be active, the value is 0\n // For those that should be active, but are not the top screen, the value is 1\n // For those on top of the stack and with interaction enabled, the value is 2\n // For the old implementation, it stays the same it was\n let isScreenActive: Animated.AnimatedInterpolation | 2 | 1 | 0 = 1;\n\n if (index < self.length - activeScreensLimit - 1) {\n // screen should be inactive because it is too deep in the stack\n isScreenActive = STATE_INACTIVE;\n } else {\n const sceneForActivity = scenes[self.length - 1];\n const outputValue =\n index === self.length - 1\n ? STATE_ON_TOP // the screen is on top after the transition\n : index >= self.length - activeScreensLimit\n ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit\n : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit\n isScreenActive = sceneForActivity\n ? sceneForActivity.progress.current.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, outputValue],\n extrapolate: 'clamp',\n })\n : STATE_TRANSITIONING_OR_BELOW_TOP;\n }\n\n const {\n headerShown = true,\n headerTransparent,\n headerStyle,\n headerTintColor,\n freezeOnBlur,\n } = scene.descriptor.options;\n\n const safeAreaInsetTop = insets.top;\n const safeAreaInsetRight = insets.right;\n const safeAreaInsetBottom = insets.bottom;\n const safeAreaInsetLeft = insets.left;\n\n const headerHeight =\n headerShown !== false ? headerHeights[route.key] : 0;\n\n let headerDarkContent: boolean | undefined;\n\n if (headerShown) {\n if (typeof headerTintColor === 'string') {\n headerDarkContent = Color(headerTintColor).isDark();\n } else {\n const flattenedHeaderStyle = StyleSheet.flatten(headerStyle);\n\n if (\n flattenedHeaderStyle &&\n 'backgroundColor' in flattenedHeaderStyle &&\n typeof flattenedHeaderStyle.backgroundColor === 'string'\n ) {\n headerDarkContent = !Color(\n flattenedHeaderStyle.backgroundColor\n ).isDark();\n }\n }\n }\n\n // Start from current card and count backwards the number of cards with same interpolation\n const interpolationIndex = getInterpolationIndex(scenes, index);\n const isModal = getIsModal(\n scene,\n interpolationIndex,\n isParentModal\n );\n\n const isNextScreenTransparent =\n scenes[index + 1]?.descriptor.options.presentation ===\n 'transparentModal';\n\n const detachCurrentScreen =\n scenes[index + 1]?.descriptor.options.detachPreviousScreen !==\n false;\n\n return (\n <MaybeScreen\n key={route.key}\n style={StyleSheet.absoluteFill}\n enabled={detachInactiveScreens}\n active={isScreenActive}\n freezeOnBlur={freezeOnBlur}\n pointerEvents=\"box-none\"\n >\n <CardContainer\n index={index}\n interpolationIndex={interpolationIndex}\n modal={isModal}\n active={index === self.length - 1}\n focused={focused}\n closing={closingRouteKeys.includes(route.key)}\n layout={layout}\n gesture={gesture}\n scene={scene}\n safeAreaInsetTop={safeAreaInsetTop}\n safeAreaInsetRight={safeAreaInsetRight}\n safeAreaInsetBottom={safeAreaInsetBottom}\n safeAreaInsetLeft={safeAreaInsetLeft}\n onGestureStart={onGestureStart}\n onGestureCancel={onGestureCancel}\n onGestureEnd={onGestureEnd}\n headerHeight={headerHeight}\n isParentHeaderShown={isParentHeaderShown}\n onHeaderHeightChange={this.handleHeaderLayout}\n getPreviousScene={this.getPreviousScene}\n getFocusedRoute={this.getFocusedRoute}\n headerDarkContent={headerDarkContent}\n hasAbsoluteFloatHeader={\n isFloatHeaderAbsolute && !headerTransparent\n }\n renderHeader={renderHeader}\n renderScene={renderScene}\n onOpenRoute={onOpenRoute}\n onCloseRoute={onCloseRoute}\n onTransitionStart={onTransitionStart}\n onTransitionEnd={onTransitionEnd}\n isNextScreenTransparent={isNextScreenTransparent}\n detachCurrentScreen={detachCurrentScreen}\n />\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n {isFloatHeaderAbsolute ? floatingHeader : null}\n </Background>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n absolute: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n floating: {\n zIndex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AAUA;;AACA;;AACA;;AAQA;;AAIA;;AAaA;;AAEA;;AACA;;AACA;;;;;;;;;;AA0CA,MAAMA,OAAO,GAAG,IAAhB;AA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e,EAAE,KAAKC,eArBxB;QAsBE,iBAAiB,EAAEuB,iBAtBrB;QAuBE,sBAAsB,EACpBnC,qBAAqB,IAAI,CAACG,iBAxB9B;QA0BE,YAAY,EAAEb,YA1BhB;QA2BE,WAAW,EAAEC,WA3Bf;QA4BE,WAAW,EAAEH,WA5Bf;QA6BE,YAAY,EAAEC,YA7BhB;QA8BE,iBAAiB,EAAEG,iBA9BrB;QA+BE,eAAe,EAAEC,eA/BnB;QAgCE,uBAAuB,EAAE+C,uBAhC3B;QAiCE,mBAAmB,EAAEC;MAjCvB,EARF,CADF;IA8CD,CAjIA,CALH,CAFF,EA0IGzC,qBAAqB,GAAGS,cAAH,GAAoB,IA1I5C,CADF;EA8ID;;AAtfkE;;;;AAyfrE,MAAMM,MAAM,GAAG1G,uBAAA,CAAWsI,MAAX,CAAkB;EAC/BzB,SAAS,EAAE;IACT0B,IAAI,EAAE;EADG,CADoB;EAI/B3B,QAAQ,EAAE;IACR4B,QAAQ,EAAE,UADF;IAER3I,GAAG,EAAE,CAFG;IAGR+H,IAAI,EAAE,CAHE;IAIRJ,KAAK,EAAE;EAJC,CAJqB;EAU/Bb,QAAQ,EAAE;IACR8B,MAAM,EAAE;EADA;AAVqB,CAAlB,CAAf"}
|
|
@@ -29,7 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
|
|
32
|
-
function _extends() { _extends = Object.assign
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
33
|
|
|
34
34
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StackView.tsx"],"names":["GestureHandlerWrapper","GestureHandlerRootView","View","isArrayEqual","a","b","length","every","it","index","StackView","React","Component","routes","previousRoutes","previousDescriptors","openingRouteKeys","closingRouteKeys","replacingRouteKeys","descriptors","route","state","filter","r","key","includes","findIndex","descriptor","props","render","navigation","some","routeNames","name","navigate","setState","dispatch","StackActions","pop","source","target","closing","emit","type","data","getDerivedStateFromProps","map","reduce","acc","slice","previousFocusedRoute","nextFocusedRoute","isAnimationEnabled","options","animationEnabled","getAnimationTypeForReplace","animationTypeForReplace","splice","Error","_","rest","styles","container","insets","isParentModal","isParentHeaderShown","getPreviousRoute","handleOpenRoute","handleCloseRoute","handleTransitionStart","handleTransitionEnd","renderHeader","renderScene","handleGestureStart","handleGestureEnd","handleGestureCancel","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AAIA;;AAMA;;AACA;;AACA;;AAUA;;AACA;;AACA;;AAGA;;;;;;;;;;;;AA0BA,MAAMA,qBAAqB,GAAGC,sCAAH,aAAGA,sCAAH,cAAGA,sCAAH,GAA6BC,iBAAxD;AAEA;AACA;AACA;AACA;;AACA,MAAMC,YAAY,GAAG,CAACC,CAAD,EAAWC,CAAX,KACnBD,CAAC,CAACE,MAAF,KAAaD,CAAC,C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eE,MAAA,WAAW,EAAEF,WAff;AAgBE,MAAA,cAAc,EAAE,KAAKsD,kBAhBvB;AAiBE,MAAA,YAAY,EAAE,KAAKC,gBAjBrB;AAkBE,MAAA,eAAe,EAAE,KAAKC;AAlBxB,OAmBMf,IAnBN,EAFJ,CAFJ,CAFJ,CADF,CADF,CADF;AAuCD;;AApZkE;;;;AAuZrE,MAAMC,MAAM,GAAGe,wBAAWC,MAAX,CAAkB;AAC/Bf,EAAAA,SAAS,EAAE;AACTgB,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf","sourcesContent":["import {\n HeaderShownContext,\n SafeAreaProviderCompat,\n} from '@react-navigation/elements';\nimport {\n ParamListBase,\n Route,\n StackActions,\n StackNavigationState,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport {\n EdgeInsets,\n SafeAreaInsetsContext,\n} from 'react-native-safe-area-context';\n\nimport type {\n StackDescriptorMap,\n StackNavigationConfig,\n StackNavigationHelpers,\n} from '../../types';\nimport ModalPresentationContext from '../../utils/ModalPresentationContext';\nimport { GestureHandlerRootView } from '../GestureHandler';\nimport HeaderContainer, {\n Props as HeaderContainerProps,\n} from '../Header/HeaderContainer';\nimport CardStack from './CardStack';\n\ntype Props = StackNavigationConfig & {\n state: StackNavigationState<ParamListBase>;\n navigation: StackNavigationHelpers;\n descriptors: StackDescriptorMap;\n};\n\ntype State = {\n // Local copy of the routes which are actually rendered\n routes: Route<string>[];\n // Previous routes, to compare whether routes have changed or not\n previousRoutes: Route<string>[];\n // Previous descriptors, to compare whether descriptors have changed or not\n previousDescriptors: StackDescriptorMap;\n // List of routes being opened, we need to animate pushing of these new routes\n openingRouteKeys: string[];\n // List of routes being closed, we need to animate popping of these routes\n closingRouteKeys: string[];\n // List of routes being replaced, we need to keep a copy until the new route animates in\n replacingRouteKeys: string[];\n // Since the local routes can vary from the routes from props, we need to keep the descriptors for old routes\n // Otherwise we won't be able to access the options for routes that were removed\n descriptors: StackDescriptorMap;\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\n/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nconst isArrayEqual = (a: any[], b: any[]) =>\n a.length === b.length && a.every((it, index) => it === b[index]);\n\nexport default class StackView extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Readonly<Props>,\n state: Readonly<State>\n ) {\n // If there was no change in routes, we don't need to compute anything\n if (\n (props.state.routes === state.previousRoutes ||\n isArrayEqual(\n props.state.routes.map((r) => r.key),\n state.previousRoutes.map((r) => r.key)\n )) &&\n state.routes.length\n ) {\n let routes = state.routes;\n let previousRoutes = state.previousRoutes;\n let descriptors = props.descriptors;\n let previousDescriptors = state.previousDescriptors;\n\n if (props.descriptors !== state.previousDescriptors) {\n descriptors = state.routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n previousDescriptors = props.descriptors;\n }\n\n if (props.state.routes !== state.previousRoutes) {\n // if any route objects have changed, we should update them\n const map = props.state.routes.reduce<Record<string, Route<string>>>(\n (acc, route) => {\n acc[route.key] = route;\n return acc;\n },\n {}\n );\n\n routes = state.routes.map((route) => map[route.key] || route);\n previousRoutes = props.state.routes;\n }\n\n return {\n routes,\n previousRoutes,\n descriptors,\n previousDescriptors,\n };\n }\n\n // Here we determine which routes were added or removed to animate them\n // We keep a copy of the route being removed in local state to be able to animate it\n\n let routes =\n props.state.index < props.state.routes.length - 1\n ? // Remove any extra routes from the state\n // The last visible route should be the focused route, i.e. at current index\n props.state.routes.slice(0, props.state.index + 1)\n : props.state.routes;\n\n // Now we need to determine which routes were added and removed\n let {\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n previousRoutes,\n } = state;\n\n const previousFocusedRoute = previousRoutes[previousRoutes.length - 1] as\n | Route<string>\n | undefined;\n const nextFocusedRoute = routes[routes.length - 1];\n\n const isAnimationEnabled = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor ? descriptor.options.animationEnabled !== false : true;\n };\n\n const getAnimationTypeForReplace = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor.options.animationTypeForReplace ?? 'push';\n };\n\n if (\n previousFocusedRoute &&\n previousFocusedRoute.key !== nextFocusedRoute.key\n ) {\n // We only need to animate routes if the focused route changed\n // Animating previous routes won't be visible coz the focused route is on top of everything\n\n if (!previousRoutes.some((r) => r.key === nextFocusedRoute.key)) {\n // A new route has come to the focus, we treat this as a push\n // A replace can also trigger this, the animation should look like push\n\n if (\n isAnimationEnabled(nextFocusedRoute.key) &&\n !openingRouteKeys.includes(nextFocusedRoute.key)\n ) {\n // In this case, we need to animate pushing the focused route\n // We don't care about animating any other added routes because they won't be visible\n openingRouteKeys = [...openingRouteKeys, nextFocusedRoute.key];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previous focused route isn't present in state, we treat this as a replace\n\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n if (getAnimationTypeForReplace(nextFocusedRoute.key) === 'pop') {\n closingRouteKeys = [\n ...closingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n // By default, new routes have a push animation, so we add it to `openingRouteKeys` before\n // But since user configured it to animate the old screen like a pop, we need to add this without animation\n // So remove it from `openingRouteKeys` which will remove the animation\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n // Keep the route being removed at the end to animate it out\n routes = [...routes, previousFocusedRoute];\n } else {\n replacingRouteKeys = [\n ...replacingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep the old route in the state because it's visible under the new route, and removing it will feel abrupt\n // We need to insert it just before the focused one (the route being pushed)\n // After the push animation is completed, routes being replaced will be removed completely\n routes = routes.slice();\n routes.splice(routes.length - 1, 0, previousFocusedRoute);\n }\n }\n }\n } else if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previously focused route was removed, we treat this as a pop\n\n if (\n isAnimationEnabled(previousFocusedRoute.key) &&\n !closingRouteKeys.includes(previousFocusedRoute.key)\n ) {\n closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];\n\n // Sometimes a route can be closed before the opening animation finishes\n // So we also need to remove it from the opening list\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep a copy of route being removed in the state to be able to animate it\n routes = [...routes, previousFocusedRoute];\n }\n } else {\n // Looks like some routes were re-arranged and no focused routes were added/removed\n // i.e. the currently focused route already existed and the previously focused route still exists\n // We don't know how to animate this\n }\n } else if (replacingRouteKeys.length || closingRouteKeys.length) {\n // Keep the routes we are closing or replacing if animation is enabled for them\n routes = routes.slice();\n routes.splice(\n routes.length - 1,\n 0,\n ...state.routes.filter(({ key }) =>\n isAnimationEnabled(key)\n ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key)\n : false\n )\n );\n }\n\n if (!routes.length) {\n throw new Error(\n 'There should always be at least one route in the navigation state.'\n );\n }\n\n const descriptors = routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n return {\n routes,\n previousRoutes: props.state.routes,\n previousDescriptors: props.descriptors,\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n descriptors,\n };\n }\n\n state: State = {\n routes: [],\n previousRoutes: [],\n previousDescriptors: {},\n openingRouteKeys: [],\n closingRouteKeys: [],\n replacingRouteKeys: [],\n descriptors: {},\n };\n\n private getPreviousRoute = ({ route }: { route: Route<string> }) => {\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n const routes = this.state.routes.filter(\n (r) =>\n r.key === route.key ||\n (!closingRouteKeys.includes(r.key) &&\n !replacingRouteKeys.includes(r.key))\n );\n\n const index = routes.findIndex((r) => r.key === route.key);\n\n return routes[index - 1];\n };\n\n private renderScene = ({ route }: { route: Route<string> }) => {\n const descriptor =\n this.state.descriptors[route.key] || this.props.descriptors[route.key];\n\n if (!descriptor) {\n return null;\n }\n\n return descriptor.render();\n };\n\n private renderHeader = (props: HeaderContainerProps) => {\n return <HeaderContainer {...props} />;\n };\n\n private handleOpenRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n\n if (\n closingRouteKeys.some((key) => key === route.key) &&\n replacingRouteKeys.every((key) => key !== route.key) &&\n state.routeNames.includes(route.name) &&\n !state.routes.some((r) => r.key === route.key)\n ) {\n // If route isn't present in current state, but was closing, assume that a close animation was cancelled\n // So we need to add this route back to the state\n navigation.navigate(route);\n } else {\n this.setState((state) => ({\n routes: state.replacingRouteKeys.length\n ? state.routes.filter(\n (r) => !state.replacingRouteKeys.includes(r.key)\n )\n : state.routes,\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n replacingRouteKeys: [],\n }));\n }\n };\n\n private handleCloseRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n\n if (state.routes.some((r) => r.key === route.key)) {\n // If a route exists in state, trigger a pop\n // This will happen in when the route was closed from the card component\n // e.g. When the close animation triggered from a gesture ends\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: state.key,\n });\n } else {\n // We need to clean up any state tracking the route and pop it immediately\n this.setState((state) => ({\n routes: state.routes.filter((r) => r.key !== route.key),\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n }));\n }\n };\n\n private handleTransitionStart = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionStart',\n data: { closing },\n target: route.key,\n });\n\n private handleTransitionEnd = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionEnd',\n data: { closing },\n target: route.key,\n });\n\n private handleGestureStart = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureStart',\n target: route.key,\n });\n };\n\n private handleGestureEnd = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureEnd',\n target: route.key,\n });\n };\n\n private handleGestureCancel = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n };\n\n render() {\n const {\n state,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n descriptors: _,\n ...rest\n } = this.props;\n\n const { routes, descriptors, openingRouteKeys, closingRouteKeys } =\n this.state;\n\n return (\n <GestureHandlerWrapper style={styles.container}>\n <SafeAreaProviderCompat>\n <SafeAreaInsetsContext.Consumer>\n {(insets) => (\n <ModalPresentationContext.Consumer>\n {(isParentModal) => (\n <HeaderShownContext.Consumer>\n {(isParentHeaderShown) => (\n <CardStack\n insets={insets as EdgeInsets}\n isParentHeaderShown={isParentHeaderShown}\n isParentModal={isParentModal}\n getPreviousRoute={this.getPreviousRoute}\n routes={routes}\n openingRouteKeys={openingRouteKeys}\n closingRouteKeys={closingRouteKeys}\n onOpenRoute={this.handleOpenRoute}\n onCloseRoute={this.handleCloseRoute}\n onTransitionStart={this.handleTransitionStart}\n onTransitionEnd={this.handleTransitionEnd}\n renderHeader={this.renderHeader}\n renderScene={this.renderScene}\n state={state}\n descriptors={descriptors}\n onGestureStart={this.handleGestureStart}\n onGestureEnd={this.handleGestureEnd}\n onGestureCancel={this.handleGestureCancel}\n {...rest}\n />\n )}\n </HeaderShownContext.Consumer>\n )}\n </ModalPresentationContext.Consumer>\n )}\n </SafeAreaInsetsContext.Consumer>\n </SafeAreaProviderCompat>\n </GestureHandlerWrapper>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
|
|
1
|
+
{"version":3,"names":["GestureHandlerWrapper","GestureHandlerRootView","View","isArrayEqual","a","b","length","every","it","index","StackView","React","Component","routes","previousRoutes","previousDescriptors","openingRouteKeys","closingRouteKeys","replacingRouteKeys","descriptors","route","state","filter","r","key","includes","findIndex","descriptor","props","render","navigation","some","routeNames","name","navigate","setState","dispatch","StackActions","pop","source","target","closing","emit","type","data","getDerivedStateFromProps","map","reduce","acc","slice","previousFocusedRoute","nextFocusedRoute","isAnimationEnabled","options","animationEnabled","getAnimationTypeForReplace","animationTypeForReplace","splice","Error","_","rest","styles","container","insets","isParentModal","isParentHeaderShown","getPreviousRoute","handleOpenRoute","handleCloseRoute","handleTransitionStart","handleTransitionEnd","renderHeader","renderScene","handleGestureStart","handleGestureEnd","handleGestureCancel","StyleSheet","create","flex"],"sources":["StackView.tsx"],"sourcesContent":["import {\n HeaderShownContext,\n SafeAreaProviderCompat,\n} from '@react-navigation/elements';\nimport {\n ParamListBase,\n Route,\n StackActions,\n StackNavigationState,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport {\n EdgeInsets,\n SafeAreaInsetsContext,\n} from 'react-native-safe-area-context';\n\nimport type {\n StackDescriptorMap,\n StackNavigationConfig,\n StackNavigationHelpers,\n} from '../../types';\nimport ModalPresentationContext from '../../utils/ModalPresentationContext';\nimport { GestureHandlerRootView } from '../GestureHandler';\nimport HeaderContainer, {\n Props as HeaderContainerProps,\n} from '../Header/HeaderContainer';\nimport CardStack from './CardStack';\n\ntype Props = StackNavigationConfig & {\n state: StackNavigationState<ParamListBase>;\n navigation: StackNavigationHelpers;\n descriptors: StackDescriptorMap;\n};\n\ntype State = {\n // Local copy of the routes which are actually rendered\n routes: Route<string>[];\n // Previous routes, to compare whether routes have changed or not\n previousRoutes: Route<string>[];\n // Previous descriptors, to compare whether descriptors have changed or not\n previousDescriptors: StackDescriptorMap;\n // List of routes being opened, we need to animate pushing of these new routes\n openingRouteKeys: string[];\n // List of routes being closed, we need to animate popping of these routes\n closingRouteKeys: string[];\n // List of routes being replaced, we need to keep a copy until the new route animates in\n replacingRouteKeys: string[];\n // Since the local routes can vary from the routes from props, we need to keep the descriptors for old routes\n // Otherwise we won't be able to access the options for routes that were removed\n descriptors: StackDescriptorMap;\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\n/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nconst isArrayEqual = (a: any[], b: any[]) =>\n a.length === b.length && a.every((it, index) => it === b[index]);\n\nexport default class StackView extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Readonly<Props>,\n state: Readonly<State>\n ) {\n // If there was no change in routes, we don't need to compute anything\n if (\n (props.state.routes === state.previousRoutes ||\n isArrayEqual(\n props.state.routes.map((r) => r.key),\n state.previousRoutes.map((r) => r.key)\n )) &&\n state.routes.length\n ) {\n let routes = state.routes;\n let previousRoutes = state.previousRoutes;\n let descriptors = props.descriptors;\n let previousDescriptors = state.previousDescriptors;\n\n if (props.descriptors !== state.previousDescriptors) {\n descriptors = state.routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n previousDescriptors = props.descriptors;\n }\n\n if (props.state.routes !== state.previousRoutes) {\n // if any route objects have changed, we should update them\n const map = props.state.routes.reduce<Record<string, Route<string>>>(\n (acc, route) => {\n acc[route.key] = route;\n return acc;\n },\n {}\n );\n\n routes = state.routes.map((route) => map[route.key] || route);\n previousRoutes = props.state.routes;\n }\n\n return {\n routes,\n previousRoutes,\n descriptors,\n previousDescriptors,\n };\n }\n\n // Here we determine which routes were added or removed to animate them\n // We keep a copy of the route being removed in local state to be able to animate it\n\n let routes =\n props.state.index < props.state.routes.length - 1\n ? // Remove any extra routes from the state\n // The last visible route should be the focused route, i.e. at current index\n props.state.routes.slice(0, props.state.index + 1)\n : props.state.routes;\n\n // Now we need to determine which routes were added and removed\n let {\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n previousRoutes,\n } = state;\n\n const previousFocusedRoute = previousRoutes[previousRoutes.length - 1] as\n | Route<string>\n | undefined;\n const nextFocusedRoute = routes[routes.length - 1];\n\n const isAnimationEnabled = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor ? descriptor.options.animationEnabled !== false : true;\n };\n\n const getAnimationTypeForReplace = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor.options.animationTypeForReplace ?? 'push';\n };\n\n if (\n previousFocusedRoute &&\n previousFocusedRoute.key !== nextFocusedRoute.key\n ) {\n // We only need to animate routes if the focused route changed\n // Animating previous routes won't be visible coz the focused route is on top of everything\n\n if (!previousRoutes.some((r) => r.key === nextFocusedRoute.key)) {\n // A new route has come to the focus, we treat this as a push\n // A replace can also trigger this, the animation should look like push\n\n if (\n isAnimationEnabled(nextFocusedRoute.key) &&\n !openingRouteKeys.includes(nextFocusedRoute.key)\n ) {\n // In this case, we need to animate pushing the focused route\n // We don't care about animating any other added routes because they won't be visible\n openingRouteKeys = [...openingRouteKeys, nextFocusedRoute.key];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previous focused route isn't present in state, we treat this as a replace\n\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n if (getAnimationTypeForReplace(nextFocusedRoute.key) === 'pop') {\n closingRouteKeys = [\n ...closingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n // By default, new routes have a push animation, so we add it to `openingRouteKeys` before\n // But since user configured it to animate the old screen like a pop, we need to add this without animation\n // So remove it from `openingRouteKeys` which will remove the animation\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n // Keep the route being removed at the end to animate it out\n routes = [...routes, previousFocusedRoute];\n } else {\n replacingRouteKeys = [\n ...replacingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep the old route in the state because it's visible under the new route, and removing it will feel abrupt\n // We need to insert it just before the focused one (the route being pushed)\n // After the push animation is completed, routes being replaced will be removed completely\n routes = routes.slice();\n routes.splice(routes.length - 1, 0, previousFocusedRoute);\n }\n }\n }\n } else if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previously focused route was removed, we treat this as a pop\n\n if (\n isAnimationEnabled(previousFocusedRoute.key) &&\n !closingRouteKeys.includes(previousFocusedRoute.key)\n ) {\n closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];\n\n // Sometimes a route can be closed before the opening animation finishes\n // So we also need to remove it from the opening list\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep a copy of route being removed in the state to be able to animate it\n routes = [...routes, previousFocusedRoute];\n }\n } else {\n // Looks like some routes were re-arranged and no focused routes were added/removed\n // i.e. the currently focused route already existed and the previously focused route still exists\n // We don't know how to animate this\n }\n } else if (replacingRouteKeys.length || closingRouteKeys.length) {\n // Keep the routes we are closing or replacing if animation is enabled for them\n routes = routes.slice();\n routes.splice(\n routes.length - 1,\n 0,\n ...state.routes.filter(({ key }) =>\n isAnimationEnabled(key)\n ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key)\n : false\n )\n );\n }\n\n if (!routes.length) {\n throw new Error(\n 'There should always be at least one route in the navigation state.'\n );\n }\n\n const descriptors = routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n return {\n routes,\n previousRoutes: props.state.routes,\n previousDescriptors: props.descriptors,\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n descriptors,\n };\n }\n\n state: State = {\n routes: [],\n previousRoutes: [],\n previousDescriptors: {},\n openingRouteKeys: [],\n closingRouteKeys: [],\n replacingRouteKeys: [],\n descriptors: {},\n };\n\n private getPreviousRoute = ({ route }: { route: Route<string> }) => {\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n const routes = this.state.routes.filter(\n (r) =>\n r.key === route.key ||\n (!closingRouteKeys.includes(r.key) &&\n !replacingRouteKeys.includes(r.key))\n );\n\n const index = routes.findIndex((r) => r.key === route.key);\n\n return routes[index - 1];\n };\n\n private renderScene = ({ route }: { route: Route<string> }) => {\n const descriptor =\n this.state.descriptors[route.key] || this.props.descriptors[route.key];\n\n if (!descriptor) {\n return null;\n }\n\n return descriptor.render();\n };\n\n private renderHeader = (props: HeaderContainerProps) => {\n return <HeaderContainer {...props} />;\n };\n\n private handleOpenRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n\n if (\n closingRouteKeys.some((key) => key === route.key) &&\n replacingRouteKeys.every((key) => key !== route.key) &&\n state.routeNames.includes(route.name) &&\n !state.routes.some((r) => r.key === route.key)\n ) {\n // If route isn't present in current state, but was closing, assume that a close animation was cancelled\n // So we need to add this route back to the state\n navigation.navigate(route);\n } else {\n this.setState((state) => ({\n routes: state.replacingRouteKeys.length\n ? state.routes.filter(\n (r) => !state.replacingRouteKeys.includes(r.key)\n )\n : state.routes,\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n replacingRouteKeys: [],\n }));\n }\n };\n\n private handleCloseRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n\n if (state.routes.some((r) => r.key === route.key)) {\n // If a route exists in state, trigger a pop\n // This will happen in when the route was closed from the card component\n // e.g. When the close animation triggered from a gesture ends\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: state.key,\n });\n } else {\n // We need to clean up any state tracking the route and pop it immediately\n this.setState((state) => ({\n routes: state.routes.filter((r) => r.key !== route.key),\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n }));\n }\n };\n\n private handleTransitionStart = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionStart',\n data: { closing },\n target: route.key,\n });\n\n private handleTransitionEnd = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionEnd',\n data: { closing },\n target: route.key,\n });\n\n private handleGestureStart = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureStart',\n target: route.key,\n });\n };\n\n private handleGestureEnd = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureEnd',\n target: route.key,\n });\n };\n\n private handleGestureCancel = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n };\n\n render() {\n const {\n state,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n descriptors: _,\n ...rest\n } = this.props;\n\n const { routes, descriptors, openingRouteKeys, closingRouteKeys } =\n this.state;\n\n return (\n <GestureHandlerWrapper style={styles.container}>\n <SafeAreaProviderCompat>\n <SafeAreaInsetsContext.Consumer>\n {(insets) => (\n <ModalPresentationContext.Consumer>\n {(isParentModal) => (\n <HeaderShownContext.Consumer>\n {(isParentHeaderShown) => (\n <CardStack\n insets={insets as EdgeInsets}\n isParentHeaderShown={isParentHeaderShown}\n isParentModal={isParentModal}\n getPreviousRoute={this.getPreviousRoute}\n routes={routes}\n openingRouteKeys={openingRouteKeys}\n closingRouteKeys={closingRouteKeys}\n onOpenRoute={this.handleOpenRoute}\n onCloseRoute={this.handleCloseRoute}\n onTransitionStart={this.handleTransitionStart}\n onTransitionEnd={this.handleTransitionEnd}\n renderHeader={this.renderHeader}\n renderScene={this.renderScene}\n state={state}\n descriptors={descriptors}\n onGestureStart={this.handleGestureStart}\n onGestureEnd={this.handleGestureEnd}\n onGestureCancel={this.handleGestureCancel}\n {...rest}\n />\n )}\n </HeaderShownContext.Consumer>\n )}\n </ModalPresentationContext.Consumer>\n )}\n </SafeAreaInsetsContext.Consumer>\n </SafeAreaProviderCompat>\n </GestureHandlerWrapper>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AAIA;;AAMA;;AACA;;AACA;;AAUA;;AACA;;AACA;;AAGA;;;;;;;;;;;;AA0BA,MAAMA,qBAAqB,GAAGC,sCAAH,aAAGA,sCAAH,cAAGA,sCAAH,GAA6BC,iBAAxD;AAEA;AACA;AACA;AACA;;AACA,MAAMC,YAAY,GAAG,CAACC,CAAD,EAAWC,CAAX,KACnBD,CAAC,CAACE,MAAF,KAAaD,CAAC,CAACC,MAAf,IAAyBF,CAAC,CAACG,KAAF,CAAQ,CAACC,EAAD,EAAKC,KAAL,KAAeD,EAAE,KAAKH,CAAC,CAACI,KAAD,CAA/B,CAD3B;;AAGe,MAAMC,SAAN,SAAwBC,KAAK,CAACC,SAA9B,CAAsD;EAAA;IAAA;;IAAA,+BAyNpD;MACbC,MAAM,EAAE,EADK;MAEbC,cAAc,EAAE,EAFH;MAGbC,mBAAmB,EAAE,EAHR;MAIbC,gBAAgB,EAAE,EAJL;MAKbC,gBAAgB,EAAE,EALL;MAMbC,kBAAkB,EAAE,EANP;MAObC,WAAW,EAAE;IAPA,CAzNoD;;IAAA,0CAmOxC,QAAyC;MAAA,IAAxC;QAAEC;MAAF,CAAwC;MAClE,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,WAff;MAgBE,cAAc,EAAE,KAAKsD,kBAhBvB;MAiBE,YAAY,EAAE,KAAKC,gBAjBrB;MAkBE,eAAe,EAAE,KAAKC;IAlBxB,GAmBMf,IAnBN,EAFJ,CAFJ,CAFJ,CADF,CADF,CADF;EAuCD;;AApZkE;;;;AAuZrE,MAAMC,MAAM,GAAGe,uBAAA,CAAWC,MAAX,CAAkB;EAC/Bf,SAAS,EAAE;IACTgB,IAAI,EAAE;EADG;AADoB,CAAlB,CAAf"}
|
|
@@ -95,7 +95,7 @@ export function forModalPresentationIOS(_ref3) {
|
|
|
95
95
|
},
|
|
96
96
|
insets
|
|
97
97
|
} = _ref3;
|
|
98
|
-
const hasNotchIos = Platform.OS === 'ios' && !Platform.isPad && !Platform.
|
|
98
|
+
const hasNotchIos = Platform.OS === 'ios' && !Platform.isPad && !Platform.isTV && insets.top > 20;
|
|
99
99
|
const isLandscape = screen.width > screen.height;
|
|
100
100
|
const topOffset = isLandscape ? 0 : 10;
|
|
101
101
|
const statusBarHeight = insets.top;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardStyleInterpolators.tsx"],"names":["Animated","Platform","conditional","add","multiply","forHorizontalIOS","current","next","inverted","layouts","screen","translateFocused","progress","interpolate","inputRange","outputRange","width","extrapolate","translateUnfocused","overlayOpacity","shadowOpacity","cardStyle","transform","translateX","overlayStyle","opacity","shadowStyle","forVerticalIOS","translateY","height","forModalPresentationIOS","index","insets","hasNotchIos","OS","isPad","isTVOS","top","isLandscape","topOffset","statusBarHeight","aspectRatio","isFirst","scale","borderRadius","overflow","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","marginTop","marginBottom","forFadeFromBottomAndroid","closing","forRevealFromBottomAndroid","containerTranslateY","cardTranslateYFocused","cardTranslateYUnfocused","containerStyle","forScaleFromCenterAndroid","forBottomSheetAndroid","forFadeFromCenter","forNoAnimation"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,QAAnB,QA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AAJ,EAAU,GAAV,EAAe,CAAf;AAFe,OAArB;AADA,KADN;AAOLS,IAAAA,YAAY,EAAE;AACZC,MAAAA,OAAO,EAAEb,QAAQ,CAACC,WAAT,CAAqB;AAC5BC,QAAAA,UAAU,EAAE,CAAC,CAAD,EAAI,CAAJ,CADgB;AAE5BC,QAAAA,WAAW,EAAE,CAAC,CAAD,EAAI,GAAJ,CAFe;AAG5BE,QAAAA,WAAW,EAAE;AAHe,OAArB;AADG;AAPT,GAAP;AAeD;AAED,OAAO,SAAS6C,cAAT,GAAsD;AAC3D,SAAO,EAAP;AACD","sourcesContent":["import { Animated, Platform } from 'react-native';\n\nimport type {\n StackCardInterpolatedStyle,\n StackCardInterpolationProps,\n} from '../types';\nimport conditional from '../utils/conditional';\n\nconst { add, multiply } = Animated;\n\n/**\n * Standard iOS-style slide in from the right.\n */\nexport function forHorizontalIOS({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.width, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const translateUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.width * -0.3],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.07],\n extrapolate: 'clamp',\n });\n\n const shadowOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateX: translateFocused },\n // Translation for the animation of the card on top of this\n { translateX: translateUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n shadowStyle: { shadowOpacity },\n };\n}\n\n/**\n * Standard iOS-style slide in from the bottom (used for modals).\n */\nexport function forVerticalIOS({\n current,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n return {\n cardStyle: {\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard iOS-style modal animation in iOS 13.\n */\nexport function forModalPresentationIOS({\n index,\n current,\n next,\n inverted,\n layouts: { screen },\n insets,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const hasNotchIos =\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTVOS &&\n insets.top > 20;\n const isLandscape = screen.width > screen.height;\n const topOffset = isLandscape ? 0 : 10;\n const statusBarHeight = insets.top;\n const aspectRatio = screen.height / screen.width;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const isFirst = index === 0;\n\n const translateY = multiply(\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n screen.height,\n isFirst ? 0 : topOffset,\n (isFirst ? statusBarHeight : 0) - topOffset * aspectRatio,\n ],\n }),\n inverted\n );\n\n const overlayOpacity = progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0.3, 1, 1],\n });\n\n const scale = isLandscape\n ? 1\n : progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n 1,\n 1,\n screen.width ? 1 - (topOffset * 2) / screen.width : 1,\n ],\n });\n\n const borderRadius = isLandscape\n ? 0\n : isFirst\n ? progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0, hasNotchIos ? 38 : 0, 10],\n })\n : 10;\n\n return {\n cardStyle: {\n overflow: 'hidden',\n borderTopLeftRadius: borderRadius,\n borderTopRightRadius: borderRadius,\n // We don't need these for the animation\n // But different border radius for corners improves animation perf\n borderBottomLeftRadius: hasNotchIos ? borderRadius : 0,\n borderBottomRightRadius: hasNotchIos ? borderRadius : 0,\n marginTop: isFirst ? 0 : statusBarHeight,\n marginBottom: isFirst ? 0 : topOffset,\n transform: [{ translateY }, { scale }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style fade in from the bottom for Android Oreo.\n */\nexport function forFadeFromBottomAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.08, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n extrapolate: 'clamp',\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Pie.\n */\nexport function forRevealFromBottomAndroid({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const containerTranslateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * (95.9 / 100) * -1, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.height * (2 / 100) * -1],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 0.36, 1],\n outputRange: [0, 0.1, 0.1],\n extrapolate: 'clamp',\n });\n\n return {\n containerStyle: {\n overflow: 'hidden',\n transform: [{ translateY: containerTranslateY }],\n },\n cardStyle: {\n transform: [\n { translateY: cardTranslateYFocused },\n { translateY: cardTranslateYUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style zoom for Android 10.\n */\nexport function forScaleFromCenterAndroid({\n current,\n next,\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 0.75, 0.875, 1, 1.0825, 1.2075, 2],\n outputRange: [0, 0, 1, 1, 1, 1, 0],\n });\n\n const scale = conditional(\n closing,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0.925, 1],\n extrapolate: 'clamp',\n }),\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0.85, 1, 1.075],\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ scale }],\n },\n };\n}\n\n/**\n * Standard bottom sheet slide in from the bottom for Android.\n */\nexport function forBottomSheetAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.8, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n );\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Simple fade animation for dialogs\n */\nexport function forFadeFromCenter({\n current: { progress },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n return {\n cardStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n }),\n },\n overlayStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.5],\n extrapolate: 'clamp',\n }),\n },\n };\n}\n\nexport function forNoAnimation(): StackCardInterpolatedStyle {\n return {};\n}\n"]}
|
|
1
|
+
{"version":3,"names":["Animated","Platform","conditional","add","multiply","forHorizontalIOS","current","next","inverted","layouts","screen","translateFocused","progress","interpolate","inputRange","outputRange","width","extrapolate","translateUnfocused","overlayOpacity","shadowOpacity","cardStyle","transform","translateX","overlayStyle","opacity","shadowStyle","forVerticalIOS","translateY","height","forModalPresentationIOS","index","insets","hasNotchIos","OS","isPad","isTV","top","isLandscape","topOffset","statusBarHeight","aspectRatio","isFirst","scale","borderRadius","overflow","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","marginTop","marginBottom","forFadeFromBottomAndroid","closing","forRevealFromBottomAndroid","containerTranslateY","cardTranslateYFocused","cardTranslateYUnfocused","containerStyle","forScaleFromCenterAndroid","forBottomSheetAndroid","forFadeFromCenter","forNoAnimation"],"sources":["CardStyleInterpolators.tsx"],"sourcesContent":["import { Animated, Platform } from 'react-native';\n\nimport type {\n StackCardInterpolatedStyle,\n StackCardInterpolationProps,\n} from '../types';\nimport conditional from '../utils/conditional';\n\nconst { add, multiply } = Animated;\n\n/**\n * Standard iOS-style slide in from the right.\n */\nexport function forHorizontalIOS({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.width, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const translateUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.width * -0.3],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.07],\n extrapolate: 'clamp',\n });\n\n const shadowOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateX: translateFocused },\n // Translation for the animation of the card on top of this\n { translateX: translateUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n shadowStyle: { shadowOpacity },\n };\n}\n\n/**\n * Standard iOS-style slide in from the bottom (used for modals).\n */\nexport function forVerticalIOS({\n current,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n return {\n cardStyle: {\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard iOS-style modal animation in iOS 13.\n */\nexport function forModalPresentationIOS({\n index,\n current,\n next,\n inverted,\n layouts: { screen },\n insets,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const hasNotchIos =\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTV &&\n insets.top > 20;\n const isLandscape = screen.width > screen.height;\n const topOffset = isLandscape ? 0 : 10;\n const statusBarHeight = insets.top;\n const aspectRatio = screen.height / screen.width;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const isFirst = index === 0;\n\n const translateY = multiply(\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n screen.height,\n isFirst ? 0 : topOffset,\n (isFirst ? statusBarHeight : 0) - topOffset * aspectRatio,\n ],\n }),\n inverted\n );\n\n const overlayOpacity = progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0.3, 1, 1],\n });\n\n const scale = isLandscape\n ? 1\n : progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n 1,\n 1,\n screen.width ? 1 - (topOffset * 2) / screen.width : 1,\n ],\n });\n\n const borderRadius = isLandscape\n ? 0\n : isFirst\n ? progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0, hasNotchIos ? 38 : 0, 10],\n })\n : 10;\n\n return {\n cardStyle: {\n overflow: 'hidden',\n borderTopLeftRadius: borderRadius,\n borderTopRightRadius: borderRadius,\n // We don't need these for the animation\n // But different border radius for corners improves animation perf\n borderBottomLeftRadius: hasNotchIos ? borderRadius : 0,\n borderBottomRightRadius: hasNotchIos ? borderRadius : 0,\n marginTop: isFirst ? 0 : statusBarHeight,\n marginBottom: isFirst ? 0 : topOffset,\n transform: [{ translateY }, { scale }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style fade in from the bottom for Android Oreo.\n */\nexport function forFadeFromBottomAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.08, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n extrapolate: 'clamp',\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Pie.\n */\nexport function forRevealFromBottomAndroid({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const containerTranslateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * (95.9 / 100) * -1, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.height * (2 / 100) * -1],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 0.36, 1],\n outputRange: [0, 0.1, 0.1],\n extrapolate: 'clamp',\n });\n\n return {\n containerStyle: {\n overflow: 'hidden',\n transform: [{ translateY: containerTranslateY }],\n },\n cardStyle: {\n transform: [\n { translateY: cardTranslateYFocused },\n { translateY: cardTranslateYUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style zoom for Android 10.\n */\nexport function forScaleFromCenterAndroid({\n current,\n next,\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 0.75, 0.875, 1, 1.0825, 1.2075, 2],\n outputRange: [0, 0, 1, 1, 1, 1, 0],\n });\n\n const scale = conditional(\n closing,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0.925, 1],\n extrapolate: 'clamp',\n }),\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0.85, 1, 1.075],\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ scale }],\n },\n };\n}\n\n/**\n * Standard bottom sheet slide in from the bottom for Android.\n */\nexport function forBottomSheetAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.8, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n );\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Simple fade animation for dialogs\n */\nexport function forFadeFromCenter({\n current: { progress },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n return {\n cardStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n }),\n },\n overlayStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.5],\n extrapolate: 'clamp',\n }),\n },\n };\n}\n\nexport function forNoAnimation(): StackCardInterpolatedStyle {\n return {};\n}\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,QAAnB,QAAmC,cAAnC;AAMA,OAAOC,WAAP,MAAwB,sBAAxB;AAEA,MAAM;EAAEC,GAAF;EAAOC;AAAP,IAAoBJ,QAA1B;AAEA;AACA;AACA;;AACA,OAAO,SAASK,gBAAT,OAKqD;EAAA,IAL3B;IAC/BC,OAD+B;IAE/BC,IAF+B;IAG/BC,QAH+B;IAI/BC,OAAO,EAAE;MAAEC;IAAF;EAJsB,CAK2B;EAC1D,MAAMC,gBAAgB,GAAGP,QAAQ,CAC/BE,OAAO,CAACM,QAAR,CAAiBC,WAAjB,CAA6B;IAC3BC,UAAU,EAAE,CAAC,CAAD,EAAI,CAAJ,CADe;IAE3BC,WAAW,EAAE,CAACL,MAAM,CAACM,KAAR,EAAe,CAAf,CAFc;IAG3BC,WAAW,EAAE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olators.tsx"],"names":["Animated","I18nManager","add","forUIKit","current","next","layouts","defaultOffset","leftSpacing","leftLabelOffset","leftLabel","screen","width","titleLeftOffset","title","rightOffset","progress","interpolate","inputRange","outputRange","extrapolate","leftButtonStyle","opacity","leftLabelStyle","transform","translateX","getConstants","isRTL","rightButtonStyle","titleStyle","backgroundStyle","forFade","forSlideLeft","forSlideRight","forSlideUp","header","translateY","height","forNoAnimation"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,WAAnB,QAAsC,cAAtC;AAOA,MAAM;AAAEC,EAAAA;AAAF,IAAUF,QAAhB;AAEA;AACA;AACA;;AACA,OAAO,SAASG,QAAT,OAIyD;AAAA,MAJvC;AACvBC,IAAAA,OADuB;AAEvBC,IAAAA,IAFuB;AAGvBC,IAAAA;AAHuB,GAIuC;AAC9D,QAAMC,aAAa,GAAG,GAAtB;AACA,QAAMC,WAAW,GAAG,EAApB,CAF8D,CAI9D;AACA;AACA;AACA;AACA;;AACA,QAAMC,eAAe,GAAGH,OAAO,CAACI,SAAR,GACpB,CAACJ,OAAO,CAACK,MAAR,CAAeC,KAAf,GAAuBN,OAAO,CAACI,SAAR,CAAkBE,KAA1C,IAAmD,CAAnD,GAAuDJ,WADnC,GAEpBD,aAFJ;AAGA,QAAMM,eAAe,GAAGP,OAAO,CAACQ,KAAR,GACpB,CAACR,OAAO,CAACK,MAAR,CAAeC,KAAf,GAAuBN,OAAO,CAACQ,KAAR,CAAcF,KAAtC,IAA+C,CAA/C,GAAmDJ,WAD/B,GAEpBD,aAFJ,CAZ8D,CAgB9D;AACA;;AACA,QAAMQ,WAAW,GAAGT,OAAO,CAACK,MAAR,CAAeC,KAAf,GAAuB,CAA3C;AAEA,QAAMI,QAAQ,GAAGd,GAAG,CAClBE,OAAO,CAACY,QAAR,CAAiBC,WAAjB,CAA6B;AAC3BC,IAAAA,UAAU,EAAE,CAAC,CAAD,EAAI,CAAJ,CADe;AAE3BC,IAAAA,WAAW,EAAE,CAAC,CAAD,EAAI,C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GAAP;AAMD;AAED,OAAO,SAASc,cAAT,GAAwD;AAC7D,SAAO,EAAP;AACD","sourcesContent":["import { Animated, I18nManager } from 'react-native';\n\nimport type {\n StackHeaderInterpolatedStyle,\n StackHeaderInterpolationProps,\n} from '../types';\n\nconst { add } = Animated;\n\n/**\n * Standard UIKit style animation for the header where the title fades into the back button label.\n */\nexport function forUIKit({\n current,\n next,\n layouts,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const defaultOffset = 100;\n const leftSpacing = 27;\n\n // The title and back button title should cross-fade to each other\n // When screen is fully open, the title should be in center, and back title should be on left\n // When screen is closing, the previous title will animate to back title's position\n // And back title will animate to title's position\n // We achieve this by calculating the offsets needed to translate title to back title's position and vice-versa\n const leftLabelOffset = layouts.leftLabel\n ? (layouts.screen.width - layouts.leftLabel.width) / 2 - leftSpacing\n : defaultOffset;\n const titleLeftOffset = layouts.title\n ? (layouts.screen.width - layouts.title.width) / 2 - leftSpacing\n : defaultOffset;\n\n // When the current title is animating to right, it is centered in the right half of screen in middle of transition\n // The back title also animates in from this position\n const rightOffset = layouts.screen.width / 4;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n return {\n leftButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n leftLabelStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-rightOffset, 0, leftLabelOffset]\n : [leftLabelOffset, 0, -rightOffset],\n }),\n },\n ],\n },\n rightButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n titleStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.4, 1, 1.5],\n outputRange: [0, 0.1, 1, 0],\n }),\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0.5, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-titleLeftOffset, 0, rightOffset]\n : [rightOffset, 0, -titleLeftOffset],\n }),\n },\n ],\n },\n backgroundStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-layouts.screen.width, 0, layouts.screen.width]\n : [layouts.screen.width, 0, -layouts.screen.width],\n }),\n },\n ],\n },\n };\n}\n\n/**\n * Simple fade animation for the header elements.\n */\nexport function forFade({\n current,\n next,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0, 1, 0],\n });\n\n return {\n leftButtonStyle: { opacity },\n rightButtonStyle: { opacity },\n titleStyle: { opacity },\n backgroundStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1, 1.9, 2],\n outputRange: [0, 1, 1, 0],\n }),\n },\n };\n}\n\n/**\n * Simple translate animation to translate the header to left.\n */\nexport function forSlideLeft({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-screen.width, 0, screen.width]\n : [screen.width, 0, -screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to right.\n */\nexport function forSlideRight({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [screen.width, 0, -screen.width]\n : [-screen.width, 0, screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to slide up.\n */\nexport function forSlideUp({\n current,\n next,\n layouts: { header },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [-header.height, 0, -header.height],\n });\n\n const transform = [{ translateY }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\nexport function forNoAnimation(): StackHeaderInterpolatedStyle {\n return {};\n}\n"]}
|
|
1
|
+
{"version":3,"names":["Animated","I18nManager","add","forUIKit","current","next","layouts","defaultOffset","leftSpacing","leftLabelOffset","leftLabel","screen","width","titleLeftOffset","title","rightOffset","progress","interpolate","inputRange","outputRange","extrapolate","leftButtonStyle","opacity","leftLabelStyle","transform","translateX","getConstants","isRTL","rightButtonStyle","titleStyle","backgroundStyle","forFade","forSlideLeft","forSlideRight","forSlideUp","header","translateY","height","forNoAnimation"],"sources":["HeaderStyleInterpolators.tsx"],"sourcesContent":["import { Animated, I18nManager } from 'react-native';\n\nimport type {\n StackHeaderInterpolatedStyle,\n StackHeaderInterpolationProps,\n} from '../types';\n\nconst { add } = Animated;\n\n/**\n * Standard UIKit style animation for the header where the title fades into the back button label.\n */\nexport function forUIKit({\n current,\n next,\n layouts,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const defaultOffset = 100;\n const leftSpacing = 27;\n\n // The title and back button title should cross-fade to each other\n // When screen is fully open, the title should be in center, and back title should be on left\n // When screen is closing, the previous title will animate to back title's position\n // And back title will animate to title's position\n // We achieve this by calculating the offsets needed to translate title to back title's position and vice-versa\n const leftLabelOffset = layouts.leftLabel\n ? (layouts.screen.width - layouts.leftLabel.width) / 2 - leftSpacing\n : defaultOffset;\n const titleLeftOffset = layouts.title\n ? (layouts.screen.width - layouts.title.width) / 2 - leftSpacing\n : defaultOffset;\n\n // When the current title is animating to right, it is centered in the right half of screen in middle of transition\n // The back title also animates in from this position\n const rightOffset = layouts.screen.width / 4;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n return {\n leftButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n leftLabelStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-rightOffset, 0, leftLabelOffset]\n : [leftLabelOffset, 0, -rightOffset],\n }),\n },\n ],\n },\n rightButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n titleStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.4, 1, 1.5],\n outputRange: [0, 0.1, 1, 0],\n }),\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0.5, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-titleLeftOffset, 0, rightOffset]\n : [rightOffset, 0, -titleLeftOffset],\n }),\n },\n ],\n },\n backgroundStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-layouts.screen.width, 0, layouts.screen.width]\n : [layouts.screen.width, 0, -layouts.screen.width],\n }),\n },\n ],\n },\n };\n}\n\n/**\n * Simple fade animation for the header elements.\n */\nexport function forFade({\n current,\n next,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0, 1, 0],\n });\n\n return {\n leftButtonStyle: { opacity },\n rightButtonStyle: { opacity },\n titleStyle: { opacity },\n backgroundStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1, 1.9, 2],\n outputRange: [0, 1, 1, 0],\n }),\n },\n };\n}\n\n/**\n * Simple translate animation to translate the header to left.\n */\nexport function forSlideLeft({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [-screen.width, 0, screen.width]\n : [screen.width, 0, -screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to right.\n */\nexport function forSlideRight({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.getConstants().isRTL\n ? [screen.width, 0, -screen.width]\n : [-screen.width, 0, screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to slide up.\n */\nexport function forSlideUp({\n current,\n next,\n layouts: { header },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [-header.height, 0, -header.height],\n });\n\n const transform = [{ translateY }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\nexport function forNoAnimation(): StackHeaderInterpolatedStyle {\n return {};\n}\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,WAAnB,QAAsC,cAAtC;AAOA,MAAM;EAAEC;AAAF,IAAUF,QAAhB;AAEA;AACA;A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Z,CAAP;AAMD;AAED,OAAO,SAASc,cAAT,GAAwD;EAC7D,OAAO,EAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Platform","forBottomSheetAndroid","forFadeFromBottomAndroid","forFadeFromCenter","forFadeCard","forHorizontalIOS","forModalPresentationIOS","forRevealFromBottomAndroid","forScaleFromCenterAndroid","forVerticalIOS","forFade","BottomSheetSlideInSpec","BottomSheetSlideOutSpec","FadeInFromBottomAndroidSpec","FadeOutToBottomAndroidSpec","RevealFromBottomAndroidSpec","ScaleFromCenterAndroidSpec","TransitionIOSSpec","ANDROID_VERSION_PIE","ANDROID_VERSION_10","SlideFromRightIOS","gestureDirection","transitionSpec","open","close","cardStyleInterpolator","headerStyleInterpolator","ModalSlideFromBottomIOS","ModalPresentationIOS","FadeFromBottomAndroid","RevealFromBottomAndroid","ScaleFromCenterAndroid","BottomSheetAndroid","ModalFadeTransition","DefaultTransition","select","ios","android","Version","default","ModalTransition"],"sources":["TransitionPresets.tsx"],"sourcesContent":["import { Platform } from 'react-native';\n\nimport type { TransitionPreset } from '../types';\nimport {\n forBottomSheetAndroid,\n forFadeFromBottomAndroid,\n forFadeFromCenter as forFadeCard,\n forHorizontalIOS,\n forModalPresentationIOS,\n forRevealFromBottomAndroid,\n forScaleFromCenterAndroid,\n forVerticalIOS,\n} from './CardStyleInterpolators';\nimport { forFade } from './HeaderStyleInterpolators';\nimport {\n BottomSheetSlideInSpec,\n BottomSheetSlideOutSpec,\n FadeInFromBottomAndroidSpec,\n FadeOutToBottomAndroidSpec,\n RevealFromBottomAndroidSpec,\n ScaleFromCenterAndroidSpec,\n TransitionIOSSpec,\n} from './TransitionSpecs';\n\nconst ANDROID_VERSION_PIE = 28;\nconst ANDROID_VERSION_10 = 29;\n\n/**\n * Standard iOS navigation transition.\n */\nexport const SlideFromRightIOS: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forHorizontalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS navigation transition for modals.\n */\nexport const ModalSlideFromBottomIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forVerticalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS modal presentation style (introduced in iOS 13).\n */\nexport const ModalPresentationIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forModalPresentationIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android < 9 (Oreo).\n */\nexport const FadeFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: FadeInFromBottomAndroidSpec,\n close: FadeOutToBottomAndroidSpec,\n },\n cardStyleInterpolator: forFadeFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 9 (Pie).\n */\nexport const RevealFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: RevealFromBottomAndroidSpec,\n close: RevealFromBottomAndroidSpec,\n },\n cardStyleInterpolator: forRevealFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 10 (Q).\n */\nexport const ScaleFromCenterAndroid: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: ScaleFromCenterAndroidSpec,\n close: ScaleFromCenterAndroidSpec,\n },\n cardStyleInterpolator: forScaleFromCenterAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard bottom sheet slide transition for Android 10.\n */\nexport const BottomSheetAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: BottomSheetSlideInSpec,\n close: BottomSheetSlideOutSpec,\n },\n cardStyleInterpolator: forBottomSheetAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Fade transition for transparent modals.\n */\nexport const ModalFadeTransition: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: BottomSheetSlideInSpec,\n close: BottomSheetSlideOutSpec,\n },\n cardStyleInterpolator: forFadeCard,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Default navigation transition for the current platform.\n */\nexport const DefaultTransition = Platform.select({\n ios: SlideFromRightIOS,\n android:\n Platform.Version >= ANDROID_VERSION_10\n ? ScaleFromCenterAndroid\n : Platform.Version >= ANDROID_VERSION_PIE\n ? RevealFromBottomAndroid\n : FadeFromBottomAndroid,\n default: ScaleFromCenterAndroid,\n});\n\n/**\n * Default modal transition for the current platform.\n */\nexport const ModalTransition = Platform.select({\n ios: ModalPresentationIOS,\n default: BottomSheetAndroid,\n});\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,cAAzB;AAGA,SACEC,qBADF,EAEEC,wBAFF,EAGEC,iBAAiB,IAAIC,WAHvB,EAIEC,gBAJF,EAKEC,uBALF,EAMEC,0BANF,EAOEC,yBAPF,EAQEC,cARF,QASO,0BATP;AAUA,SAASC,OAAT,QAAwB,4BAAxB;AACA,SACEC,sBADF,EAEEC,uBAFF,EAGEC,2BAHF,EAIEC,0BAJF,EAKEC,2BALF,EAMEC,0BANF,EAOEC,iBAPF,QAQO,mBARP;AAUA,MAAMC,mBAAmB,GAAG,EAA5B;AACA,MAAMC,kBAAkB,GAAG,EAA3B;AAEA;AACA;AACA;;AACA,OAAO,MAAMC,iBAAmC,GAAG;EACjDC,gBAAgB,EAAE,YAD+B;EAEjDC,cAAc,EAAE;IACdC,IAAI,EAAEN,iBADQ;IAEdO,KAAK,EAAEP;EAFO,CAFiC;EAMjDQ,qBAAqB,EAAEpB,gBAN0B;EAOjDqB,uBAAuB,EAAEhB;AAPwB,CAA5C;AAU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