@amazon-devices/react-navigation__native 2.0.1758683737
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/LICENSE +7 -0
- package/README.md +5 -0
- package/SystemBundles/6132afb62bda3afb78ba1a1aca51924df73e9dbcc77106aa0f97a0ef68b04ebb.bundle +15196 -0
- package/SystemBundles/6132afb62bda3afb78ba1a1aca51924df73e9dbcc77106aa0f97a0ef68b04ebb.map +1 -0
- package/SystemModules/amzn__react-navigation__native-2.modules.txt +76 -0
- package/SystemModules/amzn__react-navigation__native-2.private.modules.txt +101 -0
- package/SystemModules/keplerscript-system-bundle-config.json +7 -0
- package/THIRD_PARTY_NOTICES.txt +24 -0
- package/kepler-compatibility.json +8 -0
- package/kepler-transformed-package-info.json +3 -0
- package/lib/commonjs/Link.js +50 -0
- package/lib/commonjs/Link.js.map +1 -0
- package/lib/commonjs/LinkingContext.js +15 -0
- package/lib/commonjs/LinkingContext.js.map +1 -0
- package/lib/commonjs/NavigationContainer.js +109 -0
- package/lib/commonjs/NavigationContainer.js.map +1 -0
- package/lib/commonjs/ServerContainer.js +54 -0
- package/lib/commonjs/ServerContainer.js.map +1 -0
- package/lib/commonjs/ServerContext.js +12 -0
- package/lib/commonjs/ServerContext.js.map +1 -0
- package/lib/commonjs/createMemoryHistory.js +220 -0
- package/lib/commonjs/createMemoryHistory.js.map +1 -0
- package/lib/commonjs/extractPathFromURL.js +25 -0
- package/lib/commonjs/extractPathFromURL.js.map +1 -0
- package/lib/commonjs/index.js +129 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/theming/DarkTheme.js +19 -0
- package/lib/commonjs/theming/DarkTheme.js.map +1 -0
- package/lib/commonjs/theming/DefaultTheme.js +19 -0
- package/lib/commonjs/theming/DefaultTheme.js.map +1 -0
- package/lib/commonjs/theming/ThemeContext.js +15 -0
- package/lib/commonjs/theming/ThemeContext.js.map +1 -0
- package/lib/commonjs/theming/ThemeProvider.js +20 -0
- package/lib/commonjs/theming/ThemeProvider.js.map +1 -0
- package/lib/commonjs/theming/useTheme.js +16 -0
- package/lib/commonjs/theming/useTheme.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useBackButton.js +11 -0
- package/lib/commonjs/useBackButton.js.map +1 -0
- package/lib/commonjs/useBackButton.native.js +27 -0
- package/lib/commonjs/useBackButton.native.js.map +1 -0
- package/lib/commonjs/useDocumentTitle.js +32 -0
- package/lib/commonjs/useDocumentTitle.js.map +1 -0
- package/lib/commonjs/useDocumentTitle.native.js +10 -0
- package/lib/commonjs/useDocumentTitle.native.js.map +1 -0
- package/lib/commonjs/useLinkBuilder.js +63 -0
- package/lib/commonjs/useLinkBuilder.js.map +1 -0
- package/lib/commonjs/useLinkProps.js +97 -0
- package/lib/commonjs/useLinkProps.js.map +1 -0
- package/lib/commonjs/useLinkTo.js +45 -0
- package/lib/commonjs/useLinkTo.js.map +1 -0
- package/lib/commonjs/useLinking.js +303 -0
- package/lib/commonjs/useLinking.js.map +1 -0
- package/lib/commonjs/useLinking.native.js +152 -0
- package/lib/commonjs/useLinking.native.js.map +1 -0
- package/lib/commonjs/useScrollToTop.js +95 -0
- package/lib/commonjs/useScrollToTop.js.map +1 -0
- package/lib/commonjs/useThenable.js +41 -0
- package/lib/commonjs/useThenable.js.map +1 -0
- package/lib/module/Link.js +41 -0
- package/lib/module/Link.js.map +1 -0
- package/lib/module/LinkingContext.js +7 -0
- package/lib/module/LinkingContext.js.map +1 -0
- package/lib/module/NavigationContainer.js +100 -0
- package/lib/module/NavigationContainer.js.map +1 -0
- package/lib/module/ServerContainer.js +45 -0
- package/lib/module/ServerContainer.js.map +1 -0
- package/lib/module/ServerContext.js +4 -0
- package/lib/module/ServerContext.js.map +1 -0
- package/lib/module/createMemoryHistory.js +214 -0
- package/lib/module/createMemoryHistory.js.map +1 -0
- package/lib/module/extractPathFromURL.js +18 -0
- package/lib/module/extractPathFromURL.js.map +1 -0
- package/lib/module/index.js +15 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theming/DarkTheme.js +13 -0
- package/lib/module/theming/DarkTheme.js.map +1 -0
- package/lib/module/theming/DefaultTheme.js +13 -0
- package/lib/module/theming/DefaultTheme.js.map +1 -0
- package/lib/module/theming/ThemeContext.js +6 -0
- package/lib/module/theming/ThemeContext.js.map +1 -0
- package/lib/module/theming/ThemeProvider.js +11 -0
- package/lib/module/theming/ThemeProvider.js.map +1 -0
- package/lib/module/theming/useTheme.js +7 -0
- package/lib/module/theming/useTheme.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useBackButton.js +5 -0
- package/lib/module/useBackButton.js.map +1 -0
- package/lib/module/useBackButton.native.js +19 -0
- package/lib/module/useBackButton.native.js.map +1 -0
- package/lib/module/useDocumentTitle.js +24 -0
- package/lib/module/useDocumentTitle.js.map +1 -0
- package/lib/module/useDocumentTitle.native.js +4 -0
- package/lib/module/useDocumentTitle.native.js.map +1 -0
- package/lib/module/useLinkBuilder.js +54 -0
- package/lib/module/useLinkBuilder.js.map +1 -0
- package/lib/module/useLinkProps.js +88 -0
- package/lib/module/useLinkProps.js.map +1 -0
- package/lib/module/useLinkTo.js +36 -0
- package/lib/module/useLinkTo.js.map +1 -0
- package/lib/module/useLinking.js +292 -0
- package/lib/module/useLinking.js.map +1 -0
- package/lib/module/useLinking.native.js +143 -0
- package/lib/module/useLinking.native.js.map +1 -0
- package/lib/module/useScrollToTop.js +87 -0
- package/lib/module/useScrollToTop.js.map +1 -0
- package/lib/module/useThenable.js +33 -0
- package/lib/module/useThenable.js.map +1 -0
- package/lib/typescript/src/Link.d.ts +24 -0
- package/lib/typescript/src/Link.d.ts.map +1 -0
- package/lib/typescript/src/LinkingContext.d.ts +8 -0
- package/lib/typescript/src/LinkingContext.d.ts.map +1 -0
- package/lib/typescript/src/NavigationContainer.d.ts +26 -0
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -0
- package/lib/typescript/src/ServerContainer.d.ts +15 -0
- package/lib/typescript/src/ServerContainer.d.ts.map +1 -0
- package/lib/typescript/src/ServerContext.d.ts +10 -0
- package/lib/typescript/src/ServerContext.d.ts.map +1 -0
- package/lib/typescript/src/__mocks__/window.d.ts +19 -0
- package/lib/typescript/src/__mocks__/window.d.ts.map +1 -0
- package/lib/typescript/src/createMemoryHistory.d.ts +25 -0
- package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -0
- package/lib/typescript/src/extractPathFromURL.d.ts +2 -0
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +15 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theming/DarkTheme.d.ts +4 -0
- package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/DefaultTheme.d.ts +4 -0
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/ThemeContext.d.ts +5 -0
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/src/theming/ThemeProvider.d.ts +9 -0
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/theming/useTheme.d.ts +2 -0
- package/lib/typescript/src/theming/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +127 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/useBackButton.d.ts +4 -0
- package/lib/typescript/src/useBackButton.d.ts.map +1 -0
- 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 +8 -0
- package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -0
- package/lib/typescript/src/useDocumentTitle.native.d.ts +2 -0
- package/lib/typescript/src/useDocumentTitle.native.d.ts.map +1 -0
- package/lib/typescript/src/useLinkBuilder.d.ts +6 -0
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -0
- package/lib/typescript/src/useLinkProps.d.ts +21 -0
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -0
- package/lib/typescript/src/useLinkTo.d.ts +9 -0
- package/lib/typescript/src/useLinkTo.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.d.ts +55 -0
- package/lib/typescript/src/useLinking.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.native.d.ts +51 -0
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts +27 -0
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -0
- package/lib/typescript/src/useThenable.d.ts +2 -0
- package/lib/typescript/src/useThenable.d.ts.map +1 -0
- package/package.json +1 -0
- package/src/Link.tsx +53 -0
- package/src/LinkingContext.tsx +12 -0
- package/src/NavigationContainer.tsx +152 -0
- package/src/ServerContainer.tsx +56 -0
- package/src/ServerContext.tsx +14 -0
- package/src/__mocks__/window.tsx +77 -0
- package/src/createMemoryHistory.tsx +224 -0
- package/src/extractPathFromURL.tsx +29 -0
- package/src/index.tsx +14 -0
- package/src/theming/DarkTheme.tsx +15 -0
- package/src/theming/DefaultTheme.tsx +15 -0
- package/src/theming/ThemeContext.tsx +10 -0
- package/src/theming/ThemeProvider.tsx +15 -0
- package/src/theming/useTheme.tsx +9 -0
- package/src/types.tsx +145 -0
- package/src/useBackButton.native.tsx +33 -0
- package/src/useBackButton.tsx +11 -0
- package/src/useDocumentTitle.native.tsx +3 -0
- package/src/useDocumentTitle.tsx +41 -0
- package/src/useLinkBuilder.tsx +82 -0
- package/src/useLinkProps.tsx +126 -0
- package/src/useLinkTo.tsx +71 -0
- package/src/useLinking.native.tsx +215 -0
- package/src/useLinking.tsx +395 -0
- package/src/useScrollToTop.tsx +116 -0
- package/src/useThenable.tsx +41 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NavigationContainerProps, NavigationContainerRef } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { DocumentTitleOptions, LinkingOptions, Theme } from './types';
|
|
4
|
+
declare global {
|
|
5
|
+
var REACT_NAVIGATION_DEVTOOLS: WeakMap<NavigationContainerRef<any>, {
|
|
6
|
+
readonly linking: LinkingOptions<any>;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
10
|
+
theme?: Theme;
|
|
11
|
+
linking?: LinkingOptions<ParamList>;
|
|
12
|
+
fallback?: React.ReactNode;
|
|
13
|
+
documentTitle?: DocumentTitleOptions;
|
|
14
|
+
onReady?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const NavigationContainer: <RootParamList extends {} = ReactNavigation.RootParamList>(props: NavigationContainerProps & {
|
|
17
|
+
theme?: Theme | undefined;
|
|
18
|
+
linking?: LinkingOptions<RootParamList> | undefined;
|
|
19
|
+
fallback?: React.ReactNode;
|
|
20
|
+
documentTitle?: DocumentTitleOptions | undefined;
|
|
21
|
+
onReady?: (() => void) | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
ref?: React.Ref<NavigationContainerRef<RootParamList>> | undefined;
|
|
24
|
+
}) => React.ReactElement;
|
|
25
|
+
export default NavigationContainer;
|
|
26
|
+
//# sourceMappingURL=NavigationContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../../../src/NavigationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,EACxB,sBAAsB,EAGvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAM3E,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,yBAAyB,EAAE,OAAO,CACpC,sBAAsB,CAAC,GAAG,CAAC,EAC3B;QAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;KAAE,CAC1C,CAAC;CACH;AAID,KAAK,KAAK,CAAC,SAAS,SAAS,EAAE,IAAI,wBAAwB,GAAG;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AA2GF,QAAA,MAAM,mBAAmB;;;eA9GZ,MAAM,SAAS;;qBAEV,IAAI;;;MAkHjB,MAAM,YAAY,CAAC;AAExB,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ServerContextType } from './ServerContext';
|
|
3
|
+
import type { ServerContainerRef } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Container component for server rendering.
|
|
6
|
+
*
|
|
7
|
+
* @param props.location Location object to base the initial URL for SSR.
|
|
8
|
+
* @param props.children Child elements to render the content.
|
|
9
|
+
* @param props.ref Ref object which contains helper methods.
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: React.ForwardRefExoticComponent<ServerContextType & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
} & React.RefAttributes<ServerContainerRef>>;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=ServerContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerContainer.d.ts","sourceRoot":"","sources":["../../../src/ServerContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAsB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;;;GAMG;;;;AACH,wBAsCG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type ServerContextType = {
|
|
3
|
+
location?: {
|
|
4
|
+
pathname: string;
|
|
5
|
+
search: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
declare const ServerContext: React.Context<ServerContextType | undefined>;
|
|
9
|
+
export default ServerContext;
|
|
10
|
+
//# sourceMappingURL=ServerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerContext.d.ts","sourceRoot":"","sources":["../../../src/ServerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,aAAa,8CAElB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const window: {
|
|
2
|
+
document: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
location: URL;
|
|
6
|
+
history: {
|
|
7
|
+
readonly state: any;
|
|
8
|
+
pushState(state: any, _: string, path: string): void;
|
|
9
|
+
replaceState(state: any, _: string, path: string): void;
|
|
10
|
+
go(n: number): void;
|
|
11
|
+
back(): void;
|
|
12
|
+
forward(): void;
|
|
13
|
+
};
|
|
14
|
+
addEventListener: (type: 'popstate', listener: () => void) => void;
|
|
15
|
+
removeEventListener: (type: 'popstate', listener: () => void) => void;
|
|
16
|
+
readonly window: any;
|
|
17
|
+
};
|
|
18
|
+
export default window;
|
|
19
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../src/__mocks__/window.tsx"],"names":[],"mappings":"AAiEA,QAAA,MAAM,MAAM;;;;;;;yBApDO,GAAG,KAAK,MAAM,QAAQ,MAAM;4BASzB,GAAG,KAAK,MAAM,QAAQ,MAAM;cAO1C,MAAM;;;;6BAwBkB,UAAU,YAAY,MAAM,IAAI;gCAM7B,UAAU,YAAY,MAAM,IAAI;;CAelE,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NavigationState } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
type HistoryRecord = {
|
|
3
|
+
id: string;
|
|
4
|
+
state: NavigationState;
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
export default function createMemoryHistory(): {
|
|
8
|
+
readonly index: number;
|
|
9
|
+
get(index: number): HistoryRecord;
|
|
10
|
+
backIndex({ path }: {
|
|
11
|
+
path: string;
|
|
12
|
+
}): number;
|
|
13
|
+
push({ path, state }: {
|
|
14
|
+
path: string;
|
|
15
|
+
state: NavigationState;
|
|
16
|
+
}): void;
|
|
17
|
+
replace({ path, state }: {
|
|
18
|
+
path: string;
|
|
19
|
+
state: NavigationState;
|
|
20
|
+
}): void;
|
|
21
|
+
go(n: number): Promise<void> | undefined;
|
|
22
|
+
listen(listener: () => void): () => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=createMemoryHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMemoryHistory.d.ts","sourceRoot":"","sources":["../../../src/createMemoryHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,KAAK,aAAa,GAAG;IAEnB,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,eAAe,CAAC;IAEvB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB;;eAiC5B,MAAM;;cAIW,MAAM;;;cAaJ,MAAM;eAAS,eAAe;;;cAmB3B,MAAM;eAAS,eAAe;;UAkCzD,MAAM;qBA2FK,MAAM,IAAI;EAiB9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../../src/extractPathFromURL.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,sBA0BzE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as Link } from './Link';
|
|
2
|
+
export { default as LinkingContext } from './LinkingContext';
|
|
3
|
+
export { default as NavigationContainer } from './NavigationContainer';
|
|
4
|
+
export { default as ServerContainer } from './ServerContainer';
|
|
5
|
+
export { default as DarkTheme } from './theming/DarkTheme';
|
|
6
|
+
export { default as DefaultTheme } from './theming/DefaultTheme';
|
|
7
|
+
export { default as ThemeProvider } from './theming/ThemeProvider';
|
|
8
|
+
export { default as useTheme } from './theming/useTheme';
|
|
9
|
+
export * from './types';
|
|
10
|
+
export { default as useLinkBuilder } from './useLinkBuilder';
|
|
11
|
+
export { default as useLinkProps } from './useLinkProps';
|
|
12
|
+
export { default as useLinkTo } from './useLinkTo';
|
|
13
|
+
export { default as useScrollToTop } from './useScrollToTop';
|
|
14
|
+
export * from '@amazon-devices/react-navigation__core';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +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;AAEtC,QAAA,MAAM,SAAS,EAAE,KAUhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +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;AAEtC,QAAA,MAAM,YAAY,EAAE,KAUnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +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,QAAA,MAAM,YAAY,sBAA2C,CAAC;AAI9D,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Theme } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
value: Theme;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export default function ThemeProvider({ value, children }: Props): JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +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,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,eAI/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/useTheme.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,QAAQ,uBAI/B"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { getActionFromState as getActionFromStateDefault, getPathFromState as getPathFromStateDefault, getStateFromPath as getStateFromPathDefault, PathConfigMap, Route } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
export type Theme = {
|
|
3
|
+
dark: boolean;
|
|
4
|
+
colors: {
|
|
5
|
+
primary: string;
|
|
6
|
+
background: string;
|
|
7
|
+
card: string;
|
|
8
|
+
text: string;
|
|
9
|
+
border: string;
|
|
10
|
+
notification: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type LinkingOptions<ParamList extends {}> = {
|
|
14
|
+
/**
|
|
15
|
+
* Whether deep link handling should be enabled.
|
|
16
|
+
* Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The prefixes are stripped from the URL before parsing them.
|
|
21
|
+
* Usually they are the `scheme` + `host` (e.g. `myapp://chat?user=jane`)
|
|
22
|
+
*
|
|
23
|
+
* This is not supported on Web.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* {
|
|
28
|
+
* prefixes: [
|
|
29
|
+
* "myapp://", // App-specific scheme
|
|
30
|
+
* "https://example.com", // Prefix for universal links
|
|
31
|
+
* "https://*.example.com" // Prefix which matches any subdomain
|
|
32
|
+
* ]
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
prefixes: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Optional function which takes an incoming URL returns a boolean
|
|
39
|
+
* indicating whether React Navigation should handle it.
|
|
40
|
+
*
|
|
41
|
+
* This can be used to disable deep linking for specific URLs.
|
|
42
|
+
* e.g. URLs used for authentication, and not for deep linking to screens.
|
|
43
|
+
*
|
|
44
|
+
* This is not supported on Web.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```js
|
|
48
|
+
* {
|
|
49
|
+
* // Filter out URLs used by expo-auth-session
|
|
50
|
+
* filter: (url) => !url.includes('+expo-auth-session')
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
filter?: (url: string) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Config to fine-tune how to parse the path.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```js
|
|
60
|
+
* {
|
|
61
|
+
* Chat: {
|
|
62
|
+
* path: 'chat/:author/:id',
|
|
63
|
+
* parse: { id: Number }
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
config?: {
|
|
69
|
+
initialRouteName?: keyof ParamList;
|
|
70
|
+
screens: PathConfigMap<ParamList>;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Custom function to get the initial URL used for linking.
|
|
74
|
+
* Uses `Linking.getInitialURL()` by default.
|
|
75
|
+
*
|
|
76
|
+
* This is not supported on Web.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```js
|
|
80
|
+
* {
|
|
81
|
+
* getInitialURL () => Linking.getInitialURL(),
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
getInitialURL?: () => string | null | undefined | Promise<string | null | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* Custom function to get subscribe to URL updates.
|
|
88
|
+
* Uses `Linking.addEventListener('url', callback)` by default.
|
|
89
|
+
*
|
|
90
|
+
* This is not supported on Web.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```js
|
|
94
|
+
* {
|
|
95
|
+
* subscribe: (listener) => {
|
|
96
|
+
* const onReceiveURL = ({ url }) => listener(url);
|
|
97
|
+
*
|
|
98
|
+
* Linking.addEventListener('url', onReceiveURL);
|
|
99
|
+
*
|
|
100
|
+
* return () => Linking.removeEventListener('url', onReceiveURL);
|
|
101
|
+
* }
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
subscribe?: (listener: (url: string) => void) => undefined | void | (() => void);
|
|
106
|
+
/**
|
|
107
|
+
* Custom function to parse the URL to a valid navigation state (advanced).
|
|
108
|
+
*/
|
|
109
|
+
getStateFromPath?: typeof getStateFromPathDefault;
|
|
110
|
+
/**
|
|
111
|
+
* Custom function to convert the state object to a valid URL (advanced).
|
|
112
|
+
* Only applicable on Web.
|
|
113
|
+
*/
|
|
114
|
+
getPathFromState?: typeof getPathFromStateDefault;
|
|
115
|
+
/**
|
|
116
|
+
* Custom function to convert the state object to a valid action (advanced).
|
|
117
|
+
*/
|
|
118
|
+
getActionFromState?: typeof getActionFromStateDefault;
|
|
119
|
+
};
|
|
120
|
+
export type DocumentTitleOptions = {
|
|
121
|
+
enabled?: boolean;
|
|
122
|
+
formatter?: (options: Record<string, any> | undefined, route: Route<string> | undefined) => string;
|
|
123
|
+
};
|
|
124
|
+
export type ServerContainerRef = {
|
|
125
|
+
getCurrentOptions(): Record<string, any> | undefined;
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,8BAA8B,CAAC;AAEtC,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;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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { NavigationContainerRef, ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
3
|
+
export default function useBackButton(_: React.RefObject<NavigationContainerRef<ParamListBase>>): void;
|
|
4
|
+
//# sourceMappingURL=useBackButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBackButton.d.ts","sourceRoot":"","sources":["../../../src/useBackButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,QAI1D"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NavigationContainerRef, ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export default function useBackButton(ref: React.RefObject<NavigationContainerRef<ParamListBase>>): void;
|
|
4
|
+
//# sourceMappingURL=useBackButton.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBackButton.native.d.ts","sourceRoot":"","sources":["../../../src/useBackButton.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,QAwB5D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NavigationContainerRef, ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { DocumentTitleOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Set the document title for the active screen
|
|
6
|
+
*/
|
|
7
|
+
export default function useDocumentTitle(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { enabled, formatter, }?: DocumentTitleOptions): void;
|
|
8
|
+
//# sourceMappingURL=useDocumentTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,OAAc,EACd,SAA6D,GAC9D,GAAE,oBAAyB,QAwB7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.native.d.ts","sourceRoot":"","sources":["../../../src/useDocumentTitle.native.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,gBAAgB,SAEvC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build destination link for a navigate action.
|
|
3
|
+
* Useful for showing anchor tags on the web for buttons that perform navigation.
|
|
4
|
+
*/
|
|
5
|
+
export default function useLinkBuilder(): (name: string, params?: object) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=useLinkBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkBuilder.d.ts","sourceRoot":"","sources":["../../../src/useLinkBuilder.tsx"],"names":[],"mappings":"AA2CA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,WAK3B,MAAM,WAAW,MAAM,wBA6BjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NavigationAction } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { GestureResponderEvent } from 'react-native';
|
|
4
|
+
import { To } from './useLinkTo';
|
|
5
|
+
type Props<ParamList extends ReactNavigation.RootParamList> = {
|
|
6
|
+
to: To<ParamList>;
|
|
7
|
+
action?: NavigationAction;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Hook to get props for an anchor tag so it can work with in page navigation.
|
|
11
|
+
*
|
|
12
|
+
* @param props.to Absolute path to screen (e.g. `/feeds/hot`).
|
|
13
|
+
* @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
|
+
*/
|
|
15
|
+
export default function useLinkProps<ParamList extends ReactNavigation.RootParamList>({ to, action }: Props<ParamList>): {
|
|
16
|
+
href: string;
|
|
17
|
+
accessibilityRole: "link";
|
|
18
|
+
onPress: (e?: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=useLinkProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAKjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAY,MAAM,cAAc,CAAC;AAG/D,OAAkB,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,KAAK,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,IAAI;IAC5D,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AA+BF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,SAAS,SAAS,eAAe,CAAC,aAAa,EAC/C,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC;;;kBAO1B,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB;EA6D9E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type To<ParamList extends ReactNavigation.RootParamList = ReactNavigation.RootParamList, RouteName extends keyof ParamList = keyof ParamList> = string | (undefined extends ParamList[RouteName] ? {
|
|
2
|
+
screen: Extract<RouteName, string>;
|
|
3
|
+
params?: ParamList[RouteName];
|
|
4
|
+
} : {
|
|
5
|
+
screen: Extract<RouteName, string>;
|
|
6
|
+
params: ParamList[RouteName];
|
|
7
|
+
});
|
|
8
|
+
export default function useLinkTo<ParamList extends ReactNavigation.RootParamList>(): (to: To<ParamList>) => void;
|
|
9
|
+
//# sourceMappingURL=useLinkTo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkTo.d.ts","sourceRoot":"","sources":["../../../src/useLinkTo.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,EAAE,CACZ,SAAS,SAAS,eAAe,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,EAC/E,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IAEjD,MAAM,GACN,CAAC,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACnC;IACE,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC/B,GACD;IACE,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEX,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,SAAS,SAAS,eAAe,CAAC,aAAa,UAMxC,GAAG,SAAS,CAAC,UAuCrB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NavigationContainerRef, ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { LinkingOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Run async function in series as it's called.
|
|
6
|
+
*/
|
|
7
|
+
export declare const series: (cb: () => Promise<void>) => () => void;
|
|
8
|
+
type Options = LinkingOptions<ParamListBase> & {
|
|
9
|
+
independent?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { independent, enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): {
|
|
12
|
+
getInitialState: () => PromiseLike<(Partial<Omit<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("@amazon-devices/react-navigation__core").PartialState<Readonly<any>> | undefined;
|
|
25
|
+
})[];
|
|
26
|
+
type: string;
|
|
27
|
+
stale: false;
|
|
28
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
29
|
+
stale?: true | undefined;
|
|
30
|
+
routes: import("@amazon-devices/react-navigation__core").PartialRoute<import("@amazon-devices/react-navigation__core").Route<string, object | undefined>>[];
|
|
31
|
+
}> & {
|
|
32
|
+
state?: (Partial<Omit<Readonly<{
|
|
33
|
+
key: string;
|
|
34
|
+
index: number;
|
|
35
|
+
routeNames: string[];
|
|
36
|
+
history?: unknown[] | undefined;
|
|
37
|
+
routes: (Readonly<{
|
|
38
|
+
key: string;
|
|
39
|
+
name: string;
|
|
40
|
+
path?: string | undefined;
|
|
41
|
+
}> & Readonly<{
|
|
42
|
+
params?: Readonly<object | undefined>;
|
|
43
|
+
}> & {
|
|
44
|
+
state?: Readonly<any> | import("@amazon-devices/react-navigation__core").PartialState<Readonly<any>> | undefined;
|
|
45
|
+
})[];
|
|
46
|
+
type: string;
|
|
47
|
+
stale: false;
|
|
48
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
49
|
+
stale?: true | undefined;
|
|
50
|
+
routes: import("@amazon-devices/react-navigation__core").PartialRoute<import("@amazon-devices/react-navigation__core").Route<string, object | undefined>>[];
|
|
51
|
+
}> & any) | undefined;
|
|
52
|
+
}) | undefined>;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=useLinking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,sBAAsB,EAEtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA4C9C;;GAEG;AACH,eAAO,MAAM,MAAM,OAAQ,MAAM,QAAQ,IAAI,CAAC,eAM7C,CAAC;AAIF,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,GAAG;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,WAAW,EACX,OAAc,EACd,MAAM,EACN,gBAA0C,EAC1C,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsTX"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { NavigationContainerRef, ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { LinkingOptions } from './types';
|
|
4
|
+
type Options = LinkingOptions<ParamListBase> & {
|
|
5
|
+
independent?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { independent, enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
|
|
8
|
+
getInitialState: () => PromiseLike<(Partial<Omit<Readonly<{
|
|
9
|
+
key: string;
|
|
10
|
+
index: number;
|
|
11
|
+
routeNames: string[];
|
|
12
|
+
history?: unknown[] | undefined;
|
|
13
|
+
routes: (Readonly<{
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
params?: Readonly<object | undefined>;
|
|
19
|
+
}> & {
|
|
20
|
+
state?: Readonly<any> | import("@amazon-devices/react-navigation__core").PartialState<Readonly<any>> | undefined;
|
|
21
|
+
})[];
|
|
22
|
+
type: string;
|
|
23
|
+
stale: false;
|
|
24
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
25
|
+
stale?: true | undefined;
|
|
26
|
+
routes: import("@amazon-devices/react-navigation__core").PartialRoute<import("@amazon-devices/react-navigation__core").Route<string, object | undefined>>[];
|
|
27
|
+
}> & {
|
|
28
|
+
state?: (Partial<Omit<Readonly<{
|
|
29
|
+
key: string;
|
|
30
|
+
index: number;
|
|
31
|
+
routeNames: string[];
|
|
32
|
+
history?: unknown[] | undefined;
|
|
33
|
+
routes: (Readonly<{
|
|
34
|
+
key: string;
|
|
35
|
+
name: string;
|
|
36
|
+
path?: string | undefined;
|
|
37
|
+
}> & Readonly<{
|
|
38
|
+
params?: Readonly<object | undefined>;
|
|
39
|
+
}> & {
|
|
40
|
+
state?: Readonly<any> | import("@amazon-devices/react-navigation__core").PartialState<Readonly<any>> | undefined;
|
|
41
|
+
})[];
|
|
42
|
+
type: string;
|
|
43
|
+
stale: false;
|
|
44
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
45
|
+
stale?: true | undefined;
|
|
46
|
+
routes: import("@amazon-devices/react-navigation__core").PartialRoute<import("@amazon-devices/react-navigation__core").Route<string, object | undefined>>[];
|
|
47
|
+
}> & any) | undefined;
|
|
48
|
+
}) | undefined>;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=useLinking.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,EACtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,GAAG;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EACE,WAAW,EACX,OAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAmBC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2JX"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ScrollView } from 'react-native';
|
|
3
|
+
type ScrollOptions = {
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
animated?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type ScrollableView = {
|
|
9
|
+
scrollToTop(): void;
|
|
10
|
+
} | {
|
|
11
|
+
scrollTo(options: ScrollOptions): void;
|
|
12
|
+
} | {
|
|
13
|
+
scrollToOffset(options: {
|
|
14
|
+
offset?: number;
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
} | {
|
|
18
|
+
scrollResponderScrollTo(options: ScrollOptions): void;
|
|
19
|
+
};
|
|
20
|
+
type ScrollableWrapper = {
|
|
21
|
+
getScrollResponder(): React.ReactNode | ScrollView;
|
|
22
|
+
} | {
|
|
23
|
+
getNode(): ScrollableView;
|
|
24
|
+
} | ScrollableView;
|
|
25
|
+
export default function useScrollToTop(ref: React.RefObject<ScrollableWrapper>): void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=useScrollToTop.d.ts.map
|
|
@@ -0,0 +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,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,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAgExC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,4BAsClE"}
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "@amazon-devices/react-navigation__native", "description": "React Native integration for React Navigation", "version": "2.0.1758683737+6.1.9", "keywords": ["react-native", "react-navigation", "ios", "android"], "license": "See license in LICENSE", "repository": {"type": "git", "url": "https://github.com/react-navigation/react-navigation.git", "directory": "packages/native"}, "bugs": {"url": "https://github.com/react-navigation/react-navigation/issues"}, "homepage": "https://reactnavigation.org", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "source": "src/index.tsx", "module": "lib/module/index.js", "types": "lib/typescript/src/index.d.ts", "files": ["src", "lib", "kepler-compatibility.json", "!**/__tests__", "SystemModules", "SystemBundles", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "sideEffects": false, "kepler": {"temporary-alias-for-package": {"name": "@react-navigation/native", "version": "6.1.9"}}, "publishConfig": {"access": "public"}, "scripts": {"clean": "del lib"}, "dependencies": {"@amazon-devices/react-navigation__core": "^2.0.0+6.4.10", "@amazon-devices/react-navigation__routers": "^2.0.0+6.1.9", "escape-string-regexp": "4.0.0", "fast-deep-equal": "3.1.3", "nanoid": "3.1.23"}, "devDependencies": {"@testing-library/react-native": "11.5.4", "@types/react": "17.0.2", "@types/react-dom": "18.0.10", "@types/jest": "26.0.15", "del-cli": "5.0.0", "react": "17.0.2", "react-dom": "18.2.0", "react-native": "0.72.0", "react-native-builder-bob": "0.20.4", "typescript": "4.9.4"}, "peerDependencies": {"react": "*", "react-native": "*"}, "react-native-builder-bob": {"source": "src", "output": "lib", "targets": ["commonjs", "module", ["typescript", {"project": "tsconfig.build.json"}]]}}
|