@react-navigation/native 7.0.0-alpha.0 → 7.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Link.js +16 -9
- package/lib/commonjs/Link.js.map +1 -1
- package/lib/commonjs/LinkingContext.js +8 -7
- package/lib/commonjs/LinkingContext.js.map +1 -1
- package/lib/commonjs/LocaleDirContext.js +12 -0
- package/lib/commonjs/LocaleDirContext.js.map +1 -0
- package/lib/commonjs/NavigationContainer.js +68 -32
- package/lib/commonjs/NavigationContainer.js.map +1 -1
- package/lib/commonjs/ServerContainer.js +6 -8
- package/lib/commonjs/ServerContainer.js.map +1 -1
- package/lib/commonjs/ServerContext.js +4 -6
- package/lib/commonjs/ServerContext.js.map +1 -1
- package/lib/commonjs/UnhandledLinkingContext.js +20 -0
- package/lib/commonjs/UnhandledLinkingContext.js.map +1 -0
- package/lib/commonjs/__stubs__/createStackNavigator.js +19 -0
- package/lib/commonjs/__stubs__/createStackNavigator.js.map +1 -0
- package/lib/commonjs/__stubs__/window.js +79 -0
- package/lib/commonjs/__stubs__/window.js.map +1 -0
- package/lib/commonjs/createMemoryHistory.js +5 -8
- package/lib/commonjs/createMemoryHistory.js.map +1 -1
- package/lib/commonjs/createStaticNavigation.js +8 -8
- package/lib/commonjs/createStaticNavigation.js.map +1 -1
- package/lib/commonjs/extractPathFromURL.js +4 -4
- package/lib/commonjs/extractPathFromURL.js.map +1 -1
- package/lib/commonjs/index.js +33 -34
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theming/DarkTheme.js +5 -5
- package/lib/commonjs/theming/DarkTheme.js.map +1 -1
- package/lib/commonjs/theming/DefaultTheme.js +5 -5
- package/lib/commonjs/theming/DefaultTheme.js.map +1 -1
- package/lib/commonjs/theming/fonts.js +65 -0
- package/lib/commonjs/theming/fonts.js.map +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useBackButton.js +4 -20
- package/lib/commonjs/useBackButton.js.map +1 -1
- package/lib/commonjs/useBackButton.native.js +27 -0
- package/lib/commonjs/useBackButton.native.js.map +1 -0
- package/lib/commonjs/useDocumentTitle.js +6 -6
- package/lib/commonjs/useDocumentTitle.js.map +1 -1
- package/lib/commonjs/useDocumentTitle.native.js +1 -1
- package/lib/commonjs/useDocumentTitle.native.js.map +1 -1
- package/lib/commonjs/useLinkBuilder.js +80 -0
- package/lib/commonjs/useLinkBuilder.js.map +1 -0
- package/lib/commonjs/useLinkProps.js +23 -27
- package/lib/commonjs/useLinkProps.js.map +1 -1
- package/lib/commonjs/useLinkTo.js +30 -0
- package/lib/commonjs/useLinkTo.js.map +1 -0
- package/lib/commonjs/useLinking.js +39 -40
- package/lib/commonjs/useLinking.js.map +1 -1
- package/lib/commonjs/useLinking.native.js +33 -27
- package/lib/commonjs/useLinking.native.js.map +1 -1
- package/lib/commonjs/useLocale.js +23 -0
- package/lib/commonjs/useLocale.js.map +1 -0
- package/lib/commonjs/useScrollToTop.js +9 -7
- package/lib/commonjs/useScrollToTop.js.map +1 -1
- package/lib/commonjs/useThenable.js +4 -3
- package/lib/commonjs/useThenable.js.map +1 -1
- package/lib/commonjs/useUnhandledLinking.js +75 -0
- package/lib/commonjs/useUnhandledLinking.js.map +1 -0
- package/lib/module/Link.js +13 -5
- package/lib/module/Link.js.map +1 -1
- package/lib/module/LinkingContext.js +5 -3
- package/lib/module/LinkingContext.js.map +1 -1
- package/lib/module/LocaleDirContext.js +4 -0
- package/lib/module/LocaleDirContext.js.map +1 -0
- package/lib/module/NavigationContainer.js +60 -23
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/ServerContainer.js +2 -2
- package/lib/module/ServerContainer.js.map +1 -1
- package/lib/module/ServerContext.js +1 -2
- package/lib/module/ServerContext.js.map +1 -1
- package/lib/module/UnhandledLinkingContext.js +12 -0
- package/lib/module/UnhandledLinkingContext.js.map +1 -0
- package/lib/module/__stubs__/createStackNavigator.js +11 -0
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -0
- package/lib/module/__stubs__/window.js +73 -0
- package/lib/module/__stubs__/window.js.map +1 -0
- package/lib/module/createMemoryHistory.js +5 -8
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStaticNavigation.js +5 -4
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/extractPathFromURL.js +4 -4
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/index.js +12 -12
- package/lib/module/index.js.map +1 -1
- package/lib/module/theming/DarkTheme.js +4 -3
- package/lib/module/theming/DarkTheme.js.map +1 -1
- package/lib/module/theming/DefaultTheme.js +4 -3
- package/lib/module/theming/DefaultTheme.js.map +1 -1
- package/lib/module/theming/fonts.js +59 -0
- package/lib/module/theming/fonts.js.map +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/useBackButton.js +3 -17
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useBackButton.native.js +19 -0
- package/lib/module/useBackButton.native.js.map +1 -0
- package/lib/module/useDocumentTitle.js +4 -4
- package/lib/module/useDocumentTitle.js.map +1 -1
- package/lib/module/useDocumentTitle.native.js +1 -1
- package/lib/module/useDocumentTitle.native.js.map +1 -1
- package/lib/module/{useLinkTools.js → useLinkBuilder.js} +11 -11
- package/lib/module/useLinkBuilder.js.map +1 -0
- package/lib/module/useLinkProps.js +20 -23
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinkTo.js +23 -0
- package/lib/module/useLinkTo.js.map +1 -0
- package/lib/module/useLinking.js +33 -36
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +29 -22
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useLocale.js +16 -0
- package/lib/module/useLocale.js.map +1 -0
- package/lib/module/useScrollToTop.js +8 -6
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/module/useThenable.js +2 -1
- package/lib/module/useThenable.js.map +1 -1
- package/lib/module/useUnhandledLinking.js +69 -0
- package/lib/module/useUnhandledLinking.js.map +1 -0
- package/lib/typescript/src/Link.d.ts +3 -3
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/LinkingContext.d.ts +2 -3
- package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
- package/lib/typescript/src/LocaleDirContext.d.ts +4 -0
- package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationContainer.d.ts +6 -6
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContainer.d.ts +2 -3
- package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContext.d.ts +1 -2
- package/lib/typescript/src/ServerContext.d.ts.map +1 -1
- package/lib/typescript/src/UnhandledLinkingContext.d.ts +6 -0
- package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +1 -0
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +32 -0
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/{__mocks__ → __stubs__}/window.d.ts +2 -3
- package/lib/typescript/src/__stubs__/window.d.ts.map +1 -0
- package/lib/typescript/src/createMemoryHistory.d.ts +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
- package/lib/typescript/src/createStaticNavigation.d.ts +3 -3
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +12 -12
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/theming/DarkTheme.d.ts +1 -2
- package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts +1 -2
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -1
- package/lib/typescript/src/theming/fonts.d.ts +53 -0
- package/lib/typescript/src/theming/fonts.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +41 -11
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +2 -2
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.native.d.ts +4 -0
- package/lib/typescript/src/useBackButton.native.d.ts.map +1 -0
- package/lib/typescript/src/useDocumentTitle.d.ts +1 -1
- package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
- package/lib/typescript/src/useDocumentTitle.native.d.ts +1 -1
- package/lib/typescript/src/useDocumentTitle.native.d.ts.map +1 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +25 -0
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -0
- package/lib/typescript/src/useLinkProps.d.ts +3 -3
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinkTo.d.ts +6 -0
- package/lib/typescript/src/useLinkTo.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.d.ts +8 -20
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +4 -20
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useLocale.d.ts +7 -0
- package/lib/typescript/src/useLocale.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts +1 -1
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
- package/lib/typescript/src/useThenable.d.ts +1 -1
- package/lib/typescript/src/useThenable.d.ts.map +1 -1
- package/lib/typescript/src/useUnhandledLinking.d.ts +7 -0
- package/lib/typescript/src/useUnhandledLinking.d.ts.map +1 -0
- package/package.json +15 -15
- package/src/Link.tsx +12 -3
- package/src/LinkingContext.tsx +9 -5
- package/src/LocaleDirContext.tsx +7 -0
- package/src/NavigationContainer.tsx +90 -36
- package/src/ServerContainer.tsx +2 -2
- package/src/ServerContext.tsx +1 -3
- package/src/UnhandledLinkingContext.tsx +18 -0
- package/src/{__mocks__ → __stubs__}/createStackNavigator.tsx +1 -3
- package/src/{__mocks__ → __stubs__}/window.tsx +8 -8
- package/src/createMemoryHistory.tsx +1 -1
- package/src/createStaticNavigation.tsx +8 -8
- package/src/extractPathFromURL.tsx +5 -2
- package/src/index.tsx +12 -12
- package/src/theming/DarkTheme.tsx +3 -3
- package/src/theming/DefaultTheme.tsx +3 -3
- package/src/theming/fonts.tsx +63 -0
- package/src/types.tsx +55 -11
- package/src/useBackButton.native.tsx +33 -0
- package/src/useBackButton.tsx +4 -26
- package/src/useDocumentTitle.native.tsx +1 -1
- package/src/useDocumentTitle.tsx +1 -1
- package/src/{useLinkTools.tsx → useLinkBuilder.tsx} +9 -9
- package/src/useLinkProps.tsx +27 -23
- package/src/useLinkTo.tsx +30 -0
- package/src/useLinking.native.tsx +28 -22
- package/src/useLinking.tsx +46 -44
- package/src/useLocale.tsx +18 -0
- package/src/useScrollToTop.tsx +14 -10
- package/src/useThenable.tsx +2 -1
- package/src/useUnhandledLinking.tsx +91 -0
- package/lib/commonjs/theming/ThemeContext.js +0 -16
- package/lib/commonjs/theming/ThemeContext.js.map +0 -1
- package/lib/commonjs/theming/ThemeProvider.js +0 -21
- package/lib/commonjs/theming/ThemeProvider.js.map +0 -1
- package/lib/commonjs/theming/useTheme.js +0 -16
- package/lib/commonjs/theming/useTheme.js.map +0 -1
- package/lib/commonjs/useLinkTools.js +0 -81
- package/lib/commonjs/useLinkTools.js.map +0 -1
- package/lib/module/theming/ThemeContext.js +0 -6
- package/lib/module/theming/ThemeContext.js.map +0 -1
- package/lib/module/theming/ThemeProvider.js +0 -12
- package/lib/module/theming/ThemeProvider.js.map +0 -1
- package/lib/module/theming/useTheme.js +0 -7
- package/lib/module/theming/useTheme.js.map +0 -1
- package/lib/module/useLinkTools.js.map +0 -1
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts +0 -57
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts.map +0 -1
- package/lib/typescript/src/__mocks__/window.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeContext.d.ts +0 -5
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeProvider.d.ts +0 -9
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/theming/useTheme.d.ts +0 -2
- package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/src/useLinkTools.d.ts +0 -33
- package/lib/typescript/src/useLinkTools.d.ts.map +0 -1
- package/src/theming/ThemeContext.tsx +0 -10
- package/src/theming/ThemeProvider.tsx +0 -15
- package/src/theming/useTheme.tsx +0 -9
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CommonActions } from '@react-navigation/core';
|
|
2
|
-
/**
|
|
3
|
-
* Build destination link for a navigate action.
|
|
4
|
-
* Useful for showing anchor tags on the web for buttons that perform navigation.
|
|
5
|
-
*/
|
|
6
|
-
export default function useLinkTools(): {
|
|
7
|
-
buildHref: (name: string, params?: object) => string | undefined;
|
|
8
|
-
buildAction: (href: string) => {
|
|
9
|
-
type: "NAVIGATE";
|
|
10
|
-
payload: {
|
|
11
|
-
name: string;
|
|
12
|
-
params?: import("@react-navigation/core").NavigatorScreenParams<Readonly<{
|
|
13
|
-
key: string;
|
|
14
|
-
index: number;
|
|
15
|
-
routeNames: string[];
|
|
16
|
-
history?: unknown[] | undefined;
|
|
17
|
-
routes: (Readonly<{
|
|
18
|
-
key: string;
|
|
19
|
-
name: string;
|
|
20
|
-
path?: string | undefined;
|
|
21
|
-
}> & Readonly<{
|
|
22
|
-
params?: Readonly<object | undefined>;
|
|
23
|
-
}> & {
|
|
24
|
-
state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
|
|
25
|
-
})[];
|
|
26
|
-
type: string;
|
|
27
|
-
stale: false;
|
|
28
|
-
}>>;
|
|
29
|
-
path?: string | undefined;
|
|
30
|
-
};
|
|
31
|
-
} | CommonActions.Action;
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=useLinkTools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkTools.d.ts","sourceRoot":"","sources":["../../../src/useLinkTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAQd,MAAM,wBAAwB,CAAC;AAqChC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY;sBAKzB,MAAM,WAAW,MAAM;wBA6BvB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;EA0BhB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import type { Theme } from '../types';
|
|
4
|
-
import DefaultTheme from './DefaultTheme';
|
|
5
|
-
|
|
6
|
-
const ThemeContext = React.createContext<Theme>(DefaultTheme);
|
|
7
|
-
|
|
8
|
-
ThemeContext.displayName = 'ThemeContext';
|
|
9
|
-
|
|
10
|
-
export default ThemeContext;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import type { Theme } from '../types';
|
|
4
|
-
import ThemeContext from './ThemeContext';
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
value: Theme;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default function ThemeProvider({ value, children }: Props) {
|
|
12
|
-
return (
|
|
13
|
-
<ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>
|
|
14
|
-
);
|
|
15
|
-
}
|