Compare commits

...

3 Commits
3.3.1 ... 3.3.2

Author SHA1 Message Date
Brent Vatne
ac04aad700 Release 3.3.2 2019-02-25 14:27:25 -08:00
Brent Vatne
b7fb44850d Release 3.3.1 2019-02-25 14:25:55 -08:00
Ashoat Tevosyan
d3040e52b3 [flow] Update Flow libdef with Feb 2019 changes (#5599)
This corresponds to three `flow-typed` PRs:

1. https://github.com/flow-typed/flow-typed/pull/3140 Get rid of deprecated Navigator exports in 3.0
2. https://github.com/flow-typed/flow-typed/pull/3147 Refine AnimatedValue type
3. https://github.com/flow-typed/flow-typed/pull/3148 Introduce SafeAreaViewInsets type
2019-02-16 16:30:36 -08:00
3 changed files with 99 additions and 46 deletions

View File

@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
## [3.3.2] - [2019-02-25](https://github.com/react-navigation/react-navigation/releases/tag/3.3.2)
## Fixed
- Updated Flow types (https://github.com/react-navigation/react-navigation/commit/d3040e52b39bc8e91ffc1354d9c5f8c096baf597)
## [3.3.1] - [2019-02-25](https://github.com/react-navigation/react-navigation/releases/tag/3.3.1)
## Fixed
- SafeAreaView bottom inset on iPhone XR and XS fixed. (https://github.com/react-navigation/react-navigation/issues/5625)
## [3.3.0] - [2019-02-16](https://github.com/react-navigation/react-navigation/releases/tag/3.3.0)
## Added
@@ -143,7 +155,9 @@ 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.3.0...HEAD
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.3.2...HEAD
[3.3.2]: https://github.com/react-navigation/react-navigation/compare/3.3.1...3.3.2
[3.3.1]: https://github.com/react-navigation/react-navigation/compare/3.3.0...3.3.1
[3.3.0]: https://github.com/react-navigation/react-navigation/compare/3.2.3...3.3.0
[3.2.3]: https://github.com/react-navigation/react-navigation/compare/3.2.1...3.2.3
[3.2.1]: https://github.com/react-navigation/react-navigation/compare/3.2.0...3.2.1

View File

@@ -44,18 +44,68 @@ declare module 'react-navigation' {
};
declare type ImageSource = ImageURISource | number | Array<ImageURISource>;
// This one is too large to copy. Actual definition is in
// react-native/Libraries/Animated/src/nodes/AnimatedValue.js
declare type AnimatedValue = Object;
declare type HeaderForceInset = {
horizontal?: string,
vertical?: string,
left?: string,
right?: string,
top?: string,
bottom?: string,
// This is copied from
// react-native/Libraries/Animated/src/nodes/AnimatedInterpolation.js
declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
declare type InterpolationConfigType = {
inputRange: Array<number>,
outputRange: Array<number> | Array<string>,
easing?: (input: number) => number,
extrapolate?: ExtrapolateType,
extrapolateLeft?: ExtrapolateType,
extrapolateRight?: ExtrapolateType,
};
declare class AnimatedInterpolation {
interpolate(config: InterpolationConfigType): AnimatedInterpolation;
}
// This is copied from
// react-native/Libraries/Animated/src/animations/Animation.js
declare type EndResult = { finished: boolean };
declare type EndCallback = (result: EndResult) => void;
declare class Animation {
start(
fromValue: number,
onUpdate: (value: number) => void,
onEnd: ?EndCallback,
previousAnimation: ?Animation,
animatedValue: AnimatedValue
): void;
stop(): void;
}
// This is vaguely copied from
// react-native/Libraries/Animated/src/nodes/AnimatedTracking.js
declare class AnimatedTracking {
constructor(
value: AnimatedValue,
parent: any,
animationClass: any,
animationConfig: Object,
callback?: ?EndCallback
): void;
update(): void;
}
// This is vaguely copied from
// react-native/Libraries/Animated/src/nodes/AnimatedValue.js
declare type ValueListenerCallback = (state: { value: number }) => void;
declare class AnimatedValue {
constructor(value: number): void;
setValue(value: number): void;
setOffset(offset: number): void;
flattenOffset(): void;
extractOffset(): void;
addListener(callback: ValueListenerCallback): string;
removeListener(id: string): void;
removeAllListeners(): void;
stopAnimation(callback?: ?(value: number) => void): void;
resetAnimation(callback?: ?(value: number) => void): void;
interpolate(config: InterpolationConfigType): AnimatedInterpolation;
animate(animation: Animation, callback: ?EndCallback): void;
stopTracking(): void;
track(tracking: AnimatedTracking): void;
}
/**
* Next, all the type declarations
@@ -385,7 +435,7 @@ declare module 'react-navigation' {
headerPressColorAndroid?: string,
headerRight?: React$Node,
headerStyle?: ViewStyleProp,
headerForceInset?: HeaderForceInset,
headerForceInset?: _SafeAreaViewInsets,
headerBackground?: React$Node | React$ElementType,
gesturesEnabled?: boolean,
gestureResponseDistance?: { vertical?: number, horizontal?: number },
@@ -892,10 +942,6 @@ declare module 'react-navigation' {
navigatorConfig?: NavigatorConfig
): NavigationNavigator<S, O, *>;
declare export function StackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
): NavigationNavigator<*, *, *>;
declare export function createStackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
@@ -920,14 +966,6 @@ declare module 'react-navigation' {
removeClippedSubviews?: boolean,
containerOptions?: void,
|};
declare export function TabNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _TabNavigatorConfig
): NavigationNavigator<*, *, *>;
declare export function createTabNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _TabNavigatorConfig
): NavigationNavigator<*, *, *>;
/* TODO: fix the config for each of these tab navigator types */
declare export function createBottomTabNavigator(
routeConfigs: NavigationRouteConfigMap,
@@ -940,10 +978,6 @@ declare module 'react-navigation' {
declare type _SwitchNavigatorConfig = {|
...NavigationSwitchRouterConfig,
|};
declare export function SwitchNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _SwitchNavigatorConfig
): NavigationNavigator<*, *, *>;
declare export function createSwitchNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _SwitchNavigatorConfig
@@ -965,10 +999,6 @@ declare module 'react-navigation' {
..._DrawerViewConfig,
containerConfig?: void,
}>;
declare export function DrawerNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _DrawerNavigatorConfig
): NavigationNavigator<*, *, *>;
declare export function createDrawerNavigator(
routeConfigs: NavigationRouteConfigMap,
config?: _DrawerNavigatorConfig
@@ -1049,15 +1079,16 @@ declare module 'react-navigation' {
declare export var Card: React$ComponentType<_CardProps>;
declare type _SafeAreaViewForceInsetValue = 'always' | 'never' | number;
declare type _SafeAreaViewInsets = $Shape<{
top: _SafeAreaViewForceInsetValue,
bottom: _SafeAreaViewForceInsetValue,
left: _SafeAreaViewForceInsetValue,
right: _SafeAreaViewForceInsetValue,
vertical: _SafeAreaViewForceInsetValue,
horizontal: _SafeAreaViewForceInsetValue,
}>;
declare type _SafeAreaViewProps = {
forceInset?: {
top?: _SafeAreaViewForceInsetValue,
bottom?: _SafeAreaViewForceInsetValue,
left?: _SafeAreaViewForceInsetValue,
right?: _SafeAreaViewForceInsetValue,
vertical?: _SafeAreaViewForceInsetValue,
horizontal?: _SafeAreaViewForceInsetValue,
},
forceInset?: _SafeAreaViewInsets,
children?: React$Node,
style?: AnimatedViewStyleProp,
};
@@ -1208,7 +1239,10 @@ declare module 'react-navigation' {
};
declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>;
declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(
declare export function withNavigation<
Props: {},
ComponentType: React$ComponentType<Props>
>(
Component: ComponentType
): React$ComponentType<
$Diff<
@@ -1218,9 +1252,14 @@ declare module 'react-navigation' {
}
>
>;
declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(
declare export function withNavigationFocus<
Props: {},
ComponentType: React$ComponentType<Props>
>(
Component: ComponentType
): React$ComponentType<$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>>;
): React$ComponentType<
$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>
>;
declare export function getNavigation<State: NavigationState, Options: {}>(
router: NavigationRouter<State, Options>,

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "3.3.0",
"version": "3.3.2",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"repository": {
@@ -35,7 +35,7 @@
},
"dependencies": {
"@react-navigation/core": "3.1.1",
"@react-navigation/native": "3.1.4",
"@react-navigation/native": "3.1.5",
"react-navigation-drawer": "1.2.0",
"react-navigation-stack": "1.0.10",
"react-navigation-tabs": "1.0.2"