@amazon-devices/react-navigation__native 7.0.1759135970 → 8.0.9000000000-rn-83
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/SystemBundles/c0d77be093c9724f49566be215c67240e6443c16760f772a745108ddaef15503.bundle +9117 -0
- package/SystemBundles/c0d77be093c9724f49566be215c67240e6443c16760f772a745108ddaef15503.map +3543 -0
- package/SystemModules/amzn__react-navigation__native-8.modules.txt +24 -0
- package/SystemModules/amzn__react-navigation__native-8.private.modules.txt +77 -0
- package/SystemModules/keplerscript-system-bundle-config.json +4 -4
- package/kepler-compatibility.json +2 -2
- package/lib/module/Link.js +31 -10
- package/lib/module/Link.js.map +1 -1
- package/lib/module/LinkingContext.js +7 -3
- package/lib/module/LinkingContext.js.map +1 -1
- package/lib/module/LocaleDirContext.js +6 -0
- package/lib/module/LocaleDirContext.js.map +1 -0
- package/lib/module/NavigationContainer.js +87 -59
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/ServerContainer.js +20 -10
- package/lib/module/ServerContainer.js.map +1 -1
- package/lib/module/ServerContext.js +3 -2
- package/lib/module/ServerContext.js.map +1 -1
- package/lib/module/UnhandledLinkingContext.js +14 -0
- package/lib/module/UnhandledLinkingContext.js.map +1 -0
- package/lib/module/__stubs__/createStackNavigator.js +18 -0
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -0
- package/lib/module/__stubs__/window.js +75 -0
- package/lib/module/__stubs__/window.js.map +1 -0
- package/lib/module/createMemoryHistory.js +19 -17
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStaticNavigation.js +54 -0
- package/lib/module/createStaticNavigation.js.map +1 -0
- package/lib/module/extractPathFromURL.js +6 -5
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/index.js +18 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/theming/DarkTheme.js +6 -3
- package/lib/module/theming/DarkTheme.js.map +1 -1
- package/lib/module/theming/DefaultTheme.js +6 -3
- package/lib/module/theming/DefaultTheme.js.map +1 -1
- package/lib/module/theming/fonts.js +61 -0
- package/lib/module/theming/fonts.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/useBackButton.js +3 -1
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useBackButton.native.js +3 -1
- package/lib/module/useBackButton.native.js.map +1 -1
- package/lib/module/useDocumentTitle.js +6 -4
- package/lib/module/useDocumentTitle.js.map +1 -1
- package/lib/module/useDocumentTitle.native.js +4 -2
- package/lib/module/useDocumentTitle.native.js.map +1 -1
- package/lib/module/useLinkBuilder.js +71 -40
- package/lib/module/useLinkBuilder.js.map +1 -1
- package/lib/module/useLinkProps.js +41 -36
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinkTo.js +18 -28
- package/lib/module/useLinkTo.js.map +1 -1
- package/lib/module/useLinking.js +47 -19
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +33 -28
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useLocale.js +18 -0
- package/lib/module/useLocale.js.map +1 -0
- package/lib/module/useRoutePath.js +30 -0
- package/lib/module/useRoutePath.js.map +1 -0
- package/lib/module/useScrollToTop.js +11 -7
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/module/useThenable.js +4 -1
- package/lib/module/useThenable.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/Link.d.ts +8 -10
- 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 +36 -13
- 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 +13 -0
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/{__mocks__ → __stubs__}/window.d.ts +5 -6
- 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 +34 -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 +15 -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 +35 -3
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +1 -2
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.native.d.ts +1 -1
- package/lib/typescript/src/useBackButton.native.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/useLinkBuilder.d.ts +97 -3
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
- package/lib/typescript/src/useLinkProps.d.ts +23 -10
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinkTo.d.ts +6 -8
- package/lib/typescript/src/useLinkTo.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.d.ts +5 -46
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +11 -29
- 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/useRoutePath.d.ts +7 -0
- package/lib/typescript/src/useRoutePath.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts +2 -2
- 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/oss-attribution/attribution.txt +50 -0
- package/oss-attribution/licenseInfos.json +18 -0
- package/package.json +97 -1
- package/src/Link.tsx +36 -20
- package/src/LinkingContext.tsx +9 -5
- package/src/LocaleDirContext.tsx +7 -0
- package/src/NavigationContainer.tsx +128 -69
- package/src/ServerContainer.tsx +4 -3
- package/src/ServerContext.tsx +1 -3
- package/src/UnhandledLinkingContext.tsx +18 -0
- package/src/__stubs__/createStackNavigator.tsx +46 -0
- package/src/{__mocks__ → __stubs__}/window.tsx +8 -8
- package/src/createMemoryHistory.tsx +16 -11
- package/src/createStaticNavigation.tsx +109 -0
- package/src/extractPathFromURL.tsx +3 -3
- package/src/index.tsx +15 -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 +49 -3
- package/src/useBackButton.native.tsx +2 -2
- package/src/useBackButton.tsx +2 -2
- package/src/useDocumentTitle.native.tsx +2 -2
- package/src/useDocumentTitle.tsx +2 -2
- package/src/useLinkBuilder.tsx +100 -55
- package/src/useLinkProps.tsx +80 -50
- package/src/useLinkTo.tsx +13 -53
- package/src/useLinking.native.tsx +33 -31
- package/src/useLinking.tsx +70 -23
- package/src/useLocale.tsx +18 -0
- package/src/useRoutePath.tsx +34 -0
- package/src/useScrollToTop.tsx +16 -12
- package/src/useThenable.tsx +2 -1
- package/SystemBundles/8f36606502d3b658fa1ffc07fee4da0e39a8ce388742799c9ccdb66b39ef0362.bundle +0 -15196
- package/SystemBundles/8f36606502d3b658fa1ffc07fee4da0e39a8ce388742799c9ccdb66b39ef0362.map +0 -1
- package/SystemModules/amzn__react-navigation__native-7.modules.txt +0 -76
- package/SystemModules/amzn__react-navigation__native-7.private.modules.txt +0 -101
- package/THIRD_PARTY_NOTICES.txt +0 -24
- package/lib/commonjs/Link.js +0 -50
- package/lib/commonjs/Link.js.map +0 -1
- package/lib/commonjs/LinkingContext.js +0 -15
- package/lib/commonjs/LinkingContext.js.map +0 -1
- package/lib/commonjs/NavigationContainer.js +0 -109
- package/lib/commonjs/NavigationContainer.js.map +0 -1
- package/lib/commonjs/ServerContainer.js +0 -54
- package/lib/commonjs/ServerContainer.js.map +0 -1
- package/lib/commonjs/ServerContext.js +0 -12
- package/lib/commonjs/ServerContext.js.map +0 -1
- package/lib/commonjs/createMemoryHistory.js +0 -220
- package/lib/commonjs/createMemoryHistory.js.map +0 -1
- package/lib/commonjs/extractPathFromURL.js +0 -25
- package/lib/commonjs/extractPathFromURL.js.map +0 -1
- package/lib/commonjs/index.js +0 -129
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/theming/DarkTheme.js +0 -19
- package/lib/commonjs/theming/DarkTheme.js.map +0 -1
- package/lib/commonjs/theming/DefaultTheme.js +0 -19
- package/lib/commonjs/theming/DefaultTheme.js.map +0 -1
- package/lib/commonjs/theming/ThemeContext.js +0 -15
- package/lib/commonjs/theming/ThemeContext.js.map +0 -1
- package/lib/commonjs/theming/ThemeProvider.js +0 -20
- 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/types.js +0 -6
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/useBackButton.js +0 -11
- package/lib/commonjs/useBackButton.js.map +0 -1
- package/lib/commonjs/useBackButton.native.js +0 -27
- package/lib/commonjs/useBackButton.native.js.map +0 -1
- package/lib/commonjs/useDocumentTitle.js +0 -32
- package/lib/commonjs/useDocumentTitle.js.map +0 -1
- package/lib/commonjs/useDocumentTitle.native.js +0 -10
- package/lib/commonjs/useDocumentTitle.native.js.map +0 -1
- package/lib/commonjs/useLinkBuilder.js +0 -63
- package/lib/commonjs/useLinkBuilder.js.map +0 -1
- package/lib/commonjs/useLinkProps.js +0 -97
- package/lib/commonjs/useLinkProps.js.map +0 -1
- package/lib/commonjs/useLinkTo.js +0 -45
- package/lib/commonjs/useLinkTo.js.map +0 -1
- package/lib/commonjs/useLinking.js +0 -303
- package/lib/commonjs/useLinking.js.map +0 -1
- package/lib/commonjs/useLinking.native.js +0 -152
- package/lib/commonjs/useLinking.native.js.map +0 -1
- package/lib/commonjs/useScrollToTop.js +0 -95
- package/lib/commonjs/useScrollToTop.js.map +0 -1
- package/lib/commonjs/useThenable.js +0 -41
- package/lib/commonjs/useThenable.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 -11
- 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/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/src/theming/ThemeContext.tsx +0 -10
- package/src/theming/ThemeProvider.tsx +0 -15
- package/src/theming/useTheme.tsx +0 -9
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getActionFromState as getActionFromStateDefault, getStateFromPath as getStateFromPathDefault, useNavigationIndependentTree } from '@amazon-devices/react-navigation__core';
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { Linking, Platform } from 'react-native';
|
|
4
|
-
import extractPathFromURL from
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
independent,
|
|
6
|
+
import { extractPathFromURL } from "./extractPathFromURL.js";
|
|
7
|
+
const linkingHandlers = [];
|
|
8
|
+
export function useLinking(ref, {
|
|
8
9
|
enabled = true,
|
|
9
10
|
prefixes,
|
|
10
11
|
filter,
|
|
11
12
|
config,
|
|
12
|
-
getInitialURL = () => Promise.race([Linking.getInitialURL(), new Promise(resolve =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
getInitialURL = () => Promise.race([Linking.getInitialURL(), new Promise(resolve => {
|
|
14
|
+
// Timeout in 150ms if `getInitialState` doesn't resolve
|
|
15
|
+
// Workaround for https://github.com/facebook/react-native/issues/25675
|
|
16
|
+
setTimeout(resolve, 150);
|
|
17
|
+
})]),
|
|
16
18
|
subscribe = listener => {
|
|
17
|
-
var _Linking$removeEventL;
|
|
18
19
|
const callback = ({
|
|
19
20
|
url
|
|
20
21
|
}) => listener(url);
|
|
@@ -22,19 +23,20 @@ export default function useLinking(ref, {
|
|
|
22
23
|
|
|
23
24
|
// Storing this in a local variable stops Jest from complaining about import after teardown
|
|
24
25
|
// @ts-expect-error: removeEventListener is not present in newer RN versions
|
|
25
|
-
const removeEventListener =
|
|
26
|
+
const removeEventListener = Linking.removeEventListener?.bind(Linking);
|
|
26
27
|
return () => {
|
|
27
28
|
// https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7
|
|
28
|
-
if (subscription
|
|
29
|
+
if (subscription?.remove) {
|
|
29
30
|
subscription.remove();
|
|
30
31
|
} else {
|
|
31
|
-
removeEventListener
|
|
32
|
+
removeEventListener?.('url', callback);
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
},
|
|
35
36
|
getStateFromPath = getStateFromPathDefault,
|
|
36
37
|
getActionFromState = getActionFromStateDefault
|
|
37
|
-
}) {
|
|
38
|
+
}, onUnhandledLinking) {
|
|
39
|
+
const independent = useNavigationIndependentTree();
|
|
38
40
|
React.useEffect(() => {
|
|
39
41
|
if (process.env.NODE_ENV === 'production') {
|
|
40
42
|
return undefined;
|
|
@@ -87,11 +89,19 @@ export default function useLinking(ref, {
|
|
|
87
89
|
let state;
|
|
88
90
|
if (enabledRef.current) {
|
|
89
91
|
const url = getInitialURLRef.current();
|
|
90
|
-
if (url != null
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
if (url != null) {
|
|
93
|
+
if (typeof url !== 'string') {
|
|
94
|
+
return url.then(url => {
|
|
95
|
+
const state = getStateFromURL(url);
|
|
96
|
+
if (typeof url === 'string') {
|
|
97
|
+
// If the link were handled, it gets cleared in NavigationContainer
|
|
98
|
+
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
99
|
+
}
|
|
100
|
+
return state;
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
state = getStateFromURL(url);
|
|
97
107
|
}
|
|
@@ -104,7 +114,7 @@ export default function useLinking(ref, {
|
|
|
104
114
|
}
|
|
105
115
|
};
|
|
106
116
|
return thenable;
|
|
107
|
-
}, [getStateFromURL]);
|
|
117
|
+
}, [getStateFromURL, onUnhandledLinking, prefixes]);
|
|
108
118
|
React.useEffect(() => {
|
|
109
119
|
const listener = url => {
|
|
110
120
|
if (!enabled) {
|
|
@@ -113,13 +123,8 @@ export default function useLinking(ref, {
|
|
|
113
123
|
const navigation = ref.current;
|
|
114
124
|
const state = navigation ? getStateFromURL(url) : undefined;
|
|
115
125
|
if (navigation && state) {
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
const rootState = navigation.getRootState();
|
|
119
|
-
if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) {
|
|
120
|
-
console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.");
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
126
|
+
// If the link were handled, it gets cleared in NavigationContainer
|
|
127
|
+
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
123
128
|
const action = getActionFromStateRef.current(state, configRef.current);
|
|
124
129
|
if (action !== undefined) {
|
|
125
130
|
try {
|
|
@@ -135,7 +140,7 @@ export default function useLinking(ref, {
|
|
|
135
140
|
}
|
|
136
141
|
};
|
|
137
142
|
return subscribe(listener);
|
|
138
|
-
}, [enabled, getStateFromURL, ref, subscribe]);
|
|
143
|
+
}, [enabled, getStateFromURL, onUnhandledLinking, prefixes, ref, subscribe]);
|
|
139
144
|
return {
|
|
140
145
|
getInitialState
|
|
141
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getActionFromState","getActionFromStateDefault","getStateFromPath","getStateFromPathDefault","React","Linking","Platform","extractPathFromURL","linkingHandlers","useLinking","ref","
|
|
1
|
+
{"version":3,"names":["getActionFromState","getActionFromStateDefault","getStateFromPath","getStateFromPathDefault","useNavigationIndependentTree","React","Linking","Platform","extractPathFromURL","linkingHandlers","useLinking","ref","enabled","prefixes","filter","config","getInitialURL","Promise","race","resolve","setTimeout","subscribe","listener","callback","url","subscription","addEventListener","removeEventListener","bind","remove","onUnhandledLinking","independent","useEffect","process","env","NODE_ENV","undefined","length","console","error","OS","join","trim","handler","Symbol","push","index","indexOf","splice","enabledRef","useRef","prefixesRef","filterRef","configRef","getInitialURLRef","getStateFromPathRef","getActionFromStateRef","current","getStateFromURL","useCallback","path","getInitialState","state","then","thenable","onfulfilled","catch","navigation","action","dispatch","e","warn","message","resetRoot"],"sourceRoot":"../../src","sources":["useLinking.native.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,IAAIC,yBAAyB,EAC/CC,gBAAgB,IAAIC,uBAAuB,EAG3CC,4BAA4B,QACvB,8BAA8B;AACrC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAEhD,SAASC,kBAAkB,QAAQ,yBAAsB;AAOzD,MAAMC,eAAyB,GAAG,EAAE;AAEpC,OAAO,SAASC,UAAUA,CACxBC,GAAkE,EAClE;EACEC,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,MAAM;EACNC,MAAM;EACNC,aAAa,GAAGA,CAAA,KACdC,OAAO,CAACC,IAAI,CAAC,CACXZ,OAAO,CAACU,aAAa,CAAC,CAAC,EACvB,IAAIC,OAAO,CAAaE,OAAO,IAAK;IAClC;IACA;IACAC,UAAU,CAACD,OAAO,EAAE,GAAG,CAAC;EAC1B,CAAC,CAAC,CACH,CAAC;EACJE,SAAS,GAAIC,QAAQ,IAAK;IACxB,MAAMC,QAAQ,GAAGA,CAAC;MAAEC;IAAqB,CAAC,KAAKF,QAAQ,CAACE,GAAG,CAAC;IAE5D,MAAMC,YAAY,GAAGnB,OAAO,CAACoB,gBAAgB,CAAC,KAAK,EAAEH,QAAQ,CAEhD;;IAEb;IACA;IACA,MAAMI,mBAAmB,GAAGrB,OAAO,CAACqB,mBAAmB,EAAEC,IAAI,CAACtB,OAAO,CAAC;IAEtE,OAAO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AAU,GAAGT,eAAe,CAAClC,GAAG,CAAC,GAAGY,SAAS;MAE3D,IAAI+B,UAAU,IAAIL,KAAK,EAAE;QACvB;QACAhC,kBAAkB,CAACtB,kBAAkB,CAACK,QAAQ,EAAEW,GAAG,CAAC,CAAC;QAErD,MAAM4C,MAAM,GAAGZ,qBAAqB,CAACC,OAAO,CAACK,KAAK,EAAET,SAAS,CAACI,OAAO,CAAC;QAEtE,IAAIW,MAAM,KAAKhC,SAAS,EAAE;UACxB,IAAI;YACF+B,UAAU,CAACE,QAAQ,CAACD,MAAM,CAAC;UAC7B,CAAC,CAAC,OAAOE,CAAC,EAAE;YACV;YACA;YACAhC,OAAO,CAACiC,IAAI,CACV,qDAAqD/C,GAAG,MACtD,OAAO8C,CAAC,KAAK,QAAQ,IAAIA,CAAC,IAAI,IAAI,IAAI,SAAS,IAAIA,CAAC,GAChDA,CAAC,CAACE,OAAO,GACTF,CAAC,EAET,CAAC;UACH;QACF,CAAC,MAAM;UACLH,UAAU,CAACM,SAAS,CAACX,KAAK,CAAC;QAC7B;MACF;IACF,CAAC;IAED,OAAOzC,SAAS,CAACC,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACV,OAAO,EAAE8C,eAAe,EAAE5B,kBAAkB,EAAEjB,QAAQ,EAAEF,GAAG,EAAEU,SAAS,CAAC,CAAC;EAE5E,OAAO;IACLwC;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { LocaleDirContext } from "./LocaleDirContext.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hook to access the text direction specified in the `NavigationContainer`.
|
|
8
|
+
*/
|
|
9
|
+
export function useLocale() {
|
|
10
|
+
const direction = React.useContext(LocaleDirContext);
|
|
11
|
+
if (direction === undefined) {
|
|
12
|
+
throw new Error("Couldn't determine the text direction. Is your component inside NavigationContainer?");
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
direction
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=useLocale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","LocaleDirContext","useLocale","direction","useContext","undefined","Error"],"sourceRoot":"../../src","sources":["useLocale.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,gBAAgB,QAAQ,uBAAoB;;AAErD;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAA,EAAG;EAC1B,MAAMC,SAAS,GAAGH,KAAK,CAACI,UAAU,CAACH,gBAAgB,CAAC;EAEpD,IAAIE,SAAS,KAAKE,SAAS,EAAE;IAC3B,MAAM,IAAIC,KAAK,CACb,sFACF,CAAC;EACH;EAEA,OAAO;IAAEH;EAAU,CAAC;AACtB","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getPathFromState, useStateForPath } from '@amazon-devices/react-navigation__core';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { LinkingContext } from "./LinkingContext.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hook to get the path for the current route based on linking options.
|
|
9
|
+
*
|
|
10
|
+
* @returns Path for the current route.
|
|
11
|
+
*/
|
|
12
|
+
export function useRoutePath() {
|
|
13
|
+
const {
|
|
14
|
+
options
|
|
15
|
+
} = React.useContext(LinkingContext);
|
|
16
|
+
const state = useStateForPath();
|
|
17
|
+
if (state === undefined) {
|
|
18
|
+
throw new Error("Couldn't find a state for the route object. Is your component inside a screen in a navigator?");
|
|
19
|
+
}
|
|
20
|
+
const getPathFromStateHelper = options?.getPathFromState ?? getPathFromState;
|
|
21
|
+
const path = React.useMemo(() => {
|
|
22
|
+
if (options?.enabled === false) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const path = getPathFromStateHelper(state, options?.config);
|
|
26
|
+
return path;
|
|
27
|
+
}, [options?.enabled, options?.config, state, getPathFromStateHelper]);
|
|
28
|
+
return path;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=useRoutePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getPathFromState","useStateForPath","React","LinkingContext","useRoutePath","options","useContext","state","undefined","Error","getPathFromStateHelper","path","useMemo","enabled","config"],"sourceRoot":"../../src","sources":["useRoutePath.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,8BAA8B;AAChF,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,cAAc,QAAQ,qBAAkB;;AAEjD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAA,EAAG;EAC7B,MAAM;IAAEC;EAAQ,CAAC,GAAGH,KAAK,CAACI,UAAU,CAACH,cAAc,CAAC;EACpD,MAAMI,KAAK,GAAGN,eAAe,CAAC,CAAC;EAE/B,IAAIM,KAAK,KAAKC,SAAS,EAAE;IACvB,MAAM,IAAIC,KAAK,CACb,+FACF,CAAC;EACH;EAEA,MAAMC,sBAAsB,GAAGL,OAAO,EAAEL,gBAAgB,IAAIA,gBAAgB;EAE5E,MAAMW,IAAI,GAAGT,KAAK,CAACU,OAAO,CAAC,MAAM;IAC/B,IAAIP,OAAO,EAAEQ,OAAO,KAAK,KAAK,EAAE;MAC9B,OAAOL,SAAS;IAClB;IAEA,MAAMG,IAAI,GAAGD,sBAAsB,CAACH,KAAK,EAAEF,OAAO,EAAES,MAAM,CAAC;IAE3D,OAAOH,IAAI;EACb,CAAC,EAAE,CAACN,OAAO,EAAEQ,OAAO,EAAER,OAAO,EAAES,MAAM,EAAEP,KAAK,EAAEG,sBAAsB,CAAC,CAAC;EAEtE,OAAOC,IAAI;AACb","ignoreList":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NavigationContext, useRoute } from '@amazon-devices/react-navigation__core';
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
function getScrollableNode(ref) {
|
|
4
6
|
if (ref.current == null) {
|
|
@@ -12,7 +14,7 @@ function getScrollableNode(ref) {
|
|
|
12
14
|
// We need to use `getScrollResponder` to get access to the scroll responder
|
|
13
15
|
return ref.current.getScrollResponder();
|
|
14
16
|
} else if ('getNode' in ref.current) {
|
|
15
|
-
// When a `ScrollView` is
|
|
17
|
+
// When a `ScrollView` is wrapped in `Animated.createAnimatedComponent`
|
|
16
18
|
// we need to use `getNode` to get the ref to the actual scrollview.
|
|
17
19
|
// Note that `getNode` is deprecated in newer versions of react-native
|
|
18
20
|
// this is why we check if we already have a scrollable node above.
|
|
@@ -21,13 +23,15 @@ function getScrollableNode(ref) {
|
|
|
21
23
|
return ref.current;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
|
-
export
|
|
25
|
-
const navigation =
|
|
26
|
+
export function useScrollToTop(ref) {
|
|
27
|
+
const navigation = React.useContext(NavigationContext);
|
|
26
28
|
const route = useRoute();
|
|
29
|
+
if (navigation === undefined) {
|
|
30
|
+
throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");
|
|
31
|
+
}
|
|
27
32
|
React.useEffect(() => {
|
|
28
|
-
|
|
33
|
+
const tabNavigations = [];
|
|
29
34
|
let currentNavigation = navigation;
|
|
30
|
-
|
|
31
35
|
// If the screen is nested inside multiple tab navigators, we should scroll to top for any of them
|
|
32
36
|
// So we need to find all the parent tab navigators and add the listeners there
|
|
33
37
|
while (currentNavigation) {
|
|
@@ -43,7 +47,7 @@ export default function useScrollToTop(ref) {
|
|
|
43
47
|
return tab.addListener(
|
|
44
48
|
// We don't wanna import tab types here to avoid extra deps
|
|
45
49
|
// in addition, there are multiple tab implementations
|
|
46
|
-
// @ts-expect-error
|
|
50
|
+
// @ts-expect-error the `tabPress` event is only available when navigation type is tab
|
|
47
51
|
'tabPress', e => {
|
|
48
52
|
// We should scroll to top only when the screen is focused
|
|
49
53
|
const isFocused = navigation.isFocused();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["NavigationContext","useRoute","React","getScrollableNode","ref","current","getScrollResponder","getNode","useScrollToTop","navigation","useContext","route","undefined","Error","useEffect","tabNavigations","currentNavigation","getState","type","push","getParent","length","unsubscribers","map","tab","addListener","e","isFocused","isFirst","includes","routes","key","requestAnimationFrame","scrollable","defaultPrevented","scrollToTop","scrollTo","y","animated","scrollToOffset","offset","scrollResponderScrollTo","forEach","unsubscribe"],"sourceRoot":"../../src","sources":["useScrollToTop.tsx"],"mappings":";;AAAA,SAEEA,iBAAiB,EAGjBC,QAAQ,QACH,8BAA8B;AACrC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAgB9B,SAASC,iBAAiBA,CAACC,GAAuC,EAAE;EAClE,IAAIA,GAAG,CAACC,OAAO,IAAI,IAAI,EAAE;IACvB,OAAO,IAAI;EACb;EAEA,IACE,aAAa,IAAID,GAAG,CAACC,OAAO,IAC5B,UAAU,IAAID,GAAG,CAACC,OAAO,IACzB,gBAAgB,IAAID,GAAG,CAACC,OAAO,IAC/B,yBAAyB,IAAID,GAAG,CAACC,OAAO,EACxC;IACA;IACA,OAAOD,GAAG,CAACC,OAAO;EACpB,CAAC,MAAM,IAAI,oBAAoB,IAAID,GAAG,CAACC,OAAO,EAAE;IAC9C;IACA;IACA,OAAOD,GAAG,CAACC,OAAO,CAACC,kBAAkB,CAAC,CAAC;EACzC,CAAC,MAAM,IAAI,SAAS,IAAIF,GAAG,CAACC,OAAO,EAAE;IACnC;IACA;IACA;IACA;IACA,OAAOD,GAAG,CAACC,OAAO,CAACE,OAAO,CAAC,CAAC;EAC9B,CAAC,MAAM;IACL,OAAOH,GAAG,CAACC,OAAO;EACpB;AACF;AAEA,OAAO,SAASG,cAAcA,CAACJ,GAAuC,EAAE;EACtE,MAAMK,UAAU,GAAGP,KAAK,CAACQ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UAAU,IAAIF,UAAU,EAAE;cACnCA,UAAU,CAACG,QAAQ,CAAC;gBAAEC,CAAC,EAAE,CAAC;gBAAEC,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC/C,CAAC,MAAM,IAAI,gBAAgB,IAAIL,UAAU,EAAE;cACzCA,UAAU,CAACM,cAAc,CAAC;gBAAEC,MAAM,EAAE,CAAC;gBAAEF,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC1D,CAAC,MAAM,IAAI,yBAAyB,IAAIL,UAAU,EAAE;cAClDA,UAAU,CAACQ,uBAAuB,CAAC;gBAAEJ,CAAC,EAAE,CAAC;gBAAEC,QAAQ,EAAE;cAAK,CAAC,CAAC;YAC9D;UACF;QACF,CAAC,CAAC;MACJ,CACF,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,MAAM;MACXhB,aAAa,CAACoB,OAAO,CAAEC,WAAW,IAAKA,WAAW,CAAC,CAAC,CAAC;IACvD,CAAC;EACH,CAAC,EAAE,CAAClC,UAAU,EAAEL,GAAG,EAAEO,KAAK,CAACoB,GAAG,CAAC,CAAC;AAClC","ignoreList":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
export
|
|
4
|
+
export function useThenable(create) {
|
|
3
5
|
const [promise] = React.useState(create);
|
|
4
6
|
let initialState = [false, undefined];
|
|
5
7
|
|
|
6
8
|
// Check if our thenable is synchronous
|
|
9
|
+
// eslint-disable-next-line promise/catch-or-return, promise/always-return
|
|
7
10
|
promise.then(result => {
|
|
8
11
|
initialState = [true, result];
|
|
9
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useThenable","create","promise","useState","initialState","undefined","then","result","state","setState","resolved","useEffect","cancelled","resolve"],"sourceRoot":"../../src","sources":["useThenable.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,
|
|
1
|
+
{"version":3,"names":["React","useThenable","create","promise","useState","initialState","undefined","then","result","state","setState","resolved","useEffect","cancelled","resolve"],"sourceRoot":"../../src","sources":["useThenable.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAO,SAASC,WAAWA,CAAIC,MAA4B,EAAE;EAC3D,MAAM,CAACC,OAAO,CAAC,GAAGH,KAAK,CAACI,QAAQ,CAACF,MAAM,CAAC;EAExC,IAAIG,YAAsC,GAAG,CAAC,KAAK,EAAEC,SAAS,CAAC;;EAE/D;EACA;EACAH,OAAO,CAACI,IAAI,CAAEC,MAAM,IAAK;IACvBH,YAAY,GAAG,CAAC,IAAI,EAAEG,MAAM,CAAC;EAC/B,CAAC,CAAC;EAEF,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGV,KAAK,CAACI,QAAQ,CAACC,YAAY,CAAC;EACtD,MAAM,CAACM,QAAQ,CAAC,GAAGF,KAAK;EAExBT,KAAK,CAACY,SAAS,CAAC,MAAM;IACpB,IAAIC,SAAS,GAAG,KAAK;IAErB,MAAMC,OAAO,GAAG,MAAAA,CAAA,KAAY;MAC1B,IAAIN,MAAM;MAEV,IAAI;QACFA,MAAM,GAAG,MAAML,OAAO;MACxB,CAAC,SAAS;QACR,IAAI,CAACU,SAAS,EAAE;UACdH,QAAQ,CAAC,CAAC,IAAI,EAAEF,MAAM,CAAC,CAAC;QAC1B;MACF;IACF,CAAC;IAED,IAAI,CAACG,QAAQ,EAAE;MACbG,OAAO,CAAC,CAAC;IACX;IAEA,OAAO,MAAM;MACXD,SAAS,GAAG,IAAI;IAClB,CAAC;EACH,CAAC,EAAE,CAACV,OAAO,EAAEQ,QAAQ,CAAC,CAAC;EAEvB,OAAOF,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import type { NavigationAction } from '@amazon-devices/react-navigation__core';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import { GestureResponderEvent, Text, TextProps } from 'react-native';
|
|
4
|
-
import type
|
|
5
|
-
type Props<ParamList extends ReactNavigation.RootParamList> = {
|
|
6
|
-
to: To<ParamList>;
|
|
7
|
-
action?: NavigationAction;
|
|
2
|
+
import { type GestureResponderEvent, Text, type TextProps } from 'react-native';
|
|
3
|
+
import { type LinkProps } from './useLinkProps';
|
|
4
|
+
type Props<ParamList extends ReactNavigation.RootParamList> = LinkProps<ParamList> & Omit<TextProps, 'disabled'> & {
|
|
8
5
|
target?: string;
|
|
9
6
|
onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
|
10
|
-
} & (Omit<TextProps, 'disabled'> & {
|
|
11
7
|
disabled?: boolean | null;
|
|
12
8
|
children: React.ReactNode;
|
|
13
|
-
}
|
|
9
|
+
};
|
|
14
10
|
/**
|
|
15
11
|
* Component to render link to another screen using a path.
|
|
16
12
|
* Uses an anchor tag on the web.
|
|
17
13
|
*
|
|
18
|
-
* @param props.
|
|
14
|
+
* @param props.screen Name of the screen to navigate to (e.g. `'Feeds'`).
|
|
15
|
+
* @param props.params Params to pass to the screen to navigate to (e.g. `{ sort: 'hot' }`).
|
|
16
|
+
* @param props.href Optional absolute path to use for the href (e.g. `/feeds/hot`).
|
|
19
17
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
20
18
|
* @param props.children Child elements to render the content.
|
|
21
19
|
*/
|
|
22
|
-
export
|
|
20
|
+
export declare function Link<ParamList extends ReactNavigation.RootParamList>({ screen, params, action, href, style, ...rest }: Props<ParamList>): React.CElement<TextProps, Text>;
|
|
23
21
|
export {};
|
|
24
22
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/Link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,qBAAqB,EAE1B,IAAI,EACJ,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,gBAAgB,CAAC;AAE9D,KAAK,KAAK,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,IACxD,SAAS,CAAC,SAAS,CAAC,GAClB,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,CACR,CAAC,EACG,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAC/C,qBAAqB,KACtB,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEN;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,EAAE,EACpE,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,SAAS,CAAC,mCA2BlB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ParamListBase } from '@amazon-devices/react-navigation__core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { LinkingOptions } from './types';
|
|
4
|
-
declare const LinkingContext: React.Context<{
|
|
5
|
-
options
|
|
4
|
+
export declare const LinkingContext: React.Context<{
|
|
5
|
+
options?: LinkingOptions<ParamListBase>;
|
|
6
6
|
}>;
|
|
7
|
-
export default LinkingContext;
|
|
8
7
|
//# sourceMappingURL=LinkingContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkingContext.d.ts","sourceRoot":"","sources":["../../../src/LinkingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkingContext.d.ts","sourceRoot":"","sources":["../../../src/LinkingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,eAAO,MAAM,cAAc;cACf,cAAc,CAAC,aAAa,CAAC;EAKvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleDirContext.d.ts","sourceRoot":"","sources":["../../../src/LocaleDirContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,gBAAgB,gCAA8C,CAAC"}
|
|
@@ -1,26 +1,49 @@
|
|
|
1
|
-
import { NavigationContainerProps, NavigationContainerRef } from '@amazon-devices/react-navigation__core';
|
|
1
|
+
import { type NavigationContainerProps, type NavigationContainerRef } from '@amazon-devices/react-navigation__core';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import type { DocumentTitleOptions, LinkingOptions,
|
|
3
|
+
import type { DocumentTitleOptions, LinkingOptions, LocaleDirection } from './types';
|
|
4
4
|
declare global {
|
|
5
5
|
var REACT_NAVIGATION_DEVTOOLS: WeakMap<NavigationContainerRef<any>, {
|
|
6
6
|
readonly linking: LinkingOptions<any>;
|
|
7
7
|
}>;
|
|
8
8
|
}
|
|
9
9
|
type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Initial state object for the navigation tree.
|
|
12
|
+
*
|
|
13
|
+
* If this is provided, deep link or URLs won't be handled on the initial render.
|
|
14
|
+
*/
|
|
15
|
+
initialState?: NavigationContainerProps['initialState'];
|
|
16
|
+
/**
|
|
17
|
+
* Text direction of the components. Defaults to `'ltr'`.
|
|
18
|
+
*/
|
|
19
|
+
direction?: LocaleDirection;
|
|
20
|
+
/**
|
|
21
|
+
* Options for deep linking.
|
|
22
|
+
*
|
|
23
|
+
* Deep link handling is enabled when this prop is provided,
|
|
24
|
+
* unless `linking.enabled` is `false`.
|
|
25
|
+
*/
|
|
11
26
|
linking?: LinkingOptions<ParamList>;
|
|
27
|
+
/**
|
|
28
|
+
* Fallback element to render until initial state is resolved from deep linking.
|
|
29
|
+
*
|
|
30
|
+
* Defaults to `null`.
|
|
31
|
+
*/
|
|
12
32
|
fallback?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Options to configure the document title on Web.
|
|
35
|
+
*
|
|
36
|
+
* Updating document title is handled by default,
|
|
37
|
+
* unless `documentTitle.enabled` is `false`.
|
|
38
|
+
*/
|
|
13
39
|
documentTitle?: DocumentTitleOptions;
|
|
14
|
-
onReady?: () => void;
|
|
15
40
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} & {
|
|
23
|
-
ref?: React.Ref<NavigationContainerRef<RootParamList>> | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Container component that manages the navigation state.
|
|
43
|
+
* This should be rendered at the root wrapping the whole app.
|
|
44
|
+
*/
|
|
45
|
+
export declare const NavigationContainer: <RootParamList extends {} = ReactNavigation.RootParamList>(props: Props<RootParamList> & {
|
|
46
|
+
ref?: React.Ref<NavigationContainerRef<RootParamList>>;
|
|
24
47
|
}) => React.ReactElement;
|
|
25
|
-
export
|
|
48
|
+
export {};
|
|
26
49
|
//# sourceMappingURL=NavigationContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../../../src/NavigationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,wBAAwB,
|
|
1
|
+
{"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../../../src/NavigationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAK5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,eAAe,EAChB,MAAM,SAAS,CAAC;AAOjB,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;;;;OAIG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;IACxD;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAkIF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAE3B,CAAC,aAAa,SAAS,EAAE,GAAG,eAAe,CAAC,aAAa,EAC5D,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG;IAC5B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC;CACxD,KACE,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ServerContextType } from './ServerContext';
|
|
2
|
+
import { type ServerContextType } from './ServerContext';
|
|
3
3
|
import type { ServerContainerRef } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Container component for server rendering.
|
|
@@ -8,8 +8,7 @@ import type { ServerContainerRef } from './types';
|
|
|
8
8
|
* @param props.children Child elements to render the content.
|
|
9
9
|
* @param props.ref Ref object which contains helper methods.
|
|
10
10
|
*/
|
|
11
|
-
declare const
|
|
11
|
+
export declare const ServerContainer: React.ForwardRefExoticComponent<ServerContextType & {
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
} & React.RefAttributes<ServerContainerRef>>;
|
|
14
|
-
export default _default;
|
|
15
14
|
//# sourceMappingURL=ServerContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerContainer.d.ts","sourceRoot":"","sources":["../../../src/ServerContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,
|
|
1
|
+
{"version":3,"file":"ServerContainer.d.ts","sourceRoot":"","sources":["../../../src/ServerContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;cAVhB,KAAK,CAAC,SAAS;4CAiDzB,CAAC"}
|
|
@@ -5,6 +5,5 @@ export type ServerContextType = {
|
|
|
5
5
|
search: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
declare const ServerContext: React.Context<ServerContextType | undefined>;
|
|
9
|
-
export default ServerContext;
|
|
8
|
+
export declare const ServerContext: React.Context<ServerContextType | undefined>;
|
|
10
9
|
//# sourceMappingURL=ServerContext.d.ts.map
|
|
@@ -1 +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,
|
|
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,eAAO,MAAM,aAAa,8CAEzB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const UnhandledLinkingContext: React.Context<{
|
|
3
|
+
lastUnhandledLink: string | undefined;
|
|
4
|
+
setLastUnhandledLink: (lastUnhandledUrl: string | undefined) => void;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=UnhandledLinkingContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnhandledLinkingContext.d.ts","sourceRoot":"","sources":["../../../src/UnhandledLinkingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,uBAAuB;uBACf,MAAM,GAAG,SAAS;0BACf,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;EAQpE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DefaultNavigatorOptions, type NavigationListBase, type ParamListBase, type StackNavigationState, type TypedNavigator } from '@amazon-devices/react-navigation__core';
|
|
2
|
+
declare const StackNavigator: (props: DefaultNavigatorOptions<ParamListBase, string | undefined, StackNavigationState<ParamListBase>, {}, {}, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function createStackNavigator<ParamList extends ParamListBase>(): TypedNavigator<{
|
|
4
|
+
ParamList: ParamList;
|
|
5
|
+
NavigatorID: string | undefined;
|
|
6
|
+
State: StackNavigationState<ParamList>;
|
|
7
|
+
ScreenOptions: {};
|
|
8
|
+
EventMap: {};
|
|
9
|
+
NavigationList: NavigationListBase<ParamList>;
|
|
10
|
+
Navigator: typeof StackNavigator;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=createStackNavigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStackNavigator.d.ts","sourceRoot":"","sources":["../../../../src/__stubs__/createStackNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EAEpB,MAAM,8BAA8B,CAAC;AAEtC,QAAA,MAAM,cAAc,GAClB,OAAO,uBAAuB,CAC5B,aAAa,EACb,MAAM,GAAG,SAAS,EAClB,oBAAoB,CAAC,aAAa,CAAC,EACnC,EAAE,EACF,EAAE,EACF,OAAO,CACR,4CAYF,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,SAAS,SAAS,aAAa,KAC5B,cAAc,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACvC,aAAa,EAAE,EAAE,CAAC;IAClB,QAAQ,EAAE,EAAE,CAAC;IACb,cAAc,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,SAAS,EAAE,OAAO,cAAc,CAAC;CAClC,CAAC,CAED"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const window: {
|
|
1
|
+
export declare const window: {
|
|
2
2
|
document: {
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
|
-
location: URL;
|
|
5
|
+
readonly location: URL;
|
|
6
6
|
history: {
|
|
7
7
|
readonly state: any;
|
|
8
8
|
pushState(state: any, _: string, path: string): void;
|
|
@@ -11,9 +11,8 @@ declare const window: {
|
|
|
11
11
|
back(): void;
|
|
12
12
|
forward(): void;
|
|
13
13
|
};
|
|
14
|
-
addEventListener: (type:
|
|
15
|
-
removeEventListener: (type:
|
|
16
|
-
readonly window: any;
|
|
14
|
+
addEventListener: (type: "popstate", listener: () => void) => void;
|
|
15
|
+
removeEventListener: (type: "popstate", listener: () => void) => void;
|
|
16
|
+
readonly window: /*elided*/ any;
|
|
17
17
|
};
|
|
18
|
-
export default window;
|
|
19
18
|
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../src/__stubs__/window.tsx"],"names":[],"mappings":"AAiEA,eAAO,MAAM,MAAM;;;;;;;yBApDA,GAAG,KAAK,MAAM,QAAQ,MAAM;4BASzB,GAAG,KAAK,MAAM,QAAQ,MAAM;cAO1C,MAAM;;;;6BAwBkB,UAAU,YAAY,MAAM,IAAI;gCAM7B,UAAU,YAAY,MAAM,IAAI;;CAiBlE,CAAC"}
|
|
@@ -1 +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,
|
|
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,wBAAgB,mBAAmB;oBAmBlB,MAAM;eAcR,MAAM;wBAIG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;0BAad;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,eAAe,CAAA;KAAE;6BAmBrC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,eAAe,CAAA;KAAE;UAoC3D,MAAM;qBA0FK,MAAM,IAAI;EAqB9B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type NavigationContainerRef, type ParamListBase, type StaticNavigation } from '@amazon-devices/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' | 'enabled'> & {
|
|
10
|
+
/**
|
|
11
|
+
* Whether deep link handling should be enabled.
|
|
12
|
+
* Defaults to `true` if any `linking` options are specified, `false` otherwise.
|
|
13
|
+
*
|
|
14
|
+
* When 'auto' is specified, all leaf screens will get a autogenerated path.
|
|
15
|
+
* The generated path will be a kebab-case version of the screen name.
|
|
16
|
+
* This can be overridden for specific screens by specifying `linking` for the screen.
|
|
17
|
+
*/
|
|
18
|
+
enabled?: 'auto' | true | false;
|
|
19
|
+
/**
|
|
20
|
+
* Additional configuration
|
|
21
|
+
*/
|
|
22
|
+
config?: Omit<NonNullable<LinkingOptions<ParamListBase>['config']>, 'screens'>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Create a navigation component from a static navigation config.
|
|
27
|
+
* The returned component is a wrapper around `NavigationContainer`.
|
|
28
|
+
*
|
|
29
|
+
* @param tree Static navigation config.
|
|
30
|
+
* @returns Navigation component to use in your app.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createStaticNavigation(tree: StaticNavigation<any, any, any>): React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<NavigationContainerRef<ParamListBase>>>;
|
|
33
|
+
export {};
|
|
34
|
+
//# 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,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,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,GAAG,SAAS,CAAC,GAAG;QACpE;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC;QAChC;;WAEG;QACH,MAAM,CAAC,EAAE,IAAI,CACX,WAAW,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,EACpD,SAAS,CACV,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,oHA8D3E"}
|
|
@@ -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,sBA0BjE"}
|