@cccsaurora/clue-ui 1.2.0-dev.152 → 1.2.0-dev.154
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.
|
@@ -8,7 +8,7 @@ import "react-dom";
|
|
|
8
8
|
import { Prism } from "react-syntax-highlighter";
|
|
9
9
|
import remarkGfm from "remark-gfm";
|
|
10
10
|
/**
|
|
11
|
-
* @remix-run/router v1.23.
|
|
11
|
+
* @remix-run/router v1.23.2
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) Remix Software Inc.
|
|
14
14
|
*
|
|
@@ -166,6 +166,8 @@ function stripBasename(pathname, basename) {
|
|
|
166
166
|
}
|
|
167
167
|
return pathname.slice(startIndex) || "/";
|
|
168
168
|
}
|
|
169
|
+
const ABSOLUTE_URL_REGEX$1 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
170
|
+
const isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX$1.test(url);
|
|
169
171
|
function resolvePath(to, fromPathname) {
|
|
170
172
|
if (fromPathname === void 0) {
|
|
171
173
|
fromPathname = "/";
|
|
@@ -175,7 +177,25 @@ function resolvePath(to, fromPathname) {
|
|
|
175
177
|
search: search2 = "",
|
|
176
178
|
hash = ""
|
|
177
179
|
} = typeof to === "string" ? parsePath(to) : to;
|
|
178
|
-
let pathname
|
|
180
|
+
let pathname;
|
|
181
|
+
if (toPathname) {
|
|
182
|
+
if (isAbsoluteUrl(toPathname)) {
|
|
183
|
+
pathname = toPathname;
|
|
184
|
+
} else {
|
|
185
|
+
if (toPathname.includes("//")) {
|
|
186
|
+
let oldPathname = toPathname;
|
|
187
|
+
toPathname = toPathname.replace(/\/\/+/g, "/");
|
|
188
|
+
warning(false, "Pathnames cannot have embedded double slashes - normalizing " + (oldPathname + " -> " + toPathname));
|
|
189
|
+
}
|
|
190
|
+
if (toPathname.startsWith("/")) {
|
|
191
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
192
|
+
} else {
|
|
193
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
pathname = fromPathname;
|
|
198
|
+
}
|
|
179
199
|
return {
|
|
180
200
|
pathname,
|
|
181
201
|
search: normalizeSearch(search2),
|
|
@@ -253,7 +273,7 @@ new Set(validMutationMethodsArr);
|
|
|
253
273
|
const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
|
|
254
274
|
new Set(validRequestMethodsArr);
|
|
255
275
|
/**
|
|
256
|
-
* React Router v6.30.
|
|
276
|
+
* React Router v6.30.3
|
|
257
277
|
*
|
|
258
278
|
* Copyright (c) Remix Software Inc.
|
|
259
279
|
*
|
|
@@ -491,7 +511,7 @@ function useNavigateStable() {
|
|
|
491
511
|
new Promise(() => {
|
|
492
512
|
});
|
|
493
513
|
/**
|
|
494
|
-
* React Router DOM v6.30.
|
|
514
|
+
* React Router DOM v6.30.3
|
|
495
515
|
*
|
|
496
516
|
* Copyright (c) Remix Software Inc.
|
|
497
517
|
*
|