Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions ui/extensions/hello/src/dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4157,7 +4157,7 @@ function useFalconApiContext() {
}

/**
* react-router v7.8.0
* react-router v7.8.1
*
* Copyright (c) Remix Software Inc.
*
Expand Down Expand Up @@ -4232,15 +4232,18 @@ function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
}
return matches;
}
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "") {
let flattenRoute = (route, index, relativePath) => {
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
let meta = {
relativePath: relativePath === void 0 ? route.path || "" : relativePath,
caseSensitive: route.caseSensitive === true,
childrenIndex: index,
route
};
if (meta.relativePath.startsWith("/")) {
if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {
return;
}
invariant(
meta.relativePath.startsWith(parentPath),
`Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
Expand All @@ -4256,7 +4259,13 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "")
route.index !== true,
`Index routes must not have child routes. Please remove all child routes from route path "${path}".`
);
flattenRoutes(route.children, branches, routesMeta, path);
flattenRoutes(
route.children,
branches,
routesMeta,
path,
hasParentOptionalSegments
);
}
if (route.path == null && !route.index) {
return;
Expand All @@ -4272,7 +4281,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "")
flattenRoute(route, index);
} else {
for (let exploded of explodeOptionalSegments(route.path)) {
flattenRoute(route, index, exploded);
flattenRoute(route, index, true, exploded);
}
}
});
Expand Down Expand Up @@ -4436,7 +4445,7 @@ function compilePath(path, caseSensitive = false, end = true) {
params.push({ paramName, isOptional: isOptional != null });
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
}
);
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
if (path.endsWith("*")) {
params.push({ paramName: "*" });
regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
Expand Down Expand Up @@ -5538,7 +5547,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
try {
if (isBrowser) {
window.__reactRouterVersion = // @ts-expect-error
"7.8.0";
"7.8.1";
}
} catch (e) {
}
Expand Down