Compare commits

..

17 Commits
3.0.2 ... 3.1.4

Author SHA1 Message Date
Brent Vatne
b54874969d Release 3.1.4 2019-02-05 09:12:22 -08:00
Brent Vatne
ef0c8487b0 Release 3.1.3 2019-02-04 16:45:48 -08:00
Brent Vatne
ea002fe950 Bump @react-navigation/native and react-navigation-stack 2019-02-04 16:42:40 -08:00
NrqhEIcsRi004
41cf95941f Update CHANGELOG.md (#5554) 2019-02-02 13:45:50 -08:00
Brent Vatne
884bde0338 Release 3.1.2 2019-02-01 11:59:47 -08:00
Brent Vatne
31e07e9692 Bump @react-navigation/native and react-navigation-drawer dependencies 2019-01-09 12:29:12 -08:00
Nicolas Hart
363f06d30e fix typo "transtion" => "transition" (#5447) 2019-01-03 13:10:33 -08:00
Levi Buzolic
59c09a6040 [flow] Update withNavigation and withNavigationFocus to support defaultProps (#5398) 2019-01-02 19:42:12 -08:00
Brent Vatne
c4b039cc19 Remove README.md from examples directory 2018-12-26 12:16:39 -08:00
Brent Vatne
49e3fb0d97 Update README in NavigationPlayground 2018-12-26 12:16:17 -08:00
Brent Vatne
3367501d4d Release 3.0.9 2018-12-19 10:31:49 -08:00
Brent Vatne
4fb6b163ac Release 3.0.8 2018-12-11 11:52:19 -08:00
Brent Vatne
d0b4ba40e9 Release 3.0.7 2018-12-08 18:31:35 -08:00
Brent Vatne
1be5c7ae35 Release 3.0.6 2018-12-06 18:26:54 -08:00
Brent Vatne
bfa68ded1e Release 3.0.5 2018-12-03 16:26:04 -08:00
Brent Vatne
2d3f159c2a Release 3.0.4 2018-11-30 13:14:53 -08:00
Brent Vatne
e0fb642490 Release 3.0.3 2018-11-30 12:24:46 -08:00
18 changed files with 1958 additions and 1560 deletions

View File

@@ -7,6 +7,85 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
## [3.1.4] - [2019-02-05](https://github.com/react-navigation/react-navigation/releases/tag/3.1.4)
## Fixed
- Fix references to onGestureFinish in StackViewLayout, should be onGestureEnd
## [3.1.3] - [2019-02-04](https://github.com/react-navigation/react-navigation/releases/tag/3.1.3)
## Fixed
- Stack navigator properly dismisses and restores keyboard when gesture starts and is cancelled
- Transparent header measurement fix (https://github.com/react-navigation/react-navigation-stack/pull/71)
## [3.1.2] - [2019-02-01](https://github.com/react-navigation/react-navigation/releases/tag/3.1.2)
## Fixed
- Update flow definition for `withNavigation` and `withNavigationFocus` to support `defaultProps`
- Prevent onRef callback be called twice on withNavigationFocus components (https://github.com/react-navigation/react-navigation-core/pull/30)
- Bump react-navigation-drawer version to improve performance - if you use Expo, you will need expo@^32.0.3 to update!
## [3.0.9] - [2018-12-19](https://github.com/react-navigation/react-navigation/releases/tag/3.0.9)
## Fixed
- Intermittent flicker when changing tabs while using react-native-screens fixed by not changing opacity (https://github.com/react-navigation/react-navigation-tabs/pull/80)
- Prevent fading the previous screen on push/pop on Android (https://github.com/react-navigation/react-navigation-stack/pull/73)
## [3.0.8] - [2018-12-08](https://github.com/react-navigation/react-navigation/releases/tag/3.0.8)
## Changed
- Lock create-react-context to 0.2.2
## [3.0.7] - [2018-12-08](https://github.com/react-navigation/react-navigation/releases/tag/3.0.7)
## Changed
- Optimize stack gesture to avoid a setState and reduce unnecessary Animated node creation (https://github.com/react-navigation/react-navigation-stack/pull/70)
## [3.0.6] - [2018-12-06](https://github.com/react-navigation/react-navigation/releases/tag/3.0.6)
## Fixes
- Fix drawer accessibility label when drawer label is not a string
## [3.0.5] - [2018-12-03](https://github.com/react-navigation/react-navigation/releases/tag/3.0.5)
## Fixes
- Fix crash in rare case where onNavigationStateChange on container leads to setState and container has screenProps (https://github.com/react-navigation/react-navigation/issues/5301)
- Expose underlaying ScrollView methods to NavigationAwareScrollable (https://github.com/react-navigation/react-navigation-native/pull/8)
## [3.0.4] - [2018-11-30](https://github.com/react-navigation/react-navigation/releases/tag/3.0.4)
## Changed
- Lock dependencies to exact versions
## Fixes
- Fix crash when screenInterpolator is null (https://github.com/react-navigation/react-navigation-stack/issues/64)
- Fix renderPager override (https://github.com/react-navigation/react-navigation-tabs/pull/70)
## Added
- Accessibility labels on drawer items (https://github.com/react-navigation/react-navigation-drawer/pull/30)
## [3.0.3] - [2018-11-30](https://github.com/react-navigation/react-navigation/releases/tag/3.0.3)
## Fixes
- Fix bug where if you navigate immediately when the navigator is first mounted the stack could get in an invalid state.
- Transparent stack card factors in header height now, even though you probably won't want to use this.
- Fix bug where shadow was still rendered on transparent stack
- Fix gestureResponseDistance custom values being ignored for modal stack
## [3.0.2] - [2018-11-27](https://github.com/react-navigation/react-navigation/releases/tag/3.0.2)
## Fixes
@@ -20,7 +99,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- fix NavigationTestUtils.js deprecated file import.
- Update `getParam` flow typings to check `key` and `fallback` arguments, as well as return the correct type automatically.
- Fix regression in backgroundColor on cardStyle for stack navigator
- Fix regression in backgroundColor on cardStyle for stack navigator.
## [3.0.0] - [2018-11-17](https://github.com/react-navigation/react-navigation/releases/tag/3.0.0)
@@ -30,7 +109,17 @@ 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.0.2...HEAD
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.1.4...HEAD
[3.1.4]: https://github.com/react-navigation/react-navigation/compare/3.1.3...3.1.4
[3.1.3]: https://github.com/react-navigation/react-navigation/compare/3.1.2...3.1.3
[3.1.2]: https://github.com/react-navigation/react-navigation/compare/3.0.9...3.1.2
[3.0.9]: https://github.com/react-navigation/react-navigation/compare/3.0.8...3.0.9
[3.0.8]: https://github.com/react-navigation/react-navigation/compare/3.0.7...3.0.8
[3.0.7]: https://github.com/react-navigation/react-navigation/compare/3.0.6...3.0.7
[3.0.6]: https://github.com/react-navigation/react-navigation/compare/3.0.5...3.0.6
[3.0.5]: https://github.com/react-navigation/react-navigation/compare/3.0.4...3.0.5
[3.0.4]: https://github.com/react-navigation/react-navigation/compare/3.0.3...3.0.4
[3.0.3]: https://github.com/react-navigation/react-navigation/compare/3.0.2...3.0.3
[3.0.2]: https://github.com/react-navigation/react-navigation/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/react-navigation/react-navigation/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/react-navigation/react-navigation/compare/2.x...3.0.0

View File

@@ -6,17 +6,7 @@ React Navigation is born from the React Native community's need for an extensibl
## Installation
Since the library is a JS-based solution, to install the latest version of react-navigation you only need to run:
```bash
yarn add react-navigation
```
or
```bash
npm install --save react-navigation
```
See: https://reactnavigation.org/docs/en/getting-started.html
## Documentation

View File

@@ -1,17 +1,5 @@
{
"presets": [
"babel-preset-expo"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
],
},
"production": {
"plugins": [
"transform-remove-console"
]
}
}
"expo"
]
}

View File

@@ -1,9 +1,14 @@
# Navigation Playground Example
A playground for experimenting with react-navigation in a pure-JS React Native app.
The NavigationPlayground example app includes a variety of patterns and is used as a simple way for contributors to manually integration test changes.
## Usage
Please see the [Contributors Guide](https://reactnavigation.org/docs/contributing.html#run-the-example-app) for instructions on running these example apps.
```bash
yarn # in the react-navigation root directory
cd examples/NavigationPlayground
yarn
yarn start
```
You can view this example application directly on your phone by visiting [our expo demo](https://exp.host/@react-navigation/NavigationPlayground).
You can view this example application directly on Android phones by visiting scanning the QR code on [this site](https://exp.host/@react-navigation/NavigationPlayground) with the [Expo app](https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en).

View File

@@ -11,7 +11,7 @@
"splash": {
"image": "./assets/icons/splash.png"
},
"sdkVersion": "30.0.0",
"sdkVersion": "32.0.0",
"assetBundlePatterns": [
"**/*"
],
@@ -23,4 +23,4 @@
"package": "com.reactnavigation.example"
}
}
}
}

View File

@@ -15,7 +15,7 @@ class MyHomeScreen extends React.Component {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-home' : 'ios-home-outline'}
name={focused ? 'ios-home' : 'ios-home'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>
@@ -41,7 +41,7 @@ class ReccomendedScreen extends React.Component {
tabBarLabel: 'Reccomended',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-people' : 'ios-people-outline'}
name={focused ? 'ios-people' : 'ios-people'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>
@@ -67,7 +67,7 @@ class FeaturedScreen extends React.Component {
tabBarLabel: 'Featured',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-star' : 'ios-star-outline'}
name={focused ? 'ios-star' : 'ios-star'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>

View File

@@ -73,7 +73,7 @@ MyHomeScreen.navigationOptions = {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-home' : 'ios-home-outline'}
name={'ios-home'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>
@@ -94,7 +94,7 @@ class MyPeopleScreen extends React.Component<MyPeopleScreenProps> {
tabBarLabel: 'People',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-people' : 'ios-people-outline'}
name={'ios-people'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>
@@ -134,7 +134,7 @@ class MyChatScreen extends React.Component<MyChatScreenProps> {
tabBarLabel: 'Chat',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-chatboxes' : 'ios-chatboxes-outline'}
name={'ios-chatboxes'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>
@@ -169,7 +169,7 @@ MySettingsScreen.navigationOptions = {
tabBarLabel: 'Settings',
tabBarIcon: ({ tintColor, focused, horizontal }) => (
<Ionicons
name={focused ? 'ios-settings' : 'ios-settings-outline'}
name={'ios-settings'}
size={horizontal ? 20 : 26}
style={{ color: tintColor }}
/>

View File

@@ -109,7 +109,7 @@ const StacksInTabs = createBottomTabNavigator(
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-home' : 'ios-home-outline'}
name={focused ? 'ios-home' : 'ios-home'}
size={26}
style={{ color: tintColor }}
/>
@@ -123,7 +123,7 @@ const StacksInTabs = createBottomTabNavigator(
tabBarLabel: 'Settings',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-settings' : 'ios-settings-outline'}
name={focused ? 'ios-settings' : 'ios-settings'}
size={26}
style={{ color: tintColor }}
/>

View File

@@ -66,7 +66,7 @@ const TabNav = createBottomTabNavigator(
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-home' : 'ios-home-outline'}
name={focused ? 'ios-home' : 'ios-home'}
size={26}
style={{ color: tintColor }}
/>
@@ -80,7 +80,7 @@ const TabNav = createBottomTabNavigator(
title: 'Settings',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-settings' : 'ios-settings-outline'}
name={focused ? 'ios-settings' : 'ios-settings'}
size={26}
style={{ color: tintColor }}
/>

View File

@@ -105,15 +105,15 @@ const createTabScreen = (name, icon, focusedIcon) => {
const TabsWithNavigationEvents = createMaterialBottomTabNavigator(
{
One: {
screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'),
screen: createTabScreen('One', 'numeric-1-box', 'numeric-1-box'),
},
Two: {
screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'),
screen: createTabScreen('Two', 'numeric-2-box', 'numeric-2-box'),
},
Three: {
screen: createTabScreen(
'Three',
'numeric-3-box-outline',
'numeric-3-box',
'numeric-3-box'
),
},

View File

@@ -81,15 +81,15 @@ const createTabScreen = (name, icon, focusedIcon, tintColor = '#673ab7') => {
const TabsWithNavigationFocus = createMaterialBottomTabNavigator(
{
One: {
screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'),
screen: createTabScreen('One', 'numeric-1-box', 'numeric-1-box'),
},
Two: {
screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'),
screen: createTabScreen('Two', 'numeric-2-box', 'numeric-2-box'),
},
Three: {
screen: createTabScreen(
'Three',
'numeric-3-box-outline',
'numeric-3-box',
'numeric-3-box'
),
},

View File

@@ -4,21 +4,21 @@
"private": true,
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"postinstall": "rm -rf node_modules/react-native-screens && rm -rf node_modules/react-native-gesture-handler",
"postinstall": "rm -rf node_modules/react-navigation/{.git,node_modules,examples}",
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"test": "flow"
},
"dependencies": {
"expo": "^30.0.0",
"expo": "^32.0.0",
"hoist-non-react-statics": "^3.0.1",
"invariant": "^2.2.4",
"react": "16.3.1",
"react-native": "^0.55.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-iphone-x-helper": "^1.0.2",
"react-native-paper": "^2.1.3",
"react-navigation": "link:../..",
"react-navigation": "../..",
"react-navigation-header-buttons": "^0.0.4",
"react-navigation-material-bottom-tabs": "1.0.0"
},
@@ -38,13 +38,6 @@
"json",
"jsx",
"node"
],
"modulePathIgnorePatterns": [
"/node_modules/.*/react-native/",
"/node_modules/.*/react/"
],
"transformIgnorePatterns": [
"/node_modules/(?!react-native|react-navigation)/"
]
}
}

View File

@@ -1,54 +0,0 @@
/**
* @noflow
*/
const fs = require('fs');
const path = require('path');
const blacklist = require('metro/src/blacklist');
module.exports = {
getBlacklistRE() {
return blacklist([
/react\-navigation\/examples\/(?!NavigationPlayground).*/,
/react\-navigation\/node_modules\/react-native\/(.*)/,
/react\-navigation\/node_modules\/react\/(.*)/,
/react\-navigation\/node_modules\/react-native-paper\/(.*)/,
/react\-navigation\/node_modules\/@expo\/vector-icons\/(.*)/,
]);
},
extraNodeModules: getNodeModulesForDirectory(path.resolve('.')),
};
function getNodeModulesForDirectory(rootPath) {
const nodeModulePath = path.join(rootPath, 'node_modules');
const folders = fs.readdirSync(nodeModulePath);
return folders.reduce((modules, folderName) => {
const folderPath = path.join(nodeModulePath, folderName);
if (folderName.startsWith('@')) {
const scopedModuleFolders = fs.readdirSync(folderPath);
const scopedModules = scopedModuleFolders.reduce(
(scopedModules, scopedFolderName) => {
scopedModules[
`${folderName}/${scopedFolderName}`
] = maybeResolveSymlink(path.join(folderPath, scopedFolderName));
return scopedModules;
},
{}
);
return Object.assign({}, modules, scopedModules);
}
modules[folderName] = maybeResolveSymlink(folderPath);
return modules;
}, {});
}
function maybeResolveSymlink(maybeSymlinkPath) {
if (fs.lstatSync(maybeSymlinkPath).isSymbolicLink()) {
const resolved = path.resolve(
path.dirname(maybeSymlinkPath),
fs.readlinkSync(maybeSymlinkPath)
);
return resolved;
}
return maybeSymlinkPath;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
# Examples
## Usage
Please see the [Contributors Guide](https://reactnavigation.org/docs/en/contributing.html#run-the-example-app) for instructions.

View File

@@ -678,8 +678,8 @@ declare module 'react-navigation' {
// The value that represents the progress of the transition when navigation
// state changes from one to another. Its numeric value will range from 0
// to 1.
// progress.__getAnimatedValue() < 1 : transtion is happening.
// progress.__getAnimatedValue() == 1 : transtion completes.
// progress.__getAnimatedValue() < 1 : transition is happening.
// progress.__getAnimatedValue() == 1 : transition completes.
progress: AnimatedValue,
// All the scenes of the transitioner.
@@ -1208,19 +1208,19 @@ declare module 'react-navigation' {
};
declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>;
declare export function withNavigation<Props: {}>(
Component: React$ComponentType<Props>
declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(
Component: ComponentType
): React$ComponentType<
$Diff<
Props,
React$ElementConfig<ComponentType>,
{
navigation: NavigationScreenProp<NavigationStateRoute> | void,
}
>
>;
declare export function withNavigationFocus<Props: {}>(
Component: React$ComponentType<Props>
): React$ComponentType<$Diff<Props, { isFocused: boolean | void }>>;
declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(
Component: ComponentType
): 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.0.2",
"version": "3.1.4",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"repository": {
@@ -34,11 +34,11 @@
"react-native": "*"
},
"dependencies": {
"@react-navigation/core": "^3.0.0",
"@react-navigation/native": "^3.0.1",
"react-navigation-drawer": "^1.0.3",
"react-navigation-stack": "^1.0.2",
"react-navigation-tabs": "^1.0.0"
"@react-navigation/core": "3.0.3",
"@react-navigation/native": "3.1.4",
"react-navigation-drawer": "1.1.0",
"react-navigation-stack": "1.0.8",
"react-navigation-tabs": "1.0.2"
},
"devDependencies": {
"babel-cli": "^6.24.1",

615
yarn.lock

File diff suppressed because it is too large Load Diff