@react-navigation/core
Advanced tools
Comparing version 7.1.1 to 7.1.2
@@ -199,8 +199,13 @@ "use strict"; | ||
} | ||
if (typeof screenConfig.path === 'string') { | ||
// Normalize the path to remove leading and trailing slashes | ||
screenConfig.path = screenConfig.path.split('/').filter(Boolean).join('/'); | ||
} | ||
} | ||
let screens; | ||
const skipInitialDetectionInChild = skipInitialDetection || screenConfig.path != null && screenConfig.path !== ''; | ||
if ('config' in item) { | ||
screens = createPathConfigForTree(item, undefined, skipInitialDetection || screenConfig.path != null); | ||
screens = createPathConfigForTree(item, undefined, skipInitialDetectionInChild); | ||
} else if ('screen' in item && 'config' in item.screen && (item.screen.config.screens || item.screen.config.groups)) { | ||
screens = createPathConfigForTree(item.screen, undefined, skipInitialDetection || screenConfig.path != null); | ||
screens = createPathConfigForTree(item.screen, undefined, skipInitialDetectionInChild); | ||
} | ||
@@ -214,11 +219,6 @@ if (screens) { | ||
if (screenConfig.path != null) { | ||
if (!skipInitialDetection) { | ||
// Normalize the path to remove leading and trailing slashes | ||
const path = screenConfig.path?.split('/').filter(Boolean).join('/'); | ||
if (!skipInitialDetection && screenConfig.path === '') { | ||
// We encounter a leaf screen with empty path, | ||
// Clear the initial screen config as it's not needed anymore | ||
if (!skipInitialDetection && path === '') { | ||
initialScreenConfig = undefined; | ||
} | ||
initialScreenConfig = undefined; | ||
} | ||
@@ -225,0 +225,0 @@ } else { |
@@ -7,22 +7,4 @@ "use strict"; | ||
exports.PrivateValueStore = void 0; | ||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } | ||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } | ||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } | ||
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } | ||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } | ||
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } | ||
let PrivateValueStore = exports.PrivateValueStore = /*#__PURE__*/_createClass(function PrivateValueStore() { | ||
_classCallCheck(this, PrivateValueStore); | ||
/** | ||
* UGLY HACK! DO NOT USE THE TYPE!!! | ||
* | ||
* TypeScript requires a type to be used to be able to infer it. | ||
* The type should exist as its own without any operations such as union. | ||
* So we need to figure out a way to store this type in a property. | ||
* The problem with a normal property is that it shows up in intelliSense. | ||
* Adding private keyword works, but the annotation is stripped away in declaration. | ||
* Turns out if we use an empty string, it doesn't show up in intelliSense. | ||
*/ | ||
_defineProperty(this, '', void 0); | ||
}); | ||
class PrivateValueStore {} | ||
exports.PrivateValueStore = PrivateValueStore; | ||
//# sourceMappingURL=types.js.map |
@@ -192,8 +192,13 @@ "use strict"; | ||
} | ||
if (typeof screenConfig.path === 'string') { | ||
// Normalize the path to remove leading and trailing slashes | ||
screenConfig.path = screenConfig.path.split('/').filter(Boolean).join('/'); | ||
} | ||
} | ||
let screens; | ||
const skipInitialDetectionInChild = skipInitialDetection || screenConfig.path != null && screenConfig.path !== ''; | ||
if ('config' in item) { | ||
screens = createPathConfigForTree(item, undefined, skipInitialDetection || screenConfig.path != null); | ||
screens = createPathConfigForTree(item, undefined, skipInitialDetectionInChild); | ||
} else if ('screen' in item && 'config' in item.screen && (item.screen.config.screens || item.screen.config.groups)) { | ||
screens = createPathConfigForTree(item.screen, undefined, skipInitialDetection || screenConfig.path != null); | ||
screens = createPathConfigForTree(item.screen, undefined, skipInitialDetectionInChild); | ||
} | ||
@@ -207,11 +212,6 @@ if (screens) { | ||
if (screenConfig.path != null) { | ||
if (!skipInitialDetection) { | ||
// Normalize the path to remove leading and trailing slashes | ||
const path = screenConfig.path?.split('/').filter(Boolean).join('/'); | ||
if (!skipInitialDetection && screenConfig.path === '') { | ||
// We encounter a leaf screen with empty path, | ||
// Clear the initial screen config as it's not needed anymore | ||
if (!skipInitialDetection && path === '') { | ||
initialScreenConfig = undefined; | ||
} | ||
initialScreenConfig = undefined; | ||
} | ||
@@ -218,0 +218,0 @@ } else { |
"use strict"; | ||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } | ||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } | ||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } | ||
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } | ||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } | ||
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } | ||
export let PrivateValueStore = /*#__PURE__*/_createClass(function PrivateValueStore() { | ||
_classCallCheck(this, PrivateValueStore); | ||
/** | ||
* UGLY HACK! DO NOT USE THE TYPE!!! | ||
* | ||
* TypeScript requires a type to be used to be able to infer it. | ||
* The type should exist as its own without any operations such as union. | ||
* So we need to figure out a way to store this type in a property. | ||
* The problem with a normal property is that it shows up in intelliSense. | ||
* Adding private keyword works, but the annotation is stripped away in declaration. | ||
* Turns out if we use an empty string, it doesn't show up in intelliSense. | ||
*/ | ||
_defineProperty(this, '', void 0); | ||
}); | ||
export class PrivateValueStore {} | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@react-navigation/core", | ||
"description": "Core utilities for building navigators", | ||
"version": "7.1.1", | ||
"version": "7.1.2", | ||
"keywords": [ | ||
@@ -49,3 +49,3 @@ "react", | ||
"dependencies": { | ||
"@react-navigation/routers": "^7.1.0", | ||
"@react-navigation/routers": "^7.1.1", | ||
"escape-string-regexp": "^4.0.0", | ||
@@ -67,3 +67,3 @@ "nanoid": "3.3.7", | ||
"react": "18.3.1", | ||
"react-native-builder-bob": "^0.29.0", | ||
"react-native-builder-bob": "^0.33.2", | ||
"react-test-renderer": "18.2.0", | ||
@@ -100,3 +100,3 @@ "typescript": "^5.5.2" | ||
}, | ||
"gitHead": "2412e4baf33f625f134135bb2d1715e9f25c8feb" | ||
"gitHead": "a299403df5bed6c32a343fbbf7ce8e008d9a8b30" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1217304
635
18999