Compare commits

..

21 Commits

Author SHA1 Message Date
Satyajit Sahoo
6515fbe2dc chore: publish
- react-navigation-animated-switch@0.6.0
 - react-navigation-drawer@2.5.0
 - react-navigation-material-bottom-tabs@2.3.0
 - @react-navigation/native@3.8.0
 - react-navigation@4.4.0
 - react-navigation-stack@2.8.0
 - react-navigation-tabs@2.9.0
2020-06-25 02:17:38 +02:00
Satyajit Sahoo
454e05b02e feat: sync latest stack and upgrade typescript 2020-06-25 02:15:28 +02:00
Satyajit Sahoo
442ca3e700 fix: improve error message when installing wrong version 2020-06-22 02:25:00 +02:00
Satyajit Sahoo
e00c63e32b chore: publish
- react-navigation-stack@2.7.0
2020-06-08 11:35:08 +02:00
Satyajit Sahoo
ba6d7dcbed feat: sync latest stack 2020-06-08 11:31:03 +02:00
Satyajit Sahoo
2ca8c34b2d chore: publish
- react-navigation-stack@2.6.0
2020-06-06 22:38:25 +02:00
Satyajit Sahoo
03f9f8cd8e feat: sync latest stack 2020-06-06 02:28:20 +02:00
Satyajit Sahoo
1ee8c76df3 chore: publish
- react-navigation-stack@2.5.1
2020-05-15 22:02:17 +02:00
Satyajit Sahoo
bc1313b61d fix: sync latest stack 2020-05-15 22:00:38 +02:00
Satyajit Sahoo
28982ffca0 chore: publish
- react-navigation-stack@2.5.0
2020-05-12 00:57:02 +02:00
Satyajit Sahoo
bb82d5000f feat: sync latest stack 2020-05-11 18:34:46 +02:00
Satyajit Sahoo
1f30227049 chore: update eslint and prettier 2020-05-11 18:17:15 +02:00
Satyajit Sahoo
f34ec46111 chore: publish
- react-navigation-animated-switch@0.5.12
 - @react-navigation/core@3.7.6
 - react-navigation-drawer@2.4.13
 - react-navigation-material-bottom-tabs@2.2.12
 - @react-navigation/native@3.7.13
 - react-navigation@4.3.9
 - react-navigation-stack@2.4.0
 - react-navigation-tabs@2.8.13
2020-05-01 01:45:52 +02:00
Satyajit Sahoo
8b79e9bee6 feat: sync latest stack 2020-05-01 01:45:10 +02:00
linzera
e09906a423 fix: change old docUrl to new docUrl due v5 2020-04-30 16:57:36 +02:00
Satyajit Sahoo
ed7ffb98f4 chore: publish
- react-navigation-animated-switch@0.5.11
 - react-navigation-drawer@2.4.12
 - react-navigation-material-bottom-tabs@2.2.11
 - @react-navigation/native@3.7.12
 - react-navigation@4.3.8
 - react-navigation-stack@2.3.13
 - react-navigation-tabs@2.8.12
2020-04-22 16:47:35 +02:00
Satyajit Sahoo
90eff6a5e2 chore: sync latest stack 2020-04-22 16:45:32 +02:00
Satyajit Sahoo
b4691d7de2 chore: update react-native-safe-area-view 2020-04-22 16:31:49 +02:00
Satyajit Sahoo
f99f523a37 chore: publish
- react-navigation-stack@2.3.12
2020-04-18 01:49:20 +02:00
Satyajit Sahoo
05b47dbb09 chore: sync latest stack 2020-04-18 01:48:06 +02:00
Alejandro
4c4e66f05c fix: stack peer warnings 2020-04-18 01:15:41 +02:00
75 changed files with 1887 additions and 1243 deletions

View File

