Implementación del TabBar

parent 6e9bd8d7
Showing with 7399 additions and 1 deletions
import React from "react";
import { Image, StyleSheet } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import listaMatRes from './listaMatRes.js';
const tabBarEstilos = StyleSheet.create({
icono: {
width: 20,
height: 20
}
});
const tabBar = createBottomTabNavigator();
const TabBar = () => {
return(
<NavigationContainer>
<tabBar.Navigator screenOptions={{headerShown: false}}>
<tabBar.Screen name="Inicio" component={listaMatRes}
options={{
tabBarIcon: ({size, color}) => {
return <Image style={{width: size, height: size, tintColor: color}} source={require("./assets/img/icons/IconoInicio.png")}/>
}
}}/>
<tabBar.Screen name="Instalaciones" component={listaMatRes}
options={{
tabBarIcon: ({size, color}) => {
return <Image style={{width: size, height: size, tintColor: color}} source={require("./assets/img/icons/IconoInstalaciones.png")}/>
}
}}/>
<tabBar.Screen name="Material" component={listaMatRes}
options={{
tabBarIcon: ({size, color}) => {
return <Image style={{width: size, height: size, tintColor: color}} source={require("./assets/img/icons/IconoMaterial.png")}/>
}
}}/>
<tabBar.Screen name="Perfil" component={listaMatRes}
options={{
tabBarIcon: ({size, color}) => {
return <Image style={{width: size, height: size, tintColor: color}} source={require("./assets/img/icons/IconoPerfil.png")}/>
}
}}/>
</tabBar.Navigator>
</NavigationContainer>
);
}
export default TabBar;
\ No newline at end of file
......@@ -3,6 +3,6 @@
*/
import {AppRegistry} from 'react-native';
import App from './listaMatRes';
import App from './TabBar';
AppRegistry.registerComponent("gestion", () => App);
MIT License
Copyright (c) 2017 React Navigation Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# `@react-navigation/bottom-tabs`
Bottom tab navigator for React Navigation following iOS design guidelines.
Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/bottom-tab-navigator/).
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "BottomTabBar", {
enumerable: true,
get: function () {
return _BottomTabBar.default;
}
});
Object.defineProperty(exports, "BottomTabBarHeightCallbackContext", {
enumerable: true,
get: function () {
return _BottomTabBarHeightCallbackContext.default;
}
});
Object.defineProperty(exports, "BottomTabBarHeightContext", {
enumerable: true,
get: function () {
return _BottomTabBarHeightContext.default;
}
});
Object.defineProperty(exports, "BottomTabView", {
enumerable: true,
get: function () {
return _BottomTabView.default;
}
});
Object.defineProperty(exports, "createBottomTabNavigator", {
enumerable: true,
get: function () {
return _createBottomTabNavigator.default;
}
});
Object.defineProperty(exports, "useBottomTabBarHeight", {
enumerable: true,
get: function () {
return _useBottomTabBarHeight.default;
}
});
var _createBottomTabNavigator = _interopRequireDefault(require("./navigators/createBottomTabNavigator"));
var _BottomTabBar = _interopRequireDefault(require("./views/BottomTabBar"));
var _BottomTabView = _interopRequireDefault(require("./views/BottomTabView"));
var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("./utils/BottomTabBarHeightCallbackContext"));
var _BottomTabBarHeightContext = _interopRequireDefault(require("./utils/BottomTabBarHeightContext"));
var _useBottomTabBarHeight = _interopRequireDefault(require("./utils/useBottomTabBarHeight"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AAKA;AACA;AAKA;AACA;AACA;AAAiF"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _native = require("@react-navigation/native");
var React = _interopRequireWildcard(require("react"));
var _warnOnce = _interopRequireDefault(require("warn-once"));
var _BottomTabView = _interopRequireDefault(require("../views/BottomTabView"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
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); }
function BottomTabNavigator(_ref) {
let {
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
sceneContainerStyle,
...restWithDeprecated
} = _ref;
const {
// @ts-expect-error: lazy is deprecated
lazy,
// @ts-expect-error: tabBarOptions is deprecated
tabBarOptions,
...rest
} = restWithDeprecated;
let defaultScreenOptions = {};
if (tabBarOptions) {
Object.assign(defaultScreenOptions, {
tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar,
tabBarActiveTintColor: tabBarOptions.activeTintColor,
tabBarInactiveTintColor: tabBarOptions.inactiveTintColor,
tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor,
tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor,
tabBarAllowFontScaling: tabBarOptions.allowFontScaling,
tabBarShowLabel: tabBarOptions.showLabel,
tabBarLabelStyle: tabBarOptions.labelStyle,
tabBarIconStyle: tabBarOptions.iconStyle,
tabBarItemStyle: tabBarOptions.tabStyle,
tabBarLabelPosition: tabBarOptions.labelPosition ?? (tabBarOptions.adaptive === false ? 'below-icon' : undefined),
tabBarStyle: [{
display: tabBarOptions.tabBarVisible ? 'none' : 'flex'
}, defaultScreenOptions.tabBarStyle]
});
Object.keys(defaultScreenOptions).forEach(key => {
if (defaultScreenOptions[key] === undefined) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete defaultScreenOptions[key];
}
});
(0, _warnOnce.default)(tabBarOptions, `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`);
}
if (typeof lazy === 'boolean') {
defaultScreenOptions.lazy = lazy;
(0, _warnOnce.default)(true, `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`);
}
const {
state,
descriptors,
navigation,
NavigationContent
} = (0, _native.useNavigationBuilder)(_native.TabRouter, {
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
defaultScreenOptions
});
return /*#__PURE__*/React.createElement(NavigationContent, null, /*#__PURE__*/React.createElement(_BottomTabView.default, _extends({}, rest, {
state: state,
navigation: navigation,
descriptors: descriptors,
sceneContainerStyle: sceneContainerStyle
})));
}
var _default = (0, _native.createNavigatorFactory)(BottomTabNavigator);
exports.default = _default;
//# sourceMappingURL=createBottomTabNavigator.js.map
\ No newline at end of file
{"version":3,"names":["BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","warnOnce","JSON","stringify","state","descriptors","navigation","NavigationContent","useNavigationBuilder","TabRouter","createNavigatorFactory"],"sourceRoot":"../../src","sources":["createBottomTabNavigator.tsx"],"mappings":";;;;;;AAAA;AAUA;AACA;AAOA;AAAmD;AAAA;AAAA;AAAA;AAWnD,SAASA,kBAAkB,OASjB;EAAA,IATkB;IAC1BC,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbC,mBAAmB;IACnB,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,IAAI;IACJ;IACAC,aAAa;IACb,GAAGC;EACL,CAAC,GAAGH,kBAAkB;EAEtB,IAAII,oBAAgD,GAAG,CAAC,CAAC;EAEzD,IAAIF,aAAa,EAAE;IACjBG,MAA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,MAAM;IAAEG,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GACzD,IAAAC,4BAAoB,EAMlBC,iBAAS,EAAE;IACXpD,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbM;EACF,CAAC,CAAC;EAEJ,oBACE,oBAAC,iBAAiB,qBAChB,oBAAC,sBAAa,eACRD,IAAI;IACR,KAAK,EAAEqC,KAAM;IACb,UAAU,EAAEE,UAAW;IACvB,WAAW,EAAED,WAAY;IACzB,mBAAmB,EAAE1C;EAAoB,GACzC,CACgB;AAExB;AAAC,eAEc,IAAA+C,8BAAsB,EAKnCtD,kBAAkB,CAAC;AAAA"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
//# sourceMappingURL=types.js.map
\ No newline at end of file
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
var _default = /*#__PURE__*/React.createContext(undefined);
exports.default = _default;
//# sourceMappingURL=BottomTabBarHeightCallbackContext.js.map
\ No newline at end of file
{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightCallbackContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV;AAAA"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
var _default = /*#__PURE__*/React.createContext(undefined);
exports.default = _default;
//# sourceMappingURL=BottomTabBarHeightContext.js.map
\ No newline at end of file
{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAAqBC,SAAS,CAAC;AAAA"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useBottomTabBarHeight;
var React = _interopRequireWildcard(require("react"));
var _BottomTabBarHeightContext = _interopRequireDefault(require("./BottomTabBarHeightContext"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
function useBottomTabBarHeight() {
const height = React.useContext(_BottomTabBarHeightContext.default);
if (height === undefined) {
throw new Error("Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?");
}
return height;
}
//# sourceMappingURL=useBottomTabBarHeight.js.map
\ No newline at end of file
{"version":3,"names":["useBottomTabBarHeight","height","React","useContext","BottomTabBarHeightContext","undefined","Error"],"sourceRoot":"../../src","sources":["useBottomTabBarHeight.tsx"],"mappings":";;;;;;AAAA;AAEA;AAAoE;AAAA;AAAA;AAErD,SAASA,qBAAqB,GAAG;EAC9C,MAAMC,MAAM,GAAGC,KAAK,CAACC,UAAU,CAACC,kCAAyB,CAAC;EAE1D,IAAIH,MAAM,KAAKI,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,2FAA2F,CAC5F;EACH;EAEA,OAAOL,MAAM;AACf"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useIsKeyboardShown;
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
function useIsKeyboardShown() {
const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);
React.useEffect(() => {
const handleKeyboardShow = () => setIsKeyboardShown(true);
const handleKeyboardHide = () => setIsKeyboardShown(false);
let subscriptions;
if (_reactNative.Platform.OS === 'ios') {
subscriptions = [_reactNative.Keyboard.addListener('keyboardWillShow', handleKeyboardShow), _reactNative.Keyboard.addListener('keyboardWillHide', handleKeyboardHide)];
} else {
subscriptions = [_reactNative.Keyboard.addListener('keyboardDidShow', handleKeyboardShow), _reactNative.Keyboard.addListener('keyboardDidHide', handleKeyboardHide)];
}
return () => {
subscriptions.forEach(s => s.remove());
};
}, []);
return isKeyboardShown;
}
//# sourceMappingURL=useIsKeyboardShown.js.map
\ No newline at end of file
{"version":3,"names":["useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","React","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","Platform","OS","Keyboard","addListener","forEach","s","remove"],"sourceRoot":"../../src","sources":["useIsKeyboardShown.tsx"],"mappings":";;;;;;AAAA;AACA;AAAuE;AAAA;AAExD,SAASA,kBAAkB,GAAG;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAEnED,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,IAAI,CAAC;IACzD,MAAMK,kBAAkB,GAAG,MAAML,kBAAkB,CAAC,KAAK,CAAC;IAE1D,IAAIM,aAAoC;IAExC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzBF,aAAa,GAAG,CACdG,qBAAQ,CAACC,WAAW,CAAC,kBAAkB,EAAEN,kBAAkB,CAAC,EAC5DK,qBAAQ,CAACC,WAAW,CAAC,kBAAkB,EAAEL,kBAAkB,CAAC,CAC7D;IACH,CAAC,MAAM;MACLC,aAAa,GAAG,CACdG,qBAAQ,CAACC,WAAW,CAAC,iBAAiB,EAAEN,kBAAkB,CAAC,EAC3DK,qBAAQ,CAACC,WAAW,CAAC,iBAAiB,EAAEL,kBAAkB,CAAC,CAC5D;IACH;IAEA,OAAO,MAAM;MACXC,aAAa,CAACK,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,MAAM,EAAE,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOd,eAAe;AACxB"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = Badge;
var _native = require("@react-navigation/native");
var _color = _interopRequireDefault(require("color"));
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function Badge(_ref) {
let {
children,
style,
visible = true,
size = 18,
...rest
} = _ref;
const [opacity] = React.useState(() => new _reactNative.Animated.Value(visible ? 1 : 0));
const [rendered, setRendered] = React.useState(visible);
const theme = (0, _native.useTheme)();
React.useEffect(() => {
if (!rendered) {
return;
}
_reactNative.Animated.timing(opacity, {
toValue: visible ? 1 : 0,
duration: 150,
useNativeDriver: true
}).start(_ref2 => {
let {
finished
} = _ref2;
if (finished && !visible) {
setRendered(false);
}
});
return () => opacity.stopAnimation();
}, [opacity, rendered, visible]);
if (!rendered) {
if (visible) {
setRendered(true);
} else {
return null;
}
}
// @ts-expect-error: backgroundColor definitely exists
const {
backgroundColor = theme.colors.notification,
...restStyle
} = _reactNative.StyleSheet.flatten(style) || {};
const textColor = (0, _color.default)(backgroundColor).isLight() ? 'black' : 'white';
const borderRadius = size / 2;
const fontSize = Math.floor(size * 3 / 4);
return /*#__PURE__*/React.createElement(_reactNative.Animated.Text, _extends({
numberOfLines: 1,
style: [{
transform: [{
scale: opacity.interpolate({
inputRange: [0, 1],
outputRange: [0.5, 1]
})
}],
color: textColor,
lineHeight: size - 1,
height: size,
minWidth: size,
opacity,
backgroundColor,
fontSize,
borderRadius
}, styles.container, restStyle]
}, rest), children);
}
const styles = _reactNative.StyleSheet.create({
container: {
alignSelf: 'flex-end',
textAlign: 'center',
paddingHorizontal: 4,
overflow: 'hidden'
}
});
//# sourceMappingURL=Badge.js.map
\ No newline at end of file
{"version":3,"names":["Badge","children","style","visible","size","rest","opacity","React","useState","Animated","Value","rendered","setRendered","theme","useTheme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","StyleSheet","flatten","textColor","color","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"sourceRoot":"../../src","sources":["Badge.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAA0E;AAAA;AAAA;AAAA;AAqB3D,SAASA,KAAK,OAMnB;EAAA,IANoB;IAC5BC,QAAQ;IACRC,KAAK;IACLC,OAAO,GAAG,IAAI;IACdC,IAAI,GAAG,EAAE;IACT,GAAGC;EACE,CAAC;EACN,MAAM,CAACC,OAAO,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,MAAM,IAAIC,qBAAQ,CAACC,KAAK,CAACP,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;EAC3E,MAAM,CAACQ,QAAQ,EAAEC,WAAW,CAAC,GAAGL,KAAK,CAACC,QAAQ,CAACL,OAAO,CAAC;EAEvD,MAAMU,KAAK,GAAG,IAAAC,gBAAQ,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CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC,CACF;MACDV,KAAK,EAAED,SAAS;MAChBY,UAAU,EAAErC,IAAI,GAAG,CAAC;MACpBsC,MAAM,EAAEtC,IAAI;MACZuC,QAAQ,EAAEvC,IAAI;MACdE,OAAO;MACPiB,eAAe;MACfU,QAAQ;MACRD;IACF,CAAC,EACDY,MAAM,CAACC,SAAS,EAChBnB,SAAS;EACT,GACErB,IAAI,GAEPJ,QAAQ,CACK;AAEpB;AAEA,MAAM2C,MAAM,GAAGjB,uBAAU,CAACmB,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = BottomTabBar;
exports.getTabBarHeight = void 0;
var _elements = require("@react-navigation/elements");
var _native = require("@react-navigation/native");
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("../utils/BottomTabBarHeightCallbackContext"));
var _useIsKeyboardShown = _interopRequireDefault(require("../utils/useIsKeyboardShown"));
var _BottomTabItem = _interopRequireDefault(require("./BottomTabItem"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const DEFAULT_TABBAR_HEIGHT = 49;
const COMPACT_TABBAR_HEIGHT = 32;
const DEFAULT_MAX_TAB_ITEM_WIDTH = 125;
const useNativeDriver = _reactNative.Platform.OS !== 'web';
const shouldUseHorizontalLabels = _ref => {
let {
state,
descriptors,
layout,
dimensions
} = _ref;
const {
tabBarLabelPosition
} = descriptors[state.routes[state.index].key].options;
if (tabBarLabelPosition) {
switch (tabBarLabelPosition) {
case 'beside-icon':
return true;
case 'below-icon':
return false;
}
}
if (layout.width >= 768) {
// Screen size matches a tablet
const maxTabWidth = state.routes.reduce((acc, route) => {
const {
tabBarItemStyle
} = descriptors[route.key].options;
const flattenedStyle = _reactNative.StyleSheet.flatten(tabBarItemStyle);
if (flattenedStyle) {
if (typeof flattenedStyle.width === 'number') {
return acc + flattenedStyle.width;
} else if (typeof flattenedStyle.maxWidth === 'number') {
return acc + flattenedStyle.maxWidth;
}
}
return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;
}, 0);
return maxTabWidth <= layout.width;
} else {
return dimensions.width > dimensions.height;
}
};
const getPaddingBottom = insets => Math.max(insets.bottom - _reactNative.Platform.select({
ios: 4,
default: 0
}), 0);
const getTabBarHeight = _ref2 => {
var _StyleSheet$flatten;
let {
state,
descriptors,
dimensions,
insets,
style,
...rest
} = _ref2;
// @ts-ignore
const customHeight = (_StyleSheet$flatten = _reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height;
if (typeof customHeight === 'number') {
return customHeight;
}
const isLandscape = dimensions.width > dimensions.height;
const horizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
...rest
});
const paddingBottom = getPaddingBottom(insets);
if (_reactNative.Platform.OS === 'ios' && !_reactNative.Platform.isPad && isLandscape && horizontalLabels) {
return COMPACT_TABBAR_HEIGHT + paddingBottom;
}
return DEFAULT_TABBAR_HEIGHT + paddingBottom;
};
exports.getTabBarHeight = getTabBarHeight;
function BottomTabBar(_ref3) {
let {
state,
navigation,
descriptors,
insets,
style
} = _ref3;
const {
colors
} = (0, _native.useTheme)();
const buildLink = (0, _native.useLinkBuilder)();
const focusedRoute = state.routes[state.index];
const focusedDescriptor = descriptors[focusedRoute.key];
const focusedOptions = focusedDescriptor.options;
const {
tabBarShowLabel,
tabBarHideOnKeyboard = false,
tabBarVisibilityAnimationConfig,
tabBarStyle,
tabBarBackground,
tabBarActiveTintColor,
tabBarInactiveTintColor,
tabBarActiveBackgroundColor,
tabBarInactiveBackgroundColor
} = focusedOptions;
const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)();
const isKeyboardShown = (0, _useIsKeyboardShown.default)();
const onHeightChange = _react.default.useContext(_BottomTabBarHeightCallbackContext.default);
const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);
const visibilityAnimationConfigRef = _react.default.useRef(tabBarVisibilityAnimationConfig);
_react.default.useEffect(() => {
visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;
});
const [isTabBarHidden, setIsTabBarHidden] = _react.default.useState(!shouldShowTabBar);
const [visible] = _react.default.useState(() => new _reactNative.Animated.Value(shouldShowTabBar ? 1 : 0));
_react.default.useEffect(() => {
const visibilityAnimationConfig = visibilityAnimationConfigRef.current;
if (shouldShowTabBar) {
var _visibilityAnimationC, _visibilityAnimationC2;
const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? _reactNative.Animated.spring : _reactNative.Animated.timing;
animation(visible, {
toValue: 1,
useNativeDriver,
duration: 250,
...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config)
}).start(_ref4 => {
let {
finished
} = _ref4;
if (finished) {
setIsTabBarHidden(false);
}
});
} else {
var _visibilityAnimationC3, _visibilityAnimationC4;
setIsTabBarHidden(true);
const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? _reactNative.Animated.spring : _reactNative.Animated.timing;
animation(visible, {
toValue: 0,
useNativeDriver,
duration: 200,
...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config)
}).start();
}
return () => visible.stopAnimation();
}, [visible, shouldShowTabBar]);
const [layout, setLayout] = _react.default.useState({
height: 0,
width: dimensions.width
});
const handleLayout = e => {
const {
height,
width
} = e.nativeEvent.layout;
onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height);
setLayout(layout => {
if (height === layout.height && width === layout.width) {
return layout;
} else {
return {
height,
width
};
}
});
};
const {
routes
} = state;
const paddingBottom = getPaddingBottom(insets);
const tabBarHeight = getTabBarHeight({
state,
descriptors,
insets,
dimensions,
layout,
style: [tabBarStyle, style]
});
const hasHorizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
layout
});
const tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground();
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
style: [styles.tabBar, {
backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card,
borderTopColor: colors.border
}, {
transform: [{
translateY: visible.interpolate({
inputRange: [0, 1],
outputRange: [layout.height + paddingBottom + _reactNative.StyleSheet.hairlineWidth, 0]
})
}],
// Absolutely position the tab bar so that the content is below it
// This is needed to avoid gap at bottom when the tab bar is hidden
position: isTabBarHidden ? 'absolute' : null
}, {
height: tabBarHeight,
paddingBottom,
paddingHorizontal: Math.max(insets.left, insets.right)
}, tabBarStyle],
pointerEvents: isTabBarHidden ? 'none' : 'auto',
onLayout: handleLayout
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
pointerEvents: "none",
style: _reactNative.StyleSheet.absoluteFill
}, tabBarBackgroundElement), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
accessibilityRole: "tablist",
style: styles.content
}, routes.map((route, index) => {
const focused = index === state.index;
const {
options
} = descriptors[route.key];
const onPress = () => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true
});
if (!focused && !event.defaultPrevented) {
navigation.dispatch({
..._native.CommonActions.navigate({
name: route.name,
merge: true
}),
target: state.key
});
}
};
const onLongPress = () => {
navigation.emit({
type: 'tabLongPress',
target: route.key
});
};
const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && _reactNative.Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined;
return /*#__PURE__*/_react.default.createElement(_native.NavigationContext.Provider, {
key: route.key,
value: descriptors[route.key].navigation
}, /*#__PURE__*/_react.default.createElement(_native.NavigationRouteContext.Provider, {
value: route
}, /*#__PURE__*/_react.default.createElement(_BottomTabItem.default, {
route: route,
descriptor: descriptors[route.key],
focused: focused,
horizontal: hasHorizontalLabels,
onPress: onPress,
onLongPress: onLongPress,
accessibilityLabel: accessibilityLabel,
to: buildLink(route.name, route.params),
testID: options.tabBarTestID,
allowFontScaling: options.tabBarAllowFontScaling,
activeTintColor: tabBarActiveTintColor,
inactiveTintColor: tabBarInactiveTintColor,
activeBackgroundColor: tabBarActiveBackgroundColor,
inactiveBackgroundColor: tabBarInactiveBackgroundColor,
button: options.tabBarButton,
icon: options.tabBarIcon ?? (_ref5 => {
let {
color,
size
} = _ref5;
return /*#__PURE__*/_react.default.createElement(_elements.MissingIcon, {
color: color,
size: size
});
}),
badge: options.tabBarBadge,
badgeStyle: options.tabBarBadgeStyle,
label: label,
showLabel: tabBarShowLabel,
labelStyle: options.tabBarLabelStyle,
iconStyle: options.tabBarIconStyle,
style: options.tabBarItemStyle
})));
})));
}
const styles = _reactNative.StyleSheet.create({
tabBar: {
left: 0,
right: 0,
bottom: 0,
borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
elevation: 8
},
content: {
flex: 1,
flexDirection: 'row'
}
});
//# sourceMappingURL=BottomTabBar.js.map
\ No newline at end of file
{"version":3,"names":["DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","Platform","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","StyleSheet","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","useTheme","buildLink","useLinkBuilder","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","useSafeAreaFrame","isKeyboardShown","useIsKeyboardShown","onHeightChange","React","useContext","BottomTabBarHeightCallbackContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Animated","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","CommonActions","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"sourceRoot":"../../src","sources":["BottomTabBar.tsx"],"mappings":";;;;;;;AAAA;AACA;AASA;AACA;AASA;AAGA;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BAAgB,EAAE5H,OAAO,CAAC6H,sBAAuB;MACjD,eAAe,EAAEnF,qBAAsB;MACvC,iBAAiB,EAAEC,uBAAwB;MAC3C,qBAAqB,EAAEC,2BAA4B;MACnD,uBAAuB,EAAEC,6BAA8B;MACvD,MAAM,EAAE7C,OAAO,CAAC8H,YAAa;MAC7B,IAAI,EACF9H,OAAO,CAAC+H,UAAU,KACjB;QAAA,IAAC;UAAEC,KAAK;UAAEC;QAAK,CAAC;QAAA,oBACf,6BAAC,qBAAW;UAAC,KAAK,EAAED,KAAM;UAAC,IAAI,EAAEC;QAAK,EAAG;MAAA,CAC1C,CACF;MACD,KAAK,EAAEjI,OAAO,CAACkI,WAAY;MAC3B,UAAU,EAAElI,OAAO,CAACmI,gBAAiB;MACrC,KAAK,EAAEf,KAAM;MACb,SAAS,EAAE/E,eAAgB;MAC3B,UAAU,EAAErC,OAAO,CAACoI,gBAAiB;MACrC,SAAS,EAAEpI,OAAO,CAACqI,eAAgB;MACnC,KAAK,EAAErI,OAAO,CAACM;IAAgB,EAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,MAAM6E,MAAM,GAAG3E,uBAAU,CAAC8H,MAAM,CAAC;EAC/BlD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRlF,MAAM,EAAE,CAAC;IACTuH,cAAc,EAAE/H,uBAAU,CAACsF,aAAa;IACxC0C,SAAS,EAAE;EACb,CAAC;EACDpC,OAAO,EAAE;IACPqC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = BottomTabBarItem;
var _native = require("@react-navigation/native");
var _color = _interopRequireDefault(require("color"));
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _TabBarIcon = _interopRequireDefault(require("./TabBarIcon"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function BottomTabBarItem(_ref) {
let {
focused,
route,
descriptor,
label,
icon,
badge,
badgeStyle,
to,
button = _ref2 => {
let {
children,
style,
onPress,
to,
accessibilityRole,
...rest
} = _ref2;
if (_reactNative.Platform.OS === 'web' && to) {
// React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
// We need to use `onClick` to be able to prevent default browser handling of links.
return /*#__PURE__*/_react.default.createElement(_native.Link, _extends({}, rest, {
to: to,
style: [styles.button, style],
onPress: e => {
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && (
// ignore clicks with modifier keys
e.button == null || e.button === 0) // ignore everything but left clicks
) {
e.preventDefault();
onPress === null || onPress === void 0 ? void 0 : onPress(e);
}
}
}), children);
} else {
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({}, rest, {
accessibilityRole: accessibilityRole,
onPress: onPress,
style: style
}), children);
}
},
accessibilityLabel,
testID,
onPress,
onLongPress,
horizontal,
activeTintColor: customActiveTintColor,
inactiveTintColor: customInactiveTintColor,
activeBackgroundColor = 'transparent',
inactiveBackgroundColor = 'transparent',
showLabel = true,
allowFontScaling,
labelStyle,
iconStyle,
style
} = _ref;
const {
colors
} = (0, _native.useTheme)();
const activeTintColor = customActiveTintColor === undefined ? colors.primary : customActiveTintColor;
const inactiveTintColor = customInactiveTintColor === undefined ? (0, _color.default)(colors.text).mix((0, _color.default)(colors.card), 0.5).hex() : customInactiveTintColor;
const renderLabel = _ref3 => {
let {
focused
} = _ref3;
if (showLabel === false) {
return null;
}
const color = focused ? activeTintColor : inactiveTintColor;
if (typeof label === 'string') {
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
numberOfLines: 1,
style: [styles.label, {
color
}, horizontal ? styles.labelBeside : styles.labelBeneath, labelStyle],
allowFontScaling: allowFontScaling
}, label);
}
const {
options
} = descriptor;
const children = typeof options.tabBarLabel === 'string' ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
return label({
focused,
color,
position: horizontal ? 'beside-icon' : 'below-icon',
children
});
};
const renderIcon = _ref4 => {
let {
focused
} = _ref4;
if (icon === undefined) {
return null;
}
const activeOpacity = focused ? 1 : 0;
const inactiveOpacity = focused ? 0 : 1;
return /*#__PURE__*/_react.default.createElement(_TabBarIcon.default, {
route: route,
horizontal: horizontal,
badge: badge,
badgeStyle: badgeStyle,
activeOpacity: activeOpacity,
inactiveOpacity: inactiveOpacity,
activeTintColor: activeTintColor,
inactiveTintColor: inactiveTintColor,
renderIcon: icon,
style: iconStyle
});
};
const scene = {
route,
focused
};
const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor;
return button({
to,
onPress,
onLongPress,
testID,
accessibilityLabel,
// FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS
accessibilityRole: _reactNative.Platform.select({
ios: 'button',
default: 'tab'
}),
accessibilityState: {
selected: focused
},
// @ts-expect-error: keep for compatibility with older React Native versions
accessibilityStates: focused ? ['selected'] : [],
style: [styles.tab, {
backgroundColor
}, horizontal ? styles.tabLandscape : styles.tabPortrait, style],
children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderIcon(scene), renderLabel(scene))
});
}
const styles = _reactNative.StyleSheet.create({
tab: {
flex: 1,
alignItems: 'center'
},
tabPortrait: {
justifyContent: 'flex-end',
flexDirection: 'column'
},
tabLandscape: {
justifyContent: 'center',
flexDirection: 'row'
},
label: {
textAlign: 'center',
backgroundColor: 'transparent'
},
labelBeneath: {
fontSize: 10
},
labelBeside: {
fontSize: 13,
marginLeft: 20,
marginTop: 3
},
button: {
display: 'flex'
}
});
//# sourceMappingURL=BottomTabItem.js.map
\ No newline at end of file
{"version":3,"names":["BottomTabBarItem","focused","route","descriptor","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","Platform","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","useTheme","undefined","primary","Color","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","options","tabBarLabel","title","name","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","StyleSheet","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"sourceRoot":"../../src","sources":["BottomTabItem.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAgBA;AAAsC;AAAA;AA+GvB,SAASA,gBAAgB,OAiE9B;EAAA,IAjE+B;IACvCC,OAAO;IACPC,KAAK;IACLC,UAAU;IACVC,KAAK;IACLC,IAAI;IACJC,KAAK;IACLC,UAAU;IACVC,EAAE;IACFC,MAAM,GAAG,SAOsB;MAAA,IAPrB;QACRC,QAAQ;QACRC,KAAK;QACLC,OAAO;QACPJ,EAAE;QACFK,iBAAiB;QACjB,GAAGC;MACoB,CAAC;MACxB,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIR,EAAE,EAAE;QAC/B;QACA;QACA,oBACE,6BAAC,YAAI,eACCM,IAAI;UACR,EAAE,EAAEN,EAAG;UACP,KAAK,EAAE,CAACS,MAAM,CAACR,MAAM,EAAEE,KAAK,CAAE;UAC9B,OAAO,EAAGO,CAAM,IAAK;YACnB,IACE,EAAEA,CAAC,CAACC,OAAO,IAAID,CAAC,CAACE,MAAM,IAAIF,CAAC,CAACG,OAAO,IAAIH,CAAC,CAACI,QAAQ,CAAC;YAAI;YACtDJ,CAAC,CAACT,MAAM,IAAI,IAAI,IAAIS,CAAC,CAACT,MAAM,KAAK,CAA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,CAAC,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = BottomTabView;
var _elements = require("@react-navigation/elements");
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
var _BottomTabBarHeightCallbackContext = _interopRequireDefault(require("../utils/BottomTabBarHeightCallbackContext"));
var _BottomTabBarHeightContext = _interopRequireDefault(require("../utils/BottomTabBarHeightContext"));
var _BottomTabBar = _interopRequireWildcard(require("./BottomTabBar"));
var _ScreenFallback = require("./ScreenFallback");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
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); }
function BottomTabView(props) {
const {
tabBar = props => /*#__PURE__*/React.createElement(_BottomTabBar.default, props),
state,
navigation,
descriptors,
safeAreaInsets,
detachInactiveScreens = _reactNative.Platform.OS === 'web' || _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios',
sceneContainerStyle
} = props;
const focusedRouteKey = state.routes[state.index].key;
const [loaded, setLoaded] = React.useState([focusedRouteKey]);
if (!loaded.includes(focusedRouteKey)) {
setLoaded([...loaded, focusedRouteKey]);
}
const dimensions = _elements.SafeAreaProviderCompat.initialMetrics.frame;
const [tabBarHeight, setTabBarHeight] = React.useState(() => (0, _BottomTabBar.getTabBarHeight)({
state,
descriptors,
dimensions,
layout: {
width: dimensions.width,
height: 0
},
insets: {
..._elements.SafeAreaProviderCompat.initialMetrics.insets,
...props.safeAreaInsets
},
style: descriptors[state.routes[state.index].key].options.tabBarStyle
}));
const renderTabBar = () => {
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaInsetsContext.Consumer, null, insets => tabBar({
state: state,
descriptors: descriptors,
navigation: navigation,
insets: {
top: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.top) ?? (insets === null || insets === void 0 ? void 0 : insets.top) ?? 0,
right: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.right) ?? (insets === null || insets === void 0 ? void 0 : insets.right) ?? 0,
bottom: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.bottom) ?? (insets === null || insets === void 0 ? void 0 : insets.bottom) ?? 0,
left: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.left) ?? (insets === null || insets === void 0 ? void 0 : insets.left) ?? 0
}
}));
};
const {
routes
} = state;
return /*#__PURE__*/React.createElement(_elements.SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreenContainer, {
enabled: detachInactiveScreens,
hasTwoStates: true,
style: styles.container
}, routes.map((route, index) => {
const descriptor = descriptors[route.key];
const {
lazy = true,
unmountOnBlur
} = descriptor.options;
const isFocused = state.index === index;
if (unmountOnBlur && !isFocused) {
return null;
}
if (lazy && !loaded.includes(route.key) && !isFocused) {
// Don't render a lazy screen if we've never navigated to it
return null;
}
const {
freezeOnBlur,
header = _ref => {
let {
layout,
options
} = _ref;
return /*#__PURE__*/React.createElement(_elements.Header, _extends({}, options, {
layout: layout,
title: (0, _elements.getHeaderTitle)(options, route.name)
}));
},
headerShown,
headerStatusBarHeight,
headerTransparent
} = descriptor.options;
return /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreen, {
key: route.key,
style: [_reactNative.StyleSheet.absoluteFill, {
zIndex: isFocused ? 0 : -1
}],
visible: isFocused,
enabled: detachInactiveScreens,
freezeOnBlur: freezeOnBlur
}, /*#__PURE__*/React.createElement(_BottomTabBarHeightContext.default.Provider, {
value: tabBarHeight
}, /*#__PURE__*/React.createElement(_elements.Screen, {
focused: isFocused,
route: descriptor.route,
navigation: descriptor.navigation,
headerShown: headerShown,
headerStatusBarHeight: headerStatusBarHeight,
headerTransparent: headerTransparent,
header: header({
layout: dimensions,
route: descriptor.route,
navigation: descriptor.navigation,
options: descriptor.options
}),
style: sceneContainerStyle
}, descriptor.render())));
})), /*#__PURE__*/React.createElement(_BottomTabBarHeightCallbackContext.default.Provider, {
value: setTabBarHeight
}, renderTabBar()));
}
const styles = _reactNative.StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
}
});
//# sourceMappingURL=BottomTabView.js.map
\ No newline at end of file
{"version":3,"names":["BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","Platform","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","React","useState","includes","dimensions","SafeAreaProviderCompat","initialMetrics","frame","tabBarHeight","setTabBarHeight","getTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","freezeOnBlur","header","getHeaderTitle","name","headerShown","headerStatusBarHeight","headerTransparent","StyleSheet","absoluteFill","zIndex","render","create","flex","overflow"],"sourceRoot":"../../src","sources":["BottomTabView.tsx"],"mappings":";;;;;;AAAA;AAUA;AACA;AACA;AAUA;AACA;AACA;AACA;AAAqE;AAAA;AAAA;AAAA;AAQtD,SAASA,aAAa,CAACC,KAAY,EAAE;EAClD,MAAM;IACJC,MAAM,GAAID,KAAwB,iBAAK,oBAAC,qBAAY,EAAKA,KAAK,CAAI;IAClEE,KAAK;IACLC,UAAU;IACVC,WAAW;IACXC,cAAc;IACdC,qBAAqB,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAC3CD,qBAAQ,CAACC,EAAE,KAAK,SAAS,IACzBD,qBAAQ,CAACC,EAAE,KAAK,KAAK;IACvBC;EACF,CAAC,GAAGT,KAAK;EAET,MAAMU,eAAe,GAAGR,KAAK,CAACS,MAAM,CAACT,KAAK,CAACU,KAAK,CAAC,CAACC,GAAG;EACrD,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,CAACP,eAAe,CAAC,CAAC;EAE7D,IAAI,CAACI,MAAM,CAACI,QAAQ,CAACR,eAAe,CAAC,EAAE;IACrCK,SAAS,CAAC,CAAC,GAAGD,MAAM,EAAEJ,eAAe,CAAC,CAAC;EACzC;EAEA,MAAMS,UAAU,GAAGC,gCAAsB,CAACC,cAAc,CAACC,KAAK;EAC9D,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGR,KAAK,CAACC,QAAQ,CAAC,MACrD,IAAAQ,6BAAe,EAAC;IACdvB,KAAK;IACLE,WAAW;IACXe,UAAU;IACVO,MAAM,EAAE;MAAEC,KAAK,EAAER,UAAU,CAACQ,KAAK;MAAEC,MAAM,EAAE;IAAE,CAAC;IAC9CC,MAAM,EAAE;MACN,GAAGT,gCAAsB,CAACC,cAAc,CAACQ,MAAM;MAC/C,GAAG7B,KAAK,CAACK;IACX,CAAC;IACDyB,KAAK,EAAE1B,WAAW,CAACF,KAAK,CAACS,MAA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P,UAAU;QAClBsB,KAAK,EAAEC,UAAU,CAACD,KAAK;QACvBtC,UAAU,EACRuC,UAAU,CAACvC,UAAoD;QACjE4B,OAAO,EAAEW,UAAU,CAACX;MACtB,CAAC,CAAE;MACH,KAAK,EAAEtB;IAAoB,GAE1BiC,UAAU,CAACc,MAAM,EAAE,CACb,CAC0B,CACzB;EAElB,CAAC,CAAC,CACmB,eACvB,oBAAC,0CAAiC,CAAC,QAAQ;IAAC,KAAK,EAAEhC;EAAgB,GAChES,YAAY,EAAE,CAC4B,CACtB;AAE7B;AAEA,MAAMK,MAAM,GAAGe,uBAAU,CAACI,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MaybeScreen = MaybeScreen;
exports.MaybeScreenContainer = void 0;
var _elements = require("@react-navigation/elements");
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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; }
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); }
let Screens;
try {
Screens = require('react-native-screens');
} catch (e) {
// Ignore
}
const MaybeScreenContainer = _ref => {
var _Screens, _Screens$screensEnabl;
let {
enabled,
...rest
} = _ref;
if ((_Screens = Screens) !== null && _Screens !== void 0 && (_Screens$screensEnabl = _Screens.screensEnabled) !== null && _Screens$screensEnabl !== void 0 && _Screens$screensEnabl.call(_Screens)) {
return /*#__PURE__*/React.createElement(Screens.ScreenContainer, _extends({
enabled: enabled
}, rest));
}
return /*#__PURE__*/React.createElement(_reactNative.View, rest);
};
exports.MaybeScreenContainer = MaybeScreenContainer;
function MaybeScreen(_ref2) {
var _Screens2, _Screens2$screensEnab;
let {
visible,
children,
...rest
} = _ref2;
if ((_Screens2 = Screens) !== null && _Screens2 !== void 0 && (_Screens2$screensEnab = _Screens2.screensEnabled) !== null && _Screens2$screensEnab !== void 0 && _Screens2$screensEnab.call(_Screens2)) {
return /*#__PURE__*/React.createElement(Screens.Screen, _extends({
activityState: visible ? 2 : 0
}, rest), children);
}
return /*#__PURE__*/React.createElement(_elements.ResourceSavingView, _extends({
visible: visible
}, rest), children);
}
//# sourceMappingURL=ScreenFallback.js.map
\ No newline at end of file
{"version":3,"names":["Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sourceRoot":"../../src","sources":["ScreenFallback.tsx"],"mappings":";;;;;;;AAAA;AACA;AACA;AAAqE;AAAA;AAAA;AAUrE,IAAIA,OAA0D;AAE9D,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAsB,CAAC;AAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGK,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;EAAA,IAP+B;IACnCC,OAAO;IACP,GAAGC;EAKL,CAAC;EACC,gBAAIL,OAAO,8DAAP,SAASM,cAAc,kDAAvB,oCAA2B,EAAE;IAC/B,oBAAO,oBAAC,OAAO,CAAC,eAAe;MAAC,OAAO,EAAEF;IAAQ,GAAKC,IAAI,EAAI;EAChE;EAEA,oBAAO,oBAAC,iBAAI,EAAKA,IAAI,CAAI;AAC3B,CAAC;AAAC;AAEK,SAASE,WAAW,QAAwC;EAAA;EAAA,IAAvC;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGJ;EAAY,CAAC;EAC/D,iBAAIL,OAAO,+DAAP,UAASM,cAAc,kDAAvB,qCAA2B,EAAE;IAC/B,oBACE,oBAAC,OAAO,CAAC,MAAM;MAAC,aAAa,EAAEE,OAAO,GAAG,CAAC,GAAG;IAAE,GAAKH,IAAI,GACrDI,QAAQ,CACM;EAErB;EAEA,oBACE,oBAAC,4BAAkB;IAAC,OAAO,EAAED;EAAQ,GAAKH,IAAI,GAC3CI,QAAQ,CACU;AAEzB"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = TabBarIcon;
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _Badge = _interopRequireDefault(require("./Badge"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function TabBarIcon(_ref) {
let {
route: _,
horizontal,
badge,
badgeStyle,
activeOpacity,
inactiveOpacity,
activeTintColor,
inactiveTintColor,
renderIcon,
style
} = _ref;
const size = 25;
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them.
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
style: [horizontal ? styles.iconHorizontal : styles.iconVertical, style]
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
style: [styles.icon, {
opacity: activeOpacity
}]
}, renderIcon({
focused: true,
size,
color: activeTintColor
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
style: [styles.icon, {
opacity: inactiveOpacity
}]
}, renderIcon({
focused: false,
size,
color: inactiveTintColor
})), /*#__PURE__*/_react.default.createElement(_Badge.default, {
visible: badge != null,
style: [styles.badge, horizontal ? styles.badgeHorizontal : styles.badgeVertical, badgeStyle],
size: size * 3 / 4
}, badge));
}
const styles = _reactNative.StyleSheet.create({
icon: {
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them:
// Cover the whole iconContainer:
position: 'absolute',
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
width: '100%',
// Workaround for react-native >= 0.54 layout bug
minWidth: 25
},
iconVertical: {
flex: 1
},
iconHorizontal: {
height: '100%',
marginTop: 3
},
badge: {
position: 'absolute',
left: 3
},
badgeVertical: {
top: 3
},
badgeHorizontal: {
top: 7
}
});
//# sourceMappingURL=TabBarIcon.js.map
\ No newline at end of file
{"version":3,"names":["TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","StyleSheet","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"sourceRoot":"../../src","sources":["TabBarIcon.tsx"],"mappings":";;;;;;AACA;AACA;AAQA;AAA4B;AAmBb,SAASA,UAAU,OAWxB;EAAA,IAXyB;IACjCC,KAAK,EAAEC,CAAC;IACRC,UAAU;IACVC,KAAK;IACLC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,eAAe;IACfC,iBAAiB;IACjBC,UAAU;IACVC;EACK,CAAC;EACN,MAAMC,IAAI,GAAG,EAAE;;EAEf;EACA;EACA,oBACE,6BAAC,iBAAI;IACH,KAAK,EAAE,CAACT,UAAU,GAAGU,MAAM,CAACC,cAAc,GAAGD,MAAM,CAACE,YAAY,EAAEJ,KAAK;EAAE,gBAEzE,6BAAC,iBAAI;IAAC,KAAK,EAAE,CAACE,MAAM,CAACG,IAAI,EAAE;MAAEC,OAAO,EAAEX;IAAc,CAAC;EAAE,GACpDI,UAAU,CAAC;IACVQ,OAAO,EAAE,IAAI;IACbN,IAAI;IACJO,KAAK,EAAEX;EACT,CAAC,CAAC,CACG,eACP,6BAAC,iBAAI;IAAC,KAAK,EAAE,CAACK,MAAM,CAACG,IAAI,EAAE;MAAEC,OAAO,EAAEV;IAAgB,CAAC;EAAE,GACtDG,UAAU,CAAC;IACVQ,OAAO,EAAE,KAAK;IACdN,IAAI;IACJO,KAAK,EAAEV;EACT,CAAC,CAAC,CACG,eACP,6BAAC,cAAK;IACJ,OAAO,EAAEL,KAAK,IAAI,IAAK;IACvB,KAAK,EAAE,CACLS,MAAM,CAACT,KAAK,EACZD,UAAU,GAAGU,MAAM,CAACO,eAAe,GAAGP,MAAM,CAACQ,aAAa,EAC1DhB,UAAU,CACV;IACF,IAAI,EAAGO,IAAI,GAAG,CAAC,GAAI;EAAE,GAEpBR,KAAK,CACA,CACH;AAEX;AAEA,MAAMS,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BP,IAAI,EAAE;IACJ;IACA;IACA;IACAQ,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACb;IACAC,QAAQ,EAAE;EACZ,CAAC;EACDf,YAAY,EAAE;IACZgB,IAAI,EAAE;EACR,CAAC;EACDjB,cAAc,EAAE;IACdc,MAAM,EAAE,MAAM;IACdI,SAAS,EAAE;EACb,CAAC;EACD5B,KAAK,EAAE;IACLoB,QAAQ,EAAE,UAAU;IACpBS,IAAI,EAAE;EACR,CAAC;EACDZ,aAAa,EAAE;IACba,GAAG,EAAE;EACP,CAAC;EACDd,eAAe,EAAE;IACfc,GAAG,EAAE;EACP;AACF,CAAC,CAAC"}
\ No newline at end of file
/**
* Navigators
*/
export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator';
/**
* Views
*/
export { default as BottomTabBar } from './views/BottomTabBar';
export { default as BottomTabView } from './views/BottomTabView';
/**
* Utilities
*/
export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext';
export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext';
export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight';
/**
* Types
*/
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"names":["default","createBottomTabNavigator","BottomTabBar","BottomTabView","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","useBottomTabBarHeight"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,wBAAwB,QAAQ,uCAAuC;;AAE3F;AACA;AACA;AACA,SAASD,OAAO,IAAIE,YAAY,QAAQ,sBAAsB;AAC9D,SAASF,OAAO,IAAIG,aAAa,QAAQ,uBAAuB;;AAEhE;AACA;AACA;AACA,SAASH,OAAO,IAAII,iCAAiC,QAAQ,2CAA2C;AACxG,SAASJ,OAAO,IAAIK,yBAAyB,QAAQ,mCAAmC;AACxF,SAASL,OAAO,IAAIM,qBAAqB,QAAQ,+BAA+B;;AAEhF;AACA;AACA"}
\ No newline at end of file
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 { createNavigatorFactory, TabRouter, useNavigationBuilder } from '@react-navigation/native';
import * as React from 'react';
import warnOnce from 'warn-once';
import BottomTabView from '../views/BottomTabView';
function BottomTabNavigator(_ref) {
let {
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
sceneContainerStyle,
...restWithDeprecated
} = _ref;
const {
// @ts-expect-error: lazy is deprecated
lazy,
// @ts-expect-error: tabBarOptions is deprecated
tabBarOptions,
...rest
} = restWithDeprecated;
let defaultScreenOptions = {};
if (tabBarOptions) {
Object.assign(defaultScreenOptions, {
tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar,
tabBarActiveTintColor: tabBarOptions.activeTintColor,
tabBarInactiveTintColor: tabBarOptions.inactiveTintColor,
tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor,
tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor,
tabBarAllowFontScaling: tabBarOptions.allowFontScaling,
tabBarShowLabel: tabBarOptions.showLabel,
tabBarLabelStyle: tabBarOptions.labelStyle,
tabBarIconStyle: tabBarOptions.iconStyle,
tabBarItemStyle: tabBarOptions.tabStyle,
tabBarLabelPosition: tabBarOptions.labelPosition ?? (tabBarOptions.adaptive === false ? 'below-icon' : undefined),
tabBarStyle: [{
display: tabBarOptions.tabBarVisible ? 'none' : 'flex'
}, defaultScreenOptions.tabBarStyle]
});
Object.keys(defaultScreenOptions).forEach(key => {
if (defaultScreenOptions[key] === undefined) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete defaultScreenOptions[key];
}
});
warnOnce(tabBarOptions, `Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`);
}
if (typeof lazy === 'boolean') {
defaultScreenOptions.lazy = lazy;
warnOnce(true, `Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`);
}
const {
state,
descriptors,
navigation,
NavigationContent
} = useNavigationBuilder(TabRouter, {
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
defaultScreenOptions
});
return /*#__PURE__*/React.createElement(NavigationContent, null, /*#__PURE__*/React.createElement(BottomTabView, _extends({}, rest, {
state: state,
navigation: navigation,
descriptors: descriptors,
sceneContainerStyle: sceneContainerStyle
})));
}
export default createNavigatorFactory(BottomTabNavigator);
//# sourceMappingURL=createBottomTabNavigator.js.map
\ No newline at end of file
{"version":3,"names":["createNavigatorFactory","TabRouter","useNavigationBuilder","React","warnOnce","BottomTabView","BottomTabNavigator","id","initialRouteName","backBehavior","children","screenListeners","screenOptions","sceneContainerStyle","restWithDeprecated","lazy","tabBarOptions","rest","defaultScreenOptions","Object","assign","tabBarHideOnKeyboard","keyboardHidesTabBar","tabBarActiveTintColor","activeTintColor","tabBarInactiveTintColor","inactiveTintColor","tabBarActiveBackgroundColor","activeBackgroundColor","tabBarInactiveBackgroundColor","inactiveBackgroundColor","tabBarAllowFontScaling","allowFontScaling","tabBarShowLabel","showLabel","tabBarLabelStyle","labelStyle","tabBarIconStyle","iconStyle","tabBarItemStyle","tabStyle","tabBarLabelPosition","labelPosition","adaptive","undefined","tabBarStyle","display","tabBarVisible","keys","forEach","key","JSON","stringify","state","descriptors","navigation","NavigationContent"],"sourceRoot":"../../src","sources":["createBottomTabNavigator.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EAKtBC,SAAS,EAETC,oBAAoB,QACf,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,QAAQ,MAAM,WAAW;AAOhC,OAAOC,aAAa,MAAM,wBAAwB;AAWlD,SAASC,kBAAkB,OASjB;EAAA,IATkB;IAC1BC,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbC,mBAAmB;IACnB,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,IAAI;IACJ;IACAC,aAAa;IACb,GAAGC;EACL,CAAC,GAAGH,kBAAkB;EAEtB,IAAII,oBAAgD,GAAG,CAAC,CAAC;EAEzD,IAAIF,aAAa,EAAE;IACjBG,MAAM,CAACC,MAAM,CAACF,oBAAoB,EAAE;MAClCG,oBAAoB,EAAEL,aAAa,CAACM,mBAAmB;MACvDC,qBAAqB,EAAE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AE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbM;EACF,CAAC,CAAC;EAEJ,oBACE,oBAAC,iBAAiB,qBAChB,oBAAC,aAAa,eACRD,IAAI;IACR,KAAK,EAAEoC,KAAM;IACb,UAAU,EAAEE,UAAW;IACvB,WAAW,EAAED,WAAY;IACzB,mBAAmB,EAAEzC;EAAoB,GACzC,CACgB;AAExB;AAEA,eAAeb,sBAAsB,CAKnCM,kBAAkB,CAAC"}
\ No newline at end of file
export {};
//# sourceMappingURL=types.js.map
\ No newline at end of file
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
\ No newline at end of file
import * as React from 'react';
export default /*#__PURE__*/React.createContext(undefined);
//# sourceMappingURL=BottomTabBarHeightCallbackContext.js.map
\ No newline at end of file
{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightCallbackContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV"}
\ No newline at end of file
import * as React from 'react';
export default /*#__PURE__*/React.createContext(undefined);
//# sourceMappingURL=BottomTabBarHeightContext.js.map
\ No newline at end of file
{"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["BottomTabBarHeightContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,4BAAeA,KAAK,CAACC,aAAa,CAAqBC,SAAS,CAAC"}
\ No newline at end of file
import * as React from 'react';
import BottomTabBarHeightContext from './BottomTabBarHeightContext';
export default function useBottomTabBarHeight() {
const height = React.useContext(BottomTabBarHeightContext);
if (height === undefined) {
throw new Error("Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?");
}
return height;
}
//# sourceMappingURL=useBottomTabBarHeight.js.map
\ No newline at end of file
{"version":3,"names":["React","BottomTabBarHeightContext","useBottomTabBarHeight","height","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useBottomTabBarHeight.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,eAAe,SAASC,qBAAqB,GAAG;EAC9C,MAAMC,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACH,yBAAyB,CAAC;EAE1D,IAAIE,MAAM,KAAKE,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,2FAA2F,CAC5F;EACH;EAEA,OAAOH,MAAM;AACf"}
\ No newline at end of file
import * as React from 'react';
import { Keyboard, Platform } from 'react-native';
export default function useIsKeyboardShown() {
const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);
React.useEffect(() => {
const handleKeyboardShow = () => setIsKeyboardShown(true);
const handleKeyboardHide = () => setIsKeyboardShown(false);
let subscriptions;
if (Platform.OS === 'ios') {
subscriptions = [Keyboard.addListener('keyboardWillShow', handleKeyboardShow), Keyboard.addListener('keyboardWillHide', handleKeyboardHide)];
} else {
subscriptions = [Keyboard.addListener('keyboardDidShow', handleKeyboardShow), Keyboard.addListener('keyboardDidHide', handleKeyboardHide)];
}
return () => {
subscriptions.forEach(s => s.remove());
};
}, []);
return isKeyboardShown;
}
//# sourceMappingURL=useIsKeyboardShown.js.map
\ No newline at end of file
{"version":3,"names":["React","Keyboard","Platform","useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","useState","useEffect","handleKeyboardShow","handleKeyboardHide","subscriptions","OS","addListener","forEach","s","remove"],"sourceRoot":"../../src","sources":["useIsKeyboardShown.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAA8BC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAEtE,eAAe,SAASC,kBAAkB,GAAG;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGL,KAAK,CAACM,QAAQ,CAAC,KAAK,CAAC;EAEnEN,KAAK,CAACO,SAAS,CAAC,MAAM;IACpB,MAAMC,kBAAkB,GAAG,MAAMH,kBAAkB,CAAC,IAAI,CAAC;IACzD,MAAMI,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,KAAK,CAAC;IAE1D,IAAIK,aAAoC;IAExC,IAAIR,QAAQ,CAACS,EAAE,KAAK,KAAK,EAAE;MACzBD,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEJ,kBAAkB,CAAC,EAC5DP,QAAQ,CAACW,WAAW,CAAC,kBAAkB,EAAEH,kBAAkB,CAAC,CAC7D;IACH,CAAC,MAAM;MACLC,aAAa,GAAG,CACdT,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEJ,kBAAkB,CAAC,EAC3DP,QAAQ,CAACW,WAAW,CAAC,iBAAiB,EAAEH,kBAAkB,CAAC,CAC5D;IACH;IAEA,OAAO,MAAM;MACXC,aAAa,CAACG,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,MAAM,EAAE,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOX,eAAe;AACxB"}
\ No newline at end of file
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 color from 'color';
import * as React from 'react';
import { Animated, StyleSheet } from 'react-native';
export default function Badge(_ref) {
let {
children,
style,
visible = true,
size = 18,
...rest
} = _ref;
const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0));
const [rendered, setRendered] = React.useState(visible);
const theme = useTheme();
React.useEffect(() => {
if (!rendered) {
return;
}
Animated.timing(opacity, {
toValue: visible ? 1 : 0,
duration: 150,
useNativeDriver: true
}).start(_ref2 => {
let {
finished
} = _ref2;
if (finished && !visible) {
setRendered(false);
}
});
return () => opacity.stopAnimation();
}, [opacity, rendered, visible]);
if (!rendered) {
if (visible) {
setRendered(true);
} else {
return null;
}
}
// @ts-expect-error: backgroundColor definitely exists
const {
backgroundColor = theme.colors.notification,
...restStyle
} = StyleSheet.flatten(style) || {};
const textColor = color(backgroundColor).isLight() ? 'black' : 'white';
const borderRadius = size / 2;
const fontSize = Math.floor(size * 3 / 4);
return /*#__PURE__*/React.createElement(Animated.Text, _extends({
numberOfLines: 1,
style: [{
transform: [{
scale: opacity.interpolate({
inputRange: [0, 1],
outputRange: [0.5, 1]
})
}],
color: textColor,
lineHeight: size - 1,
height: size,
minWidth: size,
opacity,
backgroundColor,
fontSize,
borderRadius
}, styles.container, restStyle]
}, rest), children);
}
const styles = StyleSheet.create({
container: {
alignSelf: 'flex-end',
textAlign: 'center',
paddingHorizontal: 4,
overflow: 'hidden'
}
});
//# sourceMappingURL=Badge.js.map
\ No newline at end of file
{"version":3,"names":["useTheme","color","React","Animated","StyleSheet","Badge","children","style","visible","size","rest","opacity","useState","Value","rendered","setRendered","theme","useEffect","timing","toValue","duration","useNativeDriver","start","finished","stopAnimation","backgroundColor","colors","notification","restStyle","flatten","textColor","isLight","borderRadius","fontSize","Math","floor","transform","scale","interpolate","inputRange","outputRange","lineHeight","height","minWidth","styles","container","create","alignSelf","textAlign","paddingHorizontal","overflow"],"sourceRoot":"../../src","sources":["Badge.tsx"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAaC,UAAU,QAAmB,cAAc;AAqBzE,eAAe,SAASC,KAAK,OAMnB;EAAA,IANoB;IAC5BC,QAAQ;IACRC,KAAK;IACLC,OAAO,GAAG,IAAI;IACdC,IAAI,GAAG,EAAE;IACT,GAAGC;EACE,CAAC;EACN,MAAM,CAACC,OAAO,CAAC,GAAGT,KAAK,CAACU,QAAQ,CAAC,MAAM,IAAIT,QAA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AE3C,oBACE,oBAAC,QAAQ,CAAC,IAAI;IACZ,aAAa,EAAE,CAAE;IACjB,KAAK,EAAE,CACL;MACE2B,SAAS,EAAE,CACT;QACEC,KAAK,EAAE1B,OAAO,CAAC2B,WAAW,CAAC;UACzBC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;UAClBC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;MACH,CAAC,CACF;MACDvC,KAAK,EAAE6B,SAAS;MAChBW,UAAU,EAAEhC,IAAI,GAAG,CAAC;MACpBiC,MAAM,EAAEjC,IAAI;MACZkC,QAAQ,EAAElC,IAAI;MACdE,OAAO;MACPc,eAAe;MACfQ,QAAQ;MACRD;IACF,CAAC,EACDY,MAAM,CAACC,SAAS,EAChBjB,SAAS;EACT,GACElB,IAAI,GAEPJ,QAAQ,CACK;AAEpB;AAEA,MAAMsC,MAAM,GAAGxC,UAAU,CAAC0C,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
\ No newline at end of file
import { MissingIcon } from '@react-navigation/elements';
import { CommonActions, NavigationContext, NavigationRouteContext, useLinkBuilder, useTheme } from '@react-navigation/native';
import React from 'react';
import { Animated, Platform, StyleSheet, View } from 'react-native';
import { useSafeAreaFrame } from 'react-native-safe-area-context';
import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';
import useIsKeyboardShown from '../utils/useIsKeyboardShown';
import BottomTabItem from './BottomTabItem';
const DEFAULT_TABBAR_HEIGHT = 49;
const COMPACT_TABBAR_HEIGHT = 32;
const DEFAULT_MAX_TAB_ITEM_WIDTH = 125;
const useNativeDriver = Platform.OS !== 'web';
const shouldUseHorizontalLabels = _ref => {
let {
state,
descriptors,
layout,
dimensions
} = _ref;
const {
tabBarLabelPosition
} = descriptors[state.routes[state.index].key].options;
if (tabBarLabelPosition) {
switch (tabBarLabelPosition) {
case 'beside-icon':
return true;
case 'below-icon':
return false;
}
}
if (layout.width >= 768) {
// Screen size matches a tablet
const maxTabWidth = state.routes.reduce((acc, route) => {
const {
tabBarItemStyle
} = descriptors[route.key].options;
const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);
if (flattenedStyle) {
if (typeof flattenedStyle.width === 'number') {
return acc + flattenedStyle.width;
} else if (typeof flattenedStyle.maxWidth === 'number') {
return acc + flattenedStyle.maxWidth;
}
}
return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;
}, 0);
return maxTabWidth <= layout.width;
} else {
return dimensions.width > dimensions.height;
}
};
const getPaddingBottom = insets => Math.max(insets.bottom - Platform.select({
ios: 4,
default: 0
}), 0);
export const getTabBarHeight = _ref2 => {
var _StyleSheet$flatten;
let {
state,
descriptors,
dimensions,
insets,
style,
...rest
} = _ref2;
// @ts-ignore
const customHeight = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height;
if (typeof customHeight === 'number') {
return customHeight;
}
const isLandscape = dimensions.width > dimensions.height;
const horizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
...rest
});
const paddingBottom = getPaddingBottom(insets);
if (Platform.OS === 'ios' && !Platform.isPad && isLandscape && horizontalLabels) {
return COMPACT_TABBAR_HEIGHT + paddingBottom;
}
return DEFAULT_TABBAR_HEIGHT + paddingBottom;
};
export default function BottomTabBar(_ref3) {
let {
state,
navigation,
descriptors,
insets,
style
} = _ref3;
const {
colors
} = useTheme();
const buildLink = useLinkBuilder();
const focusedRoute = state.routes[state.index];
const focusedDescriptor = descriptors[focusedRoute.key];
const focusedOptions = focusedDescriptor.options;
const {
tabBarShowLabel,
tabBarHideOnKeyboard = false,
tabBarVisibilityAnimationConfig,
tabBarStyle,
tabBarBackground,
tabBarActiveTintColor,
tabBarInactiveTintColor,
tabBarActiveBackgroundColor,
tabBarInactiveBackgroundColor
} = focusedOptions;
const dimensions = useSafeAreaFrame();
const isKeyboardShown = useIsKeyboardShown();
const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);
const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);
const visibilityAnimationConfigRef = React.useRef(tabBarVisibilityAnimationConfig);
React.useEffect(() => {
visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;
});
const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar);
const [visible] = React.useState(() => new Animated.Value(shouldShowTabBar ? 1 : 0));
React.useEffect(() => {
const visibilityAnimationConfig = visibilityAnimationConfigRef.current;
if (shouldShowTabBar) {
var _visibilityAnimationC, _visibilityAnimationC2;
const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? Animated.spring : Animated.timing;
animation(visible, {
toValue: 1,
useNativeDriver,
duration: 250,
...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config)
}).start(_ref4 => {
let {
finished
} = _ref4;
if (finished) {
setIsTabBarHidden(false);
}
});
} else {
var _visibilityAnimationC3, _visibilityAnimationC4;
setIsTabBarHidden(true);
const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? Animated.spring : Animated.timing;
animation(visible, {
toValue: 0,
useNativeDriver,
duration: 200,
...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config)
}).start();
}
return () => visible.stopAnimation();
}, [visible, shouldShowTabBar]);
const [layout, setLayout] = React.useState({
height: 0,
width: dimensions.width
});
const handleLayout = e => {
const {
height,
width
} = e.nativeEvent.layout;
onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height);
setLayout(layout => {
if (height === layout.height && width === layout.width) {
return layout;
} else {
return {
height,
width
};
}
});
};
const {
routes
} = state;
const paddingBottom = getPaddingBottom(insets);
const tabBarHeight = getTabBarHeight({
state,
descriptors,
insets,
dimensions,
layout,
style: [tabBarStyle, style]
});
const hasHorizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
layout
});
const tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground();
return /*#__PURE__*/React.createElement(Animated.View, {
style: [styles.tabBar, {
backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card,
borderTopColor: colors.border
}, {
transform: [{
translateY: visible.interpolate({
inputRange: [0, 1],
outputRange: [layout.height + paddingBottom + StyleSheet.hairlineWidth, 0]
})
}],
// Absolutely position the tab bar so that the content is below it
// This is needed to avoid gap at bottom when the tab bar is hidden
position: isTabBarHidden ? 'absolute' : null
}, {
height: tabBarHeight,
paddingBottom,
paddingHorizontal: Math.max(insets.left, insets.right)
}, tabBarStyle],
pointerEvents: isTabBarHidden ? 'none' : 'auto',
onLayout: handleLayout
}, /*#__PURE__*/React.createElement(View, {
pointerEvents: "none",
style: StyleSheet.absoluteFill
}, tabBarBackgroundElement), /*#__PURE__*/React.createElement(View, {
accessibilityRole: "tablist",
style: styles.content
}, routes.map((route, index) => {
const focused = index === state.index;
const {
options
} = descriptors[route.key];
const onPress = () => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true
});
if (!focused && !event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate({
name: route.name,
merge: true
}),
target: state.key
});
}
};
const onLongPress = () => {
navigation.emit({
type: 'tabLongPress',
target: route.key
});
};
const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined;
return /*#__PURE__*/React.createElement(NavigationContext.Provider, {
key: route.key,
value: descriptors[route.key].navigation
}, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {
value: route
}, /*#__PURE__*/React.createElement(BottomTabItem, {
route: route,
descriptor: descriptors[route.key],
focused: focused,
horizontal: hasHorizontalLabels,
onPress: onPress,
onLongPress: onLongPress,
accessibilityLabel: accessibilityLabel,
to: buildLink(route.name, route.params),
testID: options.tabBarTestID,
allowFontScaling: options.tabBarAllowFontScaling,
activeTintColor: tabBarActiveTintColor,
inactiveTintColor: tabBarInactiveTintColor,
activeBackgroundColor: tabBarActiveBackgroundColor,
inactiveBackgroundColor: tabBarInactiveBackgroundColor,
button: options.tabBarButton,
icon: options.tabBarIcon ?? (_ref5 => {
let {
color,
size
} = _ref5;
return /*#__PURE__*/React.createElement(MissingIcon, {
color: color,
size: size
});
}),
badge: options.tabBarBadge,
badgeStyle: options.tabBarBadgeStyle,
label: label,
showLabel: tabBarShowLabel,
labelStyle: options.tabBarLabelStyle,
iconStyle: options.tabBarIconStyle,
style: options.tabBarItemStyle
})));
})));
}
const styles = StyleSheet.create({
tabBar: {
left: 0,
right: 0,
bottom: 0,
borderTopWidth: StyleSheet.hairlineWidth,
elevation: 8
},
content: {
flex: 1,
flexDirection: 'row'
}
});
//# sourceMappingURL=BottomTabBar.js.map
\ No newline at end of file
{"version":3,"names":["MissingIcon","CommonActions","NavigationContext","NavigationRouteContext","useLinkBuilder","useTheme","React","Animated","Platform","StyleSheet","View","useSafeAreaFrame","BottomTabBarHeightCallbackContext","useIsKeyboardShown","BottomTabItem","DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","buildLink","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","isKeyboardShown","onHeightChange","useContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"sourceRoot":"../../src","sources":["BottomTabBar.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SACEC,aAAa,EACbC,iBAAiB,EACjBC,sBAAsB,EAGtBC,cAAc,EACdC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EAERC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAA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B;MACvC,EAAE,EAAEjF,SAAS,CAACzB,KAAK,CAACmG,IAAI,EAAEnG,KAAK,CAAC6G,MAAM,CAAE;MACxC,MAAM,EAAElH,OAAO,CAACmH,YAAa;MAC7B,gBAAgB,EAAEnH,OAAO,CAACoH,sBAAuB;MACjD,eAAe,EAAE7E,qBAAsB;MACvC,iBAAiB,EAAEC,uBAAwB;MAC3C,qBAAqB,EAAEC,2BAA4B;MACnD,uBAAuB,EAAEC,6BAA8B;MACvD,MAAM,EAAE1C,OAAO,CAACqH,YAAa;MAC7B,IAAI,EACFrH,OAAO,CAACsH,UAAU,KACjB;QAAA,IAAC;UAAEC,KAAK;UAAEC;QAAK,CAAC;QAAA,oBACf,oBAAC,WAAW;UAAC,KAAK,EAAED,KAAM;UAAC,IAAI,EAAEC;QAAK,EAAG;MAAA,CAC1C,CACF;MACD,KAAK,EAAExH,OAAO,CAACyH,WAAY;MAC3B,UAAU,EAAEzH,OAAO,CAAC0H,gBAAiB;MACrC,KAAK,EAAEf,KAAM;MACb,SAAS,EAAEzE,eAAgB;MAC3B,UAAU,EAAElC,OAAO,CAAC2H,gBAAiB;MACrC,SAAS,EAAE3H,OAAO,CAAC4H,eAAgB;MACnC,KAAK,EAAE5H,OAAO,CAACM;IAAgB,EAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,MAAMqE,MAAM,GAAG/F,UAAU,CAACiJ,MAAM,CAAC;EAC/BjD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR3E,MAAM,EAAE,CAAC;IACT+G,cAAc,EAAElJ,UAAU,CAAC0G,aAAa;IACxCyC,SAAS,EAAE;EACb,CAAC;EACDnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
\ No newline at end of file
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 { Link, useTheme } from '@react-navigation/native';
import Color from 'color';
import React from 'react';
import { Platform, Pressable, StyleSheet, Text } from 'react-native';
import TabBarIcon from './TabBarIcon';
export default function BottomTabBarItem(_ref) {
let {
focused,
route,
descriptor,
label,
icon,
badge,
badgeStyle,
to,
button = _ref2 => {
let {
children,
style,
onPress,
to,
accessibilityRole,
...rest
} = _ref2;
if (Platform.OS === 'web' && to) {
// React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
// We need to use `onClick` to be able to prevent default browser handling of links.
return /*#__PURE__*/React.createElement(Link, _extends({}, rest, {
to: to,
style: [styles.button, style],
onPress: e => {
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && (
// ignore clicks with modifier keys
e.button == null || e.button === 0) // ignore everything but left clicks
) {
e.preventDefault();
onPress === null || onPress === void 0 ? void 0 : onPress(e);
}
}
}), children);
} else {
return /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
accessibilityRole: accessibilityRole,
onPress: onPress,
style: style
}), children);
}
},
accessibilityLabel,
testID,
onPress,
onLongPress,
horizontal,
activeTintColor: customActiveTintColor,
inactiveTintColor: customInactiveTintColor,
activeBackgroundColor = 'transparent',
inactiveBackgroundColor = 'transparent',
showLabel = true,
allowFontScaling,
labelStyle,
iconStyle,
style
} = _ref;
const {
colors
} = useTheme();
const activeTintColor = customActiveTintColor === undefined ? colors.primary : customActiveTintColor;
const inactiveTintColor = customInactiveTintColor === undefined ? Color(colors.text).mix(Color(colors.card), 0.5).hex() : customInactiveTintColor;
const renderLabel = _ref3 => {
let {
focused
} = _ref3;
if (showLabel === false) {
return null;
}
const color = focused ? activeTintColor : inactiveTintColor;
if (typeof label === 'string') {
return /*#__PURE__*/React.createElement(Text, {
numberOfLines: 1,
style: [styles.label, {
color
}, horizontal ? styles.labelBeside : styles.labelBeneath, labelStyle],
allowFontScaling: allowFontScaling
}, label);
}
const {
options
} = descriptor;
const children = typeof options.tabBarLabel === 'string' ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;
return label({
focused,
color,
position: horizontal ? 'beside-icon' : 'below-icon',
children
});
};
const renderIcon = _ref4 => {
let {
focused
} = _ref4;
if (icon === undefined) {
return null;
}
const activeOpacity = focused ? 1 : 0;
const inactiveOpacity = focused ? 0 : 1;
return /*#__PURE__*/React.createElement(TabBarIcon, {
route: route,
horizontal: horizontal,
badge: badge,
badgeStyle: badgeStyle,
activeOpacity: activeOpacity,
inactiveOpacity: inactiveOpacity,
activeTintColor: activeTintColor,
inactiveTintColor: inactiveTintColor,
renderIcon: icon,
style: iconStyle
});
};
const scene = {
route,
focused
};
const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor;
return button({
to,
onPress,
onLongPress,
testID,
accessibilityLabel,
// FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS
accessibilityRole: Platform.select({
ios: 'button',
default: 'tab'
}),
accessibilityState: {
selected: focused
},
// @ts-expect-error: keep for compatibility with older React Native versions
accessibilityStates: focused ? ['selected'] : [],
style: [styles.tab, {
backgroundColor
}, horizontal ? styles.tabLandscape : styles.tabPortrait, style],
children: /*#__PURE__*/React.createElement(React.Fragment, null, renderIcon(scene), renderLabel(scene))
});
}
const styles = StyleSheet.create({
tab: {
flex: 1,
alignItems: 'center'
},
tabPortrait: {
justifyContent: 'flex-end',
flexDirection: 'column'
},
tabLandscape: {
justifyContent: 'center',
flexDirection: 'row'
},
label: {
textAlign: 'center',
backgroundColor: 'transparent'
},
labelBeneath: {
fontSize: 10
},
labelBeside: {
fontSize: 13,
marginLeft: 20,
marginTop: 3
},
button: {
display: 'flex'
}
});
//# sourceMappingURL=BottomTabItem.js.map
\ No newline at end of file
{"version":3,"names":["Link","useTheme","Color","React","Platform","Pressable","StyleSheet","Text","TabBarIcon","BottomTabBarItem","focused","route","descriptor","label","icon","badge","badgeStyle","to","button","children","style","onPress","accessibilityRole","rest","OS","styles","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","accessibilityLabel","testID","onLongPress","horizontal","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","colors","undefined","primary","text","mix","card","hex","renderLabel","color","labelBeside","labelBeneath","options","tabBarLabel","title","name","position","renderIcon","activeOpacity","inactiveOpacity","scene","backgroundColor","select","ios","default","accessibilityState","selected","accessibilityStates","tab","tabLandscape","tabPortrait","create","flex","alignItems","justifyContent","flexDirection","textAlign","fontSize","marginLeft","marginTop","display"],"sourceRoot":"../../src","sources":["BottomTabItem.tsx"],"mappings":";AAAA,SAASA,IAAI,EAASC,QAAQ,QAAQ,0BAA0B;AAChE,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAEEC,QAAQ,EACRC,SAAS,EAETC,UAAU,EACVC,IAAI,QAGC,cAAc;AAOrB,OAAOC,UAAU,MAAM,cAAc;AA+GrC,eAAe,SAASC,gBAAgB,OAiE9B;EAAA,IAjE+B;IACvCC,OAAO;IACPC,KAAK;IACLC,UAAU;IACVC,KAAK;IACLC,IAAI;IACJC,KAAK;IACLC,UAAU;IACVC,EAAE;IACFC,MAAM,GAAG,SAOsB;MAAA,IAPrB;QACRC,QAAQ;QACRC,KAAK;QACLC,OAAO;QACPJ,EAAE;QACFK,iBAAiB;QACjB,GAAGC;MACoB,CAAC;MACxB,IAAInB,QAAQ,CAACoB,EAAE,KAAK,KAAK,IAAIP,EAAE,EAAE;QAC/B;QACA;QACA,oBACE,oBAAC,IAAI,eACCM,IAAI;UACR,EAAE,EAAEN,EAAG;UACP,KAAK,EAAE,CAACQ,MAAM,CAACP,MAAM,EAAEE,KAAK,CAAE;UAC9B,OAAO,EAAGM,CAAM,IAAK;YACnB,IACE,EAAEA,CAAC,CAACC,OAAO,IAAID,CAAC,CAACE,MAAM,IAAIF,CAAC,C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AE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDlE,MAAM,EAAE;IACNmE,OAAO,EAAE;EACX;AACF,CAAC,CAAC"}
\ No newline at end of file
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 { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
import * as React from 'react';
import { Platform, StyleSheet } from 'react-native';
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';
import BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext';
import BottomTabBar, { getTabBarHeight } from './BottomTabBar';
import { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';
export default function BottomTabView(props) {
const {
tabBar = props => /*#__PURE__*/React.createElement(BottomTabBar, props),
state,
navigation,
descriptors,
safeAreaInsets,
detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios',
sceneContainerStyle
} = props;
const focusedRouteKey = state.routes[state.index].key;
const [loaded, setLoaded] = React.useState([focusedRouteKey]);
if (!loaded.includes(focusedRouteKey)) {
setLoaded([...loaded, focusedRouteKey]);
}
const dimensions = SafeAreaProviderCompat.initialMetrics.frame;
const [tabBarHeight, setTabBarHeight] = React.useState(() => getTabBarHeight({
state,
descriptors,
dimensions,
layout: {
width: dimensions.width,
height: 0
},
insets: {
...SafeAreaProviderCompat.initialMetrics.insets,
...props.safeAreaInsets
},
style: descriptors[state.routes[state.index].key].options.tabBarStyle
}));
const renderTabBar = () => {
return /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, insets => tabBar({
state: state,
descriptors: descriptors,
navigation: navigation,
insets: {
top: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.top) ?? (insets === null || insets === void 0 ? void 0 : insets.top) ?? 0,
right: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.right) ?? (insets === null || insets === void 0 ? void 0 : insets.right) ?? 0,
bottom: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.bottom) ?? (insets === null || insets === void 0 ? void 0 : insets.bottom) ?? 0,
left: (safeAreaInsets === null || safeAreaInsets === void 0 ? void 0 : safeAreaInsets.left) ?? (insets === null || insets === void 0 ? void 0 : insets.left) ?? 0
}
}));
};
const {
routes
} = state;
return /*#__PURE__*/React.createElement(SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(MaybeScreenContainer, {
enabled: detachInactiveScreens,
hasTwoStates: true,
style: styles.container
}, routes.map((route, index) => {
const descriptor = descriptors[route.key];
const {
lazy = true,
unmountOnBlur
} = descriptor.options;
const isFocused = state.index === index;
if (unmountOnBlur && !isFocused) {
return null;
}
if (lazy && !loaded.includes(route.key) && !isFocused) {
// Don't render a lazy screen if we've never navigated to it
return null;
}
const {
freezeOnBlur,
header = _ref => {
let {
layout,
options
} = _ref;
return /*#__PURE__*/React.createElement(Header, _extends({}, options, {
layout: layout,
title: getHeaderTitle(options, route.name)
}));
},
headerShown,
headerStatusBarHeight,
headerTransparent
} = descriptor.options;
return /*#__PURE__*/React.createElement(MaybeScreen, {
key: route.key,
style: [StyleSheet.absoluteFill, {
zIndex: isFocused ? 0 : -1
}],
visible: isFocused,
enabled: detachInactiveScreens,
freezeOnBlur: freezeOnBlur
}, /*#__PURE__*/React.createElement(BottomTabBarHeightContext.Provider, {
value: tabBarHeight
}, /*#__PURE__*/React.createElement(Screen, {
focused: isFocused,
route: descriptor.route,
navigation: descriptor.navigation,
headerShown: headerShown,
headerStatusBarHeight: headerStatusBarHeight,
headerTransparent: headerTransparent,
header: header({
layout: dimensions,
route: descriptor.route,
navigation: descriptor.navigation,
options: descriptor.options
}),
style: sceneContainerStyle
}, descriptor.render())));
})), /*#__PURE__*/React.createElement(BottomTabBarHeightCallbackContext.Provider, {
value: setTabBarHeight
}, renderTabBar()));
}
const styles = StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
}
});
//# sourceMappingURL=BottomTabView.js.map
\ No newline at end of file
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","React","Platform","StyleSheet","SafeAreaInsetsContext","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","loaded","setLoaded","useState","includes","dimensions","initialMetrics","frame","tabBarHeight","setTabBarHeight","layout","width","height","insets","style","options","tabBarStyle","renderTabBar","top","right","bottom","left","styles","container","map","route","descriptor","lazy","unmountOnBlur","isFocused","freezeOnBlur","header","name","headerShown","headerStatusBarHeight","headerTransparent","absoluteFill","zIndex","render","create","flex","overflow"],"sourceRoot":"../../src","sources":["BottomTabView.tsx"],"mappings":";AAAA,SACEA,cAAc,EACdC,MAAM,EACNC,sBAAsB,EACtBC,MAAM,QACD,4BAA4B;AAKnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,qBAAqB,QAAQ,gCAAgC;AAUtE,OAAOC,iCAAiC,MAAM,4CAA4C;AAC1F,OAAOC,yBAAyB,MAAM,oCAAoC;AAC1E,OAAOC,YAAY,IAAIC,eAAe,QAAQ,gBAAgB;AAC9D,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,kBAAkB;AAQpE,eAAe,SAASC,aAAa,CAACC,KAAY,EAAE;EAClD,MAAM;IACJC,MAAM,GAAID,KAAwB,iBAAK,oBAAC,YAAY,EAAKA,KAAK,CAAI;IAClEE,KAAK;IACLC,UAAU;IACVC,WAAW;IACXC,cAAc;IACdC,qBAAqB,GAAGhB,QAAQ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ACtB;AAE7B;AAEA,MAAMK,MAAM,GAAG3C,UAAU,CAAC4D,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IACTiB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
\ No newline at end of file
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 { ResourceSavingView } from '@react-navigation/elements';
import * as React from 'react';
import { View } from 'react-native';
let Screens;
try {
Screens = require('react-native-screens');
} catch (e) {
// Ignore
}
export const MaybeScreenContainer = _ref => {
var _Screens, _Screens$screensEnabl;
let {
enabled,
...rest
} = _ref;
if ((_Screens = Screens) !== null && _Screens !== void 0 && (_Screens$screensEnabl = _Screens.screensEnabled) !== null && _Screens$screensEnabl !== void 0 && _Screens$screensEnabl.call(_Screens)) {
return /*#__PURE__*/React.createElement(Screens.ScreenContainer, _extends({
enabled: enabled
}, rest));
}
return /*#__PURE__*/React.createElement(View, rest);
};
export function MaybeScreen(_ref2) {
var _Screens2, _Screens2$screensEnab;
let {
visible,
children,
...rest
} = _ref2;
if ((_Screens2 = Screens) !== null && _Screens2 !== void 0 && (_Screens2$screensEnab = _Screens2.screensEnabled) !== null && _Screens2$screensEnab !== void 0 && _Screens2$screensEnab.call(_Screens2)) {
return /*#__PURE__*/React.createElement(Screens.Screen, _extends({
activityState: visible ? 2 : 0
}, rest), children);
}
return /*#__PURE__*/React.createElement(ResourceSavingView, _extends({
visible: visible
}, rest), children);
}
//# sourceMappingURL=ScreenFallback.js.map
\ No newline at end of file
{"version":3,"names":["ResourceSavingView","React","View","Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sourceRoot":"../../src","sources":["ScreenFallback.tsx"],"mappings":";AAAA,SAASA,kBAAkB,QAAQ,4BAA4B;AAC/D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAAoBC,IAAI,QAA8B,cAAc;AAUpE,IAAIC,OAA0D;AAE9D,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAsB,CAAC;AAC3C,CAAC,CAAC,OAAOC,CAAC,EAAE;EACV;AAAA;AAGF,OAAO,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;EAAA,IAP+B;IACnCC,OAAO;IACP,GAAGC;EAKL,CAAC;EACC,gBAAIL,OAAO,8DAAP,SAASM,cAAc,kDAAvB,oCAA2B,EAAE;IAC/B,oBAAO,oBAAC,OAAO,CAAC,eAAe;MAAC,OAAO,EAAEF;IAAQ,GAAKC,IAAI,EAAI;EAChE;EAEA,oBAAO,oBAAC,IAAI,EAAKA,IAAI,CAAI;AAC3B,CAAC;AAED,OAAO,SAASE,WAAW,QAAwC;EAAA;EAAA,IAAvC;IAAEC,OAAO;IAAEC,QAAQ;IAAE,GAAGJ;EAAY,CAAC;EAC/D,iBAAIL,OAAO,+DAAP,UAASM,cAAc,kDAAvB,qCAA2B,EAAE;IAC/B,oBACE,oBAAC,OAAO,CAAC,MAAM;MAAC,aAAa,EAAEE,OAAO,GAAG,CAAC,GAAG;IAAE,GAAKH,IAAI,GACrDI,QAAQ,CACM;EAErB;EAEA,oBACE,oBAAC,kBAAkB;IAAC,OAAO,EAAED;EAAQ,GAAKH,IAAI,GAC3CI,QAAQ,CACU;AAEzB"}
\ No newline at end of file
import React from 'react';
import { StyleSheet, View } from 'react-native';
import Badge from './Badge';
export default function TabBarIcon(_ref) {
let {
route: _,
horizontal,
badge,
badgeStyle,
activeOpacity,
inactiveOpacity,
activeTintColor,
inactiveTintColor,
renderIcon,
style
} = _ref;
const size = 25;
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them.
return /*#__PURE__*/React.createElement(View, {
style: [horizontal ? styles.iconHorizontal : styles.iconVertical, style]
}, /*#__PURE__*/React.createElement(View, {
style: [styles.icon, {
opacity: activeOpacity
}]
}, renderIcon({
focused: true,
size,
color: activeTintColor
})), /*#__PURE__*/React.createElement(View, {
style: [styles.icon, {
opacity: inactiveOpacity
}]
}, renderIcon({
focused: false,
size,
color: inactiveTintColor
})), /*#__PURE__*/React.createElement(Badge, {
visible: badge != null,
style: [styles.badge, horizontal ? styles.badgeHorizontal : styles.badgeVertical, badgeStyle],
size: size * 3 / 4
}, badge));
}
const styles = StyleSheet.create({
icon: {
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them:
// Cover the whole iconContainer:
position: 'absolute',
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
width: '100%',
// Workaround for react-native >= 0.54 layout bug
minWidth: 25
},
iconVertical: {
flex: 1
},
iconHorizontal: {
height: '100%',
marginTop: 3
},
badge: {
position: 'absolute',
left: 3
},
badgeVertical: {
top: 3
},
badgeHorizontal: {
top: 7
}
});
//# sourceMappingURL=TabBarIcon.js.map
\ No newline at end of file
{"version":3,"names":["React","StyleSheet","View","Badge","TabBarIcon","route","_","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"sourceRoot":"../../src","sources":["TabBarIcon.tsx"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAEEC,UAAU,EAEVC,IAAI,QAEC,cAAc;AAErB,OAAOC,KAAK,MAAM,SAAS;AAmB3B,eAAe,SAASC,UAAU,OAWxB;EAAA,IAXyB;IACjCC,KAAK,EAAEC,CAAC;IACRC,UAAU;IACVC,KAAK;IACLC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,eAAe;IACfC,iBAAiB;IACjBC,UAAU;IACVC;EACK,CAAC;EACN,MAAMC,IAAI,GAAG,EAAE;;EAEf;EACA;EACA,oBACE,oBAAC,IAAI;IACH,KAAK,EA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X,aAAa,EAAE;IACbY,GAAG,EAAE;EACP,CAAC;EACDb,eAAe,EAAE;IACfa,GAAG,EAAE;EACP;AACF,CAAC,CAAC"}
\ No newline at end of file
/**
* Navigators
*/
export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator';
/**
* Views
*/
export { default as BottomTabBar } from './views/BottomTabBar';
export { default as BottomTabView } from './views/BottomTabView';
/**
* Utilities
*/
export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext';
export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext';
export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight';
/**
* Types
*/
export type { BottomTabBarButtonProps, BottomTabBarProps, BottomTabHeaderProps, BottomTabNavigationEventMap, BottomTabNavigationOptions, BottomTabNavigationProp, BottomTabScreenProps, } from './types';
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AACzG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AACH,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
\ No newline at end of file
/// <reference types="react" />
import { DefaultNavigatorOptions, ParamListBase, TabNavigationState, TabRouterOptions } from '@react-navigation/native';
import type { BottomTabNavigationConfig, BottomTabNavigationEventMap, BottomTabNavigationOptions } from '../types';
declare type Props = DefaultNavigatorOptions<ParamListBase, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap> & TabRouterOptions & BottomTabNavigationConfig;
declare function BottomTabNavigator({ id, initialRouteName, backBehavior, children, screenListeners, screenOptions, sceneContainerStyle, ...restWithDeprecated }: Props): JSX.Element;
declare const _default: <ParamList extends ParamListBase>() => import("@react-navigation/native").TypedNavigator<ParamList, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, typeof BottomTabNavigator>;
export default _default;
//# sourceMappingURL=createBottomTabNavigator.d.ts.map
\ No newline at end of file
{"version":3,"file":"createBottomTabNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createBottomTabNavigator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,uBAAuB,EACvB,aAAa,EAEb,kBAAkB,EAElB,gBAAgB,EAEjB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAGlB,aAAK,KAAK,GAAG,uBAAuB,CAClC,aAAa,EACb,kBAAkB,CAAC,aAAa,CAAC,EACjC,0BAA0B,EAC1B,2BAA2B,CAC5B,GACC,gBAAgB,GAChB,yBAAyB,CAAC;AAE5B,iBAAS,kBAAkB,CAAC,EAC1B,EAAE,EACF,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,GAAG,kBAAkB,EACtB,EAAE,KAAK,eAwFP;;AAED,wBAKsB"}
\ No newline at end of file
import type { HeaderOptions } from '@react-navigation/elements';
import type { Descriptor, NavigationHelpers, NavigationProp, ParamListBase, RouteProp, TabActionHelpers, TabNavigationState } from '@react-navigation/native';
import type * as React from 'react';
import type { Animated, GestureResponderEvent, StyleProp, TextStyle, TouchableWithoutFeedbackProps, ViewStyle } from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';
export declare type Layout = {
width: number;
height: number;
};
export declare type BottomTabNavigationEventMap = {
/**
* Event which fires on tapping on the tab in the tab bar.
*/
tabPress: {
data: undefined;
canPreventDefault: true;
};
/**
* Event which fires on long press on the tab in the tab bar.
*/
tabLongPress: {
data: undefined;
};
};
export declare type LabelPosition = 'beside-icon' | 'below-icon';
export declare type BottomTabNavigationHelpers = NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> & TabActionHelpers<ParamListBase>;
export declare type BottomTabNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, TabNavigationState<ParamList>, BottomTabNavigationOptions, BottomTabNavigationEventMap> & TabActionHelpers<ParamList>;
export declare type BottomTabScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList, NavigatorID extends string | undefined = undefined> = {
navigation: BottomTabNavigationProp<ParamList, RouteName, NavigatorID>;
route: RouteProp<ParamList, RouteName>;
};
export declare type TimingKeyboardAnimationConfig = {
animation: 'timing';
config?: Omit<Partial<Animated.TimingAnimationConfig>, 'toValue' | 'useNativeDriver'>;
};
export declare type SpringKeyboardAnimationConfig = {
animation: 'spring';
config?: Omit<Partial<Animated.SpringAnimationConfig>, 'toValue' | 'useNativeDriver'>;
};
export declare type TabBarVisibilityAnimationConfig = TimingKeyboardAnimationConfig | SpringKeyboardAnimationConfig;
export declare type BottomTabNavigationOptions = HeaderOptions & {
/**
* Title text for the screen.
*/
title?: string;
/**
* Title string of a tab displayed in the tab bar
* or a function that given { focused: boolean, color: string, position: 'below-icon' | 'beside-icon', children: string } returns a React.Node to display in tab bar.
*
* When undefined, scene title is used. Use `tabBarShowLabel` to hide the label.
*/
tabBarLabel?: string | ((props: {
focused: boolean;
color: string;
position: LabelPosition;
children: string;
}) => React.ReactNode);
/**
* Whether the tab label should be visible. Defaults to `true`.
*/
tabBarShowLabel?: boolean;
/**
* Whether the label is shown below the icon or beside the icon.
*
* - `below-icon`: the label is shown below the icon (typical for iPhones)
* - `beside-icon` the label is shown next to the icon (typical for iPad)
*
* By default, the position is chosen automatically based on device width.
*/
tabBarLabelPosition?: LabelPosition;
/**
* Style object for the tab label.
*/
tabBarLabelStyle?: StyleProp<TextStyle>;
/**
* Whether label font should scale to respect Text Size accessibility settings.
*/
tabBarAllowFontScaling?: boolean;
/**
* A function that given { focused: boolean, color: string } returns a React.Node to display in the tab bar.
*/
tabBarIcon?: (props: {
focused: boolean;
color: string;
size: number;
}) => React.ReactNode;
/**
* Style object for the tab icon.
*/
tabBarIconStyle?: StyleProp<TextStyle>;
/**
* Text to show in a badge on the tab icon.
*/
tabBarBadge?: number | string;
/**
* Custom style for the tab bar badge.
* You can specify a background color or text color here.
*/
tabBarBadgeStyle?: StyleProp<TextStyle>;
/**
* Accessibility label for the tab button. This is read by the screen reader when the user taps the tab.
* It's recommended to set this if you don't have a label for the tab.
*/
tabBarAccessibilityLabel?: string;
/**
* ID to locate this tab button in tests.
*/
tabBarTestID?: string;
/**
* Function which returns a React element to render as the tab bar button.
* Renders `Pressable` by default.
*/
tabBarButton?: (props: BottomTabBarButtonProps) => React.ReactNode;
/**
* Color for the icon and label in the active tab.
*/
tabBarActiveTintColor?: string;
/**
* Color for the icon and label in the inactive tabs.
*/
tabBarInactiveTintColor?: string;
/**
* Background color for the active tab.
*/
tabBarActiveBackgroundColor?: string;
/**
* Background color for the inactive tabs.
*/
tabBarInactiveBackgroundColor?: string;
/**
* Style object for the tab item container.
*/
tabBarItemStyle?: StyleProp<ViewStyle>;
/**
* Whether the tab bar gets hidden when the keyboard is shown. Defaults to `false`.
*/
tabBarHideOnKeyboard?: boolean;
/**
* Animation config for showing and hiding the tab bar when the keyboard is shown/hidden.
*/
tabBarVisibilityAnimationConfig?: {
show?: TabBarVisibilityAnimationConfig;
hide?: TabBarVisibilityAnimationConfig;
};
/**
* Style object for the tab bar container.
*/
tabBarStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/**
* Function which returns a React Element to use as background for the tab bar.
* You could render an image, a gradient, blur view etc.
*
* When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well.
* You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content.
*/
tabBarBackground?: () => React.ReactNode;
/**
* Whether this screens should render the first time it's accessed. Defaults to `true`.
* Set it to `false` if you want to render the screen on initial render.
*/
lazy?: boolean;
/**
* Function that given returns a React Element to display as a header.
*/
header?: (props: BottomTabHeaderProps) => React.ReactNode;
/**
* Whether to show the header. Setting this to `false` hides the header.
* Defaults to `true`.
*/
headerShown?: boolean;
/**
* Whether this screen should be unmounted when navigating away from it.
* Defaults to `false`.
*/
unmountOnBlur?: boolean;
/**
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
* Requires `react-native-screens` version >=3.16.0.
*
* Only supported on iOS and Android.
*/
freezeOnBlur?: boolean;
};
export declare type BottomTabDescriptor = Descriptor<BottomTabNavigationOptions, BottomTabNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
export declare type BottomTabDescriptorMap = Record<string, BottomTabDescriptor>;
export declare type BottomTabNavigationConfig = {
/**
* Function that returns a React element to display as the tab bar.
*/
tabBar?: (props: BottomTabBarProps) => React.ReactNode;
/**
* Safe area insets for the tab bar. This is used to avoid elements like the navigation bar on Android and bottom safe area on iOS.
* By default, the device's safe area insets are automatically detected. You can override the behavior with this option.
*/
safeAreaInsets?: {
top?: number;
right?: number;
bottom?: number;
left?: number;
};
/**
* Whether inactive screens should be detached from the view hierarchy to save memory.
* Make sure to call `enableScreens` from `react-native-screens` to make it work.
* Defaults to `true` on Android.
*/
detachInactiveScreens?: boolean;
/**
* Style object for the component wrapping the screen content.
*/
sceneContainerStyle?: StyleProp<ViewStyle>;
};
export declare type BottomTabHeaderProps = {
/**
* Layout of the screen.
*/
layout: Layout;
/**
* Options for the current screen.
*/
options: BottomTabNavigationOptions;
/**
* Route object for the current screen.
*/
route: RouteProp<ParamListBase>;
/**
* Navigation prop for the header.
*/
navigation: BottomTabNavigationProp<ParamListBase>;
};
export declare type BottomTabBarProps = {
state: TabNavigationState<ParamListBase>;
descriptors: BottomTabDescriptorMap;
navigation: NavigationHelpers<ParamListBase, BottomTabNavigationEventMap>;
insets: EdgeInsets;
};
export declare type BottomTabBarButtonProps = Omit<TouchableWithoutFeedbackProps, 'onPress'> & {
to?: string;
children: React.ReactNode;
onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
};
//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,SAAS,EACT,SAAS,EACT,6BAA6B,EAC7B,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,oBAAY,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,oBAAY,2BAA2B,GAAG;IACxC;;OAEG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,iBAAiB,EAAE,IAAI,CAAA;KAAE,CAAC;IACvD;;OAEG;IACH,YAAY,EAAE;QAAE,IAAI,EAAE,SAAS,CAA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,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC5C,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,0BAA0B,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAChC;;OAEG;IACH,UAAU,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;CACpD,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,WAAW,EAAE,sBAAsB,CAAC;IACpC,UAAU,EAAE,iBAAiB,CAAC,aAAa,EAAE,2BAA2B,CAAC,CAAC;IAC1E,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,oBAAY,uBAAuB,GAAG,IAAI,CACxC,6BAA6B,EAC7B,SAAS,CACV,GAAG;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,CACR,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB,KACvE,IAAI,CAAC;CACX,CAAC"}
\ No newline at end of file
import * as React from 'react';
declare const _default: React.Context<((height: number) => void) | undefined>;
export default _default;
//# sourceMappingURL=BottomTabBarHeightCallbackContext.d.ts.map
\ No newline at end of file
{"version":3,"file":"BottomTabBarHeightCallbackContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/BottomTabBarHeightCallbackContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;gDAEc,MAAM,KAAK,IAAI;AAA5D,wBAEE"}
\ No newline at end of file
import * as React from 'react';
declare const _default: React.Context<number | undefined>;
export default _default;
//# sourceMappingURL=BottomTabBarHeightContext.d.ts.map
\ No newline at end of file
{"version":3,"file":"BottomTabBarHeightContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/BottomTabBarHeightContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;AAE/B,wBAAkE"}
\ No newline at end of file
export default function useBottomTabBarHeight(): number;
//# sourceMappingURL=useBottomTabBarHeight.d.ts.map
\ No newline at end of file
{"version":3,"file":"useBottomTabBarHeight.d.ts","sourceRoot":"","sources":["../../../../src/utils/useBottomTabBarHeight.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,qBAAqB,WAU5C"}
\ No newline at end of file
export default function useIsKeyboardShown(): boolean;
//# sourceMappingURL=useIsKeyboardShown.d.ts.map
\ No newline at end of file
{"version":3,"file":"useIsKeyboardShown.d.ts","sourceRoot":"","sources":["../../../../src/utils/useIsKeyboardShown.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,YA2BzC"}
\ No newline at end of file
/// <reference types="react" />
import { Animated, StyleProp, TextStyle } from 'react-native';
declare type Props = {
/**
* Whether the badge is visible
*/
visible: boolean;
/**
* Content of the `Badge`.
*/
children?: string | number;
/**
* Size of the `Badge`.
*/
size?: number;
/**
* Style object for the tab bar container.
*/
style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
};
export default function Badge({ children, style, visible, size, ...rest }: Props): JSX.Element | null;
export {};
//# sourceMappingURL=Badge.d.ts.map
\ No newline at end of file
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/views/Badge.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,aAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,OAAc,EACd,IAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,sBAsEP"}
\ No newline at end of file
/// <reference types="react" />
import { ParamListBase, TabNavigationState } from '@react-navigation/native';
import { Animated, StyleProp, ViewStyle } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context';
import type { BottomTabBarProps, BottomTabDescriptorMap } from '../types';
declare type Props = BottomTabBarProps & {
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
};
declare type Options = {
state: TabNavigationState<ParamListBase>;
descriptors: BottomTabDescriptorMap;
layout: {
height: number;
width: number;
};
dimensions: {
height: number;
width: number;
};
};
export declare const getTabBarHeight: ({ state, descriptors, dimensions, insets, style, ...rest }: Options & {
insets: EdgeInsets;
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
}) => number;
export default function BottomTabBar({ state, navigation, descriptors, insets, style, }: Props): JSX.Element;
export {};
//# sourceMappingURL=BottomTabBar.d.ts.map
\ No newline at end of file
{"version":3,"file":"BottomTabBar.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAIL,aAAa,EACb,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,QAAQ,EAGR,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAoB,MAAM,gCAAgC,CAAC;AAE9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAK1E,aAAK,KAAK,GAAG,iBAAiB,GAAG;IAC/B,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAQF,aAAK,OAAO,GAAG;IACb,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,WAAW,EAAE,sBAAsB,CAAC;IACpC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C,CAAC;AA8CF,eAAO,MAAM,eAAe;YAQlB,UAAU;WACX,SAAS,iBAAiB,CAAC,UAAU,SAAS,CAAC,CAAC,GAAG,SAAS;YA4BpE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAK,EACL,UAAU,EACV,WAAW,EACX,MAAM,EACN,KAAK,GACN,EAAE,KAAK,eAoPP"}
\ No newline at end of file
import { Route } from '@react-navigation/native';
import React from 'react';
import { GestureResponderEvent, StyleProp, TextStyle, ViewStyle } from 'react-native';
import type { BottomTabBarButtonProps, BottomTabDescriptor, LabelPosition } from '../types';
declare type Props = {
/**
* Whether the tab is focused.
*/
focused: boolean;
/**
* The route object which should be specified by the tab.
*/
route: Route<string>;
/**
* The descriptor object for the route.
*/
descriptor: BottomTabDescriptor;
/**
* The label text of the tab.
*/
label: string | ((props: {
focused: boolean;
color: string;
position: LabelPosition;
children: string;
}) => React.ReactNode);
/**
* Icon to display for the tab.
*/
icon: (props: {
focused: boolean;
size: number;
color: string;
}) => React.ReactNode;
/**
* Text to show in a badge on the tab icon.
*/
badge?: number | string;
/**
* Custom style for the badge.
*/
badgeStyle?: StyleProp<TextStyle>;
/**
* URL to use for the link to the tab.
*/
to?: string;
/**
* The button for the tab. Uses a `TouchableWithoutFeedback` by default.
*/
button?: (props: BottomTabBarButtonProps) => React.ReactNode;
/**
* The accessibility label for the tab.
*/
accessibilityLabel?: string;
/**
* An unique ID for testing for the tab.
*/
testID?: string;
/**
* Function to execute on press in React Native.
* On the web, this will use onClick.
*/
onPress: (e: React.MouseEvent<HTMLElement, MouseEvent> | GestureResponderEvent) => void;
/**
* Function to execute on long press.
*/
onLongPress: (e: GestureResponderEvent) => void;
/**
* Whether the label should be aligned with the icon horizontally.
*/
horizontal: boolean;
/**
* Color for the icon and label when the item is active.
*/
activeTintColor?: string;
/**
* Color for the icon and label when the item is inactive.
*/
inactiveTintColor?: string;
/**
* Background color for item when its active.
*/
activeBackgroundColor?: string;
/**
* Background color for item when its inactive.
*/
inactiveBackgroundColor?: string;
/**
* Whether to show the label text for the tab.
*/
showLabel?: boolean;
/**
* Whether to allow scaling the font for the label for accessibility purposes.
*/
allowFontScaling?: boolean;
/**
* Style object for the label element.
*/
labelStyle?: StyleProp<TextStyle>;
/**
* Style object for the icon element.
*/
iconStyle?: StyleProp<ViewStyle>;
/**
* Style object for the wrapper element.
*/
style?: StyleProp<ViewStyle>;
};
export default function BottomTabBarItem({ focused, route, descriptor, label, icon, badge, badgeStyle, to, button, accessibilityLabel, testID, onPress, onLongPress, horizontal, activeTintColor: customActiveTintColor, inactiveTintColor: customInactiveTintColor, activeBackgroundColor, inactiveBackgroundColor, showLabel, allowFontScaling, labelStyle, iconStyle, style, }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
export {};
//# sourceMappingURL=BottomTabItem.d.ts.map
\ No newline at end of file
{"version":3,"file":"BottomTabItem.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,qBAAqB,EAGrB,SAAS,EAGT,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AE,qBAAqB,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,KAAK,EACL,UAAU,EACV,KAAK,EACL,IAAI,EACJ,KAAK,EACL,UAAU,EACV,EAAE,EACF,MAyCC,EACD,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,WAAW,EACX,UAAU,EACV,eAAe,EAAE,qBAAqB,EACtC,iBAAiB,EAAE,uBAAuB,EAC1C,qBAAqC,EACrC,uBAAuC,EACvC,SAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,KAAK,sEA2GP"}
\ No newline at end of file
/// <reference types="react" />
import type { ParamListBase, TabNavigationState } from '@react-navigation/native';
import type { BottomTabDescriptorMap, BottomTabNavigationConfig, BottomTabNavigationHelpers } from '../types';
declare type Props = BottomTabNavigationConfig & {
state: TabNavigationState<ParamListBase>;
navigation: BottomTabNavigationHelpers;
descriptors: BottomTabDescriptorMap;
};
export default function BottomTabView(props: Props): JSX.Element;
export {};
//# sourceMappingURL=BottomTabView.d.ts.map
\ No newline at end of file
{"version":3,"file":"BottomTabView.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabView.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAEV,sBAAsB,EAEtB,yBAAyB,EACzB,0BAA0B,EAE3B,MAAM,UAAU,CAAC;AAMlB,aAAK,KAAK,GAAG,yBAAyB,GAAG;IACvC,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,eAiIjD"}
\ No newline at end of file
import * as React from 'react';
import { StyleProp, ViewProps, ViewStyle } from 'react-native';
declare type Props = {
visible: boolean;
children: React.ReactNode;
enabled: boolean;
freezeOnBlur?: boolean;
style?: StyleProp<ViewStyle>;
};
export declare const MaybeScreenContainer: ({ enabled, ...rest }: ViewProps & {
enabled: boolean;
hasTwoStates: boolean;
children: React.ReactNode;
}) => JSX.Element;
export declare function MaybeScreen({ visible, children, ...rest }: Props): JSX.Element;
export {};
//# sourceMappingURL=ScreenFallback.d.ts.map
\ No newline at end of file
{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE,aAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAUF,eAAO,MAAM,oBAAoB;aAItB,OAAO;kBACF,OAAO;cACX,MAAM,SAAS;iBAO1B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAchE"}
\ No newline at end of file
import type { Route } from '@react-navigation/native';
import React from 'react';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
declare type Props = {
route: Route<string>;
horizontal: boolean;
badge?: string | number;
badgeStyle?: StyleProp<TextStyle>;
activeOpacity: number;
inactiveOpacity: number;
activeTintColor: string;
inactiveTintColor: string;
renderIcon: (props: {
focused: boolean;
color: string;
size: number;
}) => React.ReactNode;
style: StyleProp<ViewStyle>;
};
export default function TabBarIcon({ route: _, horizontal, badge, badgeStyle, activeOpacity, inactiveOpacity, activeTintColor, inactiveTintColor, renderIcon, style, }: Props): JSX.Element;
export {};
//# sourceMappingURL=TabBarIcon.d.ts.map
\ No newline at end of file
{"version":3,"file":"TabBarIcon.d.ts","sourceRoot":"","sources":["../../../../src/views/TabBarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,EAET,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,CAAC,KAAK,EAAE;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EAAE,CAAC,EACR,UAAU,EACV,KAAK,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,KAAK,GACN,EAAE,KAAK,eAoCP"}
\ No newline at end of file
{
"_from": "@react-navigation/bottom-tabs",
"_id": "@react-navigation/bottom-tabs@6.5.3",
"_inBundle": false,
"_integrity": "sha512-ZA2Ko9fNwNaaSNn7738KpEk8Doi+yjRfTg8Wb/WvduIaK/28qNLAYWBCUEVjBC55y/9zJOzwc4R8Av2J2MG/4g==",
"_location": "/@react-navigation/bottom-tabs",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "@react-navigation/bottom-tabs",
"name": "@react-navigation/bottom-tabs",
"escapedName": "@react-navigation%2fbottom-tabs",
"scope": "@react-navigation",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-6.5.3.tgz",
"_shasum": "76bb793b42326544997d438c5202b59913d0d656",
"_spec": "@react-navigation/bottom-tabs",
"_where": "/Users/scloady/Desktop/proyecto_TDDM",
"bugs": {
"url": "https://github.com/react-navigation/react-navigation/issues"
},
"bundleDependencies": false,
"dependencies": {
"@react-navigation/elements": "^1.3.13",
"color": "^4.2.3",
"warn-once": "^0.1.0"
},
"deprecated": false,
"description": "Bottom tab navigator following iOS design guidelines",
"devDependencies": {
"@react-navigation/native": "^6.1.2",
"@testing-library/react-native": "^11.5.0",
"@types/color": "^3.0.1",
"@types/react": "~18.0.0",
"@types/react-native": "~0.69.1",
"del-cli": "^3.0.1",
"react": "18.0.0",
"react-native": "0.69.5",
"react-native-builder-bob": "^0.20.3",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"typescript": "^4.7.4"
},
"files": [
"src",
"lib",
"!**/__tests__"
],
"gitHead": "f93576624282c3d65e359cca2826749f56221e8c",
"homepage": "https://github.com/react-navigation/react-navigation#readme",
"keywords": [
"react-native-component",
"react-component",
"react-native",
"react-navigation",
"ios",
"android",
"tab"
],
"license": "MIT",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"name": "@react-navigation/bottom-tabs",
"peerDependencies": {
"@react-navigation/native": "^6.0.0",
"react": "*",
"react-native": "*",
"react-native-safe-area-context": ">= 3.0.0",
"react-native-screens": ">= 3.0.0"
},
"publishConfig": {
"access": "public"
},
"react-native": "src/index.tsx",
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/react-navigation/react-navigation.git",
"directory": "packages/bottom-tabs"
},
"scripts": {
"clean": "del lib",
"prepack": "bob build"
},
"sideEffects": false,
"source": "src/index.tsx",
"types": "lib/typescript/src/index.d.ts",
"version": "6.5.3"
}
/**
* Navigators
*/
export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator';
/**
* Views
*/
export { default as BottomTabBar } from './views/BottomTabBar';
export { default as BottomTabView } from './views/BottomTabView';
/**
* Utilities
*/
export { default as BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext';
export { default as BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext';
export { default as useBottomTabBarHeight } from './utils/useBottomTabBarHeight';
/**
* Types
*/
export type {
BottomTabBarButtonProps,
BottomTabBarProps,
BottomTabHeaderProps,
BottomTabNavigationEventMap,
BottomTabNavigationOptions,
BottomTabNavigationProp,
BottomTabScreenProps,
} from './types';
import {
createNavigatorFactory,
DefaultNavigatorOptions,
ParamListBase,
TabActionHelpers,
TabNavigationState,
TabRouter,
TabRouterOptions,
useNavigationBuilder,
} from '@react-navigation/native';
import * as React from 'react';
import warnOnce from 'warn-once';
import type {
BottomTabNavigationConfig,
BottomTabNavigationEventMap,
BottomTabNavigationOptions,
} from '../types';
import BottomTabView from '../views/BottomTabView';
type Props = DefaultNavigatorOptions<
ParamListBase,
TabNavigationState<ParamListBase>,
BottomTabNavigationOptions,
BottomTabNavigationEventMap
> &
TabRouterOptions &
BottomTabNavigationConfig;
function BottomTabNavigator({
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
sceneContainerStyle,
...restWithDeprecated
}: Props) {
const {
// @ts-expect-error: lazy is deprecated
lazy,
// @ts-expect-error: tabBarOptions is deprecated
tabBarOptions,
...rest
} = restWithDeprecated;
let defaultScreenOptions: BottomTabNavigationOptions = {};
if (tabBarOptions) {
Object.assign(defaultScreenOptions, {
tabBarHideOnKeyboard: tabBarOptions.keyboardHidesTabBar,
tabBarActiveTintColor: tabBarOptions.activeTintColor,
tabBarInactiveTintColor: tabBarOptions.inactiveTintColor,
tabBarActiveBackgroundColor: tabBarOptions.activeBackgroundColor,
tabBarInactiveBackgroundColor: tabBarOptions.inactiveBackgroundColor,
tabBarAllowFontScaling: tabBarOptions.allowFontScaling,
tabBarShowLabel: tabBarOptions.showLabel,
tabBarLabelStyle: tabBarOptions.labelStyle,
tabBarIconStyle: tabBarOptions.iconStyle,
tabBarItemStyle: tabBarOptions.tabStyle,
tabBarLabelPosition:
tabBarOptions.labelPosition ??
(tabBarOptions.adaptive === false ? 'below-icon' : undefined),
tabBarStyle: [
{ display: tabBarOptions.tabBarVisible ? 'none' : 'flex' },
defaultScreenOptions.tabBarStyle,
],
});
(
Object.keys(defaultScreenOptions) as (keyof BottomTabNavigationOptions)[]
).forEach((key) => {
if (defaultScreenOptions[key] === undefined) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete defaultScreenOptions[key];
}
});
warnOnce(
tabBarOptions,
`Bottom Tab Navigator: 'tabBarOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(
defaultScreenOptions,
null,
2
)}\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator#options for more details.`
);
}
if (typeof lazy === 'boolean') {
defaultScreenOptions.lazy = lazy;
warnOnce(
true,
`Bottom Tab Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/bottom-tab-navigator/#lazy for more details.`
);
}
const { state, descriptors, navigation, NavigationContent } =
useNavigationBuilder<
TabNavigationState<ParamListBase>,
TabRouterOptions,
TabActionHelpers<ParamListBase>,
BottomTabNavigationOptions,
BottomTabNavigationEventMap
>(TabRouter, {
id,
initialRouteName,
backBehavior,
children,
screenListeners,
screenOptions,
defaultScreenOptions,
});
return (
<NavigationContent>
<BottomTabView
{...rest}
state={state}
navigation={navigation}
descriptors={descriptors}
sceneContainerStyle={sceneContainerStyle}
/>
</NavigationContent>
);
}
export default createNavigatorFactory<
TabNavigationState<ParamListBase>,
BottomTabNavigationOptions,
BottomTabNavigationEventMap,
typeof BottomTabNavigator
>(BottomTabNavigator);
import type { HeaderOptions } from '@react-navigation/elements';
import type {
Descriptor,
NavigationHelpers,
NavigationProp,
ParamListBase,
RouteProp,
TabActionHelpers,
TabNavigationState,
} from '@react-navigation/native';
import type * as React from 'react';
import type {
Animated,
GestureResponderEvent,
StyleProp,
TextStyle,
TouchableWithoutFeedbackProps,
ViewStyle,
} from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';
export type Layout = { width: number; height: number };
export type BottomTabNavigationEventMap = {
/**
* Event which fires on tapping on the tab in the tab bar.
*/
tabPress: { data: undefined; canPreventDefault: true };
/**
* Event which fires on long press on the tab in the tab bar.
*/
tabLongPress: { data: undefined };
};
export type LabelPosition = 'beside-icon' | 'below-icon';
export type BottomTabNavigationHelpers = NavigationHelpers<
ParamListBase,
BottomTabNavigationEventMap
> &
TabActionHelpers<ParamListBase>;
export type BottomTabNavigationProp<
ParamList extends ParamListBase,
RouteName extends keyof ParamList = keyof ParamList,
NavigatorID extends string | undefined = undefined
> = NavigationProp<
ParamList,
RouteName,
NavigatorID,
TabNavigationState<ParamList>,
BottomTabNavigationOptions,
BottomTabNavigationEventMap
> &
TabActionHelpers<ParamList>;
export type BottomTabScreenProps<
ParamList extends ParamListBase,
RouteName extends keyof ParamList = keyof ParamList,
NavigatorID extends string | undefined = undefined
> = {
navigation: BottomTabNavigationProp<ParamList, RouteName, NavigatorID>;
route: RouteProp<ParamList, RouteName>;
};
export type TimingKeyboardAnimationConfig = {
animation: 'timing';
config?: Omit<
Partial<Animated.TimingAnimationConfig>,
'toValue' | 'useNativeDriver'
>;
};
export type SpringKeyboardAnimationConfig = {
animation: 'spring';
config?: Omit<
Partial<Animated.SpringAnimationConfig>,
'toValue' | 'useNativeDriver'
>;
};
export type TabBarVisibilityAnimationConfig =
| TimingKeyboardAnimationConfig
| SpringKeyboardAnimationConfig;
export type BottomTabNavigationOptions = HeaderOptions & {
/**
* Title text for the screen.
*/
title?: string;
/**
* Title string of a tab displayed in the tab bar
* or a function that given { focused: boolean, color: string, position: 'below-icon' | 'beside-icon', children: string } returns a React.Node to display in tab bar.
*
* When undefined, scene title is used. Use `tabBarShowLabel` to hide the label.
*/
tabBarLabel?:
| string
| ((props: {
focused: boolean;
color: string;
position: LabelPosition;
children: string;
}) => React.ReactNode);
/**
* Whether the tab label should be visible. Defaults to `true`.
*/
tabBarShowLabel?: boolean;
/**
* Whether the label is shown below the icon or beside the icon.
*
* - `below-icon`: the label is shown below the icon (typical for iPhones)
* - `beside-icon` the label is shown next to the icon (typical for iPad)
*
* By default, the position is chosen automatically based on device width.
*/
tabBarLabelPosition?: LabelPosition;
/**
* Style object for the tab label.
*/
tabBarLabelStyle?: StyleProp<TextStyle>;
/**
* Whether label font should scale to respect Text Size accessibility settings.
*/
tabBarAllowFontScaling?: boolean;
/**
* A function that given { focused: boolean, color: string } returns a React.Node to display in the tab bar.
*/
tabBarIcon?: (props: {
focused: boolean;
color: string;
size: number;
}) => React.ReactNode;
/**
* Style object for the tab icon.
*/
tabBarIconStyle?: StyleProp<TextStyle>;
/**
* Text to show in a badge on the tab icon.
*/
tabBarBadge?: number | string;
/**
* Custom style for the tab bar badge.
* You can specify a background color or text color here.
*/
tabBarBadgeStyle?: StyleProp<TextStyle>;
/**
* Accessibility label for the tab button. This is read by the screen reader when the user taps the tab.
* It's recommended to set this if you don't have a label for the tab.
*/
tabBarAccessibilityLabel?: string;
/**
* ID to locate this tab button in tests.
*/
tabBarTestID?: string;
/**
* Function which returns a React element to render as the tab bar button.
* Renders `Pressable` by default.
*/
tabBarButton?: (props: BottomTabBarButtonProps) => React.ReactNode;
/**
* Color for the icon and label in the active tab.
*/
tabBarActiveTintColor?: string;
/**
* Color for the icon and label in the inactive tabs.
*/
tabBarInactiveTintColor?: string;
/**
* Background color for the active tab.
*/
tabBarActiveBackgroundColor?: string;
/**
* Background color for the inactive tabs.
*/
tabBarInactiveBackgroundColor?: string;
/**
* Style object for the tab item container.
*/
tabBarItemStyle?: StyleProp<ViewStyle>;
/**
* Whether the tab bar gets hidden when the keyboard is shown. Defaults to `false`.
*/
tabBarHideOnKeyboard?: boolean;
/**
* Animation config for showing and hiding the tab bar when the keyboard is shown/hidden.
*/
tabBarVisibilityAnimationConfig?: {
show?: TabBarVisibilityAnimationConfig;
hide?: TabBarVisibilityAnimationConfig;
};
/**
* Style object for the tab bar container.
*/
tabBarStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/**
* Function which returns a React Element to use as background for the tab bar.
* You could render an image, a gradient, blur view etc.
*
* When using `BlurView`, make sure to set `position: 'absolute'` in `tabBarStyle` as well.
* You'd also need to use `useBottomTabBarHeight()` to add a bottom padding to your content.
*/
tabBarBackground?: () => React.ReactNode;
/**
* Whether this screens should render the first time it's accessed. Defaults to `true`.
* Set it to `false` if you want to render the screen on initial render.
*/
lazy?: boolean;
/**
* Function that given returns a React Element to display as a header.
*/
header?: (props: BottomTabHeaderProps) => React.ReactNode;
/**
* Whether to show the header. Setting this to `false` hides the header.
* Defaults to `true`.
*/
headerShown?: boolean;
/**
* Whether this screen should be unmounted when navigating away from it.
* Defaults to `false`.
*/
unmountOnBlur?: boolean;
/**
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
* Requires `react-native-screens` version >=3.16.0.
*
* Only supported on iOS and Android.
*/
freezeOnBlur?: boolean;
};
export type BottomTabDescriptor = Descriptor<
BottomTabNavigationOptions,
BottomTabNavigationProp<ParamListBase>,
RouteProp<ParamListBase>
>;
export type BottomTabDescriptorMap = Record<string, BottomTabDescriptor>;
export type BottomTabNavigationConfig = {
/**
* Function that returns a React element to display as the tab bar.
*/
tabBar?: (props: BottomTabBarProps) => React.ReactNode;
/**
* Safe area insets for the tab bar. This is used to avoid elements like the navigation bar on Android and bottom safe area on iOS.
* By default, the device's safe area insets are automatically detected. You can override the behavior with this option.
*/
safeAreaInsets?: {
top?: number;
right?: number;
bottom?: number;
left?: number;
};
/**
* Whether inactive screens should be detached from the view hierarchy to save memory.
* Make sure to call `enableScreens` from `react-native-screens` to make it work.
* Defaults to `true` on Android.
*/
detachInactiveScreens?: boolean;
/**
* Style object for the component wrapping the screen content.
*/
sceneContainerStyle?: StyleProp<ViewStyle>;
};
export type BottomTabHeaderProps = {
/**
* Layout of the screen.
*/
layout: Layout;
/**
* Options for the current screen.
*/
options: BottomTabNavigationOptions;
/**
* Route object for the current screen.
*/
route: RouteProp<ParamListBase>;
/**
* Navigation prop for the header.
*/
navigation: BottomTabNavigationProp<ParamListBase>;
};
export type BottomTabBarProps = {
state: TabNavigationState<ParamListBase>;
descriptors: BottomTabDescriptorMap;
navigation: NavigationHelpers<ParamListBase, BottomTabNavigationEventMap>;
insets: EdgeInsets;
};
export type BottomTabBarButtonProps = Omit<
TouchableWithoutFeedbackProps,
'onPress'
> & {
to?: string;
children: React.ReactNode;
onPress?: (
e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
) => void;
};
import * as React from 'react';
export default React.createContext<((height: number) => void) | undefined>(
undefined
);
import * as React from 'react';
export default React.createContext<number | undefined>(undefined);
import * as React from 'react';
import BottomTabBarHeightContext from './BottomTabBarHeightContext';
export default function useBottomTabBarHeight() {
const height = React.useContext(BottomTabBarHeightContext);
if (height === undefined) {
throw new Error(
"Couldn't find the bottom tab bar height. Are you inside a screen in Bottom Tab Navigator?"
);
}
return height;
}
import * as React from 'react';
import { EmitterSubscription, Keyboard, Platform } from 'react-native';
export default function useIsKeyboardShown() {
const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);
React.useEffect(() => {
const handleKeyboardShow = () => setIsKeyboardShown(true);
const handleKeyboardHide = () => setIsKeyboardShown(false);
let subscriptions: EmitterSubscription[];
if (Platform.OS === 'ios') {
subscriptions = [
Keyboard.addListener('keyboardWillShow', handleKeyboardShow),
Keyboard.addListener('keyboardWillHide', handleKeyboardHide),
];
} else {
subscriptions = [
Keyboard.addListener('keyboardDidShow', handleKeyboardShow),
Keyboard.addListener('keyboardDidHide', handleKeyboardHide),
];
}
return () => {
subscriptions.forEach((s) => s.remove());
};
}, []);
return isKeyboardShown;
}
import { useTheme } from '@react-navigation/native';
import color from 'color';
import * as React from 'react';
import { Animated, StyleProp, StyleSheet, TextStyle } from 'react-native';
type Props = {
/**
* Whether the badge is visible
*/
visible: boolean;
/**
* Content of the `Badge`.
*/
children?: string | number;
/**
* Size of the `Badge`.
*/
size?: number;
/**
* Style object for the tab bar container.
*/
style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
};
export default function Badge({
children,
style,
visible = true,
size = 18,
...rest
}: Props) {
const [opacity] = React.useState(() => new Animated.Value(visible ? 1 : 0));
const [rendered, setRendered] = React.useState(visible);
const theme = useTheme();
React.useEffect(() => {
if (!rendered) {
return;
}
Animated.timing(opacity, {
toValue: visible ? 1 : 0,
duration: 150,
useNativeDriver: true,
}).start(({ finished }) => {
if (finished && !visible) {
setRendered(false);
}
});
return () => opacity.stopAnimation();
}, [opacity, rendered, visible]);
if (!rendered) {
if (visible) {
setRendered(true);
} else {
return null;
}
}
// @ts-expect-error: backgroundColor definitely exists
const { backgroundColor = theme.colors.notification, ...restStyle } =
StyleSheet.flatten(style) || {};
const textColor = color(backgroundColor).isLight() ? 'black' : 'white';
const borderRadius = size / 2;
const fontSize = Math.floor((size * 3) / 4);
return (
<Animated.Text
numberOfLines={1}
style={[
{
transform: [
{
scale: opacity.interpolate({
inputRange: [0, 1],
outputRange: [0.5, 1],
}),
},
],
color: textColor,
lineHeight: size - 1,
height: size,
minWidth: size,
opacity,
backgroundColor,
fontSize,
borderRadius,
},
styles.container,
restStyle,
]}
{...rest}
>
{children}
</Animated.Text>
);
}
const styles = StyleSheet.create({
container: {
alignSelf: 'flex-end',
textAlign: 'center',
paddingHorizontal: 4,
overflow: 'hidden',
},
});
import { MissingIcon } from '@react-navigation/elements';
import {
CommonActions,
NavigationContext,
NavigationRouteContext,
ParamListBase,
TabNavigationState,
useLinkBuilder,
useTheme,
} from '@react-navigation/native';
import React from 'react';
import {
Animated,
LayoutChangeEvent,
Platform,
StyleProp,
StyleSheet,
View,
ViewStyle,
} from 'react-native';
import { EdgeInsets, useSafeAreaFrame } from 'react-native-safe-area-context';
import type { BottomTabBarProps, BottomTabDescriptorMap } from '../types';
import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';
import useIsKeyboardShown from '../utils/useIsKeyboardShown';
import BottomTabItem from './BottomTabItem';
type Props = BottomTabBarProps & {
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
};
const DEFAULT_TABBAR_HEIGHT = 49;
const COMPACT_TABBAR_HEIGHT = 32;
const DEFAULT_MAX_TAB_ITEM_WIDTH = 125;
const useNativeDriver = Platform.OS !== 'web';
type Options = {
state: TabNavigationState<ParamListBase>;
descriptors: BottomTabDescriptorMap;
layout: { height: number; width: number };
dimensions: { height: number; width: number };
};
const shouldUseHorizontalLabels = ({
state,
descriptors,
layout,
dimensions,
}: Options) => {
const { tabBarLabelPosition } =
descriptors[state.routes[state.index].key].options;
if (tabBarLabelPosition) {
switch (tabBarLabelPosition) {
case 'beside-icon':
return true;
case 'below-icon':
return false;
}
}
if (layout.width >= 768) {
// Screen size matches a tablet
const maxTabWidth = state.routes.reduce((acc, route) => {
const { tabBarItemStyle } = descriptors[route.key].options;
const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);
if (flattenedStyle) {
if (typeof flattenedStyle.width === 'number') {
return acc + flattenedStyle.width;
} else if (typeof flattenedStyle.maxWidth === 'number') {
return acc + flattenedStyle.maxWidth;
}
}
return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;
}, 0);
return maxTabWidth <= layout.width;
} else {
return dimensions.width > dimensions.height;
}
};
const getPaddingBottom = (insets: EdgeInsets) =>
Math.max(insets.bottom - Platform.select({ ios: 4, default: 0 }), 0);
export const getTabBarHeight = ({
state,
descriptors,
dimensions,
insets,
style,
...rest
}: Options & {
insets: EdgeInsets;
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
}) => {
// @ts-ignore
const customHeight = StyleSheet.flatten(style)?.height;
if (typeof customHeight === 'number') {
return customHeight;
}
const isLandscape = dimensions.width > dimensions.height;
const horizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
...rest,
});
const paddingBottom = getPaddingBottom(insets);
if (
Platform.OS === 'ios' &&
!Platform.isPad &&
isLandscape &&
horizontalLabels
) {
return COMPACT_TABBAR_HEIGHT + paddingBottom;
}
return DEFAULT_TABBAR_HEIGHT + paddingBottom;
};
export default function BottomTabBar({
state,
navigation,
descriptors,
insets,
style,
}: Props) {
const { colors } = useTheme();
const buildLink = useLinkBuilder();
const focusedRoute = state.routes[state.index];
const focusedDescriptor = descriptors[focusedRoute.key];
const focusedOptions = focusedDescriptor.options;
const {
tabBarShowLabel,
tabBarHideOnKeyboard = false,
tabBarVisibilityAnimationConfig,
tabBarStyle,
tabBarBackground,
tabBarActiveTintColor,
tabBarInactiveTintColor,
tabBarActiveBackgroundColor,
tabBarInactiveBackgroundColor,
} = focusedOptions;
const dimensions = useSafeAreaFrame();
const isKeyboardShown = useIsKeyboardShown();
const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);
const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);
const visibilityAnimationConfigRef = React.useRef(
tabBarVisibilityAnimationConfig
);
React.useEffect(() => {
visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;
});
const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar);
const [visible] = React.useState(
() => new Animated.Value(shouldShowTabBar ? 1 : 0)
);
React.useEffect(() => {
const visibilityAnimationConfig = visibilityAnimationConfigRef.current;
if (shouldShowTabBar) {
const animation =
visibilityAnimationConfig?.show?.animation === 'spring'
? Animated.spring
: Animated.timing;
animation(visible, {
toValue: 1,
useNativeDriver,
duration: 250,
...visibilityAnimationConfig?.show?.config,
}).start(({ finished }) => {
if (finished) {
setIsTabBarHidden(false);
}
});
} else {
setIsTabBarHidden(true);
const animation =
visibilityAnimationConfig?.hide?.animation === 'spring'
? Animated.spring
: Animated.timing;
animation(visible, {
toValue: 0,
useNativeDriver,
duration: 200,
...visibilityAnimationConfig?.hide?.config,
}).start();
}
return () => visible.stopAnimation();
}, [visible, shouldShowTabBar]);
const [layout, setLayout] = React.useState({
height: 0,
width: dimensions.width,
});
const handleLayout = (e: LayoutChangeEvent) => {
const { height, width } = e.nativeEvent.layout;
onHeightChange?.(height);
setLayout((layout) => {
if (height === layout.height && width === layout.width) {
return layout;
} else {
return {
height,
width,
};
}
});
};
const { routes } = state;
const paddingBottom = getPaddingBottom(insets);
const tabBarHeight = getTabBarHeight({
state,
descriptors,
insets,
dimensions,
layout,
style: [tabBarStyle, style],
});
const hasHorizontalLabels = shouldUseHorizontalLabels({
state,
descriptors,
dimensions,
layout,
});
const tabBarBackgroundElement = tabBarBackground?.();
return (
<Animated.View
style={[
styles.tabBar,
{
backgroundColor:
tabBarBackgroundElement != null ? 'transparent' : colors.card,
borderTopColor: colors.border,
},
{
transform: [
{
translateY: visible.interpolate({
inputRange: [0, 1],
outputRange: [
layout.height + paddingBottom + StyleSheet.hairlineWidth,
0,
],
}),
},
],
// Absolutely position the tab bar so that the content is below it
// This is needed to avoid gap at bottom when the tab bar is hidden
position: isTabBarHidden ? 'absolute' : (null as any),
},
{
height: tabBarHeight,
paddingBottom,
paddingHorizontal: Math.max(insets.left, insets.right),
},
tabBarStyle,
]}
pointerEvents={isTabBarHidden ? 'none' : 'auto'}
onLayout={handleLayout}
>
<View pointerEvents="none" style={StyleSheet.absoluteFill}>
{tabBarBackgroundElement}
</View>
<View accessibilityRole="tablist" style={styles.content}>
{routes.map((route, index) => {
const focused = index === state.index;
const { options } = descriptors[route.key];
const onPress = () => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true,
});
if (!focused && !event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate({ name: route.name, merge: true }),
target: state.key,
});
}
};
const onLongPress = () => {
navigation.emit({
type: 'tabLongPress',
target: route.key,
});
};
const label =
options.tabBarLabel !== undefined
? options.tabBarLabel
: options.title !== undefined
? options.title
: route.name;
const accessibilityLabel =
options.tabBarAccessibilityLabel !== undefined
? options.tabBarAccessibilityLabel
: typeof label === 'string' && Platform.OS === 'ios'
? `${label}, tab, ${index + 1} of ${routes.length}`
: undefined;
return (
<NavigationContext.Provider
key={route.key}
value={descriptors[route.key].navigation}
>
<NavigationRouteContext.Provider value={route}>
<BottomTabItem
route={route}
descriptor={descriptors[route.key]}
focused={focused}
horizontal={hasHorizontalLabels}
onPress={onPress}
onLongPress={onLongPress}
accessibilityLabel={accessibilityLabel}
to={buildLink(route.name, route.params)}
testID={options.tabBarTestID}
allowFontScaling={options.tabBarAllowFontScaling}
activeTintColor={tabBarActiveTintColor}
inactiveTintColor={tabBarInactiveTintColor}
activeBackgroundColor={tabBarActiveBackgroundColor}
inactiveBackgroundColor={tabBarInactiveBackgroundColor}
button={options.tabBarButton}
icon={
options.tabBarIcon ??
(({ color, size }) => (
<MissingIcon color={color} size={size} />
))
}
badge={options.tabBarBadge}
badgeStyle={options.tabBarBadgeStyle}
label={label}
showLabel={tabBarShowLabel}
labelStyle={options.tabBarLabelStyle}
iconStyle={options.tabBarIconStyle}
style={options.tabBarItemStyle}
/>
</NavigationRouteContext.Provider>
</NavigationContext.Provider>
);
})}
</View>
</Animated.View>
);
}
const styles = StyleSheet.create({
tabBar: {
left: 0,
right: 0,
bottom: 0,
borderTopWidth: StyleSheet.hairlineWidth,
elevation: 8,
},
content: {
flex: 1,
flexDirection: 'row',
},
});
import { Link, Route, useTheme } from '@react-navigation/native';
import Color from 'color';
import React from 'react';
import {
GestureResponderEvent,
Platform,
Pressable,
StyleProp,
StyleSheet,
Text,
TextStyle,
ViewStyle,
} from 'react-native';
import type {
BottomTabBarButtonProps,
BottomTabDescriptor,
LabelPosition,
} from '../types';
import TabBarIcon from './TabBarIcon';
type Props = {
/**
* Whether the tab is focused.
*/
focused: boolean;
/**
* The route object which should be specified by the tab.
*/
route: Route<string>;
/**
* The descriptor object for the route.
*/
descriptor: BottomTabDescriptor;
/**
* The label text of the tab.
*/
label:
| string
| ((props: {
focused: boolean;
color: string;
position: LabelPosition;
children: string;
}) => React.ReactNode);
/**
* Icon to display for the tab.
*/
icon: (props: {
focused: boolean;
size: number;
color: string;
}) => React.ReactNode;
/**
* Text to show in a badge on the tab icon.
*/
badge?: number | string;
/**
* Custom style for the badge.
*/
badgeStyle?: StyleProp<TextStyle>;
/**
* URL to use for the link to the tab.
*/
to?: string;
/**
* The button for the tab. Uses a `TouchableWithoutFeedback` by default.
*/
button?: (props: BottomTabBarButtonProps) => React.ReactNode;
/**
* The accessibility label for the tab.
*/
accessibilityLabel?: string;
/**
* An unique ID for testing for the tab.
*/
testID?: string;
/**
* Function to execute on press in React Native.
* On the web, this will use onClick.
*/
onPress: (
e: React.MouseEvent<HTMLElement, MouseEvent> | GestureResponderEvent
) => void;
/**
* Function to execute on long press.
*/
onLongPress: (e: GestureResponderEvent) => void;
/**
* Whether the label should be aligned with the icon horizontally.
*/
horizontal: boolean;
/**
* Color for the icon and label when the item is active.
*/
activeTintColor?: string;
/**
* Color for the icon and label when the item is inactive.
*/
inactiveTintColor?: string;
/**
* Background color for item when its active.
*/
activeBackgroundColor?: string;
/**
* Background color for item when its inactive.
*/
inactiveBackgroundColor?: string;
/**
* Whether to show the label text for the tab.
*/
showLabel?: boolean;
/**
* Whether to allow scaling the font for the label for accessibility purposes.
*/
allowFontScaling?: boolean;
/**
* Style object for the label element.
*/
labelStyle?: StyleProp<TextStyle>;
/**
* Style object for the icon element.
*/
iconStyle?: StyleProp<ViewStyle>;
/**
* Style object for the wrapper element.
*/
style?: StyleProp<ViewStyle>;
};
export default function BottomTabBarItem({
focused,
route,
descriptor,
label,
icon,
badge,
badgeStyle,
to,
button = ({
children,
style,
onPress,
to,
accessibilityRole,
...rest
}: BottomTabBarButtonProps) => {
if (Platform.OS === 'web' && to) {
// React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
// We need to use `onClick` to be able to prevent default browser handling of links.
return (
<Link
{...rest}
to={to}
style={[styles.button, style]}
onPress={(e: any) => {
if (
!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys
(e.button == null || e.button === 0) // ignore everything but left clicks
) {
e.preventDefault();
onPress?.(e);
}
}}
>
{children}
</Link>
);
} else {
return (
<Pressable
{...rest}
accessibilityRole={accessibilityRole}
onPress={onPress}
style={style}
>
{children}
</Pressable>
);
}
},
accessibilityLabel,
testID,
onPress,
onLongPress,
horizontal,
activeTintColor: customActiveTintColor,
inactiveTintColor: customInactiveTintColor,
activeBackgroundColor = 'transparent',
inactiveBackgroundColor = 'transparent',
showLabel = true,
allowFontScaling,
labelStyle,
iconStyle,
style,
}: Props) {
const { colors } = useTheme();
const activeTintColor =
customActiveTintColor === undefined
? colors.primary
: customActiveTintColor;
const inactiveTintColor =
customInactiveTintColor === undefined
? Color(colors.text).mix(Color(colors.card), 0.5).hex()
: customInactiveTintColor;
const renderLabel = ({ focused }: { focused: boolean }) => {
if (showLabel === false) {
return null;
}
const color = focused ? activeTintColor : inactiveTintColor;
if (typeof label === 'string') {
return (
<Text
numberOfLines={1}
style={[
styles.label,
{ color },
horizontal ? styles.labelBeside : styles.labelBeneath,
labelStyle,
]}
allowFontScaling={allowFontScaling}
>
{label}
</Text>
);
}
const { options } = descriptor;
const children =
typeof options.tabBarLabel === 'string'
? options.tabBarLabel
: options.title !== undefined
? options.title
: route.name;
return label({
focused,
color,
position: horizontal ? 'beside-icon' : 'below-icon',
children,
});
};
const renderIcon = ({ focused }: { focused: boolean }) => {
if (icon === undefined) {
return null;
}
const activeOpacity = focused ? 1 : 0;
const inactiveOpacity = focused ? 0 : 1;
return (
<TabBarIcon
route={route}
horizontal={horizontal}
badge={badge}
badgeStyle={badgeStyle}
activeOpacity={activeOpacity}
inactiveOpacity={inactiveOpacity}
activeTintColor={activeTintColor}
inactiveTintColor={inactiveTintColor}
renderIcon={icon}
style={iconStyle}
/>
);
};
const scene = { route, focused };
const backgroundColor = focused
? activeBackgroundColor
: inactiveBackgroundColor;
return button({
to,
onPress,
onLongPress,
testID,
accessibilityLabel,
// FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS
accessibilityRole: Platform.select({ ios: 'button', default: 'tab' }),
accessibilityState: { selected: focused },
// @ts-expect-error: keep for compatibility with older React Native versions
accessibilityStates: focused ? ['selected'] : [],
style: [
styles.tab,
{ backgroundColor },
horizontal ? styles.tabLandscape : styles.tabPortrait,
style,
],
children: (
<React.Fragment>
{renderIcon(scene)}
{renderLabel(scene)}
</React.Fragment>
),
}) as React.ReactElement;
}
const styles = StyleSheet.create({
tab: {
flex: 1,
alignItems: 'center',
},
tabPortrait: {
justifyContent: 'flex-end',
flexDirection: 'column',
},
tabLandscape: {
justifyContent: 'center',
flexDirection: 'row',
},
label: {
textAlign: 'center',
backgroundColor: 'transparent',
},
labelBeneath: {
fontSize: 10,
},
labelBeside: {
fontSize: 13,
marginLeft: 20,
marginTop: 3,
},
button: {
display: 'flex',
},
});
import {
getHeaderTitle,
Header,
SafeAreaProviderCompat,
Screen,
} from '@react-navigation/elements';
import type {
ParamListBase,
TabNavigationState,
} from '@react-navigation/native';
import * as React from 'react';
import { Platform, StyleSheet } from 'react-native';
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
import type {
BottomTabBarProps,
BottomTabDescriptorMap,
BottomTabHeaderProps,
BottomTabNavigationConfig,
BottomTabNavigationHelpers,
BottomTabNavigationProp,
} from '../types';
import BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';
import BottomTabBarHeightContext from '../utils/BottomTabBarHeightContext';
import BottomTabBar, { getTabBarHeight } from './BottomTabBar';
import { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';
type Props = BottomTabNavigationConfig & {
state: TabNavigationState<ParamListBase>;
navigation: BottomTabNavigationHelpers;
descriptors: BottomTabDescriptorMap;
};
export default function BottomTabView(props: Props) {
const {
tabBar = (props: BottomTabBarProps) => <BottomTabBar {...props} />,
state,
navigation,
descriptors,
safeAreaInsets,
detachInactiveScreens = Platform.OS === 'web' ||
Platform.OS === 'android' ||
Platform.OS === 'ios',
sceneContainerStyle,
} = props;
const focusedRouteKey = state.routes[state.index].key;
const [loaded, setLoaded] = React.useState([focusedRouteKey]);
if (!loaded.includes(focusedRouteKey)) {
setLoaded([...loaded, focusedRouteKey]);
}
const dimensions = SafeAreaProviderCompat.initialMetrics.frame;
const [tabBarHeight, setTabBarHeight] = React.useState(() =>
getTabBarHeight({
state,
descriptors,
dimensions,
layout: { width: dimensions.width, height: 0 },
insets: {
...SafeAreaProviderCompat.initialMetrics.insets,
...props.safeAreaInsets,
},
style: descriptors[state.routes[state.index].key].options.tabBarStyle,
})
);
const renderTabBar = () => {
return (
<SafeAreaInsetsContext.Consumer>
{(insets) =>
tabBar({
state: state,
descriptors: descriptors,
navigation: navigation,
insets: {
top: safeAreaInsets?.top ?? insets?.top ?? 0,
right: safeAreaInsets?.right ?? insets?.right ?? 0,
bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,
left: safeAreaInsets?.left ?? insets?.left ?? 0,
},
})
}
</SafeAreaInsetsContext.Consumer>
);
};
const { routes } = state;
return (
<SafeAreaProviderCompat>
<MaybeScreenContainer
enabled={detachInactiveScreens}
hasTwoStates
style={styles.container}
>
{routes.map((route, index) => {
const descriptor = descriptors[route.key];
const { lazy = true, unmountOnBlur } = descriptor.options;
const isFocused = state.index === index;
if (unmountOnBlur && !isFocused) {
return null;
}
if (lazy && !loaded.includes(route.key) && !isFocused) {
// Don't render a lazy screen if we've never navigated to it
return null;
}
const {
freezeOnBlur,
header = ({ layout, options }: BottomTabHeaderProps) => (
<Header
{...options}
layout={layout}
title={getHeaderTitle(options, route.name)}
/>
),
headerShown,
headerStatusBarHeight,
headerTransparent,
} = descriptor.options;
return (
<MaybeScreen
key={route.key}
style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}
visible={isFocused}
enabled={detachInactiveScreens}
freezeOnBlur={freezeOnBlur}
>
<BottomTabBarHeightContext.Provider value={tabBarHeight}>
<Screen
focused={isFocused}
route={descriptor.route}
navigation={descriptor.navigation}
headerShown={headerShown}
headerStatusBarHeight={headerStatusBarHeight}
headerTransparent={headerTransparent}
header={header({
layout: dimensions,
route: descriptor.route,
navigation:
descriptor.navigation as BottomTabNavigationProp<ParamListBase>,
options: descriptor.options,
})}
style={sceneContainerStyle}
>
{descriptor.render()}
</Screen>
</BottomTabBarHeightContext.Provider>
</MaybeScreen>
);
})}
</MaybeScreenContainer>
<BottomTabBarHeightCallbackContext.Provider value={setTabBarHeight}>
{renderTabBar()}
</BottomTabBarHeightCallbackContext.Provider>
</SafeAreaProviderCompat>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden',
},
});
import { ResourceSavingView } from '@react-navigation/elements';
import * as React from 'react';
import { StyleProp, View, ViewProps, ViewStyle } from 'react-native';
type Props = {
visible: boolean;
children: React.ReactNode;
enabled: boolean;
freezeOnBlur?: boolean;
style?: StyleProp<ViewStyle>;
};
let Screens: typeof import('react-native-screens') | undefined;
try {
Screens = require('react-native-screens');
} catch (e) {
// Ignore
}
export const MaybeScreenContainer = ({
enabled,
...rest
}: ViewProps & {
enabled: boolean;
hasTwoStates: boolean;
children: React.ReactNode;
}) => {
if (Screens?.screensEnabled?.()) {
return <Screens.ScreenContainer enabled={enabled} {...rest} />;
}
return <View {...rest} />;
};
export function MaybeScreen({ visible, children, ...rest }: Props) {
if (Screens?.screensEnabled?.()) {
return (
<Screens.Screen activityState={visible ? 2 : 0} {...rest}>
{children}
</Screens.Screen>
);
}
return (
<ResourceSavingView visible={visible} {...rest}>
{children}
</ResourceSavingView>
);
}
import type { Route } from '@react-navigation/native';
import React from 'react';
import {
StyleProp,
StyleSheet,
TextStyle,
View,
ViewStyle,
} from 'react-native';
import Badge from './Badge';
type Props = {
route: Route<string>;
horizontal: boolean;
badge?: string | number;
badgeStyle?: StyleProp<TextStyle>;
activeOpacity: number;
inactiveOpacity: number;
activeTintColor: string;
inactiveTintColor: string;
renderIcon: (props: {
focused: boolean;
color: string;
size: number;
}) => React.ReactNode;
style: StyleProp<ViewStyle>;
};
export default function TabBarIcon({
route: _,
horizontal,
badge,
badgeStyle,
activeOpacity,
inactiveOpacity,
activeTintColor,
inactiveTintColor,
renderIcon,
style,
}: Props) {
const size = 25;
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them.
return (
<View
style={[horizontal ? styles.iconHorizontal : styles.iconVertical, style]}
>
<View style={[styles.icon, { opacity: activeOpacity }]}>
{renderIcon({
focused: true,
size,
color: activeTintColor,
})}
</View>
<View style={[styles.icon, { opacity: inactiveOpacity }]}>
{renderIcon({
focused: false,
size,
color: inactiveTintColor,
})}
</View>
<Badge
visible={badge != null}
style={[
styles.badge,
horizontal ? styles.badgeHorizontal : styles.badgeVertical,
badgeStyle,
]}
size={(size * 3) / 4}
>
{badge}
</Badge>
</View>
);
}
const styles = StyleSheet.create({
icon: {
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them:
// Cover the whole iconContainer:
position: 'absolute',
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
width: '100%',
// Workaround for react-native >= 0.54 layout bug
minWidth: 25,
},
iconVertical: {
flex: 1,
},
iconHorizontal: {
height: '100%',
marginTop: 3,
},
badge: {
position: 'absolute',
left: 3,
},
badgeVertical: {
top: 3,
},
badgeHorizontal: {
top: 7,
},
});
Copyright (c) 2011 Heather Arthur <fayearthur@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# color-string
> library for parsing and generating CSS color strings.
## Install
With [npm](http://npmjs.org/):
```console
$ npm install color-string
```
## Usage
### Parsing
```js
colorString.get('#FFF') // {model: 'rgb', value: [255, 255, 255, 1]}
colorString.get('#FFFA') // {model: 'rgb', value: [255, 255, 255, 0.67]}
colorString.get('#FFFFFFAA') // {model: 'rgb', value: [255, 255, 255, 0.67]}
colorString.get('hsl(360, 100%, 50%)') // {model: 'hsl', value: [0, 100, 50, 1]}
colorString.get('hsl(360 100% 50%)') // {model: 'hsl', value: [0, 100, 50, 1]}
colorString.get('hwb(60, 3%, 60%)') // {model: 'hwb', value: [60, 3, 60, 1]}
colorString.get.rgb('#FFF') // [255, 255, 255, 1]
colorString.get.rgb('blue') // [0, 0, 255, 1]
colorString.get.rgb('rgba(200, 60, 60, 0.3)') // [200, 60, 60, 0.3]
colorString.get.rgb('rgba(200 60 60 / 0.3)') // [200, 60, 60, 0.3]
colorString.get.rgb('rgba(200 60 60 / 30%)') // [200, 60, 60, 0.3]
colorString.get.rgb('rgb(200, 200, 200)') // [200, 200, 200, 1]
colorString.get.rgb('rgb(200 200 200)') // [200, 200, 200, 1]
colorString.get.hsl('hsl(360, 100%, 50%)') // [0, 100, 50, 1]
colorString.get.hsl('hsl(360 100% 50%)') // [0, 100, 50, 1]
colorString.get.hsl('hsla(360, 60%, 50%, 0.4)') // [0, 60, 50, 0.4]
colorString.get.hsl('hsl(360 60% 50% / 0.4)') // [0, 60, 50, 0.4]
colorString.get.hwb('hwb(60, 3%, 60%)') // [60, 3, 60, 1]
colorString.get.hwb('hwb(60, 3%, 60%, 0.6)') // [60, 3, 60, 0.6]
colorString.get.rgb('invalid color string') // null
```
### Generation
```js
colorString.to.hex([255, 255, 255]) // "#FFFFFF"
colorString.to.hex([0, 0, 255, 0.4]) // "#0000FF66"
colorString.to.hex([0, 0, 255], 0.4) // "#0000FF66"
colorString.to.rgb([255, 255, 255]) // "rgb(255, 255, 255)"
colorString.to.rgb([0, 0, 255, 0.4]) // "rgba(0, 0, 255, 0.4)"
colorString.to.rgb([0, 0, 255], 0.4) // "rgba(0, 0, 255, 0.4)"
colorString.to.rgb.percent([0, 0, 255]) // "rgb(0%, 0%, 100%)"
colorString.to.keyword([255, 255, 0]) // "yellow"
colorString.to.hsl([360, 100, 100]) // "hsl(360, 100%, 100%)"
colorString.to.hwb([50, 3, 15]) // "hwb(50, 3%, 15%)"
// all functions also support swizzling
colorString.to.rgb(0, [0, 255], 0.4) // "rgba(0, 0, 255, 0.4)"
colorString.to.rgb([0, 0], [255], 0.4) // "rgba(0, 0, 255, 0.4)"
colorString.to.rgb([0], 0, [255, 0.4]) // "rgba(0, 0, 255, 0.4)"
```
/* MIT license */
var colorNames = require('color-name');
var swizzle = require('simple-swizzle');
var hasOwnProperty = Object.hasOwnProperty;
var reverseNames = Object.create(null);
// create a list of reverse color names
for (var name in colorNames) {
if (hasOwnProperty.call(colorNames, name)) {
reverseNames[colorNames[name]] = name;
}
}
var cs = module.exports = {
to: {},
get: {}
};
cs.get = function (string) {
var prefix = string.substring(0, 3).toLowerCase();
var val;
var model;
switch (prefix) {
case 'hsl':
val = cs.get.hsl(string);
model = 'hsl';
break;
case 'hwb':
val = cs.get.hwb(string);
model = 'hwb';
break;
default:
val = cs.get.rgb(string);
model = 'rgb';
break;
}
if (!val) {
return null;
}
return {model: model, value: val};
};
cs.get.rgb = function (string) {
if (!string) {
return null;
}
var abbr = /^#([a-f0-9]{3,4})$/i;
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var keyword = /^(\w+)$/;
var rgb = [0, 0, 0, 1];
var match;
var i;
var hexAlpha;
if (match = string.match(hex)) {
hexAlpha = match[2];
match = match[1];
for (i = 0; i < 3; i++) {
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
var i2 = i * 2;
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
}
if (hexAlpha) {
rgb[3] = parseInt(hexAlpha, 16) / 255;
}
} else if (match = string.match(abbr)) {
match = match[1];
hexAlpha = match[3];
for (i = 0; i < 3; i++) {
rgb[i] = parseInt(match[i] + match[i], 16);
}
if (hexAlpha) {
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
}
} else if (match = string.match(rgba)) {
for (i = 0; i < 3; i++) {
rgb[i] = parseInt(match[i + 1], 0);
}
if (match[4]) {
if (match[5]) {
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
}
} else if (match = string.match(per)) {
for (i = 0; i < 3; i++) {
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
}
if (match[4]) {
if (match[5]) {
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
}
} else if (match = string.match(keyword)) {
if (match[1] === 'transparent') {
return [0, 0, 0, 0];
}
if (!hasOwnProperty.call(colorNames, match[1])) {
return null;
}
rgb = colorNames[match[1]];
rgb[3] = 1;
return rgb;
} else {
return null;
}
for (i = 0; i < 3; i++) {
rgb[i] = clamp(rgb[i], 0, 255);
}
rgb[3] = clamp(rgb[3], 0, 1);
return rgb;
};
cs.get.hsl = function (string) {
if (!string) {
return null;
}
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
var match = string.match(hsl);
if (match) {
var alpha = parseFloat(match[4]);
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
var s = clamp(parseFloat(match[2]), 0, 100);
var l = clamp(parseFloat(match[3]), 0, 100);
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, s, l, a];
}
return null;
};
cs.get.hwb = function (string) {
if (!string) {
return null;
}
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
var match = string.match(hwb);
if (match) {
var alpha = parseFloat(match[4]);
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
var w = clamp(parseFloat(match[2]), 0, 100);
var b = clamp(parseFloat(match[3]), 0, 100);
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, w, b, a];
}
return null;
};
cs.to.hex = function () {
var rgba = swizzle(arguments);
return (
'#' +
hexDouble(rgba[0]) +
hexDouble(rgba[1]) +
hexDouble(rgba[2]) +
(rgba[3] < 1
? (hexDouble(Math.round(rgba[3] * 255)))
: '')
);
};
cs.to.rgb = function () {
var rgba = swizzle(arguments);
return rgba.length < 4 || rgba[3] === 1
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
};
cs.to.rgb.percent = function () {
var rgba = swizzle(arguments);
var r = Math.round(rgba[0] / 255 * 100);
var g = Math.round(rgba[1] / 255 * 100);
var b = Math.round(rgba[2] / 255 * 100);
return rgba.length < 4 || rgba[3] === 1
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
};
cs.to.hsl = function () {
var hsla = swizzle(arguments);
return hsla.length < 4 || hsla[3] === 1
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
};
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
// (hwb have alpha optional & 1 is default value)
cs.to.hwb = function () {
var hwba = swizzle(arguments);
var a = '';
if (hwba.length >= 4 && hwba[3] !== 1) {
a = ', ' + hwba[3];
}
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
};
cs.to.keyword = function (rgb) {
return reverseNames[rgb.slice(0, 3)];
};
// helpers
function clamp(num, min, max) {
return Math.min(Math.max(min, num), max);
}
function hexDouble(num) {
var str = Math.round(num).toString(16).toUpperCase();
return (str.length < 2) ? '0' + str : str;
}
{
"_from": "color-string@^1.9.0",
"_id": "color-string@1.9.1",
"_inBundle": false,
"_integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
"_location": "/color-string",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "color-string@^1.9.0",
"name": "color-string",
"escapedName": "color-string",
"rawSpec": "^1.9.0",
"saveSpec": null,
"fetchSpec": "^1.9.0"
},
"_requiredBy": [
"/color"
],
"_resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
"_shasum": "4467f9146f036f855b764dfb5bf8582bf342c7a4",
"_spec": "color-string@^1.9.0",
"_where": "/Users/scloady/Desktop/proyecto_TDDM/node_modules/color",
"author": {
"name": "Heather Arthur",
"email": "fayearthur@gmail.com"
},
"bugs": {
"url": "https://github.com/Qix-/color-string/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Maxime Thirouin"
},
{
"name": "Dyma Ywanov",
"email": "dfcreative@gmail.com"
},
{
"name": "Josh Junon"
}
],
"dependencies": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
},
"deprecated": false,
"description": "Parser and generator for CSS color strings",
"devDependencies": {
"xo": "^0.12.1"
},
"files": [
"index.js"
],
"homepage": "https://github.com/Qix-/color-string#readme",
"keywords": [
"color",
"colour",
"rgb",
"css"
],
"license": "MIT",
"name": "color-string",
"repository": {
"type": "git",
"url": "git+https://github.com/Qix-/color-string.git"
},
"scripts": {
"pretest": "xo",
"test": "node test/basic.js"
},
"version": "1.9.1",
"xo": {
"rules": {
"no-cond-assign": 0,
"operator-linebreak": 0
}
}
}
Copyright (c) 2012 Heather Arthur
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# color
> JavaScript library for immutable color conversion and manipulation with support for CSS color strings.
```js
const color = Color('#7743CE').alpha(0.5).lighten(0.5);
console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)'
console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ]
console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 }
```
## Install
```console
$ npm install color
```
## Usage
```js
const Color = require('color');
```
### Constructors
```js
const color = Color('rgb(255, 255, 255)')
const color = Color({r: 255, g: 255, b: 255})
const color = Color.rgb(255, 255, 255)
const color = Color.rgb([255, 255, 255])
```
Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`
String constructors are handled by [color-string](https://www.npmjs.com/package/color-string)
### Getters
```js
color.hsl();
```
Convert a color to a different space (`hsl()`, `cmyk()`, etc.).
```js
color.object(); // {r: 255, g: 255, b: 255}
```
Get a hash of the color value. Reflects the color's current model (see above).
```js
color.rgb().array() // [255, 255, 255]
```
Get an array of the values with `array()`. Reflects the color's current model (see above).
```js
color.rgbNumber() // 16777215 (0xffffff)
```
Get the rgb number value.
```js
color.hex() // #ffffff
```
Get the hex value. (**NOTE:** `.hex()` does not return alpha values; use `.hexa()` for an RGBA representation)
```js
color.red() // 255
```
Get the value for an individual channel.
### CSS Strings
```js
color.hsl().string() // 'hsl(320, 50%, 100%)'
```
Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1.
### Luminosity
```js
color.luminosity(); // 0.412
```
The [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white.
```js
color.contrast(Color("blue")) // 12
```
The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black).
```js
color.isLight(); // true
color.isDark(); // false
```
Get whether the color is "light" or "dark", useful for deciding text color.
### Manipulation
```js
color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0)
color.lighten(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 75%)
color.lighten(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%)
color.darken(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
color.lightness(50) // hsl(100, 50%, 10%) -> hsl(100, 50%, 50%)
color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%)
color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%)
color.grayscale() // #5CBF54 -> #969696
color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%)
color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%)
color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4)
color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0)
color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%)
color.rotate(-90) // hsl(60, 20%, 20%) -> hsl(330, 20%, 20%)
color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128)
color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179)
// chaining
color.green(100).grayscale().lighten(0.6)
```
## Propers
The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus.
const colorString = require('color-string');
const convert = require('color-convert');
const skippedModels = [
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
'keyword',
// Gray conflicts with some method names, and has its own method defined.
'gray',
// Shouldn't really be in color-convert either...
'hex',
];
const hashedModelKeys = {};
for (const model of Object.keys(convert)) {
hashedModelKeys[[...convert[model].labels].sort().join('')] = model;
}
const limiters = {};
function Color(object, model) {
if (!(this instanceof Color)) {
return new Color(object, model);
}
if (model && model in skippedModels) {
model = null;
}
if (model && !(model in convert)) {
throw new Error('Unknown model: ' + model);
}
let i;
let channels;
if (object == null) { // eslint-disable-line no-eq-null,eqeqeq
this.model = 'rgb';
this.color = [0, 0, 0];
this.valpha = 1;
} else if (object instanceof Color) {
this.model = object.model;
this.color = [...object.color];
this.valpha = object.valpha;
} else if (typeof object === 'string') {
const result = colorString.get(object);
if (result === null) {
throw new Error('Unable to parse color from string: ' + object);
}
this.model = result.model;
channels = convert[this.model].channels;
this.color = result.value.slice(0, channels);
this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;
} else if (object.length > 0) {
this.model = model || 'rgb';
channels = convert[this.model].channels;
const newArray = Array.prototype.slice.call(object, 0, channels);
this.color = zeroArray(newArray, channels);
this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
} else if (typeof object === 'number') {
// This is always RGB - can be converted later on.
this.model = 'rgb';
this.color = [
(object >> 16) & 0xFF,
(object >> 8) & 0xFF,
object & 0xFF,
];
this.valpha = 1;
} else {
this.valpha = 1;
const keys = Object.keys(object);
if ('alpha' in object) {
keys.splice(keys.indexOf('alpha'), 1);
this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
}
const hashedKeys = keys.sort().join('');
if (!(hashedKeys in hashedModelKeys)) {
throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
}
this.model = hashedModelKeys[hashedKeys];
const {labels} = convert[this.model];
const color = [];
for (i = 0; i < labels.length; i++) {
color.push(object[labels[i]]);
}
this.color = zeroArray(color);
}
// Perform limitations (clamping, etc.)
if (limiters[this.model]) {
channels = convert[this.model].channels;
for (i = 0; i < channels; i++) {
const limit = limiters[this.model][i];
if (limit) {
this.color[i] = limit(this.color[i]);
}
}
}
this.valpha = Math.max(0, Math.min(1, this.valpha));
if (Object.freeze) {
Object.freeze(this);
}
}
Color.prototype = {
toString() {
return this.string();
},
toJSON() {
return this[this.model]();
},
string(places) {
let self = this.model in colorString.to ? this : this.rgb();
self = self.round(typeof places === 'number' ? places : 1);
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
return colorString.to[self.model](args);
},
percentString(places) {
const self = this.rgb().round(typeof places === 'number' ? places : 1);
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
return colorString.to.rgb.percent(args);
},
array() {
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
},
object() {
const result = {};
const {channels} = convert[this.model];
const {labels} = convert[this.model];
for (let i = 0; i < channels; i++) {
result[labels[i]] = this.color[i];
}
if (this.valpha !== 1) {
result.alpha = this.valpha;
}
return result;
},
unitArray() {
const rgb = this.rgb().color;
rgb[0] /= 255;
rgb[1] /= 255;
rgb[2] /= 255;
if (this.valpha !== 1) {
rgb.push(this.valpha);
}
return rgb;
},
unitObject() {
const rgb = this.rgb().object();
rgb.r /= 255;
rgb.g /= 255;
rgb.b /= 255;
if (this.valpha !== 1) {
rgb.alpha = this.valpha;
}
return rgb;
},
round(places) {
places = Math.max(places || 0, 0);
return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
},
alpha(value) {
if (value !== undefined) {
return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
}
return this.valpha;
},
// Rgb
red: getset('rgb', 0, maxfn(255)),
green: getset('rgb', 1, maxfn(255)),
blue: getset('rgb', 2, maxfn(255)),
hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),
saturationl: getset('hsl', 1, maxfn(100)),
lightness: getset('hsl', 2, maxfn(100)),
saturationv: getset('hsv', 1, maxfn(100)),
value: getset('hsv', 2, maxfn(100)),
chroma: getset('hcg', 1, maxfn(100)),
gray: getset('hcg', 2, maxfn(100)),
white: getset('hwb', 1, maxfn(100)),
wblack: getset('hwb', 2, maxfn(100)),
cyan: getset('cmyk', 0, maxfn(100)),
magenta: getset('cmyk', 1, maxfn(100)),
yellow: getset('cmyk', 2, maxfn(100)),
black: getset('cmyk', 3, maxfn(100)),
x: getset('xyz', 0, maxfn(95.047)),
y: getset('xyz', 1, maxfn(100)),
z: getset('xyz', 2, maxfn(108.833)),
l: getset('lab', 0, maxfn(100)),
a: getset('lab', 1),
b: getset('lab', 2),
keyword(value) {
if (value !== undefined) {
return new Color(value);
}
return convert[this.model].keyword(this.color);
},
hex(value) {
if (value !== undefined) {
return new Color(value);
}
return colorString.to.hex(this.rgb().round().color);
},
hexa(value) {
if (value !== undefined) {
return new Color(value);
}
const rgbArray = this.rgb().round().color;
let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
if (alphaHex.length === 1) {
alphaHex = '0' + alphaHex;
}
return colorString.to.hex(rgbArray) + alphaHex;
},
rgbNumber() {
const rgb = this.rgb().color;
return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);
},
luminosity() {
// http://www.w3.org/TR/WCAG20/#relativeluminancedef
const rgb = this.rgb().color;
const lum = [];
for (const [i, element] of rgb.entries()) {
const chan = element / 255;
lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
}
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
},
contrast(color2) {
// http://www.w3.org/TR/WCAG20/#contrast-ratiodef
const lum1 = this.luminosity();
const lum2 = color2.luminosity();
if (lum1 > lum2) {
return (lum1 + 0.05) / (lum2 + 0.05);
}
return (lum2 + 0.05) / (lum1 + 0.05);
},
level(color2) {
// https://www.w3.org/TR/WCAG/#contrast-enhanced
const contrastRatio = this.contrast(color2);
if (contrastRatio >= 7) {
return 'AAA';
}
return (contrastRatio >= 4.5) ? 'AA' : '';
},
isDark() {
// YIQ equation from http://24ways.org/2010/calculating-color-contrast
const rgb = this.rgb().color;
const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
return yiq < 128;
},
isLight() {
return !this.isDark();
},
negate() {
const rgb = this.rgb();
for (let i = 0; i < 3; i++) {
rgb.color[i] = 255 - rgb.color[i];
}
return rgb;
},
lighten(ratio) {
const hsl = this.hsl();
hsl.color[2] += hsl.color[2] * ratio;
return hsl;
},
darken(ratio) {
const hsl = this.hsl();
hsl.color[2] -= hsl.color[2] * ratio;
return hsl;
},
saturate(ratio) {
const hsl = this.hsl();
hsl.color[1] += hsl.color[1] * ratio;
return hsl;
},
desaturate(ratio) {
const hsl = this.hsl();
hsl.color[1] -= hsl.color[1] * ratio;
return hsl;
},
whiten(ratio) {
const hwb = this.hwb();
hwb.color[1] += hwb.color[1] * ratio;
return hwb;
},
blacken(ratio) {
const hwb = this.hwb();
hwb.color[2] += hwb.color[2] * ratio;
return hwb;
},
grayscale() {
// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
const rgb = this.rgb().color;
const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
return Color.rgb(value, value, value);
},
fade(ratio) {
return this.alpha(this.valpha - (this.valpha * ratio));
},
opaquer(ratio) {
return this.alpha(this.valpha + (this.valpha * ratio));
},
rotate(degrees) {
const hsl = this.hsl();
let hue = hsl.color[0];
hue = (hue + degrees) % 360;
hue = hue < 0 ? 360 + hue : hue;
hsl.color[0] = hue;
return hsl;
},
mix(mixinColor, weight) {
// Ported from sass implementation in C
// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
if (!mixinColor || !mixinColor.rgb) {
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
}
const color1 = mixinColor.rgb();
const color2 = this.rgb();
const p = weight === undefined ? 0.5 : weight;
const w = 2 * p - 1;
const a = color1.alpha() - color2.alpha();
const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;
const w2 = 1 - w1;
return Color.rgb(
w1 * color1.red() + w2 * color2.red(),
w1 * color1.green() + w2 * color2.green(),
w1 * color1.blue() + w2 * color2.blue(),
color1.alpha() * p + color2.alpha() * (1 - p));
},
};
// Model conversion methods and static constructors
for (const model of Object.keys(convert)) {
if (skippedModels.includes(model)) {
continue;
}
const {channels} = convert[model];
// Conversion methods
Color.prototype[model] = function (...args) {
if (this.model === model) {
return new Color(this);
}
if (args.length > 0) {
return new Color(args, model);
}
return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);
};
// 'static' construction methods
Color[model] = function (...args) {
let color = args[0];
if (typeof color === 'number') {
color = zeroArray(args, channels);
}
return new Color(color, model);
};
}
function roundTo(number, places) {
return Number(number.toFixed(places));
}
function roundToPlace(places) {
return function (number) {
return roundTo(number, places);
};
}
function getset(model, channel, modifier) {
model = Array.isArray(model) ? model : [model];
for (const m of model) {
(limiters[m] || (limiters[m] = []))[channel] = modifier;
}
model = model[0];
return function (value) {
let result;
if (value !== undefined) {
if (modifier) {
value = modifier(value);
}
result = this[model]();
result.color[channel] = value;
return result;
}
result = this[model]().color[channel];
if (modifier) {
result = modifier(result);
}
return result;
};
}
function maxfn(max) {
return function (v) {
return Math.max(0, Math.min(max, v));
};
}
function assertArray(value) {
return Array.isArray(value) ? value : [value];
}
function zeroArray(array, length) {
for (let i = 0; i < length; i++) {
if (typeof array[i] !== 'number') {
array[i] = 0;
}
}
return array;
}
module.exports = Color;
{
"_from": "color@^4.2.3",
"_id": "color@4.2.3",
"_inBundle": false,
"_integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
"_location": "/color",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "color@^4.2.3",
"name": "color",
"escapedName": "color",
"rawSpec": "^4.2.3",
"saveSpec": null,
"fetchSpec": "^4.2.3"
},
"_requiredBy": [
"/@react-navigation/bottom-tabs"
],
"_resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
"_shasum": "d781ecb5e57224ee43ea9627560107c0e0c6463a",
"_spec": "color@^4.2.3",
"_where": "/Users/scloady/Desktop/proyecto_TDDM/node_modules/@react-navigation/bottom-tabs",
"authors": [
"Josh Junon <josh@junon.me>",
"Heather Arthur <fayearthur@gmail.com>",
"Maxime Thirouin"
],
"bugs": {
"url": "https://github.com/Qix-/color/issues"
},
"bundleDependencies": false,
"dependencies": {
"color-convert": "^2.0.1",
"color-string": "^1.9.0"
},
"deprecated": false,
"description": "Color conversion and manipulation with CSS string support",
"devDependencies": {
"mocha": "9.0.2",
"xo": "0.42.0"
},
"engines": {
"node": ">=12.5.0"
},
"files": [
"LICENSE",
"index.js"
],
"homepage": "https://github.com/Qix-/color#readme",
"keywords": [
"color",
"colour",
"css"
],
"license": "MIT",
"name": "color",
"repository": {
"type": "git",
"url": "git+https://github.com/Qix-/color.git"
},
"scripts": {
"pretest": "xo",
"test": "mocha"
},
"sideEffects": false,
"version": "4.2.3",
"xo": {
"rules": {
"no-cond-assign": 0,
"new-cap": 0,
"unicorn/prefer-module": 0,
"no-mixed-operators": 0,
"complexity": 0,
"unicorn/numeric-separators-style": 0
}
}
}
The MIT License (MIT)
Copyright (c) 2015 Josh Junon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# simple-swizzle [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-simple-swizzle.svg?style=flat-square)](https://travis-ci.org/Qix-/node-simple-swizzle) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-simple-swizzle.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-simple-swizzle)
> [Swizzle](https://en.wikipedia.org/wiki/Swizzling_(computer_graphics)) your function arguments; pass in mixed arrays/values and get a clean array
## Usage
```js
var swizzle = require('simple-swizzle');
function myFunc() {
var args = swizzle(arguments);
// ...
return args;
}
myFunc(1, [2, 3], 4); // [1, 2, 3, 4]
myFunc(1, 2, 3, 4); // [1, 2, 3, 4]
myFunc([1, 2, 3, 4]); // [1, 2, 3, 4]
```
Functions can also be wrapped to automatically swizzle arguments and be passed
the resulting array.
```js
var swizzle = require('simple-swizzle');
var swizzledFn = swizzle.wrap(function (args) {
// ...
return args;
});
swizzledFn(1, [2, 3], 4); // [1, 2, 3, 4]
swizzledFn(1, 2, 3, 4); // [1, 2, 3, 4]
swizzledFn([1, 2, 3, 4]); // [1, 2, 3, 4]
```
## License
Licensed under the [MIT License](http://opensource.org/licenses/MIT).
You can find a copy of it in [LICENSE](LICENSE).
'use strict';
var isArrayish = require('is-arrayish');
var concat = Array.prototype.concat;
var slice = Array.prototype.slice;
var swizzle = module.exports = function swizzle(args) {
var results = [];
for (var i = 0, len = args.length; i < len; i++) {
var arg = args[i];
if (isArrayish(arg)) {
// http://jsperf.com/javascript-array-concat-vs-push/98
results = concat.call(results, slice.call(arg));
} else {
results.push(arg);
}
}
return results;
};
swizzle.wrap = function (fn) {
return function () {
return fn(swizzle(arguments));
};
};
The MIT License (MIT)
Copyright (c) 2015 JD Ballard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish)
> Determines if an object can be used like an Array
## Example
```javascript
var isArrayish = require('is-arrayish');
isArrayish([]); // true
isArrayish({__proto__: []}); // true
isArrayish({}); // false
isArrayish({length:10}); // false
```
## License
Licensed under the [MIT License](http://opensource.org/licenses/MIT).
You can find a copy of it in [LICENSE](LICENSE).
module.exports = function isArrayish(obj) {
if (!obj || typeof obj === 'string') {
return false;
}
return obj instanceof Array || Array.isArray(obj) ||
(obj.length >= 0 && (obj.splice instanceof Function ||
(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));
};
{
"_from": "is-arrayish@^0.3.1",
"_id": "is-arrayish@0.3.2",
"_inBundle": false,
"_integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
"_location": "/simple-swizzle/is-arrayish",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-arrayish@^0.3.1",
"name": "is-arrayish",
"escapedName": "is-arrayish",
"rawSpec": "^0.3.1",
"saveSpec": null,
"fetchSpec": "^0.3.1"
},
"_requiredBy": [
"/simple-swizzle"
],
"_resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"_shasum": "4574a2ae56f7ab206896fb431eaeed066fdf8f03",
"_spec": "is-arrayish@^0.3.1",
"_where": "/Users/scloady/Desktop/proyecto_TDDM/node_modules/simple-swizzle",
"author": {
"name": "Qix",
"url": "http://github.com/qix-"
},
"bugs": {
"url": "https://github.com/qix-/node-is-arrayish/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Determines if an object can be used as an array",
"devDependencies": {
"@zeit/eslint-config-node": "^0.3.0",
"@zeit/git-hooks": "^0.1.4",
"coffeescript": "^2.3.1",
"coveralls": "^3.0.1",
"eslint": "^4.19.1",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"should": "^13.2.1"
},
"eslintConfig": {
"extends": [
"@zeit/eslint-config-node"
]
},
"git": {
"pre-commit": "lint-staged"
},
"homepage": "https://github.com/qix-/node-is-arrayish#readme",
"keywords": [
"is",
"array",
"duck",
"type",
"arrayish",
"similar",
"proto",
"prototype",
"type"
],
"license": "MIT",
"name": "is-arrayish",
"repository": {
"type": "git",
"url": "git+https://github.com/qix-/node-is-arrayish.git"
},
"scripts": {
"lint": "zeit-eslint --ext .jsx,.js .",
"lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint",
"test": "mocha --require coffeescript/register ./test/**/*.coffee"
},
"version": "0.3.2"
}
Arguments:
/Users/junon/n/bin/node /Users/junon/.yarn/bin/yarn.js test
PATH:
/Users/junon/.yarn/bin:/Users/junon/.config/yarn/global/node_modules/.bin:/Users/junon/perl5/bin:/Users/junon/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/junon/bin:/Users/junon/.local/bin:/src/.go/bin:/src/llvm/llvm/build/bin:/Users/junon/Library/Android/sdk/platform-tools:/Users/junon/n/bin:/usr/local/texlive/2017/bin/x86_64-darwin/
Yarn version:
1.5.1
Node version:
9.6.1
Platform:
darwin x64
npm manifest:
{
"name": "is-arrayish",
"description": "Determines if an object can be used as an array",
"version": "0.3.1",
"author": "Qix (http://github.com/qix-)",
"keywords": [
"is",
"array",
"duck",
"type",
"arrayish",
"similar",
"proto",
"prototype",
"type"
],
"license": "MIT",
"scripts": {
"test": "mocha --require coffeescript/register",
"lint": "zeit-eslint --ext .jsx,.js .",
"lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint"
},
"repository": {
"type": "git",
"url": "https://github.com/qix-/node-is-arrayish.git"
},
"devDependencies": {
"@zeit/eslint-config-node": "^0.3.0",
"@zeit/git-hooks": "^0.1.4",
"coffeescript": "^2.3.1",
"coveralls": "^3.0.1",
"eslint": "^4.19.1",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"should": "^13.2.1"
},
"eslintConfig": {
"extends": [
"@zeit/eslint-config-node"
]
},
"git": {
"pre-commit": "lint-staged"
}
}
yarn manifest:
No manifest
Lockfile:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@zeit/eslint-config-base@0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@zeit/eslint-config-base/-/eslint-config-base-0.3.0.tgz#32a58c3e52eca4025604758cb4591f3d28e22fb4"
dependencies:
arg "^1.0.0"
chalk "^2.3.0"
"@zeit/eslint-config-node@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@zeit/eslint-config-node/-/eslint-config-node-0.3.0.tgz#6e328328f366f66c2a0549a69131bbcd9735f098"
dependencies:
"@zeit/eslint-config-base" "0.3.0"
"@zeit/git-hooks@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@zeit/git-hooks/-/git-hooks-0.1.4.tgz#70583db5dd69726a62c7963520e67f2c3a33cc5f"
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
abbrev@1.0.x:
version "1.0.9"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
acorn-jsx@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
dependencies:
acorn "^3.0.4"
acorn@^3.0.4:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
acorn@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
ajv-keywords@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0:
version "5.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
dependencies:
co "^4.6.0"
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
dependencies:
kind-of "^3.0.2"
longest "^1.0.1"
repeat-string "^1.5.2"
amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
ansi-escapes@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies:
color-convert "^1.9.0"
arg@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.1.tgz#892a26d841bd5a64880bbc8f73dd64a705910ca3"
argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
dependencies:
sprintf-js "~1.0.2"
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
dependencies:
array-uniq "^1.0.1"
array-uniq@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
arrify@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
asn1@~0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
async@1.x, async@^1.4.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
aws4@^1.6.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289"
babel-code-frame@^6.22.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
dependencies:
chalk "^1.1.3"
esutils "^2.0.2"
js-tokens "^3.0.2"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
bcrypt-pbkdf@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
dependencies:
tweetnacl "^0.14.3"
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
browser-stdout@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
buffer-from@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04"
caller-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
dependencies:
callsites "^0.2.0"
callsites@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
camelcase@^1.0.2:
version "1.2.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
center-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
dependencies:
align-text "^0.1.3"
lazy-cache "^1.0.3"
chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
circular-json@^0.3.1:
version "0.3.3"
resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
dependencies:
restore-cursor "^2.0.0"
cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
cliui@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
dependencies:
center-align "^0.1.1"
right-align "^0.1.1"
wordwrap "0.0.2"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
coffeescript@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.1.tgz#a25f69c251d25805c9842e57fc94bfc453ef6aed"
color-convert@^1.9.0:
version "1.9.2"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147"
dependencies:
color-name "1.1.1"
color-name@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689"
combined-stream@1.0.6, combined-stream@~1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
dependencies:
delayed-stream "~1.0.0"
commander@2.15.1:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
concat-stream@^1.6.0:
version "1.6.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
dependencies:
buffer-from "^1.0.0"
inherits "^2.0.3"
readable-stream "^2.2.2"
typedarray "^0.0.6"
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
coveralls@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2"
dependencies:
js-yaml "^3.6.1"
lcov-parse "^0.0.10"
log-driver "^1.2.5"
minimist "^1.2.0"
request "^2.79.0"
cross-spawn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
dependencies:
lru-cache "^4.0.1"
shebang-command "^1.2.0"
which "^1.2.9"
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
dependencies:
assert-plus "^1.0.0"
debug@3.1.0, debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
ms "2.0.0"
decamelize@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
del@^2.0.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
dependencies:
globby "^5.0.0"
is-path-cwd "^1.0.0"
is-path-in-cwd "^1.0.0"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"
rimraf "^2.2.8"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
diff@3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
doctrine@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
dependencies:
esutils "^2.0.2"
ecc-jsbn@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
dependencies:
jsbn "~0.1.0"
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
escodegen@1.8.x:
version "1.8.1"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018"
dependencies:
esprima "^2.7.1"
estraverse "^1.9.1"
esutils "^2.0.2"
optionator "^0.8.1"
optionalDependencies:
source-map "~0.2.0"
eslint-scope@^3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
eslint@^4.19.1:
version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
chalk "^2.1.0"
concat-stream "^1.6.0"
cross-spawn "^5.1.0"
debug "^3.1.0"
doctrine "^2.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.4"
esquery "^1.0.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
functional-red-black-tree "^1.0.1"
glob "^7.1.2"
globals "^11.0.1"
ignore "^3.3.3"
imurmurhash "^0.1.4"
inquirer "^3.0.6"
is-resolvable "^1.0.0"
js-yaml "^3.9.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0"
lodash "^4.17.4"
minimatch "^3.0.2"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
optionator "^0.8.2"
path-is-inside "^1.0.2"
pluralize "^7.0.0"
progress "^2.0.0"
regexpp "^1.0.1"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
strip-json-comments "~2.0.1"
table "4.0.2"
text-table "~0.2.0"
espree@^3.5.4:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies:
acorn "^5.5.0"
acorn-jsx "^3.0.0"
esprima@2.7.x, esprima@^2.7.1:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
esquery@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
dependencies:
estraverse "^4.0.0"
esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
dependencies:
estraverse "^4.1.0"
estraverse@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
extend@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
external-editor@^2.0.4:
version "2.2.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
dependencies:
chardet "^0.4.0"
iconv-lite "^0.4.17"
tmp "^0.0.33"
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
figures@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
dependencies:
escape-string-regexp "^1.0.5"
file-entry-cache@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
dependencies:
flat-cache "^1.2.1"
object-assign "^4.0.1"
flat-cache@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
dependencies:
circular-json "^0.3.1"
del "^2.0.2"
graceful-fs "^4.1.2"
write "^0.2.1"
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.3.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
dependencies:
asynckit "^0.4.0"
combined-stream "1.0.6"
mime-types "^2.1.12"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
getpass@^0.1.1:
version "0.1.7"
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
dependencies:
assert-plus "^1.0.0"
glob@7.1.2, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^5.0.15:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
globals@^11.0.1:
version "11.5.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642"
globby@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
dependencies:
array-union "^1.0.1"
arrify "^1.0.0"
glob "^7.0.3"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"
graceful-fs@^4.1.2:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
handlebars@^4.0.1:
version "4.0.11"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
dependencies:
async "^1.4.0"
optimist "^0.6.1"
source-map "^0.4.4"
optionalDependencies:
uglify-js "^2.6"
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
har-validator@~5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
dependencies:
ajv "^5.1.0"
har-schema "^2.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
has-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
he@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
dependencies:
assert-plus "^1.0.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
iconv-lite@^0.4.17:
version "0.4.23"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
dependencies:
safer-buffer ">= 2.1.2 < 3"
ignore@^3.3.3:
version "3.3.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b"
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@^2.0.3, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
inquirer@^3.0.6:
version "3.3.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
dependencies:
ansi-escapes "^3.0.0"
chalk "^2.0.0"
cli-cursor "^2.1.0"
cli-width "^2.0.0"
external-editor "^2.0.4"
figures "^2.0.0"
lodash "^4.3.0"
mute-stream "0.0.7"
run-async "^2.2.0"
rx-lite "^4.0.8"
rx-lite-aggregates "^4.0.8"
string-width "^2.1.0"
strip-ansi "^4.0.0"
through "^2.3.6"
is-buffer@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
is-path-cwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
is-path-in-cwd@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
dependencies:
is-path-inside "^1.0.0"
is-path-inside@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
dependencies:
path-is-inside "^1.0.1"
is-promise@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
is-resolvable@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
istanbul@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
dependencies:
abbrev "1.0.x"
async "1.x"
escodegen "1.8.x"
esprima "2.7.x"
glob "^5.0.15"
handlebars "^4.0.1"
js-yaml "3.x"
mkdirp "0.5.x"
nopt "3.x"
once "1.x"
resolve "1.1.x"
supports-color "^3.1.0"
which "^1.1.1"
wordwrap "^1.0.0"
js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.9.1:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
json-schema "0.2.3"
verror "1.10.0"
kind-of@^3.0.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
dependencies:
is-buffer "^1.1.5"
lazy-cache@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
lcov-parse@^0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
dependencies:
prelude-ls "~1.1.2"
type-check "~0.3.2"
lodash@^4.17.4, lodash@^4.3.0:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
log-driver@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
lru-cache@^4.0.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
mime-db@~1.33.0:
version "1.33.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
mime-types@^2.1.12, mime-types@~2.1.17:
version "2.1.18"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8"
dependencies:
mime-db "~1.33.0"
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
minimist@~0.0.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
minimist "0.0.8"
mocha@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
dependencies:
browser-stdout "1.3.1"
commander "2.15.1"
debug "3.1.0"
diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
growl "1.10.5"
he "1.1.1"
minimatch "3.0.4"
mkdirp "0.5.1"
supports-color "5.4.0"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
nopt@3.x:
version "3.0.6"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
dependencies:
abbrev "1"
oauth-sign@~0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
object-assign@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
once@1.x, once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
onetime@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
dependencies:
mimic-fn "^1.0.0"
optimist@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
dependencies:
minimist "~0.0.1"
wordwrap "~0.0.2"
optionator@^0.8.1, optionator@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
dependencies:
deep-is "~0.1.3"
fast-levenshtein "~2.0.4"
levn "~0.3.0"
prelude-ls "~1.1.2"
type-check "~0.3.2"
wordwrap "~1.0.0"
os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
path-is-inside@^1.0.1, path-is-inside@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
dependencies:
pinkie "^2.0.0"
pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
pluralize@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
progress@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
qs@~6.5.1:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
readable-stream@^2.2.2:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~2.0.0"
safe-buffer "~5.1.1"
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
regexpp@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
repeat-string@^1.5.2:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
request@^2.79.0:
version "2.87.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e"
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.6.0"
caseless "~0.12.0"
combined-stream "~1.0.5"
extend "~3.0.1"
forever-agent "~0.6.1"
form-data "~2.3.1"
har-validator "~5.0.3"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.17"
oauth-sign "~0.8.2"
performance-now "^2.1.0"
qs "~6.5.1"
safe-buffer "^5.1.1"
tough-cookie "~2.3.3"
tunnel-agent "^0.6.0"
uuid "^3.1.0"
require-uncached@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
dependencies:
caller-path "^0.1.0"
resolve-from "^1.0.0"
resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
resolve@1.1.x:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
dependencies:
onetime "^2.0.0"
signal-exit "^3.0.2"
right-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
dependencies:
align-text "^0.1.1"
rimraf@^2.2.8:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies:
glob "^7.0.5"
run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
dependencies:
is-promise "^2.1.0"
rx-lite-aggregates@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
dependencies:
rx-lite "*"
rx-lite@*, rx-lite@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
semver@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
dependencies:
shebang-regex "^1.0.0"
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
should-equal@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3"
dependencies:
should-type "^1.4.0"
should-format@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1"
dependencies:
should-type "^1.3.0"
should-type-adaptors "^1.0.1"
should-type-adaptors@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a"
dependencies:
should-type "^1.3.0"
should-util "^1.0.0"
should-type@^1.3.0, should-type@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3"
should-util@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063"
should@^13.2.1:
version "13.2.1"
resolved "https://registry.yarnpkg.com/should/-/should-13.2.1.tgz#84e6ebfbb145c79e0ae42307b25b3f62dcaf574e"
dependencies:
should-equal "^2.0.0"
should-format "^3.0.3"
should-type "^1.4.0"
should-type-adaptors "^1.0.1"
should-util "^1.0.0"
signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
slice-ansi@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"
dependencies:
is-fullwidth-code-point "^2.0.0"
source-map@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
dependencies:
amdefine ">=0.0.4"
source-map@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
dependencies:
amdefine ">=0.0.4"
source-map@~0.5.1:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
sshpk@^1.7.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
dashdash "^1.12.0"
getpass "^0.1.1"
safer-buffer "^2.0.2"
optionalDependencies:
bcrypt-pbkdf "^1.0.0"
ecc-jsbn "~0.1.1"
jsbn "~0.1.0"
tweetnacl "~0.14.0"
string-width@^2.1.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
dependencies:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
dependencies:
safe-buffer "~5.1.0"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
dependencies:
ansi-regex "^3.0.0"
strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
supports-color@5.4.0, supports-color@^5.3.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
has-flag "^3.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
supports-color@^3.1.0:
version "3.2.3"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
dependencies:
has-flag "^1.0.0"
table@4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
dependencies:
ajv "^5.2.3"
ajv-keywords "^2.1.0"
chalk "^2.1.0"
lodash "^4.17.4"
slice-ansi "1.0.0"
string-width "^2.1.1"
text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
through@^2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
dependencies:
os-tmpdir "~1.0.2"
tough-cookie@~2.3.3:
version "2.3.4"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
dependencies:
punycode "^1.4.1"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
dependencies:
safe-buffer "^5.0.1"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
type-check@~0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
dependencies:
prelude-ls "~1.1.2"
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
uglify-js@^2.6:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
dependencies:
source-map "~0.5.1"
yargs "~3.10.0"
optionalDependencies:
uglify-to-browserify "~1.0.0"
uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
uuid@^3.1.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
which@^1.1.1, which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
dependencies:
isexe "^2.0.0"
window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
wordwrap@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
wordwrap@^1.0.0, wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
write@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
dependencies:
mkdirp "^0.5.1"
yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
dependencies:
camelcase "^1.0.2"
cliui "^2.1.0"
decamelize "^1.0.0"
window-size "0.1.0"
Trace:
Error: Command failed.
Exit code: 1
Command: sh
Arguments: -c mocha --require coffeescript/register
Directory: /src/qix-/node-is-arrayish
Output:
at ProcessTermError.MessageError (/Users/junon/.yarn/lib/cli.js:186:110)
at new ProcessTermError (/Users/junon/.yarn/lib/cli.js:226:113)
at ChildProcess.<anonymous> (/Users/junon/.yarn/lib/cli.js:30281:17)
at ChildProcess.emit (events.js:127:13)
at maybeClose (internal/child_process.js:933:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
{
"_from": "simple-swizzle@^0.2.2",
"_id": "simple-swizzle@0.2.2",
"_inBundle": false,
"_integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
"_location": "/simple-swizzle",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "simple-swizzle@^0.2.2",
"name": "simple-swizzle",
"escapedName": "simple-swizzle",
"rawSpec": "^0.2.2",
"saveSpec": null,
"fetchSpec": "^0.2.2"
},
"_requiredBy": [
"/color-string"
],
"_resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"_shasum": "a4da6b635ffcccca33f70d17cb92592de95e557a",
"_spec": "simple-swizzle@^0.2.2",
"_where": "/Users/scloady/Desktop/proyecto_TDDM/node_modules/color-string",
"author": {
"name": "Qix",
"url": "http://github.com/qix-"
},
"bugs": {
"url": "https://github.com/qix-/node-simple-swizzle/issues"
},
"bundleDependencies": false,
"dependencies": {
"is-arrayish": "^0.3.1"
},
"deprecated": false,
"description": "Simply swizzle your arguments",
"devDependencies": {
"coffee-script": "^1.9.3",
"coveralls": "^2.11.2",
"istanbul": "^0.3.17",
"mocha": "^2.2.5",
"should": "^7.0.1",
"xo": "^0.7.1"
},
"files": [
"index.js"
],
"homepage": "https://github.com/qix-/node-simple-swizzle#readme",
"keywords": [
"argument",
"arguments",
"swizzle",
"swizzling",
"parameter",
"parameters",
"mixed",
"array"
],
"license": "MIT",
"name": "simple-swizzle",
"repository": {
"type": "git",
"url": "git+https://github.com/qix-/node-simple-swizzle.git"
},
"scripts": {
"pretest": "xo",
"test": "mocha --compilers coffee:coffee-script/register"
},
"version": "0.2.2"
}
......@@ -1874,6 +1874,16 @@
"resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-2.0.0.tgz",
"integrity": "sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ=="
},
"@react-navigation/bottom-tabs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-6.5.3.tgz",
"integrity": "sha512-ZA2Ko9fNwNaaSNn7738KpEk8Doi+yjRfTg8Wb/WvduIaK/28qNLAYWBCUEVjBC55y/9zJOzwc4R8Av2J2MG/4g==",
"requires": {
"@react-navigation/elements": "^1.3.13",
"color": "^4.2.3",
"warn-once": "^0.1.0"
}
},
"@react-navigation/core": {
"version": "6.4.6",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.4.6.tgz",
......@@ -2926,6 +2936,15 @@
"object-visit": "^1.0.0"
}
},
"color": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
"requires": {
"color-convert": "^2.0.1",
"color-string": "^1.9.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
......@@ -2939,6 +2958,15 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"color-string": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
"requires": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
}
},
"colorette": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
......@@ -7938,6 +7966,21 @@
"plist": "^3.0.5"
}
},
"simple-swizzle": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
"requires": {
"is-arrayish": "^0.3.1"
},
"dependencies": {
"is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
}
}
},
"sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
......
......@@ -10,6 +10,7 @@
"lint": "eslint ."
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.5.3",
"@react-navigation/native": "^6.1.2",
"@react-navigation/native-stack": "^6.9.8",
"react": "17.0.2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment