feat(smart-app): implement complete mobile app MVP

- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,20 @@
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); }
import { useTheme } from '@react-navigation/native';
import * as React from 'react';
import { View } from 'react-native';
export default function Background(_ref) {
let {
style,
...rest
} = _ref;
const {
colors
} = useTheme();
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
style: [{
flex: 1,
backgroundColor: colors.background
}, style]
}));
}
//# sourceMappingURL=Background.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useTheme","React","View","Background","style","rest","colors","flex","backgroundColor","background"],"sourceRoot":"../../src","sources":["Background.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAmB,cAAc;AAM9C,eAAe,SAASC,UAAU,OAA4B;EAAA,IAA3B;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EAC1D,MAAM;IAAEC;EAAO,CAAC,GAAGN,QAAQ,EAAE;EAE7B,oBACE,oBAAC,IAAI,eACCK,IAAI;IACR,KAAK,EAAE,CAAC;MAAEE,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEF,MAAM,CAACG;IAAW,CAAC,EAAEL,KAAK;EAAE,GAChE;AAEN"}

View File

@@ -0,0 +1,234 @@
import * as React from 'react';
import { Animated, Platform, StyleSheet, View } from 'react-native';
import { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context';
import getDefaultHeaderHeight from './getDefaultHeaderHeight';
import HeaderBackground from './HeaderBackground';
import HeaderShownContext from './HeaderShownContext';
import HeaderTitle from './HeaderTitle';
const warnIfHeaderStylesDefined = styles => {
Object.keys(styles).forEach(styleProp => {
const value = styles[styleProp];
if (styleProp === 'position' && value === 'absolute') {
console.warn("position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' option.");
} else if (value !== undefined) {
console.warn(`${styleProp} was given a value of ${value}, this has no effect on headerStyle.`);
}
});
};
export default function Header(props) {
const insets = useSafeAreaInsets();
const frame = useSafeAreaFrame();
const isParentHeaderShown = React.useContext(HeaderShownContext);
// On models with Dynamic Island the status bar height is smaller than the safe area top inset.
const hasDynamicIsland = Platform.OS === 'ios' && insets.top > 50;
const statusBarHeight = hasDynamicIsland ? insets.top - 5 : insets.top;
const {
layout = frame,
modal = false,
title,
headerTitle: customTitle,
headerTitleAlign = Platform.select({
ios: 'center',
default: 'left'
}),
headerLeft,
headerLeftLabelVisible,
headerTransparent,
headerTintColor,
headerBackground,
headerRight,
headerTitleAllowFontScaling: titleAllowFontScaling,
headerTitleStyle: titleStyle,
headerLeftContainerStyle: leftContainerStyle,
headerRightContainerStyle: rightContainerStyle,
headerTitleContainerStyle: titleContainerStyle,
headerBackgroundContainerStyle: backgroundContainerStyle,
headerStyle: customHeaderStyle,
headerShadowVisible,
headerPressColor,
headerPressOpacity,
headerStatusBarHeight = isParentHeaderShown ? 0 : statusBarHeight
} = props;
const defaultHeight = getDefaultHeaderHeight(layout, modal, headerStatusBarHeight);
const {
height = defaultHeight,
minHeight,
maxHeight,
backgroundColor,
borderBottomColor,
borderBottomEndRadius,
borderBottomLeftRadius,
borderBottomRightRadius,
borderBottomStartRadius,
borderBottomWidth,
borderColor,
borderEndColor,
borderEndWidth,
borderLeftColor,
borderLeftWidth,
borderRadius,
borderRightColor,
borderRightWidth,
borderStartColor,
borderStartWidth,
borderStyle,
borderTopColor,
borderTopEndRadius,
borderTopLeftRadius,
borderTopRightRadius,
borderTopStartRadius,
borderTopWidth,
borderWidth,
// @ts-expect-error: web support for shadow
boxShadow,
elevation,
shadowColor,
shadowOffset,
shadowOpacity,
shadowRadius,
opacity,
transform,
...unsafeStyles
} = StyleSheet.flatten(customHeaderStyle || {});
if (process.env.NODE_ENV !== 'production') {
warnIfHeaderStylesDefined(unsafeStyles);
}
const safeStyles = {
backgroundColor,
borderBottomColor,
borderBottomEndRadius,
borderBottomLeftRadius,
borderBottomRightRadius,
borderBottomStartRadius,
borderBottomWidth,
borderColor,
borderEndColor,
borderEndWidth,
borderLeftColor,
borderLeftWidth,
borderRadius,
borderRightColor,
borderRightWidth,
borderStartColor,
borderStartWidth,
borderStyle,
borderTopColor,
borderTopEndRadius,
borderTopLeftRadius,
borderTopRightRadius,
borderTopStartRadius,
borderTopWidth,
borderWidth,
// @ts-expect-error: boxShadow is only for Web
boxShadow,
elevation,
shadowColor,
shadowOffset,
shadowOpacity,
shadowRadius,
opacity,
transform
};
// Setting a property to undefined triggers default style
// So we need to filter them out
// Users can use `null` instead
for (const styleProp in safeStyles) {
// @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles
if (safeStyles[styleProp] === undefined) {
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete safeStyles[styleProp];
}
}
const backgroundStyle = [safeStyles, headerShadowVisible === false && {
elevation: 0,
shadowOpacity: 0,
borderBottomWidth: 0
}];
const leftButton = headerLeft ? headerLeft({
tintColor: headerTintColor,
pressColor: headerPressColor,
pressOpacity: headerPressOpacity,
labelVisible: headerLeftLabelVisible
}) : null;
const rightButton = headerRight ? headerRight({
tintColor: headerTintColor,
pressColor: headerPressColor,
pressOpacity: headerPressOpacity
}) : null;
const headerTitle = typeof customTitle !== 'function' ? props => /*#__PURE__*/React.createElement(HeaderTitle, props) : customTitle;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated.View, {
pointerEvents: "box-none",
style: [StyleSheet.absoluteFill, {
zIndex: 0
}, backgroundContainerStyle]
}, headerBackground ? headerBackground({
style: backgroundStyle
}) : headerTransparent ? null : /*#__PURE__*/React.createElement(HeaderBackground, {
style: backgroundStyle
})), /*#__PURE__*/React.createElement(Animated.View, {
pointerEvents: "box-none",
style: [{
height,
minHeight,
maxHeight,
opacity,
transform
}]
}, /*#__PURE__*/React.createElement(View, {
pointerEvents: "none",
style: {
height: headerStatusBarHeight
}
}), /*#__PURE__*/React.createElement(View, {
pointerEvents: "box-none",
style: styles.content
}, /*#__PURE__*/React.createElement(Animated.View, {
pointerEvents: "box-none",
style: [styles.left, headerTitleAlign === 'center' && styles.expand, {
marginStart: insets.left
}, leftContainerStyle]
}, leftButton), /*#__PURE__*/React.createElement(Animated.View, {
pointerEvents: "box-none",
style: [styles.title, {
// Avoid the title from going offscreen or overlapping buttons
maxWidth: headerTitleAlign === 'center' ? layout.width - ((leftButton ? headerLeftLabelVisible !== false ? 80 : 32 : 16) + Math.max(insets.left, insets.right)) * 2 : layout.width - ((leftButton ? 72 : 16) + (rightButton ? 72 : 16) + insets.left - insets.right)
}, titleContainerStyle]
}, headerTitle({
children: title,
allowFontScaling: titleAllowFontScaling,
tintColor: headerTintColor,
style: titleStyle
})), /*#__PURE__*/React.createElement(Animated.View, {
pointerEvents: "box-none",
style: [styles.right, styles.expand, {
marginEnd: insets.right
}, rightContainerStyle]
}, rightButton))));
}
const styles = StyleSheet.create({
content: {
flex: 1,
flexDirection: 'row',
alignItems: 'stretch'
},
title: {
marginHorizontal: 16,
justifyContent: 'center'
},
left: {
justifyContent: 'center',
alignItems: 'flex-start'
},
right: {
justifyContent: 'center',
alignItems: 'flex-end'
},
expand: {
flexGrow: 1,
flexBasis: 0
}
});
//# sourceMappingURL=Header.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,199 @@
import { useTheme } from '@react-navigation/native';
import * as React from 'react';
import { Animated, I18nManager, Image, Platform, StyleSheet, View } from 'react-native';
import MaskedView from '../MaskedView';
import PlatformPressable from '../PlatformPressable';
export default function HeaderBackButton(_ref) {
let {
disabled,
allowFontScaling,
backImage,
label,
labelStyle,
labelVisible = Platform.OS === 'ios',
onLabelLayout,
onPress,
pressColor,
pressOpacity,
screenLayout,
tintColor: customTintColor,
titleLayout,
truncatedLabel = 'Back',
accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
testID,
style
} = _ref;
const {
colors
} = useTheme();
const [initialLabelWidth, setInitialLabelWidth] = React.useState(undefined);
const tintColor = customTintColor !== undefined ? customTintColor : Platform.select({
ios: colors.primary,
default: colors.text
});
const handleLabelLayout = e => {
onLabelLayout === null || onLabelLayout === void 0 ? void 0 : onLabelLayout(e);
setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);
};
const shouldTruncateLabel = () => {
return !label || initialLabelWidth && titleLayout && screenLayout && (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26;
};
const renderBackImage = () => {
if (backImage) {
return backImage({
tintColor
});
} else {
return /*#__PURE__*/React.createElement(Image, {
style: [styles.icon, Boolean(labelVisible) && styles.iconWithLabel, Boolean(tintColor) && {
tintColor
}],
source: require('../assets/back-icon.png'),
fadeDuration: 0
});
}
};
const renderLabel = () => {
const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;
if (!labelVisible || leftLabelText === undefined) {
return null;
}
const labelElement = /*#__PURE__*/React.createElement(View, {
style: screenLayout ?
// We make the button extend till the middle of the screen
// Otherwise it appears to cut off when translating
[styles.labelWrapper, {
minWidth: screenLayout.width / 2 - 27
}] : null
}, /*#__PURE__*/React.createElement(Animated.Text, {
accessible: false,
onLayout:
// This measurement is used to determine if we should truncate the label when it doesn't fit
// Only measure it when label is not truncated because we want the measurement of full label
leftLabelText === label ? handleLabelLayout : undefined,
style: [styles.label, tintColor ? {
color: tintColor
} : null, labelStyle],
numberOfLines: 1,
allowFontScaling: !!allowFontScaling
}, leftLabelText));
if (backImage || Platform.OS !== 'ios') {
// When a custom backimage is specified, we can't mask the label
// Otherwise there might be weird effect due to our mask not being the same as the image
return labelElement;
}
return /*#__PURE__*/React.createElement(MaskedView, {
maskElement: /*#__PURE__*/React.createElement(View, {
style: styles.iconMaskContainer
}, /*#__PURE__*/React.createElement(Image, {
source: require('../assets/back-icon-mask.png'),
style: styles.iconMask
}), /*#__PURE__*/React.createElement(View, {
style: styles.iconMaskFillerRect
}))
}, labelElement);
};
const handlePress = () => onPress && requestAnimationFrame(onPress);
return /*#__PURE__*/React.createElement(PlatformPressable, {
disabled: disabled,
accessible: true,
accessibilityRole: "button",
accessibilityLabel: accessibilityLabel,
testID: testID,
onPress: disabled ? undefined : handlePress,
pressColor: pressColor,
pressOpacity: pressOpacity,
android_ripple: androidRipple,
style: [styles.container, disabled && styles.disabled, style],
hitSlop: Platform.select({
ios: undefined,
default: {
top: 16,
right: 16,
bottom: 16,
left: 16
}
})
}, /*#__PURE__*/React.createElement(React.Fragment, null, renderBackImage(), renderLabel()));
}
const androidRipple = {
borderless: true,
foreground: Platform.OS === 'android' && Platform.Version >= 23,
radius: 20
};
const styles = StyleSheet.create({
container: {
alignItems: 'center',
flexDirection: 'row',
minWidth: StyleSheet.hairlineWidth,
// Avoid collapsing when title is long
...Platform.select({
ios: null,
default: {
marginVertical: 3,
marginHorizontal: 11
}
})
},
disabled: {
opacity: 0.5
},
label: {
fontSize: 17,
// Title and back label are a bit different width due to title being bold
// Adjusting the letterSpacing makes them coincide better
letterSpacing: 0.35
},
labelWrapper: {
// These styles will make sure that the label doesn't fill the available space
// Otherwise it messes with the measurement of the label
flexDirection: 'row',
alignItems: 'flex-start'
},
icon: Platform.select({
ios: {
height: 21,
width: 13,
marginLeft: 8,
marginRight: 22,
marginVertical: 12,
resizeMode: 'contain',
transform: [{
scaleX: I18nManager.getConstants().isRTL ? -1 : 1
}]
},
default: {
height: 24,
width: 24,
margin: 3,
resizeMode: 'contain',
transform: [{
scaleX: I18nManager.getConstants().isRTL ? -1 : 1
}]
}
}),
iconWithLabel: Platform.OS === 'ios' ? {
marginRight: 6
} : {},
iconMaskContainer: {
flex: 1,
flexDirection: 'row',
justifyContent: 'center'
},
iconMaskFillerRect: {
flex: 1,
backgroundColor: '#000'
},
iconMask: {
height: 21,
width: 13,
marginLeft: -14.5,
marginVertical: 12,
alignSelf: 'center',
resizeMode: 'contain',
transform: [{
scaleX: I18nManager.getConstants().isRTL ? -1 : 1
}]
}
});
//# sourceMappingURL=HeaderBackButton.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
import getNamedContext from '../getNamedContext';
const HeaderBackContext = getNamedContext('HeaderBackContext', undefined);
export default HeaderBackContext;
//# sourceMappingURL=HeaderBackContext.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["getNamedContext","HeaderBackContext","undefined"],"sourceRoot":"../../../src","sources":["Header/HeaderBackContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,iBAAiB,GAAGD,eAAe,CACvC,mBAAmB,EACnBE,SAAS,CACV;AAED,eAAeD,iBAAiB"}

