@react-navigation/native 7.0.0-alpha.1 → 7.0.0-alpha.11
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 +13 -5
- package/lib/commonjs/Link.js.map +1 -1
- package/lib/commonjs/LinkingContext.js +7 -5
- package/lib/commonjs/LinkingContext.js.map +1 -1
- package/lib/commonjs/LocaleDirContext.js +12 -0
- package/lib/commonjs/LocaleDirContext.js.map +1 -0
- package/lib/commonjs/NavigationContainer.js +57 -19
- package/lib/commonjs/NavigationContainer.js.map +1 -1
- package/lib/commonjs/ServerContainer.js +3 -4
- package/lib/commonjs/ServerContainer.js.map +1 -1
- package/lib/commonjs/ServerContext.js +3 -4
- package/lib/commonjs/ServerContext.js.map +1 -1
- package/lib/commonjs/UnhandledLinkingContext.js +20 -0
- package/lib/commonjs/UnhandledLinkingContext.js.map +1 -0
- package/lib/commonjs/__stubs__/createStackNavigator.js +19 -0
- package/lib/commonjs/__stubs__/createStackNavigator.js.map +1 -0
- package/lib/commonjs/__stubs__/window.js +79 -0
- package/lib/commonjs/__stubs__/window.js.map +1 -0
- package/lib/commonjs/createMemoryHistory.js +4 -7
- package/lib/commonjs/createMemoryHistory.js.map +1 -1
- package/lib/commonjs/createStaticNavigation.js +6 -4
- package/lib/commonjs/createStaticNavigation.js.map +1 -1
- package/lib/commonjs/extractPathFromURL.js +3 -3
- package/lib/commonjs/extractPathFromURL.js.map +1 -1
- package/lib/commonjs/index.js +17 -17
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theming/DarkTheme.js +1 -2
- package/lib/commonjs/theming/DarkTheme.js.map +1 -1
- package/lib/commonjs/theming/DefaultTheme.js +1 -2
- package/lib/commonjs/theming/DefaultTheme.js.map +1 -1
- package/lib/commonjs/theming/fonts.js +1 -2
- package/lib/commonjs/theming/fonts.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useBackButton.js +3 -19
- package/lib/commonjs/useBackButton.js.map +1 -1
- package/lib/commonjs/useBackButton.native.js +27 -0
- package/lib/commonjs/useBackButton.native.js.map +1 -0
- package/lib/commonjs/useDocumentTitle.js +5 -5
- package/lib/commonjs/useDocumentTitle.js.map +1 -1
- package/lib/commonjs/useDocumentTitle.native.js.map +1 -1
- package/lib/commonjs/useLinkBuilder.js +80 -0
- package/lib/commonjs/useLinkBuilder.js.map +1 -0
- package/lib/commonjs/useLinkProps.js +20 -23
- package/lib/commonjs/useLinkProps.js.map +1 -1
- package/lib/commonjs/useLinkTo.js +30 -0
- package/lib/commonjs/useLinkTo.js.map +1 -0
- package/lib/commonjs/useLinking.js +34 -35
- package/lib/commonjs/useLinking.js.map +1 -1
- package/lib/commonjs/useLinking.native.js +30 -23
- package/lib/commonjs/useLinking.native.js.map +1 -1
- package/lib/commonjs/useLocale.js +23 -0
- package/lib/commonjs/useLocale.js.map +1 -0
- package/lib/commonjs/useScrollToTop.js +8 -6
- package/lib/commonjs/useScrollToTop.js.map +1 -1
- package/lib/commonjs/useThenable.js +3 -2
- package/lib/commonjs/useThenable.js.map +1 -1
- package/lib/commonjs/useUnhandledLinking.js +75 -0
- package/lib/commonjs/useUnhandledLinking.js.map +1 -0
- package/lib/module/Link.js +11 -3
- package/lib/module/Link.js.map +1 -1
- package/lib/module/LinkingContext.js +4 -1
- package/lib/module/LinkingContext.js.map +1 -1
- package/lib/module/LocaleDirContext.js +4 -0
- package/lib/module/LocaleDirContext.js.map +1 -0
- package/lib/module/NavigationContainer.js +53 -15
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/ServerContainer.js.map +1 -1
- package/lib/module/ServerContext.js.map +1 -1
- package/lib/module/UnhandledLinkingContext.js +12 -0
- package/lib/module/UnhandledLinkingContext.js.map +1 -0
- package/lib/module/__stubs__/createStackNavigator.js +11 -0
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -0
- package/lib/module/__stubs__/window.js +73 -0
- package/lib/module/__stubs__/window.js.map +1 -0
- package/lib/module/createMemoryHistory.js +4 -7
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStaticNavigation.js +4 -2
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/extractPathFromURL.js +3 -3
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/theming/DarkTheme.js.map +1 -1
- package/lib/module/theming/DefaultTheme.js.map +1 -1
- package/lib/module/theming/fonts.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useBackButton.js +3 -17
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useBackButton.native.js +19 -0
- package/lib/module/useBackButton.native.js.map +1 -0
- package/lib/module/useDocumentTitle.js +3 -3
- package/lib/module/useDocumentTitle.js.map +1 -1
- package/lib/module/useDocumentTitle.native.js.map +1 -1
- package/lib/module/{useLinkTools.js → useLinkBuilder.js} +10 -10
- package/lib/module/useLinkBuilder.js.map +1 -0
- package/lib/module/useLinkProps.js +18 -21
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinkTo.js +23 -0
- package/lib/module/useLinkTo.js.map +1 -0
- package/lib/module/useLinking.js +31 -34
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +28 -21
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useLocale.js +16 -0
- package/lib/module/useLocale.js.map +1 -0
- package/lib/module/useScrollToTop.js +7 -5
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/module/useThenable.js +1 -0
- package/lib/module/useThenable.js.map +1 -1
- package/lib/module/useUnhandledLinking.js +69 -0
- package/lib/module/useUnhandledLinking.js.map +1 -0
- package/lib/typescript/src/Link.d.ts +3 -3
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/LinkingContext.d.ts +1 -1
- 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 +4 -4
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContainer.d.ts +1 -1
- package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
- package/lib/typescript/src/UnhandledLinkingContext.d.ts +6 -0
- package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +1 -0
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +32 -0
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/{__mocks__ → __stubs__}/window.d.ts +1 -1
- package/lib/typescript/src/{__mocks__ → __stubs__}/window.d.ts.map +1 -1
- package/lib/typescript/src/createStaticNavigation.d.ts +2 -2
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +37 -18
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +2 -2
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.native.d.ts +4 -0
- package/lib/typescript/src/useBackButton.native.d.ts.map +1 -0
- package/lib/typescript/src/useLinkBuilder.d.ts +25 -0
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -0
- package/lib/typescript/src/useLinkProps.d.ts +2 -2
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinkTo.d.ts +6 -0
- package/lib/typescript/src/useLinkTo.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.d.ts +8 -20
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +4 -20
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useLocale.d.ts +7 -0
- package/lib/typescript/src/useLocale.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
- package/lib/typescript/src/useThenable.d.ts.map +1 -1
- package/lib/typescript/src/useUnhandledLinking.d.ts +7 -0
- package/lib/typescript/src/useUnhandledLinking.d.ts.map +1 -0
- package/package.json +15 -15
- package/src/Link.tsx +11 -2
- package/src/LinkingContext.tsx +8 -2
- package/src/LocaleDirContext.tsx +7 -0
- package/src/NavigationContainer.tsx +80 -24
- package/src/ServerContainer.tsx +1 -1
- package/src/UnhandledLinkingContext.tsx +18 -0
- package/src/{__mocks__ → __stubs__}/window.tsx +7 -5
- package/src/createStaticNavigation.tsx +11 -4
- package/src/extractPathFromURL.tsx +4 -1
- package/src/index.tsx +3 -3
- package/src/types.tsx +40 -18
- package/src/useBackButton.native.tsx +33 -0
- package/src/useBackButton.tsx +3 -25
- package/src/{useLinkTools.tsx → useLinkBuilder.tsx} +8 -8
- package/src/useLinkProps.tsx +20 -19
- package/src/useLinkTo.tsx +30 -0
- package/src/useLinking.native.tsx +26 -20
- package/src/useLinking.tsx +43 -41
- package/src/useLocale.tsx +18 -0
- package/src/useScrollToTop.tsx +13 -7
- package/src/useThenable.tsx +1 -0
- package/src/useUnhandledLinking.tsx +91 -0
- package/lib/commonjs/theming/ThemeContext.js +0 -14
- 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 -15
- package/lib/commonjs/theming/useTheme.js.map +0 -1
- package/lib/commonjs/useLinkTools.js +0 -80
- package/lib/commonjs/useLinkTools.js.map +0 -1
- package/lib/module/theming/ThemeContext.js +0 -5
- package/lib/module/theming/ThemeContext.js.map +0 -1
- package/lib/module/theming/ThemeProvider.js +0 -12
- package/lib/module/theming/ThemeProvider.js.map +0 -1
- package/lib/module/theming/useTheme.js +0 -7
- package/lib/module/theming/useTheme.js.map +0 -1
- package/lib/module/useLinkTools.js.map +0 -1
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts +0 -56
- package/lib/typescript/src/__mocks__/createStackNavigator.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeContext.d.ts +0 -4
- package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/ThemeProvider.d.ts +0 -9
- package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/theming/useTheme.d.ts +0 -2
- package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
- package/lib/typescript/src/useLinkTools.d.ts +0 -33
- package/lib/typescript/src/useLinkTools.d.ts.map +0 -1
- package/src/theming/ThemeContext.tsx +0 -8
- package/src/theming/ThemeProvider.tsx +0 -15
- package/src/theming/useTheme.tsx +0 -9
- /package/src/{__mocks__ → __stubs__}/createStackNavigator.tsx +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ThemeProvider = ThemeProvider;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _ThemeContext = require("./ThemeContext");
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
function ThemeProvider(_ref) {
|
|
12
|
-
let {
|
|
13
|
-
value,
|
|
14
|
-
children
|
|
15
|
-
} = _ref;
|
|
16
|
-
return /*#__PURE__*/React.createElement(_ThemeContext.ThemeContext.Provider, {
|
|
17
|
-
value: value
|
|
18
|
-
}, children);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ThemeProvider","value","children"],"sourceRoot":"../../../src","sources":["theming/ThemeProvider.tsx"],"mappings":";;;;;;AAAA;AAGA;AAA8C;AAAA;AAOvC,SAASA,aAAa,OAA6B;EAAA,IAA5B;IAAEC,KAAK;IAAEC;EAAgB,CAAC;EACtD,oBACE,oBAAC,0BAAY,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAM,GAAEC,QAAQ,CAAyB;AAE3E"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useTheme = useTheme;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _ThemeContext = require("./ThemeContext");
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
function useTheme() {
|
|
12
|
-
const theme = React.useContext(_ThemeContext.ThemeContext);
|
|
13
|
-
return theme;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=useTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useTheme","theme","React","useContext","ThemeContext"],"sourceRoot":"../../../src","sources":["theming/useTheme.tsx"],"mappings":";;;;;;AAAA;AAEA;AAA8C;AAAA;AAEvC,SAASA,QAAQ,GAAG;EACzB,MAAMC,KAAK,GAAGC,KAAK,CAACC,UAAU,CAACC,0BAAY,CAAC;EAE5C,OAAOH,KAAK;AACd"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useLinkTools = useLinkTools;
|
|
7
|
-
var _core = require("@react-navigation/core");
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _LinkingContext = require("./LinkingContext");
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
const getRootStateForNavigate = (navigation, state) => {
|
|
13
|
-
const parent = navigation.getParent();
|
|
14
|
-
if (parent) {
|
|
15
|
-
const parentState = parent.getState();
|
|
16
|
-
return getRootStateForNavigate(parent, {
|
|
17
|
-
index: 0,
|
|
18
|
-
routes: [{
|
|
19
|
-
...parentState.routes[parentState.index],
|
|
20
|
-
state: state
|
|
21
|
-
}]
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return state;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Build destination link for a navigate action.
|
|
29
|
-
* Useful for showing anchor tags on the web for buttons that perform navigation.
|
|
30
|
-
*/
|
|
31
|
-
function useLinkTools() {
|
|
32
|
-
const navigation = React.useContext(_core.NavigationHelpersContext);
|
|
33
|
-
const linking = React.useContext(_LinkingContext.LinkingContext);
|
|
34
|
-
const buildHref = React.useCallback((name, params) => {
|
|
35
|
-
const {
|
|
36
|
-
options
|
|
37
|
-
} = linking;
|
|
38
|
-
if ((options === null || options === void 0 ? void 0 : options.enabled) === false) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
const state = navigation ? getRootStateForNavigate(navigation, {
|
|
42
|
-
index: 0,
|
|
43
|
-
routes: [{
|
|
44
|
-
name,
|
|
45
|
-
params
|
|
46
|
-
}]
|
|
47
|
-
}) :
|
|
48
|
-
// If we couldn't find a navigation object in context, we're at root
|
|
49
|
-
// So we'll construct a basic state object to use
|
|
50
|
-
{
|
|
51
|
-
index: 0,
|
|
52
|
-
routes: [{
|
|
53
|
-
name,
|
|
54
|
-
params
|
|
55
|
-
}]
|
|
56
|
-
};
|
|
57
|
-
const path = options !== null && options !== void 0 && options.getPathFromState ? options.getPathFromState(state, options === null || options === void 0 ? void 0 : options.config) : (0, _core.getPathFromState)(state, options === null || options === void 0 ? void 0 : options.config);
|
|
58
|
-
return path;
|
|
59
|
-
}, [linking, navigation]);
|
|
60
|
-
const buildAction = React.useCallback(href => {
|
|
61
|
-
if (!href.startsWith('/')) {
|
|
62
|
-
throw new Error(`The path must start with '/' (${href}).`);
|
|
63
|
-
}
|
|
64
|
-
const {
|
|
65
|
-
options
|
|
66
|
-
} = linking;
|
|
67
|
-
const state = options !== null && options !== void 0 && options.getStateFromPath ? options.getStateFromPath(href, options.config) : (0, _core.getStateFromPath)(href, options === null || options === void 0 ? void 0 : options.config);
|
|
68
|
-
if (state) {
|
|
69
|
-
const action = (0, _core.getActionFromState)(state, options === null || options === void 0 ? void 0 : options.config);
|
|
70
|
-
return action ?? _core.CommonActions.reset(state);
|
|
71
|
-
} else {
|
|
72
|
-
throw new Error('Failed to parse the path to a navigation state.');
|
|
73
|
-
}
|
|
74
|
-
}, [linking]);
|
|
75
|
-
return {
|
|
76
|
-
buildHref,
|
|
77
|
-
buildAction
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=useLinkTools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getRootStateForNavigate","navigation","state","parent","getParent","parentState","getState","index","routes","useLinkTools","React","useContext","NavigationHelpersContext","linking","LinkingContext","buildHref","useCallback","name","params","options","enabled","undefined","path","getPathFromState","config","buildAction","href","startsWith","Error","getStateFromPath","action","getActionFromState","CommonActions","reset"],"sourceRoot":"../../src","sources":["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EI,gBAAgB,GAClCJ,OAAO,CAACI,gBAAgB,CAACrB,KAAK,EAAEiB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,MAAM,CAAC,GAChD,IAAAD,sBAAgB,EAACrB,KAAK,EAAEiB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,MAAM,CAAC;IAE5C,OAAOF,IAAI;EACb,CAAC,EACD,CAACT,OAAO,EAAEZ,UAAU,CAAC,CACtB;EAED,MAAMwB,WAAW,GAAGf,KAAK,CAACM,WAAW,CAClCU,IAAY,IAAK;IAChB,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,EAAE;MACzB,MAAM,IAAIC,KAAK,CAAE,iCAAgCF,IAAK,IAAG,CAAC;IAC5D;IAEA,MAAM;MAAEP;IAAQ,CAAC,GAAGN,OAAO;IAE3B,MAAMX,KAAK,GAAGiB,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEU,gBAAgB,GACnCV,OAAO,CAACU,gBAAgB,CAACH,IAAI,EAAEP,OAAO,CAACK,MAAM,CAAC,GAC9C,IAAAK,sBAAgB,EAACH,IAAI,EAAEP,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,MAAM,CAAC;IAE3C,IAAItB,KAAK,EAAE;MACT,MAAM4B,MAAM,GAAG,IAAAC,wBAAkB,EAAC7B,KAAK,EAAEiB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,MAAM,CAAC;MAEzD,OAAOM,MAAM,IAAIE,mBAAa,CAACC,KAAK,CAAC/B,KAAK,CAAC;IAC7C,CAAC,MAAM;MACL,MAAM,IAAI0B,KAAK,CAAC,iDAAiD,CAAC;IACpE;EACF,CAAC,EACD,CAACf,OAAO,CAAC,CACV;EAED,OAAO;IACLE,SAAS;IACTU;EACF,CAAC;AACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","DefaultTheme","ThemeContext","createContext","displayName"],"sourceRoot":"../../../src","sources":["theming/ThemeContext.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,OAAO,MAAMC,YAAY,gBAAGF,KAAK,CAACG,aAAa,CAAQF,YAAY,CAAC;AAEpEC,YAAY,CAACE,WAAW,GAAG,cAAc"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ThemeContext } from './ThemeContext';
|
|
3
|
-
export function ThemeProvider(_ref) {
|
|
4
|
-
let {
|
|
5
|
-
value,
|
|
6
|
-
children
|
|
7
|
-
} = _ref;
|
|
8
|
-
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
9
|
-
value: value
|
|
10
|
-
}, children);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","ThemeContext","ThemeProvider","value","children"],"sourceRoot":"../../../src","sources":["theming/ThemeProvider.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,YAAY,QAAQ,gBAAgB;AAO7C,OAAO,SAASC,aAAa,OAA6B;EAAA,IAA5B;IAAEC,KAAK;IAAEC;EAAgB,CAAC;EACtD,oBACE,oBAAC,YAAY,CAAC,QAAQ;IAAC,KAAK,EAAED;EAAM,GAAEC,QAAQ,CAAyB;AAE3E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","ThemeContext","useTheme","theme","useContext"],"sourceRoot":"../../../src","sources":["theming/useTheme.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,OAAO,SAASC,QAAQ,GAAG;EACzB,MAAMC,KAAK,GAAGH,KAAK,CAACI,UAAU,CAACH,YAAY,CAAC;EAE5C,OAAOE,KAAK;AACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CommonActions","getActionFromState","getPathFromState","getStateFromPath","NavigationHelpersContext","React","LinkingContext","getRootStateForNavigate","navigation","state","parent","getParent","parentState","getState","index","routes","useLinkTools","useContext","linking","buildHref","useCallback","name","params","options","enabled","undefined","path","config","buildAction","href","startsWith","Error","action","reset"],"sourceRoot":"../../src","sources":["useLinkTools.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,kBAAkB,EAClBC,gBAAgB,EAChBC,gBAAgB,EAEhBC,wBAAwB,QAGnB,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,cAAc,QAAQ,kBAAkB;AAWjD,MAAMC,uBAAuB,GAAG,CAC9BC,UAA4B,EAC5BC,KAAmB,KACF;EACjB,MAAMC,MAAM,GAAGF,UAAU,CAACG,SAAS,EAAE;EAErC,IAAID,MAAM,EAAE;IACV,MAAME,WAAW,GAAGF,MAAM,CAACG,QAAQ,EAAE;IAErC,OAAON,uBAAuB,CAACG,MAAM,EAAE;MACrCI,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CACN;QACE,GAAGH,WAAW,CAACG,MAAM,CAACH,WAAW,CAACE,KAAK,CAAC;QACxCL,KAAK,EAAEA;MACT,CAAC;IAEL,CAAC,CAAC;EACJ;EAEA,OAAOA,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASO,YAAY,GAAG;EAC7B,MAAMR,UAAU,GAAGH,KAAK,CAACY,UAAU,CAACb,wBAAwB,CAAC;EAC7D,MAAMc,OAAO,GAAGb,KAAK,CAACY,UAAU,CAACX,cAAc,CAAC;EAEhD,MAAMa,SAAS,GAAGd,KAAK,CAACe,WAAW,CACjC,CAACC,IAAY,EAAEC,MAAe,KAAK;IACjC,MAAM;MAAEC;IAAQ,CAAC,GAAGL,OAAO;IAE3B,IAAI,CAAAK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,OAAO,MAAK,KAAK,EAAE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APA,OAAO,CAAEI,MAAM,CAAC;MAEzD,OAAOK,MAAM,IAAIhC,aAAa,CAACiC,KAAK,CAACxB,KAAK,CAAC;IAC7C,CAAC,MAAM;MACL,MAAM,IAAIsB,KAAK,CAAC,iDAAiD,CAAC;IACpE;EACF,CAAC,EACD,CAACb,OAAO,CAAC,CACV;EAED,OAAO;IACLC,SAAS;IACTS;EACF,CAAC;AACH"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const createStackNavigator: {
|
|
3
|
-
<ParamList extends import("@react-navigation/core").ParamListBase>(): import("@react-navigation/core").TypedNavigator<ParamList, Readonly<{
|
|
4
|
-
key: string;
|
|
5
|
-
index: number;
|
|
6
|
-
routeNames: string[];
|
|
7
|
-
history?: unknown[] | undefined;
|
|
8
|
-
routes: (Readonly<{
|
|
9
|
-
key: string;
|
|
10
|
-
name: string;
|
|
11
|
-
path?: string | undefined;
|
|
12
|
-
}> & Readonly<{
|
|
13
|
-
params?: Readonly<object | undefined>;
|
|
14
|
-
}> & {
|
|
15
|
-
state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
|
|
16
|
-
})[];
|
|
17
|
-
type: string;
|
|
18
|
-
stale: false;
|
|
19
|
-
}>, {}, import("@react-navigation/core").EventMapBase, (props: any) => JSX.Element>;
|
|
20
|
-
<ParamList_1 extends import("@react-navigation/core").ParamListBase, Config extends import("packages/core/lib/typescript/src/StaticNavigation").StaticConfig<ParamList_1, Readonly<{
|
|
21
|
-
key: string;
|
|
22
|
-
index: number;
|
|
23
|
-
routeNames: string[];
|
|
24
|
-
history?: unknown[] | undefined;
|
|
25
|
-
routes: (Readonly<{
|
|
26
|
-
key: string;
|
|
27
|
-
name: string;
|
|
28
|
-
path?: string | undefined;
|
|
29
|
-
}> & Readonly<{
|
|
30
|
-
params?: Readonly<object | undefined>;
|
|
31
|
-
}> & {
|
|
32
|
-
state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
|
|
33
|
-
})[];
|
|
34
|
-
type: string;
|
|
35
|
-
stale: false;
|
|
36
|
-
}>, {}, import("@react-navigation/core").EventMapBase, (props: any) => JSX.Element>>(config: Config): import("@react-navigation/core").TypedNavigator<ParamList_1, Readonly<{
|
|
37
|
-
key: string;
|
|
38
|
-
index: number;
|
|
39
|
-
routeNames: string[];
|
|
40
|
-
history?: unknown[] | undefined;
|
|
41
|
-
routes: (Readonly<{
|
|
42
|
-
key: string;
|
|
43
|
-
name: string;
|
|
44
|
-
path?: string | undefined;
|
|
45
|
-
}> & Readonly<{
|
|
46
|
-
params?: Readonly<object | undefined>;
|
|
47
|
-
}> & {
|
|
48
|
-
state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
|
|
49
|
-
})[];
|
|
50
|
-
type: string;
|
|
51
|
-
stale: false;
|
|
52
|
-
}>, {}, import("@react-navigation/core").EventMapBase, (props: any) => JSX.Element> & {
|
|
53
|
-
config: Config;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=createStackNavigator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createStackNavigator.d.ts","sourceRoot":"","sources":["../../../../src/__mocks__/createStackNavigator.tsx"],"names":[],"mappings":";AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 declare function ThemeProvider({ value, children }: Props): JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/useTheme.tsx"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,uBAIvB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CommonActions } from '@react-navigation/core';
|
|
2
|
-
/**
|
|
3
|
-
* Build destination link for a navigate action.
|
|
4
|
-
* Useful for showing anchor tags on the web for buttons that perform navigation.
|
|
5
|
-
*/
|
|
6
|
-
export 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkTools.d.ts","sourceRoot":"","sources":["../../../src/useLinkTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAQd,MAAM,wBAAwB,CAAC;AAqChC;;;GAGG;AACH,wBAAgB,YAAY;sBAKjB,MAAM,WAAW,MAAM;wBA6BvB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;EA0BhB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import type { Theme } from '../types';
|
|
4
|
-
import { ThemeContext } from './ThemeContext';
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
value: Theme;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function ThemeProvider({ value, children }: Props) {
|
|
12
|
-
return (
|
|
13
|
-
<ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>
|
|
14
|
-
);
|
|
15
|
-
}
|
package/src/theming/useTheme.tsx
DELETED
|
File without changes
|