mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-19 18:38:16 +08:00
Compare commits
10 Commits
@react-nav
...
@react-nav
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3ba72df65 | ||
|
|
be40244214 | ||
|
|
7388e6d9bc | ||
|
|
00e70da0d4 | ||
|
|
70f4fe2ffa | ||
|
|
e639748b23 | ||
|
|
324ea7181d | ||
|
|
9d3731c2df | ||
|
|
baf8ff77d5 | ||
|
|
b4d7b0ee86 |
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.17](https://github.com/react-navigation/react-navigation/compare/@react-navigation/bottom-tabs@6.0.0-next.16...@react-navigation/bottom-tabs@6.0.0-next.17) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.16](https://github.com/react-navigation/react-navigation/compare/@react-navigation/bottom-tabs@6.0.0-next.15...@react-navigation/bottom-tabs@6.0.0-next.16) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.15](https://github.com/react-navigation/react-navigation/compare/@react-navigation/bottom-tabs@6.0.0-next.14...@react-navigation/bottom-tabs@6.0.0-next.15) (2021-05-27)
|
# [6.0.0-next.15](https://github.com/react-navigation/react-navigation/compare/@react-navigation/bottom-tabs@6.0.0-next.14...@react-navigation/bottom-tabs@6.0.0-next.15) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/bottom-tabs
|
**Note:** Version bump only for package @react-navigation/bottom-tabs
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/bottom-tabs",
|
"name": "@react-navigation/bottom-tabs",
|
||||||
"description": "Bottom tab navigator following iOS design guidelines",
|
"description": "Bottom tab navigator following iOS design guidelines",
|
||||||
"version": "6.0.0-next.15",
|
"version": "6.0.0-next.17",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -36,12 +36,12 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/elements": "^1.0.0-next.14",
|
"@react-navigation/elements": "^1.0.0-next.16",
|
||||||
"color": "^3.1.3",
|
"color": "^3.1.3",
|
||||||
"warn-once": "^0.1.0"
|
"warn-once": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/color": "^3.0.1",
|
"@types/color": "^3.0.1",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.13](https://github.com/react-navigation/react-navigation/compare/@react-navigation/core@6.0.0-next.12...@react-navigation/core@6.0.0-next.13) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* validate property names in linking config ([324ea71](https://github.com/react-navigation/react-navigation/commit/324ea7181db6b743f512854be267cc9d65975b6f))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/core@6.0.0-next.11...@react-navigation/core@6.0.0-next.12) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* try to fix [#9631](https://github.com/react-navigation/react-navigation/issues/9631) ([b4d7b0e](https://github.com/react-navigation/react-navigation/commit/b4d7b0ee86c09419a18357867a0a25bb90d960c0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/core@6.0.0-next.10...@react-navigation/core@6.0.0-next.11) (2021-05-27)
|
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/core@6.0.0-next.10...@react-navigation/core@6.0.0-next.11) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/core
|
**Note:** Version bump only for package @react-navigation/core
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/core",
|
"name": "@react-navigation/core",
|
||||||
"description": "Core utilities for building navigators",
|
"description": "Core utilities for building navigators",
|
||||||
"version": "6.0.0-next.11",
|
"version": "6.0.0-next.13",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
"react-native",
|
"react-native",
|
||||||
|
|||||||
@@ -37,25 +37,6 @@ type State = NavigationState | PartialState<NavigationState> | undefined;
|
|||||||
const serializableWarnings: string[] = [];
|
const serializableWarnings: string[] = [];
|
||||||
const duplicateNameWarnings: string[] = [];
|
const duplicateNameWarnings: string[] = [];
|
||||||
|
|
||||||
try {
|
|
||||||
/**
|
|
||||||
* Migration instructions for removal of devtools from core
|
|
||||||
*/
|
|
||||||
Object.defineProperty(
|
|
||||||
global,
|
|
||||||
'REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED',
|
|
||||||
{
|
|
||||||
set(_) {
|
|
||||||
console.warn(
|
|
||||||
"Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools"
|
|
||||||
);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
// Ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove `key` and `routeNames` from the state objects recursively to get partial state.
|
* Remove `key` and `routeNames` from the state objects recursively to get partial state.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2420,3 +2420,57 @@ it('correctly applies initialRouteName for config with similar route names v2',
|
|||||||
getStateFromPath<object>(getPathFromState<object>(state, config), config)
|
getStateFromPath<object>(getPathFromState<object>(state, config), config)
|
||||||
).toEqual(state);
|
).toEqual(state);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('throws when invalid properties are specified in the config', () => {
|
||||||
|
expect(() =>
|
||||||
|
getStateFromPath<object>('', {
|
||||||
|
Foo: 'foo',
|
||||||
|
Bar: {
|
||||||
|
path: 'bar',
|
||||||
|
},
|
||||||
|
} as any)
|
||||||
|
).toThrowErrorMatchingInlineSnapshot(`
|
||||||
|
"Found invalid properties in the configuration:
|
||||||
|
- Foo
|
||||||
|
- Bar
|
||||||
|
|
||||||
|
Did you forget to specify them under a 'screens' property?
|
||||||
|
|
||||||
|
You can only specify the following properties:
|
||||||
|
- initialRouteName
|
||||||
|
- screens
|
||||||
|
|
||||||
|
See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."
|
||||||
|
`);
|
||||||
|
|
||||||
|
expect(() =>
|
||||||
|
getStateFromPath<object>('', {
|
||||||
|
screens: {
|
||||||
|
Foo: 'foo',
|
||||||
|
Bar: {
|
||||||
|
path: 'bar',
|
||||||
|
},
|
||||||
|
Baz: {
|
||||||
|
Qux: {
|
||||||
|
path: 'qux',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as any)
|
||||||
|
).toThrowErrorMatchingInlineSnapshot(`
|
||||||
|
"Found invalid properties in the configuration:
|
||||||
|
- Qux
|
||||||
|
|
||||||
|
Did you forget to specify them under a 'screens' property?
|
||||||
|
|
||||||
|
You can only specify the following properties:
|
||||||
|
- initialRouteName
|
||||||
|
- screens
|
||||||
|
- path
|
||||||
|
- exact
|
||||||
|
- stringify
|
||||||
|
- parse
|
||||||
|
|
||||||
|
See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import * as queryString from 'query-string';
|
|||||||
|
|
||||||
import fromEntries from './fromEntries';
|
import fromEntries from './fromEntries';
|
||||||
import type { PathConfig, PathConfigMap } from './types';
|
import type { PathConfig, PathConfigMap } from './types';
|
||||||
|
import validatePathConfig from './validatePathConfig';
|
||||||
|
|
||||||
type Options<ParamList> = {
|
type Options<ParamList> = {
|
||||||
initialRouteName?: string;
|
initialRouteName?: string;
|
||||||
@@ -75,6 +76,10 @@ export default function getPathFromState<ParamList extends {}>(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options) {
|
||||||
|
validatePathConfig(options);
|
||||||
|
}
|
||||||
|
|
||||||
// Create a normalized configs object which will be easier to use
|
// Create a normalized configs object which will be easier to use
|
||||||
const configs: Record<string, ConfigItem> = options?.screens
|
const configs: Record<string, ConfigItem> = options?.screens
|
||||||
? createNormalizedConfigs(options?.screens)
|
? createNormalizedConfigs(options?.screens)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import * as queryString from 'query-string';
|
|||||||
|
|
||||||
import findFocusedRoute from './findFocusedRoute';
|
import findFocusedRoute from './findFocusedRoute';
|
||||||
import type { PathConfigMap } from './types';
|
import type { PathConfigMap } from './types';
|
||||||
|
import validatePathConfig from './validatePathConfig';
|
||||||
|
|
||||||
type Options<ParamList extends {}> = {
|
type Options<ParamList extends {}> = {
|
||||||
initialRouteName?: string;
|
initialRouteName?: string;
|
||||||
@@ -65,6 +66,10 @@ export default function getStateFromPath<ParamList extends {}>(
|
|||||||
path: string,
|
path: string,
|
||||||
options?: Options<ParamList>
|
options?: Options<ParamList>
|
||||||
): ResultState | undefined {
|
): ResultState | undefined {
|
||||||
|
if (options) {
|
||||||
|
validatePathConfig(options);
|
||||||
|
}
|
||||||
|
|
||||||
let initialRoutes: InitialRouteConfig[] = [];
|
let initialRoutes: InitialRouteConfig[] = [];
|
||||||
|
|
||||||
if (options?.initialRouteName) {
|
if (options?.initialRouteName) {
|
||||||
|
|||||||
@@ -19,4 +19,5 @@ export { default as useNavigationBuilder } from './useNavigationBuilder';
|
|||||||
export { default as useNavigationContainerRef } from './useNavigationContainerRef';
|
export { default as useNavigationContainerRef } from './useNavigationContainerRef';
|
||||||
export { default as useNavigationState } from './useNavigationState';
|
export { default as useNavigationState } from './useNavigationState';
|
||||||
export { default as useRoute } from './useRoute';
|
export { default as useRoute } from './useRoute';
|
||||||
|
export { default as validatePathConfig } from './validatePathConfig';
|
||||||
export * from '@react-navigation/routers';
|
export * from '@react-navigation/routers';
|
||||||
|
|||||||
32
packages/core/src/validatePathConfig.tsx
Normal file
32
packages/core/src/validatePathConfig.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
const formatToList = (items: string[]) =>
|
||||||
|
items.map((key) => `- ${key}`).join('\n');
|
||||||
|
|
||||||
|
export default function validatePathConfig(config: any, root = true) {
|
||||||
|
const validKeys = ['initialRouteName', 'screens'];
|
||||||
|
|
||||||
|
if (!root) {
|
||||||
|
validKeys.push('path', 'exact', 'stringify', 'parse');
|
||||||
|
}
|
||||||
|
|
||||||
|
const invalidKeys = Object.keys(config).filter(
|
||||||
|
(key) => !validKeys.includes(key)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (invalidKeys.length) {
|
||||||
|
throw new Error(
|
||||||
|
`Found invalid properties in the configuration:\n${formatToList(
|
||||||
|
invalidKeys
|
||||||
|
)}\n\nDid you forget to specify them under a 'screens' property?\n\nYou can only specify the following properties:\n${formatToList(
|
||||||
|
validKeys
|
||||||
|
)}\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.screens) {
|
||||||
|
Object.entries(config.screens).forEach(([_, value]) => {
|
||||||
|
if (typeof value !== 'string') {
|
||||||
|
validatePathConfig(value, false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,25 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/devtools@6.0.0-next.13...@react-navigation/devtools@6.0.0-next.14) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/devtools
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.13](https://github.com/react-navigation/react-navigation/compare/@react-navigation/devtools@6.0.0-next.12...@react-navigation/devtools@6.0.0-next.13) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* try to fix [#9631](https://github.com/react-navigation/react-navigation/issues/9631) ([b4d7b0e](https://github.com/react-navigation/react-navigation/commit/b4d7b0ee86c09419a18357867a0a25bb90d960c0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/devtools@6.0.0-next.11...@react-navigation/devtools@6.0.0-next.12) (2021-05-27)
|
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/devtools@6.0.0-next.11...@react-navigation/devtools@6.0.0-next.12) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/devtools
|
**Note:** Version bump only for package @react-navigation/devtools
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/devtools",
|
"name": "@react-navigation/devtools",
|
||||||
"description": "Developer tools for React Navigation",
|
"description": "Developer tools for React Navigation",
|
||||||
"version": "6.0.0-next.12",
|
"version": "6.0.0-next.14",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
"react-native",
|
"react-native",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"nanoid": "^3.1.22"
|
"nanoid": "^3.1.22"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/core": "^6.0.0-next.11",
|
"@react-navigation/core": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/deep-equal": "^1.0.1",
|
"@types/deep-equal": "^1.0.1",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
|
|||||||
@@ -82,8 +82,10 @@ export default function useFlipper(
|
|||||||
});
|
});
|
||||||
|
|
||||||
on('linking.invoke', ({ method, args = [] }) => {
|
on('linking.invoke', ({ method, args = [] }) => {
|
||||||
// @ts-expect-error: __linking isn't publicly exposed
|
const linking: any = ref.current
|
||||||
const linking = ref.current?.__linking;
|
? // @ts-ignore: this might not exist
|
||||||
|
global.REACT_NAVIGATION_DEVTOOLS?.get(ref.current)?.linking
|
||||||
|
: null;
|
||||||
|
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case 'getStateFromPath':
|
case 'getStateFromPath':
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.16](https://github.com/react-navigation/react-navigation/compare/@react-navigation/drawer@6.0.0-next.15...@react-navigation/drawer@6.0.0-next.16) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/drawer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.15](https://github.com/react-navigation/react-navigation/compare/@react-navigation/drawer@6.0.0-next.14...@react-navigation/drawer@6.0.0-next.15) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/drawer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/drawer@6.0.0-next.13...@react-navigation/drawer@6.0.0-next.14) (2021-05-27)
|
# [6.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/drawer@6.0.0-next.13...@react-navigation/drawer@6.0.0-next.14) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/drawer
|
**Note:** Version bump only for package @react-navigation/drawer
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/drawer",
|
"name": "@react-navigation/drawer",
|
||||||
"description": "Drawer navigator component with animated transitions and gesturess",
|
"description": "Drawer navigator component with animated transitions and gesturess",
|
||||||
"version": "6.0.0-next.14",
|
"version": "6.0.0-next.16",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -41,12 +41,12 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/elements": "^1.0.0-next.14",
|
"@react-navigation/elements": "^1.0.0-next.16",
|
||||||
"color": "^3.1.3",
|
"color": "^3.1.3",
|
||||||
"warn-once": "^0.1.0"
|
"warn-once": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
"@types/react-native": "~0.64.4",
|
"@types/react-native": "~0.64.4",
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [1.0.0-next.16](https://github.com/react-navigation/react-navigation/compare/@react-navigation/elements@1.0.0-next.15...@react-navigation/elements@1.0.0-next.16) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/elements
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-next.15](https://github.com/react-navigation/react-navigation/compare/@react-navigation/elements@1.0.0-next.14...@react-navigation/elements@1.0.0-next.15) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/elements
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [1.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/elements@1.0.0-next.13...@react-navigation/elements@1.0.0-next.14) (2021-05-27)
|
# [1.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/elements@1.0.0-next.13...@react-navigation/elements@1.0.0-next.14) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/elements
|
**Note:** Version bump only for package @react-navigation/elements
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/elements",
|
"name": "@react-navigation/elements",
|
||||||
"description": "UI Components for React Navigation",
|
"description": "UI Components for React Navigation",
|
||||||
"version": "1.0.0-next.14",
|
"version": "1.0.0-next.16",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native",
|
"react-native",
|
||||||
"react-navigation",
|
"react-navigation",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-native-masked-view/masked-view": "^0.2.3",
|
"@react-native-masked-view/masked-view": "^0.2.3",
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
"@types/react-native": "~0.64.4",
|
"@types/react-native": "~0.64.4",
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
## [1.1.4](https://github.com/react-navigation/react-navigation/compare/flipper-plugin-react-navigation@1.1.3...flipper-plugin-react-navigation@1.1.4) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package flipper-plugin-react-navigation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.3](https://github.com/react-navigation/react-navigation/compare/flipper-plugin-react-navigation@1.1.2...flipper-plugin-react-navigation@1.1.3) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package flipper-plugin-react-navigation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.1.2](https://github.com/react-navigation/react-navigation/compare/flipper-plugin-react-navigation@1.1.1...flipper-plugin-react-navigation@1.1.2) (2021-05-27)
|
## [1.1.2](https://github.com/react-navigation/react-navigation/compare/flipper-plugin-react-navigation@1.1.1...flipper-plugin-react-navigation@1.1.2) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package flipper-plugin-react-navigation
|
**Note:** Version bump only for package flipper-plugin-react-navigation
|
||||||
|
|||||||
21
packages/flipper-plugin-react-navigation/LICENSE
Normal file
21
packages/flipper-plugin-react-navigation/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2017 React Navigation Contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
5
packages/flipper-plugin-react-navigation/README.md
Normal file
5
packages/flipper-plugin-react-navigation/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# `flipper-plugin-react-navigation`
|
||||||
|
|
||||||
|
Flipper plugin with developer tools for React Navigation.
|
||||||
|
|
||||||
|
Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/6.x/devtools).
|
||||||
@@ -1,17 +1,23 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://fbflipper.com/schemas/plugin-package/v2.json",
|
"$schema": "https://fbflipper.com/schemas/plugin-package/v2.json",
|
||||||
"name": "flipper-plugin-react-navigation",
|
"name": "flipper-plugin-react-navigation",
|
||||||
"id": "react-navigation",
|
"description": "Developer tools for React Navigation",
|
||||||
"version": "1.1.2",
|
"version": "1.1.4",
|
||||||
"pluginType": "client",
|
|
||||||
"main": "dist/bundle.js",
|
"main": "dist/bundle.js",
|
||||||
"flipperBundlerEntry": "src/index.tsx",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"flipper-plugin"
|
"flipper-plugin"
|
||||||
],
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/react-navigation/react-navigation.git",
|
||||||
|
"directory": "packages/flipper-plugin-react-navigation"
|
||||||
|
},
|
||||||
|
"id": "react-navigation",
|
||||||
|
"pluginType": "client",
|
||||||
"icon": "directions",
|
"icon": "directions",
|
||||||
"title": "React Navigation",
|
"title": "React Navigation",
|
||||||
|
"flipperBundlerEntry": "src/index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "flipper-pkg lint",
|
"lint": "flipper-pkg lint",
|
||||||
"prepack": "flipper-pkg lint && flipper-pkg bundle",
|
"prepack": "flipper-pkg lint && flipper-pkg bundle",
|
||||||
@@ -28,7 +34,7 @@
|
|||||||
"@ant-design/icons": "^4.6.2",
|
"@ant-design/icons": "^4.6.2",
|
||||||
"@babel/preset-react": "^7.12.13",
|
"@babel/preset-react": "^7.12.13",
|
||||||
"@babel/preset-typescript": "^7.13.0",
|
"@babel/preset-typescript": "^7.13.0",
|
||||||
"@react-navigation/core": "^6.0.0-next.11",
|
"@react-navigation/core": "^6.0.0-next.13",
|
||||||
"@types/react": "^17.0.3",
|
"@types/react": "^17.0.3",
|
||||||
"@types/react-dom": "^17.0.2",
|
"@types/react-dom": "^17.0.2",
|
||||||
"antd": "^4.14.0",
|
"antd": "^4.14.0",
|
||||||
@@ -37,8 +43,5 @@
|
|||||||
"flipper-plugin": "^0.90.2",
|
"flipper-plugin": "^0.90.2",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"shortid": "^2.2.16"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.13](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-bottom-tabs@6.0.0-next.12...@react-navigation/material-bottom-tabs@6.0.0-next.13) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/material-bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-bottom-tabs@6.0.0-next.11...@react-navigation/material-bottom-tabs@6.0.0-next.12) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/material-bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-bottom-tabs@6.0.0-next.10...@react-navigation/material-bottom-tabs@6.0.0-next.11) (2021-05-27)
|
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-bottom-tabs@6.0.0-next.10...@react-navigation/material-bottom-tabs@6.0.0-next.11) (2021-05-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/material-bottom-tabs",
|
"name": "@react-navigation/material-bottom-tabs",
|
||||||
"description": "Integration for bottom navigation component from react-native-paper",
|
"description": "Integration for bottom navigation component from react-native-paper",
|
||||||
"version": "6.0.0-next.11",
|
"version": "6.0.0-next.13",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -41,10 +41,10 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/elements": "^1.0.0-next.14"
|
"@react-navigation/elements": "^1.0.0-next.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
"@types/react-native": "~0.64.4",
|
"@types/react-native": "~0.64.4",
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.14](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-top-tabs@6.0.0-next.13...@react-navigation/material-top-tabs@6.0.0-next.14) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.13](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-top-tabs@6.0.0-next.12...@react-navigation/material-top-tabs@6.0.0-next.13) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-top-tabs@6.0.0-next.11...@react-navigation/material-top-tabs@6.0.0-next.12) (2021-05-27)
|
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/material-top-tabs@6.0.0-next.11...@react-navigation/material-top-tabs@6.0.0-next.12) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/material-top-tabs",
|
"name": "@react-navigation/material-top-tabs",
|
||||||
"description": "Integration for the animated tab view component from react-native-tab-view",
|
"description": "Integration for the animated tab view component from react-native-tab-view",
|
||||||
"version": "6.0.0-next.12",
|
"version": "6.0.0-next.14",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"warn-once": "^0.1.0"
|
"warn-once": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
"@types/react-native": "~0.64.4",
|
"@types/react-native": "~0.64.4",
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.6](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native-stack@6.0.0-next.5...@react-navigation/native-stack@6.0.0-next.6) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/native-stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.5](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native-stack@6.0.0-next.4...@react-navigation/native-stack@6.0.0-next.5) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/native-stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.4](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native-stack@6.0.0-next.3...@react-navigation/native-stack@6.0.0-next.4) (2021-05-27)
|
# [6.0.0-next.4](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native-stack@6.0.0-next.3...@react-navigation/native-stack@6.0.0-next.4) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/native-stack
|
**Note:** Version bump only for package @react-navigation/native-stack
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/native-stack",
|
"name": "@react-navigation/native-stack",
|
||||||
"description": "Native stack navigator using react-native-screens",
|
"description": "Native stack navigator using react-native-screens",
|
||||||
"version": "6.0.0-next.4",
|
"version": "6.0.0-next.6",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -41,11 +41,11 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/elements": "^1.0.0-next.14",
|
"@react-navigation/elements": "^1.0.0-next.16",
|
||||||
"warn-once": "^0.1.0"
|
"warn-once": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
"@types/react-native": "~0.64.4",
|
"@types/react-native": "~0.64.4",
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ export type NativeStackNavigationOptions = {
|
|||||||
*
|
*
|
||||||
* @platform ios
|
* @platform ios
|
||||||
*/
|
*/
|
||||||
headerSearchBar?: SearchBarProps;
|
headerSearchBarOptions?: SearchBarProps;
|
||||||
/**
|
/**
|
||||||
* Sets the status bar animation (similar to the `StatusBar` component).
|
* Sets the status bar animation (similar to the `StatusBar` component).
|
||||||
* Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
|
* Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default function HeaderConfig({
|
|||||||
headerTranslucent,
|
headerTranslucent,
|
||||||
route,
|
route,
|
||||||
orientation,
|
orientation,
|
||||||
headerSearchBar,
|
headerSearchBarOptions,
|
||||||
statusBarAnimation,
|
statusBarAnimation,
|
||||||
statusBarHidden,
|
statusBarHidden,
|
||||||
statusBarStyle,
|
statusBarStyle,
|
||||||
@@ -84,7 +84,11 @@ export default function HeaderConfig({
|
|||||||
? headerTitle({ tintColor, children: titleText })
|
? headerTitle({ tintColor, children: titleText })
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (Platform.OS === 'ios' && headerSearchBar != null && SearchBar == null) {
|
if (
|
||||||
|
Platform.OS === 'ios' &&
|
||||||
|
headerSearchBarOptions != null &&
|
||||||
|
SearchBar == null
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The current version of 'react-native-screens' doesn't support SearchBar in the header. Please update to the latest version to use this option.`
|
`The current version of 'react-native-screens' doesn't support SearchBar in the header. Please update to the latest version to use this option.`
|
||||||
);
|
);
|
||||||
@@ -179,9 +183,9 @@ export default function HeaderConfig({
|
|||||||
{headerRightElement}
|
{headerRightElement}
|
||||||
</ScreenStackHeaderRightView>
|
</ScreenStackHeaderRightView>
|
||||||
) : null}
|
) : null}
|
||||||
{Platform.OS === 'ios' && headerSearchBar != null ? (
|
{Platform.OS === 'ios' && headerSearchBarOptions != null ? (
|
||||||
<ScreenStackHeaderSearchBarView>
|
<ScreenStackHeaderSearchBarView>
|
||||||
<SearchBar {...headerSearchBar} />
|
<SearchBar {...headerSearchBarOptions} />
|
||||||
</ScreenStackHeaderSearchBarView>
|
</ScreenStackHeaderSearchBarView>
|
||||||
) : null}
|
) : null}
|
||||||
</ScreenStackHeaderConfig>
|
</ScreenStackHeaderConfig>
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.13](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native@6.0.0-next.12...@react-navigation/native@6.0.0-next.13) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* validate property names in linking config ([324ea71](https://github.com/react-navigation/react-navigation/commit/324ea7181db6b743f512854be267cc9d65975b6f))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.12](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native@6.0.0-next.11...@react-navigation/native@6.0.0-next.12) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* try to fix [#9631](https://github.com/react-navigation/react-navigation/issues/9631) ([b4d7b0e](https://github.com/react-navigation/react-navigation/commit/b4d7b0ee86c09419a18357867a0a25bb90d960c0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native@6.0.0-next.10...@react-navigation/native@6.0.0-next.11) (2021-05-27)
|
# [6.0.0-next.11](https://github.com/react-navigation/react-navigation/compare/@react-navigation/native@6.0.0-next.10...@react-navigation/native@6.0.0-next.11) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/native
|
**Note:** Version bump only for package @react-navigation/native
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/native",
|
"name": "@react-navigation/native",
|
||||||
"description": "React Native integration for React Navigation",
|
"description": "React Native integration for React Navigation",
|
||||||
"version": "6.0.0-next.11",
|
"version": "6.0.0-next.13",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native",
|
"react-native",
|
||||||
"react-navigation",
|
"react-navigation",
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/core": "^6.0.0-next.11",
|
"@react-navigation/core": "^6.0.0-next.13",
|
||||||
"escape-string-regexp": "^4.0.0",
|
"escape-string-regexp": "^4.0.0",
|
||||||
"nanoid": "^3.1.22"
|
"nanoid": "^3.1.22"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
NavigationContainerProps,
|
NavigationContainerProps,
|
||||||
NavigationContainerRef,
|
NavigationContainerRef,
|
||||||
ParamListBase,
|
ParamListBase,
|
||||||
|
validatePathConfig,
|
||||||
} from '@react-navigation/core';
|
} from '@react-navigation/core';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
@@ -18,6 +19,15 @@ import useDocumentTitle from './useDocumentTitle';
|
|||||||
import useLinking from './useLinking';
|
import useLinking from './useLinking';
|
||||||
import useThenable from './useThenable';
|
import useThenable from './useThenable';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
var REACT_NAVIGATION_DEVTOOLS: WeakMap<
|
||||||
|
NavigationContainerRef<any>,
|
||||||
|
{ readonly linking: LinkingOptions<any> }
|
||||||
|
>;
|
||||||
|
}
|
||||||
|
|
||||||
|
global.REACT_NAVIGATION_DEVTOOLS = new WeakMap();
|
||||||
|
|
||||||
type Props<ParamList extends {}> = NavigationContainerProps & {
|
type Props<ParamList extends {}> = NavigationContainerProps & {
|
||||||
theme?: Theme;
|
theme?: Theme;
|
||||||
linking?: LinkingOptions<ParamList>;
|
linking?: LinkingOptions<ParamList>;
|
||||||
@@ -53,6 +63,10 @@ function NavigationContainerInner(
|
|||||||
) {
|
) {
|
||||||
const isLinkingEnabled = linking ? linking.enabled !== false : false;
|
const isLinkingEnabled = linking ? linking.enabled !== false : false;
|
||||||
|
|
||||||
|
if (linking?.config) {
|
||||||
|
validatePathConfig(linking.config);
|
||||||
|
}
|
||||||
|
|
||||||
const refContainer = React.useRef<NavigationContainerRef<ParamListBase>>(
|
const refContainer = React.useRef<NavigationContainerRef<ParamListBase>>(
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
@@ -70,8 +84,8 @@ function NavigationContainerInner(
|
|||||||
// This will be used by the devtools
|
// This will be used by the devtools
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (refContainer.current) {
|
if (refContainer.current) {
|
||||||
Object.defineProperty(refContainer.current, '__linking', {
|
REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
||||||
get() {
|
get linking() {
|
||||||
return {
|
return {
|
||||||
...linking,
|
...linking,
|
||||||
enabled: isLinkingEnabled,
|
enabled: isLinkingEnabled,
|
||||||
@@ -82,7 +96,6 @@ function NavigationContainerInner(
|
|||||||
linking?.getActionFromState ?? getActionFromState,
|
linking?.getActionFromState ?? getActionFromState,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
enumerable: false,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,25 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
# [6.0.0-next.24](https://github.com/react-navigation/react-navigation/compare/@react-navigation/stack@6.0.0-next.23...@react-navigation/stack@6.0.0-next.24) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove card shadow from default animation ([70f4fe2](https://github.com/react-navigation/react-navigation/commit/70f4fe2ffaa219a2a72e0ae25b7d5d007948c2a4)), closes [#9569](https://github.com/react-navigation/react-navigation/issues/9569)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [6.0.0-next.23](https://github.com/react-navigation/react-navigation/compare/@react-navigation/stack@6.0.0-next.22...@react-navigation/stack@6.0.0-next.23) (2021-05-29)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.0.0-next.22](https://github.com/react-navigation/react-navigation/compare/@react-navigation/stack@6.0.0-next.21...@react-navigation/stack@6.0.0-next.22) (2021-05-27)
|
# [6.0.0-next.22](https://github.com/react-navigation/react-navigation/compare/@react-navigation/stack@6.0.0-next.21...@react-navigation/stack@6.0.0-next.22) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/stack
|
**Note:** Version bump only for package @react-navigation/stack
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/stack",
|
"name": "@react-navigation/stack",
|
||||||
"description": "Stack navigator component for iOS and Android with animated transitions and gestures",
|
"description": "Stack navigator component for iOS and Android with animated transitions and gestures",
|
||||||
"version": "6.0.0-next.22",
|
"version": "6.0.0-next.24",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native-component",
|
"react-native-component",
|
||||||
"react-component",
|
"react-component",
|
||||||
@@ -40,13 +40,13 @@
|
|||||||
"clean": "del lib"
|
"clean": "del lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/elements": "^1.0.0-next.14",
|
"@react-navigation/elements": "^1.0.0-next.16",
|
||||||
"color": "^3.1.3",
|
"color": "^3.1.3",
|
||||||
"react-native-iphone-x-helper": "^1.3.0",
|
"react-native-iphone-x-helper": "^1.3.0",
|
||||||
"warn-once": "^0.1.0"
|
"warn-once": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-navigation/native": "^6.0.0-next.11",
|
"@react-navigation/native": "^6.0.0-next.13",
|
||||||
"@testing-library/react-native": "^7.2.0",
|
"@testing-library/react-native": "^7.2.0",
|
||||||
"@types/color": "^3.0.1",
|
"@types/color": "^3.0.1",
|
||||||
"@types/react": "^16.9.53",
|
"@types/react": "^16.9.53",
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ const hasOpacityStyle = (style: any) => {
|
|||||||
|
|
||||||
export default class Card extends React.Component<Props> {
|
export default class Card extends React.Component<Props> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
shadowEnabled: true,
|
shadowEnabled: false,
|
||||||
gestureEnabled: true,
|
gestureEnabled: true,
|
||||||
gestureVelocityImpact: GESTURE_VELOCITY_IMPACT,
|
gestureVelocityImpact: GESTURE_VELOCITY_IMPACT,
|
||||||
overlay: ({
|
overlay: ({
|
||||||
|
|||||||
12
yarn.lock
12
yarn.lock
@@ -15534,11 +15534,6 @@ nan@^2.12.1:
|
|||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
||||||
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
|
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
|
||||||
|
|
||||||
nanoid@^2.1.0:
|
|
||||||
version "2.1.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280"
|
|
||||||
integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==
|
|
||||||
|
|
||||||
nanoid@^3.1.22:
|
nanoid@^3.1.22:
|
||||||
version "3.1.22"
|
version "3.1.22"
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.22.tgz#b35f8fb7d151990a8aebd5aa5015c03cf726f844"
|
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.22.tgz#b35f8fb7d151990a8aebd5aa5015c03cf726f844"
|
||||||
@@ -19812,13 +19807,6 @@ shellwords@^0.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
|
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
|
||||||
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
|
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
|
||||||
|
|
||||||
shortid@^2.2.16:
|
|
||||||
version "2.2.16"
|
|
||||||
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608"
|
|
||||||
integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==
|
|
||||||
dependencies:
|
|
||||||
nanoid "^2.1.0"
|
|
||||||
|
|
||||||
side-channel@^1.0.3, side-channel@^1.0.4:
|
side-channel@^1.0.3, side-channel@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
||||||
|
|||||||
Reference in New Issue
Block a user