View File

@@ -0,0 +1,42 @@
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); }
import { useTheme } from '@react-navigation/native';
import * as React from 'react';
import { Animated, Platform, StyleSheet } from 'react-native';
export default function HeaderBackground(_ref) {
let {
style,
...rest
} = _ref;
const {
colors
} = useTheme();
return /*#__PURE__*/React.createElement(Animated.View, _extends({
style: [styles.container, {
backgroundColor: colors.card,
borderBottomColor: colors.border,
shadowColor: colors.border
}, style]
}, rest));
}
const styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
android: {
elevation: 4
},
ios: {
shadowOpacity: 0.85,
shadowRadius: 0,
shadowOffset: {
width: 0,
height: StyleSheet.hairlineWidth
}
},
default: {
borderBottomWidth: StyleSheet.hairlineWidth
}
})
}
});
//# sourceMappingURL=HeaderBackground.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","create","flex","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"sourceRoot":"../../../src","sources":["Header/HeaderBackground.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EAERC,UAAU,QAGL,cAAc;AAOrB,eAAe,SAASC,gBAAgB,OAA4B;EAAA,IAA3B;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EAChE,MAAM;IAAEC;EAAO,CAAC,GAAGR,QAAQ,EAAE;EAE7B,oBACE,oBAAC,QAAQ,CAAC,IAAI;IACZ,KAAK,EAAE,CACLS,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEH,MAAM,CAACI,IAAI;MAC5BC,iBAAiB,EAAEL,MAAM,CAACM,MAAM;MAChCC,WAAW,EAAEP,MAAM,CAACM;IACtB,CAAC,EACDR,KAAK;EACL,GACEC,IAAI,EACR;AAEN;AAEA,MAAME,MAAM,GAAGL,UAAU,CAACY,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,IAAI,EAAE,CAAC;IACP,GAAGd,QAAQ,CAACe,MAAM,CAAC;MACjBC,OAAO,EAAE;QACPC,SAAS,EAAE;MACb,CAAC;MACDC,GAAG,EAAE;QACHC,aAAa,EAAE,IAAI;QACnBC,YAAY,EAAE,CAAC;QACfC,YAAY,EAAE;UACZC,KAAK,EAAE,CAAC;UACRC,MAAM,EAAEtB,UAAU,CAACuB;QACrB;MACF,CAAC;MACDC,OAAO,EAAE;QACPC,iBAAiB,EAAEzB,UAAU,CAACuB;MAChC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}

