Compare commits

..

14 Commits

Author SHA1 Message Date
satyajit.happy
40e7ff1655 chore: release 3.10.1 2019-05-17 19:54:00 +02:00
satyajit.happy
d1419cd2ed fix: upgrade react-navigation-tabs. closes #5914 2019-05-17 19:53:49 +02:00
William Schurman
cd342935a1 Add cardShadowEnabled and cardOverlayEnabled to NavigationStackViewConfig flow type (#5918)
* Add cardShadowEnabled and cardOverlayEnabled to NavigationStackViewConfig flow type

* Update changelog
2019-05-17 11:52:24 -04:00
Brent Vatne
97d21c39be Release 3.10.0 2019-05-16 11:14:11 -07:00
Luong Dang Hai
2f38d420aa remove old exports and add export for SceneView and SwitchRouter (#5872)
* remove old exports and add export for SceneView and SwitchRouter

* Update CHANGELOG.md

* add type arg to NavigationScreenProp
2019-05-15 20:24:51 -07:00
Timmy Willison
6d9bc8d869 Add safeAreaInset type to BottomTabBarProps (#5906)
* Add safeAreaInset type to BottomTabBarProps

* Update CHANGELOG.md
2019-05-15 20:24:12 -07:00
satyajit.happy
8e57aae5cf chore: release 3.9.2 2019-05-15 11:24:45 +02:00
satyajit.happy
b464e15718 chore: upgrade react-navigation-tabs 2019-05-15 11:23:25 +02:00
Seth
a874d5774c Add resetOnBlur type (#5868)
* Add resetOnBlur type

* Move resetOnBlur to correct interface

* Revert mistaken change to interface name
2019-05-08 11:57:52 -07:00
Luong Dang Hai
96cb00b5a6 correct getLabel to getLabelText (#5865)
* correct getLabel to getLabelText

* Update CHANGELOG.md
2019-05-02 18:53:08 -07:00
Tianyu Xie
9a8a34636d Update react-navigation.d.ts (#5860)
* Update react-navigation.d.ts

* Update CHANGELOG.md
2019-04-30 13:38:25 -07:00
Isaac Clements
950d5ef6d2 TabBarTop is MaterialTopTabBar now (#5856) 2019-04-29 16:54:51 -07:00
satyajit.happy
542122794a chore: release 3.9.1 2019-04-25 10:58:46 +02:00
satyajit.happy
4c81fbefc3 chore: update react-navigation-core 2019-04-25 10:58:30 +02:00
7 changed files with 123 additions and 62 deletions

4
.gitignore vendored
View File

@@ -13,8 +13,8 @@ yarn-error.log
# OS X
.DS_Store
# Exponent
.exponent
# Expo
.expo
# Jest
coverage

View File

@@ -5,7 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [3.10.1]
## Fixes
- Update Flow types - Add `cardShadowEnabled` and `cardOverlayEnabled` to NavigationStackViewConfig
- Upgrade react-navigation-tabs [#5914](https://github.com/react-navigation/react-navigation/issues/5914)
## [3.10.0] - [2019-05-16](https://github.com/react-navigation/react-navigation/releases/tag/3.10.0)
## Removed
- `persistenceKey` no longer automatically saves and restores navigation state using AsyncStorage. Typically this would be a breaking change that would require a major version bump, but because this has always been marked as experimental in the documentation and it is unlikely to impact production apps, we are rolling it in a minor release. `persistenceKey` has been replaced with `persistNavigationState` and `loadNavigationState`. See the diff in docs: https://github.com/react-navigation/react-navigation.github.io/pull/425/files?short_path=b668b1a#diff-b668b1a4201e40b1378036dc012100fe
## Changed
- Removed animations from stack on web
- Ensure that headerMode is float by default on web
## Fixes
- Prevent transitionConfig's useNativeDriver value being overwritten. (https://github.com/react-navigation/stack/commit/8b2af7d94209d4658abd8d799bc78744a1004b4e)
- Update typescript with headerLeftContainerStyle and headerRightContainerStyle
- Update typescript - Add `safeAreaInset` to `BottomTabBarProps`
- Update typescript - `TabBarTop` is now `MaterialTopTabBar`
- Update typescript - Remove `SwitchNavigator`, `TabNavigator` and `StackNavigator`. Added exports for `SceneView` and `SwitchRouter`
- Update typescript - `getLabel` is now `getLabelText` in BottomTabProps and TopTabProps
- Silence deprecated lifecycle warning in Stack Transitioner
## [3.9.0] - [2019-04-23](https://github.com/react-navigation/react-navigation/releases/tag/3.9.0)
@@ -257,7 +283,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [2.x](https://github.com/react-navigation/react-navigation/blob/2.x/CHANGELOG.md)
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.9.0...HEAD
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.10.0...HEAD
[3.10.0]: https://github.com/react-navigation/react-navigation/compare/3.10.0...3.9.0
[3.9.0]: https://github.com/react-navigation/react-navigation/compare/3.8.1...3.9.0
[3.8.1]: https://github.com/react-navigation/react-navigation/compare/3.8.0...3.8.1
[3.8.0]: https://github.com/react-navigation/react-navigation/compare/3.7.1...3.8.0

View File

@@ -6,7 +6,8 @@
"postinstall": "patch-package && rm -rf node_modules/react-navigation/node_modules/react-native && rm -rf node_modules/react-navigation/node_modules/@types && rm -rf node_modules/react-navigation/node_modules/examples && rm -rf node_modules/react-navigation/node_modules/react-native-gesture-handler && rm -rf node_modules/react-navigation/node_modules/react",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest && tsc",
"tsc": "tsc"
"tsc": "tsc",
"release": "release-it"
},
"dependencies": {
"patch-package": "^6.0.5",

View File

@@ -451,6 +451,8 @@ declare module 'react-navigation' {
headerLayoutPreset?: 'left' | 'center',
headerBackTitleVisible?: boolean,
cardStyle?: ViewStyleProp,
cardShadowEnabled?: boolean,
cardOverlayEnabled?: boolean,
transitionConfig?: (
transitionProps: NavigationTransitionProps,
prevTransitionProps: ?NavigationTransitionProps,

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "3.9.0",
"version": "3.10.1",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"types": "typescript/react-navigation.d.ts",
@@ -36,11 +36,11 @@
"react-native": "*"
},
"dependencies": {
"@react-navigation/core": "~3.4.0",
"@react-navigation/native": "~3.4.0",
"react-navigation-drawer": "1.2.1",
"react-navigation-stack": "1.3.0",
"react-navigation-tabs": "1.1.2"
"@react-navigation/core": "~3.4.1",
"@react-navigation/native": "~3.5.0",
"react-navigation-drawer": "~1.2.1",
"react-navigation-stack": "~1.4.0",
"react-navigation-tabs": "~1.1.4"
},
"devDependencies": {
"@types/react-native": "~0.57.38",

View File

@@ -68,7 +68,7 @@ declare module 'react-navigation' {
export type ScreenProps = {
[key: string]: any;
}
};
// @todo - any..
export function getActiveChildNavigationOptions<S>(
@@ -440,6 +440,8 @@ declare module 'react-navigation' {
* Switch Navigator
*/
export interface SwitchRouter extends NavigationRouter {}
export interface NavigationSwitchRouterConfig {
initialRouteName?: string;
initialRouteParams?: NavigationParams;
@@ -472,6 +474,8 @@ declare module 'react-navigation' {
headerPressColorAndroid?: string;
headerRight?: React.ReactElement<any> | null;
headerStyle?: StyleProp<ViewStyle>;
headerLeftContainerStyle?: StyleProp<ViewStyle>;
headerRightContainerStyle?: StyleProp<ViewStyle>;
headerForceInset?: HeaderForceInset;
headerBackground?: React.ReactNode | React.ReactType;
headerBackgroundTransitionPreset?: 'toggle' | 'fade' | 'translate';
@@ -545,6 +549,7 @@ declare module 'react-navigation' {
paths?: NavigationPathsConfig;
order?: string[]; // todo: type these as the real route names rather than 'string'
backBehavior?: 'none' | 'initialRoute' | 'history' | 'order'; // defaults to 'initialRoute'
resetOnBlur?: boolean;
}
export interface NavigationTabRouterConfig
extends NavigationTabRouterConfigBase {
@@ -585,7 +590,9 @@ declare module 'react-navigation' {
tabBarLabel?:
| string
| React.ReactElement<any>
| ((options: TabBarLabelProps) => React.ReactElement<any> | string | null);
| ((
options: TabBarLabelProps
) => React.ReactElement<any> | string | null);
tabBarVisible?: boolean;
tabBarTestIDProps?: { testID?: string; accessibilityLabel?: string };
}
@@ -664,7 +671,9 @@ declare module 'react-navigation' {
lastState: NavigationState | null | undefined;
}
export type NavigationEventCallback = (payload: NavigationEventPayload) => void;
export type NavigationEventCallback = (
payload: NavigationEventPayload
) => void;
export interface NavigationEventSubscription {
remove: () => void;
@@ -894,7 +903,15 @@ declare module 'react-navigation' {
action: NavigationAction
) => void | null | undefined;
navigation?: NavigationScreenProp<S>;
/*
* This prop is no longer supported. Use `loadNavigationState` and
* `persistNavigationState` instead.
*/
persistenceKey?: string | null;
loadNavigationState?: () => Promise<any>;
persistNavigationState?: (state: NavigationState) => Promise<any>;
renderLoadingExperimental?: React.ComponentType;
screenProps?: ScreenProps;
navigationOptions?: O;
@@ -929,12 +946,6 @@ declare module 'react-navigation' {
containerOptions?: any;
}
// Return createNavigationContainer
export function StackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
): NavigationContainer;
export function createStackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
@@ -950,11 +961,6 @@ declare module 'react-navigation' {
// Return createNavigationContainer
export type _SwitchNavigatorConfig = NavigationSwitchRouterConfig;
export function SwitchNavigator(
routeConfigMap: NavigationRouteConfigMap,
switchConfig?: SwitchNavigatorConfig
): NavigationContainer;
export function createSwitchNavigator(
routeConfigMap: NavigationRouteConfigMap,
switchConfig?: SwitchNavigatorConfig
@@ -1086,12 +1092,6 @@ declare module 'react-navigation' {
initialLayout?: InitialLayout;
}
// From navigators/TabNavigator.js
export function TabNavigator(
routeConfigMap: NavigationRouteConfigMap,
drawConfig?: TabNavigatorConfig
): NavigationContainer;
export function createBottomTabNavigator(
routeConfigMap: NavigationRouteConfigMap,
drawConfig?: BottomTabNavigatorConfig
@@ -1102,7 +1102,7 @@ declare module 'react-navigation' {
drawConfig?: TabNavigatorConfig
): NavigationContainer;
export interface TabBarTopProps {
export interface MaterialTopTabBarProps {
activeTintColor: string;
inactiveTintColor: string;
indicatorStyle: StyleProp<ViewStyle>;
@@ -1114,7 +1114,7 @@ declare module 'react-navigation' {
tabBarPosition: string;
navigation: NavigationScreenProp<NavigationState>;
jumpToIndex: (index: number) => void;
getLabel: (scene: TabScene) => React.ReactNode | string;
getLabelText: (scene: TabScene) => React.ReactNode | string;
getOnPress: (
previousScene: NavigationRoute,
scene: TabScene
@@ -1139,7 +1139,7 @@ declare module 'react-navigation' {
position: AnimatedValue;
navigation: NavigationScreenProp<NavigationState>;
jumpToIndex: (index: number) => void;
getLabel: (scene: TabScene) => React.ReactNode | string;
getLabelText: (scene: TabScene) => React.ReactNode | string;
getOnPress: (
previousScene: NavigationRoute,
scene: TabScene
@@ -1155,9 +1155,15 @@ declare module 'react-navigation' {
labelStyle?: TextStyle;
tabStyle?: ViewStyle;
showIcon?: boolean;
safeAreaInset?: {
top?: SafeAreaViewForceInsetValue;
bottom?: SafeAreaViewForceInsetValue;
left?: SafeAreaViewForceInsetValue;
right?: SafeAreaViewForceInsetValue;
};
}
export const TabBarTop: React.ComponentType<TabBarTopProps>;
export const MaterialTopTabBar: React.ComponentType<MaterialTopTabBarProps>;
export const BottomTabBar: React.ComponentType<BottomTabBarProps>;
/**
@@ -1209,7 +1215,9 @@ declare module 'react-navigation' {
): NavigationPopToTopAction;
function push(options: NavigationPushActionPayload): NavigationPushAction;
function reset(options: NavigationResetActionPayload): NavigationResetAction;
function reset(
options: NavigationResetActionPayload
): NavigationResetAction;
function replace(
options: NavigationReplaceActionPayload
@@ -1462,7 +1470,23 @@ declare module 'react-navigation' {
export const SafeAreaView: React.ComponentClass<SafeAreaViewProps>;
export const NavigationContext: React.Context<NavigationScreenProp<NavigationRoute>>;
export const NavigationContext: React.Context<
NavigationScreenProp<NavigationRoute>
>;
export const StackGestureContext: React.Context<React.Ref<PanGestureHandler>>;
export const DrawerGestureContext: React.Context<React.Ref<PanGestureHandler>>;
export const DrawerGestureContext: React.Context<
React.Ref<PanGestureHandler>
>;
/**
* SceneView
*/
export interface SceneViewProps {
component: React.ComponentType;
screenProps: ScreenProps;
navigation: NavigationScreenProp<NavigationRoute>;
}
export class SceneView extends React.Component {}
}

View File

@@ -827,23 +827,23 @@
universal-user-agent "^2.0.0"
url-template "^2.0.8"
"@react-navigation/core@~3.4.0":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.4.0.tgz#776845f9d4f8b2b9cb99c5d2d4433ebcef290d92"
integrity sha512-YAnx9mK6P/zYkvn4YxZL6thaNdouSmD7FUaftFrOAbE7y7cCfH8hmk7BOLoOet6Sh2+UnrpkWX7Kg54cT2Jw+g==
"@react-navigation/core@~3.4.1":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.4.1.tgz#8c7e0e53cfb8ccaf87afb76a2733f5e5fde20cd8"
integrity sha512-slslu4FmjKQMO/EKGGqqGsfC6evQLdbJM2ROACcC2Xxf0+nPeZV5ND8HHukUZZucJRE6Bg/NI+zC1XSBYRjhnw==
dependencies:
hoist-non-react-statics "^3.3.0"
path-to-regexp "^1.7.0"
query-string "^6.4.2"
react-is "^16.8.6"
"@react-navigation/native@~3.4.0":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.4.1.tgz#e1fbf334ac834a9f10dd7d9c3af3e36939486089"
integrity sha512-pMAPQfvwC4DvhQfsrXKAf+FiU+A5XAh216v17rEePSFcbeOEt7cvewmWxCxydN/vFjJChFiPV+xnjJyJBdPLOg==
"@react-navigation/native@~3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.5.0.tgz#f5d16e0845ac26d1147d1caa481f18a00740e7ae"
integrity sha512-TmGOis++ejEXG3sqNJhCSKqB0/qLu3FQgDtO959qpqif36R/diR8SQwJqeSdofoEiK3CepdhFlTCeHdS1/+MsQ==
dependencies:
hoist-non-react-statics "^3.0.1"
react-native-safe-area-view "^0.13.0"
react-native-safe-area-view "^0.14.1"
react-native-screens "^1.0.0 || ^1.0.0-alpha"
"@sindresorhus/is@^0.7.0":
@@ -8054,10 +8054,10 @@ react-lifecycles-compat@^3.0.4:
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
react-native-safe-area-view@^0.13.0:
version "0.13.1"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.13.1.tgz#834bbb6d22f76a7ff07de56725ee5667ba1386b0"
integrity sha512-d/pu2866jApSwLtK/xWAvMXZkNTIQcFrjjbcTATBrmIfFNnu8TNFUcMRFpfJ+eOn5nmx7uGmDvs9B53Ft7JGpQ==
react-native-safe-area-view@^0.14.1:
version "0.14.3"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.3.tgz#3cc34d2fcc8886bc8a8bd1ab226d4345d02c23b0"
integrity sha512-TNs2aJ9HZs4adWRo8ICVyggyqqu72VqTbkxVSS8utlI4VTQ0ERxY6PlFEYRkO3/OcSwV8X/fifWJWiVp+r/NCg==
dependencies:
hoist-non-react-statics "^2.3.1"
@@ -8066,13 +8066,20 @@ react-native-safe-area-view@^0.13.0:
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz#7a120377b52aa9bbb94d0b8541a014026be9289b"
integrity sha512-kSyAt0AeVU6N7ZonfV6dP6iZF8B7Bce+tk3eujXhzBGsLg0VSLnU7uE9VqJF0xdQrHR91ZjGgVMieo/8df9KTA==
react-native-tab-view@^1.2.0, react-native-tab-view@^1.3.4:
react-native-tab-view@^1.2.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.3.4.tgz#63fc3eb09652651d0ea0e016cff0f3a5e535f4de"
integrity sha512-iufNROTPr4+Z/IKijlp5faEANiDBWxhpgx9NSCg3esZ+HN5+UtFwB0xkn4XpNRqCvbzeBkgKMRJL3V6kr5NhWg==
dependencies:
prop-types "^15.6.1"
react-native-tab-view@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9"
integrity sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==
dependencies:
prop-types "^15.6.1"
react-native-vector-icons@^4.2.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz#e4014311ffa6de397d914ffc31b7097a874cc8d5"
@@ -8140,27 +8147,27 @@ react-native@~0.57.7:
xmldoc "^0.4.0"
yargs "^9.0.0"
react-navigation-drawer@1.2.1:
react-navigation-drawer@~1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-1.2.1.tgz#7bd5efeee7d2f611d3ebb0933e0c8e8eb7cafe52"
integrity sha512-T2kaBjY2c4/3I6noWFnaf/c18ntNH5DsST38i+pdc2NPxn5Yi5lkK+ZZTeKuHSFD4a7G0jWY9OGf1iRkHWLMAQ==
dependencies:
react-native-tab-view "^1.2.0"
react-navigation-stack@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.3.0.tgz#34bbddb068c094c9ab843e36059b9fd92b728250"
integrity sha512-ouyD1GkRksJSGuvAuqrJnlJnZ5g2g/+/WB/MTa8BzjSBvyOgruD5TrmEkpViCOMr1R17C8D4Htln90H4D+NV3Q==
react-navigation-stack@~1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.4.0.tgz#69cdb029ea4ee5877d7e933b3117dc90bc841eb2"
integrity sha512-zEe9wCA0Ot8agarYb//0nSWYW1GM+1R0tY/nydUV0EizeJ27At0EklYVWvYEuYU6C48va6cu8OPL7QD/CcJACw==
react-navigation-tabs@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.2.tgz#10b7501522d99960340a0d23a471d571b70aeb82"
integrity sha512-D4fecSwZfvNh5WHTURmUVrNSgy3tiNfID0n5eKTOhCz4Sls4EM2l27UTX833ngxXhQ1FqRtBxzQZ+Dp1FWJ1pw==
react-navigation-tabs@~1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.4.tgz#00a312250df3c519c60b7815a523ace5ee11163a"
integrity sha512-py2hLCRxPwXOzmY1W9XcY1rWXxdK6RGW/aXh56G9gIf8cpHNDhy/bJV4e46/JrVcse3ybFaN0liT09/DM/NdwQ==
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
react-native-tab-view "^1.3.4"
react-native-tab-view "^1.4.1"
react-proxy@^1.1.7:
version "1.1.8"