@react-navigation/native 6.1.6 → 7.0.0-alpha.1
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 +19 -9
- package/lib/commonjs/Link.js.map +1 -1
- package/lib/commonjs/LinkingContext.js +2 -3
- package/lib/commonjs/LinkingContext.js.map +1 -1
- package/lib/commonjs/NavigationContainer.js +19 -32
- package/lib/commonjs/NavigationContainer.js.map +1 -1
- package/lib/commonjs/ServerContainer.js +5 -6
- package/lib/commonjs/ServerContainer.js.map +1 -1
- package/lib/commonjs/ServerContext.js +2 -3
- package/lib/commonjs/ServerContext.js.map +1 -1
- package/lib/commonjs/createMemoryHistory.js +1 -1
- package/lib/commonjs/createMemoryHistory.js.map +1 -1
- package/lib/commonjs/createStaticNavigation.js +38 -0
- package/lib/commonjs/createStaticNavigation.js.map +1 -0
- package/lib/commonjs/extractPathFromURL.js +1 -1
- package/lib/commonjs/extractPathFromURL.js.map +1 -1
- package/lib/commonjs/index.js +28 -29
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theming/DarkTheme.js +5 -4
- package/lib/commonjs/theming/DarkTheme.js.map +1 -1
- package/lib/commonjs/theming/DefaultTheme.js +5 -4
- package/lib/commonjs/theming/DefaultTheme.js.map +1 -1
- package/lib/commonjs/theming/ThemeContext.js +4 -6
- package/lib/commonjs/theming/ThemeContext.js.map +1 -1
- package/lib/commonjs/theming/ThemeProvider.js +3 -4
- package/lib/commonjs/theming/ThemeProvider.js.map +1 -1
- package/lib/commonjs/theming/fonts.js +66 -0
- package/lib/commonjs/theming/fonts.js.map +1 -0
- package/lib/commonjs/theming/useTheme.js +3 -4
- package/lib/commonjs/theming/useTheme.js.map +1 -1
- package/lib/commonjs/useBackButton.js +1 -1
- package/lib/commonjs/useBackButton.js.map +1 -1
- package/lib/commonjs/useDocumentTitle.js +1 -1
- 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/useLinkProps.js +20 -19
- package/lib/commonjs/useLinkProps.js.map +1 -1
- package/lib/commonjs/{useLinkBuilder.js → useLinkTools.js} +25 -8
- package/lib/commonjs/useLinkTools.js.map +1 -0
- package/lib/commonjs/useLinking.js +7 -9
- package/lib/commonjs/useLinking.js.map +1 -1
- package/lib/commonjs/useLinking.native.js +6 -8
- package/lib/commonjs/useLinking.native.js.map +1 -1
- package/lib/commonjs/useScrollToTop.js +1 -1
- package/lib/commonjs/useScrollToTop.js.map +1 -1
- package/lib/commonjs/useThenable.js +1 -1
- package/lib/commonjs/useThenable.js.map +1 -1
- package/lib/module/Link.js +18 -7
- package/lib/module/Link.js.map +1 -1
- package/lib/module/LinkingContext.js +1 -2
- package/lib/module/LinkingContext.js.map +1 -1
- package/lib/module/NavigationContainer.js +11 -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/createMemoryHistory.js +1 -1
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStaticNavigation.js +30 -0
- package/lib/module/createStaticNavigation.js.map +1 -0
- package/lib/module/extractPathFromURL.js +1 -1
- 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/ThemeContext.js +2 -3
- package/lib/module/theming/ThemeContext.js.map +1 -1
- package/lib/module/theming/ThemeProvider.js +2 -2
- package/lib/module/theming/ThemeProvider.js.map +1 -1
- package/lib/module/theming/fonts.js +59 -0
- package/lib/module/theming/fonts.js.map +1 -0
- package/lib/module/theming/useTheme.js +2 -2
- package/lib/module/theming/useTheme.js.map +1 -1
- package/lib/module/useBackButton.js +1 -1
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useDocumentTitle.js +1 -1
- 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/useLinkProps.js +19 -17
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/{useLinkBuilder.js → useLinkTools.js} +24 -6
- package/lib/module/useLinkTools.js.map +1 -0
- package/lib/module/useLinking.js +6 -8
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +6 -7
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useScrollToTop.js +1 -1
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/module/useThenable.js +1 -1
- package/lib/module/useThenable.js.map +1 -1
- package/lib/typescript/src/Link.d.ts +8 -9
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/LinkingContext.d.ts +1 -2
- package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
- package/lib/typescript/src/NavigationContainer.d.ts +3 -5
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContainer.d.ts +1 -2
- package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContext.d.ts +2 -3
- package/lib/typescript/src/ServerContext.d.ts.map +1 -1
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts +56 -0
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/__mocks__/window.d.ts +1 -2
- package/lib/typescript/src/__mocks__/window.d.ts.map +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts +2 -2
- package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
- package/lib/typescript/src/createStaticNavigation.d.ts +20 -0
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -0
- 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/ThemeContext.d.ts +1 -2
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/src/theming/ThemeProvider.d.ts +2 -2
- package/lib/typescript/src/theming/ThemeProvider.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/theming/useTheme.d.ts +1 -1
- package/lib/typescript/src/theming/useTheme.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +15 -4
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +1 -1
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- 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/useLinkProps.d.ts +17 -7
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinkTools.d.ts +33 -0
- package/lib/typescript/src/useLinkTools.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.d.ts +2 -4
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +2 -4
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useScrollToTop.d.ts +4 -4
- 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/package.json +11 -11
- package/src/Link.tsx +26 -16
- package/src/LinkingContext.tsx +1 -3
- package/src/NavigationContainer.tsx +14 -29
- package/src/ServerContainer.tsx +2 -2
- package/src/ServerContext.tsx +1 -3
- package/src/__mocks__/createStackNavigator.tsx +19 -0
- package/src/__mocks__/window.tsx +1 -3
- package/src/createMemoryHistory.tsx +1 -1
- package/src/createStaticNavigation.tsx +47 -0
- package/src/extractPathFromURL.tsx +1 -1
- package/src/index.tsx +12 -12
- package/src/theming/DarkTheme.tsx +3 -3
- package/src/theming/DefaultTheme.tsx +3 -3
- package/src/theming/ThemeContext.tsx +2 -4
- package/src/theming/ThemeProvider.tsx +2 -2
- package/src/theming/fonts.tsx +63 -0
- package/src/theming/useTheme.tsx +2 -2
- package/src/types.tsx +22 -0
- package/src/useBackButton.tsx +1 -1
- package/src/useDocumentTitle.native.tsx +1 -1
- package/src/useDocumentTitle.tsx +1 -1
- package/src/useLinkProps.tsx +49 -33
- package/src/{useLinkBuilder.tsx → useLinkTools.tsx} +33 -4
- package/src/useLinking.native.tsx +8 -8
- package/src/useLinking.tsx +8 -9
- package/src/useScrollToTop.tsx +1 -3
- package/src/useThenable.tsx +1 -1
- package/lib/commonjs/useLinkBuilder.js.map +0 -1
- package/lib/commonjs/useLinkTo.js +0 -45
- package/lib/commonjs/useLinkTo.js.map +0 -1
- package/lib/module/useLinkBuilder.js.map +0 -1
- package/lib/module/useLinkTo.js +0 -36
- package/lib/module/useLinkTo.js.map +0 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +0 -6
- package/lib/typescript/src/useLinkBuilder.d.ts.map +0 -1
- package/lib/typescript/src/useLinkTo.d.ts +0 -9
- package/lib/typescript/src/useLinkTo.d.ts.map +0 -1
- package/src/useLinkTo.tsx +0 -71
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ParamListBase, StaticNavigation } from '@react-navigation/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { NavigationContainer } from './NavigationContainer';
|
|
4
|
+
import type { LinkingOptions } from './types';
|
|
5
|
+
type Props = Omit<React.ComponentProps<typeof NavigationContainer>, 'linking' | 'children'> & {
|
|
6
|
+
/**
|
|
7
|
+
* Options for deep linking.
|
|
8
|
+
*/
|
|
9
|
+
linking?: Omit<LinkingOptions<ParamListBase>, 'config'>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Create a navigation component from a static navigation config.
|
|
13
|
+
* The returned component is a wrapper around `NavigationContainer`.
|
|
14
|
+
*
|
|
15
|
+
* @param tree Static navigation config.
|
|
16
|
+
* @returns Navigation component to use in your app.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createStaticNavigation(tree: StaticNavigation<any, any, any>): ({ linking, ...rest }: Props) => JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=createStaticNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStaticNavigation.d.ts","sourceRoot":"","sources":["../../../src/createStaticNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,KAAK,GAAG,IAAI,CACf,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,EAChD,SAAS,GAAG,UAAU,CACvB,GAAG;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,0BAQzB,KAAK,iBAUvD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function extractPathFromURL(prefixes: string[], url: string): string | undefined;
|
|
2
2
|
//# sourceMappingURL=extractPathFromURL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../../src/extractPathFromURL.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../../src/extractPathFromURL.tsx"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,sBAuBjE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
1
|
+
export { createStaticNavigation } from './createStaticNavigation';
|
|
2
|
+
export { Link } from './Link';
|
|
3
|
+
export { LinkingContext } from './LinkingContext';
|
|
4
|
+
export { NavigationContainer } from './NavigationContainer';
|
|
5
|
+
export { ServerContainer } from './ServerContainer';
|
|
6
|
+
export { DarkTheme } from './theming/DarkTheme';
|
|
7
|
+
export { DefaultTheme } from './theming/DefaultTheme';
|
|
8
|
+
export { ThemeProvider } from './theming/ThemeProvider';
|
|
9
|
+
export { useTheme } from './theming/useTheme';
|
|
9
10
|
export * from './types';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export { default as useScrollToTop } from './useScrollToTop';
|
|
11
|
+
export { useLinkProps } from './useLinkProps';
|
|
12
|
+
export { useLinkTools } from './useLinkTools';
|
|
13
|
+
export { useScrollToTop } from './useScrollToTop';
|
|
14
14
|
export * from '@react-navigation/core';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DarkTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DarkTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DarkTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DarkTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DefaultTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DefaultTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,YAAY,sBAA2C,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Theme } from '../types';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
4
|
value: Theme;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export declare function ThemeProvider({ value, children }: Props): JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theming/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,eAIvD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const fonts: {
|
|
2
|
+
readonly regular: {
|
|
3
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
4
|
+
readonly fontWeight: "400";
|
|
5
|
+
};
|
|
6
|
+
readonly medium: {
|
|
7
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
8
|
+
readonly fontWeight: "500";
|
|
9
|
+
};
|
|
10
|
+
readonly bold: {
|
|
11
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
12
|
+
readonly fontWeight: "600";
|
|
13
|
+
};
|
|
14
|
+
readonly heavy: {
|
|
15
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
16
|
+
readonly fontWeight: "700";
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
readonly regular: {
|
|
20
|
+
readonly fontFamily: "System";
|
|
21
|
+
readonly fontWeight: "400";
|
|
22
|
+
};
|
|
23
|
+
readonly medium: {
|
|
24
|
+
readonly fontFamily: "System";
|
|
25
|
+
readonly fontWeight: "500";
|
|
26
|
+
};
|
|
27
|
+
readonly bold: {
|
|
28
|
+
readonly fontFamily: "System";
|
|
29
|
+
readonly fontWeight: "600";
|
|
30
|
+
};
|
|
31
|
+
readonly heavy: {
|
|
32
|
+
readonly fontFamily: "System";
|
|
33
|
+
readonly fontWeight: "700";
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
readonly regular: {
|
|
37
|
+
readonly fontFamily: "sans-serif";
|
|
38
|
+
readonly fontWeight: "normal";
|
|
39
|
+
};
|
|
40
|
+
readonly medium: {
|
|
41
|
+
readonly fontFamily: "sans-serif-medium";
|
|
42
|
+
readonly fontWeight: "normal";
|
|
43
|
+
};
|
|
44
|
+
readonly bold: {
|
|
45
|
+
readonly fontFamily: "sans-serif";
|
|
46
|
+
readonly fontWeight: "600";
|
|
47
|
+
};
|
|
48
|
+
readonly heavy: {
|
|
49
|
+
readonly fontFamily: "sans-serif";
|
|
50
|
+
readonly fontWeight: "700";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/theming/fonts.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDkC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useTheme(): import("..").Theme;
|
|
2
2
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/useTheme.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/useTheme.tsx"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,uBAIvB"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { getActionFromState as getActionFromStateDefault, getPathFromState as getPathFromStateDefault, getStateFromPath as getStateFromPathDefault, PathConfigMap, Route } from '@react-navigation/core';
|
|
2
|
-
|
|
2
|
+
type FontStyle = {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
fontWeight: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
5
|
+
};
|
|
6
|
+
export type Theme = {
|
|
3
7
|
dark: boolean;
|
|
4
8
|
colors: {
|
|
5
9
|
primary: string;
|
|
@@ -9,8 +13,14 @@ export declare type Theme = {
|
|
|
9
13
|
border: string;
|
|
10
14
|
notification: string;
|
|
11
15
|
};
|
|
16
|
+
fonts: {
|
|
17
|
+
regular: FontStyle;
|
|
18
|
+
medium: FontStyle;
|
|
19
|
+
bold: FontStyle;
|
|
20
|
+
heavy: FontStyle;
|
|
21
|
+
};
|
|
12
22
|
};
|
|
13
|
-
export
|
|
23
|
+
export type LinkingOptions<ParamList extends {}> = {
|
|
14
24
|
/**
|
|
15
25
|
* Whether deep link handling should be enabled.
|
|
16
26
|
* Defaults to true.
|
|
@@ -117,11 +127,12 @@ export declare type LinkingOptions<ParamList extends {}> = {
|
|
|
117
127
|
*/
|
|
118
128
|
getActionFromState?: typeof getActionFromStateDefault;
|
|
119
129
|
};
|
|
120
|
-
export
|
|
130
|
+
export type DocumentTitleOptions = {
|
|
121
131
|
enabled?: boolean;
|
|
122
132
|
formatter?: (options: Record<string, any> | undefined, route: Route<string> | undefined) => string;
|
|
123
133
|
};
|
|
124
|
-
export
|
|
134
|
+
export type ServerContainerRef = {
|
|
125
135
|
getCurrentOptions(): Record<string, any> | undefined;
|
|
126
136
|
};
|
|
137
|
+
export {};
|
|
127
138
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,yBAAyB,EAC/C,gBAAgB,IAAI,uBAAuB,EAC3C,gBAAgB,IAAI,uBAAuB,EAC3C,aAAa,EACb,KAAK,EACN,MAAM,wBAAwB,CAAC;AAEhC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,yBAAyB,EAC/C,gBAAgB,IAAI,uBAAuB,EAC3C,gBAAgB,IAAI,uBAAuB,EAC3C,aAAa,EACb,KAAK,EACN,MAAM,wBAAwB,CAAC;AAEhC,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE;QACL,OAAO,EAAE,SAAS,CAAC;QACnB,MAAM,EAAE,SAAS,CAAC;QAClB,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,SAAS,SAAS,EAAE,IAAI;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE;QACP,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;QACnC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACnC,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MACZ,MAAM,GACN,IAAI,GACJ,SAAS,GACT,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvC;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,CACV,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KAC5B,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IACrC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,uBAAuB,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,uBAAuB,CAAC;IAClD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,yBAAyB,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,CACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACxC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,KAC7B,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { NavigationContainerRef, ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export
|
|
3
|
+
export declare function useBackButton(ref: React.RefObject<NavigationContainerRef<ParamListBase>>): void;
|
|
4
4
|
//# sourceMappingURL=useBackButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBackButton.d.ts","sourceRoot":"","sources":["../../../src/useBackButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,
|
|
1
|
+
{"version":3,"file":"useBackButton.d.ts","sourceRoot":"","sources":["../../../src/useBackButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,wBAAgB,aAAa,CAC3B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,QAwB5D"}
|
|
@@ -4,5 +4,5 @@ import type { DocumentTitleOptions } from './types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Set the document title for the active screen
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export declare function useDocumentTitle(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { enabled, formatter, }?: DocumentTitleOptions): void;
|
|
8
8
|
//# sourceMappingURL=useDocumentTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,OAAc,EACd,SAA6D,GAC9D,GAAE,oBAAyB,QAwB7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useDocumentTitle(): void;
|
|
2
2
|
//# sourceMappingURL=useDocumentTitle.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentTitle.native.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.native.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.native.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.native.tsx"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,SAE/B"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { NavigationAction } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { GestureResponderEvent } from 'react-native';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type Props<ParamList extends ReactNavigation.RootParamList, RouteName extends keyof ParamList = keyof ParamList> = ({
|
|
5
|
+
screen: Extract<RouteName, string>;
|
|
6
|
+
href?: string;
|
|
7
7
|
action?: NavigationAction;
|
|
8
|
+
} & (undefined extends ParamList[RouteName] ? {
|
|
9
|
+
params?: ParamList[RouteName];
|
|
10
|
+
} : {
|
|
11
|
+
params: ParamList[RouteName];
|
|
12
|
+
})) | {
|
|
13
|
+
href?: string;
|
|
14
|
+
action: NavigationAction;
|
|
15
|
+
screen?: undefined;
|
|
16
|
+
params?: undefined;
|
|
8
17
|
};
|
|
9
18
|
/**
|
|
10
19
|
* Hook to get props for an anchor tag so it can work with in page navigation.
|
|
11
20
|
*
|
|
12
|
-
* @param props.
|
|
21
|
+
* @param props.screen Name of the screen to navigate to (e.g. `'Feeds'`).
|
|
22
|
+
* @param props.params Params to pass to the screen to navigate to (e.g. `{ sort: 'hot' }`).
|
|
23
|
+
* @param props.href Optional absolute path to use for the href (e.g. `/feeds/hot`).
|
|
13
24
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
14
25
|
*/
|
|
15
|
-
export
|
|
16
|
-
href: string;
|
|
26
|
+
export declare function useLinkProps<ParamList extends ReactNavigation.RootParamList>({ screen, params, href, action, }: Props<ParamList>): {
|
|
27
|
+
href: string | undefined;
|
|
17
28
|
accessibilityRole: "link";
|
|
18
29
|
onPress: (e?: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
|
19
30
|
};
|
|
20
|
-
export {};
|
|
21
31
|
//# sourceMappingURL=useLinkProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAKjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAY,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAKjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAY,MAAM,cAAc,CAAC;AAI/D,MAAM,MAAM,KAAK,CACf,SAAS,SAAS,eAAe,CAAC,aAAa,EAC/C,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IAEjD,CAAC;IACC,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,CAAC,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACvC;IAAE,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,GACjC;IAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC,CAAC,GACtC;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AA+BN;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,EAAE,EAC5E,MAAM,EACN,MAAM,EACN,IAAI,EACJ,MAAM,GACP,EAAE,KAAK,CAAC,SAAS,CAAC;;;kBAMX,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB;EA6D9E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 declare 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
|
|
@@ -0,0 +1 @@
|
|
|
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,wBAAgB,YAAY;sBAKjB,MAAM,WAAW,MAAM;wBA6BvB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;EA0BhB"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { NavigationContainerRef, ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { LinkingOptions } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export default function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { independent, enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): {
|
|
4
|
+
type Options = LinkingOptions<ParamListBase>;
|
|
5
|
+
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): {
|
|
8
6
|
getInitialState: () => PromiseLike<(Partial<Omit<Readonly<{
|
|
9
7
|
key: string;
|
|
10
8
|
index: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,sBAAsB,EAEtB,aAAa,
|
|
1
|
+
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,sBAAsB,EAEtB,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiF9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAE7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,OAAc,EACd,MAAM,EACN,gBAA0C,EAC1C,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwTX"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { NavigationContainerRef, ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { LinkingOptions } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export default function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { independent, enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
|
|
4
|
+
type Options = LinkingOptions<ParamListBase>;
|
|
5
|
+
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
|
|
8
6
|
getInitialState: () => PromiseLike<(Partial<Omit<Readonly<{
|
|
9
7
|
key: string;
|
|
10
8
|
index: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,EACtB,aAAa,
|
|
1
|
+
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,EACtB,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,OAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAmBC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6JX"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ScrollView } from 'react-native';
|
|
3
|
-
|
|
3
|
+
type ScrollOptions = {
|
|
4
4
|
x?: number;
|
|
5
5
|
y?: number;
|
|
6
6
|
animated?: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ScrollableView = {
|
|
9
9
|
scrollToTop(): void;
|
|
10
10
|
} | {
|
|
11
11
|
scrollTo(options: ScrollOptions): void;
|
|
@@ -17,11 +17,11 @@ declare type ScrollableView = {
|
|
|
17
17
|
} | {
|
|
18
18
|
scrollResponderScrollTo(options: ScrollOptions): void;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
type ScrollableWrapper = {
|
|
21
21
|
getScrollResponder(): React.ReactNode | ScrollView;
|
|
22
22
|
} | {
|
|
23
23
|
getNode(): ScrollableView;
|
|
24
24
|
} | ScrollableView;
|
|
25
|
-
export
|
|
25
|
+
export declare function useScrollToTop(ref: React.RefObject<ScrollableWrapper>): void;
|
|
26
26
|
export {};
|
|
27
27
|
//# sourceMappingURL=useScrollToTop.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollToTop.d.ts","sourceRoot":"","sources":["../../../src/useScrollToTop.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,
|
|
1
|
+
{"version":3,"file":"useScrollToTop.d.ts","sourceRoot":"","sources":["../../../src/useScrollToTop.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpE,KAAK,cAAc,GACf;IAAE,WAAW,IAAI,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAC1C;IAAE,cAAc,CAAC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAC1E;IAAE,uBAAuB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAE9D,KAAK,iBAAiB,GAClB;IAAE,kBAAkB,IAAI,KAAK,CAAC,SAAS,GAAG,UAAU,CAAA;CAAE,GACtD;IAAE,OAAO,IAAI,cAAc,CAAA;CAAE,GAC7B,cAAc,CAAC;AA8BnB,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,QA+DrE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useThenable<T>(create: () => PromiseLike<T>): [boolean, T | undefined];
|
|
2
2
|
//# sourceMappingURL=useThenable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,4BAsC1D"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/native",
|
|
3
3
|
"description": "React Native integration for React Navigation",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0-alpha.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
7
7
|
"react-navigation",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"clean": "del lib"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@react-navigation/core": "^
|
|
40
|
+
"@react-navigation/core": "^7.0.0-alpha.1",
|
|
41
41
|
"escape-string-regexp": "^4.0.0",
|
|
42
42
|
"fast-deep-equal": "^3.1.3",
|
|
43
43
|
"nanoid": "^3.1.23"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@testing-library/react-native": "^11.5.0",
|
|
47
|
-
"@types/react": "~18.0.
|
|
48
|
-
"@types/react-dom": "~18.0.
|
|
49
|
-
"@types/react-native": "~0.
|
|
50
|
-
"del-cli": "^
|
|
51
|
-
"react": "18.
|
|
52
|
-
"react-dom": "18.
|
|
53
|
-
"react-native": "0.
|
|
47
|
+
"@types/react": "~18.0.26",
|
|
48
|
+
"@types/react-dom": "~18.0.9",
|
|
49
|
+
"@types/react-native": "~0.70.8",
|
|
50
|
+
"del-cli": "^5.0.0",
|
|
51
|
+
"react": "18.1.0",
|
|
52
|
+
"react-dom": "18.2.0",
|
|
53
|
+
"react-native": "0.70.5",
|
|
54
54
|
"react-native-builder-bob": "^0.20.4",
|
|
55
|
-
"typescript": "^4.
|
|
55
|
+
"typescript": "^4.9.4"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"react": "*",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
]
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "230c09deeeb886929a15cb4cdcb496372a9496e1"
|
|
76
76
|
}
|
package/src/Link.tsx
CHANGED
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
import type { NavigationAction } from '@react-navigation/core';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { GestureResponderEvent, Platform, Text, TextProps } from 'react-native';
|
|
4
3
|
|
|
5
|
-
import useLinkProps from './useLinkProps';
|
|
6
|
-
import type { To } from './useLinkTo';
|
|
4
|
+
import { Props as LinkProps, useLinkProps } from './useLinkProps';
|
|
7
5
|
|
|
8
|
-
type Props<ParamList extends ReactNavigation.RootParamList> =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
type Props<ParamList extends ReactNavigation.RootParamList> =
|
|
7
|
+
LinkProps<ParamList> &
|
|
8
|
+
Omit<TextProps, 'disabled'> & {
|
|
9
|
+
target?: string;
|
|
10
|
+
onPress?: (
|
|
11
|
+
e:
|
|
12
|
+
| React.MouseEvent<HTMLAnchorElement, MouseEvent>
|
|
13
|
+
| GestureResponderEvent
|
|
14
|
+
) => void;
|
|
15
|
+
disabled?: boolean | null;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
};
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Component to render link to another screen using a path.
|
|
19
21
|
* Uses an anchor tag on the web.
|
|
20
22
|
*
|
|
21
|
-
* @param props.
|
|
23
|
+
* @param props.screen Name of the screen to navigate to (e.g. `'Feeds'`).
|
|
24
|
+
* @param props.params Params to pass to the screen to navigate to (e.g. `{ sort: 'hot' }`).
|
|
25
|
+
* @param props.href Optional absolute path to use for the href (e.g. `/feeds/hot`).
|
|
22
26
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
23
27
|
* @param props.children Child elements to render the content.
|
|
24
28
|
*/
|
|
25
|
-
export
|
|
26
|
-
|
|
29
|
+
export function Link<ParamList extends ReactNavigation.RootParamList>({
|
|
30
|
+
screen,
|
|
31
|
+
params,
|
|
27
32
|
action,
|
|
33
|
+
href,
|
|
28
34
|
...rest
|
|
29
35
|
}: Props<ParamList>) {
|
|
30
|
-
|
|
36
|
+
// @ts-expect-error: This is already type-checked by the prop types
|
|
37
|
+
const props = useLinkProps<ParamList>({ screen, params, action, href });
|
|
31
38
|
|
|
32
39
|
const onPress = (
|
|
33
40
|
e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
|
|
@@ -36,7 +43,10 @@ export default function Link<ParamList extends ReactNavigation.RootParamList>({
|
|
|
36
43
|
rest.onPress?.(e);
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
// Let user prevent default behavior
|
|
47
|
+
if (!e.defaultPrevented) {
|
|
48
|
+
props.onPress(e);
|
|
49
|
+
}
|
|
40
50
|
};
|
|
41
51
|
|
|
42
52
|
return React.createElement(Text, {
|
package/src/LinkingContext.tsx
CHANGED
|
@@ -3,10 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import type { LinkingOptions } from './types';
|
|
5
5
|
|
|
6
|
-
const LinkingContext = React.createContext<{
|
|
6
|
+
export const LinkingContext = React.createContext<{
|
|
7
7
|
options: LinkingOptions<ParamListBase> | undefined;
|
|
8
8
|
}>({ options: undefined });
|
|
9
9
|
|
|
10
10
|
LinkingContext.displayName = 'LinkingContext';
|
|
11
|
-
|
|
12
|
-
export default LinkingContext;
|