@@ -346,6 +346,7 @@ class MainScreen extends React.Component<any, State> {
if (route.screen || route.path || route.params) { if (route.screen || route.path || route.params) {
// @ts-ignore // @ts-ignore
const { path, params, screen } = route; const { path, params, screen } = route;
// @ts-ignore
const { router } = screen; const { router } = screen;
const action = const action =
path && path &&
@@ -386,6 +387,7 @@ class MainScreen extends React.Component<any, State> {
const Navigation = createAppContainer( const Navigation = createAppContainer(
createStackNavigator( createStackNavigator(
// @ts-ignore
{ {
...ExampleInfo, ...ExampleInfo,
Index: { Index: {

View File

@@ -114,7 +114,7 @@ const MyNavScreen = ({
title="Set unlocked" title="Set unlocked"
/> />
), ),
unlocked: ( 'unlocked': (
<Button <Button
onPress={() => onPress={() =>
navigation.setParams({ drawerLockMode: 'locked-open' }) navigation.setParams({ drawerLockMode: 'locked-open' })

View File

@@ -106,7 +106,7 @@ const MyNavScreen = ({
title="Set unlocked" title="Set unlocked"
/> />
), ),
unlocked: ( 'unlocked': (
<Button <Button
onPress={() => onPress={() =>
navigation.setParams({ drawerLockMode: 'locked-open' }) navigation.setParams({ drawerLockMode: 'locked-open' })

View File

@@ -64,7 +64,7 @@ class ListScreen extends React.Component {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
backgroundColor: '#fff', // backgroundColor: '#fff',
}} }}
> >
<Text>List Screen</Text> <Text>List Screen</Text>
@@ -96,7 +96,7 @@ class DetailsScreen extends React.Component<NavigationStackScreenProps> {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
backgroundColor: '#fff', // backgroundColor: '#fff',
}} }}
> >
<Text>Details Screen</Text> <Text>Details Screen</Text>
@@ -119,7 +119,7 @@ class HeaderlessScreen extends React.Component {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
backgroundColor: '#fff', // backgroundColor: '#fff',
}} }}
> >
<Text>Headerless Screen</Text> <Text>Headerless Screen</Text>

View File

@@ -91,8 +91,4 @@ const DrawerExample = createDrawerNavigator(
} }
); );
DrawerExample.navigationOptions = {
headerShown: false,
};
export default DrawerExample; export default DrawerExample;

View File

@@ -36,13 +36,13 @@
"babel-jest": "^25.2.3", "babel-jest": "^25.2.3",
"commitlint": "^8.3.5", "commitlint": "^8.3.5",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"eslint": "^6.8.0", "eslint": "^7.0.0",
"eslint-config-satya164": "^3.1.5", "eslint-config-satya164": "^3.1.7",
"husky": "^4.2.1", "husky": "^4.2.1",
"jest": "^25.1.0", "jest": "^25.1.0",
"lerna": "^3.20.2", "lerna": "^3.20.2",
"prettier": "^2.0.1", "prettier": "^2.0.5",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"resolutions": { "resolutions": {
"react": "~16.9.0", "react": "~16.9.0",

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.6.0](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.12...react-navigation-animated-switch@0.6.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/react-navigation/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [0.5.12](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.11...react-navigation-animated-switch@0.5.12) (2020-04-30)
**Note:** Version bump only for package react-navigation-animated-switch
## [0.5.11](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.10...react-navigation-animated-switch@0.5.11) (2020-04-22)
**Note:** Version bump only for package react-navigation-animated-switch
## [0.5.10](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.9...react-navigation-animated-switch@0.5.10) (2020-04-02) ## [0.5.10](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.9...react-navigation-animated-switch@0.5.10) (2020-04-02)
**Note:** Version bump only for package react-navigation-animated-switch **Note:** Version bump only for package react-navigation-animated-switch

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation-animated-switch", "name": "react-navigation-animated-switch",
"version": "0.5.10", "version": "0.6.0",
"description": "Animated switch for React Navigation", "description": "Animated switch for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"react-native": "lib/module/index.js", "react-native": "lib/module/index.js",
@@ -28,8 +28,8 @@
"react": "~16.9.0", "react": "~16.9.0",
"react-native": "~0.61.5", "react-native": "~0.61.5",
"react-native-reanimated": "~1.7.0", "react-native-reanimated": "~1.7.0",
"react-navigation": "^4.3.7", "react-navigation": "^4.4.0",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",

View File

@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.7.6](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.5...@react-navigation/core@3.7.6) (2020-04-30)
### Bug Fixes
* change old docUrl to new docUrl due v5 ([e09906a](https://github.com/react-navigation/react-navigation-core/commit/e09906a4235a0fca09140923ebe7af34b50b491a))
## [3.7.5](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.4...@react-navigation/core@3.7.5) (2020-04-02) ## [3.7.5](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.4...@react-navigation/core@3.7.5) (2020-04-02)

View File

@@ -1,6 +1,6 @@
{ {
"name": "@react-navigation/core", "name": "@react-navigation/core",
"version": "3.7.5", "version": "3.7.6",
"description": "Core utilities for the react-navigation framework", "description": "Core utilities for the react-navigation framework",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"react-native": "lib/module/index.js", "react-native": "lib/module/index.js",

View File

@@ -1,3 +1,3 @@
export default function docsUrl(path: string) { export default function docsUrl(path: string) {
return `https://reactnavigation.org/docs/${path}`; return `https://reactnavigation.org/docs/4.x/${path}`;
} }

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.5.0](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.13...react-navigation-drawer@2.5.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/drawer/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [2.4.13](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.12...react-navigation-drawer@2.4.13) (2020-04-30)
**Note:** Version bump only for package react-navigation-drawer
## [2.4.12](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.11...react-navigation-drawer@2.4.12) (2020-04-22)
**Note:** Version bump only for package react-navigation-drawer
## [2.4.11](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.10...react-navigation-drawer@2.4.11) (2020-04-02) ## [2.4.11](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.10...react-navigation-drawer@2.4.11) (2020-04-02)
**Note:** Version bump only for package react-navigation-drawer **Note:** Version bump only for package react-navigation-drawer

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation-drawer", "name": "react-navigation-drawer",
"version": "2.4.11", "version": "2.5.0",
"description": "Drawer navigator component for React Navigation", "description": "Drawer navigator component for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"react-native": "lib/module/index.js", "react-native": "lib/module/index.js",
@@ -49,8 +49,8 @@
"react-native-reanimated": "^1.2.0", "react-native-reanimated": "^1.2.0",
"react-native-screens": "^2.3.0", "react-native-screens": "^2.3.0",
"react-native-testing-library": "^1.12.0", "react-native-testing-library": "^1.12.0",
"react-navigation": "^4.3.7", "react-navigation": "^4.4.0",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",

View File

@@ -75,8 +75,11 @@ const DrawerNavigator = (
const drawerRouter = DrawerRouter(routeConfigs, mergedConfig); const drawerRouter = DrawerRouter(routeConfigs, mergedConfig);
// TODO: don't have time to fix it right now // TODO: don't have time to fix it right now
// @ts-ignore const navigator = createNavigator(
const navigator = createNavigator(DrawerView, drawerRouter, mergedConfig); DrawerView as any,
drawerRouter,
mergedConfig
);
return navigator; return navigator;
}; };

View File

@@ -160,10 +160,6 @@ export default class DrawerView extends React.PureComponent<Props, State> {
drawerOpenProgress={progress} drawerOpenProgress={progress}
navigation={this.props.navigation} navigation={this.props.navigation}
descriptors={this.props.descriptors} descriptors={this.props.descriptors}
contentComponent={this.props.navigationConfig.contentComponent}
contentOptions={this.props.navigationConfig.contentOptions}
drawerPosition={this.props.navigationConfig.drawerPosition}
style={this.props.navigationConfig.style}
{...this.props.navigationConfig} {...this.props.navigationConfig}
/> />
); );

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.3.0](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.12...react-navigation-material-bottom-tabs@2.3.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/react-navigation-material-bottom-tabs/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [2.2.12](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.11...react-navigation-material-bottom-tabs@2.2.12) (2020-04-30)
**Note:** Version bump only for package react-navigation-material-bottom-tabs
## [2.2.11](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.10...react-navigation-material-bottom-tabs@2.2.11) (2020-04-22)
**Note:** Version bump only for package react-navigation-material-bottom-tabs
## [2.2.10](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.9...react-navigation-material-bottom-tabs@2.2.10) (2020-04-02) ## [2.2.10](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.9...react-navigation-material-bottom-tabs@2.2.10) (2020-04-02)
**Note:** Version bump only for package react-navigation-material-bottom-tabs **Note:** Version bump only for package react-navigation-material-bottom-tabs

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation-material-bottom-tabs", "name": "react-navigation-material-bottom-tabs",
"version": "2.2.10", "version": "2.3.0",
"description": "Material Bottom Tab Navigation component for React Navigation", "description": "Material Bottom Tab Navigation component for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"module": "lib/module/index.js", "module": "lib/module/index.js",
@@ -48,8 +48,8 @@
"react-native-gesture-handler": "^1.6.0", "react-native-gesture-handler": "^1.6.0",
"react-native-paper": "^3.1.1", "react-native-paper": "^3.1.1",
"react-native-reanimated": "^1.2.0", "react-native-reanimated": "^1.2.0",
"react-navigation": "^4.3.7", "react-navigation": "^4.4.0",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",

View File

@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.8.0](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.13...@react-navigation/native@3.8.0) (2020-06-25)
### Bug Fixes
* improve error message when installing wrong version ([442ca3e](https://github.com/react-navigation/react-navigation-native/commit/442ca3e700c5805cdc5cd02c68f49042887a5054))
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/react-navigation-native/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [3.7.13](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.12...@react-navigation/native@3.7.13) (2020-04-30)
**Note:** Version bump only for package @react-navigation/native
## [3.7.12](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.11...@react-navigation/native@3.7.12) (2020-04-22)
**Note:** Version bump only for package @react-navigation/native
## [3.7.11](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.10...@react-navigation/native@3.7.11) (2020-04-02) ## [3.7.11](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.10...@react-navigation/native@3.7.11) (2020-04-02)
**Note:** Version bump only for package @react-navigation/native **Note:** Version bump only for package @react-navigation/native

View File

@@ -1,6 +1,6 @@
{ {
"name": "@react-navigation/native", "name": "@react-navigation/native",
"version": "3.7.11", "version": "3.8.0",
"description": "React Native support for React Navigation", "description": "React Native support for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"react-native": "lib/module/index.js", "react-native": "lib/module/index.js",
@@ -36,11 +36,11 @@
"homepage": "https://github.com/react-navigation/react-navigation-native#readme", "homepage": "https://github.com/react-navigation/react-navigation-native#readme",
"dependencies": { "dependencies": {
"hoist-non-react-statics": "^3.3.2", "hoist-non-react-statics": "^3.3.2",
"react-native-safe-area-view": "^0.14.8" "react-native-safe-area-view": "^0.14.9"
}, },
"devDependencies": { "devDependencies": {
"@react-native-community/bob": "^0.10.0", "@react-native-community/bob": "^0.10.0",
"@react-navigation/core": "^3.7.5", "@react-navigation/core": "^3.7.6",
"@types/react-test-renderer": "^16.9.2", "@types/react-test-renderer": "^16.9.2",
"del-cli": "^3.0.0", "del-cli": "^3.0.0",
"react": "~16.9.0", "react": "~16.9.0",

View File

@@ -43,6 +43,24 @@ module.exports = {
get createNavigationFactory() { get createNavigationFactory() {
return require('./throwIfWrongVersion').default; return require('./throwIfWrongVersion').default;
}, },
get useNavigationBuilder() {
return require('./throwIfWrongVersion').default;
},
get useNavigation() {
return require('./throwIfWrongVersion').default;
},
get useRoute() {
return require('./throwIfWrongVersion').default;
},
get useFocusEffect() {
return require('./throwIfWrongVersion').default;
},
get useIsFocused() {
return require('./throwIfWrongVersion').default;
},
get useNavigationState() {
return require('./throwIfWrongVersion').default;
},
get NavigationContainer() { get NavigationContainer() {
return require('./throwIfWrongVersion').default; return require('./throwIfWrongVersion').default;
}, },

View File

@@ -1,5 +1,5 @@
export default function () { export default function () {
throw new Error( throw new Error(
"This version of '@react-navigation/native' is not compatible with React Navigation 5. Make sure you install 5.x version of '@react-navigation/native'." 'Looks like you are trying to use React Navigation 5 APIs, but have React Navigation 4 installed.\n\nMixing React Navigation 4 and 5 is not supported. See the documentation for installation instructions and usage guide for appropriate versions:\n\n- React Navigation 5: https://reactnavigation.org/docs/getting-started\n- React Navigation 4: https://reactnavigation.org/docs/4.x/getting-started'
); );
} }

View File

@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [4.4.0](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.9...react-navigation@4.4.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/react-navigation/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [4.3.9](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.8...react-navigation@4.3.9) (2020-04-30)
### Bug Fixes
* change old docUrl to new docUrl due v5 ([e09906a](https://github.com/react-navigation/react-navigation/commit/e09906a4235a0fca09140923ebe7af34b50b491a))
## [4.3.8](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.7...react-navigation@4.3.8) (2020-04-22)
**Note:** Version bump only for package react-navigation
## [4.3.7](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.6...react-navigation@4.3.7) (2020-04-02) ## [4.3.7](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.6...react-navigation@4.3.7) (2020-04-02)
**Note:** Version bump only for package react-navigation **Note:** Version bump only for package react-navigation

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation", "name": "react-navigation",
"version": "4.3.7", "version": "4.4.0",
"description": "Routing and navigation for your React Native apps", "description": "Routing and navigation for your React Native apps",
"main": "src/index.js", "main": "src/index.js",
"types": "typescript/react-navigation.d.ts", "types": "typescript/react-navigation.d.ts",
@@ -24,8 +24,8 @@
"react-native": "*" "react-native": "*"
}, },
"dependencies": { "dependencies": {
"@react-navigation/core": "^3.7.5", "@react-navigation/core": "^3.7.6",
"@react-navigation/native": "^3.7.11" "@react-navigation/native": "^3.8.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^16.9.23", "@types/react": "^16.9.23",
@@ -34,6 +34,6 @@
"react": "~16.9.0", "react": "~16.9.0",
"react-native": "~0.61.5", "react-native": "~0.61.5",
"react-test-renderer": "^16.9.2", "react-test-renderer": "^16.9.2",
"typescript": "~3.8.3" "typescript": "^3.9.5"
} }
} }

View File

@@ -1,3 +1,3 @@
export default function docsUrl(path) { export default function docsUrl(path) {
return `https://reactnavigation.org/docs/${path}`; return `https://reactnavigation.org/docs/4.x/${path}`;
} }

View File

@@ -734,7 +734,9 @@ export namespace StackActions {
export const REPLACE: 'Navigation/REPLACE'; export const REPLACE: 'Navigation/REPLACE';
export const COMPLETE_TRANSITION: 'Navigation/COMPLETE_TRANSITION'; export const COMPLETE_TRANSITION: 'Navigation/COMPLETE_TRANSITION';
export function pop(options: NavigationPopActionPayload): NavigationPopAction; export function pop(
options?: NavigationPopActionPayload
): NavigationPopAction;
export function popToTop( export function popToTop(
options?: NavigationPopToTopActionPayload options?: NavigationPopToTopActionPayload
): NavigationPopToTopAction; ): NavigationPopToTopAction;
@@ -810,17 +812,15 @@ export interface NavigationDescriptor<
getComponent: () => React.ComponentType; getComponent: () => React.ComponentType;
} }
export type NavigationView< export type NavigationView<Options, State, ScreenProps = unknown> =
Options, | React.ComponentType<
State, {
ScreenProps = unknown descriptors: { [key: string]: NavigationDescriptor };
> = React.ComponentType< navigationConfig: Options;
{ screenProps?: ScreenProps;
descriptors: { [key: string]: NavigationDescriptor }; } & NavigationInjectedProps
navigationConfig: Options; >
screenProps?: ScreenProps; | React.ComponentType<any>;
} & NavigationInjectedProps
>;
export type CreateNavigatorConfig< export type CreateNavigatorConfig<
NavigatorConfig, NavigatorConfig,

View File

@@ -3,6 +3,91 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.8.0](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.7.0...react-navigation-stack@2.8.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/react-navigation-stack/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
# [2.7.0](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.6.0...react-navigation-stack@2.7.0) (2020-06-08)
### Features
* sync latest stack ([ba6d7dc](https://github.com/react-navigation/react-navigation-stack/commit/ba6d7dcbedcfca774a53de32f92acc45140bb1fe))
# [2.6.0](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.5.1...react-navigation-stack@2.6.0) (2020-06-06)
### Features
* sync latest stack ([03f9f8c](https://github.com/react-navigation/react-navigation-stack/commit/03f9f8cd8ec3b5fe9dc2ed1ed2024e79dd06f854))
## [2.5.1](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.5.0...react-navigation-stack@2.5.1) (2020-05-15)
### Bug Fixes
* sync latest stack ([bc1313b](https://github.com/react-navigation/react-navigation-stack/commit/bc1313b61da6134255adff477ded2ed8f632bf4a))
# [2.5.0](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.4.0...react-navigation-stack@2.5.0) (2020-05-11)
### Features
* sync latest stack ([bb82d50](https://github.com/react-navigation/react-navigation-stack/commit/bb82d5000f6577f421cc7f72df8064eb4c2a0650))
# [2.4.0](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.13...react-navigation-stack@2.4.0) (2020-04-30)
### Features
* sync latest stack ([8b79e9b](https://github.com/react-navigation/react-navigation-stack/commit/8b79e9bee65c3ba6a788ca76771379319168f117))
## [2.3.13](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.12...react-navigation-stack@2.3.13) (2020-04-22)
**Note:** Version bump only for package react-navigation-stack
## [2.3.12](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.11...react-navigation-stack@2.3.12) (2020-04-17)
### Bug Fixes
* stack peer warnings ([4c4e66f](https://github.com/react-navigation/react-navigation-stack/commit/4c4e66f05cd4d694f512f4cc38827f3fbf0f70de))
## [2.3.11](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.10...react-navigation-stack@2.3.11) (2020-04-02) ## [2.3.11](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.10...react-navigation-stack@2.3.11) (2020-04-02)
**Note:** Version bump only for package react-navigation-stack **Note:** Version bump only for package react-navigation-stack

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation-stack", "name": "react-navigation-stack",
"version": "2.3.11", "version": "2.8.0",
"description": "Stack navigator component for React Navigation", "description": "Stack navigator component for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"module": "lib/module/index.js", "module": "lib/module/index.js",
@@ -45,7 +45,7 @@
"devDependencies": { "devDependencies": {
"@react-native-community/bob": "^0.10.0", "@react-native-community/bob": "^0.10.0",
"@react-native-community/masked-view": "^0.1.7", "@react-native-community/masked-view": "^0.1.7",
"@react-navigation/stack": "^5.2.9", "@react-navigation/stack": "^5.6.0",
"@types/color": "^3.0.1", "@types/color": "^3.0.1",
"@types/react": "^16.9.23", "@types/react": "^16.9.23",
"@types/react-native": "^0.61.22", "@types/react-native": "^0.61.22",
@@ -56,16 +56,16 @@
"react-native-gesture-handler": "^1.6.0", "react-native-gesture-handler": "^1.6.0",
"react-native-safe-area-context": "^0.7.3", "react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.3.0", "react-native-screens": "^2.3.0",
"react-navigation": "^4.3.7", "react-navigation": "^4.4.0",
"react-test-renderer": "~16.9.0", "react-test-renderer": "~16.9.0",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"@react-native-community/masked-view": "^0.1.1", "@react-native-community/masked-view": ">=0.1.0",
"react": "*", "react": "*",
"react-native": "*", "react-native": "*",
"react-native-gesture-handler": "^1.5.0", "react-native-gesture-handler": ">= 1.5.0",
"react-native-safe-area-context": "^0.6.0", "react-native-safe-area-context": ">= 0.6.0",
"react-native-screens": ">=1.0.0 || >= 2.0.0-alpha.0 || >= 2.0.0-beta.0 || >= 2.0.0", "react-native-screens": ">=1.0.0 || >= 2.0.0-alpha.0 || >= 2.0.0-beta.0 || >= 2.0.0",
"react-navigation": "^4.1.1" "react-navigation": "^4.1.1"
}, },

View File

@@ -1,6 +1,6 @@
diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx
--- ../../node_modules/@react-navigation/stack/src/index.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/index.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/index.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/index.tsx 2020-06-24 23:16:17.000000000 +0200
@@ -3,11 +3,6 @@ @@ -3,11 +3,6 @@
import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs'; import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
import * as TransitionPresets from './TransitionConfigs/TransitionPresets'; import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
@@ -16,22 +16,23 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/i
@@ -49,9 +44,10 @@ @@ -49,9 +44,10 @@
* Types * Types
*/ */
export { export type {
- StackNavigationOptions, - StackNavigationOptions,
- StackNavigationProp, - StackNavigationProp,
- StackHeaderProps, - StackScreenProps,
+ NavigationStackState, + NavigationStackState,
+ StackNavigationProp as NavigationStackProp, + StackNavigationProp as NavigationStackProp,
+ StackNavigationOptions as NavigationStackOptions, + StackNavigationOptions as NavigationStackOptions,
+ StackNavigationConfig as NavigationStackConfig, + StackNavigationConfig as NavigationStackConfig,
StackHeaderProps,
StackHeaderLeftButtonProps, StackHeaderLeftButtonProps,
StackHeaderTitleProps, StackHeaderTitleProps,
StackCardInterpolatedStyle,
diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx
--- ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100 +++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100
@@ -1,81 +0,0 @@ @@ -1,96 +0,0 @@
-import * as React from 'react'; -import * as React from 'react';
-import { Platform } from 'react-native';
-import { -import {
- useNavigationBuilder, - useNavigationBuilder,
- createNavigatorFactory, - createNavigatorFactory,
@@ -43,7 +44,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStack
- StackActions, - StackActions,
-} from '@react-navigation/native'; -} from '@react-navigation/native';
-import StackView from '../views/Stack/StackView'; -import StackView from '../views/Stack/StackView';
-import { -import type {
- StackNavigationConfig, - StackNavigationConfig,
- StackNavigationOptions, - StackNavigationOptions,
- StackNavigationEventMap, - StackNavigationEventMap,
@@ -59,6 +60,11 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStack
- screenOptions, - screenOptions,
- ...rest - ...rest
-}: Props) { -}: Props) {
- const defaultOptions = {
- gestureEnabled: Platform.OS === 'ios',
- animationEnabled: Platform.OS !== 'web',
- };
-
- const { state, descriptors, navigation } = useNavigationBuilder< - const { state, descriptors, navigation } = useNavigationBuilder<
- StackNavigationState, - StackNavigationState,
- StackRouterOptions, - StackRouterOptions,
@@ -67,7 +73,16 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStack
- >(StackRouter, { - >(StackRouter, {
- initialRouteName, - initialRouteName,
- children, - children,
- screenOptions, - screenOptions:
- typeof screenOptions === 'function'
- ? (...args) => ({
- ...defaultOptions,
- ...screenOptions(...args),
- })
- : {
- ...defaultOptions,
- ...screenOptions,
- },
- }); - });
- -
- React.useEffect( - React.useEffect(
@@ -113,12 +128,12 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStack
- typeof StackNavigator - typeof StackNavigator
->(StackNavigator); ->(StackNavigator);
diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx
--- ../../node_modules/@react-navigation/stack/src/types.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/types.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/types.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/types.tsx 2020-06-24 23:18:40.000000000 +0200
@@ -8,14 +8,28 @@ @@ -8,15 +8,28 @@
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import { import type {
+ NavigationRoute, + NavigationRoute,
+ NavigationState, + NavigationState,
+ NavigationScreenProp, + NavigationScreenProp,
@@ -129,6 +144,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
- NavigationHelpers, - NavigationHelpers,
- StackNavigationState, - StackNavigationState,
- StackActionHelpers, - StackActionHelpers,
- RouteProp,
-} from '@react-navigation/native'; -} from '@react-navigation/native';
+ NavigationParams, + NavigationParams,
+ NavigationNavigateAction, + NavigationNavigateAction,
@@ -151,7 +167,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
export type StackNavigationEventMap = { export type StackNavigationEventMap = {
/** /**
@@ -28,22 +42,29 @@ @@ -29,29 +42,28 @@
transitionEnd: { data: { closing: boolean } }; transitionEnd: { data: { closing: boolean } };
}; };
@@ -172,6 +188,13 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
- StackNavigationEventMap - StackNavigationEventMap
-> & -> &
- StackActionHelpers<ParamList>; - StackActionHelpers<ParamList>;
-
-export type StackScreenProps<
- ParamList extends ParamListBase,
- RouteName extends keyof ParamList = string
-> = {
- navigation: StackNavigationProp<ParamList, RouteName>;
- route: RouteProp<ParamList, RouteName>;
+ State = NavigationRoute, + State = NavigationRoute,
+ Params = NavigationParams + Params = NavigationParams
+> = NavigationScreenProp<State, Params> & { +> = NavigationScreenProp<State, Params> & {
@@ -192,11 +215,10 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
+ event: NavigationStackEventName, + event: NavigationStackEventName,
+ callback: NavigationEventCallback + callback: NavigationEventCallback
+ ) => NavigationEventSubscription; + ) => NavigationEventSubscription;
+}; };
export type Layout = { width: number; height: number }; export type Layout = { width: number; height: number };
@@ -228,24 +240,27 @@
@@ -218,24 +239,27 @@
/** /**
* Navigation prop for the header. * Navigation prop for the header.
*/ */
@@ -230,7 +252,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
export type StackNavigationOptions = StackHeaderOptions & export type StackNavigationOptions = StackHeaderOptions &
Partial<TransitionPreset> & { Partial<TransitionPreset> & {
/** /**
@@ -317,6 +341,8 @@ @@ -330,6 +345,8 @@
bottom?: number; bottom?: number;
left?: number; left?: number;
}; };
@@ -239,28 +261,40 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
}; };
export type StackNavigationConfig = { export type StackNavigationConfig = {
diff -Naur ../../node_modules/@react-navigation/stack/src/utils/PreviousSceneContext.tsx src/vendor/utils/PreviousSceneContext.tsx
--- ../../node_modules/@react-navigation/stack/src/utils/PreviousSceneContext.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/utils/PreviousSceneContext.tsx 2020-06-24 23:26:38.000000000 +0200
@@ -1,6 +1,5 @@
import * as React from 'react';
-import type { Route } from '@react-navigation/native';
-import type { Scene } from '../types';
+import type { Route, Scene } from '../types';
const PreviousSceneContext = React.createContext<
Scene<Route<string>> | undefined
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/Header.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/Header.tsx 2020-06-24 23:33:25.000000000 +0200
@@ -1,12 +1,14 @@ @@ -1,12 +1,15 @@
import * as React from 'react'; import * as React from 'react';
-import { StackActions } from '@react-navigation/native'; -import { StackActions } from '@react-navigation/native';
+import { Dimensions } from 'react-native'; +import { Dimensions } from 'react-native';
+import { StackActions } from 'react-navigation'; +import { StackActions } from 'react-navigation';
+import { getStatusBarHeight } from 'react-native-iphone-x-helper'; +import { getStatusBarHeight } from 'react-native-iphone-x-helper';
+
+import HeaderSegment, { getDefaultHeaderHeight } from './HeaderSegment';
-import HeaderSegment from './HeaderSegment'; -import HeaderSegment from './HeaderSegment';
+import HeaderSegment, { getDefaultHeaderHeight } from './HeaderSegment';
import HeaderTitle from './HeaderTitle'; import HeaderTitle from './HeaderTitle';
import debounce from '../../utils/debounce'; import debounce from '../../utils/debounce';
import { StackHeaderProps, StackHeaderTitleProps } from '../../types'; import type { StackHeaderProps, StackHeaderTitleProps } from '../../types';
-export default React.memo(function Header(props: StackHeaderProps) { -export default React.memo(function Header(props: StackHeaderProps) {
+const Header = React.memo(function Header(props: StackHeaderProps) { +const Header = React.memo(function Header(props: StackHeaderProps) {
const { const {
scene, scene,
previous, previous,
@@ -22,7 +24,7 @@ @@ -22,7 +25,7 @@
? options.headerTitle ? options.headerTitle
: options.title !== undefined : options.title !== undefined
? options.title ? options.title
@@ -269,7 +303,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
let leftLabel; let leftLabel;
@@ -38,17 +40,12 @@ @@ -38,17 +41,18 @@
? o.headerTitle ? o.headerTitle
: o.title !== undefined : o.title !== undefined
? o.title ? o.title
@@ -277,6 +311,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
+ : previous.route.routeName; + : previous.route.routeName;
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
const goBack = React.useCallback( const goBack = React.useCallback(
debounce(() => { debounce(() => {
- if (navigation.isFocused() && navigation.canGoBack()) { - if (navigation.isFocused() && navigation.canGoBack()) {
@@ -284,12 +319,16 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
- ...StackActions.pop(), - ...StackActions.pop(),
- source: scene.route.key, - source: scene.route.key,
- }); - });
- } + if (navigation.isFirstRouteInParent()) {
+ navigation.dispatch(StackActions.pop({ key: scene.route.key })); + // If we're the first route, we're going back to a parent navigator
+ // So we can't specify a key here
+ navigation.dispatch(StackActions.pop());
+ } else {
+ navigation.dispatch(StackActions.pop({ key: scene.route.key }));
}
}, 50), }, 50),
[navigation, scene.route.key] [navigation, scene.route.key]
); @@ -64,7 +68,10 @@
@@ -63,7 +60,10 @@
leftLabel={leftLabel} leftLabel={leftLabel}
headerTitle={ headerTitle={
typeof options.headerTitle !== 'function' typeof options.headerTitle !== 'function'
@@ -301,7 +340,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
: options.headerTitle : options.headerTitle
} }
onGoBack={previous ? goBack : undefined} onGoBack={previous ? goBack : undefined}
@@ -71,3 +71,18 @@ @@ -72,3 +79,18 @@
/> />
); );
}); });
@@ -321,33 +360,34 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
+ +
+export default Header; +export default Header;
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/HeaderBackButton.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/HeaderBackButton.tsx 2020-06-24 23:21:49.000000000 +0200
@@ -8,9 +8,9 @@ @@ -8,9 +8,9 @@
StyleSheet, StyleSheet,
LayoutChangeEvent, LayoutChangeEvent,
} from 'react-native'; } from 'react-native';
-import { useTheme } from '@react-navigation/native'; -import { useTheme } from '@react-navigation/native';
import MaskedView from '../MaskedView'; import MaskedView from '../MaskedView';
import TouchableItem from '../TouchableItem'; import { TouchableItem } from '../TouchableItem';
+import useTheme from '../../../utils/useTheme'; +import useTheme from '../../../utils/useTheme';
import { StackHeaderLeftButtonProps } from '../../types'; import type { StackHeaderLeftButtonProps } from '../../types';
type Props = StackHeaderLeftButtonProps; type Props = StackHeaderLeftButtonProps;
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/HeaderBackground.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/HeaderBackground.tsx 2020-06-24 23:16:23.000000000 +0200
@@ -1,6 +1,6 @@ @@ -7,7 +7,7 @@
import * as React from 'react'; StyleProp,
import { Animated, StyleSheet, Platform, ViewProps } from 'react-native'; ViewStyle,
} from 'react-native';
-import { useTheme } from '@react-navigation/native'; -import { useTheme } from '@react-navigation/native';
+import useTheme from '../../../utils/useTheme'; +import useTheme from '../../../utils/useTheme';
type Props = ViewProps & { type Props = ViewProps & {
children?: React.ReactNode; style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/HeaderContainer.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/HeaderContainer.tsx 2020-06-24 23:21:29.000000000 +0200
@@ -1,11 +1,6 @@ @@ -1,11 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
@@ -358,18 +398,18 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderCon
- ParamListBase, - ParamListBase,
-} from '@react-navigation/native'; -} from '@react-navigation/native';
+import { NavigationContext } from 'react-navigation'; +import { NavigationContext } from 'react-navigation';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import Header from './Header'; import Header from './Header';
@@ -16,6 +11,7 @@ @@ -19,6 +14,7 @@
forSlideRight, import PreviousSceneContext from '../../utils/PreviousSceneContext';
} from '../../TransitionConfigs/HeaderStyleInterpolators'; import type {
import {
+ Route,
Layout, Layout,
+ Route,
Scene, Scene,
StackHeaderStyleInterpolator, StackHeaderStyleInterpolator,
@@ -99,9 +95,7 @@ StackNavigationProp,
@@ -109,9 +105,7 @@
insets, insets,
scene, scene,
previous, previous,
@@ -380,7 +420,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderCon
styleInterpolator: styleInterpolator:
mode === 'float' mode === 'float'
? isHeaderStatic ? isHeaderStatic
@@ -120,7 +114,7 @@ @@ -130,7 +124,7 @@
key={scene.route.key} key={scene.route.key}
value={scene.descriptor.navigation} value={scene.descriptor.navigation}
> >
@@ -389,9 +429,9 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderCon
<View <View
onLayout={ onLayout={
onContentHeightChange onContentHeightChange
@@ -152,7 +146,7 @@ @@ -156,7 +150,7 @@
) >
) : null} {header !== undefined ? header(props) : <Header {...props} />}
</View> </View>
- </NavigationRouteContext.Provider> - </NavigationRouteContext.Provider>
+ </> + </>
@@ -399,14 +439,14 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderCon
); );
})} })}
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/HeaderSegment.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/HeaderSegment.tsx 2020-06-24 23:20:58.000000000 +0200
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
ViewStyle, ViewStyle,
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
-import { Route } from '@react-navigation/native'; -import type { Route } from '@react-navigation/native';
+import { NavigationRoute } from 'react-navigation'; +import type { NavigationRoute } from 'react-navigation';
import HeaderBackButton from './HeaderBackButton'; import HeaderBackButton from './HeaderBackButton';
import HeaderBackground from './HeaderBackground'; import HeaderBackground from './HeaderBackground';
import memoize from '../../utils/memoize'; import memoize from '../../utils/memoize';
@@ -420,20 +460,20 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSeg
}; };
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Header/HeaderTitle.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Header/HeaderTitle.tsx 2020-06-24 23:16:23.000000000 +0200
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import { Animated, StyleSheet, Platform } from 'react-native'; import { Animated, StyleSheet, Platform } from 'react-native';
-import { useTheme } from '@react-navigation/native'; -import { useTheme } from '@react-navigation/native';
+import useTheme from '../../../utils/useTheme'; +import useTheme from '../../../utils/useTheme';
type Props = React.ComponentProps<typeof Animated.Text> & { type Props = Omit<React.ComponentProps<typeof Animated.Text>, 'key'> & {
tintColor?: string; tintColor?: string;
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Stack/Card.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Stack/Card.tsx 2020-06-24 23:16:23.000000000 +0200
@@ -138,7 +138,7 @@ @@ -146,7 +146,7 @@
private interactionHandle: number | undefined; private interactionHandle: number | undefined;
@@ -443,83 +483,71 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx s
private animate = ({ private animate = ({
closing, closing,
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Stack/CardContainer.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Stack/CardContainer.tsx 2020-06-24 23:20:38.000000000 +0200
@@ -1,10 +1,16 @@ @@ -1,12 +1,13 @@
import * as React from 'react'; import * as React from 'react';
import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
-import { Route, useTheme } from '@react-navigation/native'; -import { Route, useTheme } from '@react-navigation/native';
import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; import type { Props as HeaderContainerProps } from '../Header/HeaderContainer';
import Card from './Card'; import Card from './Card';
import HeaderHeightContext from '../../utils/HeaderHeightContext'; import HeaderHeightContext from '../../utils/HeaderHeightContext';
-import { Scene, Layout, StackHeaderMode, TransitionPreset } from '../../types'; import HeaderShownContext from '../../utils/HeaderShownContext';
import PreviousSceneContext from '../../utils/PreviousSceneContext';
+import useTheme from '../../../utils/useTheme'; +import useTheme from '../../../utils/useTheme';
+import { import type {
+ Route, + Route,
+ Scene, Scene,
+ Layout, Layout,
+ StackHeaderMode, StackHeaderMode,
+ TransitionPreset,
+} from '../../types';
type Props = TransitionPreset & {
index: number;
@@ -183,7 +189,7 @@
? { marginTop: headerHeight }
: null
}
- contentStyle={[{ backgroundColor: colors.background }, cardStyle]}
+ contentStyle={[{ backgroundColor: colors.background }, cardStyle] as any}
style={StyleSheet.absoluteFill}
>
<View style={styles.container}>
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Stack/CardStack.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Stack/CardStack.tsx 2020-06-24 23:20:16.000000000 +0200
@@ -9,9 +9,8 @@ @@ -7,7 +7,7 @@
ViewProps, Platform,
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
-// eslint-disable-next-line import/no-unresolved -import type { Route, StackNavigationState } from '@react-navigation/native';
import { ScreenContainer, Screen, screensEnabled } from 'react-native-screens'; // Import with * as to prevent getters being called +import type { NavigationState as StackNavigationState } from 'react-navigation';
-import { Route, StackNavigationState } from '@react-navigation/native';
+import { NavigationState as StackNavigationState } from 'react-navigation';
import { MaybeScreenContainer, MaybeScreen } from '../Screens';
import { getDefaultHeaderHeight } from '../Header/HeaderSegment'; import { getDefaultHeaderHeight } from '../Header/HeaderSegment';
import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; @@ -25,6 +25,7 @@
@@ -24,6 +23,7 @@
import { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';
import getDistanceForDirection from '../../utils/getDistanceForDirection';
import {
+ Route,
Layout, Layout,
StackHeaderMode, StackHeaderMode,
StackCardMode, StackCardMode,
+ Route,
Scene,
StackDescriptorMap,
StackNavigationOptions,
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx
--- ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-03-31 17:47:04.000000000 +0200 --- ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-06-24 23:11:52.000000000 +0200
+++ src/vendor/views/Stack/StackView.tsx 2020-03-31 18:06:18.000000000 +0200 +++ src/vendor/views/Stack/StackView.tsx 2020-06-24 23:19:46.000000000 +0200
@@ -4,9 +4,9 @@ @@ -2,11 +2,11 @@
import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { View, Platform, StyleSheet } from 'react-native';
import { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context';
import { import {
- NavigationHelpersContext,
StackActions, StackActions,
- StackNavigationState, - StackNavigationState,
- Route, - Route,
-} from '@react-navigation/native'; -} from '@react-navigation/native';
+ NavigationState as StackNavigationState, + NavigationState as StackNavigationState,
+ NavigationActions,
+ SceneView, + SceneView,
+} from 'react-navigation'; +} from 'react-navigation';
import { GestureHandlerRootView } from '../GestureHandler';
import CardStack from './CardStack'; import CardStack from './CardStack';
import KeyboardManager from '../KeyboardManager'; @@ -16,6 +16,7 @@
@@ -15,6 +15,7 @@
} from '../Header/HeaderContainer'; } from '../Header/HeaderContainer';
import SafeAreaProviderCompat from '../SafeAreaProviderCompat'; import SafeAreaProviderCompat from '../SafeAreaProviderCompat';
import { import type {
+ Route, + Route,
StackNavigationHelpers, StackNavigationHelpers,
StackNavigationConfig, StackNavigationConfig,
StackDescriptorMap, StackDescriptorMap,
@@ -24,6 +25,7 @@ @@ -25,6 +26,7 @@
state: StackNavigationState; state: StackNavigationState;
navigation: StackNavigationHelpers; navigation: StackNavigationHelpers;
descriptors: StackDescriptorMap; descriptors: StackDescriptorMap;
@@ -527,7 +555,18 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
}; };
type State = { type State = {
@@ -322,14 +324,37 @@ @@ -293,7 +295,9 @@
return false;
}
- return gestureEnabled !== false;
+ return gestureEnabled !== undefined
+ ? gestureEnabled
+ : Platform.OS !== 'android';
}
return false;
@@ -321,26 +325,49 @@
return null; return null;
} }
@@ -562,11 +601,25 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
+ }; + };
+ +
private handleOpenRoute = ({ route }: { route: Route<string> }) => { private handleOpenRoute = ({ route }: { route: Route<string> }) => {
const { state, navigation } = this.props;
const { closingRouteKeys, replacingRouteKeys } = this.state;
+ this.handleTransitionComplete(); + this.handleTransitionComplete();
this.setState((state) => ({ +
routes: state.replacingRouteKeys.length if (
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key)) closingRouteKeys.some((key) => key === route.key) &&
@@ -351,12 +376,11 @@ replacingRouteKeys.every((key) => key !== route.key) &&
- state.routeNames.includes(route.name) &&
!state.routes.some((r) => r.key === route.key)
) {
// If route isn't present in current state, but was closing, assume that a close animation was cancelled
// So we need to add this route back to the state
- navigation.navigate(route);
+ navigation.dispatch(NavigationActions.navigate(route));
} else {
this.setState((state) => ({
routes: state.replacingRouteKeys.length
@@ -366,12 +393,11 @@
// If a route exists in state, trigger a pop // If a route exists in state, trigger a pop
// This will happen in when the route was closed from the card component // This will happen in when the route was closed from the card component
// e.g. When the close animation triggered from a gesture ends // e.g. When the close animation triggered from a gesture ends
@@ -583,7 +636,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
// We need to clean up any state tracking the route and pop it immediately // We need to clean up any state tracking the route and pop it immediately
this.setState((state) => ({ this.setState((state) => ({
routes: state.routes.filter((r) => r.key !== route.key), routes: state.routes.filter((r) => r.key !== route.key),
@@ -373,22 +397,24 @@ @@ -388,26 +414,29 @@
private handleTransitionStart = ( private handleTransitionStart = (
{ route }: { route: Route<string> }, { route }: { route: Route<string> },
closing: boolean closing: boolean
@@ -620,3 +673,26 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
render() { render() {
const { const {
state,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
navigation,
keyboardHandlingEnabled,
mode = 'card',
@@ -427,7 +456,7 @@
} = this.state;
return (
- <NavigationHelpersContext.Provider value={navigation}>
+ <>
<GestureHandlerWrapper style={styles.container}>
<SafeAreaProviderCompat>
<SafeAreaConsumer>
@@ -460,7 +489,7 @@
</SafeAreaConsumer>
</SafeAreaProviderCompat>
</GestureHandlerWrapper>
- </NavigationHelpersContext.Provider>
+ </>
);
}
}

View File

@@ -8,7 +8,7 @@ export { default as createStackNavigator } from './navigators/createStackNavigat
/** /**
* Types * Types
*/ */
export { export type {
NavigationStackScreenComponent, NavigationStackScreenComponent,
NavigationStackScreenProps, NavigationStackScreenProps,
} from './types'; } from './types';

View File

@@ -9,7 +9,7 @@ import createAppContainer, {
_TESTING_ONLY_reset_container_count, _TESTING_ONLY_reset_container_count,
// @ts-ignore // @ts-ignore
} from '../../../../native/src/createAppContainer'; } from '../../../../native/src/createAppContainer';
import { StackNavigationProp } from '../../vendor/types'; import type { StackNavigationProp } from '../../vendor/types';
const NavigationTestUtils = { const NavigationTestUtils = {
resetInternalState: _TESTING_ONLY_reset_container_count, resetInternalState: _TESTING_ONLY_reset_container_count,

View File

@@ -8,12 +8,119 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
} }
} }
> >
<View
pointerEvents="box-none"
style={
Array [
Object {
"zIndex": 1,
},
false,
]
}
>
<View
accessibilityElementsHidden={false}
importantForAccessibility="auto"
onLayout={[Function]}
pointerEvents="box-none"
style={null}
>
<View
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"opacity": 1,
"position": "absolute",
"right": 0,
"top": 0,
"zIndex": 0,
}
}
>
<View
style={
Object {
"backgroundColor": "#fff",
"borderBottomColor": "#a7a7aa",
"flex": 1,
"shadowColor": "#a7a7aa",
"shadowOffset": Object {
"height": 0.5,
"width": 0,
},
"shadowOpacity": 0.85,
"shadowRadius": 0,
}
}
/>
</View>
<View
pointerEvents="box-none"
style={
Object {
"height": 44,
"maxHeight": undefined,
"minHeight": undefined,
"opacity": undefined,
"transform": undefined,
}
}
>
<View
pointerEvents="none"
style={
Object {
"height": 0,
}
}
/>
<View
pointerEvents="box-none"
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"justifyContent": "center",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"marginHorizontal": 16,
"opacity": 1,
}
}
>
<Text
accessibilityRole="header"
numberOfLines={1}
onLayout={[Function]}
style={
Object {
"color": "rgba(0, 0, 0, 0.9)",
"fontSize": 17,
"fontWeight": "600",
}
}
>
Sub
</Text>
</View>
</View>
</View>
</View>
</View>
<View <View
onLayout={[Function]} onLayout={[Function]}
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"overflow": "hidden",
} }
} }
> >
@@ -29,6 +136,14 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
} }
} }
> >
<View
collapsable={false}
style={
Object {
"opacity": 1,
}
}
/>
<View <View
accessibilityElementsHidden={false} accessibilityElementsHidden={false}
closing={false} closing={false}
@@ -57,8 +172,8 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -68,8 +183,8 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -81,7 +196,6 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"marginTop": 44,
} }
} }
> >
@@ -115,7 +229,7 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
pointerEvents="none" pointerEvents="none"
style={ style={
Object { Object {
"backgroundColor": "#fff", "backgroundColor": "rgb(242, 242, 242)",
"bottom": 0, "bottom": 0,
"left": 0, "left": 0,
"position": "absolute", "position": "absolute",
@@ -174,7 +288,6 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"overflow": "hidden",
} }
} }
> >
@@ -190,6 +303,14 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
} }
} }
> >
<View
collapsable={false}
style={
Object {
"opacity": 1,
}
}
/>
<View <View
accessibilityElementsHidden={false} accessibilityElementsHidden={false}
closing={false} closing={false}
@@ -218,8 +339,8 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -229,8 +350,8 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -242,7 +363,7 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"marginTop": 44, "marginTop": 0,
} }
} }
> >
@@ -276,7 +397,7 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
pointerEvents="none" pointerEvents="none"
style={ style={
Object { Object {
"backgroundColor": "#fff", "backgroundColor": "rgb(242, 242, 242)",
"bottom": 0, "bottom": 0,
"left": 0, "left": 0,
"position": "absolute", "position": "absolute",
@@ -334,110 +455,19 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
<View <View
pointerEvents="box-none" pointerEvents="box-none"
style={ style={
Object { Array [
"left": 0, Object {
"position": "absolute", "zIndex": 1,
"right": 0, },
"top": 0, Object {
} "left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
]
} }
> />
<View
accessibilityElementsHidden={false}
importantForAccessibility="auto"
onLayout={[Function]}
pointerEvents="box-none"
style={null}
>
<View
pointerEvents="none"
style={
Object {
"bottom": 0,
"left": 0,
"opacity": 1,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
style={
Object {
"backgroundColor": "#fff",
"borderBottomColor": "#a7a7aa",
"flex": 1,
"shadowColor": "#a7a7aa",
"shadowOffset": Object {
"height": 0.5,
"width": 0,
},
"shadowOpacity": 0.85,
"shadowRadius": 0,
}
}
/>
</View>
<View
pointerEvents="box-none"
style={
Object {
"height": 44,
"maxHeight": undefined,
"minHeight": undefined,
"opacity": undefined,
"transform": undefined,
}
}
>
<View
pointerEvents="none"
style={
Object {
"height": 0,
}
}
/>
<View
pointerEvents="box-none"
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"justifyContent": "center",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"marginHorizontal": 18,
"opacity": 1,
}
}
>
<Text
accessibilityRole="header"
numberOfLines={1}
onLayout={[Function]}
style={
Object {
"color": "rgba(0, 0, 0, 0.9)",
"fontSize": 17,
"fontWeight": "600",
}
}
>
Home
</Text>
</View>
</View>
</View>
</View>
</View>
</View> </View>
</View> </View>
</View> </View>
@@ -448,113 +478,6 @@ exports[`Nested navigators renders succesfully as direct child 1`] = `
</View> </View>
</View> </View>
</View> </View>
<View
pointerEvents="box-none"
style={
Object {
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
accessibilityElementsHidden={false}
importantForAccessibility="auto"
onLayout={[Function]}
pointerEvents="box-none"
style={null}
>
<View
pointerEvents="none"
style={
Object {
"bottom": 0,
"left": 0,
"opacity": 1,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
style={
Object {
"backgroundColor": "#fff",
"borderBottomColor": "#a7a7aa",
"flex": 1,
"shadowColor": "#a7a7aa",
"shadowOffset": Object {
"height": 0.5,
"width": 0,
},
"shadowOpacity": 0.85,
"shadowRadius": 0,
}
}
/>
</View>
<View
pointerEvents="box-none"
style={
Object {
"height": 44,
"maxHeight": undefined,
"minHeight": undefined,
"opacity": undefined,
"transform": undefined,
}
}
>
<View
pointerEvents="none"
style={
Object {
"height": 0,
}
}
/>
<View
pointerEvents="box-none"
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"justifyContent": "center",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"marginHorizontal": 18,
"opacity": 1,
}
}
>
<Text
accessibilityRole="header"
numberOfLines={1}
onLayout={[Function]}
style={
Object {
"color": "rgba(0, 0, 0, 0.9)",
"fontSize": 17,
"fontWeight": "600",
}
}
>
Sub
</Text>
</View>
</View>
</View>
</View>
</View>
</View> </View>
`; `;

View File

@@ -8,177 +8,15 @@ exports[`StackNavigator applies correct values when headerRight is present 1`] =
} }
} }
> >
<View
onLayout={[Function]}
style={
Object {
"flex": 1,
"overflow": "hidden",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
accessibilityElementsHidden={false}
closing={false}
gestureVelocityImpact={0.3}
importantForAccessibility="auto"
onClose={[Function]}
onGestureBegin={[Function]}
onGestureCanceled={[Function]}
onOpen={[Function]}
onTransitionStart={[Function]}
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
transitionSpec={
Object {
"close": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 0.01,
"restSpeedThreshold": 0.01,
"stiffness": 1000,
},
},
"open": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 0.01,
"restSpeedThreshold": 0.01,
"stiffness": 1000,
},
},
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"flex": 1,
"marginTop": 44,
}
}
>
<PanGestureHandler
enabled={false}
hitSlop={
Object {
"right": -700,
}
}
maxDeltaY={20}
minOffsetX={5}
onHandlerStateChange={[Function]}
>
<View
style={
Object {
"flex": 1,
"transform": Array [
Object {
"translateX": 0,
},
Object {
"translateX": 0,
},
],
}
}
>
<View
pointerEvents="none"
style={
Object {
"backgroundColor": "#fff",
"bottom": 0,
"left": 0,
"position": "absolute",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 1,
"width": -1,
},
"shadowOpacity": 0.3,
"shadowRadius": 5,
"top": 0,
"width": 3,
}
}
/>
<View
style={
Array [
Object {
"flex": 1,
"overflow": "hidden",
},
Array [
Object {
"backgroundColor": "rgb(242, 242, 242)",
},
undefined,
],
]
}
>
<View
style={
Object {
"flex": 1,
"flexDirection": "column-reverse",
}
}
>
<View
style={
Object {
"flex": 1,
}
}
/>
</View>
</View>
</View>
</PanGestureHandler>
</View>
</View>
</View>
</View>
<View <View
pointerEvents="box-none" pointerEvents="box-none"
style={ style={
Object { Array [
"left": 0, Object {
"position": "absolute", "zIndex": 1,
"right": 0, },
"top": 0, false,
} ]
} }
> >
<View <View
@@ -189,7 +27,7 @@ exports[`StackNavigator applies correct values when headerRight is present 1`] =
style={null} style={null}
> >
<View <View
pointerEvents="none" pointerEvents="box-none"
style={ style={
Object { Object {
"bottom": 0, "bottom": 0,
@@ -198,6 +36,7 @@ exports[`StackNavigator applies correct values when headerRight is present 1`] =
"position": "absolute", "position": "absolute",
"right": 0, "right": 0,
"top": 0, "top": 0,
"zIndex": 0,
} }
} }
> >
@@ -254,7 +93,7 @@ exports[`StackNavigator applies correct values when headerRight is present 1`] =
pointerEvents="box-none" pointerEvents="box-none"
style={ style={
Object { Object {
"marginHorizontal": 18, "marginHorizontal": 16,
"opacity": 1, "opacity": 1,
} }
} }
@@ -294,23 +133,11 @@ exports[`StackNavigator applies correct values when headerRight is present 1`] =
</View> </View>
</View> </View>
</View> </View>
</View>
`;
exports[`StackNavigator renders successfully 1`] = `
<View
style={
Object {
"flex": 1,
}
}
>
<View <View
onLayout={[Function]} onLayout={[Function]}
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"overflow": "hidden",
} }
} }
> >
@@ -326,6 +153,14 @@ exports[`StackNavigator renders successfully 1`] = `
} }
} }
> >
<View
collapsable={false}
style={
Object {
"opacity": 1,
}
}
/>
<View <View
accessibilityElementsHidden={false} accessibilityElementsHidden={false}
closing={false} closing={false}
@@ -354,8 +189,8 @@ exports[`StackNavigator renders successfully 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -365,8 +200,8 @@ exports[`StackNavigator renders successfully 1`] = `
"damping": 500, "damping": 500,
"mass": 3, "mass": 3,
"overshootClamping": true, "overshootClamping": true,
"restDisplacementThreshold": 0.01, "restDisplacementThreshold": 10,
"restSpeedThreshold": 0.01, "restSpeedThreshold": 10,
"stiffness": 1000, "stiffness": 1000,
}, },
}, },
@@ -378,7 +213,6 @@ exports[`StackNavigator renders successfully 1`] = `
style={ style={
Object { Object {
"flex": 1, "flex": 1,
"marginTop": 44,
} }
} }
> >
@@ -412,7 +246,7 @@ exports[`StackNavigator renders successfully 1`] = `
pointerEvents="none" pointerEvents="none"
style={ style={
Object { Object {
"backgroundColor": "#fff", "backgroundColor": "rgb(242, 242, 242)",
"bottom": 0, "bottom": 0,
"left": 0, "left": 0,
"position": "absolute", "position": "absolute",
@@ -467,15 +301,26 @@ exports[`StackNavigator renders successfully 1`] = `
</View> </View>
</View> </View>
</View> </View>
</View>
`;
exports[`StackNavigator renders successfully 1`] = `
<View
style={
Object {
"flex": 1,
}
}
>
<View <View
pointerEvents="box-none" pointerEvents="box-none"
style={ style={
Object { Array [
"left": 0, Object {
"position": "absolute", "zIndex": 1,
"right": 0, },
"top": 0, false,
} ]
} }
> >
<View <View
@@ -486,7 +331,7 @@ exports[`StackNavigator renders successfully 1`] = `
style={null} style={null}
> >
<View <View
pointerEvents="none" pointerEvents="box-none"
style={ style={
Object { Object {
"bottom": 0, "bottom": 0,
@@ -495,6 +340,7 @@ exports[`StackNavigator renders successfully 1`] = `
"position": "absolute", "position": "absolute",
"right": 0, "right": 0,
"top": 0, "top": 0,
"zIndex": 0,
} }
} }
> >
@@ -551,7 +397,7 @@ exports[`StackNavigator renders successfully 1`] = `
pointerEvents="box-none" pointerEvents="box-none"
style={ style={
Object { Object {
"marginHorizontal": 18, "marginHorizontal": 16,
"opacity": 1, "opacity": 1,
} }
} }
@@ -575,5 +421,173 @@ exports[`StackNavigator renders successfully 1`] = `
</View> </View>
</View> </View>
</View> </View>
<View
onLayout={[Function]}
style={
Object {
"flex": 1,
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
collapsable={false}
style={
Object {
"opacity": 1,
}
}
/>
<View
accessibilityElementsHidden={false}
closing={false}
gestureVelocityImpact={0.3}
importantForAccessibility="auto"
onClose={[Function]}
onGestureBegin={[Function]}
onGestureCanceled={[Function]}
onOpen={[Function]}
onTransitionStart={[Function]}
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
transitionSpec={
Object {
"close": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 10,
"restSpeedThreshold": 10,
"stiffness": 1000,
},
},
"open": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 10,
"restSpeedThreshold": 10,
"stiffness": 1000,
},
},
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"flex": 1,
}
}
>
<PanGestureHandler
enabled={false}
hitSlop={
Object {
"right": -700,
}
}
maxDeltaY={20}
minOffsetX={5}
onHandlerStateChange={[Function]}
>
<View
style={
Object {
"flex": 1,
"transform": Array [
Object {
"translateX": 0,
},
Object {
"translateX": 0,
},
],
}
}
>
<View
pointerEvents="none"
style={
Object {
"backgroundColor": "rgb(242, 242, 242)",
"bottom": 0,
"left": 0,
"position": "absolute",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 1,
"width": -1,
},
"shadowOpacity": 0.3,
"shadowRadius": 5,
"top": 0,
"width": 3,
}
}
/>
<View
style={
Array [
Object {
"flex": 1,
"overflow": "hidden",
},
Array [
Object {
"backgroundColor": "rgb(242, 242, 242)",
},
undefined,
],
]
}
>
<View
style={
Object {
"flex": 1,
"flexDirection": "column-reverse",
}
}
>
<View
style={
Object {
"flex": 1,
}
}
/>
</View>
</View>
</View>
</PanGestureHandler>
</View>
</View>
</View>
</View>
</View> </View>
`; `;

View File

@@ -7,7 +7,7 @@ import {
CreateNavigatorConfig, CreateNavigatorConfig,
} from 'react-navigation'; } from 'react-navigation';
import StackView from '../views/StackView'; import StackView from '../views/StackView';
import { import type {
StackNavigationConfig, StackNavigationConfig,
StackNavigationOptions, StackNavigationOptions,
StackNavigationProp, StackNavigationProp,

View File

@@ -1,10 +1,13 @@
import { import type {
NavigationRoute, NavigationRoute,
NavigationParams, NavigationParams,
NavigationScreenConfig, NavigationScreenConfig,
SupportedThemes, SupportedThemes,
} from 'react-navigation'; } from 'react-navigation';
import { StackNavigationProp, StackNavigationOptions } from './vendor/types'; import type {
StackNavigationProp,
StackNavigationOptions,
} from './vendor/types';
export type NavigationStackScreenProps< export type NavigationStackScreenProps<
Params = NavigationParams, Params = NavigationParams,

View File

@@ -1,5 +1,8 @@
import { StyleProp, ViewStyle } from 'react-native'; import type { StyleProp, ViewStyle } from 'react-native';
import { StackNavigationOptions, StackNavigationConfig } from '../vendor/types'; import type {
StackNavigationOptions,
StackNavigationConfig,
} from '../vendor/types';
type Validation = { type Validation = {
message: string; message: string;

View File

@@ -1,5 +1,5 @@
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import { StackNavigationOptions } from '../vendor/types'; import type { StackNavigationOptions } from '../vendor/types';
type Validation = { type Validation = {
check: (o: Record<string, any>) => boolean; check: (o: Record<string, any>) => boolean;

View File

@@ -1,7 +1,7 @@
import { Animated } from 'react-native'; import { Animated } from 'react-native';
import { isIphoneX } from 'react-native-iphone-x-helper'; import { isIphoneX } from 'react-native-iphone-x-helper';
import conditional from '../utils/conditional'; import conditional from '../utils/conditional';
import { import type {
StackCardInterpolationProps, StackCardInterpolationProps,
StackCardInterpolatedStyle, StackCardInterpolatedStyle,
} from '../types'; } from '../types';
@@ -164,6 +164,7 @@ export function forModalPresentationIOS({
borderTopLeftRadius: borderRadius, borderTopLeftRadius: borderRadius,
borderTopRightRadius: borderRadius, borderTopRightRadius: borderRadius,
marginTop: index === 0 ? 0 : statusBarHeight, marginTop: index === 0 ? 0 : statusBarHeight,
marginBottom: index === 0 ? 0 : topOffset,
transform: [{ translateY }, { scale }], transform: [{ translateY }, { scale }],
}, },
overlayStyle: { opacity: overlayOpacity }, overlayStyle: { opacity: overlayOpacity },

View File

@@ -1,5 +1,5 @@
import { Animated, I18nManager } from 'react-native'; import { Animated, I18nManager } from 'react-native';
import { import type {
StackHeaderInterpolationProps, StackHeaderInterpolationProps,
StackHeaderInterpolatedStyle, StackHeaderInterpolatedStyle,
} from '../types'; } from '../types';

View File

@@ -1,3 +1,4 @@
import { Platform } from 'react-native';
import { import {
forHorizontalIOS, forHorizontalIOS,
forVerticalIOS, forVerticalIOS,
@@ -14,8 +15,7 @@ import {
FadeOutToBottomAndroidSpec, FadeOutToBottomAndroidSpec,
FadeInFromBottomAndroidSpec, FadeInFromBottomAndroidSpec,
} from './TransitionSpecs'; } from './TransitionSpecs';
import { TransitionPreset } from '../types'; import type { TransitionPreset } from '../types';
import { Platform } from 'react-native';
const ANDROID_VERSION_PIE = 28; const ANDROID_VERSION_PIE = 28;

View File

@@ -1,5 +1,5 @@
import { Easing } from 'react-native'; import { Easing } from 'react-native';
import { TransitionSpec } from '../types'; import type { TransitionSpec } from '../types';
/** /**
* Exact values from UINavigationController's animation configuration. * Exact values from UINavigationController's animation configuration.
@@ -11,8 +11,8 @@ export const TransitionIOSSpec: TransitionSpec = {
damping: 500, damping: 500,
mass: 3, mass: 3,
overshootClamping: true, overshootClamping: true,
restDisplacementThreshold: 0.01, restDisplacementThreshold: 10,
restSpeedThreshold: 0.01, restSpeedThreshold: 10,
}, },
}; };

View File

@@ -43,11 +43,12 @@ export { default as useGestureHandlerRef } from './utils/useGestureHandlerRef';
/** /**
* Types * Types
*/ */
export { export type {
NavigationStackState, NavigationStackState,
StackNavigationProp as NavigationStackProp, StackNavigationProp as NavigationStackProp,
StackNavigationOptions as NavigationStackOptions, StackNavigationOptions as NavigationStackOptions,
StackNavigationConfig as NavigationStackConfig, StackNavigationConfig as NavigationStackConfig,
StackHeaderProps,
StackHeaderLeftButtonProps, StackHeaderLeftButtonProps,
StackHeaderTitleProps, StackHeaderTitleProps,
StackCardInterpolatedStyle, StackCardInterpolatedStyle,

View File

@@ -1,13 +1,13 @@
import * as React from 'react'; import type * as React from 'react';
import { import type {
Animated, Animated,
StyleProp, StyleProp,
TextStyle, TextStyle,
ViewStyle, ViewStyle,
LayoutChangeEvent, LayoutChangeEvent,
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import { import type {
NavigationRoute, NavigationRoute,
NavigationState, NavigationState,
NavigationScreenProp, NavigationScreenProp,
@@ -131,7 +131,7 @@ export type StackHeaderOptions = {
* This may lead to white space or overlap between `headerLeft` and `headerTitle` if a customized `headerLeft` is used. * This may lead to white space or overlap between `headerLeft` and `headerTitle` if a customized `headerLeft` is used.
* It can be solved by adjusting `left` and `right` style in `headerTitleContainerStyle` and `marginHorizontal` in `headerTitleStyle`. * It can be solved by adjusting `left` and `right` style in `headerTitleContainerStyle` and `marginHorizontal` in `headerTitleStyle`.
*/ */
headerTitleContainerStyle?: StyleProp<ViewStyle>; headerTitleContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/** /**
* Tint color for the header. * Tint color for the header.
*/ */
@@ -145,7 +145,8 @@ export type StackHeaderOptions = {
*/ */
headerBackAllowFontScaling?: boolean; headerBackAllowFontScaling?: boolean;
/** /**
* Title string used by the back button on iOS, or `null` to disable label. Defaults to the previous scene's `headerTitle`. * Title string used by the back button on iOS. Defaults to the previous scene's `headerTitle`.
* Use `headerBackTitleVisible: false` to hide it.
*/ */
headerBackTitle?: string; headerBackTitle?: string;
/** /**
@@ -169,7 +170,7 @@ export type StackHeaderOptions = {
/** /**
* Style object for the container of the `headerLeft` component, for example to add padding. * Style object for the container of the `headerLeft` component, for example to add padding.
*/ */
headerLeftContainerStyle?: StyleProp<ViewStyle>; headerLeftContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/** /**
* Function which returns a React Element to display on the right side of the header. * Function which returns a React Element to display on the right side of the header.
*/ */
@@ -177,7 +178,7 @@ export type StackHeaderOptions = {
/** /**
* Style object for the container of the `headerRight` component, for example to add padding. * Style object for the container of the `headerRight` component, for example to add padding.
*/ */
headerRightContainerStyle?: StyleProp<ViewStyle>; headerRightContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/** /**
* Function which returns a React Element to display custom image in header's back button. * Function which returns a React Element to display custom image in header's back button.
* It receives the `tintColor` in in the options object as an argument. object. * It receives the `tintColor` in in the options object as an argument. object.
@@ -199,7 +200,7 @@ export type StackHeaderOptions = {
/** /**
* Style object for the header. You can specify a custom background color here, for example. * Style object for the header. You can specify a custom background color here, for example.
*/ */
headerStyle?: StyleProp<ViewStyle>; headerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
/** /**
* Defaults to `false`. If `true`, the header will not have a background unless you explicitly provide it with `headerBackground`. * Defaults to `false`. If `true`, the header will not have a background unless you explicitly provide it with `headerBackground`.
* The header will also float over the screen so that it overlaps the content underneath. * The header will also float over the screen so that it overlaps the content underneath.
@@ -300,7 +301,8 @@ export type StackNavigationOptions = StackHeaderOptions &
cardStyle?: StyleProp<ViewStyle>; cardStyle?: StyleProp<ViewStyle>;
/** /**
* Whether transition animation should be enabled the screen. * Whether transition animation should be enabled the screen.
* If you set it to `false`, the screen won't animate when pushing or popping. Defaults to `true`. * If you set it to `false`, the screen won't animate when pushing or popping.
* Defaults to `true` on Android and iOS, `false` on Web.
*/ */
animationEnabled?: boolean; animationEnabled?: boolean;
/** /**
@@ -310,10 +312,12 @@ export type StackNavigationOptions = StackHeaderOptions &
animationTypeForReplace?: 'push' | 'pop'; animationTypeForReplace?: 'push' | 'pop';
/** /**
* Whether you can use gestures to dismiss this screen. Defaults to `true` on iOS, `false` on Android. * Whether you can use gestures to dismiss this screen. Defaults to `true` on iOS, `false` on Android.
* Not supported on Web.
*/ */
gestureEnabled?: boolean; gestureEnabled?: boolean;
/** /**
* Object to override the distance of touch start from the edge of the screen to recognize gestures. * Object to override the distance of touch start from the edge of the screen to recognize gestures.
* Not supported on Web.
*/ */
gestureResponseDistance?: { gestureResponseDistance?: {
/** /**
@@ -326,8 +330,8 @@ export type StackNavigationOptions = StackHeaderOptions &
horizontal?: number; horizontal?: number;
}; };
/** /**
* Number which determines the relevance of velocity for the gesture. * Number which determines the relevance of velocity for the gesture. Defaults to 0.3.
* Defaults to 0.3. * Not supported on Web.
*/ */
gestureVelocityImpact?: number; gestureVelocityImpact?: number;
/** /**
@@ -394,7 +398,7 @@ export type StackHeaderLeftButtonProps = {
/** /**
* Style object for the label. * Style object for the label.
*/ */
labelStyle?: React.ComponentProps<typeof Animated.Text>['style']; labelStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
/** /**
* Whether label font should scale to respect Text Size accessibility settings. * Whether label font should scale to respect Text Size accessibility settings.
*/ */

View File

@@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { StackCardInterpolationProps } from '../types'; import type { StackCardInterpolationProps } from '../types';
export default React.createContext<StackCardInterpolationProps | undefined>( export default React.createContext<StackCardInterpolationProps | undefined>(
undefined undefined

View File

@@ -1,6 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import { PanGestureHandler } from 'react-native-gesture-handler';
export default React.createContext<React.Ref<PanGestureHandler> | undefined>( export default React.createContext<React.Ref<
undefined import('react-native-gesture-handler').PanGestureHandler
); > | null>(null);

View File

@@ -0,0 +1,5 @@
import * as React from 'react';
const HeaderShownContext = React.createContext(false);
export default HeaderShownContext;

View File

@@ -0,0 +1,8 @@
import * as React from 'react';
import type { Route, Scene } from '../types';
const PreviousSceneContext = React.createContext<
Scene<Route<string>> | undefined
>(undefined);
export default PreviousSceneContext;

View File

@@ -1,5 +1,5 @@
import getInvertedMultiplier from './getInvertedMultiplier'; import getInvertedMultiplier from './getInvertedMultiplier';
import { GestureDirection, Layout } from '../types'; import type { GestureDirection, Layout } from '../types';
export default function getDistanceForDirection( export default function getDistanceForDirection(
layout: Layout, layout: Layout,

View File

@@ -1,5 +1,5 @@
import { I18nManager } from 'react-native'; import { I18nManager } from 'react-native';
import { GestureDirection } from '../types'; import type { GestureDirection } from '../types';
export default function getInvertedMultiplier( export default function getInvertedMultiplier(
gestureDirection: GestureDirection gestureDirection: GestureDirection

View File

@@ -39,7 +39,7 @@ export default class BorderlessButton extends React.Component<Props> {
const { children, style, enabled, ...rest } = this.props; const { children, style, enabled, ...rest } = this.props;
return ( return (
// @ts-ignore // @ts-expect-error: the Animated.createAnimatedComponent types don't work properly
<AnimatedBaseButton <AnimatedBaseButton
{...rest} {...rest}
onActiveStateChange={this.handleActiveStateChange} onActiveStateChange={this.handleActiveStateChange}

View File

@@ -0,0 +1,22 @@
import * as React from 'react';
import {
PanGestureHandler as PanGestureHandlerNative,
PanGestureHandlerProperties,
} from 'react-native-gesture-handler';
import GestureHandlerRefContext from '../utils/GestureHandlerRefContext';
export function PanGestureHandler(props: PanGestureHandlerProperties) {
const gestureRef = React.useRef<PanGestureHandlerNative>(null);
return (
<GestureHandlerRefContext.Provider value={gestureRef}>
<PanGestureHandlerNative {...props} ref={gestureRef} />
</GestureHandlerRefContext.Provider>
);
}
export {
GestureHandlerRootView,
State as GestureState,
PanGestureHandlerGestureEvent,
} from 'react-native-gesture-handler';

View File

@@ -0,0 +1,24 @@
import * as React from 'react';
import { View } from 'react-native';
import type { PanGestureHandlerProperties } from 'react-native-gesture-handler';
const Dummy: any = ({ children }: { children: React.ReactNode }) => (
<>{children}</>
);
export const PanGestureHandler = Dummy as React.ComponentType<
PanGestureHandlerProperties
>;
export const GestureHandlerRootView = View;
export const GestureState = {
UNDETERMINED: 0,
FAILED: 1,
BEGAN: 2,
CANCELLED: 3,
ACTIVE: 4,
END: 5,
};
export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';

View File

@@ -4,9 +4,10 @@ import { StackActions } from 'react-navigation';
import { getStatusBarHeight } from 'react-native-iphone-x-helper'; import { getStatusBarHeight } from 'react-native-iphone-x-helper';
import HeaderSegment, { getDefaultHeaderHeight } from './HeaderSegment'; import HeaderSegment, { getDefaultHeaderHeight } from './HeaderSegment';
import HeaderTitle from './HeaderTitle'; import HeaderTitle from './HeaderTitle';
import debounce from '../../utils/debounce'; import debounce from '../../utils/debounce';
import { StackHeaderProps, StackHeaderTitleProps } from '../../types'; import type { StackHeaderProps, StackHeaderTitleProps } from '../../types';
const Header = React.memo(function Header(props: StackHeaderProps) { const Header = React.memo(function Header(props: StackHeaderProps) {
const { const {
@@ -43,9 +44,16 @@ const Header = React.memo(function Header(props: StackHeaderProps) {
: previous.route.routeName; : previous.route.routeName;
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
const goBack = React.useCallback( const goBack = React.useCallback(
debounce(() => { debounce(() => {
navigation.dispatch(StackActions.pop({ key: scene.route.key })); if (navigation.isFirstRouteInParent()) {
// If we're the first route, we're going back to a parent navigator
// So we can't specify a key here
navigation.dispatch(StackActions.pop());
} else {
navigation.dispatch(StackActions.pop({ key: scene.route.key }));
}
}, 50), }, 50),
[navigation, scene.route.key] [navigation, scene.route.key]
); );

View File

@@ -9,9 +9,9 @@ import {
LayoutChangeEvent, LayoutChangeEvent,
} from 'react-native'; } from 'react-native';
import MaskedView from '../MaskedView'; import MaskedView from '../MaskedView';
import TouchableItem from '../TouchableItem'; import { TouchableItem } from '../TouchableItem';
import useTheme from '../../../utils/useTheme'; import useTheme from '../../../utils/useTheme';
import { StackHeaderLeftButtonProps } from '../../types'; import type { StackHeaderLeftButtonProps } from '../../types';
type Props = StackHeaderLeftButtonProps; type Props = StackHeaderLeftButtonProps;

View File

@@ -1,8 +1,16 @@
import * as React from 'react'; import * as React from 'react';
import { Animated, StyleSheet, Platform, ViewProps } from 'react-native'; import {
Animated,
StyleSheet,
Platform,
ViewProps,
StyleProp,
ViewStyle,
} from 'react-native';
import useTheme from '../../../utils/useTheme'; import useTheme from '../../../utils/useTheme';
type Props = ViewProps & { type Props = ViewProps & {
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
children?: React.ReactNode; children?: React.ReactNode;
}; };

View File

@@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { NavigationContext } from 'react-navigation'; import { NavigationContext } from 'react-navigation';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import Header from './Header'; import Header from './Header';
import { import {
@@ -10,9 +10,11 @@ import {
forNoAnimation, forNoAnimation,
forSlideRight, forSlideRight,
} from '../../TransitionConfigs/HeaderStyleInterpolators'; } from '../../TransitionConfigs/HeaderStyleInterpolators';
import { import HeaderShownContext from '../../utils/HeaderShownContext';
Route, import PreviousSceneContext from '../../utils/PreviousSceneContext';
import type {
Layout, Layout,
Route,
Scene, Scene,
StackHeaderStyleInterpolator, StackHeaderStyleInterpolator,
StackNavigationProp, StackNavigationProp,
@@ -24,9 +26,10 @@ export type Props = {
layout: Layout; layout: Layout;
insets: EdgeInsets; insets: EdgeInsets;
scenes: (Scene<Route<string>> | undefined)[]; scenes: (Scene<Route<string>> | undefined)[];
getPreviousRoute: (props: { getPreviousScene: (props: {
route: Route<string>; route: Route<string>;
}) => Route<string> | undefined; index: number;
}) => Scene<Route<string>> | undefined;
getFocusedRoute: () => Route<string>; getFocusedRoute: () => Route<string>;
onContentHeightChange?: (props: { onContentHeightChange?: (props: {
route: Route<string>; route: Route<string>;
@@ -42,14 +45,16 @@ export default function HeaderContainer({
scenes, scenes,
layout, layout,
insets, insets,
getPreviousScene,
getFocusedRoute, getFocusedRoute,
getPreviousRoute,
onContentHeightChange, onContentHeightChange,
gestureDirection, gestureDirection,
styleInterpolator, styleInterpolator,
style, style,
}: Props) { }: Props) {
const focusedRoute = getFocusedRoute(); const focusedRoute = getFocusedRoute();
const isParentHeaderShown = React.useContext(HeaderShownContext);
const parentPreviousScene = React.useContext(PreviousSceneContext);
return ( return (
<View pointerEvents="box-none" style={style}> <View pointerEvents="box-none" style={style}>
@@ -58,36 +63,41 @@ export default function HeaderContainer({
return null; return null;
} }
const { options } = scene.descriptor; const {
const isFocused = focusedRoute.key === scene.route.key; header,
const previousRoute = getPreviousRoute({ route: scene.route }); headerShown = isParentHeaderShown === false,
headerTransparent,
} = scene.descriptor.options || {};
let previous; if (!headerShown) {
return null;
if (previousRoute) {
// The previous scene will be shortly before the current scene in the array
// So loop back from current index to avoid looping over the full array
for (let j = i - 1; j >= 0; j--) {
const s = self[j];
if (s && s.route.key === previousRoute.key) {
previous = s;
break;
}
}
} }
const isFocused = focusedRoute.key === scene.route.key;
const previous =
getPreviousScene({
route: scene.route,
index: i,
}) ?? parentPreviousScene;
// If the screen is next to a headerless screen, we need to make the header appear static // If the screen is next to a headerless screen, we need to make the header appear static
// This makes the header look like it's moving with the screen // This makes the header look like it's moving with the screen
const previousScene = self[i - 1]; const previousScene = self[i - 1];
const nextScene = self[i + 1]; const nextScene = self[i + 1];
const {
headerShown: previousHeaderShown = isParentHeaderShown === false,
} = previousScene?.descriptor.options || {};
const { headerShown: nextHeaderShown = isParentHeaderShown === false } =
nextScene?.descriptor.options || {};
const isHeaderStatic = const isHeaderStatic =
(previousScene && (previousHeaderShown === false &&
previousScene.descriptor.options.headerShown === false &&
// We still need to animate when coming back from next scene // We still need to animate when coming back from next scene
// A hacky way to check this is if the next scene exists // A hacky way to check this is if the next scene exists
!nextScene) || !nextScene) ||
(nextScene && nextScene.descriptor.options.headerShown === false); nextHeaderShown === false;
const props = { const props = {
mode, mode,
@@ -133,18 +143,12 @@ export default function HeaderContainer({
style={ style={
// Avoid positioning the focused header absolutely // Avoid positioning the focused header absolutely
// Otherwise accessibility tools don't seem to be able to find it // Otherwise accessibility tools don't seem to be able to find it
(mode === 'float' && !isFocused) || options.headerTransparent (mode === 'float' && !isFocused) || headerTransparent
? styles.header ? styles.header
: null : null
} }
> >
{options.headerShown !== false ? ( {header !== undefined ? header(props) : <Header {...props} />}
options.header !== undefined ? (
options.header(props)
) : (
<Header {...props} />
)
) : null}
</View> </View>
</> </>
</NavigationContext.Provider> </NavigationContext.Provider>

View File

@@ -7,12 +7,12 @@ import {
Platform, Platform,
ViewStyle, ViewStyle,
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import { NavigationRoute } from 'react-navigation'; import type { NavigationRoute } from 'react-navigation';
import HeaderBackButton from './HeaderBackButton'; import HeaderBackButton from './HeaderBackButton';
import HeaderBackground from './HeaderBackground'; import HeaderBackground from './HeaderBackground';
import memoize from '../../utils/memoize'; import memoize from '../../utils/memoize';
import { import type {
Layout, Layout,
StackHeaderStyleInterpolator, StackHeaderStyleInterpolator,
StackHeaderLeftButtonProps, StackHeaderLeftButtonProps,
@@ -62,7 +62,6 @@ export const getDefaultHeaderHeight = (
let headerHeight; let headerHeight;
if (Platform.OS === 'ios') { if (Platform.OS === 'ios') {
// @ts-ignore
if (isLandscape && !Platform.isPad) { if (isLandscape && !Platform.isPad) {
headerHeight = 32; headerHeight = 32;
} else { } else {
@@ -208,7 +207,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
borderTopStartRadius, borderTopStartRadius,
borderTopWidth, borderTopWidth,
borderWidth, borderWidth,
// @ts-ignore: web support for shadow // @ts-expect-error: web support for shadow
boxShadow, boxShadow,
elevation, elevation,
shadowColor, shadowColor,
@@ -250,7 +249,6 @@ export default class HeaderSegment extends React.Component<Props, State> {
borderTopStartRadius, borderTopStartRadius,
borderTopWidth, borderTopWidth,
borderWidth, borderWidth,
// @ts-ignore
boxShadow, boxShadow,
elevation, elevation,
shadowColor, shadowColor,
@@ -265,9 +263,9 @@ export default class HeaderSegment extends React.Component<Props, State> {
// So we need to filter them out // So we need to filter them out
// Users can use `null` instead // Users can use `null` instead
for (const styleProp in safeStyles) { for (const styleProp in safeStyles) {
// @ts-ignore // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles
if (safeStyles[styleProp] === undefined) { if (safeStyles[styleProp] === undefined) {
// @ts-ignore // @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete safeStyles[styleProp]; delete safeStyles[styleProp];
} }
@@ -307,11 +305,13 @@ export default class HeaderSegment extends React.Component<Props, State> {
}) })
: null; : null;
const rightButton = right ? right({ tintColor: headerTintColor }) : null;
return ( return (
<React.Fragment> <React.Fragment>
<Animated.View <Animated.View
pointerEvents="none" pointerEvents="box-none"
style={[StyleSheet.absoluteFill, backgroundStyle]} style={[StyleSheet.absoluteFill, { zIndex: 0 }, backgroundStyle]}
> >
{headerBackground ? ( {headerBackground ? (
headerBackground({ style: safeStyles }) headerBackground({ style: safeStyles })
@@ -345,8 +345,19 @@ export default class HeaderSegment extends React.Component<Props, State> {
pointerEvents="box-none" pointerEvents="box-none"
style={[ style={[
headerTitleAlign === 'left' headerTitleAlign === 'left'
? { position: 'absolute', left: leftButton ? 72 : 16 } ? {
: { marginHorizontal: 18 }, position: 'absolute',
left: (leftButton ? 72 : 16) + insets.left,
right: (rightButton ? 72 : 16) + insets.right,
}
: {
marginHorizontal:
(leftButton ? 32 : 16) +
(leftButton && headerBackTitleVisible !== false
? 40
: 0) +
Math.max(insets.left, insets.right),
},
titleStyle, titleStyle,
titleContainerStyle, titleContainerStyle,
]} ]}
@@ -359,7 +370,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
style: customTitleStyle, style: customTitleStyle,
})} })}
</Animated.View> </Animated.View>
{right ? ( {rightButton ? (
<Animated.View <Animated.View
pointerEvents="box-none" pointerEvents="box-none"
style={[ style={[
@@ -369,7 +380,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
rightContainerStyle, rightContainerStyle,
]} ]}
> >
{right({ tintColor: headerTintColor })} {rightButton}
</Animated.View> </Animated.View>
) : null} ) : null}
</View> </View>

View File

@@ -2,7 +2,7 @@ import * as React from 'react';
import { Animated, StyleSheet, Platform } from 'react-native'; import { Animated, StyleSheet, Platform } from 'react-native';
import useTheme from '../../../utils/useTheme'; import useTheme from '../../../utils/useTheme';
type Props = React.ComponentProps<typeof Animated.Text> & { type Props = Omit<React.ComponentProps<typeof Animated.Text>, 'key'> & {
tintColor?: string; tintColor?: string;
children?: string; children?: string;
}; };

View File

@@ -35,7 +35,11 @@ export default class KeyboardManager extends React.Component<Props> {
this.clearKeyboardTimeout(); this.clearKeyboardTimeout();
const input = TextInput.State.currentlyFocusedField(); // @ts-expect-error: currentlyFocusedInput is pretty new, so not in the type definitions
const input = TextInput.State.currentlyFocusedInput
? // @ts-expect-error
TextInput.State.currentlyFocusedInput()
: TextInput.State.currentlyFocusedField();
// When a page change begins, blur the currently focused input // When a page change begins, blur the currently focused input
TextInput.State.blurTextInput(input); TextInput.State.blurTextInput(input);

View File

@@ -1,17 +1,25 @@
import * as React from 'react'; import * as React from 'react';
import { UIManager } from 'react-native'; import { UIManager } from 'react-native';
import RNCMaskedView from '@react-native-community/masked-view';
type Props = React.ComponentProps<typeof RNCMaskedView> & { type MaskedViewType = typeof import('@react-native-community/masked-view').default;
type Props = React.ComponentProps<MaskedViewType> & {
children: React.ReactElement; children: React.ReactElement;
}; };
let RNCMaskedView: MaskedViewType | undefined;
try {
RNCMaskedView = require('@react-native-community/masked-view').default;
} catch (e) {
// Ignore
}
const isMaskedViewAvailable = const isMaskedViewAvailable =
// @ts-ignore
UIManager.getViewManagerConfig('RNCMaskedView') != null; UIManager.getViewManagerConfig('RNCMaskedView') != null;
export default function MaskedView({ children, ...rest }: Props) { export default function MaskedView({ children, ...rest }: Props) {
if (isMaskedViewAvailable) { if (isMaskedViewAvailable && RNCMaskedView) {
return <RNCMaskedView {...rest}>{children}</RNCMaskedView>; return <RNCMaskedView {...rest}>{children}</RNCMaskedView>;
} }

View File

@@ -1,4 +1,4 @@
import * as React from 'react'; import type * as React from 'react';
type Props = { type Props = {
maskElement: React.ReactElement; maskElement: React.ReactElement;

View File

@@ -0,0 +1,71 @@
import * as React from 'react';
import { Animated, View, Platform, ViewProps } from 'react-native';
let Screens: typeof import('react-native-screens') | undefined;
try {
Screens = require('react-native-screens');
} catch (e) {
// Ignore
}
// The web implementation in react-native-screens seems buggy.
// The view doesn't become visible after coming back in some cases.
// So we use our custom implementation.
class WebScreen extends React.Component<
ViewProps & {
active: number;
children: React.ReactNode;
}
> {
render() {
const { active, style, ...rest } = this.props;
return (
<View
// @ts-expect-error: hidden exists on web, but not in React Native
hidden={!active}
style={[style, { display: active ? 'flex' : 'none' }]}
{...rest}
/>
);
}
}
const AnimatedWebScreen = Animated.createAnimatedComponent(WebScreen);
export const MaybeScreenContainer = ({
enabled,
...rest
}: ViewProps & {
enabled: boolean;
children: React.ReactNode;
}) => {
if (enabled && Platform.OS !== 'web' && Screens && Screens.screensEnabled()) {
return <Screens.ScreenContainer {...rest} />;
}
return <View {...rest} />;
};
export const MaybeScreen = ({
enabled,
active,
...rest
}: ViewProps & {
enabled: boolean;
active: 0 | 1 | Animated.AnimatedInterpolation;
children: React.ReactNode;
}) => {
if (enabled && Platform.OS === 'web') {
// @ts-expect-error: the Animated.createAnimatedComponent types don't work properly
return <AnimatedWebScreen active={active} {...rest} />;
}
if (enabled && Screens && Screens.screensEnabled()) {
// @ts-expect-error: stackPresentation is incorrectly marked as required
return <Screens.Screen active={active} {...rest} />;
}
return <View {...rest} />;
};

View File

@@ -9,19 +9,20 @@ import {
Platform, Platform,
InteractionManager, InteractionManager,
} from 'react-native'; } from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';
import Color from 'color';
import CardSheet from './CardSheet';
import { import {
PanGestureHandler, PanGestureHandler,
State as GestureState, GestureState,
PanGestureHandlerGestureEvent, PanGestureHandlerGestureEvent,
} from 'react-native-gesture-handler'; } from '../GestureHandler';
import { EdgeInsets } from 'react-native-safe-area-context';
import Color from 'color';
import StackGestureRefContext from '../../utils/GestureHandlerRefContext';
import CardAnimationContext from '../../utils/CardAnimationContext'; import CardAnimationContext from '../../utils/CardAnimationContext';
import getDistanceForDirection from '../../utils/getDistanceForDirection'; import getDistanceForDirection from '../../utils/getDistanceForDirection';
import getInvertedMultiplier from '../../utils/getInvertedMultiplier'; import getInvertedMultiplier from '../../utils/getInvertedMultiplier';
import memoize from '../../utils/memoize'; import memoize from '../../utils/memoize';
import { import type {
TransitionSpec, TransitionSpec,
StackCardStyleInterpolator, StackCardStyleInterpolator,
GestureDirection, GestureDirection,
@@ -36,6 +37,7 @@ type Props = ViewProps & {
gesture: Animated.Value; gesture: Animated.Value;
layout: Layout; layout: Layout;
insets: EdgeInsets; insets: EdgeInsets;
pageOverflowEnabled: boolean;
gestureDirection: GestureDirection; gestureDirection: GestureDirection;
onOpen: () => void; onOpen: () => void;
onClose: () => void; onClose: () => void;
@@ -44,7 +46,9 @@ type Props = ViewProps & {
onGestureCanceled?: () => void; onGestureCanceled?: () => void;
onGestureEnd?: () => void; onGestureEnd?: () => void;
children: React.ReactNode; children: React.ReactNode;
overlay: (props: { style: StyleProp<ViewStyle> }) => React.ReactNode; overlay: (props: {
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
}) => React.ReactNode;
overlayEnabled: boolean; overlayEnabled: boolean;
shadowEnabled: boolean; shadowEnabled: boolean;
gestureEnabled: boolean; gestureEnabled: boolean;
@@ -81,7 +85,11 @@ export default class Card extends React.Component<Props> {
shadowEnabled: true, shadowEnabled: true,
gestureEnabled: true, gestureEnabled: true,
gestureVelocityImpact: GESTURE_VELOCITY_IMPACT, gestureVelocityImpact: GESTURE_VELOCITY_IMPACT,
overlay: ({ style }: { style: StyleProp<ViewStyle> }) => overlay: ({
style,
}: {
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
}) =>
style ? ( style ? (
<Animated.View pointerEvents="none" style={[styles.overlay, style]} /> <Animated.View pointerEvents="none" style={[styles.overlay, style]} />
) : null, ) : null,
@@ -286,7 +294,7 @@ export default class Card extends React.Component<Props> {
getInvertedMultiplier(gestureDirection) > getInvertedMultiplier(gestureDirection) >
distance / 2 distance / 2
? velocity !== 0 || translation !== 0 ? velocity !== 0 || translation !== 0
: false; : this.props.closing;
this.animate({ closing, velocity }); this.animate({ closing, velocity });
@@ -412,8 +420,6 @@ export default class Card extends React.Component<Props> {
} }
} }
private gestureRef = React.createRef<PanGestureHandler>();
private contentRef = React.createRef<View>(); private contentRef = React.createRef<View>();
render() { render() {
@@ -430,6 +436,7 @@ export default class Card extends React.Component<Props> {
shadowEnabled, shadowEnabled,
gestureEnabled, gestureEnabled,
gestureDirection, gestureDirection,
pageOverflowEnabled,
children, children,
containerStyle: customContainerStyle, containerStyle: customContainerStyle,
contentStyle, contentStyle,
@@ -488,6 +495,17 @@ export default class Card extends React.Component<Props> {
return ( return (
<CardAnimationContext.Provider value={animationContext}> <CardAnimationContext.Provider value={animationContext}>
<Animated.View
style={{
// This is a dummy style that doesn't actually change anything visually.
// Animated needs the animated value to be used somewhere, otherwise things don't update properly.
// If we disable animations and hide header, it could end up making the value unused.
// So we have this dummy style that will always be used regardless of what else changed.
opacity: current,
}}
// Make sure that this view isn't removed. If this view is removed, our style with animated value won't apply
collapsable={false}
/>
<View pointerEvents="box-none" {...rest}> <View pointerEvents="box-none" {...rest}>
{overlayEnabled ? ( {overlayEnabled ? (
<View pointerEvents="box-none" style={StyleSheet.absoluteFill}> <View pointerEvents="box-none" style={StyleSheet.absoluteFill}>
@@ -499,7 +517,6 @@ export default class Card extends React.Component<Props> {
pointerEvents="box-none" pointerEvents="box-none"
> >
<PanGestureHandler <PanGestureHandler
ref={this.gestureRef}
enabled={layout.width !== 0 && gestureEnabled} enabled={layout.width !== 0 && gestureEnabled}
onGestureEvent={handleGestureEvent} onGestureEvent={handleGestureEvent}
onHandlerStateChange={this.handleGestureStateChange} onHandlerStateChange={this.handleGestureStateChange}
@@ -517,19 +534,20 @@ export default class Card extends React.Component<Props> {
: gestureDirection === 'vertical' : gestureDirection === 'vertical'
? [styles.shadowVertical, styles.shadowTop] ? [styles.shadowVertical, styles.shadowTop]
: [styles.shadowVertical, styles.shadowBottom], : [styles.shadowVertical, styles.shadowBottom],
{ backgroundColor },
shadowStyle, shadowStyle,
]} ]}
pointerEvents="none" pointerEvents="none"
/> />
) : null} ) : null}
<View <CardSheet
ref={this.contentRef} ref={this.contentRef}
style={[styles.content, contentStyle]} enabled={pageOverflowEnabled}
layout={layout}
style={contentStyle}
> >
<StackGestureRefContext.Provider value={this.gestureRef}> {children}
{children} </CardSheet>
</StackGestureRefContext.Provider>
</View>
</Animated.View> </Animated.View>
</PanGestureHandler> </PanGestureHandler>
</Animated.View> </Animated.View>
@@ -543,17 +561,12 @@ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
}, },
content: {
flex: 1,
overflow: 'hidden',
},
overlay: { overlay: {
flex: 1, flex: 1,
backgroundColor: '#000', backgroundColor: '#000',
}, },
shadow: { shadow: {
position: 'absolute', position: 'absolute',
backgroundColor: '#fff',
shadowRadius: 5, shadowRadius: 5,
shadowColor: '#000', shadowColor: '#000',
shadowOpacity: 0.3, shadowOpacity: 0.3,

View File

@@ -1,14 +1,17 @@
import * as React from 'react'; import * as React from 'react';
import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; import type { Props as HeaderContainerProps } from '../Header/HeaderContainer';
import Card from './Card'; import Card from './Card';
import HeaderHeightContext from '../../utils/HeaderHeightContext'; import HeaderHeightContext from '../../utils/HeaderHeightContext';
import HeaderShownContext from '../../utils/HeaderShownContext';
import PreviousSceneContext from '../../utils/PreviousSceneContext';
import useTheme from '../../../utils/useTheme'; import useTheme from '../../../utils/useTheme';
import { import type {
Route, Route,
Scene, Scene,
Layout, Layout,
StackHeaderMode, StackHeaderMode,
StackCardMode,
TransitionPreset, TransitionPreset,
} from '../../types'; } from '../../types';
@@ -19,7 +22,6 @@ type Props = TransitionPreset & {
closing: boolean; closing: boolean;
layout: Layout; layout: Layout;
gesture: Animated.Value; gesture: Animated.Value;
previousScene?: Scene<Route<string>>;
scene: Scene<Route<string>>; scene: Scene<Route<string>>;
safeAreaInsetTop: number; safeAreaInsetTop: number;
safeAreaInsetRight: number; safeAreaInsetRight: number;
@@ -29,9 +31,10 @@ type Props = TransitionPreset & {
cardOverlayEnabled?: boolean; cardOverlayEnabled?: boolean;
cardShadowEnabled?: boolean; cardShadowEnabled?: boolean;
cardStyle?: StyleProp<ViewStyle>; cardStyle?: StyleProp<ViewStyle>;
getPreviousRoute: (props: { getPreviousScene: (props: {
route: Route<string>; route: Route<string>;
}) => Route<string> | undefined; index: number;
}) => Scene<Route<string>> | undefined;
getFocusedRoute: () => Route<string>; getFocusedRoute: () => Route<string>;
renderHeader: (props: HeaderContainerProps) => React.ReactNode; renderHeader: (props: HeaderContainerProps) => React.ReactNode;
renderScene: (props: { route: Route<string> }) => React.ReactNode; renderScene: (props: { route: Route<string> }) => React.ReactNode;
@@ -51,9 +54,10 @@ type Props = TransitionPreset & {
horizontal?: number; horizontal?: number;
}; };
gestureVelocityImpact?: number; gestureVelocityImpact?: number;
mode: StackCardMode;
headerMode: StackHeaderMode; headerMode: StackHeaderMode;
headerShown?: boolean; headerShown: boolean;
headerTransparent?: boolean; hasAbsoluteHeader: boolean;
headerHeight: number; headerHeight: number;
onHeaderHeightChange: (props: { onHeaderHeightChange: (props: {
route: Route<string>; route: Route<string>;
@@ -77,12 +81,13 @@ function CardContainer({
gestureEnabled, gestureEnabled,
gestureResponseDistance, gestureResponseDistance,
gestureVelocityImpact, gestureVelocityImpact,
getPreviousRoute, getPreviousScene,
getFocusedRoute, getFocusedRoute,
mode,
headerMode, headerMode,
headerShown, headerShown,
headerStyleInterpolator, headerStyleInterpolator,
headerTransparent, hasAbsoluteHeader,
headerHeight, headerHeight,
onHeaderHeightChange, onHeaderHeightChange,
index, index,
@@ -94,7 +99,6 @@ function CardContainer({
onPageChangeStart, onPageChangeStart,
onTransitionEnd, onTransitionEnd,
onTransitionStart, onTransitionStart,
previousScene,
renderHeader, renderHeader,
renderScene, renderScene,
safeAreaInsetBottom, safeAreaInsetBottom,
@@ -142,8 +146,7 @@ function CardContainer({
); );
React.useEffect(() => { React.useEffect(() => {
// `addListener` may not exist on web and older versions of React Native // @ts-expect-error: AnimatedInterpolation optionally has addListener, but the type defs don't think so
// @ts-ignore
const listener = scene.progress.next?.addListener?.( const listener = scene.progress.next?.addListener?.(
({ value }: { value: number }) => { ({ value }: { value: number }) => {
setPointerEvents(value <= EPSILON ? 'box-none' : 'none'); setPointerEvents(value <= EPSILON ? 'box-none' : 'none');
@@ -152,12 +155,16 @@ function CardContainer({
return () => { return () => {
if (listener) { if (listener) {
// @ts-ignore // @ts-expect-error: AnimatedInterpolation optionally has removedListener, but the type defs don't think so
scene.progress.next?.removeListener?.(listener); scene.progress.next?.removeListener?.(listener);
} }
}; };
}, [pointerEvents, scene.progress.next]); }, [pointerEvents, scene.progress.next]);
const isParentHeaderShown = React.useContext(HeaderShownContext);
const isCurrentHeaderShown = headerMode !== 'none' && headerShown !== false;
const previousScene = getPreviousScene({ route: scene.route, index });
return ( return (
<Card <Card
index={index} index={index}
@@ -184,19 +191,22 @@ function CardContainer({
accessibilityElementsHidden={!focused} accessibilityElementsHidden={!focused}
importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'} importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'}
pointerEvents={active ? 'box-none' : pointerEvents} pointerEvents={active ? 'box-none' : pointerEvents}
containerStyle={ pageOverflowEnabled={headerMode === 'screen' && mode === 'card'}
headerMode === 'float' && !headerTransparent && headerShown !== false containerStyle={hasAbsoluteHeader ? { marginTop: headerHeight } : null}
? { marginTop: headerHeight } contentStyle={[{ backgroundColor: colors.background }, cardStyle]}
: null
}
contentStyle={[{ backgroundColor: colors.background }, cardStyle] as any}
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}
> >
<View style={styles.container}> <View style={styles.container}>
<View style={styles.scene}> <View style={styles.scene}>
<HeaderHeightContext.Provider value={headerHeight}> <PreviousSceneContext.Provider value={previousScene}>
{renderScene({ route: scene.route })} <HeaderShownContext.Provider
</HeaderHeightContext.Provider> value={isParentHeaderShown || isCurrentHeaderShown}
>
<HeaderHeightContext.Provider value={headerHeight}>
{renderScene({ route: scene.route })}
</HeaderHeightContext.Provider>
</HeaderShownContext.Provider>
</PreviousSceneContext.Provider>
</View> </View>
{headerMode === 'screen' {headerMode === 'screen'
? renderHeader({ ? renderHeader({
@@ -204,7 +214,7 @@ function CardContainer({
layout, layout,
insets, insets,
scenes: [previousScene, scene], scenes: [previousScene, scene],
getPreviousRoute, getPreviousScene,
getFocusedRoute, getFocusedRoute,
gestureDirection, gestureDirection,
styleInterpolator: headerStyleInterpolator, styleInterpolator: headerStyleInterpolator,

View File

@@ -0,0 +1,49 @@
import * as React from 'react';
import { View, ViewProps, StyleSheet } from 'react-native';
type Props = ViewProps & {
enabled: boolean;
layout: { width: number; height: number };
children: React.ReactNode;
};
// This component will render a page which overflows the screen
// if the container fills the body by comparing the size
// This lets the document.body handle scrolling of the content
// It's necessary for mobile browsers to be able to hide address bar on scroll
export default React.forwardRef<View, Props>(function CardSheet(
{ enabled, layout, style, ...rest },
ref
) {
const [fill, setFill] = React.useState(false);
React.useEffect(() => {
if (typeof document === 'undefined' || !document.body) {
// Only run when DOM is available
return;
}
const width = document.body.clientWidth;
const height = document.body.clientHeight;
setFill(width === layout.width && height === layout.height);
}, [layout.height, layout.width]);
return (
<View
{...rest}
ref={ref}
style={[enabled && fill ? styles.page : styles.card, style]}
/>
);
});
const styles = StyleSheet.create({
page: {
minHeight: '100%',
},
card: {
flex: 1,
overflow: 'hidden',
},
});

View File

@@ -1,19 +1,17 @@
import * as React from 'react'; import * as React from 'react';
import { import {
Animated, Animated,
View,
StyleSheet, StyleSheet,
LayoutChangeEvent, LayoutChangeEvent,
Dimensions, Dimensions,
Platform, Platform,
ViewProps,
} from 'react-native'; } from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context'; import type { EdgeInsets } from 'react-native-safe-area-context';
import { ScreenContainer, Screen, screensEnabled } from 'react-native-screens'; // Import with * as to prevent getters being called import type { NavigationState as StackNavigationState } from 'react-navigation';
import { NavigationState as StackNavigationState } from 'react-navigation';
import { MaybeScreenContainer, MaybeScreen } from '../Screens';
import { getDefaultHeaderHeight } from '../Header/HeaderSegment'; import { getDefaultHeaderHeight } from '../Header/HeaderSegment';
import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; import type { Props as HeaderContainerProps } from '../Header/HeaderContainer';
import CardContainer from './CardContainer'; import CardContainer from './CardContainer';
import { import {
DefaultTransition, DefaultTransition,
@@ -21,12 +19,13 @@ import {
} from '../../TransitionConfigs/TransitionPresets'; } from '../../TransitionConfigs/TransitionPresets';
import { forNoAnimation as forNoAnimationHeader } from '../../TransitionConfigs/HeaderStyleInterpolators'; import { forNoAnimation as forNoAnimationHeader } from '../../TransitionConfigs/HeaderStyleInterpolators';
import { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators'; import { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';
import HeaderShownContext from '../../utils/HeaderShownContext';
import getDistanceForDirection from '../../utils/getDistanceForDirection'; import getDistanceForDirection from '../../utils/getDistanceForDirection';
import { import type {
Route,
Layout, Layout,
StackHeaderMode, StackHeaderMode,
StackCardMode, StackCardMode,
Route,
Scene, Scene,
StackDescriptorMap, StackDescriptorMap,
StackNavigationOptions, StackNavigationOptions,
@@ -75,37 +74,6 @@ type State = {
const EPSILON = 0.01; const EPSILON = 0.01;
const MaybeScreenContainer = ({
enabled,
...rest
}: ViewProps & {
enabled: boolean;
children: React.ReactNode;
}) => {
if (enabled && screensEnabled()) {
return <ScreenContainer {...rest} />;
}
return <View {...rest} />;
};
const MaybeScreen = ({
enabled,
active,
...rest
}: ViewProps & {
enabled: boolean;
active: number | Animated.AnimatedInterpolation;
children: React.ReactNode;
}) => {
if (enabled && screensEnabled()) {
// @ts-ignore
return <Screen active={active} {...rest} />;
}
return <View {...rest} />;
};
const FALLBACK_DESCRIPTOR = Object.freeze({ options: {} }); const FALLBACK_DESCRIPTOR = Object.freeze({ options: {} });
const getHeaderHeights = ( const getHeaderHeights = (
@@ -117,9 +85,10 @@ const getHeaderHeights = (
) => { ) => {
return routes.reduce<Record<string, number>>((acc, curr) => { return routes.reduce<Record<string, number>>((acc, curr) => {
const { options = {} } = descriptors[curr.key] || {}; const { options = {} } = descriptors[curr.key] || {};
const { height = previous[curr.key] } = StyleSheet.flatten( const style: any = StyleSheet.flatten(options.headerStyle || {});
options.headerStyle || {}
); const height =
typeof style.height === 'number' ? style.height : previous[curr.key];
const safeAreaInsets = { const safeAreaInsets = {
...insets, ...insets,
@@ -275,7 +244,7 @@ export default class CardStack extends React.Component<Props, State> {
if ( if (
oldScene && oldScene &&
scene.__memo.every((it, i) => { scene.__memo.every((it, i) => {
// @ts-ignore // @ts-expect-error: we haven't added __memo to the annotation to prevent usage elsewhere
return oldScene.__memo[i] === it; return oldScene.__memo[i] === it;
}) })
) { ) {
@@ -333,7 +302,7 @@ export default class CardStack extends React.Component<Props, State> {
props.insets, props.insets,
state.descriptors, state.descriptors,
layout, layout,
{} state.headerHeights
), ),
}; };
}); });
@@ -368,6 +337,33 @@ export default class CardStack extends React.Component<Props, State> {
return state.routes[state.index]; return state.routes[state.index];
}; };
private getPreviousScene = ({
route,
index,
}: {
route: Route<string>;
index: number;
}) => {
const previousRoute = this.props.getPreviousRoute({ route });
let previous: Scene<Route<string>> | undefined;
if (previousRoute) {
// The previous scene will be shortly before the current scene in the array
// So loop back from current index to avoid looping over the full array
for (let j = index - 1; j >= 0; j--) {
const s = this.state.scenes[j];
if (s && s.route.key === previousRoute.key) {
previous = s;
break;
}
}
}
return previous;
};
render() { render() {
const { const {
mode, mode,
@@ -378,7 +374,6 @@ export default class CardStack extends React.Component<Props, State> {
closingRouteKeys, closingRouteKeys,
onOpenRoute, onOpenRoute,
onCloseRoute, onCloseRoute,
getPreviousRoute,
getGesturesEnabled, getGesturesEnabled,
renderHeader, renderHeader,
renderScene, renderScene,
@@ -415,182 +410,207 @@ export default class CardStack extends React.Component<Props, State> {
// Screens is buggy on iOS and web, so we only enable it on Android // Screens is buggy on iOS and web, so we only enable it on Android
// For modals, usually we want the screen underneath to be visible, so also disable it there // For modals, usually we want the screen underneath to be visible, so also disable it there
const isScreensEnabled = Platform.OS === 'android' && mode !== 'modal'; const isScreensEnabled = Platform.OS !== 'ios' && mode !== 'modal';
return ( return (
<React.Fragment> <HeaderShownContext.Consumer>
<MaybeScreenContainer {(isParentHeaderShown) => {
enabled={isScreensEnabled} const isFloatHeaderAbsolute =
style={styles.container} headerMode === 'float'
onLayout={this.handleLayout} ? this.state.scenes.slice(-2).some((scene) => {
> const { descriptor } = scene;
{routes.map((route, index, self) => { const options = descriptor ? descriptor.options : {};
const focused = focusedRoute.key === route.key; const {
const gesture = gestures[route.key]; headerTransparent,
const scene = scenes[index]; headerShown = isParentHeaderShown === false,
} = options;
const isScreenActive = scene.progress.next if (headerTransparent || headerShown === false) {
? scene.progress.next.interpolate({ return true;
inputRange: [0, 1 - EPSILON, 1], }
outputRange: [1, 1, 0],
extrapolate: 'clamp', return false;
}) })
: 1; : false;
const { const floatingHeader =
safeAreaInsets, headerMode === 'float' ? (
headerShown, <React.Fragment key="header">
headerTransparent, {renderHeader({
cardShadowEnabled, mode: 'float',
cardOverlayEnabled, layout,
cardOverlay, insets: { top, right, bottom, left },
cardStyle, scenes,
animationEnabled, getPreviousScene: this.getPreviousScene,
gestureResponseDistance, getFocusedRoute: this.getFocusedRoute,
gestureVelocityImpact, onContentHeightChange: this.handleHeaderLayout,
gestureDirection = defaultTransitionPreset.gestureDirection, gestureDirection:
transitionSpec = defaultTransitionPreset.transitionSpec, focusedOptions.gestureDirection !== undefined
cardStyleInterpolator = animationEnabled === false ? focusedOptions.gestureDirection
? forNoAnimationCard : defaultTransitionPreset.gestureDirection,
: defaultTransitionPreset.cardStyleInterpolator, styleInterpolator:
headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator, focusedOptions.headerStyleInterpolator !== undefined
} = scene.descriptor ? focusedOptions.headerStyleInterpolator
? scene.descriptor.options : defaultTransitionPreset.headerStyleInterpolator,
: ({} as StackNavigationOptions); style: [
styles.floating,
isFloatHeaderAbsolute && styles.absolute,
],
})}
</React.Fragment>
) : null;
let transitionConfig = { return (
gestureDirection, <React.Fragment>
transitionSpec, {isFloatHeaderAbsolute ? null : floatingHeader}
cardStyleInterpolator, <MaybeScreenContainer
headerStyleInterpolator,
};
// When a screen is not the last, it should use next screen's transition config
// Many transitions also animate the previous screen, so using 2 different transitions doesn't look right
// For example combining a slide and a modal transition would look wrong otherwise
// With this approach, combining different transition styles in the same navigator mostly looks right
// This will still be broken when 2 transitions have different idle state (e.g. modal presentation),
// but majority of the transitions look alright
if (index !== self.length - 1) {
const nextScene = scenes[index + 1];
if (nextScene) {
const {
animationEnabled,
gestureDirection = defaultTransitionPreset.gestureDirection,
transitionSpec = defaultTransitionPreset.transitionSpec,
cardStyleInterpolator = animationEnabled === false
? forNoAnimationCard
: defaultTransitionPreset.cardStyleInterpolator,
headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,
} = nextScene.descriptor
? nextScene.descriptor.options
: ({} as StackNavigationOptions);
transitionConfig = {
gestureDirection,
transitionSpec,
cardStyleInterpolator,
headerStyleInterpolator,
};
}
}
const {
top: safeAreaInsetTop = insets.top,
right: safeAreaInsetRight = insets.right,
bottom: safeAreaInsetBottom = insets.bottom,
left: safeAreaInsetLeft = insets.left,
} = safeAreaInsets || {};
const previousRoute = getPreviousRoute({ route: scene.route });
let previousScene = scenes[index - 1];
if (previousRoute) {
// The previous scene will be shortly before the current scene in the array
// So loop back from current index to avoid looping over the full array
for (let j = index - 1; j >= 0; j--) {
const s = scenes[j];
if (s && s.route.key === previousRoute.key) {
previousScene = s;
break;
}
}
}
return (
<MaybeScreen
key={route.key}
style={StyleSheet.absoluteFill}
enabled={isScreensEnabled} enabled={isScreensEnabled}
active={isScreenActive} style={styles.container}
pointerEvents="box-none" onLayout={this.handleLayout}
> >
<CardContainer {routes.map((route, index, self) => {
index={index} const focused = focusedRoute.key === route.key;
active={index === self.length - 1} const gesture = gestures[route.key];
focused={focused} const scene = scenes[index];
closing={closingRouteKeys.includes(route.key)}
layout={layout} const isScreenActive = scene.progress.next
gesture={gesture} ? scene.progress.next.interpolate({
scene={scene} inputRange: [0, 1 - EPSILON, 1],
previousScene={previousScene} outputRange: [1, 1, 0],
safeAreaInsetTop={safeAreaInsetTop} extrapolate: 'clamp',
safeAreaInsetRight={safeAreaInsetRight} })
safeAreaInsetBottom={safeAreaInsetBottom} : 1;
safeAreaInsetLeft={safeAreaInsetLeft}
cardOverlay={cardOverlay} const {
cardOverlayEnabled={cardOverlayEnabled} safeAreaInsets,
cardShadowEnabled={cardShadowEnabled} headerShown = isParentHeaderShown === false,
cardStyle={cardStyle} headerTransparent,
onPageChangeStart={onPageChangeStart} cardShadowEnabled,
onPageChangeConfirm={onPageChangeConfirm} cardOverlayEnabled,
onPageChangeCancel={onPageChangeCancel} cardOverlay,
gestureResponseDistance={gestureResponseDistance} cardStyle,
headerHeight={headerHeights[route.key]} animationEnabled,
onHeaderHeightChange={this.handleHeaderLayout} gestureResponseDistance,
getPreviousRoute={getPreviousRoute} gestureVelocityImpact,
getFocusedRoute={this.getFocusedRoute} gestureDirection = defaultTransitionPreset.gestureDirection,
headerMode={headerMode} transitionSpec = defaultTransitionPreset.transitionSpec,
headerShown={headerShown} cardStyleInterpolator = animationEnabled === false
headerTransparent={headerTransparent} ? forNoAnimationCard
renderHeader={renderHeader} : defaultTransitionPreset.cardStyleInterpolator,
renderScene={renderScene} headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,
onOpenRoute={onOpenRoute} } = scene.descriptor
onCloseRoute={onCloseRoute} ? scene.descriptor.options
onTransitionStart={onTransitionStart} : ({} as StackNavigationOptions);
onTransitionEnd={onTransitionEnd}
gestureEnabled={index !== 0 && getGesturesEnabled({ route })} let transitionConfig = {
gestureVelocityImpact={gestureVelocityImpact} gestureDirection,
{...transitionConfig} transitionSpec,
/> cardStyleInterpolator,
</MaybeScreen> headerStyleInterpolator,
); };
})}
</MaybeScreenContainer> // When a screen is not the last, it should use next screen's transition config
{headerMode === 'float' // Many transitions also animate the previous screen, so using 2 different transitions doesn't look right
? renderHeader({ // For example combining a slide and a modal transition would look wrong otherwise
mode: 'float', // With this approach, combining different transition styles in the same navigator mostly looks right
layout, // This will still be broken when 2 transitions have different idle state (e.g. modal presentation),
insets: { top, right, bottom, left }, // but majority of the transitions look alright
scenes, if (index !== self.length - 1) {
getPreviousRoute, const nextScene = scenes[index + 1];
getFocusedRoute: this.getFocusedRoute,
onContentHeightChange: this.handleHeaderLayout, if (nextScene) {
gestureDirection: const {
focusedOptions.gestureDirection !== undefined animationEnabled,
? focusedOptions.gestureDirection gestureDirection = defaultTransitionPreset.gestureDirection,
: defaultTransitionPreset.gestureDirection, transitionSpec = defaultTransitionPreset.transitionSpec,
styleInterpolator: cardStyleInterpolator = animationEnabled === false
focusedOptions.headerStyleInterpolator !== undefined ? forNoAnimationCard
? focusedOptions.headerStyleInterpolator : defaultTransitionPreset.cardStyleInterpolator,
: defaultTransitionPreset.headerStyleInterpolator, headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,
style: styles.floating, } = nextScene.descriptor
}) ? nextScene.descriptor.options
: null} : ({} as StackNavigationOptions);
</React.Fragment>
transitionConfig = {
gestureDirection,
transitionSpec,
cardStyleInterpolator,
headerStyleInterpolator,
};
}
}
const {
top: safeAreaInsetTop = insets.top,
right: safeAreaInsetRight = insets.right,
bottom: safeAreaInsetBottom = insets.bottom,
left: safeAreaInsetLeft = insets.left,
} = safeAreaInsets || {};
const headerHeight =
headerMode !== 'none' && headerShown !== false
? headerHeights[route.key]
: 0;
return (
<MaybeScreen
key={route.key}
style={StyleSheet.absoluteFill}
enabled={isScreensEnabled}
active={isScreenActive}
pointerEvents="box-none"
>
<CardContainer
index={index}
active={index === self.length - 1}
focused={focused}
closing={closingRouteKeys.includes(route.key)}
layout={layout}
gesture={gesture}
scene={scene}
safeAreaInsetTop={safeAreaInsetTop}
safeAreaInsetRight={safeAreaInsetRight}
safeAreaInsetBottom={safeAreaInsetBottom}
safeAreaInsetLeft={safeAreaInsetLeft}
cardOverlay={cardOverlay}
cardOverlayEnabled={cardOverlayEnabled}
cardShadowEnabled={cardShadowEnabled}
cardStyle={cardStyle}
onPageChangeStart={onPageChangeStart}
onPageChangeConfirm={onPageChangeConfirm}
onPageChangeCancel={onPageChangeCancel}
gestureResponseDistance={gestureResponseDistance}
headerHeight={headerHeight}
onHeaderHeightChange={this.handleHeaderLayout}
getPreviousScene={this.getPreviousScene}
getFocusedRoute={this.getFocusedRoute}
mode={mode}
headerMode={headerMode}
headerShown={headerShown}
hasAbsoluteHeader={
isFloatHeaderAbsolute && !headerTransparent
}
renderHeader={renderHeader}
renderScene={renderScene}
onOpenRoute={onOpenRoute}
onCloseRoute={onCloseRoute}
onTransitionStart={onTransitionStart}
onTransitionEnd={onTransitionEnd}
gestureEnabled={
index !== 0 && getGesturesEnabled({ route })
}
gestureVelocityImpact={gestureVelocityImpact}
{...transitionConfig}
/>
</MaybeScreen>
);
})}
</MaybeScreenContainer>
{isFloatHeaderAbsolute ? floatingHeader : null}
</React.Fragment>
);
}}
</HeaderShownContext.Consumer>
); );
} }
} }
@@ -598,12 +618,14 @@ export default class CardStack extends React.Component<Props, State> {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
overflow: 'hidden',
}, },
floating: { absolute: {
position: 'absolute', position: 'absolute',
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
}, },
floating: {
zIndex: 1,
},
}); });

View File

@@ -1,20 +1,21 @@
import * as React from 'react'; import * as React from 'react';
import { View, Platform, StyleSheet } from 'react-native'; import { View, Platform, StyleSheet } from 'react-native';
import { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context'; import { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { import {
StackActions, StackActions,
NavigationState as StackNavigationState, NavigationState as StackNavigationState,
NavigationActions,
SceneView, SceneView,
} from 'react-navigation'; } from 'react-navigation';
import { GestureHandlerRootView } from '../GestureHandler';
import CardStack from './CardStack'; import CardStack from './CardStack';
import KeyboardManager from '../KeyboardManager'; import KeyboardManager from '../KeyboardManager';
import HeaderContainer, { import HeaderContainer, {
Props as HeaderContainerProps, Props as HeaderContainerProps,
} from '../Header/HeaderContainer'; } from '../Header/HeaderContainer';
import SafeAreaProviderCompat from '../SafeAreaProviderCompat'; import SafeAreaProviderCompat from '../SafeAreaProviderCompat';
import { import type {
Route, Route,
StackNavigationHelpers, StackNavigationHelpers,
StackNavigationConfig, StackNavigationConfig,
@@ -149,7 +150,7 @@ export default class StackView extends React.Component<Props, State> {
// We only need to animate routes if the focused route changed // We only need to animate routes if the focused route changed
// Animating previous routes won't be visible coz the focused route is on top of everything // Animating previous routes won't be visible coz the focused route is on top of everything
if (!previousRoutes.find((r) => r.key === nextFocusedRoute.key)) { if (!previousRoutes.some((r) => r.key === nextFocusedRoute.key)) {
// A new route has come to the focus, we treat this as a push // A new route has come to the focus, we treat this as a push
// A replace can also trigger this, the animation should look like push // A replace can also trigger this, the animation should look like push
@@ -168,7 +169,7 @@ export default class StackView extends React.Component<Props, State> {
(key) => key !== nextFocusedRoute.key (key) => key !== nextFocusedRoute.key
); );
if (!routes.find((r) => r.key === previousFocusedRoute.key)) { if (!routes.some((r) => r.key === previousFocusedRoute.key)) {
// The previous focused route isn't present in state, we treat this as a replace // The previous focused route isn't present in state, we treat this as a replace
openingRouteKeys = openingRouteKeys.filter( openingRouteKeys = openingRouteKeys.filter(
@@ -208,7 +209,7 @@ export default class StackView extends React.Component<Props, State> {
} }
} }
} }
} else if (!routes.find((r) => r.key === previousFocusedRoute.key)) { } else if (!routes.some((r) => r.key === previousFocusedRoute.key)) {
// The previously focused route was removed, we treat this as a pop // The previously focused route was removed, we treat this as a pop
if ( if (
@@ -354,25 +355,41 @@ export default class StackView extends React.Component<Props, State> {
}; };
private handleOpenRoute = ({ route }: { route: Route<string> }) => { private handleOpenRoute = ({ route }: { route: Route<string> }) => {
const { state, navigation } = this.props;
const { closingRouteKeys, replacingRouteKeys } = this.state;
this.handleTransitionComplete(); this.handleTransitionComplete();
this.setState((state) => ({
routes: state.replacingRouteKeys.length if (
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key)) closingRouteKeys.some((key) => key === route.key) &&
: state.routes, replacingRouteKeys.every((key) => key !== route.key) &&
openingRouteKeys: state.openingRouteKeys.filter( !state.routes.some((r) => r.key === route.key)
(key) => key !== route.key ) {
), // If route isn't present in current state, but was closing, assume that a close animation was cancelled
closingRouteKeys: state.closingRouteKeys.filter( // So we need to add this route back to the state
(key) => key !== route.key navigation.dispatch(NavigationActions.navigate(route));
), } else {
replacingRouteKeys: [], this.setState((state) => ({
})); routes: state.replacingRouteKeys.length
? state.routes.filter(
(r) => !state.replacingRouteKeys.includes(r.key)
)
: state.routes,
openingRouteKeys: state.openingRouteKeys.filter(
(key) => key !== route.key
),
closingRouteKeys: state.closingRouteKeys.filter(
(key) => key !== route.key
),
replacingRouteKeys: [],
}));
}
}; };
private handleCloseRoute = ({ route }: { route: Route<string> }) => { private handleCloseRoute = ({ route }: { route: Route<string> }) => {
const { state, navigation } = this.props; const { state, navigation } = this.props;
if (state.routes.find((r) => r.key === route.key)) { if (state.routes.some((r) => r.key === route.key)) {
// If a route exists in state, trigger a pop // If a route exists in state, trigger a pop
// This will happen in when the route was closed from the card component // This will happen in when the route was closed from the card component
// e.g. When the close animation triggered from a gesture ends // e.g. When the close animation triggered from a gesture ends
@@ -423,6 +440,11 @@ export default class StackView extends React.Component<Props, State> {
navigation, navigation,
keyboardHandlingEnabled, keyboardHandlingEnabled,
mode = 'card', mode = 'card',
headerMode = mode === 'card' && Platform.OS === 'ios'
? 'float'
: 'screen',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
descriptors: _,
...rest ...rest
} = this.props; } = this.props;
@@ -433,42 +455,41 @@ export default class StackView extends React.Component<Props, State> {
closingRouteKeys, closingRouteKeys,
} = this.state; } = this.state;
const headerMode =
mode !== 'modal' && Platform.OS === 'ios' ? 'float' : 'screen';
return ( return (
<GestureHandlerWrapper style={styles.container}> <>
<SafeAreaProviderCompat> <GestureHandlerWrapper style={styles.container}>
<SafeAreaConsumer> <SafeAreaProviderCompat>
{(insets) => ( <SafeAreaConsumer>
<KeyboardManager enabled={keyboardHandlingEnabled !== false}> {(insets) => (
{(props) => ( <KeyboardManager enabled={keyboardHandlingEnabled !== false}>
<CardStack {(props) => (
mode={mode} <CardStack
insets={insets as EdgeInsets} mode={mode}
getPreviousRoute={this.getPreviousRoute} insets={insets as EdgeInsets}
getGesturesEnabled={this.getGesturesEnabled} getPreviousRoute={this.getPreviousRoute}
routes={routes} getGesturesEnabled={this.getGesturesEnabled}
openingRouteKeys={openingRouteKeys} routes={routes}
closingRouteKeys={closingRouteKeys} openingRouteKeys={openingRouteKeys}
onOpenRoute={this.handleOpenRoute} closingRouteKeys={closingRouteKeys}
onCloseRoute={this.handleCloseRoute} onOpenRoute={this.handleOpenRoute}
onTransitionStart={this.handleTransitionStart} onCloseRoute={this.handleCloseRoute}
onTransitionEnd={this.handleTransitionEnd} onTransitionStart={this.handleTransitionStart}
renderHeader={this.renderHeader} onTransitionEnd={this.handleTransitionEnd}
renderScene={this.renderScene} renderHeader={this.renderHeader}
headerMode={headerMode} renderScene={this.renderScene}
state={state} headerMode={headerMode}
descriptors={descriptors} state={state}
{...rest} descriptors={descriptors}
{...props} {...rest}
/> {...props}
)} />
</KeyboardManager> )}
)} </KeyboardManager>
</SafeAreaConsumer> )}
</SafeAreaProviderCompat> </SafeAreaConsumer>
</GestureHandlerWrapper> </SafeAreaProviderCompat>
</GestureHandlerWrapper>
</>
); );
} }
} }

View File

@@ -0,0 +1,81 @@
/**
* TouchableItem renders a touchable that looks native on both iOS and Android.
*
* It provides an abstraction on top of TouchableNativeFeedback and
* TouchableOpacity.
*
* On iOS you can pass the props of TouchableOpacity, on Android pass the props
* of TouchableNativeFeedback.
*/
import * as React from 'react';
import {
Platform,
TouchableNativeFeedback,
TouchableOpacity,
View,
ViewProps,
} from 'react-native';
import BorderlessButton from './BorderlessButton';
export type Props = ViewProps & {
pressColor: string;
disabled?: boolean;
borderless?: boolean;
delayPressIn?: number;
onPress?: () => void;
children: React.ReactNode;
};
const ANDROID_VERSION_LOLLIPOP = 21;
export class TouchableItem extends React.Component<Props> {
static defaultProps = {
borderless: false,
pressColor: 'rgba(0, 0, 0, .32)',
};
render() {
/*
* TouchableNativeFeedback.Ripple causes a crash on old Android versions,
* therefore only enable it on Android Lollipop and above.
*
* All touchables on Android should have the ripple effect according to
* platform design guidelines.
* We need to pass the background prop to specify a borderless ripple effect.
*/
if (
Platform.OS === 'android' &&
Platform.Version >= ANDROID_VERSION_LOLLIPOP
) {
const { style, pressColor, borderless, children, ...rest } = this.props;
return (
<TouchableNativeFeedback
{...rest}
useForeground={TouchableNativeFeedback.canUseNativeForeground()}
background={TouchableNativeFeedback.Ripple(pressColor, borderless)}
>
<View style={style}>{React.Children.only(children)}</View>
</TouchableNativeFeedback>
);
} else if (Platform.OS === 'ios') {
return (
<BorderlessButton
hitSlop={{ top: 10, bottom: 10, right: 10, left: 10 }}
disallowInterruption
enabled={!this.props.disabled}
{...this.props}
>
{this.props.children}
</BorderlessButton>
);
} else {
return (
<TouchableOpacity {...this.props}>
{this.props.children}
</TouchableOpacity>
);
}
}
}

View File

@@ -1,80 +1,3 @@
/** import { TouchableOpacity } from 'react-native';
* TouchableItem renders a touchable that looks native on both iOS and Android.
*
* It provides an abstraction on top of TouchableNativeFeedback and
* TouchableOpacity.
*
* On iOS you can pass the props of TouchableOpacity, on Android pass the props
* of TouchableNativeFeedback.
*/
import * as React from 'react';
import {
Platform,
TouchableNativeFeedback,
TouchableOpacity,
View,
ViewProps,
} from 'react-native';
import BorderlessButton from './BorderlessButton'; export const TouchableItem = (TouchableOpacity as any) as typeof import('./TouchableItem.native').TouchableItem;
type Props = ViewProps & {
pressColor: string;
disabled?: boolean;
borderless?: boolean;
delayPressIn?: number;
onPress?: () => void;
};
const ANDROID_VERSION_LOLLIPOP = 21;
export default class TouchableItem extends React.Component<Props> {
static defaultProps = {
borderless: false,
pressColor: 'rgba(0, 0, 0, .32)',
};
render() {
/*
* TouchableNativeFeedback.Ripple causes a crash on old Android versions,
* therefore only enable it on Android Lollipop and above.
*
* All touchables on Android should have the ripple effect according to
* platform design guidelines.
* We need to pass the background prop to specify a borderless ripple effect.
*/
if (
Platform.OS === 'android' &&
Platform.Version >= ANDROID_VERSION_LOLLIPOP
) {
const { style, pressColor, borderless, children, ...rest } = this.props;
return (
<TouchableNativeFeedback
{...rest}
useForeground={TouchableNativeFeedback.canUseNativeForeground()}
background={TouchableNativeFeedback.Ripple(pressColor, borderless)}
>
<View style={style}>{React.Children.only(children)}</View>
</TouchableNativeFeedback>
);
} else if (Platform.OS === 'ios') {
return (
<BorderlessButton
hitSlop={{ top: 10, bottom: 10, right: 10, left: 10 }}
disallowInterruption
enabled={!this.props.disabled}
{...this.props}
>
{this.props.children}
</BorderlessButton>
);
} else {
return (
<TouchableOpacity {...this.props}>
{this.props.children}
</TouchableOpacity>
);
}
}
}

View File

@@ -2,7 +2,7 @@ import * as React from 'react';
import validateDeprecatedOptions from '../utils/validateDeprecatedOptions'; import validateDeprecatedOptions from '../utils/validateDeprecatedOptions';
import validateDeprecatedConfig from '../utils/validateDeprecatedConfig'; import validateDeprecatedConfig from '../utils/validateDeprecatedConfig';
import StackViewBase from '../vendor/views/Stack/StackView'; import StackViewBase from '../vendor/views/Stack/StackView';
import { import type {
StackNavigationHelpers, StackNavigationHelpers,
StackNavigationConfig, StackNavigationConfig,
StackDescriptorMap, StackDescriptorMap,

View File

@@ -1,6 +1,6 @@
{ {
"extends": "./tsconfig", "extends": "./tsconfig",
"compilerOptions": { "compilerOptions": {
"paths": {} "paths": {},
} }
} }

View File

@@ -4,6 +4,7 @@
{ "path": "../react-navigation" } { "path": "../react-navigation" }
], ],
"compilerOptions": { "compilerOptions": {
"outDir": "./lib/typescript" "outDir": "./lib/typescript",
"importsNotUsedAsValues": "error",
} }
} }

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.9.0](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.13...react-navigation-tabs@2.9.0) (2020-06-25)
### Features
* sync latest stack and upgrade typescript ([454e05b](https://github.com/react-navigation/tabs/commit/454e05b02ec97f053b381fdc801df899d8c93cb6))
## [2.8.13](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.12...react-navigation-tabs@2.8.13) (2020-04-30)
**Note:** Version bump only for package react-navigation-tabs
## [2.8.12](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.11...react-navigation-tabs@2.8.12) (2020-04-22)
**Note:** Version bump only for package react-navigation-tabs
## [2.8.11](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.10...react-navigation-tabs@2.8.11) (2020-04-02) ## [2.8.11](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.10...react-navigation-tabs@2.8.11) (2020-04-02)
**Note:** Version bump only for package react-navigation-tabs **Note:** Version bump only for package react-navigation-tabs

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-navigation-tabs", "name": "react-navigation-tabs",
"version": "2.8.11", "version": "2.9.0",
"description": "Tab Navigation components for React Navigation", "description": "Tab Navigation components for React Navigation",
"main": "lib/commonjs/index.js", "main": "lib/commonjs/index.js",
"module": "lib/module/index.js", "module": "lib/module/index.js",
@@ -42,7 +42,7 @@
"dependencies": { "dependencies": {
"hoist-non-react-statics": "^3.3.2", "hoist-non-react-statics": "^3.3.2",
"react-lifecycles-compat": "^3.0.4", "react-lifecycles-compat": "^3.0.4",
"react-native-safe-area-view": "^0.14.8", "react-native-safe-area-view": "^0.14.9",
"react-native-tab-view": "^2.11.0" "react-native-tab-view": "^2.11.0"
}, },
"devDependencies": { "devDependencies": {
@@ -56,8 +56,8 @@
"react-native-gesture-handler": "^1.6.0", "react-native-gesture-handler": "^1.6.0",
"react-native-reanimated": "^1.2.0", "react-native-reanimated": "^1.2.0",
"react-native-tab-view": "^2.13.0", "react-native-tab-view": "^2.13.0",
"react-navigation": "^4.3.7", "react-navigation": "^4.4.0",
"typescript": "~3.8.3" "typescript": "^3.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",

View File

@@ -17,7 +17,7 @@
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"jsx": "react", "jsx": "react",
"lib": ["esnext"], "lib": ["esnext", "dom"],
"module": "esnext", "module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,

346
yarn.lock
View File

@@ -3202,10 +3202,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.7.tgz#a65ce0702f55cb67fd777995de6fc7b3e5781903" resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.7.tgz#a65ce0702f55cb67fd777995de6fc7b3e5781903"
integrity sha512-9KbP7LTLFz9dx1heURJbO6nuVMdSjDez8znlrUzaB1nUwKVsTTwlKRuHxGUYIIkReLWrJQeCv9tidy+84z2eCw== integrity sha512-9KbP7LTLFz9dx1heURJbO6nuVMdSjDez8znlrUzaB1nUwKVsTTwlKRuHxGUYIIkReLWrJQeCv9tidy+84z2eCw==
"@react-navigation/stack@^5.2.9": "@react-navigation/stack@^5.6.0":
version "5.2.9" version "5.6.0"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.2.9.tgz#6bc849c9d6ece4f2659a07c1b3afd93adc9bc0c7" resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.6.0.tgz#c307559ab6ba380f977f7f74efbe861bcbbdcf4b"
integrity sha512-JK2B9hZGP39uN9HJZZ46clqyazHu2nCkKcXrai8q50LuxTTVG5OMndr9/cmWWPip/eYmmgUDobM6W5ee83JOLw== integrity sha512-e5uU37qgi9cXqOac8P2oFAj+4ZY7dI2kt04jg5+psAYN0Coawk6oyowBpBy6FsMBHMQv/p8J97Hc6eUnTwgzQw==
dependencies: dependencies:
color "^3.1.2" color "^3.1.2"
react-native-iphone-x-helper "^1.2.1" react-native-iphone-x-helper "^1.2.1"
@@ -3628,17 +3628,27 @@
dependencies: dependencies:
"@types/yargs-parser" "*" "@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^2.12.0": "@typescript-eslint/eslint-plugin@^2.31.0":
version "2.26.0" version "2.31.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz#04c96560c8981421e5a9caad8394192363cc423f" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.31.0.tgz#942c921fec5e200b79593c71fafb1e3f57aa2e36"
integrity sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw== integrity sha512-iIC0Pb8qDaoit+m80Ln/aaeu9zKQdOLF4SHcGLarSeY1gurW6aU4JsOPMjKQwXlw70MvWKZQc6S2NamA8SJ/gg==
dependencies: dependencies:
"@typescript-eslint/experimental-utils" "2.26.0" "@typescript-eslint/experimental-utils" "2.31.0"
functional-red-black-tree "^1.0.1" functional-red-black-tree "^1.0.1"
regexpp "^3.0.0" regexpp "^3.0.0"
tsutils "^3.17.1" tsutils "^3.17.1"
"@typescript-eslint/experimental-utils@2.26.0", "@typescript-eslint/experimental-utils@^2.5.0": "@typescript-eslint/experimental-utils@2.31.0":
version "2.31.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.31.0.tgz#a9ec514bf7fd5e5e82bc10dcb6a86d58baae9508"
integrity sha512-MI6IWkutLYQYTQgZ48IVnRXmLR/0Q6oAyJgiOror74arUMh7EWjJkADfirZhRsUMHeLJ85U2iySDwHTSnNi9vA==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.31.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
"@typescript-eslint/experimental-utils@^2.5.0":
version "2.26.0" version "2.26.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz#063390c404d9980767d76274df386c0aa675d91d" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz#063390c404d9980767d76274df386c0aa675d91d"
integrity sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ== integrity sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==
@@ -3648,14 +3658,14 @@
eslint-scope "^5.0.0" eslint-scope "^5.0.0"
eslint-utils "^2.0.0" eslint-utils "^2.0.0"
"@typescript-eslint/parser@^2.12.0": "@typescript-eslint/parser@^2.31.0":
version "2.26.0" version "2.31.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.26.0.tgz#385463615818b33acb72a25b39c03579df93d76f" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.31.0.tgz#beddd4e8efe64995108b229b2862cd5752d40d6f"
integrity sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ== integrity sha512-uph+w6xUOlyV2DLSC6o+fBDzZ5i7+3/TxAsH4h3eC64tlga57oMb96vVlXoMwjR/nN+xyWlsnxtbDkB46M2EPQ==
dependencies: dependencies:
"@types/eslint-visitor-keys" "^1.0.0" "@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "2.26.0" "@typescript-eslint/experimental-utils" "2.31.0"
"@typescript-eslint/typescript-estree" "2.26.0" "@typescript-eslint/typescript-estree" "2.31.0"
eslint-visitor-keys "^1.1.0" eslint-visitor-keys "^1.1.0"
"@typescript-eslint/typescript-estree@2.26.0": "@typescript-eslint/typescript-estree@2.26.0":
@@ -3671,6 +3681,19 @@
semver "^6.3.0" semver "^6.3.0"
tsutils "^3.17.1" tsutils "^3.17.1"
"@typescript-eslint/typescript-estree@2.31.0":
version "2.31.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.31.0.tgz#ac536c2d46672aa1f27ba0ec2140d53670635cfd"
integrity sha512-vxW149bXFXXuBrAak0eKHOzbcu9cvi6iNcJDzEtOkRwGHxJG15chiAQAwhLOsk+86p9GTr/TziYvw+H9kMaIgA==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^6.3.0"
tsutils "^3.17.1"
"@unimodules/core@~5.0.0": "@unimodules/core@~5.0.0":
version "5.0.0" version "5.0.0"
resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-5.0.0.tgz#e1e3ca3f91f3d27dbc93c6eebc03a40c711da755" resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-5.0.0.tgz#e1e3ca3f91f3d27dbc93c6eebc03a40c711da755"
@@ -4486,7 +4509,7 @@ babel-code-frame@^6.22.0:
esutils "^2.0.2" esutils "^2.0.2"
js-tokens "^3.0.2" js-tokens "^3.0.2"
babel-eslint@^10.0.3: babel-eslint@^10.1.0:
version "10.1.0" version "10.1.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
@@ -5308,7 +5331,7 @@ chalk@2.4.1:
escape-string-regexp "^1.0.5" escape-string-regexp "^1.0.5"
supports-color "^5.3.0" supports-color "^5.3.0"
chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2" version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -5336,6 +5359,14 @@ chalk@^3.0.0:
ansi-styles "^4.1.0" ansi-styles "^4.1.0"
supports-color "^7.1.0" supports-color "^7.1.0"
chalk@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72"
integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chardet@^0.4.0: chardet@^0.4.0:
version "0.4.2" version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
@@ -6111,6 +6142,15 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1:
shebang-command "^2.0.0" shebang-command "^2.0.0"
which "^2.0.1" which "^2.0.1"
cross-spawn@^7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6"
integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==
dependencies:
path-key "^3.1.0"
shebang-command "^2.0.0"
which "^2.0.1"
crypt@~0.0.1: crypt@~0.0.1:
version "0.0.2" version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
@@ -6397,7 +6437,7 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
dependencies: dependencies:
ms "^2.1.1" ms "^2.1.1"
debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
version "3.2.6" version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
@@ -6470,7 +6510,7 @@ deep-extend@^0.6.0:
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
deep-is@~0.1.3: deep-is@^0.1.3, deep-is@~0.1.3:
version "0.1.3" version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
@@ -6662,11 +6702,6 @@ detect-indent@^6.0.0:
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd"
integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==
detect-libc@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
detect-newline@^3.0.0, detect-newline@^3.1.0: detect-newline@^3.0.0, detect-newline@^3.1.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
@@ -7149,30 +7184,30 @@ escodegen@^1.11.1:
optionalDependencies: optionalDependencies:
source-map "~0.6.1" source-map "~0.6.1"
eslint-config-prettier@^6.7.0: eslint-config-prettier@^6.11.0:
version "6.10.1" version "6.11.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1"
integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==
dependencies: dependencies:
get-stdin "^6.0.0" get-stdin "^6.0.0"
eslint-config-satya164@^3.1.5: eslint-config-satya164@^3.1.7:
version "3.1.6" version "3.1.7"
resolved "https://registry.yarnpkg.com/eslint-config-satya164/-/eslint-config-satya164-3.1.6.tgz#f423cd24afc8396efad04b3b96d4d2458818a100" resolved "https://registry.yarnpkg.com/eslint-config-satya164/-/eslint-config-satya164-3.1.7.tgz#213f2767941cd3ab4ce85d4712cb8420d8c6376c"
integrity sha512-DkH/iJXZD+em0E6TAfK+Ey+y2miLBv5/1KC5Gf29IEfFxS0C3LCZsDGjPBR+vRZr2Pl/ELPjKu/cvmwReIwsHQ== integrity sha512-77f8eOLzntbn1pT1DPmgP2r95kWlcGLkt7vmIFD72bevgbP9hf9rcP0UaUmg2aO6PxexEMPyYSAA0GqIIwrTcQ==
dependencies: dependencies:
"@typescript-eslint/eslint-plugin" "^2.12.0" "@typescript-eslint/eslint-plugin" "^2.31.0"
"@typescript-eslint/parser" "^2.12.0" "@typescript-eslint/parser" "^2.31.0"
babel-eslint "^10.0.3" babel-eslint "^10.1.0"
eslint-config-prettier "^6.7.0" eslint-config-prettier "^6.11.0"
eslint-plugin-babel "^5.3.0" eslint-plugin-babel "^5.3.0"
eslint-plugin-eslint-comments "^3.1.2" eslint-plugin-eslint-comments "^3.1.2"
eslint-plugin-flowtype "^4.5.2" eslint-plugin-flowtype "^4.7.0"
eslint-plugin-import "^2.19.1" eslint-plugin-import "^2.20.2"
eslint-plugin-jest "^23.1.1" eslint-plugin-jest "^23.9.0"
eslint-plugin-prettier "^3.1.2" eslint-plugin-prettier "^3.1.3"
eslint-plugin-react "^7.17.0" eslint-plugin-react "^7.19.0"
eslint-plugin-react-hooks "^2.3.0" eslint-plugin-react-hooks "^4.0.0"
eslint-plugin-react-native "^3.8.1" eslint-plugin-react-native "^3.8.1"
eslint-import-resolver-node@^0.3.2: eslint-import-resolver-node@^0.3.2:
@@ -7206,14 +7241,14 @@ eslint-plugin-eslint-comments@^3.1.2:
escape-string-regexp "^1.0.5" escape-string-regexp "^1.0.5"
ignore "^5.0.5" ignore "^5.0.5"
eslint-plugin-flowtype@^4.5.2: eslint-plugin-flowtype@^4.7.0:
version "4.7.0" version "4.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.7.0.tgz#903a6ea3eb5cbf4c7ba7fa73cc43fc39ab7e4a70" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.7.0.tgz#903a6ea3eb5cbf4c7ba7fa73cc43fc39ab7e4a70"
integrity sha512-M+hxhSCk5QBEValO5/UqrS4UunT+MgplIJK5wA1sCtXjzBcZkpTGRwxmLHhGpbHcrmQecgt6ZL/KDdXWqGB7VA== integrity sha512-M+hxhSCk5QBEValO5/UqrS4UunT+MgplIJK5wA1sCtXjzBcZkpTGRwxmLHhGpbHcrmQecgt6ZL/KDdXWqGB7VA==
dependencies: dependencies:
lodash "^4.17.15" lodash "^4.17.15"
eslint-plugin-import@^2.19.1: eslint-plugin-import@^2.20.2:
version "2.20.2" version "2.20.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d"
integrity sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg== integrity sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==
@@ -7231,24 +7266,24 @@ eslint-plugin-import@^2.19.1:
read-pkg-up "^2.0.0" read-pkg-up "^2.0.0"
resolve "^1.12.0" resolve "^1.12.0"
eslint-plugin-jest@^23.1.1: eslint-plugin-jest@^23.9.0:
version "23.8.2" version "23.10.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.8.2.tgz#6f28b41c67ef635f803ebd9e168f6b73858eb8d4" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.10.0.tgz#4738c7ca9e6513da50f4e99d7b161c1f82fa8e8f"
integrity sha512-xwbnvOsotSV27MtAe7s8uGWOori0nUsrXh2f1EnpmXua8sDfY6VZhHAhHg2sqK7HBNycRQExF074XSZ7DvfoFg== integrity sha512-cHC//nesojSO1MLxVmFJR/bUaQQG7xvMHQD8YLbsQzevR41WKm8paKDUv2wMHlUy5XLZUmNcWuflOi4apS8D+Q==
dependencies: dependencies:
"@typescript-eslint/experimental-utils" "^2.5.0" "@typescript-eslint/experimental-utils" "^2.5.0"
eslint-plugin-prettier@^3.1.2: eslint-plugin-prettier@^3.1.3:
version "3.1.2" version "3.1.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca"
integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== integrity sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==
dependencies: dependencies:
prettier-linter-helpers "^1.0.0" prettier-linter-helpers "^1.0.0"
eslint-plugin-react-hooks@^2.3.0: eslint-plugin-react-hooks@^4.0.0:
version "2.5.1" version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.0.tgz#81196b990043cde339e25c6662aeebe32ac52d01"
integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g== integrity sha512-YKBY+kilK5wrwIdQnCF395Ya6nDro3EAMoe+2xFkmyklyhF16fH83TrQOo9zbZIDxBsXFgBbywta/0JKRNFDkw==
eslint-plugin-react-native-globals@^0.1.1: eslint-plugin-react-native-globals@^0.1.1:
version "0.1.2" version "0.1.2"
@@ -7262,7 +7297,7 @@ eslint-plugin-react-native@^3.8.1:
dependencies: dependencies:
eslint-plugin-react-native-globals "^0.1.1" eslint-plugin-react-native-globals "^0.1.1"
eslint-plugin-react@^7.17.0: eslint-plugin-react@^7.19.0:
version "7.19.0" version "7.19.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666"
integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==
@@ -7301,13 +7336,6 @@ eslint-scope@^5.0.0:
esrecurse "^4.1.0" esrecurse "^4.1.0"
estraverse "^4.1.1" estraverse "^4.1.1"
eslint-utils@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
dependencies:
eslint-visitor-keys "^1.1.0"
eslint-utils@^2.0.0: eslint-utils@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd"
@@ -7320,22 +7348,22 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
eslint@^6.8.0: eslint@^7.0.0:
version "6.8.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.0.0.tgz#c35dfd04a4372110bd78c69a8d79864273919a08"
integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== integrity sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==
dependencies: dependencies:
"@babel/code-frame" "^7.0.0" "@babel/code-frame" "^7.0.0"
ajv "^6.10.0" ajv "^6.10.0"
chalk "^2.1.0" chalk "^4.0.0"
cross-spawn "^6.0.5" cross-spawn "^7.0.2"
debug "^4.0.1" debug "^4.0.1"
doctrine "^3.0.0" doctrine "^3.0.0"
eslint-scope "^5.0.0" eslint-scope "^5.0.0"
eslint-utils "^1.4.3" eslint-utils "^2.0.0"
eslint-visitor-keys "^1.1.0" eslint-visitor-keys "^1.1.0"
espree "^6.1.2" espree "^7.0.0"
esquery "^1.0.1" esquery "^1.2.0"
esutils "^2.0.2" esutils "^2.0.2"
file-entry-cache "^5.0.1" file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1" functional-red-black-tree "^1.0.1"
@@ -7348,25 +7376,24 @@ eslint@^6.8.0:
is-glob "^4.0.0" is-glob "^4.0.0"
js-yaml "^3.13.1" js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1" json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.3.0" levn "^0.4.1"
lodash "^4.17.14" lodash "^4.17.14"
minimatch "^3.0.4" minimatch "^3.0.4"
mkdirp "^0.5.1"
natural-compare "^1.4.0" natural-compare "^1.4.0"
optionator "^0.8.3" optionator "^0.9.1"
progress "^2.0.0" progress "^2.0.0"
regexpp "^2.0.1" regexpp "^3.1.0"
semver "^6.1.2" semver "^7.2.1"
strip-ansi "^5.2.0" strip-ansi "^6.0.0"
strip-json-comments "^3.0.1" strip-json-comments "^3.1.0"
table "^5.2.3" table "^5.2.3"
text-table "^0.2.0" text-table "^0.2.0"
v8-compile-cache "^2.0.3" v8-compile-cache "^2.0.3"
espree@^6.1.2: espree@^7.0.0:
version "6.2.1" version "7.0.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" resolved "https://registry.yarnpkg.com/espree/-/espree-7.0.0.tgz#8a7a60f218e69f120a842dc24c5a88aa7748a74e"
integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== integrity sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==
dependencies: dependencies:
acorn "^7.1.1" acorn "^7.1.1"
acorn-jsx "^5.2.0" acorn-jsx "^5.2.0"
@@ -7382,12 +7409,12 @@ esprima@~3.1.0:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=
esquery@^1.0.1: esquery@^1.2.0:
version "1.2.0" version "1.3.1"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.2.0.tgz#a010a519c0288f2530b3404124bfb5f02e9797fe" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
integrity sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q== integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
dependencies: dependencies:
estraverse "^5.0.0" estraverse "^5.1.0"
esrecurse@^4.1.0, esrecurse@^4.2.1: esrecurse@^4.1.0, esrecurse@^4.2.1:
version "4.2.1" version "4.2.1"
@@ -7401,10 +7428,10 @@ estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
estraverse@^5.0.0: estraverse@^5.1.0:
version "5.0.0" version "5.1.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.0.0.tgz#ac81750b482c11cca26e4b07e83ed8f75fbcdc22" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642"
integrity sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A== integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==
esutils@^2.0.2: esutils@^2.0.2:
version "2.0.3" version "2.0.3"
@@ -7993,7 +8020,7 @@ fast-json-stable-stringify@^2.0.0:
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
fast-levenshtein@~2.0.6: fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
version "2.0.6" version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
@@ -9323,7 +9350,7 @@ iconv-lite@0.4.23:
dependencies: dependencies:
safer-buffer ">= 2.1.2 < 3" safer-buffer ">= 2.1.2 < 3"
iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
version "0.4.24" version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@@ -10949,7 +10976,15 @@ levenary@^1.1.1:
dependencies: dependencies:
leven "^3.1.0" leven "^3.1.0"
levn@^0.3.0, levn@~0.3.0: levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
dependencies:
prelude-ls "^1.2.1"
type-check "~0.4.0"
levn@~0.3.0:
version "0.3.0" version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
@@ -12116,15 +12151,6 @@ ncp@2.0.0, ncp@~2.0.0:
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=
needle@^2.2.1:
version "2.3.3"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117"
integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw==
dependencies:
debug "^3.2.6"
iconv-lite "^0.4.4"
sax "^1.2.4"
negotiator@0.6.2: negotiator@0.6.2:
version "0.6.2" version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
@@ -12274,22 +12300,6 @@ node-notifier@^6.0.0:
shellwords "^0.1.1" shellwords "^0.1.1"
which "^1.3.1" which "^1.3.1"
node-pre-gyp@*:
version "0.14.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.1"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.2.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4.4.2"
node-releases@^1.1.25, node-releases@^1.1.53: node-releases@^1.1.25, node-releases@^1.1.53:
version "1.1.53" version "1.1.53"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4"
@@ -12412,7 +12422,7 @@ npm-package-arg@^8.0.0, npm-package-arg@^8.0.1:
semver "^7.0.0" semver "^7.0.0"
validate-npm-package-name "^3.0.0" validate-npm-package-name "^3.0.0"
npm-packlist@^1.1.6, npm-packlist@^1.4.4: npm-packlist@^1.4.4:
version "1.4.8" version "1.4.8"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
@@ -12477,7 +12487,7 @@ npm-run-path@^4.0.0:
dependencies: dependencies:
path-key "^3.0.0" path-key "^3.0.0"
npmlog@^4.0.2, npmlog@^4.1.2: npmlog@^4.1.2:
version "4.1.2" version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@@ -12700,7 +12710,7 @@ optimize-css-assets-webpack-plugin@^5.0.1:
cssnano "^4.1.10" cssnano "^4.1.10"
last-call-webpack-plugin "^3.0.0" last-call-webpack-plugin "^3.0.0"
optionator@^0.8.1, optionator@^0.8.3: optionator@^0.8.1:
version "0.8.3" version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
@@ -12712,6 +12722,18 @@ optionator@^0.8.1, optionator@^0.8.3:
type-check "~0.3.2" type-check "~0.3.2"
word-wrap "~1.2.3" word-wrap "~1.2.3"
optionator@^0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
dependencies:
deep-is "^0.1.3"
fast-levenshtein "^2.0.6"
levn "^0.4.1"
prelude-ls "^1.2.1"
type-check "^0.4.0"
word-wrap "^1.2.3"
options@>=0.0.5: options@>=0.0.5:
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f"
@@ -13738,6 +13760,11 @@ pouchdb-collections@^1.0.1:
resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-1.0.1.tgz#fe63a17da977611abef7cb8026cb1a9553fd8359" resolved "https://registry.yarnpkg.com/pouchdb-collections/-/pouchdb-collections-1.0.1.tgz#fe63a17da977611abef7cb8026cb1a9553fd8359"
integrity sha1-/mOhfal3YRq+98uAJssalVP9g1k= integrity sha1-/mOhfal3YRq+98uAJssalVP9g1k=
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prelude-ls@~1.1.2: prelude-ls@~1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -13760,10 +13787,10 @@ prettier-linter-helpers@^1.0.0:
dependencies: dependencies:
fast-diff "^1.1.2" fast-diff "^1.1.2"
prettier@^2.0.1: prettier@^2.0.5:
version "2.0.2" version "2.0.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
pretty-bytes@^4.0.2: pretty-bytes@^4.0.2:
version "4.0.2" version "4.0.2"
@@ -14114,7 +14141,7 @@ raw-body@2.4.0:
iconv-lite "0.4.24" iconv-lite "0.4.24"
unpipe "1.0.0" unpipe "1.0.0"
rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: rc@^1.0.1, rc@^1.1.6, rc@^1.2.8:
version "1.2.8" version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
@@ -14224,13 +14251,20 @@ react-native-safe-area-context@0.7.3, react-native-safe-area-context@^0.7.3:
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-0.7.3.tgz#ad6bd4abbabe195332c53810e4ce5851eb21aa2a" resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-0.7.3.tgz#ad6bd4abbabe195332c53810e4ce5851eb21aa2a"
integrity sha512-9Uqu1vlXPi+2cKW/CW6OnHxA76mWC4kF3wvlqzq4DY8hn37AeiXtLFs2WkxH4yXQRrnJdP6ivc65Lz+MqwRZAA== integrity sha512-9Uqu1vlXPi+2cKW/CW6OnHxA76mWC4kF3wvlqzq4DY8hn37AeiXtLFs2WkxH4yXQRrnJdP6ivc65Lz+MqwRZAA==
react-native-safe-area-view@^0.14.6, react-native-safe-area-view@^0.14.8: react-native-safe-area-view@^0.14.6:
version "0.14.8" version "0.14.8"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz#ef33c46ff8164ae77acad48c3039ec9c34873e5b" resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz#ef33c46ff8164ae77acad48c3039ec9c34873e5b"
integrity sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw== integrity sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==
dependencies: dependencies:
hoist-non-react-statics "^2.3.1" hoist-non-react-statics "^2.3.1"
react-native-safe-area-view@^0.14.9:
version "0.14.9"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz#90ee8383037010d9a5055a97cf97e4c1da1f0c3d"
integrity sha512-WII/ulhpVyL/qbYb7vydq7dJAfZRBcEhg4/UWt6F6nAKpLa3gAceMOxBxI914ppwSP/TdUsandFy6lkJQE0z4A==
dependencies:
hoist-non-react-statics "^2.3.1"
react-native-screens@2.3.0: react-native-screens@2.3.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.3.0.tgz#fd2b0c841f4fdebb2937c0e84acccc62bf9ebb22" resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.3.0.tgz#fd2b0c841f4fdebb2937c0e84acccc62bf9ebb22"
@@ -14595,16 +14629,16 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.0:
define-properties "^1.1.3" define-properties "^1.1.3"
es-abstract "^1.17.0-next.1" es-abstract "^1.17.0-next.1"
regexpp@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
regexpp@^3.0.0: regexpp@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e"
integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==
regexpp@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
regexpu-core@^4.7.0: regexpu-core@^4.7.0:
version "4.7.0" version "4.7.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938"
@@ -14948,7 +14982,7 @@ rimraf@2.6.3:
dependencies: dependencies:
glob "^7.1.3" glob "^7.1.3"
rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1:
version "2.7.1" version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
@@ -15074,7 +15108,7 @@ sane@^4.0.3:
minimist "^1.1.1" minimist "^1.1.1"
walker "~1.0.5" walker "~1.0.5"
sax@>=0.6.0, sax@^1.2.1, sax@^1.2.4, sax@~1.2.4: sax@>=0.6.0, sax@^1.2.1, sax@~1.2.4:
version "1.2.4" version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
@@ -15149,7 +15183,7 @@ semver-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
version "5.7.1" version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@@ -15164,7 +15198,7 @@ semver@6.1.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b"
integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==
semver@6.3.0, semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: semver@6.3.0, semver@^6.0.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0:
version "6.3.0" version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
@@ -15179,6 +15213,11 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.1.3:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6"
integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==
semver@^7.2.1:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
send@0.16.2: send@0.16.2:
version "0.16.2" version "0.16.2"
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
@@ -15993,10 +16032,10 @@ strip-indent@^2.0.0:
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=
strip-json-comments@^3.0.1: strip-json-comments@^3.1.0:
version "3.0.1" version "3.1.0"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180"
integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==
strip-json-comments@~2.0.1: strip-json-comments@~2.0.1:
version "2.0.1" version "2.0.1"
@@ -16177,7 +16216,7 @@ tar@4.4.6:
safe-buffer "^5.1.2" safe-buffer "^5.1.2"
yallist "^3.0.2" yallist "^3.0.2"
tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8: tar@^4.4.10, tar@^4.4.12, tar@^4.4.8:
version "4.4.13" version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
@@ -16590,6 +16629,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
prelude-ls "^1.2.1"
type-check@~0.3.2: type-check@~0.3.2:
version "0.3.2" version "0.3.2"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
@@ -16662,10 +16708,10 @@ typescript@3.7.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69"
integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw== integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==
typescript@~3.8.3: typescript@^3.9.5:
version "3.8.3" version "3.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==
ua-parser-js@^0.7.18, ua-parser-js@^0.7.19: ua-parser-js@^0.7.18, ua-parser-js@^0.7.19:
version "0.7.21" version "0.7.21"
@@ -17397,7 +17443,7 @@ with-open-file@^0.1.6:
p-try "^2.1.0" p-try "^2.1.0"
pify "^4.0.1" pify "^4.0.1"
word-wrap@~1.2.3: word-wrap@^1.2.3, word-wrap@~1.2.3:
version "1.2.3" version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==