diff --git a/example/src/Examples/RadioButtonGroupExample.tsx b/example/src/Examples/RadioButtonGroupExample.tsx index 4790c8dd42..5d245afb89 100644 --- a/example/src/Examples/RadioButtonGroupExample.tsx +++ b/example/src/Examples/RadioButtonGroupExample.tsx @@ -4,10 +4,11 @@ import { RadioButton, Paragraph, List, useTheme } from 'react-native-paper'; import ScreenWrapper from '../ScreenWrapper'; const RadioButtonGroupExample = () => { - const [value, setValue] = React.useState('first'); - const [value2, setValue2] = React.useState('first'); + const [value, setValue] = React.useState('first'); + const [value2, setValue2] = React.useState('first'); const { colors } = useTheme(); + return ( diff --git a/example/src/Examples/TextExample.tsx b/example/src/Examples/TextExample.tsx index 738b56f63e..af23d17730 100644 --- a/example/src/Examples/TextExample.tsx +++ b/example/src/Examples/TextExample.tsx @@ -1,22 +1,87 @@ import * as React from 'react'; -import { StyleSheet } from 'react-native'; +import { StyleSheet, View } from 'react-native'; import { Caption, Headline, Paragraph, Subheading, + Text, Title, } from 'react-native-paper'; import ScreenWrapper from '../ScreenWrapper'; +const SectionHeader = ({ children }: React.PropsWithChildren<{}>) => { + return ( + + {children} + + ); +}; + const TextExample = () => { return ( - - Caption - Paragraph - Subheading - Title - Headline + + + Old text components: + + Caption + Paragraph + Subheading + Title + Headline + + Text component: + + + Display Large + + + Display Medium + + + Display small + + + + Headline Large + + + Headline Medium + + + Headline Small + + + + Title Large + + + Title Medium + + + Title Small + + + + Body Large + + + Body Medium + + + Body Small + + + + Label Large + + + Label Medium + + + Label Small + + ); }; @@ -24,6 +89,11 @@ const TextExample = () => { TextExample.title = 'Typography'; const styles = StyleSheet.create({ + sectionHeader: { + marginTop: 16, + marginBottom: 8, + opacity: 0.6, + }, container: { padding: 16, }, diff --git a/example/src/ScreenWrapper.tsx b/example/src/ScreenWrapper.tsx index 7103521924..5c95c19d9e 100644 --- a/example/src/ScreenWrapper.tsx +++ b/example/src/ScreenWrapper.tsx @@ -32,7 +32,7 @@ export default function ScreenWrapper({ styles.container, { backgroundColor: isV3 - ? md('md.sys.color.background') + ? (md('md.sys.color.background') as string) : colors?.background, paddingBottom: insets.bottom, paddingLeft: insets.left, diff --git a/example/src/index.tsx b/example/src/index.tsx index a72cbda5c6..a5404788a0 100644 --- a/example/src/index.tsx +++ b/example/src/index.tsx @@ -9,8 +9,8 @@ import { createDrawerNavigator } from '@react-navigation/drawer'; import { Provider as PaperProvider, DarkTheme, - DefaultTheme, - Theme, + DefaultTheme as LightTheme, + ThemeBase, } from 'react-native-paper'; import App from './RootNavigator'; import DrawerItems from './DrawerItems'; @@ -34,39 +34,6 @@ declare global { const PERSISTENCE_KEY = 'NAVIGATION_STATE'; const PREFERENCES_KEY = 'APP_PREFERENCES'; -const CustomDarkTheme = { - ...DarkTheme, - colors: { - ...DarkTheme.colors, - customColor: '#BADA55', - }, - fonts: { - ...DarkTheme.fonts, - superLight: { ...DarkTheme.fonts['light'] }, - }, - animation: { - ...DarkTheme.animation, - customProperty: 1, - }, -}; - -const CustomDefaultTheme = { - ...DefaultTheme, - colors: { - ...DefaultTheme.colors, - customColor: '#BADA55', - }, - fonts: { - ...DefaultTheme.fonts, - superLight: { ...DefaultTheme.fonts['light'] }, - }, - userDefinedThemeProperty: '', - animation: { - ...DefaultTheme.animation, - customProperty: 1, - }, -}; - export const PreferencesContext = React.createContext(null); const DrawerContent = () => { @@ -94,7 +61,7 @@ export default function PaperExample() { InitialState | undefined >(); - const [theme, setTheme] = React.useState(CustomDefaultTheme); + const [theme, setTheme] = React.useState(LightTheme); const [rtl, setRtl] = React.useState(I18nManager.isRTL); React.useEffect(() => { @@ -124,9 +91,7 @@ export default function PaperExample() { if (preferences) { // eslint-disable-next-line react/no-did-mount-set-state - setTheme( - preferences.theme === 'dark' ? CustomDarkTheme : CustomDefaultTheme - ); + setTheme(preferences.theme === 'dark' ? DarkTheme : LightTheme); if (typeof preferences.rtl === 'boolean') { setRtl(preferences.rtl); @@ -166,9 +131,7 @@ export default function PaperExample() { const preferences = React.useMemo( () => ({ toggleTheme: () => - setTheme((theme) => - theme === CustomDefaultTheme ? CustomDarkTheme : CustomDefaultTheme - ), + setTheme((theme) => (theme === LightTheme ? DarkTheme : LightTheme)), toggleRtl: () => setRtl((rtl) => !rtl), rtl, theme, diff --git a/src/components/Card/CardTitle.tsx b/src/components/Card/CardTitle.tsx index f5e2e89711..251803258b 100644 --- a/src/components/Card/CardTitle.tsx +++ b/src/components/Card/CardTitle.tsx @@ -8,9 +8,9 @@ import { } from 'react-native'; import { withTheme } from '../../core/theming'; -import Caption from './../Typography/Caption'; -import Title from './../Typography/Title'; import type { Theme } from '../../types'; +import Caption from '../Typography/v2/Caption'; +import Title from '../Typography/v2/Title'; type Props = React.ComponentPropsWithRef & { /** diff --git a/src/components/Checkbox/CheckboxAndroid.tsx b/src/components/Checkbox/CheckboxAndroid.tsx index 54e1153932..a45a3dcde3 100644 --- a/src/components/Checkbox/CheckboxAndroid.tsx +++ b/src/components/Checkbox/CheckboxAndroid.tsx @@ -101,10 +101,10 @@ const CheckboxAndroid = ({ const checked = status === 'checked'; const indeterminate = status === 'indeterminate'; - const checkedColor = rest.color || theme.colors?.accent; + const checkedColor = rest.color || theme?.colors?.accent; const uncheckedColor = rest.uncheckedColor || - color(theme.colors?.text) + color(theme?.colors?.text) .alpha(theme.dark ? 0.7 : 0.54) .rgb() .string(); @@ -112,8 +112,8 @@ const CheckboxAndroid = ({ let rippleColor, checkboxColor; if (disabled) { - rippleColor = color(theme.colors?.text).alpha(0.16).rgb().string(); - checkboxColor = theme.colors?.disabled; + rippleColor = color(theme?.colors?.text).alpha(0.16).rgb().string(); + checkboxColor = theme?.colors?.disabled; } else { rippleColor = color(checkedColor).fade(0.32).rgb().string(); checkboxColor = checked ? checkedColor : uncheckedColor; diff --git a/src/components/Checkbox/CheckboxIOS.tsx b/src/components/Checkbox/CheckboxIOS.tsx index 737098f032..744af781ca 100644 --- a/src/components/Checkbox/CheckboxIOS.tsx +++ b/src/components/Checkbox/CheckboxIOS.tsx @@ -62,13 +62,13 @@ const CheckboxIOS = ({ const indeterminate = status === 'indeterminate'; const checkedColor = disabled - ? theme.colors?.disabled - : rest.color || theme.colors?.accent; + ? theme?.colors?.disabled + : rest.color || theme?.colors?.accent; let rippleColor; if (disabled) { - rippleColor = color(theme.colors?.text).alpha(0.16).rgb().string(); + rippleColor = color(theme?.colors?.text).alpha(0.16).rgb().string(); } else { rippleColor = color(checkedColor).fade(0.32).rgb().string(); } diff --git a/src/components/DataTable/DataTablePagination.tsx b/src/components/DataTable/DataTablePagination.tsx index 9cd28f89b0..4e455f4103 100644 --- a/src/components/DataTable/DataTablePagination.tsx +++ b/src/components/DataTable/DataTablePagination.tsx @@ -82,6 +82,7 @@ const PaginationControls = ({ showFastPaginationControls, }: PaginationControlsProps) => { const { colors } = useTheme(); + return ( <> {showFastPaginationControls ? ( @@ -269,7 +270,7 @@ const DataTablePagination = ({ selectPageDropdownAccessibilityLabel, ...rest }: Props) => { - const labelColor = color(theme.colors?.text).alpha(0.6).rgb().string(); + const labelColor = color(theme?.colors?.text).alpha(0.6).rgb().string(); return ( diff --git a/src/components/Dialog/DialogTitle.tsx b/src/components/Dialog/DialogTitle.tsx index ff7a641e20..3f971178ad 100644 --- a/src/components/Dialog/DialogTitle.tsx +++ b/src/components/Dialog/DialogTitle.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { StyleSheet, StyleProp, TextStyle } from 'react-native'; -import Title from '../Typography/Title'; +import Title from '../Typography/v2/Title'; import { withTheme } from '../../core/theming'; import type { Theme } from '../../types'; diff --git a/src/components/FAB/AnimatedFAB/AnimatedFAB.tsx b/src/components/FAB/AnimatedFAB/AnimatedFAB.tsx index f77dfe380a..d64bd0c6da 100644 --- a/src/components/FAB/AnimatedFAB/AnimatedFAB.tsx +++ b/src/components/FAB/AnimatedFAB/AnimatedFAB.tsx @@ -24,7 +24,7 @@ import type { TextLayoutEventData, } from 'react-native'; import { white, black } from '../../../styles/themes/v2/colors'; -import AnimatedText from '../../Typography/AnimatedText'; +import AnimatedText from '../../Typography/v2/AnimatedText'; import { getCombinedStyles } from './utils'; export type AnimatedFABIconMode = 'static' | 'dynamic'; @@ -151,7 +151,7 @@ const AnimatedFAB = ({ .rgb() .string(); - const { backgroundColor = disabled ? disabledColor : theme.colors?.accent } = + const { backgroundColor = disabled ? disabledColor : theme?.colors?.accent } = StyleSheet.flatten(style) || {}; let foregroundColor: string; diff --git a/src/components/FAB/FAB.tsx b/src/components/FAB/FAB.tsx index 77f252d3ff..d09711f25f 100644 --- a/src/components/FAB/FAB.tsx +++ b/src/components/FAB/FAB.tsx @@ -163,7 +163,7 @@ const FAB = ({ .rgb() .string(); - const { backgroundColor = disabled ? disabledColor : theme.colors?.accent } = + const { backgroundColor = disabled ? disabledColor : theme?.colors?.accent } = (StyleSheet.flatten(style) || {}) as ViewStyle; let foregroundColor; diff --git a/src/components/HelperText.tsx b/src/components/HelperText.tsx index 39f40ac097..3f9e0a3ffd 100644 --- a/src/components/HelperText.tsx +++ b/src/components/HelperText.tsx @@ -7,7 +7,7 @@ import { TextStyle, LayoutChangeEvent, } from 'react-native'; -import AnimatedText from './Typography/AnimatedText'; +import AnimatedText from './Typography/v2/AnimatedText'; import { withTheme } from '../core/theming'; import type { $Omit, Theme } from '../types'; diff --git a/src/components/List/ListAccordion.tsx b/src/components/List/ListAccordion.tsx index 3cb408c304..4447669d30 100644 --- a/src/components/List/ListAccordion.tsx +++ b/src/components/List/ListAccordion.tsx @@ -169,8 +169,11 @@ const ListAccordion = ({ } }; - const titleColor = color(theme.colors?.text).alpha(0.87).rgb().string(); - const descriptionColor = color(theme.colors?.text).alpha(0.54).rgb().string(); + const titleColor = color(theme?.colors?.text).alpha(0.87).rgb().string(); + const descriptionColor = color(theme?.colors?.text) + .alpha(0.54) + .rgb() + .string(); const expandedInternal = expandedProp !== undefined ? expandedProp : expanded; @@ -189,7 +192,7 @@ const ListAccordion = ({ : handlePressAction; return ( - + { - const titleColor = color(theme.colors?.text).alpha(0.87).rgb().string(); + const titleColor = color(theme?.colors?.text).alpha(0.87).rgb().string(); return typeof title === 'function' ? ( title({ @@ -198,7 +198,10 @@ const ListItem = ({ ); }; - const descriptionColor = color(theme.colors?.text).alpha(0.54).rgb().string(); + const descriptionColor = color(theme?.colors?.text) + .alpha(0.54) + .rgb() + .string(); return ( { const checkedColor = disabled - ? theme.colors?.disabled + ? theme?.colors?.disabled : rest.color || theme.colors?.accent; let rippleColor: string; if (disabled) { - rippleColor = color(theme.colors?.text).alpha(0.16).rgb().string(); + rippleColor = color(theme?.colors?.text).alpha(0.16).rgb().string(); } else { rippleColor = color(checkedColor).fade(0.32).rgb().string(); } diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx index 83edf9d2e4..d40eade5ea 100644 --- a/src/components/Switch.tsx +++ b/src/components/Switch.tsx @@ -91,7 +91,7 @@ const Switch = ({ theme, ...rest }: Props) => { - const checkedColor = color || theme.colors?.accent; + const checkedColor = color || theme?.colors?.accent; const onTintColor = Platform.OS === 'ios' diff --git a/src/components/TextInput/Label/InputLabel.tsx b/src/components/TextInput/Label/InputLabel.tsx index a6b66c211b..1b536853b4 100644 --- a/src/components/TextInput/Label/InputLabel.tsx +++ b/src/components/TextInput/Label/InputLabel.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Animated, StyleSheet } from 'react-native'; -import AnimatedText from '../../Typography/AnimatedText'; +import AnimatedText from '../../Typography/v2/AnimatedText'; import type { InputLabelProps } from '../types'; diff --git a/src/components/TextInput/Label/LabelBackground.tsx b/src/components/TextInput/Label/LabelBackground.tsx index 91d5ec6b2d..2a1103c218 100644 --- a/src/components/TextInput/Label/LabelBackground.tsx +++ b/src/components/TextInput/Label/LabelBackground.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Animated, StyleSheet } from 'react-native'; -import AnimatedText from '../../Typography/AnimatedText'; +import AnimatedText from '../../Typography/v2/AnimatedText'; import type { LabelBackgroundProps } from '../types'; diff --git a/src/components/Typography/Text.tsx b/src/components/Typography/Text.tsx index f291b8aafa..a758f7a683 100644 --- a/src/components/Typography/Text.tsx +++ b/src/components/Typography/Text.tsx @@ -5,15 +5,12 @@ import { StyleProp, StyleSheet, } from 'react-native'; -import { withTheme } from '../../core/theming'; -import type { Theme } from '../../types'; +import { useTheme } from '../../core/theming'; +import { Font, MD3Token, MD3TypescaleKey } from '../../types'; type Props = React.ComponentProps & { style?: StyleProp; - /** - * @optional - */ - theme: Theme; + variant?: keyof typeof MD3TypescaleKey; }; // @component-group Typography @@ -23,24 +20,52 @@ type Props = React.ComponentProps & { * * @extends Text props https://reactnative.dev/docs/text#props */ -const Text: React.RefForwardingComponent<{}, Props> = ( - { style, theme, ...rest }: Props, +const Text: React.ForwardRefRenderFunction<{}, Props> = ( + { style, variant, ...rest }, ref ) => { const root = React.useRef(null); + const { isV3, colors, fonts, md } = useTheme(); React.useImperativeHandle(ref, () => ({ setNativeProps: (args: Object) => root.current?.setNativeProps(args), })); + if (isV3 && variant) { + const stylesByVariant = Object.keys(MD3TypescaleKey).reduce( + (acc, key) => ({ + ...acc, + [key]: { + fontSize: md(`md.sys.typescale.${key}.size` as MD3Token), + fontWeight: md(`md.sys.typescale.${key}.weight` as MD3Token), + lineHeight: md(`md.sys.typescale.${key}.line-height` as MD3Token), + letterSpacing: md(`md.sys.typescale.${key}.tracking` as MD3Token), + color: md('md.sys.color.on-surface'), + }, + }), + {} as { + [key in MD3TypescaleKey]: { + fontSize: number; + fontWeight: Font['fontWeight']; + lineHeight: number; + letterSpacing: number; + }; + } + ); + + const styleForVariant = stylesByVariant[variant]; + + return ; + } + return ( & { style?: StyleProp; diff --git a/src/components/Typography/Caption.tsx b/src/components/Typography/v2/Caption.tsx similarity index 100% rename from src/components/Typography/Caption.tsx rename to src/components/Typography/v2/Caption.tsx diff --git a/src/components/Typography/Headline.tsx b/src/components/Typography/v2/Headline.tsx similarity index 82% rename from src/components/Typography/Headline.tsx rename to src/components/Typography/v2/Headline.tsx index acdb480afe..f560ec5366 100644 --- a/src/components/Typography/Headline.tsx +++ b/src/components/Typography/v2/Headline.tsx @@ -29,14 +29,16 @@ type Props = React.ComponentProps & { * export default MyComponent; * ``` */ -const Headline = (props: Props) => ( - -); +const Headline = (props: Props) => { + return ( + + ); +}; export default Headline; diff --git a/src/components/Typography/Paragraph.tsx b/src/components/Typography/v2/Paragraph.tsx similarity index 100% rename from src/components/Typography/Paragraph.tsx rename to src/components/Typography/v2/Paragraph.tsx diff --git a/src/components/Typography/StyledText.tsx b/src/components/Typography/v2/StyledText.tsx similarity index 63% rename from src/components/Typography/StyledText.tsx rename to src/components/Typography/v2/StyledText.tsx index 508bfb1070..f67a342543 100644 --- a/src/components/Typography/StyledText.tsx +++ b/src/components/Typography/v2/StyledText.tsx @@ -3,19 +3,19 @@ import * as React from 'react'; import { I18nManager, StyleProp, TextStyle, StyleSheet } from 'react-native'; import Text from './Text'; -import { withTheme } from '../../core/theming'; -import type { Theme } from '../../types'; +import { useTheme } from '../../../core/theming'; type Props = React.ComponentProps & { - alpha: number; + alpha?: number; family: 'regular' | 'medium' | 'light' | 'thin'; style?: StyleProp; - theme: Theme; }; -const StyledText = ({ theme, alpha, family, style, ...rest }: Props) => { - const textColor = color(theme?.colors?.text).alpha(alpha).rgb().string(); - const font = theme.fonts[family]; +const StyledText = ({ alpha = 1, family, style, ...rest }: Props) => { + const { colors, fonts } = useTheme(); + + const textColor = color(colors?.text).alpha(alpha).rgb().string(); + const font = fonts?.[family]; const writingDirection = I18nManager.isRTL ? 'rtl' : 'ltr'; return ( @@ -36,4 +36,4 @@ const styles = StyleSheet.create({ }, }); -export default withTheme(StyledText); +export default StyledText; diff --git a/src/components/Typography/Subheading.tsx b/src/components/Typography/v2/Subheading.tsx similarity index 100% rename from src/components/Typography/Subheading.tsx rename to src/components/Typography/v2/Subheading.tsx diff --git a/src/components/Typography/v2/Text.tsx b/src/components/Typography/v2/Text.tsx new file mode 100644 index 0000000000..6f55a09d11 --- /dev/null +++ b/src/components/Typography/v2/Text.tsx @@ -0,0 +1,57 @@ +import * as React from 'react'; +import { + Text as NativeText, + TextStyle, + StyleProp, + StyleSheet, +} from 'react-native'; +import { useTheme } from '../../../core/theming'; + +type Props = React.ComponentProps & { + style?: StyleProp; + /** + * @optional + */ +}; + +// @component-group Typography + +/** + * Text component which follows styles from the theme. + * + * @extends Text props https://reactnative.dev/docs/text#props + */ +const Text: React.ForwardRefRenderFunction<{}, Props> = ( + { style, ...rest }: Props, + ref +) => { + const root = React.useRef(null); + const { fonts, colors } = useTheme(); + + React.useImperativeHandle(ref, () => ({ + setNativeProps: (args: Object) => root.current?.setNativeProps(args), + })); + + return ( + + ); +}; + +const styles = StyleSheet.create({ + text: { + textAlign: 'left', + }, +}); + +export default React.forwardRef(Text); diff --git a/src/components/Typography/Title.tsx b/src/components/Typography/v2/Title.tsx similarity index 100% rename from src/components/Typography/Title.tsx rename to src/components/Typography/v2/Title.tsx diff --git a/src/components/Typography/v2/index.ts b/src/components/Typography/v2/index.ts new file mode 100644 index 0000000000..42fdec5730 --- /dev/null +++ b/src/components/Typography/v2/index.ts @@ -0,0 +1,5 @@ +export { default as Caption } from './Caption'; +export { default as Headline } from './Headline'; +export { default as Paragraph } from './Paragraph'; +export { default as Subheading } from './Subheading'; +export { default as Title } from './Title'; diff --git a/src/components/__tests__/Typography/Caption.test.js b/src/components/__tests__/Typography/Caption.test.js index ed1c24132f..b1273b5b3a 100644 --- a/src/components/__tests__/Typography/Caption.test.js +++ b/src/components/__tests__/Typography/Caption.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { StyleSheet } from 'react-native'; import renderer from 'react-test-renderer'; -import Caption from '../../Typography/Caption.tsx'; +import Caption from '../../Typography/v2/Caption.tsx'; import { red500 } from '../../../styles/themes/v2/colors'; const style = StyleSheet.create({ diff --git a/src/components/__tests__/Typography/Text.test.js b/src/components/__tests__/Typography/Text.test.js new file mode 100644 index 0000000000..ae55406ffd --- /dev/null +++ b/src/components/__tests__/Typography/Text.test.js @@ -0,0 +1,35 @@ +import * as React from 'react'; +import renderer from 'react-test-renderer'; +import Text from '../../Typography/Text.tsx'; + +it('renders every variant of Text with children as content', () => { + const content = 'Something rendered as a child content'; + + const variants = ( + <> + {content} + {content} + {content} + + {content} + {content} + {content} + + {content} + {content} + {content} + + {content} + {content} + {content} + + {content} + {content} + {content} + + ); + + const tree = renderer.create(variants).toJSON(); + + expect(tree).toMatchSnapshot(); +}); diff --git a/src/components/__tests__/Typography/__snapshots__/Text.test.js.snap b/src/components/__tests__/Typography/__snapshots__/Text.test.js.snap new file mode 100644 index 0000000000..a726310b5e --- /dev/null +++ b/src/components/__tests__/Typography/__snapshots__/Text.test.js.snap @@ -0,0 +1,261 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders every variant of Text with children as content 1`] = ` +Array [ + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , + + Something rendered as a child content + , +] +`; diff --git a/src/components/__tests__/__snapshots__/ListSection.test.js.snap b/src/components/__tests__/__snapshots__/ListSection.test.js.snap index 7557391503..9bf63b72ad 100644 --- a/src/components/__tests__/__snapshots__/ListSection.test.js.snap +++ b/src/components/__tests__/__snapshots__/ListSection.test.js.snap @@ -47,7 +47,6 @@ exports[`renders list section with custom title style 1`] = ` "fontWeight": "100", }, }, - "isV3": false, "roundness": 4, "version": 2, } @@ -358,7 +357,6 @@ exports[`renders list section with subheader 1`] = ` "fontWeight": "100", }, }, - "isV3": false, "roundness": 4, "version": 2, } @@ -667,7 +665,6 @@ exports[`renders list section without subheader 1`] = ` "fontWeight": "100", }, }, - "isV3": false, "roundness": 4, "version": 2, } diff --git a/src/core/Provider.tsx b/src/core/Provider.tsx index 1f2dc391fa..579eaa15ac 100644 --- a/src/core/Provider.tsx +++ b/src/core/Provider.tsx @@ -13,11 +13,16 @@ import LightTheme from '../styles/themes/v2/LightTheme'; import DarkTheme from '../styles/themes/v2/DarkTheme'; import { addEventListener } from '../utils/addEventListener'; import { get } from 'lodash'; -import type { MD2Theme, MD3ThemeExtended, MD3Token, Theme } from '../types'; +import type { + MD2ThemeExtended, + MD3ThemeExtended, + MD3Token, + ThemeBase, +} from '../types'; type Props = { children: React.ReactNode; - theme?: Theme; + theme?: ThemeBase; settings?: Settings; }; @@ -77,21 +82,21 @@ const Provider = ({ ...props }: Props) => { const theme = providedTheme ? providedTheme - : ((colorScheme === 'dark' ? DarkTheme : LightTheme) as Theme); + : ((colorScheme === 'dark' ? DarkTheme : LightTheme) as ThemeBase); const isV3 = theme?.version === 3; const extendedTheme = { ...theme, - isV3, animation: { ...theme.animation, scale: reduceMotionEnabled ? 0 : 1, }, + isV3, }; if (!isV3) { - return extendedTheme as MD2Theme; + return extendedTheme as MD2ThemeExtended; } /** diff --git a/src/core/__tests__/Provider.test.js b/src/core/__tests__/Provider.test.js index 03ecf4a783..343b6c323c 100644 --- a/src/core/__tests__/Provider.test.js +++ b/src/core/__tests__/Provider.test.js @@ -64,6 +64,9 @@ const createProvider = (theme) => { ); }; +const ExtendedLightTheme = { ...LightTheme, isV3: false }; +const ExtendedDarkTheme = { ...DarkTheme, isV3: false }; + describe('Provider', () => { beforeEach(() => { jest.resetModules(); @@ -73,11 +76,11 @@ describe('Provider', () => { mockAppearance(); const { getByTestId } = render(createProvider(null)); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - LightTheme + ExtendedLightTheme ); act(() => Appearance.__internalListeners[0]({ colorScheme: 'dark' })); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - DarkTheme + ExtendedDarkTheme ); }); @@ -98,18 +101,18 @@ describe('Provider', () => { getByTestId('provider-child-view').props.theme.animation.scale ).toStrictEqual(0); - rerender(createProvider(LightTheme)); + rerender(createProvider(ExtendedLightTheme)); expect(AccessibilityInfo.removeEventListener).toHaveBeenCalled(); }); it('should not set AccessibilityInfo listeners, if there is a theme', async () => { mockAppearance(); - const { getByTestId } = render(createProvider(DarkTheme)); + const { getByTestId } = render(createProvider(ExtendedDarkTheme)); expect(AccessibilityInfo.addEventListener).not.toHaveBeenCalled(); expect(AccessibilityInfo.removeEventListener).not.toHaveBeenCalled(); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - DarkTheme + ExtendedDarkTheme ); }); @@ -120,18 +123,18 @@ describe('Provider', () => { expect(Appearance.addChangeListener).toHaveBeenCalled(); act(() => Appearance.__internalListeners[0]({ colorScheme: 'dark' })); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - DarkTheme + ExtendedDarkTheme ); }); it('should not set Appearance listeners, if the theme is passed', async () => { mockAppearance(); - const { getByTestId } = render(createProvider(LightTheme)); + const { getByTestId } = render(createProvider(ExtendedLightTheme)); expect(Appearance.addChangeListener).not.toHaveBeenCalled(); expect(Appearance.removeChangeListener).not.toHaveBeenCalled(); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - LightTheme + ExtendedLightTheme ); }); @@ -142,14 +145,14 @@ describe('Provider', () => { const { getByTestId } = render(createProvider(null)); expect(Appearance).toEqual(null); expect(getByTestId('provider-child-view').props.theme).toStrictEqual( - LightTheme + ExtendedLightTheme ); }); it.each` - label | theme | colorScheme - ${'default theme'} | ${LightTheme} | ${'light'} - ${'dark theme'} | ${DarkTheme} | ${'dark'} + label | theme | colorScheme + ${'default theme'} | ${ExtendedLightTheme} | ${'light'} + ${'dark theme'} | ${ExtendedDarkTheme} | ${'dark'} `( 'provides $label for $colorScheme color scheme', async ({ theme, colorScheme }) => { @@ -165,9 +168,9 @@ describe('Provider', () => { it('uses provided custom theme', async () => { mockAppearance(); const customTheme = { - ...LightTheme, + ...ExtendedLightTheme, colors: { - ...LightTheme.colors, + ...ExtendedLightTheme.colors, primary: 'tomato', accent: 'yellow', }, diff --git a/src/core/theming.tsx b/src/core/theming.tsx index 40ee331c28..f6b0639d65 100644 --- a/src/core/theming.tsx +++ b/src/core/theming.tsx @@ -1,7 +1,6 @@ import { createTheming } from '@callstack/react-theme-provider'; -import type { Theme } from '../types'; import LightTheme from '../styles/themes/v2/LightTheme'; +import type { ThemeExtended } from '../types'; -export const { ThemeProvider, withTheme, useTheme } = createTheming( - LightTheme as Theme -); +export const { ThemeProvider, withTheme, useTheme } = + createTheming(LightTheme as ThemeExtended); diff --git a/src/index.tsx b/src/index.tsx index 879d43dd89..421081cb10 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,8 +5,8 @@ export { Colors }; export { useTheme, withTheme, ThemeProvider } from './core/theming'; export { default as Provider } from './core/Provider'; -export { default as DefaultTheme } from './styles/themes/v2/LightTheme'; -export { default as DarkTheme } from './styles/themes/v2/DarkTheme'; +export { default as DefaultTheme } from './styles/themes/v3/LightTheme'; +export { default as DarkTheme } from './styles/themes/v3/DarkTheme'; export { default as shadow } from './styles/shadow'; export { default as overlay } from './styles/overlay'; export { default as configureFonts } from './styles/fonts'; @@ -48,11 +48,13 @@ export { default as TouchableRipple } from './components/TouchableRipple/Touchab export { default as TextInput } from './components/TextInput/TextInput'; export { default as ToggleButton } from './components/ToggleButton'; -export { default as Caption } from './components/Typography/Caption'; -export { default as Headline } from './components/Typography/Headline'; -export { default as Paragraph } from './components/Typography/Paragraph'; -export { default as Subheading } from './components/Typography/Subheading'; -export { default as Title } from './components/Typography/Title'; +export { + Caption, + Headline, + Paragraph, + Subheading, + Title, +} from './components/Typography/v2'; export { default as Text } from './components/Typography/Text'; -export type { Theme } from './types'; +export type { Theme, ThemeExtended, ThemeBase } from './types'; diff --git a/src/styles/themes/v2/DarkTheme.tsx b/src/styles/themes/v2/DarkTheme.tsx index 35a6019347..503338e935 100644 --- a/src/styles/themes/v2/DarkTheme.tsx +++ b/src/styles/themes/v2/DarkTheme.tsx @@ -1,9 +1,9 @@ import color from 'color'; import LightTheme from './LightTheme'; import { black, white, pinkA100 } from './colors'; -import type { MD2Theme } from '../../../types'; +import type { MD2ThemeBase } from '../../../types'; -const DarkTheme: MD2Theme = { +const DarkTheme: MD2ThemeBase = { ...LightTheme, dark: true, mode: 'adaptive', diff --git a/src/styles/themes/v2/LightTheme.tsx b/src/styles/themes/v2/LightTheme.tsx index cf901f33ed..4f4220ccf8 100644 --- a/src/styles/themes/v2/LightTheme.tsx +++ b/src/styles/themes/v2/LightTheme.tsx @@ -1,13 +1,12 @@ import color from 'color'; import { black, white, pinkA400 } from './colors'; import configureFonts from '../../fonts'; -import type { MD2Theme } from '../../../types'; +import type { MD2ThemeBase } from '../../../types'; -const LightTheme: MD2Theme = { +const LightTheme: MD2ThemeBase = { dark: false, roundness: 4, version: 2, - isV3: false, colors: { primary: '#6200ee', accent: '#03dac4', diff --git a/src/styles/themes/v3/tokens.tsx b/src/styles/themes/v3/tokens.tsx index 849123b797..33ea93edab 100644 --- a/src/styles/themes/v3/tokens.tsx +++ b/src/styles/themes/v3/tokens.tsx @@ -113,8 +113,8 @@ const mediumType = { const typescale = { 'display-large': { ...regularType, - 'line-height': 57, - size: 64, + 'line-height': 64, + size: 57, }, 'display-medium': { ...regularType, @@ -155,6 +155,7 @@ const typescale = { }, 'title-small': { ...mediumType, + tracking: 0.1, 'line-height': 20, size: 14, }, @@ -174,13 +175,12 @@ const typescale = { 'label-small': { ...mediumType, tracking: 0.5, - 'line-height': 6, + 'line-height': 16, size: 11, }, 'body-large': { ...mediumType, - tracking: 0.15, 'line-height': 24, size: 16, }, diff --git a/src/types.tsx b/src/types.tsx index 583602d695..057bbcf146 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -37,6 +37,8 @@ export type Material2Colors = { placeholder: string; backdrop: string; notification: string; + + [key: string]: string; }; export type MD3Color = { @@ -77,26 +79,70 @@ type SharedTheme = { dark: boolean; mode?: Mode; roundness: number; - version?: 2 | 3; - isV3?: boolean; fonts: Fonts; animation: { scale: number; }; }; -export type Theme = AllXOR<[MD2Theme, MD3ThemeBase]>; +export type Theme = ThemeBase & ThemeExtended; + +export type ThemeBase = AllXOR<[MD2ThemeBase, MD3ThemeBase]>; + +export type ThemeExtended = AllXOR<[MD2ThemeExtended, MD3ThemeExtended]>; -export type MD2Theme = SharedTheme & { +// MD2 types +export type MD2ThemeBase = SharedTheme & { + version: 2; colors: Material2Colors; }; +export type MD2ThemeExtended = MD2ThemeBase & { + isV3: false; + md(): void; +}; + +// MD3 types +export enum MD3TypescaleKey { + 'display-large' = 'display-large', + 'display-medium' = 'display-medium', + 'display-small' = 'display-small', + + 'headline-large' = 'headline-large', + 'headline-medium' = 'headline-medium', + 'headline-small' = 'headline-small', + + 'title-large' = 'title-large', + 'title-medium' = 'title-medium', + 'title-small' = 'title-small', + + 'label-large' = 'label-large', + 'label-medium' = 'label-medium', + 'label-small' = 'label-small', + + 'body-large' = 'body-large', + 'body-medium' = 'body-medium', + 'body-small' = 'body-small', +} + +export type MD3Typescale = { + font: string; + tracking: number; + weight: Font['fontWeight']; + 'line-height': number; + size: number; +}; + export type MD3ThemeBase = SharedTheme & { + version: 3; tokens: { md: { sys: { color: MD3Color; elevation: string[]; + typescale: { + [key in MD3TypescaleKey]: MD3Typescale; + }; }; ref: { palette: MD3Palette; @@ -118,9 +164,12 @@ export type MD3ThemeBase = SharedTheme & { }; export type MD3ThemeExtended = MD3ThemeBase & { + isV3: true; md(tokenKey: MD3Token): string | number | object; }; +export type MD3Token = Path; + type Without = { [P in Exclude]?: never }; export type XOR = T | U extends object @@ -143,8 +192,6 @@ type PathImpl = K extends string type Path = PathImpl | keyof T; -export type MD3Token = Path; - export type $Omit = Pick>; export type $RemoveChildren> = $Omit< React.ComponentPropsWithoutRef, diff --git a/yarn.lock b/yarn.lock index 4726b4fd2d..473b27c058 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,13 +9,20 @@ dependencies: "@babel/highlight" "7.0.0-beta.44" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.3": +"@babel/code-frame@^7.0.0": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.3.tgz#324bcfd8d35cd3d47dae18cde63d752086435e9a" integrity sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg== dependencies: "@babel/highlight" "^7.10.3" +"@babel/code-frame@^7.10.3", "@babel/code-frame@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" + integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + dependencies: + "@babel/highlight" "^7.16.7" + "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3", "@babel/code-frame@~7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" @@ -23,13 +30,6 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== - dependencies: - "@babel/highlight" "^7.16.7" - "@babel/compat-data@^7.12.5", "@babel/compat-data@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" @@ -62,7 +62,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.10.3", "@babel/core@^7.7.5": +"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.3.tgz#73b0e8ddeec1e3fdd7a2de587a60e17c440ec77e" integrity sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w== @@ -105,6 +105,27 @@ semver "^6.3.0" source-map "^0.5.0" +"@babel/core@^7.10.3": + version "7.16.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.12.tgz#5edc53c1b71e54881315923ae2aedea2522bb784" + integrity sha512-dK5PtG1uiN2ikk++5OzSYsitZKny4wOCD0nrO4TqnW4BVBTQ2NGS3NgilvT/TEyxTST7LNyWV/T4tXDoD3fOgg== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.16.8" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helpers" "^7.16.7" + "@babel/parser" "^7.16.12" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.10" + "@babel/types" "^7.16.8" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + "@babel/core@^7.12.10", "@babel/core@^7.4.5": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" @@ -137,14 +158,13 @@ source-map "^0.5.0" trim-right "^1.0.1" -"@babel/generator@^7.10.3", "@babel/generator@^7.5.0": - version "7.10.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.3.tgz#32b9a0d963a71d7a54f5f6c15659c3dbc2a523a5" - integrity sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA== +"@babel/generator@^7.10.3", "@babel/generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe" + integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw== dependencies: - "@babel/types" "^7.10.3" + "@babel/types" "^7.16.8" jsesc "^2.5.1" - lodash "^4.17.13" source-map "^0.5.0" "@babel/generator@^7.12.10", "@babel/generator@^7.9.0": @@ -165,13 +185,14 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe" - integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw== +"@babel/generator@^7.5.0": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.3.tgz#32b9a0d963a71d7a54f5f6c15659c3dbc2a523a5" + integrity sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA== dependencies: - "@babel/types" "^7.16.8" + "@babel/types" "^7.10.3" jsesc "^2.5.1" + lodash "^4.17.13" source-map "^0.5.0" "@babel/helper-annotate-as-pure@^7.10.1": @@ -350,7 +371,7 @@ "@babel/template" "7.0.0-beta.44" "@babel/types" "7.0.0-beta.44" -"@babel/helper-function-name@^7.10.1", "@babel/helper-function-name@^7.10.3": +"@babel/helper-function-name@^7.10.1": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz#79316cd75a9fa25ba9787ff54544307ed444f197" integrity sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw== @@ -359,6 +380,15 @@ "@babel/template" "^7.10.3" "@babel/types" "^7.10.3" +"@babel/helper-function-name@^7.10.3", "@babel/helper-function-name@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" + integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== + dependencies: + "@babel/helper-get-function-arity" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/types" "^7.16.7" + "@babel/helper-function-name@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" @@ -368,15 +398,6 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" - integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== - dependencies: - "@babel/helper-get-function-arity" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" - "@babel/helper-get-function-arity@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15" @@ -384,13 +405,20 @@ dependencies: "@babel/types" "7.0.0-beta.44" -"@babel/helper-get-function-arity@^7.10.1", "@babel/helper-get-function-arity@^7.10.3": +"@babel/helper-get-function-arity@^7.10.1": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz#3a28f7b28ccc7719eacd9223b659fdf162e4c45e" integrity sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg== dependencies: "@babel/types" "^7.10.3" +"@babel/helper-get-function-arity@^7.10.3", "@babel/helper-get-function-arity@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" + integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-get-function-arity@^7.10.4": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" @@ -398,13 +426,6 @@ dependencies: "@babel/types" "^7.12.10" -"@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== - dependencies: - "@babel/types" "^7.16.7" - "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" @@ -419,7 +440,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-member-expression-to-functions@^7.10.1", "@babel/helper-member-expression-to-functions@^7.10.3": +"@babel/helper-member-expression-to-functions@^7.10.3": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.3.tgz#bc3663ac81ac57c39148fef4c69bf48a77ba8dd6" integrity sha512-q7+37c4EPLSjNb2NmWOjNwj0+BOyYlssuQ58kHEWk1Z78K5i8vTUsteq78HMieRPQSl/NtpQyJfdjt3qZ5V2vw== @@ -440,14 +461,14 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-imports@^7.0.0-beta.49", "@babel/helper-module-imports@^7.16.7": +"@babel/helper-module-imports@^7.0.0-beta.49", "@babel/helper-module-imports@^7.10.1", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-imports@^7.10.1", "@babel/helper-module-imports@^7.10.3": +"@babel/helper-module-imports@^7.10.3": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.3.tgz#766fa1d57608e53e5676f23ae498ec7a95e1b11a" integrity sha512-Jtqw5M9pahLSUWA+76nhK9OG8nwYXzhQzVIGFoNaHnXF/r4l7kz4Fl0UAW7B6mqC5myoJiBP5/YQlXQTMfHI9w== @@ -461,18 +482,19 @@ dependencies: "@babel/types" "^7.12.5" -"@babel/helper-module-transforms@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz#24e2f08ee6832c60b157bb0936c86bef7210c622" - integrity sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg== +"@babel/helper-module-transforms@^7.10.1", "@babel/helper-module-transforms@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz#7665faeb721a01ca5327ddc6bba15a5cb34b6a41" + integrity sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng== dependencies: - "@babel/helper-module-imports" "^7.10.1" - "@babel/helper-replace-supers" "^7.10.1" - "@babel/helper-simple-access" "^7.10.1" - "@babel/helper-split-export-declaration" "^7.10.1" - "@babel/template" "^7.10.1" - "@babel/types" "^7.10.1" - lodash "^4.17.13" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" "@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.9.0": version "7.12.1" @@ -489,21 +511,7 @@ "@babel/types" "^7.12.1" lodash "^4.17.19" -"@babel/helper-module-transforms@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz#7665faeb721a01ca5327ddc6bba15a5cb34b6a41" - integrity sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng== - dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-simple-access" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/helper-validator-identifier" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/helper-optimise-call-expression@^7.10.1", "@babel/helper-optimise-call-expression@^7.10.3": +"@babel/helper-optimise-call-expression@^7.10.3": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz#f53c4b6783093195b0f69330439908841660c530" integrity sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg== @@ -555,15 +563,16 @@ "@babel/helper-wrap-function" "^7.10.4" "@babel/types" "^7.12.1" -"@babel/helper-replace-supers@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz#ec6859d20c5d8087f6a2dc4e014db7228975f13d" - integrity sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A== +"@babel/helper-replace-supers@^7.10.1", "@babel/helper-replace-supers@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" + integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== dependencies: - "@babel/helper-member-expression-to-functions" "^7.10.1" - "@babel/helper-optimise-call-expression" "^7.10.1" - "@babel/traverse" "^7.10.1" - "@babel/types" "^7.10.1" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-member-expression-to-functions" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" "@babel/helper-replace-supers@^7.12.1": version "7.12.5" @@ -575,25 +584,13 @@ "@babel/traverse" "^7.12.5" "@babel/types" "^7.12.5" -"@babel/helper-replace-supers@^7.16.7": +"@babel/helper-simple-access@^7.10.1", "@babel/helper-simple-access@^7.16.7": version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" - integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz#d656654b9ea08dbb9659b69d61063ccd343ff0f7" + integrity sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g== dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-member-expression-to-functions" "^7.16.7" - "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/helper-simple-access@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz#08fb7e22ace9eb8326f7e3920a1c2052f13d851e" - integrity sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw== - dependencies: - "@babel/template" "^7.10.1" - "@babel/types" "^7.10.1" - "@babel/helper-simple-access@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" @@ -601,13 +598,6 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-simple-access@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz#d656654b9ea08dbb9659b69d61063ccd343ff0f7" - integrity sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g== - dependencies: - "@babel/types" "^7.16.7" - "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" @@ -629,12 +619,12 @@ dependencies: "@babel/types" "7.0.0-beta.44" -"@babel/helper-split-export-declaration@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz#c6f4be1cbc15e3a868e4c64a17d5d31d754da35f" - integrity sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g== +"@babel/helper-split-export-declaration@^7.10.1", "@babel/helper-split-export-declaration@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" + integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== dependencies: - "@babel/types" "^7.10.1" + "@babel/types" "^7.16.7" "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" @@ -643,17 +633,10 @@ dependencies: "@babel/types" "^7.11.0" -"@babel/helper-split-export-declaration@^7.16.7": +"@babel/helper-validator-identifier@^7.10.3", "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" - integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-validator-identifier@^7.10.3": - version "7.10.3" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz#60d9847f98c4cea1b279e005fdb7c28be5412d15" - integrity sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw== + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" + integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" @@ -665,11 +648,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== - "@babel/helper-validator-option@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" @@ -695,14 +673,14 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helpers@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.1.tgz#a6827b7cb975c9d9cef5fd61d919f60d8844a973" - integrity sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw== +"@babel/helpers@^7.10.1", "@babel/helpers@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.7.tgz#7e3504d708d50344112767c3542fc5e357fffefc" + integrity sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw== dependencies: - "@babel/template" "^7.10.1" - "@babel/traverse" "^7.10.1" - "@babel/types" "^7.10.1" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" "@babel/helpers@^7.12.5", "@babel/helpers@^7.9.0": version "7.12.5" @@ -713,15 +691,6 @@ "@babel/traverse" "^7.12.5" "@babel/types" "^7.12.5" -"@babel/helpers@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.7.tgz#7e3504d708d50344112767c3542fc5e357fffefc" - integrity sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw== - dependencies: - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.7" - "@babel/types" "^7.16.7" - "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" @@ -732,11 +701,11 @@ js-tokens "^3.0.0" "@babel/highlight@^7.10.3": - version "7.10.3" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.3.tgz#c633bb34adf07c5c13156692f5922c81ec53f28d" - integrity sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw== + version "7.16.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" + integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== dependencies: - "@babel/helper-validator-identifier" "^7.10.3" + "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" js-tokens "^4.0.0" @@ -758,7 +727,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.3": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.3.tgz#7e71d892b0d6e7d04a1af4c3c79d72c1f10f5315" integrity sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA== @@ -768,6 +737,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.8.tgz#61c243a3875f7d0b0962b0543a33ece6ff2f1f17" integrity sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw== +"@babel/parser@^7.10.3", "@babel/parser@^7.16.10", "@babel/parser@^7.16.12": + version "7.16.12" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.12.tgz#9474794f9a650cf5e2f892444227f98e28cdf8b6" + integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A== + "@babel/parser@^7.12.10", "@babel/parser@^7.12.7", "@babel/parser@^7.9.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" @@ -1951,7 +1925,7 @@ babylon "7.0.0-beta.44" lodash "^4.2.0" -"@babel/template@^7.0.0", "@babel/template@^7.10.1", "@babel/template@^7.10.3", "@babel/template@^7.3.3": +"@babel/template@^7.0.0", "@babel/template@^7.3.3": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.3.tgz#4d13bc8e30bf95b0ce9d175d30306f42a2c9a7b8" integrity sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA== @@ -1960,6 +1934,15 @@ "@babel/parser" "^7.10.3" "@babel/types" "^7.10.3" +"@babel/template@^7.10.3", "@babel/template@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" + integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/parser" "^7.16.7" + "@babel/types" "^7.16.7" + "@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.8.6": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" @@ -1969,15 +1952,6 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/template@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" - integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== - dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" - "@babel/traverse@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" @@ -1994,7 +1968,7 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.1", "@babel/traverse@^7.10.3": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.3.tgz#0b01731794aa7b77b214bcd96661f18281155d7e" integrity sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug== @@ -2009,6 +1983,22 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.10.3", "@babel/traverse@^7.16.10": + version "7.16.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.10.tgz#448f940defbe95b5a8029975b051f75993e8239f" + integrity sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.16.8" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.16.10" + "@babel/types" "^7.16.8" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.9.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" @@ -2065,7 +2055,7 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.10.1", "@babel/types@^7.10.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.10.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.3.tgz#6535e3b79fea86a6b09e012ea8528f935099de8e" integrity sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA== @@ -2074,7 +2064,7 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0-beta.49", "@babel/types@^7.16.0", "@babel/types@^7.16.8": +"@babel/types@^7.0.0-beta.49", "@babel/types@^7.10.1", "@babel/types@^7.10.3", "@babel/types@^7.16.0", "@babel/types@^7.16.8": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.8.tgz#0ba5da91dd71e0a4e7781a30f22770831062e3c1" integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg== @@ -4821,13 +4811,20 @@ conventional-recommended-bump@^6.0.5: meow "^7.0.0" q "^1.5.1" -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" +convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -4996,7 +4993,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4.1.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@4.1.1, debug@^4.0.1, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -5017,7 +5014,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.3.2: +debug@^4.1.0, debug@^4.3.2: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -6408,12 +6405,7 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== - -gensync@^1.0.0-beta.2: +gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== @@ -7217,7 +7209,7 @@ is-ci@2.0.0, is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.2.0, is-core-module@^2.8.0: +is-core-module@^2.2.0, is-core-module@^2.8.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== @@ -8318,7 +8310,14 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.1.3: +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +json5@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== @@ -8572,21 +8571,21 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= -lodash@4.17.15, lodash@^4.0.0, lodash@^4.11.2, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1: +lodash@4.17.15, lodash@^4.0.0, lodash@^4.11.2, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@^4.17.13, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + lodash@^4.17.19: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -9269,11 +9268,16 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -10859,7 +10863,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.8.1: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -10875,6 +10879,15 @@ resolve@^1.12.0, resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.3.2: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.3: version "2.0.0-next.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46"