View File

@@ -0,0 +1,4 @@
import getNamedContext from '../getNamedContext';
const HeaderHeightContext = getNamedContext('HeaderHeightContext', undefined);
export default HeaderHeightContext;
//# sourceMappingURL=HeaderHeightContext.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["getNamedContext","HeaderHeightContext","undefined"],"sourceRoot":"../../../src","sources":["Header/HeaderHeightContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,mBAAmB,GAAGD,eAAe,CACzC,qBAAqB,EACrBE,SAAS,CACV;AAED,eAAeD,mBAAmB"}

View File

@@ -0,0 +1,4 @@
import getNamedContext from '../getNamedContext';
const HeaderShownContext = getNamedContext('HeaderShownContext', false);
export default HeaderShownContext;
//# sourceMappingURL=HeaderShownContext.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["getNamedContext","HeaderShownContext"],"sourceRoot":"../../../src","sources":["Header/HeaderShownContext.tsx"],"mappings":"AAAA,OAAOA,eAAe,MAAM,oBAAoB;AAEhD,MAAMC,kBAAkB,GAAGD,eAAe,CAAC,oBAAoB,EAAE,KAAK,CAAC;AAEvE,eAAeC,kBAAkB"}

View File

@@ -0,0 +1,41 @@
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); }
import { useTheme } from '@react-navigation/native';
import * as React from 'react';
import { Animated, Platform, StyleSheet } from 'react-native';
export default function HeaderTitle(_ref) {
let {
tintColor,
style,
...rest
} = _ref;
const {
colors
} = useTheme();
return /*#__PURE__*/React.createElement(Animated.Text, _extends({
accessibilityRole: "header",
"aria-level": "1",
numberOfLines: 1
}, rest, {
style: [styles.title, {
color: tintColor === undefined ? colors.text : tintColor
}, style]
}));
}
const styles = StyleSheet.create({
title: Platform.select({
ios: {
fontSize: 17,
fontWeight: '600'
},
android: {
fontSize: 20,
fontFamily: 'sans-serif-medium',
fontWeight: 'normal'
},
default: {
fontSize: 18,
fontWeight: '500'
}
})
});
//# sourceMappingURL=HeaderTitle.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderTitle","tintColor","style","rest","colors","styles","title","color","undefined","text","create","select","ios","fontSize","fontWeight","android","fontFamily","default"],"sourceRoot":"../../../src","sources":["Header/HeaderTitle.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EAERC,UAAU,QAGL,cAAc;AAOrB,eAAe,SAASC,WAAW,OAAuC;EAAA,IAAtC;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EACtE,MAAM;IAAEC;EAAO,CAAC,GAAGT,QAAQ,EAAE;EAE7B,oBACE,oBAAC,QAAQ,CAAC,IAAI;IACZ,iBAAiB,EAAC,QAAQ;IAC1B,cAAW,GAAG;IACd,aAAa,EAAE;EAAE,GACbQ,IAAI;IACR,KAAK,EAAE,CACLE,MAAM,CAACC,KAAK,EACZ;MAAEC,KAAK,EAAEN,SAAS,KAAKO,SAAS,GAAGJ,MAAM,CAACK,IAAI,GAAGR;IAAU,CAAC,EAC5DC,KAAK;EACL,GACF;AAEN;AAEA,MAAMG,MAAM,GAAGN,UAAU,CAACW,MAAM,CAAC;EAC/BJ,KAAK,EAAER,QAAQ,CAACa,MAAM,CAAC;IACrBC,GAAG,EAAE;MACHC,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd,CAAC;IACDC,OAAO,EAAE;MACPF,QAAQ,EAAE,EAAE;MACZG,UAAU,EAAE,mBAAmB;MAC/BF,UAAU,EAAE;IACd,CAAC;IACDG,OAAO,EAAE;MACPJ,QAAQ,EAAE,EAAE;MACZC,UAAU,EAAE;IACd;EACF,CAAC;AACH,CAAC,CAAC"}

