@cccsaurora/clue-ui 1.2.0-dev.152 → 1.2.0-dev.168

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.0
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 = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
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.1
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.1
514
+ * React Router DOM v6.30.3
495
515
  *
496
516
  * Copyright (c) Remix Software Inc.
497
517
  *
package/package.json CHANGED
@@ -61,9 +61,12 @@
61
61
  "react": "^18.3.1 || ^19.1.1",
62
62
  "react-dom": "^18.3.1 || ^19.1.1"
63
63
  },
64
+ "repository": {
65
+ "url": "https://github.com/CybercentreCanada/clue"
66
+ },
64
67
  "type": "module",
65
68
  "types": "main.d.ts",
66
- "version": "1.2.0-dev.152",
69
+ "version": "1.2.0-dev.168",
67
70
  "exports": {
68
71
  ".": "./main.js",
69
72
  "./index.css": "./index.css",
package/LICENSE DELETED
@@ -1,23 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Crown Copyright, Government of Canada (Canadian Centre for Cyber Security / Communications Security Establishment)
4
-
5
- Copyright title to all 3rd party software distributed with Clue is held by the respective copyright holders as noted in those files. Users are asked to read the 3rd Party Licenses referenced with those assets.
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.