UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 3.34 kB
{"ast":null,"code":"\"use strict\";\n\nimport PixelRatio from \"react-native-web/dist/exports/PixelRatio\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nexport function getDefaultHeaderHeight(layout, modalPresentation, topInset) {\n let headerHeight;\n const hasDynamicIsland = Platform.OS === 'ios' && topInset > 50;\n const statusBarHeight = hasDynamicIsland ? topInset - (5 + 1 / PixelRatio.get()) : topInset;\n const isLandscape = layout.width > layout.height;\n if (Platform.OS === 'ios') {\n if (Platform.isPad || Platform.isTV) {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 50;\n }\n } else {\n if (isLandscape) {\n headerHeight = 32;\n } else {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 44;\n }\n }\n }\n } else {\n headerHeight = 64;\n }\n return headerHeight + statusBarHeight;\n}","map":{"version":3,"names":["getDefaultHeaderHeight","layout","modalPresentation","topInset","headerHeight","hasDynamicIsland","Platform","OS","statusBarHeight","PixelRatio","get","isLandscape","width","height","isPad","isTV"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx"],"sourcesContent":["import { PixelRatio, Platform } from 'react-native';\n\nimport type { Layout } from '../types';\n\nexport function getDefaultHeaderHeight(\n layout: Layout,\n modalPresentation: boolean,\n topInset: number\n): number {\n let headerHeight;\n\n // On models with Dynamic Island the status bar height is smaller than the safe area top inset.\n const hasDynamicIsland = Platform.OS === 'ios' && topInset > 50;\n const statusBarHeight = hasDynamicIsland\n ? topInset - (5 + 1 / PixelRatio.get())\n : topInset;\n\n const isLandscape = layout.width > layout.height;\n\n if (Platform.OS === 'ios') {\n if (Platform.isPad || Platform.isTV) {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 50;\n }\n } else {\n if (isLandscape) {\n headerHeight = 32;\n } else {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 44;\n }\n }\n }\n } else {\n headerHeight = 64;\n }\n\n return headerHeight + statusBarHeight;\n}\n"],"mappings":";;;;AAIA,OAAO,SAASA,sBAAsBA,CACpCC,MAAc,EACdC,iBAA0B,EAC1BC,QAAgB,EACR;EACR,IAAIC,YAAY;EAGhB,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,EAAE,KAAK,KAAK,IAAIJ,QAAQ,GAAG,EAAE;EAC/D,MAAMK,eAAe,GAAGH,gBAAgB,GACpCF,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAGM,UAAU,CAACC,GAAG,CAAC,CAAC,CAAC,GACrCP,QAAQ;EAEZ,MAAMQ,WAAW,GAAGV,MAAM,CAACW,KAAK,GAAGX,MAAM,CAACY,MAAM;EAEhD,IAAIP,QAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB,IAAID,QAAQ,CAACQ,KAAK,IAAIR,QAAQ,CAACS,IAAI,EAAE;MACnC,IAAIb,iBAAiB,EAAE;QACrBE,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACLA,YAAY,GAAG,EAAE;MACnB;IACF,CAAC,MAAM;MACL,IAAIO,WAAW,EAAE;QACfP,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACL,IAAIF,iBAAiB,EAAE;UACrBE,YAAY,GAAG,EAAE;QACnB,CAAC,MAAM;UACLA,YAAY,GAAG,EAAE;QACnB;MACF;IACF;EACF,CAAC,MAAM;IACLA,YAAY,GAAG,EAAE;EACnB;EAEA,OAAOA,YAAY,GAAGI,eAAe;AACvC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}