From 4128654324e1708148e3b16e8767b62d6348c495 Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Wed, 21 Aug 2019 16:09:10 +0530 Subject: [PATCH] chore: navigation-ex -> react-navigation --- .eslintrc.json | 16 ++++++++-------- package.json | 4 ++-- packages/bottom-tabs/package.json | 8 ++++---- .../src/navigators/createBottomTabNavigator.tsx | 4 ++-- packages/bottom-tabs/src/types.tsx | 4 ++-- packages/bottom-tabs/src/views/BottomTabBar.tsx | 2 +- packages/bottom-tabs/src/views/BottomTabView.tsx | 4 ++-- packages/bottom-tabs/src/views/TabBarIcon.tsx | 2 +- packages/core/package.json | 4 ++-- packages/core/src/NavigationContainer.tsx | 2 +- packages/drawer/package.json | 8 ++++---- .../src/navigators/createDrawerNavigator.tsx | 4 ++-- packages/drawer/src/types.tsx | 4 ++-- packages/drawer/src/views/DrawerSidebar.tsx | 7 +++++-- packages/drawer/src/views/DrawerView.tsx | 7 +++++-- packages/example/app.json | 6 +++--- packages/example/package.json | 2 +- packages/example/src/Screens/BottomTabs.tsx | 2 +- .../example/src/Screens/MaterialBottomTabs.tsx | 2 +- packages/example/src/Screens/MaterialTopTabs.tsx | 2 +- packages/example/src/Screens/SimpleStack.tsx | 4 ++-- packages/example/src/index.tsx | 8 ++++---- packages/material-bottom-tabs/package.json | 8 ++++---- .../createMaterialBottomTabNavigator.tsx | 4 ++-- packages/material-bottom-tabs/src/types.tsx | 8 ++++++-- .../src/views/MaterialBottomTabView.tsx | 8 ++++++-- packages/material-top-tabs/package.json | 8 ++++---- .../navigators/createMaterialTopTabNavigator.tsx | 4 ++-- packages/material-top-tabs/src/types.tsx | 4 ++-- .../src/views/MaterialTopTabBar.tsx | 2 +- .../src/views/MaterialTopTabView.tsx | 8 ++++++-- packages/native/package.json | 6 +++--- packages/native/src/useBackButton.tsx | 2 +- packages/native/src/useLinking.tsx | 2 +- packages/routers/package.json | 6 +++--- packages/routers/src/DrawerRouter.tsx | 2 +- packages/routers/src/StackRouter.tsx | 2 +- packages/routers/src/TabRouter.tsx | 2 +- packages/stack/package.json | 8 ++++---- .../src/navigators/createStackNavigator.tsx | 4 ++-- packages/stack/src/types.tsx | 4 ++-- packages/stack/src/views/Header/Header.tsx | 2 +- .../stack/src/views/Header/HeaderContainer.tsx | 4 ++-- .../stack/src/views/Header/HeaderSegment.tsx | 2 +- packages/stack/src/views/Stack/Stack.tsx | 8 ++++++-- packages/stack/src/views/Stack/StackItem.tsx | 8 ++++++-- packages/stack/src/views/Stack/StackView.tsx | 8 ++++++-- tsconfig.json | 2 +- 48 files changed, 131 insertions(+), 101 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index cc6cd84e..89e293cb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,14 +3,14 @@ "settings": { "react": { "version": "16" }, "import/core-modules": [ - "@navigation-ex/core", - "@navigation-ex/native", - "@navigation-ex/routers", - "@navigation-ex/stack", - "@navigation-ex/drawer", - "@navigation-ex/bottom-tabs", - "@navigation-ex/material-top-tabs", - "@navigation-ex/material-bottom-tabs" + "@react-navigation/core", + "@react-navigation/native", + "@react-navigation/routers", + "@react-navigation/stack", + "@react-navigation/drawer", + "@react-navigation/bottom-tabs", + "@react-navigation/material-top-tabs", + "@react-navigation/material-bottom-tabs" ] }, "env": { "browser": true, "node": true } diff --git a/package.json b/package.json index 150b92b4..49f48f20 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/satya164/navigation-ex.git" + "url": "git+https://github.com/satya164/react-navigation.git" }, "author": "Satyajit Sahoo (https://github.com/satya164/)", "scripts": { @@ -61,5 +61,5 @@ "/jest/setup.js" ] }, - "name": "navigation-ex" + "name": "react-navigation" } diff --git a/packages/bottom-tabs/package.json b/packages/bottom-tabs/package.json index 1fadf67d..9bcacb76 100644 --- a/packages/bottom-tabs/package.json +++ b/packages/bottom-tabs/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/bottom-tabs", - "version": "0.0.1", + "name": "@react-navigation/bottom-tabs", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,8 +15,8 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", - "@navigation-ex/routers": "^0.0.1", + "@react-navigation/core": "^5.0.0-alpha.0", + "@react-navigation/routers": "^5.0.0-alpha.0", "react-native-safe-area-view": "^0.14.6" }, "devDependencies": { diff --git a/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx b/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx index e6b9e53b..b9c27b83 100644 --- a/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx +++ b/packages/bottom-tabs/src/navigators/createBottomTabNavigator.tsx @@ -3,12 +3,12 @@ import { useNavigationBuilder, createNavigator, DefaultNavigatorOptions, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; import { TabRouter, TabRouterOptions, TabNavigationState, -} from '@navigation-ex/routers'; +} from '@react-navigation/routers'; import BottomTabView from '../views/BottomTabView'; import { BottomTabNavigationConfig, diff --git a/packages/bottom-tabs/src/types.tsx b/packages/bottom-tabs/src/types.tsx index 5f332a14..76372699 100644 --- a/packages/bottom-tabs/src/types.tsx +++ b/packages/bottom-tabs/src/types.tsx @@ -13,8 +13,8 @@ import { ParamListBase, Descriptor, Route, -} from '@navigation-ex/core'; -import { TabNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { TabNavigationState } from '@react-navigation/routers'; export type BottomTabNavigationEventMap = { /** diff --git a/packages/bottom-tabs/src/views/BottomTabBar.tsx b/packages/bottom-tabs/src/views/BottomTabBar.tsx index 3bd11aa5..c86709e0 100644 --- a/packages/bottom-tabs/src/views/BottomTabBar.tsx +++ b/packages/bottom-tabs/src/views/BottomTabBar.tsx @@ -9,7 +9,7 @@ import { Dimensions, } from 'react-native'; import SafeAreaView from 'react-native-safe-area-view'; -import { Route } from '@navigation-ex/core'; +import { Route } from '@react-navigation/core'; import TabBarIcon from './TabBarIcon'; import TouchableWithoutFeedbackWrapper from './TouchableWithoutFeedbackWrapper'; diff --git a/packages/bottom-tabs/src/views/BottomTabView.tsx b/packages/bottom-tabs/src/views/BottomTabView.tsx index db43445a..26391fb2 100644 --- a/packages/bottom-tabs/src/views/BottomTabView.tsx +++ b/packages/bottom-tabs/src/views/BottomTabView.tsx @@ -10,8 +10,8 @@ import { ParamListBase, Route, BaseActions, -} from '@navigation-ex/core'; -import { TabNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { TabNavigationState } from '@react-navigation/routers'; // eslint-disable-next-line import/no-unresolved import { ScreenContainer } from 'react-native-screens'; diff --git a/packages/bottom-tabs/src/views/TabBarIcon.tsx b/packages/bottom-tabs/src/views/TabBarIcon.tsx index ae0fa616..db9be296 100644 --- a/packages/bottom-tabs/src/views/TabBarIcon.tsx +++ b/packages/bottom-tabs/src/views/TabBarIcon.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; -import { Route } from '@navigation-ex/core'; +import { Route } from '@react-navigation/core'; type Props = { route: Route; diff --git a/packages/core/package.json b/packages/core/package.json index b60f7323..77b5cbb7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/core", - "version": "0.0.1", + "name": "@react-navigation/core", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", diff --git a/packages/core/src/NavigationContainer.tsx b/packages/core/src/NavigationContainer.tsx index 7ff11f74..18300377 100644 --- a/packages/core/src/NavigationContainer.tsx +++ b/packages/core/src/NavigationContainer.tsx @@ -143,7 +143,7 @@ const Container = React.forwardRef(function NavigationContainer( }, []); const { trackState, trackAction } = useDevTools({ - name: '@navigation-ex', + name: '@react-navigation', reset, state, }); diff --git a/packages/drawer/package.json b/packages/drawer/package.json index 0d15869d..03b572fa 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/drawer", - "version": "0.0.1", + "name": "@react-navigation/drawer", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,8 +15,8 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", - "@navigation-ex/routers": "^0.0.1", + "@react-navigation/core": "^5.0.0-alpha.0", + "@react-navigation/routers": "^5.0.0-alpha.0", "react-native-safe-area-view": "^0.14.6" }, "devDependencies": { diff --git a/packages/drawer/src/navigators/createDrawerNavigator.tsx b/packages/drawer/src/navigators/createDrawerNavigator.tsx index a7b14f30..ced3d422 100644 --- a/packages/drawer/src/navigators/createDrawerNavigator.tsx +++ b/packages/drawer/src/navigators/createDrawerNavigator.tsx @@ -3,12 +3,12 @@ import { createNavigator, useNavigationBuilder, DefaultNavigatorOptions, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; import { DrawerNavigationState, DrawerRouterOptions, DrawerRouter, -} from '@navigation-ex/routers'; +} from '@react-navigation/routers'; import DrawerView from '../views/DrawerView'; import { DrawerNavigationOptions, DrawerNavigationConfig } from '../types'; diff --git a/packages/drawer/src/types.tsx b/packages/drawer/src/types.tsx index eff8d74f..f45c50b0 100644 --- a/packages/drawer/src/types.tsx +++ b/packages/drawer/src/types.tsx @@ -6,8 +6,8 @@ import { NavigationProp, Descriptor, NavigationHelpers, -} from '@navigation-ex/core'; -import { DrawerNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { DrawerNavigationState } from '@react-navigation/routers'; import { PanGestureHandler } from 'react-native-gesture-handler'; export type Scene = { diff --git a/packages/drawer/src/views/DrawerSidebar.tsx b/packages/drawer/src/views/DrawerSidebar.tsx index 99c3590a..cac062f4 100644 --- a/packages/drawer/src/views/DrawerSidebar.tsx +++ b/packages/drawer/src/views/DrawerSidebar.tsx @@ -6,8 +6,11 @@ import { ParamListBase, Route, BaseActions, -} from '@navigation-ex/core'; -import { DrawerActions, DrawerNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { + DrawerActions, + DrawerNavigationState, +} from '@react-navigation/routers'; import { Scene, ContentComponentProps, DrawerDescriptorMap } from '../types'; diff --git a/packages/drawer/src/views/DrawerView.tsx b/packages/drawer/src/views/DrawerView.tsx index b9a34176..fc6ccbec 100644 --- a/packages/drawer/src/views/DrawerView.tsx +++ b/packages/drawer/src/views/DrawerView.tsx @@ -4,8 +4,11 @@ import { Dimensions, StyleSheet, I18nManager, Platform } from 'react-native'; import { ScreenContainer } from 'react-native-screens'; import SafeAreaView from 'react-native-safe-area-view'; import { PanGestureHandler, ScrollView } from 'react-native-gesture-handler'; -import { ParamListBase, NavigationHelpers } from '@navigation-ex/core'; -import { DrawerNavigationState, DrawerActions } from '@navigation-ex/routers'; +import { ParamListBase, NavigationHelpers } from '@react-navigation/core'; +import { + DrawerNavigationState, + DrawerActions, +} from '@react-navigation/routers'; import DrawerSidebar from './DrawerSidebar'; import DrawerGestureContext from '../utils/DrawerGestureContext'; diff --git a/packages/example/app.json b/packages/example/app.json index be9776ae..a1db0afc 100644 --- a/packages/example/app.json +++ b/packages/example/app.json @@ -1,7 +1,7 @@ { "expo": { - "name": "@navigation-ex/example", - "slug": "navigation-ex-example", + "name": "@react-navigation/example", + "slug": "react-navigation-example", "privacy": "public", "sdkVersion": "34.0.0", "platforms": [ @@ -27,4 +27,4 @@ "supportsTablet": true } } -} \ No newline at end of file +} diff --git a/packages/example/package.json b/packages/example/package.json index 720c2044..baa85b00 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,5 +1,5 @@ { - "name": "@navigation-ex/example", + "name": "@react-navigation/example", "version": "0.0.0", "private": true, "workspaces": { diff --git a/packages/example/src/Screens/BottomTabs.tsx b/packages/example/src/Screens/BottomTabs.tsx index ffc771bc..3fa578fc 100644 --- a/packages/example/src/Screens/BottomTabs.tsx +++ b/packages/example/src/Screens/BottomTabs.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { MaterialIcons } from '@expo/vector-icons'; -import { createBottomTabNavigator } from '@navigation-ex/bottom-tabs'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; // @ts-ignore import TouchableBounce from 'react-native/Libraries/Components/Touchable/TouchableBounce'; import Albums from '../Shared/Albums'; diff --git a/packages/example/src/Screens/MaterialBottomTabs.tsx b/packages/example/src/Screens/MaterialBottomTabs.tsx index c3b5eee6..095a859e 100644 --- a/packages/example/src/Screens/MaterialBottomTabs.tsx +++ b/packages/example/src/Screens/MaterialBottomTabs.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { StyleSheet } from 'react-native'; -import { createMaterialBottomTabNavigator } from '@navigation-ex/material-bottom-tabs'; +import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs'; import Article from '../Shared/Article'; import Albums from '../Shared/Albums'; import Contacts from '../Shared/Contacts'; diff --git a/packages/example/src/Screens/MaterialTopTabs.tsx b/packages/example/src/Screens/MaterialTopTabs.tsx index c9187f05..f4131f0d 100644 --- a/packages/example/src/Screens/MaterialTopTabs.tsx +++ b/packages/example/src/Screens/MaterialTopTabs.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { StyleSheet } from 'react-native'; -import { createMaterialTopTabNavigator } from '@navigation-ex/material-top-tabs'; +import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; import Albums from '../Shared/Albums'; import Contacts from '../Shared/Contacts'; import Chat from '../Shared/Chat'; diff --git a/packages/example/src/Screens/SimpleStack.tsx b/packages/example/src/Screens/SimpleStack.tsx index d52b4681..11394f13 100644 --- a/packages/example/src/Screens/SimpleStack.tsx +++ b/packages/example/src/Screens/SimpleStack.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { Button } from 'react-native-paper'; -import { RouteProp, ParamListBase } from '@navigation-ex/core'; +import { RouteProp, ParamListBase } from '@react-navigation/core'; import { createStackNavigator, StackNavigationProp, -} from '@navigation-ex/stack'; +} from '@react-navigation/stack'; import Article from '../Shared/Article'; import Albums from '../Shared/Albums'; diff --git a/packages/example/src/index.tsx b/packages/example/src/index.tsx index afbe579b..75ae016b 100644 --- a/packages/example/src/index.tsx +++ b/packages/example/src/index.tsx @@ -8,17 +8,17 @@ import { InitialState, getStateFromPath, NavigationContainerRef, -} from '@navigation-ex/core'; -import { useBackButton, useLinking } from '@navigation-ex/native'; +} from '@react-navigation/core'; +import { useBackButton, useLinking } from '@react-navigation/native'; import { createDrawerNavigator, DrawerNavigationProp, -} from '@navigation-ex/drawer'; +} from '@react-navigation/drawer'; import { createStackNavigator, Assets as StackAssets, StackNavigationProp, -} from '@navigation-ex/stack'; +} from '@react-navigation/stack'; import SimpleStackScreen from './Screens/SimpleStack'; import BottomTabsScreen from './Screens/BottomTabs'; diff --git a/packages/material-bottom-tabs/package.json b/packages/material-bottom-tabs/package.json index 6b6aba3c..f53c401a 100644 --- a/packages/material-bottom-tabs/package.json +++ b/packages/material-bottom-tabs/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/material-bottom-tabs", - "version": "0.0.1", + "name": "@react-navigation/material-bottom-tabs", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,8 +15,8 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", - "@navigation-ex/routers": "^0.0.1" + "@react-navigation/core": "^5.0.0-alpha.0", + "@react-navigation/routers": "^5.0.0-alpha.0" }, "devDependencies": { "@react-native-community/bob": "^0.7.0", diff --git a/packages/material-bottom-tabs/src/navigators/createMaterialBottomTabNavigator.tsx b/packages/material-bottom-tabs/src/navigators/createMaterialBottomTabNavigator.tsx index bee314ec..1353e922 100644 --- a/packages/material-bottom-tabs/src/navigators/createMaterialBottomTabNavigator.tsx +++ b/packages/material-bottom-tabs/src/navigators/createMaterialBottomTabNavigator.tsx @@ -3,12 +3,12 @@ import { useNavigationBuilder, createNavigator, DefaultNavigatorOptions, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; import { TabRouter, TabRouterOptions, TabNavigationState, -} from '@navigation-ex/routers'; +} from '@react-navigation/routers'; import MaterialBottomTabView from '../views/MaterialBottomTabView'; import { diff --git a/packages/material-bottom-tabs/src/types.tsx b/packages/material-bottom-tabs/src/types.tsx index f917fb7c..77c4132e 100644 --- a/packages/material-bottom-tabs/src/types.tsx +++ b/packages/material-bottom-tabs/src/types.tsx @@ -1,6 +1,10 @@ import { BottomNavigation } from 'react-native-paper'; -import { ParamListBase, Descriptor, NavigationProp } from '@navigation-ex/core'; -import { TabNavigationState } from '@navigation-ex/routers'; +import { + ParamListBase, + Descriptor, + NavigationProp, +} from '@react-navigation/core'; +import { TabNavigationState } from '@react-navigation/routers'; export type MaterialBottomTabNavigationEventMap = { refocus: undefined; diff --git a/packages/material-bottom-tabs/src/views/MaterialBottomTabView.tsx b/packages/material-bottom-tabs/src/views/MaterialBottomTabView.tsx index e0ba6e94..5a2f29c7 100644 --- a/packages/material-bottom-tabs/src/views/MaterialBottomTabView.tsx +++ b/packages/material-bottom-tabs/src/views/MaterialBottomTabView.tsx @@ -2,8 +2,12 @@ import * as React from 'react'; import { StyleSheet } from 'react-native'; import { BottomNavigation } from 'react-native-paper'; import MaterialCommunityIcons from 'react-native-vector-icons/MaterialIcons'; -import { NavigationHelpers, ParamListBase, Route } from '@navigation-ex/core'; -import { TabNavigationState, TabActions } from '@navigation-ex/routers'; +import { + NavigationHelpers, + ParamListBase, + Route, +} from '@react-navigation/core'; +import { TabNavigationState, TabActions } from '@react-navigation/routers'; import { MaterialBottomTabDescriptorMap, diff --git a/packages/material-top-tabs/package.json b/packages/material-top-tabs/package.json index a0ace020..668e9408 100644 --- a/packages/material-top-tabs/package.json +++ b/packages/material-top-tabs/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/material-top-tabs", - "version": "0.0.1", + "name": "@react-navigation/material-top-tabs", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,8 +15,8 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", - "@navigation-ex/routers": "^0.0.1" + "@react-navigation/core": "^5.0.0-alpha.0", + "@react-navigation/routers": "^5.0.0-alpha.0" }, "devDependencies": { "@react-native-community/bob": "^0.7.0", diff --git a/packages/material-top-tabs/src/navigators/createMaterialTopTabNavigator.tsx b/packages/material-top-tabs/src/navigators/createMaterialTopTabNavigator.tsx index 4f61b7c2..b83627b0 100644 --- a/packages/material-top-tabs/src/navigators/createMaterialTopTabNavigator.tsx +++ b/packages/material-top-tabs/src/navigators/createMaterialTopTabNavigator.tsx @@ -3,12 +3,12 @@ import { useNavigationBuilder, createNavigator, DefaultNavigatorOptions, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; import { TabRouter, TabRouterOptions, TabNavigationState, -} from '@navigation-ex/routers'; +} from '@react-navigation/routers'; import MaterialTopTabView from '../views/MaterialTopTabView'; import { MaterialTopTabNavigationConfig, diff --git a/packages/material-top-tabs/src/types.tsx b/packages/material-top-tabs/src/types.tsx index 97a59043..1740b4de 100644 --- a/packages/material-top-tabs/src/types.tsx +++ b/packages/material-top-tabs/src/types.tsx @@ -6,8 +6,8 @@ import { NavigationHelpers, Route, NavigationProp, -} from '@navigation-ex/core'; -import { TabNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { TabNavigationState } from '@react-navigation/routers'; export type MaterialTopTabNavigationEventMap = { /** diff --git a/packages/material-top-tabs/src/views/MaterialTopTabBar.tsx b/packages/material-top-tabs/src/views/MaterialTopTabBar.tsx index 2e70d293..7094fcef 100644 --- a/packages/material-top-tabs/src/views/MaterialTopTabBar.tsx +++ b/packages/material-top-tabs/src/views/MaterialTopTabBar.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { TabBar } from 'react-native-tab-view'; import Animated from 'react-native-reanimated'; -import { Route } from '@navigation-ex/core'; +import { Route } from '@react-navigation/core'; import { MaterialTopTabBarProps } from '../types'; diff --git a/packages/material-top-tabs/src/views/MaterialTopTabView.tsx b/packages/material-top-tabs/src/views/MaterialTopTabView.tsx index 9de2171f..f4663ba8 100644 --- a/packages/material-top-tabs/src/views/MaterialTopTabView.tsx +++ b/packages/material-top-tabs/src/views/MaterialTopTabView.tsx @@ -1,7 +1,11 @@ import * as React from 'react'; import { TabView, SceneRendererProps } from 'react-native-tab-view'; -import { NavigationHelpers, ParamListBase, Route } from '@navigation-ex/core'; -import { TabNavigationState, TabActions } from '@navigation-ex/routers'; +import { + NavigationHelpers, + ParamListBase, + Route, +} from '@react-navigation/core'; +import { TabNavigationState, TabActions } from '@react-navigation/routers'; import MaterialTopTabBar from './MaterialTopTabBar'; import { diff --git a/packages/native/package.json b/packages/native/package.json index 202dcfcd..d682c89e 100644 --- a/packages/native/package.json +++ b/packages/native/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/native", - "version": "0.0.1", + "name": "@react-navigation/native", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,7 +15,7 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1" + "@react-navigation/core": "^5.0.0-alpha.0" }, "devDependencies": { "@react-native-community/bob": "^0.7.0", diff --git a/packages/native/src/useBackButton.tsx b/packages/native/src/useBackButton.tsx index 41b23e98..bd866a18 100644 --- a/packages/native/src/useBackButton.tsx +++ b/packages/native/src/useBackButton.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { NavigationContainerRef } from '@navigation-ex/core'; +import { NavigationContainerRef } from '@react-navigation/core'; import { BackHandler } from 'react-native'; export default function useBackButton( diff --git a/packages/native/src/useLinking.tsx b/packages/native/src/useLinking.tsx index a005bb68..5cf420b9 100644 --- a/packages/native/src/useLinking.tsx +++ b/packages/native/src/useLinking.tsx @@ -5,7 +5,7 @@ import { NavigationContainerRef, NavigationState, PartialState, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; type Options = { /** diff --git a/packages/routers/package.json b/packages/routers/package.json index 0a491dd8..3d7eefa0 100644 --- a/packages/routers/package.json +++ b/packages/routers/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/routers", - "version": "0.0.1", + "name": "@react-navigation/routers", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,7 +15,7 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", + "@react-navigation/core": "^5.0.0-alpha.0", "shortid": "^2.2.14" }, "devDependencies": { diff --git a/packages/routers/src/DrawerRouter.tsx b/packages/routers/src/DrawerRouter.tsx index 83c3cea1..9cb93ca5 100644 --- a/packages/routers/src/DrawerRouter.tsx +++ b/packages/routers/src/DrawerRouter.tsx @@ -1,5 +1,5 @@ import shortid from 'shortid'; -import { CommonAction, Router } from '@navigation-ex/core'; +import { CommonAction, Router } from '@react-navigation/core'; import TabRouter, { TabActions, TabActionType, diff --git a/packages/routers/src/StackRouter.tsx b/packages/routers/src/StackRouter.tsx index 66ec24ce..ce100a65 100644 --- a/packages/routers/src/StackRouter.tsx +++ b/packages/routers/src/StackRouter.tsx @@ -6,7 +6,7 @@ import { BaseRouter, DefaultRouterOptions, Route, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; export type StackActionType = | { diff --git a/packages/routers/src/TabRouter.tsx b/packages/routers/src/TabRouter.tsx index cceb1112..a5cb8c9b 100644 --- a/packages/routers/src/TabRouter.tsx +++ b/packages/routers/src/TabRouter.tsx @@ -7,7 +7,7 @@ import { DefaultRouterOptions, Router, Route, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; export type TabActionType = { type: 'JUMP_TO'; diff --git a/packages/stack/package.json b/packages/stack/package.json index f27167a7..2d934be5 100644 --- a/packages/stack/package.json +++ b/packages/stack/package.json @@ -1,6 +1,6 @@ { - "name": "@navigation-ex/stack", - "version": "0.0.1", + "name": "@react-navigation/stack", + "version": "5.0.0-alpha.0", "license": "MIT", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", @@ -15,8 +15,8 @@ "clean": "del lib" }, "dependencies": { - "@navigation-ex/core": "^0.0.1", - "@navigation-ex/routers": "^0.0.1", + "@react-navigation/core": "^5.0.0-alpha.0", + "@react-navigation/routers": "^5.0.0-alpha.0", "react-native-safe-area-view": "^0.14.6" }, "devDependencies": { diff --git a/packages/stack/src/navigators/createStackNavigator.tsx b/packages/stack/src/navigators/createStackNavigator.tsx index 73cb7852..2663fedb 100644 --- a/packages/stack/src/navigators/createStackNavigator.tsx +++ b/packages/stack/src/navigators/createStackNavigator.tsx @@ -4,13 +4,13 @@ import { createNavigator, DefaultNavigatorOptions, EventArg, -} from '@navigation-ex/core'; +} from '@react-navigation/core'; import { StackRouter, StackRouterOptions, StackNavigationState, StackActions, -} from '@navigation-ex/routers'; +} from '@react-navigation/routers'; import KeyboardManager from '../views/KeyboardManager'; import StackView from '../views/Stack/StackView'; import { StackNavigationConfig, StackNavigationOptions } from '../types'; diff --git a/packages/stack/src/types.tsx b/packages/stack/src/types.tsx index c7ed3cb4..27c60541 100644 --- a/packages/stack/src/types.tsx +++ b/packages/stack/src/types.tsx @@ -10,8 +10,8 @@ import { ParamListBase, Descriptor, Route, -} from '@navigation-ex/core'; -import { StackNavigationState } from '@navigation-ex/routers'; +} from '@react-navigation/core'; +import { StackNavigationState } from '@react-navigation/routers'; export type StackNavigationEventMap = { /** diff --git a/packages/stack/src/views/Header/Header.tsx b/packages/stack/src/views/Header/Header.tsx index 774e974b..48775d9a 100644 --- a/packages/stack/src/views/Header/Header.tsx +++ b/packages/stack/src/views/Header/Header.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { StackActions } from '@navigation-ex/routers'; +import { StackActions } from '@react-navigation/routers'; import HeaderSegment from './HeaderSegment'; import { HeaderProps, HeaderTitleProps } from '../../types'; import HeaderTitle from './HeaderTitle'; diff --git a/packages/stack/src/views/Header/HeaderContainer.tsx b/packages/stack/src/views/Header/HeaderContainer.tsx index b60408e7..34ba3388 100644 --- a/packages/stack/src/views/Header/HeaderContainer.tsx +++ b/packages/stack/src/views/Header/HeaderContainer.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; -import { Route, ParamListBase } from '@navigation-ex/core'; -import { StackNavigationState } from '@navigation-ex/routers'; +import { Route, ParamListBase } from '@react-navigation/core'; +import { StackNavigationState } from '@react-navigation/routers'; import Header from './Header'; import { forStatic } from '../../TransitionConfigs/HeaderStyleInterpolators'; diff --git a/packages/stack/src/views/Header/HeaderSegment.tsx b/packages/stack/src/views/Header/HeaderSegment.tsx index 0295436e..e2466eae 100644 --- a/packages/stack/src/views/Header/HeaderSegment.tsx +++ b/packages/stack/src/views/Header/HeaderSegment.tsx @@ -8,7 +8,7 @@ import { } from 'react-native'; import Animated from 'react-native-reanimated'; import { getStatusBarHeight } from 'react-native-safe-area-view'; -import { Route } from '@navigation-ex/core'; +import { Route } from '@react-navigation/core'; import HeaderBackButton from './HeaderBackButton'; import HeaderBackground from './HeaderBackground'; import memoize from '../../utils/memoize'; diff --git a/packages/stack/src/views/Stack/Stack.tsx b/packages/stack/src/views/Stack/Stack.tsx index cc6e3ca1..1c96ee86 100755 --- a/packages/stack/src/views/Stack/Stack.tsx +++ b/packages/stack/src/views/Stack/Stack.tsx @@ -10,8 +10,12 @@ import { import Animated from 'react-native-reanimated'; // eslint-disable-next-line import/no-unresolved import * as Screens from 'react-native-screens'; // Import with * as to prevent getters being called -import { Route, NavigationHelpers, ParamListBase } from '@navigation-ex/core'; -import { StackNavigationState } from '@navigation-ex/routers'; +import { + Route, + NavigationHelpers, + ParamListBase, +} from '@react-navigation/core'; +import { StackNavigationState } from '@react-navigation/routers'; import { getDefaultHeaderHeight } from '../Header/HeaderSegment'; import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; diff --git a/packages/stack/src/views/Stack/StackItem.tsx b/packages/stack/src/views/Stack/StackItem.tsx index 18b62eb5..357d12ab 100644 --- a/packages/stack/src/views/Stack/StackItem.tsx +++ b/packages/stack/src/views/Stack/StackItem.tsx @@ -1,8 +1,12 @@ import * as React from 'react'; import { StyleSheet, Platform, StyleProp, ViewStyle } from 'react-native'; import Animated from 'react-native-reanimated'; -import { StackNavigationState } from '@navigation-ex/routers'; -import { Route, NavigationHelpers, ParamListBase } from '@navigation-ex/core'; +import { StackNavigationState } from '@react-navigation/routers'; +import { + Route, + NavigationHelpers, + ParamListBase, +} from '@react-navigation/core'; import { Props as HeaderContainerProps } from '../Header/HeaderContainer'; import Card from './Card'; import { HeaderScene, Layout, HeaderMode, TransitionPreset } from '../../types'; diff --git a/packages/stack/src/views/Stack/StackView.tsx b/packages/stack/src/views/Stack/StackView.tsx index 3b1657a8..aa3e4a0c 100644 --- a/packages/stack/src/views/Stack/StackView.tsx +++ b/packages/stack/src/views/Stack/StackView.tsx @@ -1,7 +1,11 @@ import * as React from 'react'; import { Platform } from 'react-native'; -import { ParamListBase, Route, NavigationHelpers } from '@navigation-ex/core'; -import { StackActions, StackNavigationState } from '@navigation-ex/routers'; +import { + ParamListBase, + Route, + NavigationHelpers, +} from '@react-navigation/core'; +import { StackActions, StackNavigationState } from '@react-navigation/routers'; import Stack from './Stack'; import HeaderContainer, { diff --git a/tsconfig.json b/tsconfig.json index 71db8305..b07fc1fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@navigation-ex/*": ["./packages/*/src", "./packages/*/lib/typescript"], + "@react-navigation/*": ["./packages/*/src", "./packages/*/lib/typescript"], "use-subscription": ["./typings/use-subscription.d"] }, "allowUnreachableCode": false,