repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 9.08 kB
JSON
{"ast":null,"code":"\"use strict\";\n\nimport { NavigationContext, NavigationRouteContext } from '@react-navigation/native';\nimport * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { Background } from \"./Background.js\";\nimport { getDefaultHeaderHeight } from \"./Header/getDefaultHeaderHeight.js\";\nimport { HeaderHeightContext } from \"./Header/HeaderHeightContext.js\";\nimport { HeaderShownContext } from \"./Header/HeaderShownContext.js\";\nimport { useFrameSize } from \"./useFrameSize.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function Screen(props) {\n const insets = useSafeAreaInsets();\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const {\n focused,\n modal = false,\n header,\n headerShown = true,\n headerTransparent,\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n navigation,\n route,\n children,\n style\n } = props;\n const defaultHeaderHeight = useFrameSize(size => getDefaultHeaderHeight(size, modal, headerStatusBarHeight));\n const [headerHeight, setHeaderHeight] = React.useState(defaultHeaderHeight);\n return _jsxs(Background, {\n \"aria-hidden\": !focused,\n style: [styles.container, style],\n collapsable: false,\n children: [headerShown ? _jsx(NavigationContext.Provider, {\n value: navigation,\n children: _jsx(NavigationRouteContext.Provider, {\n value: route,\n children: _jsx(View, {\n pointerEvents: \"box-none\",\n onLayout: e => {\n const {\n height\n } = e.nativeEvent.layout;\n setHeaderHeight(height);\n },\n style: [styles.header, headerTransparent ? styles.absolute : null],\n children: header\n })\n })\n }) : null, _jsx(View, {\n style: styles.content,\n children: _jsx(HeaderShownContext.Provider, {\n value: isParentHeaderShown || headerShown !== false,\n children: _jsx(HeaderHeightContext.Provider, {\n value: headerShown ? headerHeight : parentHeaderHeight ?? 0,\n children: children\n })\n })\n })]\n });\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1\n },\n content: {\n flex: 1\n },\n header: {\n zIndex: 1\n },\n absolute: {\n position: 'absolute',\n top: 0,\n start: 0,\n end: 0\n }\n});","map":{"version":3,"names":["NavigationContext","NavigationRouteContext","React","StyleSheet","View","useSafeAreaInsets","Background","getDefaultHeaderHeight","HeaderHeightContext","HeaderShownContext","useFrameSize","jsx","_jsx","jsxs","_jsxs","Screen","props","insets","isParentHeaderShown","useContext","parentHeaderHeight","focused","modal","header","headerShown","headerTransparent","headerStatusBarHeight","top","navigation","route","children","style","defaultHeaderHeight","size","headerHeight","setHeaderHeight","useState","styles","container","collapsable","Provider","value","pointerEvents","onLayout","e","height","nativeEvent","layout","absolute","content","create","flex","zIndex","position","start","end"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/elements/src/Screen.tsx"],"sourcesContent":["import {\n NavigationContext,\n type NavigationProp,\n NavigationRouteContext,\n type ParamListBase,\n type RouteProp,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n type StyleProp,\n StyleSheet,\n View,\n type ViewStyle,\n} from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Background } from './Background';\nimport { getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight';\nimport { HeaderHeightContext } from './Header/HeaderHeightContext';\nimport { HeaderShownContext } from './Header/HeaderShownContext';\nimport { useFrameSize } from './useFrameSize';\n\ntype Props = {\n focused: boolean;\n modal?: boolean;\n navigation: NavigationProp<ParamListBase>;\n route: RouteProp<ParamListBase>;\n header: React.ReactNode;\n headerShown?: boolean;\n headerStatusBarHeight?: number;\n headerTransparent?: boolean;\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children: React.ReactNode;\n};\n\nexport function Screen(props: Props) {\n const insets = useSafeAreaInsets();\n\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n\n const {\n focused,\n modal = false,\n header,\n headerShown = true,\n headerTransparent,\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n navigation,\n route,\n children,\n style,\n } = props;\n\n const defaultHeaderHeight = useFrameSize((size) =>\n getDefaultHeaderHeight(size, modal, headerStatusBarHeight)\n );\n\n const [headerHeight, setHeaderHeight] = React.useState(defaultHeaderHeight);\n\n return (\n <Background\n aria-hidden={!focused}\n style={[styles.container, style]}\n // On Fabric we need to disable collapsing for the background to ensure\n // that we won't render unnecessary views due to the view flattening.\n collapsable={false}\n >\n {headerShown ? (\n <NavigationContext.Provider value={navigation}>\n <NavigationRouteContext.Provider value={route}>\n <View\n pointerEvents=\"box-none\"\n onLayout={(e) => {\n const { height } = e.nativeEvent.layout;\n\n setHeaderHeight(height);\n }}\n style={[\n styles.header,\n headerTransparent ? styles.absolute : null,\n ]}\n >\n {header}\n </View>\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n ) : null}\n <View style={styles.content}>\n <HeaderShownContext.Provider\n value={isParentHeaderShown || headerShown !== false}\n >\n <HeaderHeightContext.Provider\n value={headerShown ? headerHeight : (parentHeaderHeight ?? 0)}\n >\n {children}\n </HeaderHeightContext.Provider>\n </HeaderShownContext.Provider>\n </View>\n </Background>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n content: {\n flex: 1,\n },\n header: {\n zIndex: 1,\n },\n absolute: {\n position: 'absolute',\n top: 0,\n start: 0,\n end: 0,\n },\n});\n"],"mappings":";;AAAA,SACEA,iBAAiB,EAEjBC,sBAAsB,QAGjB,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAQ9B,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,UAAU;AACnB,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,kBAAkB;AAC3B,SAASC,Y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