one 1.1.390 → 1.1.392
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/dist/cjs/Root.cjs +6 -17
- package/dist/cjs/Root.js +9 -13
- package/dist/cjs/Root.js.map +1 -1
- package/dist/cjs/Root.native.js +4 -12
- package/dist/cjs/Root.native.js.map +1 -1
- package/dist/cjs/cli/build.cjs +2 -3
- package/dist/cjs/cli/build.js +2 -3
- package/dist/cjs/cli/build.js.map +1 -1
- package/dist/cjs/cli/build.native.js +2 -3
- package/dist/cjs/cli/build.native.js.map +2 -2
- package/dist/cjs/constants.cjs +9 -1
- package/dist/cjs/constants.js +7 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/constants.native.js +9 -1
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/cjs/fork/NavigationContainer.cjs +49 -31
- package/dist/cjs/fork/NavigationContainer.js +40 -21
- package/dist/cjs/fork/NavigationContainer.js.map +2 -2
- package/dist/cjs/fork/NavigationContainer.native.js +51 -29
- package/dist/cjs/fork/NavigationContainer.native.js.map +2 -2
- package/dist/cjs/fork/createMemoryHistory.cjs +4 -3
- package/dist/cjs/fork/createMemoryHistory.js +3 -2
- package/dist/cjs/fork/createMemoryHistory.js.map +1 -1
- package/dist/cjs/fork/createMemoryHistory.native.js +8 -4
- package/dist/cjs/fork/createMemoryHistory.native.js.map +2 -2
- package/dist/cjs/fork/extractPathFromURL.cjs +48 -28
- package/dist/cjs/fork/extractPathFromURL.js +44 -21
- package/dist/cjs/fork/extractPathFromURL.js.map +2 -2
- package/dist/cjs/fork/extractPathFromURL.native.js +58 -26
- package/dist/cjs/fork/extractPathFromURL.native.js.map +2 -2
- package/dist/cjs/fork/findFocusedRoute.js.map +1 -1
- package/dist/cjs/fork/findFocusedRoute.native.js.map +1 -1
- package/dist/cjs/fork/getPathFromState-mods.cjs +65 -0
- package/dist/cjs/fork/getPathFromState-mods.js +56 -0
- package/dist/cjs/fork/getPathFromState-mods.js.map +6 -0
- package/dist/cjs/fork/getPathFromState-mods.native.js +70 -0
- package/dist/cjs/fork/getPathFromState-mods.native.js.map +6 -0
- package/dist/cjs/fork/getPathFromState.cjs +75 -224
- package/dist/cjs/fork/getPathFromState.js +68 -223
- package/dist/cjs/fork/getPathFromState.js.map +2 -2
- package/dist/cjs/fork/getPathFromState.native.js +79 -261
- package/dist/cjs/fork/getPathFromState.native.js.map +2 -2
- package/dist/cjs/fork/getStateFromPath-mods.cjs +187 -0
- package/dist/cjs/fork/getStateFromPath-mods.js +199 -0
- package/dist/cjs/fork/getStateFromPath-mods.js.map +6 -0
- package/dist/cjs/fork/getStateFromPath-mods.native.js +284 -0
- package/dist/cjs/fork/getStateFromPath-mods.native.js.map +6 -0
- package/dist/cjs/fork/getStateFromPath.cjs +181 -263
- package/dist/cjs/fork/getStateFromPath.js +148 -264
- package/dist/cjs/fork/getStateFromPath.js.map +2 -2
- package/dist/cjs/fork/getStateFromPath.native.js +164 -304
- package/dist/cjs/fork/getStateFromPath.native.js.map +2 -2
- package/dist/cjs/fork/useBackButton.js.map +1 -1
- package/dist/cjs/fork/useBackButton.native.js.map +1 -1
- package/dist/cjs/fork/useDocumentTitle.js +4 -1
- package/dist/cjs/fork/useDocumentTitle.js.map +1 -1
- package/dist/cjs/fork/useDocumentTitle.native.js +1 -1
- package/dist/cjs/fork/useDocumentTitle.native.js.map +2 -2
- package/dist/cjs/fork/useLinking.cjs +21 -24
- package/dist/cjs/fork/useLinking.js +21 -25
- package/dist/cjs/fork/useLinking.js.map +2 -2
- package/dist/cjs/fork/useLinking.native.js +68 -66
- package/dist/cjs/fork/useLinking.native.js.map +2 -2
- package/dist/cjs/fork/useThenable.js.map +1 -1
- package/dist/cjs/fork/useThenable.native.js.map +1 -1
- package/dist/cjs/fork/validatePathConfig.cjs +32 -11
- package/dist/cjs/fork/validatePathConfig.js +41 -11
- package/dist/cjs/fork/validatePathConfig.js.map +1 -1
- package/dist/cjs/fork/validatePathConfig.native.js +47 -18
- package/dist/cjs/fork/validatePathConfig.native.js.map +2 -2
- package/dist/cjs/layouts/withLayoutContext.cjs +1 -1
- package/dist/cjs/layouts/withLayoutContext.js +1 -1
- package/dist/cjs/layouts/withLayoutContext.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.native.js +1 -1
- package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
- package/dist/cjs/link/linking.cjs +4 -4
- package/dist/cjs/link/linking.js +3 -3
- package/dist/cjs/link/linking.js.map +2 -2
- package/dist/cjs/link/linking.native.js +3 -3
- package/dist/cjs/link/linking.native.js.map +1 -1
- package/dist/cjs/link/useLinkTo.cjs +2 -2
- package/dist/cjs/link/useLinkTo.js +2 -2
- package/dist/cjs/link/useLinkTo.js.map +1 -1
- package/dist/cjs/link/useLinkTo.native.js +2 -2
- package/dist/cjs/link/useLinkTo.native.js.map +1 -1
- package/dist/cjs/router/getNormalizedStatePath.cjs +2 -2
- package/dist/cjs/router/getNormalizedStatePath.js +2 -2
- package/dist/cjs/router/getNormalizedStatePath.js.map +1 -1
- package/dist/cjs/router/getNormalizedStatePath.native.js +2 -2
- package/dist/cjs/router/getNormalizedStatePath.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +19 -3
- package/dist/cjs/router/router.js +25 -3
- package/dist/cjs/router/router.js.map +1 -1
- package/dist/cjs/router/router.native.js +39 -3
- package/dist/cjs/router/router.native.js.map +2 -2
- package/dist/cjs/utils/serverContext.cjs +7 -7
- package/dist/cjs/utils/serverContext.js +7 -7
- package/dist/cjs/utils/serverContext.js.map +1 -1
- package/dist/cjs/utils/serverContext.native.js +5 -5
- package/dist/cjs/utils/serverContext.native.js.map +2 -2
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +6 -6
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.js +3 -4
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.js.map +2 -2
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js +3 -4
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +2 -2
- package/dist/esm/Root.js +6 -2
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +1 -1
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +1 -1
- package/dist/esm/Root.native.js.map +2 -2
- package/dist/esm/cli/build.js +2 -3
- package/dist/esm/cli/build.js.map +1 -1
- package/dist/esm/cli/build.mjs +2 -3
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +2 -3
- package/dist/esm/cli/build.native.js.map +2 -2
- package/dist/esm/constants.js +7 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs +8 -2
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +7 -1
- package/dist/esm/constants.native.js.map +2 -2
- package/dist/esm/fork/NavigationContainer.js +43 -20
- package/dist/esm/fork/NavigationContainer.js.map +1 -1
- package/dist/esm/fork/NavigationContainer.mjs +42 -24
- package/dist/esm/fork/NavigationContainer.mjs.map +1 -1
- package/dist/esm/fork/NavigationContainer.native.js +44 -24
- package/dist/esm/fork/NavigationContainer.native.js.map +2 -2
- package/dist/esm/fork/createMemoryHistory.js +3 -2
- package/dist/esm/fork/createMemoryHistory.js.map +1 -1
- package/dist/esm/fork/createMemoryHistory.mjs +4 -3
- package/dist/esm/fork/createMemoryHistory.mjs.map +1 -1
- package/dist/esm/fork/createMemoryHistory.native.js +4 -4
- package/dist/esm/fork/createMemoryHistory.native.js.map +2 -2
- package/dist/esm/fork/extractPathFromURL.js +42 -11
- package/dist/esm/fork/extractPathFromURL.js.map +1 -1
- package/dist/esm/fork/extractPathFromURL.mjs +39 -11
- package/dist/esm/fork/extractPathFromURL.mjs.map +1 -1
- package/dist/esm/fork/extractPathFromURL.native.js +52 -15
- package/dist/esm/fork/extractPathFromURL.native.js.map +2 -2
- package/dist/esm/fork/findFocusedRoute.js.map +1 -1
- package/dist/esm/fork/findFocusedRoute.mjs.map +1 -1
- package/dist/esm/fork/findFocusedRoute.native.js.map +1 -1
- package/dist/esm/fork/getPathFromState-mods.js +40 -0
- package/dist/esm/fork/getPathFromState-mods.js.map +6 -0
- package/dist/esm/fork/getPathFromState-mods.mjs +40 -0
- package/dist/esm/fork/getPathFromState-mods.mjs.map +1 -0
- package/dist/esm/fork/getPathFromState-mods.native.js +47 -0
- package/dist/esm/fork/getPathFromState-mods.native.js.map +6 -0
- package/dist/esm/fork/getPathFromState.js +71 -228
- package/dist/esm/fork/getPathFromState.js.map +2 -2
- package/dist/esm/fork/getPathFromState.mjs +73 -221
- package/dist/esm/fork/getPathFromState.mjs.map +1 -1
- package/dist/esm/fork/getPathFromState.native.js +79 -260
- package/dist/esm/fork/getPathFromState.native.js.map +2 -2
- package/dist/esm/fork/getStateFromPath-mods.js +176 -0
- package/dist/esm/fork/getStateFromPath-mods.js.map +6 -0
- package/dist/esm/fork/getStateFromPath-mods.mjs +143 -0
- package/dist/esm/fork/getStateFromPath-mods.mjs.map +1 -0
- package/dist/esm/fork/getStateFromPath-mods.native.js +246 -0
- package/dist/esm/fork/getStateFromPath-mods.native.js.map +6 -0
- package/dist/esm/fork/getStateFromPath.js +160 -265
- package/dist/esm/fork/getStateFromPath.js.map +2 -2
- package/dist/esm/fork/getStateFromPath.mjs +181 -260
- package/dist/esm/fork/getStateFromPath.mjs.map +1 -1
- package/dist/esm/fork/getStateFromPath.native.js +164 -302
- package/dist/esm/fork/getStateFromPath.native.js.map +2 -2
- package/dist/esm/fork/useBackButton.js.map +1 -1
- package/dist/esm/fork/useBackButton.mjs.map +1 -1
- package/dist/esm/fork/useBackButton.native.js.map +1 -1
- package/dist/esm/fork/useDocumentTitle.js +4 -1
- package/dist/esm/fork/useDocumentTitle.js.map +1 -1
- package/dist/esm/fork/useDocumentTitle.mjs.map +1 -1
- package/dist/esm/fork/useDocumentTitle.native.js +1 -1
- package/dist/esm/fork/useDocumentTitle.native.js.map +2 -2
- package/dist/esm/fork/useLinking.js +22 -26
- package/dist/esm/fork/useLinking.js.map +1 -1
- package/dist/esm/fork/useLinking.mjs +20 -23
- package/dist/esm/fork/useLinking.mjs.map +1 -1
- package/dist/esm/fork/useLinking.native.js +65 -67
- package/dist/esm/fork/useLinking.native.js.map +2 -2
- package/dist/esm/fork/useThenable.js.map +1 -1
- package/dist/esm/fork/useThenable.mjs.map +1 -1
- package/dist/esm/fork/useThenable.native.js.map +1 -1
- package/dist/esm/fork/validatePathConfig.js +41 -11
- package/dist/esm/fork/validatePathConfig.js.map +1 -1
- package/dist/esm/fork/validatePathConfig.mjs +32 -11
- package/dist/esm/fork/validatePathConfig.mjs.map +1 -1
- package/dist/esm/fork/validatePathConfig.native.js +43 -18
- package/dist/esm/fork/validatePathConfig.native.js.map +2 -2
- package/dist/esm/layouts/withLayoutContext.js +1 -1
- package/dist/esm/layouts/withLayoutContext.js.map +1 -1
- package/dist/esm/layouts/withLayoutContext.mjs +1 -1
- package/dist/esm/layouts/withLayoutContext.mjs.map +1 -1
- package/dist/esm/layouts/withLayoutContext.native.js +1 -1
- package/dist/esm/layouts/withLayoutContext.native.js.map +1 -1
- package/dist/esm/link/linking.js +2 -2
- package/dist/esm/link/linking.js.map +1 -1
- package/dist/esm/link/linking.mjs +2 -2
- package/dist/esm/link/linking.mjs.map +1 -1
- package/dist/esm/link/linking.native.js +2 -2
- package/dist/esm/link/linking.native.js.map +1 -1
- package/dist/esm/link/useLinkTo.js +1 -1
- package/dist/esm/link/useLinkTo.mjs +1 -1
- package/dist/esm/link/useLinkTo.native.js +1 -1
- package/dist/esm/router/getNormalizedStatePath.js +1 -1
- package/dist/esm/router/getNormalizedStatePath.mjs +1 -1
- package/dist/esm/router/getNormalizedStatePath.native.js +1 -1
- package/dist/esm/router/router.js +24 -2
- package/dist/esm/router/router.js.map +1 -1
- package/dist/esm/router/router.mjs +18 -2
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +38 -2
- package/dist/esm/router/router.native.js.map +2 -2
- package/dist/esm/utils/serverContext.js +2 -1
- package/dist/esm/utils/serverContext.js.map +1 -1
- package/dist/esm/utils/serverContext.mjs +1 -1
- package/dist/esm/utils/serverContext.mjs.map +1 -1
- package/dist/esm/utils/serverContext.native.js +2 -1
- package/dist/esm/utils/serverContext.native.js.map +2 -2
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js +3 -3
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +3 -3
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +3 -3
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +2 -2
- package/package.json +8 -9
- package/src/Root.tsx +6 -2
- package/src/cli/build.ts +2 -3
- package/src/constants.ts +8 -0
- package/src/fork/NavigationContainer.tsx +101 -39
- package/src/fork/createMemoryHistory.tsx +15 -13
- package/src/fork/extractPathFromURL.ts +85 -40
- package/src/fork/findFocusedRoute.tsx +9 -1
- package/src/fork/getPathFromState-mods.ts +142 -0
- package/src/fork/getPathFromState.ts +244 -501
- package/src/fork/getStateFromPath-mods.ts +400 -0
- package/src/fork/getStateFromPath.ts +447 -538
- package/src/fork/useBackButton.native.tsx +16 -2
- package/src/fork/useBackButton.tsx +11 -2
- package/src/fork/useDocumentTitle.native.tsx +9 -4
- package/src/fork/useDocumentTitle.tsx +12 -7
- package/src/fork/useLinking.native.ts +71 -63
- package/src/fork/useLinking.ts +75 -40
- package/src/fork/useThenable.tsx +7 -1
- package/src/fork/validatePathConfig.ts +64 -12
- package/src/layouts/withLayoutContext.tsx +1 -1
- package/src/link/linking.ts +2 -2
- package/src/link/useLinkTo.tsx +1 -1
- package/src/router/getNormalizedStatePath.tsx +1 -1
- package/src/router/router.ts +41 -2
- package/src/utils/serverContext.tsx +3 -1
- package/src/vite/plugins/fileSystemRouterPlugin.tsx +3 -3
- package/types/Root.d.ts.map +1 -1
- package/types/cli/build.d.ts.map +1 -1
- package/types/constants.d.ts +2 -0
- package/types/constants.d.ts.map +1 -1
- package/types/fork/NavigationContainer.d.ts +19 -8
- package/types/fork/NavigationContainer.d.ts.map +1 -1
- package/types/fork/createMemoryHistory.d.ts +10 -1
- package/types/fork/createMemoryHistory.d.ts.map +1 -1
- package/types/fork/extractPathFromURL.d.ts +7 -1
- package/types/fork/extractPathFromURL.d.ts.map +1 -1
- package/types/fork/findFocusedRoute.d.ts +9 -0
- package/types/fork/findFocusedRoute.d.ts.map +1 -1
- package/types/fork/getPathFromState-mods.d.ts +23 -0
- package/types/fork/getPathFromState-mods.d.ts.map +1 -0
- package/types/fork/getPathFromState.d.ts +15 -14
- package/types/fork/getPathFromState.d.ts.map +1 -1
- package/types/fork/getStateFromPath-mods.d.ts +58 -0
- package/types/fork/getStateFromPath-mods.d.ts.map +1 -0
- package/types/fork/getStateFromPath.d.ts +28 -29
- package/types/fork/getStateFromPath.d.ts.map +1 -1
- package/types/fork/useBackButton.d.ts +6 -0
- package/types/fork/useBackButton.d.ts.map +1 -1
- package/types/fork/useBackButton.native.d.ts +9 -1
- package/types/fork/useBackButton.native.d.ts.map +1 -1
- package/types/fork/useDocumentTitle.d.ts +8 -6
- package/types/fork/useDocumentTitle.d.ts.map +1 -1
- package/types/fork/useDocumentTitle.native.d.ts +5 -2
- package/types/fork/useDocumentTitle.native.d.ts.map +1 -1
- package/types/fork/useLinking.d.ts +8 -1
- package/types/fork/useLinking.d.ts.map +1 -1
- package/types/fork/useLinking.native.d.ts +9 -2
- package/types/fork/useLinking.native.d.ts.map +1 -1
- package/types/fork/useThenable.d.ts +6 -0
- package/types/fork/useThenable.d.ts.map +1 -1
- package/types/fork/validatePathConfig.d.ts +8 -1
- package/types/fork/validatePathConfig.d.ts.map +1 -1
- package/types/link/linking.d.ts +2 -2
- package/types/link/linking.d.ts.map +1 -1
- package/types/utils/serverContext.d.ts.map +1 -1
- package/types/vite/plugins/fileSystemRouterPlugin.d.ts.map +1 -1
@@ -0,0 +1,187 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all) __defProp(target, name, {
|
9
|
+
get: all[name],
|
10
|
+
enumerable: !0
|
11
|
+
});
|
12
|
+
},
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
15
|
+
get: () => from[key],
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
17
|
+
});
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
26
|
+
value: mod,
|
27
|
+
enumerable: !0
|
28
|
+
}) : target, mod)),
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
30
|
+
value: !0
|
31
|
+
}), mod);
|
32
|
+
var getStateFromPath_mods_exports = {};
|
33
|
+
__export(getStateFromPath_mods_exports, {
|
34
|
+
appendIsInitial: () => appendIsInitial,
|
35
|
+
createConfigItemAdditionalProperties: () => createConfigItemAdditionalProperties,
|
36
|
+
decodeURIComponentSafe: () => decodeURIComponentSafe,
|
37
|
+
formatRegexPattern: () => formatRegexPattern,
|
38
|
+
getParamValue: () => getParamValue,
|
39
|
+
getRouteConfigSorter: () => getRouteConfigSorter,
|
40
|
+
getUrlWithReactNavigationConcessions: () => getUrlWithReactNavigationConcessions,
|
41
|
+
matchForEmptyPath: () => matchForEmptyPath,
|
42
|
+
parseQueryParamsExtended: () => parseQueryParamsExtended,
|
43
|
+
populateParams: () => populateParams,
|
44
|
+
stripBaseUrl: () => stripBaseUrl
|
45
|
+
});
|
46
|
+
module.exports = __toCommonJS(getStateFromPath_mods_exports);
|
47
|
+
var import_escape_string_regexp = __toESM(require("escape-string-regexp"), 1),
|
48
|
+
import_matchers = require("../router/matchers.cjs");
|
49
|
+
function getUrlWithReactNavigationConcessions(path, baseUrl = process.env.EXPO_BASE_URL) {
|
50
|
+
let parsed;
|
51
|
+
try {
|
52
|
+
parsed = new URL(path, "https://phony.example");
|
53
|
+
} catch {
|
54
|
+
return {
|
55
|
+
path,
|
56
|
+
cleanUrl: "",
|
57
|
+
nonstandardPathname: "",
|
58
|
+
url: new URL("https://phony.example")
|
59
|
+
};
|
60
|
+
}
|
61
|
+
const pathname = parsed.pathname,
|
62
|
+
withoutBaseUrl = stripBaseUrl(pathname, baseUrl),
|
63
|
+
pathWithoutGroups = (0, import_matchers.stripGroupSegmentsFromPath)(stripBaseUrl(path, baseUrl));
|
64
|
+
return {
|
65
|
+
// The slashes are at the end, not the beginning
|
66
|
+
path,
|
67
|
+
nonstandardPathname: withoutBaseUrl.replace(/^\/+/g, "").replace(/\/+$/g, "") + "/",
|
68
|
+
url: parsed,
|
69
|
+
pathWithoutGroups
|
70
|
+
};
|
71
|
+
}
|
72
|
+
function matchForEmptyPath(configs) {
|
73
|
+
const leafNodes = configs.filter(config => !config.hasChildren).map(value => ({
|
74
|
+
...value,
|
75
|
+
// Collapse all levels of group segments before testing.
|
76
|
+
// This enables `app/(one)/(two)/index.js` to be matched.
|
77
|
+
path: (0, import_matchers.stripGroupSegmentsFromPath)(value.path)
|
78
|
+
}));
|
79
|
+
return leafNodes.find(config =>
|
80
|
+
// NOTE: Test leaf node index routes that either don't have a regex or match an empty string.
|
81
|
+
config.path === "" && (!config.regex || config.regex.test(""))) ?? leafNodes.find(config =>
|
82
|
+
// NOTE: Test leaf node dynamic routes that match an empty string.
|
83
|
+
config.path.startsWith(":") && config.regex.test("")) ??
|
84
|
+
// NOTE: Test leaf node deep dynamic routes that match a slash.
|
85
|
+
// This should be done last to enable dynamic routes having a higher priority.
|
86
|
+
leafNodes.find(config => config.path.startsWith("*") && config.regex.test("/"));
|
87
|
+
}
|
88
|
+
function appendIsInitial(initialRoutes) {
|
89
|
+
const resolvedInitialPatterns = initialRoutes.map(route => joinPaths(...route.parentScreens, route.initialRouteName));
|
90
|
+
return config => (config.isInitial = resolvedInitialPatterns.includes(config.routeNames.join("/")), config);
|
91
|
+
}
|
92
|
+
const joinPaths = (...paths) => [].concat(...paths.map(p => p.split("/"))).filter(Boolean).join("/");
|
93
|
+
function getRouteConfigSorter(previousSegments = []) {
|
94
|
+
return function (a, b) {
|
95
|
+
if (a.pattern === b.pattern) return b.routeNames.join(">").localeCompare(a.routeNames.join(">"));
|
96
|
+
if (a.pattern.startsWith(b.pattern) && !b.isIndex) return -1;
|
97
|
+
if (b.pattern.startsWith(a.pattern) && !a.isIndex) return 1;
|
98
|
+
if (a.type === "static" && b.type !== "static") return -1;
|
99
|
+
if (a.type !== "static" && b.type === "static") return 1;
|
100
|
+
const similarToPreviousA = previousSegments.filter((value, index) => value === a.expandedRouteNames[index] && value.startsWith("(") && value.endsWith(")")),
|
101
|
+
similarToPreviousB = previousSegments.filter((value, index) => value === b.expandedRouteNames[index] && value.startsWith("(") && value.endsWith(")"));
|
102
|
+
if ((similarToPreviousA.length > 0 || similarToPreviousB.length > 0) && similarToPreviousA.length !== similarToPreviousB.length) return similarToPreviousB.length - similarToPreviousA.length;
|
103
|
+
for (let i = 0; i < Math.max(a.parts.length, b.parts.length); i++) {
|
104
|
+
if (a.parts[i] == null) return 1;
|
105
|
+
if (b.parts[i] == null) return -1;
|
106
|
+
const aWildCard = a.parts[i].startsWith("*"),
|
107
|
+
bWildCard = b.parts[i].startsWith("*");
|
108
|
+
if (aWildCard && bWildCard) {
|
109
|
+
const aNotFound = a.parts[i].match(/^[*]not-found$/),
|
110
|
+
bNotFound = b.parts[i].match(/^[*]not-found$/);
|
111
|
+
if (aNotFound && bNotFound) continue;
|
112
|
+
if (aNotFound) return 1;
|
113
|
+
if (bNotFound) return -1;
|
114
|
+
continue;
|
115
|
+
}
|
116
|
+
if (aWildCard) return 1;
|
117
|
+
if (bWildCard) return -1;
|
118
|
+
const aSlug = a.parts[i].startsWith(":"),
|
119
|
+
bSlug = b.parts[i].startsWith(":");
|
120
|
+
if (aSlug && bSlug) {
|
121
|
+
const aNotFound = a.parts[i].match(/^[*]not-found$/),
|
122
|
+
bNotFound = b.parts[i].match(/^[*]not-found$/);
|
123
|
+
if (aNotFound && bNotFound) continue;
|
124
|
+
if (aNotFound) return 1;
|
125
|
+
if (bNotFound) return -1;
|
126
|
+
continue;
|
127
|
+
}
|
128
|
+
if (aSlug) return 1;
|
129
|
+
if (bSlug) return -1;
|
130
|
+
}
|
131
|
+
return a.isInitial && !b.isInitial ? -1 : !a.isInitial && b.isInitial ? 1 : b.parts.length - a.parts.length;
|
132
|
+
};
|
133
|
+
}
|
134
|
+
function formatRegexPattern(it) {
|
135
|
+
return it = it.replace(" ", "%20"), it.startsWith(":") ? `(([^/]+\\/)${it.endsWith("?") ? "?" : ""})` : it.startsWith("*") ? `((.*\\/)${it.endsWith("?") ? "?" : ""})` : (0, import_matchers.matchGroupName)(it) != null ? `(?:${escape(it)}\\/)?` : (0, import_escape_string_regexp.default)(it) + "\\/";
|
136
|
+
}
|
137
|
+
function decodeURIComponentSafe(str) {
|
138
|
+
try {
|
139
|
+
return decodeURIComponent(str);
|
140
|
+
} catch {
|
141
|
+
return str;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
function getParamValue(p, value) {
|
145
|
+
if (p.startsWith("*")) {
|
146
|
+
const values = value.split("/").filter(v => v !== "");
|
147
|
+
return values.length === 0 && p.endsWith("?") ? void 0 : values;
|
148
|
+
}
|
149
|
+
return value;
|
150
|
+
}
|
151
|
+
function populateParams(routes, params) {
|
152
|
+
if (!(!routes || !params || Object.keys(params).length === 0)) {
|
153
|
+
for (const route of routes) Object.assign(route, {
|
154
|
+
params
|
155
|
+
});
|
156
|
+
return routes;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
function createConfigItemAdditionalProperties(screen, pattern, routeNames, config = {}) {
|
160
|
+
const parts = [];
|
161
|
+
let isDynamic = !1;
|
162
|
+
const isIndex = screen === "index" || screen.endsWith("/index");
|
163
|
+
for (const part of pattern.split("/")) part && (isDynamic ||= part.startsWith(":") || part.startsWith("*") || part.includes("*not-found"), (0, import_matchers.matchGroupName)(part) || parts.push(part));
|
164
|
+
const hasChildren = config.screens ? !!Object.keys(config.screens)?.length : !1,
|
165
|
+
type = hasChildren ? "layout" : isDynamic ? "dynamic" : "static";
|
166
|
+
return isIndex && parts.push("index"), {
|
167
|
+
type,
|
168
|
+
isIndex,
|
169
|
+
hasChildren,
|
170
|
+
parts,
|
171
|
+
userReadableName: [...routeNames.slice(0, -1), config.path || screen].join("/"),
|
172
|
+
expandedRouteNames: routeNames.flatMap(name => name.split("/"))
|
173
|
+
};
|
174
|
+
}
|
175
|
+
function parseQueryParamsExtended(path, route, parseConfig, hash) {
|
176
|
+
const searchParams = new URL(path, "https://phony.example").searchParams,
|
177
|
+
params = /* @__PURE__ */Object.create(null);
|
178
|
+
hash && (params["#"] = hash.slice(1));
|
179
|
+
for (const name of searchParams.keys()) if (route.params?.[name]) process.env.NODE_ENV !== "production" && console.warn(`Route '/${route.name}' with param '${name}' was specified both in the path and as a param, removing from path`);else {
|
180
|
+
const values = parseConfig?.hasOwnProperty(name) ? searchParams.getAll(name).map(value => parseConfig[name](value)) : searchParams.getAll(name);
|
181
|
+
params[name] = values.length === 1 ? values[0] : values;
|
182
|
+
}
|
183
|
+
return Object.keys(params).length ? params : void 0;
|
184
|
+
}
|
185
|
+
function stripBaseUrl(path, baseUrl = process.env.EXPO_BASE_URL) {
|
186
|
+
return process.env.NODE_ENV !== "development" && baseUrl ? path.replace(/^\/+/g, "/").replace(new RegExp(`^\\/?${escape(baseUrl)}`, "g"), "") : path;
|
187
|
+
}
|
@@ -0,0 +1,199 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
|
+
return to;
|
14
|
+
};
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
21
|
+
mod
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
23
|
+
var getStateFromPath_mods_exports = {};
|
24
|
+
__export(getStateFromPath_mods_exports, {
|
25
|
+
appendIsInitial: () => appendIsInitial,
|
26
|
+
createConfigItemAdditionalProperties: () => createConfigItemAdditionalProperties,
|
27
|
+
decodeURIComponentSafe: () => decodeURIComponentSafe,
|
28
|
+
formatRegexPattern: () => formatRegexPattern,
|
29
|
+
getParamValue: () => getParamValue,
|
30
|
+
getRouteConfigSorter: () => getRouteConfigSorter,
|
31
|
+
getUrlWithReactNavigationConcessions: () => getUrlWithReactNavigationConcessions,
|
32
|
+
matchForEmptyPath: () => matchForEmptyPath,
|
33
|
+
parseQueryParamsExtended: () => parseQueryParamsExtended,
|
34
|
+
populateParams: () => populateParams,
|
35
|
+
stripBaseUrl: () => stripBaseUrl
|
36
|
+
});
|
37
|
+
module.exports = __toCommonJS(getStateFromPath_mods_exports);
|
38
|
+
var import_escape_string_regexp = __toESM(require("escape-string-regexp"), 1), import_matchers = require("../router/matchers");
|
39
|
+
function getUrlWithReactNavigationConcessions(path, baseUrl = process.env.EXPO_BASE_URL) {
|
40
|
+
let parsed;
|
41
|
+
try {
|
42
|
+
parsed = new URL(path, "https://phony.example");
|
43
|
+
} catch {
|
44
|
+
return {
|
45
|
+
path,
|
46
|
+
cleanUrl: "",
|
47
|
+
nonstandardPathname: "",
|
48
|
+
url: new URL("https://phony.example")
|
49
|
+
};
|
50
|
+
}
|
51
|
+
const pathname = parsed.pathname, withoutBaseUrl = stripBaseUrl(pathname, baseUrl), pathWithoutGroups = (0, import_matchers.stripGroupSegmentsFromPath)(stripBaseUrl(path, baseUrl));
|
52
|
+
return {
|
53
|
+
// The slashes are at the end, not the beginning
|
54
|
+
path,
|
55
|
+
nonstandardPathname: withoutBaseUrl.replace(/^\/+/g, "").replace(/\/+$/g, "") + "/",
|
56
|
+
url: parsed,
|
57
|
+
pathWithoutGroups
|
58
|
+
};
|
59
|
+
}
|
60
|
+
function matchForEmptyPath(configs) {
|
61
|
+
const leafNodes = configs.filter((config) => !config.hasChildren).map((value) => ({
|
62
|
+
...value,
|
63
|
+
// Collapse all levels of group segments before testing.
|
64
|
+
// This enables `app/(one)/(two)/index.js` to be matched.
|
65
|
+
path: (0, import_matchers.stripGroupSegmentsFromPath)(value.path)
|
66
|
+
}));
|
67
|
+
return leafNodes.find(
|
68
|
+
(config) => (
|
69
|
+
// NOTE: Test leaf node index routes that either don't have a regex or match an empty string.
|
70
|
+
config.path === "" && (!config.regex || config.regex.test(""))
|
71
|
+
)
|
72
|
+
) ?? leafNodes.find(
|
73
|
+
(config) => (
|
74
|
+
// NOTE: Test leaf node dynamic routes that match an empty string.
|
75
|
+
config.path.startsWith(":") && config.regex.test("")
|
76
|
+
)
|
77
|
+
) ?? // NOTE: Test leaf node deep dynamic routes that match a slash.
|
78
|
+
// This should be done last to enable dynamic routes having a higher priority.
|
79
|
+
leafNodes.find((config) => config.path.startsWith("*") && config.regex.test("/"));
|
80
|
+
}
|
81
|
+
function appendIsInitial(initialRoutes) {
|
82
|
+
const resolvedInitialPatterns = initialRoutes.map(
|
83
|
+
(route) => joinPaths(...route.parentScreens, route.initialRouteName)
|
84
|
+
);
|
85
|
+
return (config) => (config.isInitial = resolvedInitialPatterns.includes(config.routeNames.join("/")), config);
|
86
|
+
}
|
87
|
+
const joinPaths = (...paths) => [].concat(...paths.map((p) => p.split("/"))).filter(Boolean).join("/");
|
88
|
+
function getRouteConfigSorter(previousSegments = []) {
|
89
|
+
return function(a, b) {
|
90
|
+
if (a.pattern === b.pattern)
|
91
|
+
return b.routeNames.join(">").localeCompare(a.routeNames.join(">"));
|
92
|
+
if (a.pattern.startsWith(b.pattern) && !b.isIndex)
|
93
|
+
return -1;
|
94
|
+
if (b.pattern.startsWith(a.pattern) && !a.isIndex)
|
95
|
+
return 1;
|
96
|
+
if (a.type === "static" && b.type !== "static")
|
97
|
+
return -1;
|
98
|
+
if (a.type !== "static" && b.type === "static")
|
99
|
+
return 1;
|
100
|
+
const similarToPreviousA = previousSegments.filter((value, index) => value === a.expandedRouteNames[index] && value.startsWith("(") && value.endsWith(")")), similarToPreviousB = previousSegments.filter((value, index) => value === b.expandedRouteNames[index] && value.startsWith("(") && value.endsWith(")"));
|
101
|
+
if ((similarToPreviousA.length > 0 || similarToPreviousB.length > 0) && similarToPreviousA.length !== similarToPreviousB.length)
|
102
|
+
return similarToPreviousB.length - similarToPreviousA.length;
|
103
|
+
for (let i = 0; i < Math.max(a.parts.length, b.parts.length); i++) {
|
104
|
+
if (a.parts[i] == null)
|
105
|
+
return 1;
|
106
|
+
if (b.parts[i] == null)
|
107
|
+
return -1;
|
108
|
+
const aWildCard = a.parts[i].startsWith("*"), bWildCard = b.parts[i].startsWith("*");
|
109
|
+
if (aWildCard && bWildCard) {
|
110
|
+
const aNotFound = a.parts[i].match(/^[*]not-found$/), bNotFound = b.parts[i].match(/^[*]not-found$/);
|
111
|
+
if (aNotFound && bNotFound)
|
112
|
+
continue;
|
113
|
+
if (aNotFound)
|
114
|
+
return 1;
|
115
|
+
if (bNotFound)
|
116
|
+
return -1;
|
117
|
+
continue;
|
118
|
+
}
|
119
|
+
if (aWildCard)
|
120
|
+
return 1;
|
121
|
+
if (bWildCard)
|
122
|
+
return -1;
|
123
|
+
const aSlug = a.parts[i].startsWith(":"), bSlug = b.parts[i].startsWith(":");
|
124
|
+
if (aSlug && bSlug) {
|
125
|
+
const aNotFound = a.parts[i].match(/^[*]not-found$/), bNotFound = b.parts[i].match(/^[*]not-found$/);
|
126
|
+
if (aNotFound && bNotFound)
|
127
|
+
continue;
|
128
|
+
if (aNotFound)
|
129
|
+
return 1;
|
130
|
+
if (bNotFound)
|
131
|
+
return -1;
|
132
|
+
continue;
|
133
|
+
}
|
134
|
+
if (aSlug)
|
135
|
+
return 1;
|
136
|
+
if (bSlug)
|
137
|
+
return -1;
|
138
|
+
}
|
139
|
+
return a.isInitial && !b.isInitial ? -1 : !a.isInitial && b.isInitial ? 1 : b.parts.length - a.parts.length;
|
140
|
+
};
|
141
|
+
}
|
142
|
+
function formatRegexPattern(it) {
|
143
|
+
return it = it.replace(" ", "%20"), it.startsWith(":") ? `(([^/]+\\/)${it.endsWith("?") ? "?" : ""})` : it.startsWith("*") ? `((.*\\/)${it.endsWith("?") ? "?" : ""})` : (0, import_matchers.matchGroupName)(it) != null ? `(?:${escape(it)}\\/)?` : (0, import_escape_string_regexp.default)(it) + "\\/";
|
144
|
+
}
|
145
|
+
function decodeURIComponentSafe(str) {
|
146
|
+
try {
|
147
|
+
return decodeURIComponent(str);
|
148
|
+
} catch {
|
149
|
+
return str;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
function getParamValue(p, value) {
|
153
|
+
if (p.startsWith("*")) {
|
154
|
+
const values = value.split("/").filter((v) => v !== "");
|
155
|
+
return values.length === 0 && p.endsWith("?") ? void 0 : values;
|
156
|
+
}
|
157
|
+
return value;
|
158
|
+
}
|
159
|
+
function populateParams(routes, params) {
|
160
|
+
if (!(!routes || !params || Object.keys(params).length === 0)) {
|
161
|
+
for (const route of routes)
|
162
|
+
Object.assign(route, { params });
|
163
|
+
return routes;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
function createConfigItemAdditionalProperties(screen, pattern, routeNames, config = {}) {
|
167
|
+
const parts = [];
|
168
|
+
let isDynamic = !1;
|
169
|
+
const isIndex = screen === "index" || screen.endsWith("/index");
|
170
|
+
for (const part of pattern.split("/"))
|
171
|
+
part && (isDynamic ||= part.startsWith(":") || part.startsWith("*") || part.includes("*not-found"), (0, import_matchers.matchGroupName)(part) || parts.push(part));
|
172
|
+
const hasChildren = config.screens ? !!Object.keys(config.screens)?.length : !1, type = hasChildren ? "layout" : isDynamic ? "dynamic" : "static";
|
173
|
+
return isIndex && parts.push("index"), {
|
174
|
+
type,
|
175
|
+
isIndex,
|
176
|
+
hasChildren,
|
177
|
+
parts,
|
178
|
+
userReadableName: [...routeNames.slice(0, -1), config.path || screen].join("/"),
|
179
|
+
expandedRouteNames: routeNames.flatMap((name) => name.split("/"))
|
180
|
+
};
|
181
|
+
}
|
182
|
+
function parseQueryParamsExtended(path, route, parseConfig, hash) {
|
183
|
+
const searchParams = new URL(path, "https://phony.example").searchParams, params = /* @__PURE__ */ Object.create(null);
|
184
|
+
hash && (params["#"] = hash.slice(1));
|
185
|
+
for (const name of searchParams.keys())
|
186
|
+
if (route.params?.[name])
|
187
|
+
process.env.NODE_ENV !== "production" && console.warn(
|
188
|
+
`Route '/${route.name}' with param '${name}' was specified both in the path and as a param, removing from path`
|
189
|
+
);
|
190
|
+
else {
|
191
|
+
const values = parseConfig?.hasOwnProperty(name) ? searchParams.getAll(name).map((value) => parseConfig[name](value)) : searchParams.getAll(name);
|
192
|
+
params[name] = values.length === 1 ? values[0] : values;
|
193
|
+
}
|
194
|
+
return Object.keys(params).length ? params : void 0;
|
195
|
+
}
|
196
|
+
function stripBaseUrl(path, baseUrl = process.env.EXPO_BASE_URL) {
|
197
|
+
return process.env.NODE_ENV !== "development" && baseUrl ? path.replace(/^\/+/g, "/").replace(new RegExp(`^\\/?${escape(baseUrl)}`, "g"), "") : path;
|
198
|
+
}
|
199
|
+
//# sourceMappingURL=getStateFromPath-mods.js.map
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/fork/getStateFromPath-mods.ts"],
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,kCAAoB,6CACpB,kBAA2D;AAapD,SAAS,qCACd,MACA,UAA8B,QAAQ,IAAI,eAC1C;AACA,MAAI;AACJ,MAAI;AACF,aAAS,IAAI,IAAI,MAAM,uBAAuB;AAAA,EAChD,QAAQ;AAEN,WAAO;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV,qBAAqB;AAAA,MACrB,KAAK,IAAI,IAAI,uBAAuB;AAAA,IACtC;AAAA,EACF;AAEA,QAAM,WAAW,OAAO,UAClB,iBAAiB,aAAa,UAAU,OAAO,GAC/C,wBAAoB,4CAA2B,aAAa,MAAM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