View File

@@ -0,0 +1,30 @@
import { Platform } from 'react-native';
export default function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) {
let headerHeight;
const isLandscape = layout.width > layout.height;
if (Platform.OS === 'ios') {
if (Platform.isPad || Platform.isTV) {
if (modalPresentation) {
headerHeight = 56;
} else {
headerHeight = 50;
}
} else {
if (isLandscape) {
headerHeight = 32;
} else {
if (modalPresentation) {
headerHeight = 56;
} else {
headerHeight = 44;
}
}
}
} else if (Platform.OS === 'android') {
headerHeight = 56;
} else {
headerHeight = 64;
}
return headerHeight + statusBarHeight;
}
//# sourceMappingURL=getDefaultHeaderHeight.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["Platform","getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","OS","isPad","isTV"],"sourceRoot":"../../../src","sources":["Header/getDefaultHeaderHeight.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAIvC,eAAe,SAASC,sBAAsB,CAC5CC,MAAc,EACdC,iBAA0B,EAC1BC,eAAuB,EACf;EACR,IAAIC,YAAY;EAEhB,MAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAK,GAAGL,MAAM,CAACM,MAAM;EAEhD,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;IACzB,IAAIT,QAAQ,CAACU,KAAK,IAAIV,QAAQ,CAACW,IAAI,EAAE;MACnC,IAAIR,iBAAiB,EAAE;QACrBE,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACLA,YAAY,GAAG,EAAE;MACnB;IACF,CAAC,MAAM;MACL,IAAIC,WAAW,EAAE;QACfD,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,IAAIL,QAAQ,CAACS,EAAE,KAAK,SAAS,EAAE;IACpCJ,YAAY,GAAG,EAAE;EACnB,CAAC,MAAM;IACLA,YAAY,GAAG,EAAE;EACnB;EAEA,OAAOA,YAAY,GAAGD,eAAe;AACvC"}

View File

@@ -0,0 +1,4 @@
export default function getHeaderTitle(options, fallback) {
return typeof options.headerTitle === 'string' ? options.headerTitle : options.title !== undefined ? options.title : fallback;
}
//# sourceMappingURL=getHeaderTitle.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["getHeaderTitle","options","fallback","headerTitle","title","undefined"],"sourceRoot":"../../../src","sources":["Header/getHeaderTitle.tsx"],"mappings":"AAEA,eAAe,SAASA,cAAc,CACpCC,OAAuE,EACvEC,QAAgB,EACR;EACR,OAAO,OAAOD,OAAO,CAACE,WAAW,KAAK,QAAQ,GAC1CF,OAAO,CAACE,WAAW,GACnBF,OAAO,CAACG,KAAK,KAAKC,SAAS,GAC3BJ,OAAO,CAACG,KAAK,GACbF,QAAQ;AACd"}

View File

@@ -0,0 +1,10 @@
import * as React from 'react';
import HeaderHeightContext from './HeaderHeightContext';
export default function useHeaderHeight() {
const height = React.useContext(HeaderHeightContext);
if (height === undefined) {
throw new Error("Couldn't find the header height. Are you inside a screen in a navigator with a header?");
}
return height;
}
//# sourceMappingURL=useHeaderHeight.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","HeaderHeightContext","useHeaderHeight","height","useContext","undefined","Error"],"sourceRoot":"../../../src","sources":["Header/useHeaderHeight.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,mBAAmB,MAAM,uBAAuB;AAEvD,eAAe,SAASC,eAAe,GAAG;EACxC,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACH,mBAAmB,CAAC;EAEpD,IAAIE,MAAM,KAAKE,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOH,MAAM;AACf"}

View File

@@ -0,0 +1,2 @@
export { default } from './MaskedViewNative';
//# sourceMappingURL=MaskedView.android.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sourceRoot":"../../src","sources":["MaskedView.android.tsx"],"mappings":"AAAA,SAASA,OAAO,QAAQ,oBAAoB"}

View File

@@ -0,0 +1,2 @@
export { default } from './MaskedViewNative';
//# sourceMappingURL=MaskedView.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sourceRoot":"../../src","sources":["MaskedView.ios.tsx"],"mappings":"AAAA,SAASA,OAAO,QAAQ,oBAAoB"}

View File

