@react-navigation/elements 1.2.1 → 1.3.2
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/Background.js +5 -4
- package/lib/commonjs/Background.js.map +1 -1
- package/lib/commonjs/Header/HeaderBackButton.js +20 -19
- package/lib/commonjs/Header/HeaderBackButton.js.map +1 -1
- package/lib/commonjs/Header/HeaderBackground.js +5 -4
- package/lib/commonjs/Header/HeaderBackground.js.map +1 -1
- package/lib/commonjs/Header/HeaderTitle.js +6 -5
- package/lib/commonjs/Header/HeaderTitle.js.map +1 -1
- package/lib/commonjs/Header/getDefaultHeaderHeight.js +1 -1
- package/lib/commonjs/Header/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/MaskedView.js +4 -3
- package/lib/commonjs/MaskedView.js.map +1 -1
- package/lib/commonjs/MaskedViewNative.js +6 -4
- package/lib/commonjs/MaskedViewNative.js.map +1 -1
- package/lib/commonjs/MissingIcon.js +6 -5
- package/lib/commonjs/MissingIcon.js.map +1 -1
- package/lib/commonjs/PlatformPressable.js +10 -9
- package/lib/commonjs/PlatformPressable.js.map +1 -1
- package/lib/commonjs/ResourceSavingView.js +8 -6
- package/lib/commonjs/ResourceSavingView.js.map +1 -1
- package/lib/commonjs/SafeAreaProviderCompat.js +5 -4
- package/lib/commonjs/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/index.js +19 -19
- package/lib/module/Background.js +5 -4
- package/lib/module/Background.js.map +1 -1
- package/lib/module/Header/HeaderBackButton.js +20 -19
- package/lib/module/Header/HeaderBackButton.js.map +1 -1
- package/lib/module/Header/HeaderBackground.js +5 -4
- package/lib/module/Header/HeaderBackground.js.map +1 -1
- package/lib/module/Header/HeaderTitle.js +6 -5
- package/lib/module/Header/HeaderTitle.js.map +1 -1
- package/lib/module/Header/getDefaultHeaderHeight.js +1 -1
- package/lib/module/Header/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/MaskedView.js +4 -3
- package/lib/module/MaskedView.js.map +1 -1
- package/lib/module/MaskedViewNative.js +6 -4
- package/lib/module/MaskedViewNative.js.map +1 -1
- package/lib/module/MissingIcon.js +6 -5
- package/lib/module/MissingIcon.js.map +1 -1
- package/lib/module/PlatformPressable.js +10 -9
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/ResourceSavingView.js +8 -6
- package/lib/module/ResourceSavingView.js.map +1 -1
- package/lib/module/SafeAreaProviderCompat.js +5 -4
- package/lib/module/SafeAreaProviderCompat.js.map +1 -1
- package/lib/typescript/src/Header/HeaderBackground.d.ts +1 -1
- package/lib/typescript/src/types.d.ts +19 -17
- package/package.json +5 -5
- package/src/Header/HeaderBackButton.tsx +3 -2
- package/src/Header/HeaderBackground.tsx +1 -1
- package/src/Header/getDefaultHeaderHeight.tsx +1 -1
- package/src/types.tsx +20 -17
|
@@ -17,10 +17,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || 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); }
|
|
19
19
|
|
|
20
|
-
function Background({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
function Background(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
24
25
|
const {
|
|
25
26
|
colors
|
|
26
27
|
} = (0, _native.useTheme)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Background.tsx"],"names":["Background","style","rest","colors","flex","backgroundColor","background"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAMe,SAASA,UAAT,
|
|
1
|
+
{"version":3,"sources":["Background.tsx"],"names":["Background","style","rest","colors","flex","backgroundColor","background"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAMe,SAASA,UAAT,OAA+C;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAC5D,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,iBAAD,eACMD,IADN;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEE,MAAAA,IAAI,EAAE,CAAR;AAAWC,MAAAA,eAAe,EAAEF,MAAM,CAACG;AAAnC,KAAD,EAAkDL,KAAlD;AAFT,KADF;AAMD","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { View, ViewProps } from 'react-native';\n\ntype Props = ViewProps & {\n children: React.ReactNode;\n};\n\nexport default function Background({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <View\n {...rest}\n style={[{ flex: 1, backgroundColor: colors.background }, style]}\n />\n );\n}\n"]}
|
|
@@ -21,25 +21,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
function HeaderBackButton({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
function HeaderBackButton(_ref) {
|
|
25
|
+
let {
|
|
26
|
+
disabled,
|
|
27
|
+
allowFontScaling,
|
|
28
|
+
backImage,
|
|
29
|
+
label,
|
|
30
|
+
labelStyle,
|
|
31
|
+
labelVisible,
|
|
32
|
+
onLabelLayout,
|
|
33
|
+
onPress,
|
|
34
|
+
pressColor,
|
|
35
|
+
pressOpacity,
|
|
36
|
+
screenLayout,
|
|
37
|
+
tintColor: customTintColor,
|
|
38
|
+
titleLayout,
|
|
39
|
+
truncatedLabel = 'Back',
|
|
40
|
+
accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
|
|
41
|
+
testID,
|
|
42
|
+
style
|
|
43
|
+
} = _ref;
|
|
43
44
|
const {
|
|
44
45
|
colors
|
|
45
46
|
} = (0, _native.useTheme)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderBackButton.tsx"],"names":["HeaderBackButton","disabled","allowFontScaling","backImage","label","labelStyle","labelVisible","onLabelLayout","onPress","pressColor","pressOpacity","screenLayout","tintColor","customTintColor","titleLayout","truncatedLabel","accessibilityLabel","testID","style","colors","initialLabelWidth","setInitialLabelWidth","React","useState","undefined","Platform","select","ios","primary","default","text","handleLabelLayout","e","nativeEvent","layout","x","width","shouldTruncateLabel","renderBackImage","styles","icon","Boolean","iconWithLabel","require","renderLabel","leftLabelText","labelElement","labelWrapper","minWidth","color","OS","iconMaskContainer","iconMask","iconMaskFillerRect","handlePress","requestAnimationFrame","borderless","container","top","right","bottom","left","StyleSheet","create","alignItems","flexDirection","hairlineWidth","marginVertical","marginHorizontal","opacity","fontSize","letterSpacing","height","marginLeft","marginRight","resizeMode","transform","scaleX","I18nManager","isRTL","margin","flex","justifyContent","backgroundColor","alignSelf"],"mappings":";;;;;;;AAAA;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18nManager,\n Image,\n LayoutChangeEvent,\n Platform,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport MaskedView from '../MaskedView';\nimport PlatformPressable from '../PlatformPressable';\nimport type { HeaderBackButtonProps } from '../types';\n\nexport default function HeaderBackButton({\n disabled,\n allowFontScaling,\n backImage,\n label,\n labelStyle,\n labelVisible,\n onLabelLayout,\n onPress,\n pressColor,\n pressOpacity,\n screenLayout,\n tintColor: customTintColor,\n titleLayout,\n truncatedLabel = 'Back',\n accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',\n testID,\n style,\n}: HeaderBackButtonProps) {\n const { colors } = useTheme();\n\n const [initialLabelWidth, setInitialLabelWidth] =\n React.useState<undefined | number>(undefined);\n\n const tintColor =\n customTintColor !== undefined\n ? customTintColor\n : Platform.select({\n ios: colors.primary,\n default: colors.text,\n });\n\n const handleLabelLayout = (e: LayoutChangeEvent) => {\n onLabelLayout?.(e);\n\n setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);\n };\n\n const shouldTruncateLabel = () => {\n return (\n !label ||\n (initialLabelWidth &&\n titleLayout &&\n screenLayout &&\n (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)\n );\n };\n\n const renderBackImage = () => {\n if (backImage) {\n return backImage({ tintColor });\n } else {\n return (\n <Image\n style={[\n styles.icon,\n Boolean(labelVisible) && styles.iconWithLabel,\n Boolean(tintColor) && { tintColor },\n ]}\n source={require('../assets/back-icon.png')}\n fadeDuration={0}\n />\n );\n }\n };\n\n const renderLabel = () => {\n const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;\n\n if (!labelVisible || leftLabelText === undefined) {\n return null;\n }\n\n const labelElement = (\n <View\n style={\n screenLayout\n ? // We make the button extend till the middle of the screen\n // Otherwise it appears to cut off when translating\n [styles.labelWrapper, { minWidth: screenLayout.width / 2 - 27 }]\n : null\n }\n >\n <Animated.Text\n accessible={false}\n onLayout={\n // This measurement is used to determine if we should truncate the label when it doesn't fit\n // Only measure it when label is not truncated because we want the measurement of full label\n leftLabelText === label ? handleLabelLayout : undefined\n }\n style={[\n styles.label,\n tintColor ? { color: tintColor } : null,\n labelStyle,\n ]}\n numberOfLines={1}\n allowFontScaling={!!allowFontScaling}\n >\n {leftLabelText}\n </Animated.Text>\n </View>\n );\n\n if (backImage || Platform.OS !== 'ios') {\n // When a custom backimage is specified, we can't mask the label\n // Otherwise there might be weird effect due to our mask not being the same as the image\n return labelElement;\n }\n\n return (\n <MaskedView\n maskElement={\n <View style={styles.iconMaskContainer}>\n <Image\n source={require('../assets/back-icon-mask.png')}\n style={styles.iconMask}\n />\n <View style={styles.iconMaskFillerRect} />\n </View>\n }\n >\n {labelElement}\n </MaskedView>\n );\n };\n\n const handlePress = () => onPress && requestAnimationFrame(onPress);\n\n return (\n <PlatformPressable\n disabled={disabled}\n accessible\n accessibilityRole=\"button\"\n accessibilityLabel={accessibilityLabel}\n testID={testID}\n onPress={disabled ? undefined : handlePress}\n pressColor={pressColor}\n pressOpacity={pressOpacity}\n android_ripple={{ borderless: true }}\n style={[styles.container, disabled && styles.disabled, style]}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n >\n <React.Fragment>\n {renderBackImage()}\n {renderLabel()}\n </React.Fragment>\n </PlatformPressable>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n minWidth: StyleSheet.hairlineWidth, // Avoid collapsing when title is long\n ...Platform.select({\n ios: null,\n default: {\n marginVertical: 3,\n marginHorizontal: 11,\n },\n }),\n },\n disabled: {\n opacity: 0.5,\n },\n label: {\n fontSize: 17,\n // Title and back label are a bit different width due to title being bold\n // Adjusting the letterSpacing makes them coincide better\n letterSpacing: 0.35,\n },\n labelWrapper: {\n // These styles will make sure that the label doesn't fill the available space\n // Otherwise it messes with the measurement of the label\n flexDirection: 'row',\n alignItems: 'flex-start',\n },\n icon: Platform.select({\n ios: {\n height: 21,\n width: 13,\n marginLeft: 8,\n marginRight: 22,\n marginVertical: 12,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n default: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n }),\n iconWithLabel:\n Platform.OS === 'ios'\n ? {\n marginRight: 6,\n }\n : {},\n iconMaskContainer: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n iconMaskFillerRect: {\n flex: 1,\n backgroundColor: '#000',\n },\n iconMask: {\n height: 21,\n width: 13,\n marginLeft: -14.5,\n marginVertical: 12,\n alignSelf: 'center',\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["HeaderBackButton.tsx"],"names":["HeaderBackButton","disabled","allowFontScaling","backImage","label","labelStyle","labelVisible","onLabelLayout","onPress","pressColor","pressOpacity","screenLayout","tintColor","customTintColor","titleLayout","truncatedLabel","accessibilityLabel","testID","style","colors","initialLabelWidth","setInitialLabelWidth","React","useState","undefined","Platform","select","ios","primary","default","text","handleLabelLayout","e","nativeEvent","layout","x","width","shouldTruncateLabel","renderBackImage","styles","icon","Boolean","iconWithLabel","require","renderLabel","leftLabelText","labelElement","labelWrapper","minWidth","color","OS","iconMaskContainer","iconMask","iconMaskFillerRect","handlePress","requestAnimationFrame","borderless","container","top","right","bottom","left","StyleSheet","create","alignItems","flexDirection","hairlineWidth","marginVertical","marginHorizontal","opacity","fontSize","letterSpacing","height","marginLeft","marginRight","resizeMode","transform","scaleX","I18nManager","isRTL","margin","flex","justifyContent","backgroundColor","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAUA;;AACA;;;;;;;;AAGe,SAASA,gBAAT,OAkBW;AAAA,MAlBe;AACvCC,IAAAA,QADuC;AAEvCC,IAAAA,gBAFuC;AAGvCC,IAAAA,SAHuC;AA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AUpBlD,IAAAA,OAAO,EAAE;AACP2C,MAAAA,MAAM,EAAE,EADD;AAEPpC,MAAAA,KAAK,EAAE,EAFA;AAGP4C,MAAAA,MAAM,EAAE,CAHD;AAIPL,MAAAA,UAAU,EAAE,SAJL;AAKPC,MAAAA,SAAS,EAAE,CAAC;AAAEC,QAAAA,MAAM,EAAEC,yBAAYC,KAAZ,GAAoB,CAAC,CAArB,GAAyB;AAAnC,OAAD;AALJ;AAVW,GAAhB,CA5ByB;AA8C/BrC,EAAAA,aAAa,EACXjB,sBAASyB,EAAT,KAAgB,KAAhB,GACI;AACEwB,IAAAA,WAAW,EAAE;AADf,GADJ,GAII,EAnDyB;AAoD/BvB,EAAAA,iBAAiB,EAAE;AACjB8B,IAAAA,IAAI,EAAE,CADW;AAEjBhB,IAAAA,aAAa,EAAE,KAFE;AAGjBiB,IAAAA,cAAc,EAAE;AAHC,GApDY;AAyD/B7B,EAAAA,kBAAkB,EAAE;AAClB4B,IAAAA,IAAI,EAAE,CADY;AAElBE,IAAAA,eAAe,EAAE;AAFC,GAzDW;AA6D/B/B,EAAAA,QAAQ,EAAE;AACRoB,IAAAA,MAAM,EAAE,EADA;AAERpC,IAAAA,KAAK,EAAE,EAFC;AAGRqC,IAAAA,UAAU,EAAE,CAAC,IAHL;AAIRN,IAAAA,cAAc,EAAE,EAJR;AAKRiB,IAAAA,SAAS,EAAE,QALH;AAMRT,IAAAA,UAAU,EAAE,SANJ;AAORC,IAAAA,SAAS,EAAE,CAAC;AAAEC,MAAAA,MAAM,EAAEC,yBAAYC,KAAZ,GAAoB,CAAC,CAArB,GAAyB;AAAnC,KAAD;AAPH;AA7DqB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n I18nManager,\n Image,\n LayoutChangeEvent,\n Platform,\n StyleSheet,\n View,\n} from 'react-native';\n\nimport MaskedView from '../MaskedView';\nimport PlatformPressable from '../PlatformPressable';\nimport type { HeaderBackButtonProps } from '../types';\n\nexport default function HeaderBackButton({\n disabled,\n allowFontScaling,\n backImage,\n label,\n labelStyle,\n labelVisible,\n onLabelLayout,\n onPress,\n pressColor,\n pressOpacity,\n screenLayout,\n tintColor: customTintColor,\n titleLayout,\n truncatedLabel = 'Back',\n accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',\n testID,\n style,\n}: HeaderBackButtonProps) {\n const { colors } = useTheme();\n\n const [initialLabelWidth, setInitialLabelWidth] = React.useState<\n undefined | number\n >(undefined);\n\n const tintColor =\n customTintColor !== undefined\n ? customTintColor\n : Platform.select({\n ios: colors.primary,\n default: colors.text,\n });\n\n const handleLabelLayout = (e: LayoutChangeEvent) => {\n onLabelLayout?.(e);\n\n setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);\n };\n\n const shouldTruncateLabel = () => {\n return (\n !label ||\n (initialLabelWidth &&\n titleLayout &&\n screenLayout &&\n (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)\n );\n };\n\n const renderBackImage = () => {\n if (backImage) {\n return backImage({ tintColor });\n } else {\n return (\n <Image\n style={[\n styles.icon,\n Boolean(labelVisible) && styles.iconWithLabel,\n Boolean(tintColor) && { tintColor },\n ]}\n source={require('../assets/back-icon.png')}\n fadeDuration={0}\n />\n );\n }\n };\n\n const renderLabel = () => {\n const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;\n\n if (!labelVisible || leftLabelText === undefined) {\n return null;\n }\n\n const labelElement = (\n <View\n style={\n screenLayout\n ? // We make the button extend till the middle of the screen\n // Otherwise it appears to cut off when translating\n [styles.labelWrapper, { minWidth: screenLayout.width / 2 - 27 }]\n : null\n }\n >\n <Animated.Text\n accessible={false}\n onLayout={\n // This measurement is used to determine if we should truncate the label when it doesn't fit\n // Only measure it when label is not truncated because we want the measurement of full label\n leftLabelText === label ? handleLabelLayout : undefined\n }\n style={[\n styles.label,\n tintColor ? { color: tintColor } : null,\n labelStyle,\n ]}\n numberOfLines={1}\n allowFontScaling={!!allowFontScaling}\n >\n {leftLabelText}\n </Animated.Text>\n </View>\n );\n\n if (backImage || Platform.OS !== 'ios') {\n // When a custom backimage is specified, we can't mask the label\n // Otherwise there might be weird effect due to our mask not being the same as the image\n return labelElement;\n }\n\n return (\n <MaskedView\n maskElement={\n <View style={styles.iconMaskContainer}>\n <Image\n source={require('../assets/back-icon-mask.png')}\n style={styles.iconMask}\n />\n <View style={styles.iconMaskFillerRect} />\n </View>\n }\n >\n {labelElement}\n </MaskedView>\n );\n };\n\n const handlePress = () => onPress && requestAnimationFrame(onPress);\n\n return (\n <PlatformPressable\n disabled={disabled}\n accessible\n accessibilityRole=\"button\"\n accessibilityLabel={accessibilityLabel}\n testID={testID}\n onPress={disabled ? undefined : handlePress}\n pressColor={pressColor}\n pressOpacity={pressOpacity}\n android_ripple={{ borderless: true }}\n style={[styles.container, disabled && styles.disabled, style]}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n >\n <React.Fragment>\n {renderBackImage()}\n {renderLabel()}\n </React.Fragment>\n </PlatformPressable>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n minWidth: StyleSheet.hairlineWidth, // Avoid collapsing when title is long\n ...Platform.select({\n ios: null,\n default: {\n marginVertical: 3,\n marginHorizontal: 11,\n },\n }),\n },\n disabled: {\n opacity: 0.5,\n },\n label: {\n fontSize: 17,\n // Title and back label are a bit different width due to title being bold\n // Adjusting the letterSpacing makes them coincide better\n letterSpacing: 0.35,\n },\n labelWrapper: {\n // These styles will make sure that the label doesn't fill the available space\n // Otherwise it messes with the measurement of the label\n flexDirection: 'row',\n alignItems: 'flex-start',\n },\n icon: Platform.select({\n ios: {\n height: 21,\n width: 13,\n marginLeft: 8,\n marginRight: 22,\n marginVertical: 12,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n default: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n }),\n iconWithLabel:\n Platform.OS === 'ios'\n ? {\n marginRight: 6,\n }\n : {},\n iconMaskContainer: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n iconMaskFillerRect: {\n flex: 1,\n backgroundColor: '#000',\n },\n iconMask: {\n height: 21,\n width: 13,\n marginLeft: -14.5,\n marginVertical: 12,\n alignSelf: 'center',\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n});\n"]}
|
|
@@ -17,10 +17,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || 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); }
|
|
19
19
|
|
|
20
|
-
function HeaderBackground({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
function HeaderBackground(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
24
25
|
const {
|
|
25
26
|
colors
|
|
26
27
|
} = (0, _native.useTheme)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderBackground.tsx"],"names":["HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAce,SAASA,gBAAT,
|
|
1
|
+
{"version":3,"sources":["HeaderBackground.tsx"],"names":["HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAce,SAASA,gBAAT,OAAqD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLC,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;;AAED,MAAME,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,IAAI,EAAE,CADG;AAET,OAAGC,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEZ,wBAAWa;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEf,wBAAWa;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = Omit<ViewProps, 'style'> & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
|
|
@@ -17,11 +17,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || 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); }
|
|
19
19
|
|
|
20
|
-
function HeaderTitle({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function HeaderTitle(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
tintColor,
|
|
23
|
+
style,
|
|
24
|
+
...rest
|
|
25
|
+
} = _ref;
|
|
25
26
|
const {
|
|
26
27
|
colors
|
|
27
28
|
} = (0, _native.useTheme)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderTitle.tsx"],"names":["HeaderTitle","tintColor","style","rest","colors","styles","title","color","undefined","text","StyleSheet","create","Platform","select","ios","fontSize","fontWeight","android","fontFamily","default"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAee,SAASA,WAAT,
|
|
1
|
+
{"version":3,"sources":["HeaderTitle.tsx"],"names":["HeaderTitle","tintColor","style","rest","colors","styles","title","color","undefined","text","StyleSheet","create","Platform","select","ios","fontSize","fontWeight","android","fontFamily","default"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAee,SAASA,WAAT,OAA2D;AAAA,MAAtC;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,KAAb;AAAoB,OAAGC;AAAvB,GAAsC;AACxE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,iBAAiB,EAAC,QADpB;AAEE,kBAAW,GAFb;AAGE,IAAA,aAAa,EAAE;AAHjB,KAIMD,IAJN;AAKE,IAAA,KAAK,EAAE,CACLE,MAAM,CAACC,KADF,EAEL;AAAEC,MAAAA,KAAK,EAAEN,SAAS,KAAKO,SAAd,GAA0BJ,MAAM,CAACK,IAAjC,GAAwCR;AAAjD,KAFK,EAGLC,KAHK;AALT,KADF;AAaD;;AAED,MAAMG,MAAM,GAAGK,wBAAWC,MAAX,CAAkB;AAC/BL,EAAAA,KAAK,EAAEM,sBAASC,MAAT,CAAgB;AACrBC,IAAAA,GAAG,EAAE;AACHC,MAAAA,QAAQ,EAAE,EADP;AAEHC,MAAAA,UAAU,EAAE;AAFT,KADgB;AAKrBC,IAAAA,OAAO,EAAE;AACPF,MAAAA,QAAQ,EAAE,EADH;AAEPG,MAAAA,UAAU,EAAE,mBAFL;AAGPF,MAAAA,UAAU,EAAE;AAHL,KALY;AAUrBG,IAAAA,OAAO,EAAE;AACPJ,MAAAA,QAAQ,EAAE,EADH;AAEPC,MAAAA,UAAU,EAAE;AAFL;AAVY,GAAhB;AADwB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n TextProps,\n TextStyle,\n} from 'react-native';\n\ntype Props = Omit<TextProps, 'style'> & {\n tintColor?: string;\n children?: string;\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function HeaderTitle({ tintColor, style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.Text\n accessibilityRole=\"header\"\n aria-level=\"1\"\n numberOfLines={1}\n {...rest}\n style={[\n styles.title,\n { color: tintColor === undefined ? colors.text : tintColor },\n style,\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n title: Platform.select({\n ios: {\n fontSize: 17,\n fontWeight: '600',\n },\n android: {\n fontSize: 20,\n fontFamily: 'sans-serif-medium',\n fontWeight: 'normal',\n },\n default: {\n fontSize: 18,\n fontWeight: '500',\n },\n }),\n});\n"]}
|
|
@@ -12,7 +12,7 @@ function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) {
|
|
|
12
12
|
const isLandscape = layout.width > layout.height;
|
|
13
13
|
|
|
14
14
|
if (_reactNative.Platform.OS === 'ios') {
|
|
15
|
-
if (_reactNative.Platform.isPad) {
|
|
15
|
+
if (_reactNative.Platform.isPad || _reactNative.Platform.isTVOS) {
|
|
16
16
|
if (modalPresentation) {
|
|
17
17
|
headerHeight = 56;
|
|
18
18
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["getDefaultHeaderHeight.tsx"],"names":["getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","Platform","OS","isPad"],"mappings":";;;;;;;AAAA;;AAIe,SAASA,sBAAT,CACbC,MADa,EAEbC,iBAFa,EAGbC,eAHa,EAIL;AACR,MAAIC,YAAJ;AAEA,QAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAP,GAAeL,MAAM,CAACM,MAA1C;;AAEA,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,QAAID,sBAASE,
|
|
1
|
+
{"version":3,"sources":["getDefaultHeaderHeight.tsx"],"names":["getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","Platform","OS","isPad","isTVOS"],"mappings":";;;;;;;AAAA;;AAIe,SAASA,sBAAT,CACbC,MADa,EAEbC,iBAFa,EAGbC,eAHa,EAIL;AACR,MAAIC,YAAJ;AAEA,QAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAP,GAAeL,MAAM,CAACM,MAA1C;;AAEA,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,QAAID,sBAASE,KAAT,IAAkBF,sBAASG,MAA/B,EAAuC;AACrC,UAAIT,iBAAJ,EAAuB;AACrBE,QAAAA,YAAY,GAAG,EAAf;AACD,OAFD,MAEO;AACLA,QAAAA,YAAY,GAAG,EAAf;AACD;AACF,KAND,MAMO;AACL,UAAIC,WAAJ,EAAiB;AACfD,QAAAA,YAAY,GAAG,EAAf;AACD,OAFD,MAEO;AACL,YAAIF,iBAAJ,EAAuB;AACrBE,UAAAA,YAAY,GAAG,EAAf;AACD,SAFD,MAEO;AACLA,UAAAA,YAAY,GAAG,EAAf;AACD;AACF;AACF;AACF,GAlBD,MAkBO,IAAII,sBAASC,EAAT,KAAgB,SAApB,EAA+B;AACpCL,IAAAA,YAAY,GAAG,EAAf;AACD,GAFM,MAEA;AACLA,IAAAA,YAAY,GAAG,EAAf;AACD;;AAED,SAAOA,YAAY,GAAGD,eAAtB;AACD","sourcesContent":["import { Platform } from 'react-native';\n\nimport type { Layout } from '../types';\n\nexport default function getDefaultHeaderHeight(\n layout: Layout,\n modalPresentation: boolean,\n statusBarHeight: number\n): number {\n let headerHeight;\n\n const isLandscape = layout.width > layout.height;\n\n if (Platform.OS === 'ios') {\n if (Platform.isPad || Platform.isTVOS) {\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 if (Platform.OS === 'android') {\n headerHeight = 56;\n } else {\n headerHeight = 64;\n }\n\n return headerHeight + statusBarHeight;\n}\n"]}
|
|
@@ -8,9 +8,10 @@ exports.default = MaskedView;
|
|
|
8
8
|
/**
|
|
9
9
|
* Use a stub for MaskedView on all Platforms that don't support it.
|
|
10
10
|
*/
|
|
11
|
-
function MaskedView({
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function MaskedView(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
14
15
|
return children;
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=MaskedView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MaskedView.tsx"],"names":["MaskedView","children"],"mappings":";;;;;;;AAAA;AACA;AACA;AAQe,SAASA,UAAT,
|
|
1
|
+
{"version":3,"sources":["MaskedView.tsx"],"names":["MaskedView","children"],"mappings":";;;;;;;AAAA;AACA;AACA;AAQe,SAASA,UAAT,OAAyC;AAAA,MAArB;AAAEC,IAAAA;AAAF,GAAqB;AACtD,SAAOA,QAAP;AACD","sourcesContent":["/**\n * Use a stub for MaskedView on all Platforms that don't support it.\n */\nimport type * as React from 'react';\n\ntype Props = {\n maskElement: React.ReactElement;\n children: React.ReactElement;\n};\n\nexport default function MaskedView({ children }: Props) {\n return children;\n}\n"]}
|
|
@@ -27,10 +27,12 @@ try {
|
|
|
27
27
|
|
|
28
28
|
const isMaskedViewAvailable = _reactNative.UIManager.getViewManagerConfig('RNCMaskedView') != null;
|
|
29
29
|
|
|
30
|
-
function MaskedView({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
function MaskedView(_ref) {
|
|
31
|
+
let {
|
|
32
|
+
children,
|
|
33
|
+
...rest
|
|
34
|
+
} = _ref;
|
|
35
|
+
|
|
34
36
|
if (isMaskedViewAvailable && RNCMaskedView) {
|
|
35
37
|
return /*#__PURE__*/React.createElement(RNCMaskedView, rest, children);
|
|
36
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MaskedViewNative.tsx"],"names":["RNCMaskedView","require","default","e","isMaskedViewAvailable","UIManager","getViewManagerConfig","MaskedView","children","rest"],"mappings":";;;;;;;AAGA;;AACA;;;;;;AAJA;AACA;AACA;AAWA,IAAIA,aAAJ;;AAEA,IAAI;AACF;AACA;AACAA,EAAAA,aAAa,GAAGC,OAAO,CAAC,uCAAD,CAAP,CAAiDC,OAAjE;AACD,CAJD,CAIE,OAAOC,CAAP,EAAU,CACV;AACD;;AAED,MAAMC,qBAAqB,GACzBC,uBAAUC,oBAAV,CAA+B,eAA/B,KAAmD,IADrD;;AAGe,SAASC,UAAT,
|
|
1
|
+
{"version":3,"sources":["MaskedViewNative.tsx"],"names":["RNCMaskedView","require","default","e","isMaskedViewAvailable","UIManager","getViewManagerConfig","MaskedView","children","rest"],"mappings":";;;;;;;AAGA;;AACA;;;;;;AAJA;AACA;AACA;AAWA,IAAIA,aAAJ;;AAEA,IAAI;AACF;AACA;AACAA,EAAAA,aAAa,GAAGC,OAAO,CAAC,uCAAD,CAAP,CAAiDC,OAAjE;AACD,CAJD,CAIE,OAAOC,CAAP,EAAU,CACV;AACD;;AAED,MAAMC,qBAAqB,GACzBC,uBAAUC,oBAAV,CAA+B,eAA/B,KAAmD,IADrD;;AAGe,SAASC,UAAT,OAAkD;AAAA,MAA9B;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAA8B;;AAC/D,MAAIL,qBAAqB,IAAIJ,aAA7B,EAA4C;AAC1C,wBAAO,oBAAC,aAAD,EAAmBS,IAAnB,EAA0BD,QAA1B,CAAP;AACD;;AAED,SAAOA,QAAP;AACD","sourcesContent":["/**\n * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.\n */\nimport * as React from 'react';\nimport { UIManager } from 'react-native';\n\ntype MaskedViewType =\n typeof import('@react-native-masked-view/masked-view').default;\n\ntype Props = React.ComponentProps<MaskedViewType> & {\n children: React.ReactElement;\n};\n\nlet RNCMaskedView: MaskedViewType | undefined;\n\ntry {\n // Add try/catch to support usage even if it's not installed, since it's optional.\n // Newer versions of Metro will handle it properly.\n RNCMaskedView = require('@react-native-masked-view/masked-view').default;\n} catch (e) {\n // Ignore\n}\n\nconst isMaskedViewAvailable =\n UIManager.getViewManagerConfig('RNCMaskedView') != null;\n\nexport default function MaskedView({ children, ...rest }: Props) {\n if (isMaskedViewAvailable && RNCMaskedView) {\n return <RNCMaskedView {...rest}>{children}</RNCMaskedView>;\n }\n\n return children;\n}\n"]}
|
|
@@ -13,11 +13,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
function MissingIcon({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
function MissingIcon(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
color,
|
|
19
|
+
size,
|
|
20
|
+
style
|
|
21
|
+
} = _ref;
|
|
21
22
|
return /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
22
23
|
style: [styles.icon, {
|
|
23
24
|
color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MissingIcon.tsx"],"names":["MissingIcon","color","size","style","styles","icon","fontSize","StyleSheet","create","backgroundColor"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAQe,SAASA,WAAT,
|
|
1
|
+
{"version":3,"sources":["MissingIcon.tsx"],"names":["MissingIcon","color","size","style","styles","icon","fontSize","StyleSheet","create","backgroundColor"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAQe,SAASA,WAAT,OAAoD;AAAA,MAA/B;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA;AAAf,GAA+B;AACjE,sBAAO,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,IAAR,EAAc;AAAEJ,MAAAA,KAAF;AAASK,MAAAA,QAAQ,EAAEJ;AAAnB,KAAd,EAAyCC,KAAzC;AAAb,cAAP;AACD;;AAED,MAAMC,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,IAAI,EAAE;AACJI,IAAAA,eAAe,EAAE;AADb;AADyB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, Text, TextStyle } from 'react-native';\n\ntype Props = {\n color?: string;\n size?: number;\n style?: StyleProp<TextStyle>;\n};\n\nexport default function MissingIcon({ color, size, style }: Props) {\n return <Text style={[styles.icon, { color, fontSize: size }, style]}>⏷</Text>;\n}\n\nconst styles = StyleSheet.create({\n icon: {\n backgroundColor: 'transparent',\n },\n});\n"]}
|
|
@@ -25,15 +25,16 @@ const ANDROID_SUPPORTS_RIPPLE = _reactNative.Platform.OS === 'android' && _react
|
|
|
25
25
|
* PlatformPressable provides an abstraction on top of Pressable to handle platform differences.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
function PlatformPressable({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
function PlatformPressable(_ref) {
|
|
29
|
+
let {
|
|
30
|
+
onPressIn,
|
|
31
|
+
onPressOut,
|
|
32
|
+
android_ripple,
|
|
33
|
+
pressColor,
|
|
34
|
+
pressOpacity = 0.3,
|
|
35
|
+
style,
|
|
36
|
+
...rest
|
|
37
|
+
} = _ref;
|
|
37
38
|
const {
|
|
38
39
|
dark
|
|
39
40
|
} = (0, _native.useTheme)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PlatformPressable.tsx"],"names":["AnimatedPressable","Animated","createAnimatedComponent","Pressable","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","opacity","React","useState","Value","animateTo","toValue","duration","timing","easing","Easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAkBA,MAAMA,iBAAiB,GAAGC,sBAASC,uBAAT,CAAiCC,sBAAjC,CAA1B;;AAEA,MAAMC,wBAAwB,GAAG,EAAjC;AACA,MAAMC,uBAAuB,GAC3BC,sBAASC,EAAT,KAAgB,SAAhB,IAA6BD,sBAASE,OAAT,IAAoBJ,wBADnD;AAGA;AACA;AACA;;AACe,SAASK,iBAAT,
|
|
1
|
+
{"version":3,"sources":["PlatformPressable.tsx"],"names":["AnimatedPressable","Animated","createAnimatedComponent","Pressable","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","opacity","React","useState","Value","animateTo","toValue","duration","timing","easing","Easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAkBA,MAAMA,iBAAiB,GAAGC,sBAASC,uBAAT,CAAiCC,sBAAjC,CAA1B;;AAEA,MAAMC,wBAAwB,GAAG,EAAjC;AACA,MAAMC,uBAAuB,GAC3BC,sBAASC,EAAT,KAAgB,SAAhB,IAA6BD,sBAASE,OAAT,IAAoBJ,wBADnD;AAGA;AACA;AACA;;AACe,SAASK,iBAAT,OAQL;AAAA,MARgC;AACxCC,IAAAA,SADwC;AAExCC,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PL,KADmB,GAUnBwB,SAdR;AAgBE,IAAA,KAAK,EAAE,CAAC;AAAElB,MAAAA,OAAO,EAAE,CAACb,uBAAD,GAA2Ba,OAA3B,GAAqC;AAAhD,KAAD,EAAsDH,KAAtD;AAhBT,KAiBMC,IAjBN,EADF;AAqBD","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n Platform,\n Pressable,\n PressableProps,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nexport type Props = Omit<PressableProps, 'style'> & {\n pressColor?: string;\n pressOpacity?: number;\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children: React.ReactNode;\n};\n\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nconst ANDROID_VERSION_LOLLIPOP = 21;\nconst ANDROID_SUPPORTS_RIPPLE =\n Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP;\n\n/**\n * PlatformPressable provides an abstraction on top of Pressable to handle platform differences.\n */\nexport default function PlatformPressable({\n onPressIn,\n onPressOut,\n android_ripple,\n pressColor,\n pressOpacity = 0.3,\n style,\n ...rest\n}: Props) {\n const { dark } = useTheme();\n const [opacity] = React.useState(() => new Animated.Value(1));\n\n const animateTo = (toValue: number, duration: number) => {\n if (ANDROID_SUPPORTS_RIPPLE) {\n return;\n }\n\n Animated.timing(opacity, {\n toValue,\n duration,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: true,\n }).start();\n };\n\n const handlePressIn = (e: GestureResponderEvent) => {\n animateTo(pressOpacity, 0);\n onPressIn?.(e);\n };\n\n const handlePressOut = (e: GestureResponderEvent) => {\n animateTo(1, 200);\n onPressOut?.(e);\n };\n\n return (\n <AnimatedPressable\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n android_ripple={\n ANDROID_SUPPORTS_RIPPLE\n ? {\n color:\n pressColor !== undefined\n ? pressColor\n : dark\n ? 'rgba(255, 255, 255, .32)'\n : 'rgba(0, 0, 0, .32)',\n ...android_ripple,\n }\n : undefined\n }\n style={[{ opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1 }, style]}\n {...rest}\n />\n );\n}\n"]}
|
|
@@ -17,12 +17,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
17
17
|
|
|
18
18
|
const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container
|
|
19
19
|
|
|
20
|
-
function ResourceSavingScene({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
function ResourceSavingScene(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
visible,
|
|
23
|
+
children,
|
|
24
|
+
style,
|
|
25
|
+
...rest
|
|
26
|
+
} = _ref;
|
|
27
|
+
|
|
26
28
|
if (_reactNative.Platform.OS === 'web') {
|
|
27
29
|
return /*#__PURE__*/React.createElement(_reactNative.View // @ts-expect-error: hidden exists on web, but not in React Native
|
|
28
30
|
, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ResourceSavingView.tsx"],"names":["FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","Platform","OS","display","styles","container","attached","detached","StyleSheet","create","flex","overflow","top"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAQA,MAAMA,YAAY,GAAG,KAArB,C,CAA4B;;AAEb,SAASC,mBAAT,
|
|
1
|
+
{"version":3,"sources":["ResourceSavingView.tsx"],"names":["FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","Platform","OS","display","styles","container","attached","detached","StyleSheet","create","flex","overflow","top"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAQA,MAAMA,YAAY,GAAG,KAArB,C,CAA4B;;AAEb,SAASC,mBAAT,OAKL;AAAA,MALkC;AAC1CC,IAAAA,OAD0C;AAE1CC,IAAAA,QAF0C;AAG1CC,IAAAA,KAH0C;AAI1C,OAAGC;AAJuC,GAKlC;;AACR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ewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container\n\nexport default function ResourceSavingScene({\n visible,\n children,\n style,\n ...rest\n}: Props) {\n if (Platform.OS === 'web') {\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={!visible}\n style={[\n { display: visible ? 'flex' : 'none' },\n styles.container,\n style,\n ]}\n pointerEvents={visible ? 'auto' : 'none'}\n {...rest}\n >\n {children}\n </View>\n );\n }\n\n return (\n <View\n style={[styles.container, style]}\n // box-none doesn't seem to work properly on Android\n pointerEvents={visible ? 'auto' : 'none'}\n >\n <View\n collapsable={false}\n removeClippedSubviews={\n // On iOS & macOS, set removeClippedSubviews to true only when not focused\n // This is an workaround for a bug where the clipped view never re-appears\n Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true\n }\n pointerEvents={visible ? 'auto' : 'none'}\n style={visible ? styles.attached : styles.detached}\n >\n {children}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden',\n },\n attached: {\n flex: 1,\n },\n detached: {\n flex: 1,\n top: FAR_FAR_AWAY,\n },\n});\n"]}
|
|
@@ -38,10 +38,11 @@ const initialMetrics = _reactNative.Platform.OS === 'web' || _reactNativeSafeAre
|
|
|
38
38
|
}
|
|
39
39
|
} : _reactNativeSafeAreaContext.initialWindowMetrics;
|
|
40
40
|
|
|
41
|
-
function SafeAreaProviderCompat({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
function SafeAreaProviderCompat(_ref) {
|
|
42
|
+
let {
|
|
43
|
+
children,
|
|
44
|
+
style
|
|
45
|
+
} = _ref;
|
|
45
46
|
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaInsetsContext.Consumer, null, insets => {
|
|
46
47
|
if (insets) {
|
|
47
48
|
// If we already have insets, don't wrap the stack in another safe area provider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SafeAreaProviderCompat.tsx"],"names":["width","height","Dimensions","get","initialMetrics","Platform","OS","initialWindowMetrics","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;;;;;AAWA,MAAM;AAAEA,EAAAA,KAAK,GAAG,CAAV;AAAaC,EAAAA,MAAM,GAAG;AAAtB,IAA4BC,wBAAWC,GAAX,CAAe,QAAf,CAAlC,C,CAEA;AACA;AACA;;;AACA,MAAMC,cAAc,GAClBC,sBAASC,EAAT,KAAgB,KAAhB,IAAyBC,oDAAwB,IAAjD,GACI;AACEC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,CAAC,EAAE,CAAL;AAAQC,IAAAA,CAAC,EAAE,CAAX;AAAcV,IAAAA,KAAd;AAAqBC,IAAAA;AAArB,GADT;AAEEU,EAAAA,MAAM,EAAE;AAAEC,IAAAA,GAAG,EAAE,CAAP;AAAUC,IAAAA,IAAI,EAAE,CAAhB;AAAmBC,IAAAA,KAAK,EAAE,CAA1B;AAA6BC,IAAAA,MAAM,EAAE;AAArC;AAFV,CADJ,GAKIR,gDANN;;AAQe,SAASS,sBAAT,
|
|
1
|
+
{"version":3,"sources":["SafeAreaProviderCompat.tsx"],"names":["width","height","Dimensions","get","initialMetrics","Platform","OS","initialWindowMetrics","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;;;;;AAWA,MAAM;AAAEA,EAAAA,KAAK,GAAG,CAAV;AAAaC,EAAAA,MAAM,GAAG;AAAtB,IAA4BC,wBAAWC,GAAX,CAAe,QAAf,CAAlC,C,CAEA;AACA;AACA;;;AACA,MAAMC,cAAc,GAClBC,sBAASC,EAAT,KAAgB,KAAhB,IAAyBC,oDAAwB,IAAjD,GACI;AACEC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,CAAC,EAAE,CAAL;AAAQC,IAAAA,CAAC,EAAE,CAAX;AAAcV,IAAAA,KAAd;AAAqBC,IAAAA;AAArB,GADT;AAEEU,EAAAA,MAAM,EAAE;AAAEC,IAAAA,GAAG,EAAE,CAAP;AAAUC,IAAAA,IAAI,EAAE,CAAhB;AAAmBC,IAAAA,KAAK,EAAE,CAA1B;AAA6BC,IAAAA,MAAM,EAAE;AAArC;AAFV,CADJ,GAKIR,gDANN;;AAQe,SAASS,sBAAT,OAA4D;AAAA,MAA5B;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAA4B;AACzE,sBACE,oBAAC,iDAAD,CAAuB,QAAvB,QACIP,MAAD,IAAY;AACX,QAAIA,MAAJ,EAAY;AACV;AACA;AACA;AACA,0BAAO,oBAAC,iBAAD;AAAM,QAAA,KAAK,EAAE,CAACQ,MAAM,CAACC,SAAR,EAAmBF,KAAnB;AAAb,SAAyCD,QAAzC,CAAP;AACD;;AAED,wBACE,oBAAC,4CAAD;AAAkB,MAAA,cAAc,EAAEb,cAAlC;AAAkD,MAAA,KAAK,EAAEc;AAAzD,OACGD,QADH,CADF;AAKD,GAdH,CADF;AAkBD;;AAEDD,sBAAsB,CAACZ,cAAvB,GAAwCA,cAAxC;;AAEA,MAAMe,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AACTG,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport {\n Dimensions,\n Platform,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\nimport {\n initialWindowMetrics,\n SafeAreaInsetsContext,\n SafeAreaProvider,\n} from 'react-native-safe-area-context';\n\ntype Props = {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst { width = 0, height = 0 } = Dimensions.get('window');\n\n// To support SSR on web, we need to have empty insets for initial values\n// Otherwise there can be mismatch between SSR and client output\n// We also need to specify empty values to support tests environments\nconst initialMetrics =\n Platform.OS === 'web' || initialWindowMetrics == null\n ? {\n frame: { x: 0, y: 0, width, height },\n insets: { top: 0, left: 0, right: 0, bottom: 0 },\n }\n : initialWindowMetrics;\n\nexport default function SafeAreaProviderCompat({ children, style }: Props) {\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets) => {\n if (insets) {\n // If we already have insets, don't wrap the stack in another safe area provider\n // This avoids an issue with updates at the cost of potentially incorrect values\n // https://github.com/react-navigation/react-navigation/issues/174\n return <View style={[styles.container, style]}>{children}</View>;\n }\n\n return (\n <SafeAreaProvider initialMetrics={initialMetrics} style={style}>\n {children}\n </SafeAreaProvider>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n}\n\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -22,24 +22,13 @@ var _exportNames = {
|
|
|
22
22
|
SafeAreaProviderCompat: true,
|
|
23
23
|
Screen: true
|
|
24
24
|
};
|
|
25
|
+
exports.Assets = void 0;
|
|
25
26
|
Object.defineProperty(exports, "Background", {
|
|
26
27
|
enumerable: true,
|
|
27
28
|
get: function () {
|
|
28
29
|
return _Background.default;
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
|
-
Object.defineProperty(exports, "getDefaultHeaderHeight", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _getDefaultHeaderHeight.default;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "getHeaderTitle", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _getHeaderTitle.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
32
|
Object.defineProperty(exports, "Header", {
|
|
44
33
|
enumerable: true,
|
|
45
34
|
get: function () {
|
|
@@ -82,12 +71,6 @@ Object.defineProperty(exports, "HeaderTitle", {
|
|
|
82
71
|
return _HeaderTitle.default;
|
|
83
72
|
}
|
|
84
73
|
});
|
|
85
|
-
Object.defineProperty(exports, "useHeaderHeight", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: function () {
|
|
88
|
-
return _useHeaderHeight.default;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
74
|
Object.defineProperty(exports, "MissingIcon", {
|
|
92
75
|
enumerable: true,
|
|
93
76
|
get: function () {
|
|
@@ -118,7 +101,24 @@ Object.defineProperty(exports, "Screen", {
|
|
|
118
101
|
return _Screen.default;
|
|
119
102
|
}
|
|
120
103
|
});
|
|
121
|
-
exports
|
|
104
|
+
Object.defineProperty(exports, "getDefaultHeaderHeight", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () {
|
|
107
|
+
return _getDefaultHeaderHeight.default;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "getHeaderTitle", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () {
|
|
113
|
+
return _getHeaderTitle.default;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "useHeaderHeight", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return _useHeaderHeight.default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
122
|
|
|
123
123
|
var _Background = _interopRequireDefault(require("./Background"));
|
|
124
124
|
|
package/lib/module/Background.js
CHANGED
|
@@ -3,10 +3,11 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import { useTheme } from '@react-navigation/native';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { View } from 'react-native';
|
|
6
|
-
export default function Background({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export default function Background(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
style,
|
|
9
|
+
...rest
|
|
10
|
+
} = _ref;
|
|
10
11
|
const {
|
|
11
12
|
colors
|
|
12
13
|
} = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Background.tsx"],"names":["useTheme","React","View","Background","style","rest","colors","flex","backgroundColor","background"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAgC,cAAhC;AAMA,eAAe,SAASC,UAAT,
|
|
1
|
+
{"version":3,"sources":["Background.tsx"],"names":["useTheme","React","View","Background","style","rest","colors","flex","backgroundColor","background"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAgC,cAAhC;AAMA,eAAe,SAASC,UAAT,OAA+C;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAC5D,QAAM;AAAEC,IAAAA;AAAF,MAAaN,QAAQ,EAA3B;AAEA,sBACE,oBAAC,IAAD,eACMK,IADN;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEE,MAAAA,IAAI,EAAE,CAAR;AAAWC,MAAAA,eAAe,EAAEF,MAAM,CAACG;AAAnC,KAAD,EAAkDL,KAAlD;AAFT,KADF;AAMD","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { View, ViewProps } from 'react-native';\n\ntype Props = ViewProps & {\n children: React.ReactNode;\n};\n\nexport default function Background({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <View\n {...rest}\n style={[{ flex: 1, backgroundColor: colors.background }, style]}\n />\n );\n}\n"]}
|
|
@@ -3,25 +3,26 @@ import * as React from 'react';
|
|
|
3
3
|
import { Animated, I18nManager, Image, Platform, StyleSheet, View } from 'react-native';
|
|
4
4
|
import MaskedView from '../MaskedView';
|
|
5
5
|
import PlatformPressable from '../PlatformPressable';
|
|
6
|
-
export default function HeaderBackButton({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
export default function HeaderBackButton(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
disabled,
|
|
9
|
+
allowFontScaling,
|
|
10
|
+
backImage,
|
|
11
|
+
label,
|
|
12
|
+
labelStyle,
|
|
13
|
+
labelVisible,
|
|
14
|
+
onLabelLayout,
|
|
15
|
+
onPress,
|
|
16
|
+
pressColor,
|
|
17
|
+
pressOpacity,
|
|
18
|
+
screenLayout,
|
|
19
|
+
tintColor: customTintColor,
|
|
20
|
+
titleLayout,
|
|
21
|
+
truncatedLabel = 'Back',
|
|
22
|
+
accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
|
|
23
|
+
testID,
|
|
24
|
+
style
|
|
25
|
+
} = _ref;
|
|
25
26
|
const {
|
|
26
27
|
colors
|
|
27
28
|
} = useTheme();
|