@react-navigation/native 7.1.5 → 7.1.6
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/package.json +5 -3
- package/lib/commonjs/Link.js +0 -68
- package/lib/commonjs/Link.js.map +0 -1
- package/lib/commonjs/LinkingContext.js +0 -17
- package/lib/commonjs/LinkingContext.js.map +0 -1
- package/lib/commonjs/LocaleDirContext.js +0 -12
- package/lib/commonjs/LocaleDirContext.js.map +0 -1
- package/lib/commonjs/NavigationContainer.js +0 -143
- package/lib/commonjs/NavigationContainer.js.map +0 -1
- package/lib/commonjs/ServerContainer.js +0 -62
- package/lib/commonjs/ServerContainer.js.map +0 -1
- package/lib/commonjs/ServerContext.js +0 -11
- package/lib/commonjs/ServerContext.js.map +0 -1
- package/lib/commonjs/UnhandledLinkingContext.js +0 -20
- package/lib/commonjs/UnhandledLinkingContext.js.map +0 -1
- package/lib/commonjs/__stubs__/createStackNavigator.js +0 -22
- package/lib/commonjs/__stubs__/createStackNavigator.js.map +0 -1
- package/lib/commonjs/__stubs__/window.js +0 -79
- package/lib/commonjs/__stubs__/window.js.map +0 -1
- package/lib/commonjs/createMemoryHistory.js +0 -219
- package/lib/commonjs/createMemoryHistory.js.map +0 -1
- package/lib/commonjs/createStaticNavigation.js +0 -60
- package/lib/commonjs/createStaticNavigation.js.map +0 -1
- package/lib/commonjs/extractPathFromURL.js +0 -24
- package/lib/commonjs/extractPathFromURL.js.map +0 -1
- package/lib/commonjs/index.js +0 -144
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/theming/DarkTheme.js +0 -20
- package/lib/commonjs/theming/DarkTheme.js.map +0 -1
- package/lib/commonjs/theming/DefaultTheme.js +0 -20
- package/lib/commonjs/theming/DefaultTheme.js.map +0 -1
- package/lib/commonjs/theming/fonts.js +0 -65
- package/lib/commonjs/theming/fonts.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 -91
- package/lib/commonjs/useLinkBuilder.js.map +0 -1
- package/lib/commonjs/useLinkProps.js +0 -99
- package/lib/commonjs/useLinkProps.js.map +0 -1
- package/lib/commonjs/useLinkTo.js +0 -31
- package/lib/commonjs/useLinkTo.js.map +0 -1
- package/lib/commonjs/useLinking.js +0 -329
- package/lib/commonjs/useLinking.js.map +0 -1
- package/lib/commonjs/useLinking.native.js +0 -158
- package/lib/commonjs/useLinking.native.js.map +0 -1
- package/lib/commonjs/useLocale.js +0 -23
- package/lib/commonjs/useLocale.js.map +0 -1
- package/lib/commonjs/useRoutePath.js +0 -35
- package/lib/commonjs/useRoutePath.js.map +0 -1
- package/lib/commonjs/useScrollToTop.js +0 -97
- package/lib/commonjs/useScrollToTop.js.map +0 -1
- package/lib/commonjs/useThenable.js +0 -42
- package/lib/commonjs/useThenable.js.map +0 -1
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createMemoryHistory = createMemoryHistory;
|
|
7
|
-
var _nonSecure = require("nanoid/non-secure");
|
|
8
|
-
function createMemoryHistory() {
|
|
9
|
-
let index = 0;
|
|
10
|
-
let items = [];
|
|
11
|
-
|
|
12
|
-
// Pending callbacks for `history.go(n)`
|
|
13
|
-
// We might modify the callback stored if it was interrupted, so we have a ref to identify it
|
|
14
|
-
const pending = [];
|
|
15
|
-
const interrupt = () => {
|
|
16
|
-
// If another history operation was performed we need to interrupt existing ones
|
|
17
|
-
// This makes sure that calls such as `history.replace` after `history.go` don't happen
|
|
18
|
-
// Since otherwise it won't be correct if something else has changed
|
|
19
|
-
pending.forEach(it => {
|
|
20
|
-
const cb = it.cb;
|
|
21
|
-
it.cb = () => cb(true);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
const history = {
|
|
25
|
-
get index() {
|
|
26
|
-
// We store an id in the state instead of an index
|
|
27
|
-
// Index could get out of sync with in-memory values if page reloads
|
|
28
|
-
const id = window.history.state?.id;
|
|
29
|
-
if (id) {
|
|
30
|
-
const index = items.findIndex(item => item.id === id);
|
|
31
|
-
return index > -1 ? index : 0;
|
|
32
|
-
}
|
|
33
|
-
return 0;
|
|
34
|
-
},
|
|
35
|
-
get(index) {
|
|
36
|
-
return items[index];
|
|
37
|
-
},
|
|
38
|
-
backIndex({
|
|
39
|
-
path
|
|
40
|
-
}) {
|
|
41
|
-
// We need to find the index from the element before current to get closest path to go back to
|
|
42
|
-
for (let i = index - 1; i >= 0; i--) {
|
|
43
|
-
const item = items[i];
|
|
44
|
-
if (item.path === path) {
|
|
45
|
-
return i;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return -1;
|
|
49
|
-
},
|
|
50
|
-
push({
|
|
51
|
-
path,
|
|
52
|
-
state
|
|
53
|
-
}) {
|
|
54
|
-
interrupt();
|
|
55
|
-
const id = (0, _nonSecure.nanoid)();
|
|
56
|
-
|
|
57
|
-
// When a new entry is pushed, all the existing entries after index will be inaccessible
|
|
58
|
-
// So we remove any existing entries after the current index to clean them up
|
|
59
|
-
items = items.slice(0, index + 1);
|
|
60
|
-
items.push({
|
|
61
|
-
path,
|
|
62
|
-
state,
|
|
63
|
-
id
|
|
64
|
-
});
|
|
65
|
-
index = items.length - 1;
|
|
66
|
-
|
|
67
|
-
// We pass empty string for title because it's ignored in all browsers except safari
|
|
68
|
-
// We don't store state object in history.state because:
|
|
69
|
-
// - browsers have limits on how big it can be, and we don't control the size
|
|
70
|
-
// - while not recommended, there could be non-serializable data in state
|
|
71
|
-
window.history.pushState({
|
|
72
|
-
id
|
|
73
|
-
}, '', path);
|
|
74
|
-
},
|
|
75
|
-
replace({
|
|
76
|
-
path,
|
|
77
|
-
state
|
|
78
|
-
}) {
|
|
79
|
-
interrupt();
|
|
80
|
-
const id = window.history.state?.id ?? (0, _nonSecure.nanoid)();
|
|
81
|
-
|
|
82
|
-
// Need to keep the hash part of the path if there was no previous history entry
|
|
83
|
-
// or the previous history entry had the same path
|
|
84
|
-
let pathWithHash = path;
|
|
85
|
-
const hash = pathWithHash.includes('#') ? '' : location.hash;
|
|
86
|
-
if (!items.length || items.findIndex(item => item.id === id) < 0) {
|
|
87
|
-
// There are two scenarios for creating an array with only one history record:
|
|
88
|
-
// - When loaded id not found in the items array, this function by default will replace
|
|
89
|
-
// the first item. We need to keep only the new updated object, otherwise it will break
|
|
90
|
-
// the page when navigating forward in history.
|
|
91
|
-
// - This is the first time any state modifications are done
|
|
92
|
-
// So we need to push the entry as there's nothing to replace
|
|
93
|
-
|
|
94
|
-
pathWithHash = pathWithHash + hash;
|
|
95
|
-
items = [{
|
|
96
|
-
path: pathWithHash,
|
|
97
|
-
state,
|
|
98
|
-
id
|
|
99
|
-
}];
|
|
100
|
-
index = 0;
|
|
101
|
-
} else {
|
|
102
|
-
if (items[index].path === path) {
|
|
103
|
-
pathWithHash = pathWithHash + hash;
|
|
104
|
-
}
|
|
105
|
-
items[index] = {
|
|
106
|
-
path,
|
|
107
|
-
state,
|
|
108
|
-
id
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
window.history.replaceState({
|
|
112
|
-
id
|
|
113
|
-
}, '', pathWithHash);
|
|
114
|
-
},
|
|
115
|
-
// `history.go(n)` is asynchronous, there are couple of things to keep in mind:
|
|
116
|
-
// - it won't do anything if we can't go `n` steps, the `popstate` event won't fire.
|
|
117
|
-
// - each `history.go(n)` call will trigger a separate `popstate` event with correct location.
|
|
118
|
-
// - the `popstate` event fires before the next frame after calling `history.go(n)`.
|
|
119
|
-
// This method differs from `history.go(n)` in the sense that it'll go back as many steps it can.
|
|
120
|
-
go(n) {
|
|
121
|
-
interrupt();
|
|
122
|
-
|
|
123
|
-
// To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory
|
|
124
|
-
// history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app.
|
|
125
|
-
const nextIndex = index + n;
|
|
126
|
-
const lastItemIndex = items.length - 1;
|
|
127
|
-
if (n < 0 && !items[nextIndex]) {
|
|
128
|
-
// Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item.
|
|
129
|
-
n = -index;
|
|
130
|
-
index = 0;
|
|
131
|
-
} else if (n > 0 && nextIndex > lastItemIndex) {
|
|
132
|
-
// Attempted to navigate past the last index. Calculate how many indices away from the last index and go there.
|
|
133
|
-
n = lastItemIndex - index;
|
|
134
|
-
index = lastItemIndex;
|
|
135
|
-
} else {
|
|
136
|
-
index = nextIndex;
|
|
137
|
-
}
|
|
138
|
-
if (n === 0) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// When we call `history.go`, `popstate` will fire when there's history to go back to
|
|
143
|
-
// So we need to somehow handle following cases:
|
|
144
|
-
// - There's history to go back, `history.go` is called, and `popstate` fires
|
|
145
|
-
// - `history.go` is called multiple times, we need to resolve on respective `popstate`
|
|
146
|
-
// - No history to go back, but `history.go` was called, browser has no API to detect it
|
|
147
|
-
return new Promise((resolve, reject) => {
|
|
148
|
-
const done = interrupted => {
|
|
149
|
-
clearTimeout(timer);
|
|
150
|
-
if (interrupted) {
|
|
151
|
-
reject(new Error('History was changed during navigation.'));
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// There seems to be a bug in Chrome regarding updating the title
|
|
156
|
-
// If we set a title just before calling `history.go`, the title gets lost
|
|
157
|
-
// However the value of `document.title` is still what we set it to
|
|
158
|
-
// It's just not displayed in the tab bar
|
|
159
|
-
// To update the tab bar, we need to reset the title to something else first (e.g. '')
|
|
160
|
-
// And set the title to what it was before so it gets applied
|
|
161
|
-
// It won't work without setting it to empty string coz otherwise title isn't changing
|
|
162
|
-
// Which means that the browser won't do anything after setting the title
|
|
163
|
-
const {
|
|
164
|
-
title
|
|
165
|
-
} = window.document;
|
|
166
|
-
window.document.title = '';
|
|
167
|
-
window.document.title = title;
|
|
168
|
-
resolve();
|
|
169
|
-
};
|
|
170
|
-
pending.push({
|
|
171
|
-
ref: done,
|
|
172
|
-
cb: done
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// If navigation didn't happen within 100ms, assume that it won't happen
|
|
176
|
-
// This may not be accurate, but hopefully it won't take so much time
|
|
177
|
-
// In Chrome, navigation seems to happen instantly in next microtask
|
|
178
|
-
// But on Firefox, it seems to take much longer, around 50ms from our testing
|
|
179
|
-
// We're using a hacky timeout since there doesn't seem to be way to know for sure
|
|
180
|
-
const timer = setTimeout(() => {
|
|
181
|
-
const index = pending.findIndex(it => it.ref === done);
|
|
182
|
-
if (index > -1) {
|
|
183
|
-
pending[index].cb();
|
|
184
|
-
pending.splice(index, 1);
|
|
185
|
-
}
|
|
186
|
-
}, 100);
|
|
187
|
-
const onPopState = () => {
|
|
188
|
-
const id = window.history.state?.id;
|
|
189
|
-
const currentIndex = items.findIndex(item => item.id === id);
|
|
190
|
-
|
|
191
|
-
// Fix createMemoryHistory.index variable's value
|
|
192
|
-
// as it may go out of sync when navigating in the browser.
|
|
193
|
-
index = Math.max(currentIndex, 0);
|
|
194
|
-
const last = pending.pop();
|
|
195
|
-
window.removeEventListener('popstate', onPopState);
|
|
196
|
-
last?.cb();
|
|
197
|
-
};
|
|
198
|
-
window.addEventListener('popstate', onPopState);
|
|
199
|
-
window.history.go(n);
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
// The `popstate` event is triggered when history changes, except `pushState` and `replaceState`
|
|
203
|
-
// If we call `history.go(n)` ourselves, we don't want it to trigger the listener
|
|
204
|
-
// Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener
|
|
205
|
-
listen(listener) {
|
|
206
|
-
const onPopState = () => {
|
|
207
|
-
if (pending.length) {
|
|
208
|
-
// This was triggered by `history.go(n)`, we shouldn't call the listener
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
listener();
|
|
212
|
-
};
|
|
213
|
-
window.addEventListener('popstate', onPopState);
|
|
214
|
-
return () => window.removeEventListener('popstate', onPopState);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
return history;
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=createMemoryHistory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_nonSecure","require","createMemoryHistory","index","items","pending","interrupt","forEach","it","cb","history","id","window","state","findIndex","item","get","backIndex","path","i","push","nanoid","slice","length","pushState","replace","pathWithHash","hash","includes","location","replaceState","go","n","nextIndex","lastItemIndex","Promise","resolve","reject","done","interrupted","clearTimeout","timer","Error","title","document","ref","setTimeout","splice","onPopState","currentIndex","Math","max","last","pop","removeEventListener","addEventListener","listen","listener"],"sourceRoot":"../../src","sources":["createMemoryHistory.tsx"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAWO,SAASC,mBAAmBA,CAAA,EAAG;EACpC,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,KAAsB,GAAG,EAAE;;EAE/B;EACA;EACA,MAAMC,OAAgE,GAAG,EAAE;EAE3E,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtB;IACA;IACA;IACAD,OAAO,CAACE,OAAO,CAAEC,EAAE,IAAK;MACtB,MAAMC,EAAE,GAAGD,EAAE,CAACC,EAAE;MAChBD,EAAE,CAACC,EAAE,GAAG,MAAMA,EAAE,CAAC,IAAI,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC;EAED,MAAMC,OAAO,GAAG;IACd,IAAIP,KAAKA,CAAA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ation = createStaticNavigation;
|
|
7
|
-
var _core = require("@react-navigation/core");
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _NavigationContainer = require("./NavigationContainer.js");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
/**
|
|
14
|
-
* Create a navigation component from a static navigation config.
|
|
15
|
-
* The returned component is a wrapper around `NavigationContainer`.
|
|
16
|
-
*
|
|
17
|
-
* @param tree Static navigation config.
|
|
18
|
-
* @returns Navigation component to use in your app.
|
|
19
|
-
*/
|
|
20
|
-
function createStaticNavigation(tree) {
|
|
21
|
-
const Component = (0, _core.createComponentForStaticNavigation)(tree, 'RootNavigator');
|
|
22
|
-
function Navigation({
|
|
23
|
-
linking,
|
|
24
|
-
...rest
|
|
25
|
-
}, ref) {
|
|
26
|
-
const linkingConfig = React.useMemo(() => {
|
|
27
|
-
const screens = (0, _core.createPathConfigForStaticNavigation)(tree, {
|
|
28
|
-
initialRouteName: linking?.config?.initialRouteName
|
|
29
|
-
}, linking?.enabled === 'auto');
|
|
30
|
-
if (!screens) return;
|
|
31
|
-
return {
|
|
32
|
-
path: linking?.config?.path,
|
|
33
|
-
initialRouteName: linking?.config?.initialRouteName,
|
|
34
|
-
screens
|
|
35
|
-
};
|
|
36
|
-
}, [linking?.enabled, linking?.config?.path, linking?.config?.initialRouteName]);
|
|
37
|
-
const memoizedLinking = React.useMemo(() => {
|
|
38
|
-
if (!linking) {
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
const enabled = typeof linking.enabled === 'boolean' ? linking.enabled : linkingConfig?.screens != null;
|
|
42
|
-
return {
|
|
43
|
-
...linking,
|
|
44
|
-
enabled,
|
|
45
|
-
config: linkingConfig
|
|
46
|
-
};
|
|
47
|
-
}, [linking, linkingConfig]);
|
|
48
|
-
if (linking?.enabled === true && linkingConfig?.screens == null) {
|
|
49
|
-
throw new Error('Linking is enabled but no linking configuration was found for the screens.\n\n' + 'To solve this:\n' + "- Specify a 'linking' property for the screens you want to link to.\n" + "- Or set 'linking.enabled' to 'auto' to generate paths automatically.\n\n" + 'See usage guide: https://reactnavigation.org/docs/static-configuration#linking');
|
|
50
|
-
}
|
|
51
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationContainer.NavigationContainer, {
|
|
52
|
-
...rest,
|
|
53
|
-
ref: ref,
|
|
54
|
-
linking: memoizedLinking,
|
|
55
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.forwardRef(Navigation);
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=createStaticNavigation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","React","_interopRequireWildcard","_NavigationContainer","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createStaticNavigation","tree","Component","createComponentForStaticNavigation","Navigation","linking","rest","ref","linkingConfig","useMemo","screens","createPathConfigForStaticNavigation","initialRouteName","config","enabled","path","memoizedLinking","undefined","Error","jsx","NavigationContainer","children","forwardRef"],"source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AAEE,OAAO,IAAI,IAAI,EAAE;MAC/D,MAAM,IAAIQ,KAAK,CACb,gFAAgF,GAC9E,kBAAkB,GAClB,uEAAuE,GACvE,2EAA2E,GAC3E,gFACJ,CAAC;IACH;IAEA,oBACE,IAAAvC,WAAA,CAAAwC,GAAA,EAACzC,oBAAA,CAAA0C,mBAAmB;MAAA,GAAKd,IAAI;MAAEC,GAAG,EAAEA,GAAI;MAACF,OAAO,EAAEW,eAAgB;MAAAK,QAAA,eAChE,IAAA1C,WAAA,CAAAwC,GAAA,EAACjB,SAAS,IAAE;IAAC,CACM,CAAC;EAE1B;EAEA,oBAAO1B,KAAK,CAAC8C,UAAU,CAAClB,UAAU,CAAC;AACrC","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.extractPathFromURL = extractPathFromURL;
|
|
7
|
-
var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
function extractPathFromURL(prefixes, url) {
|
|
10
|
-
for (const prefix of prefixes) {
|
|
11
|
-
const protocol = prefix.match(/^[^:]+:/)?.[0] ?? '';
|
|
12
|
-
const host = prefix.replace(new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}`), '').replace(/\/+/g, '/') // Replace multiple slash (//) with single ones
|
|
13
|
-
.replace(/^\//, ''); // Remove extra leading slash
|
|
14
|
-
|
|
15
|
-
const prefixRegex = new RegExp(`^${(0, _escapeStringRegexp.default)(protocol)}(/)*${host.split('.').map(it => it === '*' ? '[^/]+' : (0, _escapeStringRegexp.default)(it)).join('\\.')}`);
|
|
16
|
-
const [originAndPath, ...searchParams] = url.split('?');
|
|
17
|
-
const normalizedURL = originAndPath.replace(/\/+/g, '/').concat(searchParams.length ? `?${searchParams.join('?')}` : '');
|
|
18
|
-
if (prefixRegex.test(normalizedURL)) {
|
|
19
|
-
return normalizedURL.replace(prefixRegex, '');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=extractPathFromURL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_escapeStringRegexp","_interopRequireDefault","require","e","__esModule","default","extractPathFromURL","prefixes","url","prefix","protocol","match","host","replace","RegExp","escapeStringRegexp","prefixRegex","split","map","it","join","originAndPath","searchParams","normalizedURL","concat","length","test","undefined"],"sourceRoot":"../../src","sources":["extractPathFromURL.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C,SAASG,kBAAkBA,CAACC,QAAkB,EAAEC,GAAW,EAAE;EAClE,KAAK,MAAMC,MAAM,IAAIF,QAAQ,EAAE;IAC7B,MAAMG,QAAQ,GAAGD,MAAM,CAACE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IACnD,MAAMC,IAAI,GAAGH,MAAM,CAChBI,OAAO,CAAC,IAAIC,MAAM,CAAC,IAAI,IAAAC,2BAAkB,EAACL,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3DG,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAA,CACrBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;;IAEvB,MAAMG,WAAW,GAAG,IAAIF,MAAM,CAC5B,IAAI,IAAAC,2BAAkB,EAACL,QAAQ,CAAC,OAAOE,IAAI,CACxCK,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,EAAE,IAAMA,EAAE,KAAK,GAAG,GAAG,OAAO,GAAG,IAAAJ,2BAAkB,EAACI,EAAE,CAAE,CAAC,CAC5DC,IAAI,CAAC,KAAK,CAAC,EAChB,CAAC;IAED,MAAM,CAACC,aAAa,EAAE,GAAGC,YAAY,CAAC,GAAGd,GAAG,CAACS,KAAK,CAAC,GAAG,CAAC;IACvD,MAAMM,aAAa,GAAGF,aAAa,CAChCR,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBW,MAAM,CAACF,YAAY,CAACG,MAAM,GAAG,IAAIH,YAAY,CAACF,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAElE,IAAIJ,WAAW,CAACU,IAAI,CAACH,aAAa,CAAC,EAAE;MACnC,OAAOA,aAAa,CAACV,OAAO,CAACG,WAAW,EAAE,EAAE,CAAC;IAC/C;EACF;EAEA,OAAOW,SAAS;AAClB","ignoreList":[]}
|
package/lib/commonjs/index.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
createStaticNavigation: true,
|
|
8
|
-
Link: true,
|
|
9
|
-
LinkingContext: true,
|
|
10
|
-
LocaleDirContext: true,
|
|
11
|
-
NavigationContainer: true,
|
|
12
|
-
ServerContainer: true,
|
|
13
|
-
DarkTheme: true,
|
|
14
|
-
DefaultTheme: true,
|
|
15
|
-
UNSTABLE_UnhandledLinkingContext: true,
|
|
16
|
-
useLinkBuilder: true,
|
|
17
|
-
useLinkProps: true,
|
|
18
|
-
useLinkTo: true,
|
|
19
|
-
useLocale: true,
|
|
20
|
-
useScrollToTop: true
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "DarkTheme", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return _DarkTheme.DarkTheme;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "DefaultTheme", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function () {
|
|
31
|
-
return _DefaultTheme.DefaultTheme;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(exports, "Link", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function () {
|
|
37
|
-
return _Link.Link;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(exports, "LinkingContext", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get: function () {
|
|
43
|
-
return _LinkingContext.LinkingContext;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(exports, "LocaleDirContext", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
get: function () {
|
|
49
|
-
return _LocaleDirContext.LocaleDirContext;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(exports, "NavigationContainer", {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
get: function () {
|
|
55
|
-
return _NavigationContainer.NavigationContainer;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
Object.defineProperty(exports, "ServerContainer", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
get: function () {
|
|
61
|
-
return _ServerContainer.ServerContainer;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(exports, "UNSTABLE_UnhandledLinkingContext", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function () {
|
|
67
|
-
return _UnhandledLinkingContext.UnhandledLinkingContext;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(exports, "createStaticNavigation", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function () {
|
|
73
|
-
return _createStaticNavigation.createStaticNavigation;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(exports, "useLinkBuilder", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _useLinkBuilder.useLinkBuilder;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
Object.defineProperty(exports, "useLinkProps", {
|
|
83
|
-
enumerable: true,
|
|
84
|
-
get: function () {
|
|
85
|
-
return _useLinkProps.useLinkProps;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(exports, "useLinkTo", {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
get: function () {
|
|
91
|
-
return _useLinkTo.useLinkTo;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(exports, "useLocale", {
|
|
95
|
-
enumerable: true,
|
|
96
|
-
get: function () {
|
|
97
|
-
return _useLocale.useLocale;
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
Object.defineProperty(exports, "useScrollToTop", {
|
|
101
|
-
enumerable: true,
|
|
102
|
-
get: function () {
|
|
103
|
-
return _useScrollToTop.useScrollToTop;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
var _createStaticNavigation = require("./createStaticNavigation.js");
|
|
107
|
-
var _Link = require("./Link.js");
|
|
108
|
-
var _LinkingContext = require("./LinkingContext.js");
|
|
109
|
-
var _LocaleDirContext = require("./LocaleDirContext.js");
|
|
110
|
-
var _NavigationContainer = require("./NavigationContainer.js");
|
|
111
|
-
var _ServerContainer = require("./ServerContainer.js");
|
|
112
|
-
var _DarkTheme = require("./theming/DarkTheme.js");
|
|
113
|
-
var _DefaultTheme = require("./theming/DefaultTheme.js");
|
|
114
|
-
var _types = require("./types.js");
|
|
115
|
-
Object.keys(_types).forEach(function (key) {
|
|
116
|
-
if (key === "default" || key === "__esModule") return;
|
|
117
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
118
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
119
|
-
Object.defineProperty(exports, key, {
|
|
120
|
-
enumerable: true,
|
|
121
|
-
get: function () {
|
|
122
|
-
return _types[key];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
var _UnhandledLinkingContext = require("./UnhandledLinkingContext.js");
|
|
127
|
-
var _useLinkBuilder = require("./useLinkBuilder.js");
|
|
128
|
-
var _useLinkProps = require("./useLinkProps.js");
|
|
129
|
-
var _useLinkTo = require("./useLinkTo.js");
|
|
130
|
-
var _useLocale = require("./useLocale.js");
|
|
131
|
-
var _useScrollToTop = require("./useScrollToTop.js");
|
|
132
|
-
var _core = require("@react-navigation/core");
|
|
133
|
-
Object.keys(_core).forEach(function (key) {
|
|
134
|
-
if (key === "default" || key === "__esModule") return;
|
|
135
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
136
|
-
if (key in exports && exports[key] === _core[key]) return;
|
|
137
|
-
Object.defineProperty(exports, key, {
|
|
138
|
-
enumerable: true,
|
|
139
|
-
get: function () {
|
|
140
|
-
return _core[key];
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_createStaticNavigation","require","_Link","_LinkingContext","_LocaleDirContext","_NavigationContainer","_ServerContainer","_DarkTheme","_DefaultTheme","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_UnhandledLinkingContext","_useLinkBuilder","_useLinkProps","_useLinkTo","_useLocale","_useScrollToTop","_core"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IA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
|
-
{"type":"commonjs"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DarkTheme = void 0;
|
|
7
|
-
var _fonts = require("./fonts.js");
|
|
8
|
-
const DarkTheme = exports.DarkTheme = {
|
|
9
|
-
dark: true,
|
|
10
|
-
colors: {
|
|
11
|
-
primary: 'rgb(10, 132, 255)',
|
|
12
|
-
background: 'rgb(1, 1, 1)',
|
|
13
|
-
card: 'rgb(18, 18, 18)',
|
|
14
|
-
text: 'rgb(229, 229, 231)',
|
|
15
|
-
border: 'rgb(39, 39, 41)',
|
|
16
|
-
notification: 'rgb(255, 69, 58)'
|
|
17
|
-
},
|
|
18
|
-
fonts: _fonts.fonts
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=DarkTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_fonts","require","DarkTheme","exports","dark","colors","primary","background","card","text","border","notification","fonts"],"sourceRoot":"../../../src","sources":["theming/DarkTheme.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,SAAgB,GAAAC,OAAA,CAAAD,SAAA,GAAG;EAC9BE,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE;IACNC,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,cAAc;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE,iBAAiB;IACzBC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAALA;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DefaultTheme = void 0;
|
|
7
|
-
var _fonts = require("./fonts.js");
|
|
8
|
-
const DefaultTheme = exports.DefaultTheme = {
|
|
9
|
-
dark: false,
|
|
10
|
-
colors: {
|
|
11
|
-
primary: 'rgb(0, 122, 255)',
|
|
12
|
-
background: 'rgb(242, 242, 242)',
|
|
13
|
-
card: 'rgb(255, 255, 255)',
|
|
14
|
-
text: 'rgb(28, 28, 30)',
|
|
15
|
-
border: 'rgb(216, 216, 216)',
|
|
16
|
-
notification: 'rgb(255, 59, 48)'
|
|
17
|
-
},
|
|
18
|
-
fonts: _fonts.fonts
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=DefaultTheme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_fonts","require","DefaultTheme","exports","dark","colors","primary","background","card","text","border","notification","fonts"],"sourceRoot":"../../../src","sources":["theming/DefaultTheme.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,YAAmB,GAAAC,OAAA,CAAAD,YAAA,GAAG;EACjCE,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAALA;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.fonts = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
const WEB_FONT_STACK = 'system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
9
|
-
const fonts = exports.fonts = _reactNative.Platform.select({
|
|
10
|
-
web: {
|
|
11
|
-
regular: {
|
|
12
|
-
fontFamily: WEB_FONT_STACK,
|
|
13
|
-
fontWeight: '400'
|
|
14
|
-
},
|
|
15
|
-
medium: {
|
|
16
|
-
fontFamily: WEB_FONT_STACK,
|
|
17
|
-
fontWeight: '500'
|
|
18
|
-
},
|
|
19
|
-
bold: {
|
|
20
|
-
fontFamily: WEB_FONT_STACK,
|
|
21
|
-
fontWeight: '600'
|
|
22
|
-
},
|
|
23
|
-
heavy: {
|
|
24
|
-
fontFamily: WEB_FONT_STACK,
|
|
25
|
-
fontWeight: '700'
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
ios: {
|
|
29
|
-
regular: {
|
|
30
|
-
fontFamily: 'System',
|
|
31
|
-
fontWeight: '400'
|
|
32
|
-
},
|
|
33
|
-
medium: {
|
|
34
|
-
fontFamily: 'System',
|
|
35
|
-
fontWeight: '500'
|
|
36
|
-
},
|
|
37
|
-
bold: {
|
|
38
|
-
fontFamily: 'System',
|
|
39
|
-
fontWeight: '600'
|
|
40
|
-
},
|
|
41
|
-
heavy: {
|
|
42
|
-
fontFamily: 'System',
|
|
43
|
-
fontWeight: '700'
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
default: {
|
|
47
|
-
regular: {
|
|
48
|
-
fontFamily: 'sans-serif',
|
|
49
|
-
fontWeight: 'normal'
|
|
50
|
-
},
|
|
51
|
-
medium: {
|
|
52
|
-
fontFamily: 'sans-serif-medium',
|
|
53
|
-
fontWeight: 'normal'
|
|
54
|
-
},
|
|
55
|
-
bold: {
|
|
56
|
-
fontFamily: 'sans-serif',
|
|
57
|
-
fontWeight: '600'
|
|
58
|
-
},
|
|
59
|
-
heavy: {
|
|
60
|
-
fontFamily: 'sans-serif',
|
|
61
|
-
fontWeight: '700'
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=fonts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","WEB_FONT_STACK","fonts","exports","Platform","select","web","regular","fontFamily","fontWeight","medium","bold","heavy","ios","default"],"sourceRoot":"../../../src","sources":["theming/fonts.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,cAAc,GAClB,uHAAuH;AAElH,MAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAGE,qBAAQ,CAACC,MAAM,CAAC;EACnCC,GAAG,EAAE;IACHC,OAAO,EAAE;MACPC,UAAU,EAAEP,cAAc;MAC1BQ,UAAU,EAAE;IACd,CAAC;IACDC,MAAM,EAAE;MACNF,UAAU,EAAEP,cAAc;MAC1BQ,UAAU,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACJH,UAAU,EAAEP,cAAc;MAC1BQ,UAAU,EAAE;IACd,CAAC;IACDG,KAAK,EAAE;MACLJ,UAAU,EAAEP,cAAc;MAC1BQ,UAAU,EAAE;IACd;EACF,CAAC;EACDI,GAAG,EAAE;IACHN,OAAO,EAAE;MACPC,UAAU,EAAE,QAAQ;MACpBC,UAAU,EAAE;IACd,CAAC;IACDC,MAAM,EAAE;MACNF,UAAU,EAAE,QAAQ;MACpBC,UAAU,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACJH,UAAU,EAAE,QAAQ;MACpBC,UAAU,EAAE;IACd,CAAC;IACDG,KAAK,EAAE;MACLJ,UAAU,EAAE,QAAQ;MACpBC,UAAU,EAAE;IACd;EACF,CAAC;EACDK,OAAO,EAAE;IACPP,OAAO,EAAE;MACPC,UAAU,EAAE,YAAY;MACxBC,UAAU,EAAE;IACd,CAAC;IACDC,MAAM,EAAE;MACNF,UAAU,EAAE,mBAAmB;MAC/BC,UAAU,EAAE;IACd,CAAC;IACDE,IAAI,EAAE;MACJH,UAAU,EAAE,YAAY;MACxBC,UAAU,EAAE;IACd,CAAC;IACDG,KAAK,EAAE;MACLJ,UAAU,EAAE,YAAY;MACxBC,UAAU,EAAE;IACd;EACF;AACF,CAAmD,CAAC","ignoreList":[]}
|
package/lib/commonjs/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useBackButton","_"],"sourceRoot":"../../src","sources":["useBackButton.tsx"],"mappings":";;;;;;AAKO,SAASA,aAAaA,CAC3BC,CAAyD,EACzD;EACA;EACA;AAAA","ignoreList":[]}
|