@@ -0,0 +1,11 @@
/**
* Use a stub for MaskedView on all Platforms that don't support it.
*/
export default function MaskedView(_ref) {
let {
children
} = _ref;
return children;
}
//# sourceMappingURL=MaskedView.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["MaskedView","children"],"sourceRoot":"../../src","sources":["MaskedView.tsx"],"mappings":"AAAA;AACA;AACA;;AAQA,eAAe,SAASA,UAAU,OAAsB;EAAA,IAArB;IAAEC;EAAgB,CAAC;EACpD,OAAOA,QAAQ;AACjB"}

View File

@@ -0,0 +1,25 @@
/**
* The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.
*/
import * as React from 'react';
import { UIManager } from 'react-native';
let RNCMaskedView;
try {
// Add try/catch to support usage even if it's not installed, since it's optional.
// Newer versions of Metro will handle it properly.
RNCMaskedView = require('@react-native-masked-view/masked-view').default;
} catch (e) {
// Ignore
}
const isMaskedViewAvailable = UIManager.getViewManagerConfig('RNCMaskedView') != null;
export default function MaskedView(_ref) {
let {
children,
...rest
} = _ref;
if (isMaskedViewAvailable && RNCMaskedView) {
return /*#__PURE__*/React.createElement(RNCMaskedView, rest, children);
}
return children;
}
//# sourceMappingURL=MaskedViewNative.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","UIManager","RNCMaskedView","require","default","e","isMaskedViewAvailable","getViewManagerConfig","MaskedView","children","rest"],"sourceRoot":"../../src","sources":["MaskedViewNative.tsx"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,cAAc;AASxC,IAAIC,aAAyC;AAE7C,IAAI;EACF;EACA;EACAA,aAAa,GAAGC,OAAO,CAAC,uCAAuC,CAAC,CAACC,OAAO;AAC1E,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGF,MAAMC,qBAAqB,GACzBL,SAAS,CAACM,oBAAoB,CAAC,eAAe,CAAC,IAAI,IAAI;AAEzD,eAAe,SAASC,UAAU,OAA+B;EAAA,IAA9B;IAAEC,QAAQ;IAAE,GAAGC;EAAY,CAAC;EAC7D,IAAIJ,qBAAqB,IAAIJ,aAAa,EAAE;IAC1C,oBAAO,oBAAC,aAAa,EAAKQ,IAAI,EAAGD,QAAQ,CAAiB;EAC5D;EAEA,OAAOA,QAAQ;AACjB"}

View File

@@ -0,0 +1,21 @@
import * as React from 'react';
import { StyleSheet, Text } from 'react-native';
export default function MissingIcon(_ref) {
let {
color,
size,
style
} = _ref;
return /*#__PURE__*/React.createElement(Text, {
style: [styles.icon, {
color,
fontSize: size
}, style]
}, "\u23F7");
}
const styles = StyleSheet.create({
icon: {
backgroundColor: 'transparent'
}
});
//# sourceMappingURL=MissingIcon.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","StyleSheet","Text","MissingIcon","color","size","style","styles","icon","fontSize","create","backgroundColor"],"sourceRoot":"../../src","sources":["MissingIcon.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAQrE,eAAe,SAASC,WAAW,OAAgC;EAAA,IAA/B;IAAEC,KAAK;IAAEC,IAAI;IAAEC;EAAa,CAAC;EAC/D,oBAAO,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAE;MAAEJ,KAAK;MAAEK,QAAQ,EAAEJ;IAAK,CAAC,EAAEC,KAAK;EAAE,YAAS;AAC/E;AAEA,MAAMC,MAAM,GAAGN,UAAU,CAACS,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,eAAe,EAAE;EACnB;AACF,CAAC,CAAC"}

View File

@@ -0,0 +1,57 @@
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); }
import { useTheme } from '@react-navigation/native';
import * as React from 'react';
import { Animated, Easing, Platform, Pressable } from 'react-native';
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
const ANDROID_VERSION_LOLLIPOP = 21;
const ANDROID_SUPPORTS_RIPPLE = Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP;
/**
* PlatformPressable provides an abstraction on top of Pressable to handle platform differences.
*/
export default function PlatformPressable(_ref) {
let {
onPressIn,
onPressOut,
android_ripple,
pressColor,
pressOpacity = 0.3,
style,
...rest
} = _ref;
const {
dark
} = useTheme();
const [opacity] = React.useState(() => new Animated.Value(1));
const animateTo = (toValue, duration) => {
if (ANDROID_SUPPORTS_RIPPLE) {
return;
}
Animated.timing(opacity, {
toValue,
duration,
easing: Easing.inOut(Easing.quad),
useNativeDriver: true
}).start();
};
const handlePressIn = e => {
animateTo(pressOpacity, 0);
onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e);
};
const handlePressOut = e => {
animateTo(1, 200);
onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e);
};
return /*#__PURE__*/React.createElement(AnimatedPressable, _extends({
onPressIn: handlePressIn,
onPressOut: handlePressOut,
android_ripple: ANDROID_SUPPORTS_RIPPLE ? {
color: pressColor !== undefined ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)',
...android_ripple
} : undefined,
style: [{
opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1
}, style]
}, rest));
}
//# sourceMappingURL=PlatformPressable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useTheme","React","Animated","Easing","Platform","Pressable","AnimatedPressable","createAnimatedComponent","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","opacity","useState","Value","animateTo","toValue","duration","timing","easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"sourceRoot":"../../src","sources":["PlatformPressable.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,MAAM,EAENC,QAAQ,EACRC,SAAS,QAIJ,cAAc;AASrB,MAAMC,iBAAiB,GAAGJ,QAAQ,CAACK,uBAAuB,CAACF,SAAS,CAAC;AAErE,MAAMG,wBAAwB,GAAG,EAAE;AACnC,MAAMC,uBAAuB,GAC3BL,QAAQ,CAACM,EAAE,KAAK,SAAS,IAAIN,QAAQ,CAACO,OAAO,IAAIH,wBAAwB;;AAE3E;AACA;AACA;AACA,eAAe,SAASI,iBAAiB,OAQ/B;EAAA,IARgC;IACxCC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AAE,CAAC,EAAEH,KAAK;EAAE,GAChEC,IAAI,EACR;AAEN"}

View File

@@ -0,0 +1,52 @@
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); }
import * as React from 'react';
import { Platform, StyleSheet, View } from 'react-native';
const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container
export default function ResourceSavingScene(_ref) {
let {
visible,
children,
style,
...rest
} = _ref;
if (Platform.OS === 'web') {
return /*#__PURE__*/React.createElement(View
// @ts-expect-error: hidden exists on web, but not in React Native
, _extends({
hidden: !visible,
style: [{
display: visible ? 'flex' : 'none'
}, styles.container, style],
pointerEvents: visible ? 'auto' : 'none'
}, rest), children);
}
return /*#__PURE__*/React.createElement(View, {
style: [styles.container, style]
// box-none doesn't seem to work properly on Android
,
pointerEvents: visible ? 'auto' : 'none'
}, /*#__PURE__*/React.createElement(View, {
collapsable: false,
removeClippedSubviews:
// On iOS & macOS, set removeClippedSubviews to true only when not focused
// This is an workaround for a bug where the clipped view never re-appears
Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true,
pointerEvents: visible ? 'auto' : 'none',
style: visible ? styles.attached : styles.detached
}, children));
}
const styles = StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
},
attached: {
flex: 1
},
detached: {
flex: 1,
top: FAR_FAR_AWAY
}
});
//# sourceMappingURL=ResourceSavingView.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","Platform","StyleSheet","View","FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","OS","display","styles","container","attached","detached","create","flex","overflow","top"],"sourceRoot":"../../src","sources":["ResourceSavingView.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAaC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAQ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
import * as React from 'react';
import { Dimensions, Platform, StyleSheet, View } from 'react-native';
import { initialWindowMetrics, SafeAreaFrameContext, SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context';
const {
width = 0,
height = 0
} = Dimensions.get('window');
// To support SSR on web, we need to have empty insets for initial values
// Otherwise there can be mismatch between SSR and client output
// We also need to specify empty values to support tests environments
const initialMetrics = Platform.OS === 'web' || initialWindowMetrics == null ? {
frame: {
x: 0,
y: 0,
width,
height
},
insets: {
top: 0,
left: 0,
right: 0,
bottom: 0
}
} : initialWindowMetrics;
export default function SafeAreaProviderCompat(_ref) {
let {
children,
style
} = _ref;
const insets = React.useContext(SafeAreaInsetsContext);
if (insets) {
// If we already have insets, don't wrap the stack in another safe area provider
// This avoids an issue with updates at the cost of potentially incorrect values
// https://github.com/react-navigation/react-navigation/issues/174
return /*#__PURE__*/React.createElement(View, {
style: [styles.container, style]
}, children);
}
if (Platform.OS === 'web') {
children = /*#__PURE__*/React.createElement(SafeAreaFrameProvider, {
initialMetrics: initialMetrics
}, children);
}
return /*#__PURE__*/React.createElement(SafeAreaProvider, {
initialMetrics: initialMetrics,
style: style
}, children);
}
// FIXME: On the Web, the safe area frame value doesn't update on resize
// So we workaround this by measuring the frame on resize
const SafeAreaFrameProvider = _ref2 => {
let {
initialMetrics,
children
} = _ref2;
const element = React.useRef(null);
const [frame, setFrame] = React.useState(initialMetrics.frame);
React.useEffect(() => {
if (element.current == null) {
return;
}
const rect = element.current.getBoundingClientRect();
setFrame({
x: rect.x,
y: rect.y,
width: rect.width,
height: rect.height
});
let timeout;
const observer = new ResizeObserver(entries => {
const entry = entries[0];
if (entry) {
const {
x,
y,
width,
height
} = entry.contentRect;
// Debounce the frame updates to avoid too many updates in a short time
clearTimeout(timeout);
timeout = setTimeout(() => {
setFrame({
x,
y,
width,
height
});
}, 100);
}
});
observer.observe(element.current);
return () => {
observer.disconnect();
clearTimeout(timeout);
};
}, []);
return /*#__PURE__*/React.createElement(SafeAreaFrameContext.Provider, {
value: frame
}, /*#__PURE__*/React.createElement("div", {
ref: element,
style: {
...StyleSheet.absoluteFillObject,
pointerEvents: 'none',
visibility: 'hidden'
}
}), children);
};
SafeAreaProviderCompat.initialMetrics = initialMetrics;
const styles = StyleSheet.create({
container: {
flex: 1
}
});
//# sourceMappingURL=SafeAreaProviderCompat.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","Dimensions","Platform","StyleSheet","View","initialWindowMetrics","SafeAreaFrameContext","SafeAreaInsetsContext","SafeAreaProvider","width","height","get","initialMetrics","OS","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","useContext","styles","container","SafeAreaFrameProvider","element","useRef","setFrame","useState","useEffect","current","rect","getBoundingClientRect","timeout","observer","ResizeObserver","entries","entry","contentRect","clearTimeout","setTimeout","observe","disconnect","absoluteFillObject","pointerEvents","visibility","create","flex"],"sourceRoot":"../../src","sources":["SafeAreaProviderCompat.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,UAAU,EACVC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SACEC,oBAAoB,EAEpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,gBAAgB,QACX,gCAAgC;AAOvC,MAAM;EAAEC,KAAK,GAAG,CAAC;EAAEC,MAAM,GAAG;AAAE,CAAC,GAAGT,UAAU,CAACU,GAAG,CAAC,QAAQ,CAAC;;AAE1D;AACA;AACA;AACA,MAAMC,cAAc,GAClBV,QAAQ,CAACW,EAAE,KAAK,KAAK,IAAIR,oBAAoB,IAAI,IAAI,GACjD;EACES,KAAK,EAAE;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEP,KAAK;IAAEC;EAAO,CAAC;EACpCO,MAAM,EAAE;IAAEC,GAAG,EAAE,CAAC;IAAEC,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE;AACjD,C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AMC,QAAQ,GAAG,IAAIC,cAAc,CAAEC,OAAO,IAAK;MAC/C,MAAMC,KAAK,GAAGD,OAAO,CAAC,CAAC,CAAC;MAExB,IAAIC,KAAK,EAAE;QACT,MAAM;UAAE1B,CAAC;UAAEC,CAAC;UAAEP,KAAK;UAAEC;QAAO,CAAC,GAAG+B,KAAK,CAACC,WAAW;;QAEjD;QACAC,YAAY,CAACN,OAAO,CAAC;QACrBA,OAAO,GAAGO,UAAU,CAAC,MAAM;UACzBb,QAAQ,CAAC;YAAEhB,CAAC;YAAEC,CAAC;YAAEP,KAAK;YAAEC;UAAO,CAAC,CAAC;QACnC,CAAC,EAAE,GAAG,CAAC;MACT;IACF,CAAC,CAAC;IAEF4B,QAAQ,CAACO,OAAO,CAAChB,OAAO,CAACK,OAAO,CAAC;IAEjC,OAAO,MAAM;MACXI,QAAQ,CAACQ,UAAU,EAAE;MACrBH,YAAY,CAACN,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE,oBAAC,oBAAoB,CAAC,QAAQ;IAAC,KAAK,EAAEvB;EAAM,gBAC1C;IACE,GAAG,EAAEe,OAAQ;IACb,KAAK,EAAE;MACL,GAAG1B,UAAU,CAAC4C,kBAAkB;MAChCC,aAAa,EAAE,MAAM;MACrBC,UAAU,EAAE;IACd;EAAE,EACF,EACD1B,QAAQ,CACqB;AAEpC,CAAC;AAEDD,sBAAsB,CAACV,cAAc,GAAGA,cAAc;AAEtD,MAAMc,MAAM,GAAGvB,UAAU,CAAC+C,MAAM,CAAC;EAC/BvB,SAAS,EAAE;IACTwB,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}

View File

@@ -0,0 +1,67 @@
import { NavigationContext, NavigationRouteContext } from '@react-navigation/native';
import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context';
import Background from './Background';
import getDefaultHeaderHeight from './Header/getDefaultHeaderHeight';
import HeaderHeightContext from './Header/HeaderHeightContext';
import HeaderShownContext from './Header/HeaderShownContext';
export default function Screen(props) {
const dimensions = useSafeAreaFrame();
const insets = useSafeAreaInsets();
const isParentHeaderShown = React.useContext(HeaderShownContext);
const parentHeaderHeight = React.useContext(HeaderHeightContext);
const {
focused,
modal = false,
header,
headerShown = true,
headerTransparent,
headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,
navigation,
route,
children,
style
} = props;
const [headerHeight, setHeaderHeight] = React.useState(() => getDefaultHeaderHeight(dimensions, modal, headerStatusBarHeight));
return /*#__PURE__*/React.createElement(Background, {
accessibilityElementsHidden: !focused,
importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
style: [styles.container, style]
}, /*#__PURE__*/React.createElement(View, {
style: styles.content
}, /*#__PURE__*/React.createElement(HeaderShownContext.Provider, {
value: isParentHeaderShown || headerShown !== false
}, /*#__PURE__*/React.createElement(HeaderHeightContext.Provider, {
value: headerShown ? headerHeight : parentHeaderHeight ?? 0
}, children))), headerShown ? /*#__PURE__*/React.createElement(NavigationContext.Provider, {
value: navigation
}, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {
value: route
}, /*#__PURE__*/React.createElement(View, {
onLayout: e => {
const {
height
} = e.nativeEvent.layout;
setHeaderHeight(height);
},
style: headerTransparent ? styles.absolute : null
}, header))) : null);
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column-reverse'
},
// This is necessary to avoid applying 'column-reverse' to screen content
content: {
flex: 1
},
absolute: {
position: 'absolute',
top: 0,
left: 0,
right: 0
}
});
//# sourceMappingURL=Screen.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["NavigationContext","NavigationRouteContext","React","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Background","getDefaultHeaderHeight","HeaderHeightContext","HeaderShownContext","Screen","props","dimensions","insets","isParentHeaderShown","useContext","parentHeaderHeight","focused","modal","header","headerShown","headerTransparent","headerStatusBarHeight","top","navigation","route","children","style","headerHeight","setHeaderHeight","useState","styles","container","content","e","height","nativeEvent","layout","absolute","create","flex","flexDirection","position","left","right"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":"AAAA,SACEA,iBAAiB,EAEjBC,sBAAsB,QAGjB,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAEvC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,mBAAmB,MAAM,8BAA8B;AAC9D,OAAOC,kBAAkB,MAAM,6BAA6B;AAe5D,eAAe,SAASC,MAAM,CAACC,KAAY,EAAE;EAC3C,MAAMC,UAAU,GAAGR,gBAAgB,EAAE;EACrC,MAAMS,MAAM,GAAGR,iBAAiB,EAAE;EAElC,MAAMS,mBAAmB,GAAGb,KAAK,CAACc,UAAU,CAACN,kBAAkB,CAAC;EAChE,MAAMO,kBAAkB,GAAGf,KAAK,CAACc,UAAU,CAACP,mBAAmB,CAAC;EAEhE,MAAM;IACJS,OAAO;IACPC,KAAK,GAAG,KAAK;IACbC,MAAM;IACNC,WAAW,GAAG,IAAI;IAClBC,iBAAiB;IACjBC,qBAAqB,GAAGR,mBAAmB,GAAG,CAAC,GAAGD,MAAM,CAACU,GAAG;IAC5DC,UAAU;IACVC,KAAK;IACLC,QAAQ;IACRC;EACF,CAAC,GAAGhB,KAAK;EAET,MAAM,CAACiB,YAAY,EAAEC,eAAe,CAAC,GAAG5B,KAAK,CAAC6B,QAAQ,CAAC,MACrDvB,sBAAsB,CAACK,UAAU,EAAEM,KAAK,EAAEI,qBAAqB,CAAC,CACjE;EAED,oBACE,oBAAC,UAAU;IACT,2BAA2B,EAAE,CAACL,OAAQ;IACtC,yBAAyB,EAAEA,OAAO,GAAG,MAAM,GAAG,qBAAsB;IACpE,KAAK,EAAE,CAACc,MAAM,CAACC,SAAS,EAAEL,KAAK;EAAE,gBAEjC,oBAAC,IAAI;IAAC,KAAK,EAAEI,MAAM,CAACE;EAAQ,gBAC1B,oBAAC,kBAAkB,CAAC,QAAQ;IAC1B,KAAK,EAAEnB,mBAAmB,IAAIM,WAAW,KAAK;EAAM,gBAEpD,oBAAC,mBAAmB,CAAC,QAAQ;IAC3B,KAAK,EAAEA,WAAW,GAAGQ,YAAY,GAAGZ,kBAAkB,IAAI;EAAE,GAE3DU,QAAQ,CACoB,CACH,CACzB,EACNN,WAAW,gBACV,oBAAC,iBAAiB,CAAC,QAAQ;IAAC,KAAK,EAAEI;EAAW,gBAC5C,oBAAC,sBAAsB,CAAC,QAAQ;IAAC,KAAK,EAAEC;EAAM,gBAC5C,oBAAC,IAAI;IACH,QAAQ,EAAGS,CAAC,IAAK;MACf,MAAM;QAAEC;MAAO,CAAC,GAAGD,CAAC,CAACE,WAAW,CAACC,MAAM;MAEvCR,eAAe,CAACM,MAAM,CAAC;IACzB,CAAE;IACF,KAAK,EAAEd,iBAAiB,GAAGU,MAAM,CAACO,QAAQ,GAAG;EAAK,GAEjDnB,MAAM,CACF,CACyB,CACP,GAC3B,IAAI,CACG;AAEjB;AAEA,MAAMY,MAAM,GAAG7B,UAAU,CAACqC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD;EACAR,OAAO,EAAE;IACPO,IAAI,EAAE;EACR,CAAC;EACDF,QAAQ,EAAE;IACRI,QAAQ,EAAE,UAAU;IACpBnB,GAAG,EAAE,CAAC;IACNoB,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAC,CAAC"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

View File

@@ -0,0 +1,15 @@
import * as React from 'react';
const contexts = '__react_navigation__elements_contexts';
// We use a global variable to keep our contexts so that we can reuse same contexts across packages
global[contexts] = global[contexts] ?? new Map();
export default function getNamedContext(name, initialValue) {
let context = global[contexts].get(name);
if (context) {
return context;
}
context = /*#__PURE__*/React.createContext(initialValue);
context.displayName = name;
global[contexts].set(name, context);
return context;
}
//# sourceMappingURL=getNamedContext.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["React","contexts","global","Map","getNamedContext","name","initialValue","context","get","createContext","displayName","set"],"sourceRoot":"../../src","sources":["getNamedContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,MAAMC,QAAQ,GAAG,uCAAuC;AAMxD;AACAC,MAAM,CAACD,QAAQ,CAAC,GAAGC,MAAM,CAACD,QAAQ,CAAC,IAAI,IAAIE,GAAG,EAA8B;AAE5E,eAAe,SAASC,eAAe,CACrCC,IAAY,EACZC,YAAe,EACG;EAClB,IAAIC,OAAO,GAAGL,MAAM,CAACD,QAAQ,CAAC,CAACO,GAAG,CAACH,IAAI,CAAC;EAExC,IAAIE,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAA,OAAO,gBAAGP,KAAK,CAACS,aAAa,CAAIH,YAAY,CAAC;EAC9CC,OAAO,CAACG,WAAW,GAAGL,IAAI;EAE1BH,MAAM,CAACD,QAAQ,CAAC,CAACU,GAAG,CAACN,IAAI,EAAEE,OAAO,CAAC;EAEnC,OAAOA,OAAO;AAChB"}

View File

@@ -0,0 +1,23 @@
export { default as Background } from './Background';
export { default as getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight';
export { default as getHeaderTitle } from './Header/getHeaderTitle';
export { default as Header } from './Header/Header';
export { default as HeaderBackButton } from './Header/HeaderBackButton';
export { default as HeaderBackContext } from './Header/HeaderBackContext';
export { default as HeaderBackground } from './Header/HeaderBackground';
export { default as HeaderHeightContext } from './Header/HeaderHeightContext';
export { default as HeaderShownContext } from './Header/HeaderShownContext';
export { default as HeaderTitle } from './Header/HeaderTitle';
export { default as useHeaderHeight } from './Header/useHeaderHeight';
export { default as MissingIcon } from './MissingIcon';
export { default as PlatformPressable } from './PlatformPressable';
export { default as ResourceSavingView } from './ResourceSavingView';
export { default as SafeAreaProviderCompat } from './SafeAreaProviderCompat';
export { default as Screen } from './Screen';
export const Assets = [
// eslint-disable-next-line import/no-commonjs
require('./assets/back-icon.png'),
// eslint-disable-next-line import/no-commonjs
require('./assets/back-icon-mask.png')];
export * from './types';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default","Background","getDefaultHeaderHeight","getHeaderTitle","Header","HeaderBackButton","HeaderBackContext","HeaderBackground","HeaderHeightContext","HeaderShownContext","HeaderTitle","useHeaderHeight","MissingIcon","PlatformPressable","ResourceSavingView","SafeAreaProviderCompat","Screen","Assets","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,cAAc;AACpD,SAASD,OAAO,IAAIE,sBAAsB,QAAQ,iCAAiC;AACnF,SAASF,OAAO,IAAIG,cAAc,QAAQ,yBAAyB;AACnE,SAASH,OAAO,IAAII,MAAM,QAAQ,iBAAiB;AACnD,SAASJ,OAAO,IAAIK,gBAAgB,QAAQ,2BAA2B;AACvE,SAASL,OAAO,IAAIM,iBAAiB,QAAQ,4BAA4B;AACzE,SAASN,OAAO,IAAIO,gBAAgB,QAAQ,2BAA2B;AACvE,SAASP,OAAO,IAAIQ,mBAAmB,QAAQ,8BAA8B;AAC7E,SAASR,OAAO,IAAIS,kBAAkB,QAAQ,6BAA6B;AAC3E,SAAST,OAAO,IAAIU,WAAW,QAAQ,sBAAsB;AAC7D,SAASV,OAAO,IAAIW,eAAe,QAAQ,0BAA0B;AACrE,SAASX,OAAO,IAAIY,WAAW,QAAQ,eAAe;AACtD,SAASZ,OAAO,IAAIa,iBAAiB,QAAQ,qBAAqB;AAClE,SAASb,OAAO,IAAIc,kBAAkB,QAAQ,sBAAsB;AACpE,SAASd,OAAO,IAAIe,sBAAsB,QAAQ,0BAA0B;AAC5E,SAASf,OAAO,IAAIgB,MAAM,QAAQ,UAAU;AAE5C,OAAO,MAAMC,MAAM,GAAG;AACpB;AACAC,OAAO,CAAC,wBAAwB,CAAC;AACjC;AACAA,OAAO,CAAC,6BAA6B,CAAC,CACvC;AAED,cAAc,SAAS"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}