solid-navigator 0.3.11 → 0.3.12

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/dev.js CHANGED
@@ -285,6 +285,9 @@ var createNavigate = (routes, pathname, setPathname, setHashAndSearch) => {
285
285
  if (newPath.startsWith("./")) {
286
286
  newPath = currentPathname + "/" + newPath.slice(2);
287
287
  }
288
+ if (newPath.startsWith("../")) {
289
+ newPath = currentPathname + "/" + newPath.slice(3);
290
+ }
288
291
  if (options?.replace) {
289
292
  history.replaceState(options.state || null, "", newPath);
290
293
  } else {
@@ -385,6 +388,9 @@ var A = (props) => {
385
388
  if (newPath.startsWith("./")) {
386
389
  newPath = currentPathname + "/" + newPath.slice(2);
387
390
  }
391
+ if (newPath.startsWith("../")) {
392
+ newPath = currentPathname + "/" + newPath.slice(3);
393
+ }
388
394
  return newPath;
389
395
  };
390
396
  return (() => {
package/dist/dev.jsx CHANGED
@@ -291,6 +291,9 @@ var createNavigate = (routes, pathname, setPathname, setHashAndSearch) => {
291
291
  if (newPath.startsWith("./")) {
292
292
  newPath = currentPathname + "/" + newPath.slice(2);
293
293
  }
294
+ if (newPath.startsWith("../")) {
295
+ newPath = currentPathname + "/" + newPath.slice(3);
296
+ }
294
297
  if (options?.replace) {
295
298
  history.replaceState(options.state || null, "", newPath);
296
299
  } else {
@@ -399,14 +402,12 @@ var A = (props) => {
399
402
  if (newPath.startsWith("./")) {
400
403
  newPath = currentPathname + "/" + newPath.slice(2);
401
404
  }
405
+ if (newPath.startsWith("../")) {
406
+ newPath = currentPathname + "/" + newPath.slice(3);
407
+ }
402
408
  return newPath;
403
409
  };
404
- return <a
405
- {...rest}
406
- href={resolvedHref()}
407
- sn-link
408
- d-state={JSON.stringify(props.state)}
409
- />;
410
+ return <a {...rest} href={resolvedHref()} sn-link d-state={JSON.stringify(props.state)} />;
410
411
  };
411
412
  var useMatch = (path) => {
412
413
  const location2 = useLocation();
package/dist/index.js CHANGED
@@ -285,6 +285,9 @@ var createNavigate = (routes, pathname, setPathname, setHashAndSearch) => {
285
285
  if (newPath.startsWith("./")) {
286
286
  newPath = currentPathname + "/" + newPath.slice(2);
287
287
  }
288
+ if (newPath.startsWith("../")) {
289
+ newPath = currentPathname + "/" + newPath.slice(3);
290
+ }
288
291
  if (options?.replace) {
289
292
  history.replaceState(options.state || null, "", newPath);
290
293
  } else {
@@ -381,6 +384,9 @@ var A = (props) => {
381
384
  if (newPath.startsWith("./")) {
382
385
  newPath = currentPathname + "/" + newPath.slice(2);
383
386
  }
387
+ if (newPath.startsWith("../")) {
388
+ newPath = currentPathname + "/" + newPath.slice(3);
389
+ }
384
390
  return newPath;
385
391
  };
386
392
  return (() => {
package/dist/index.jsx CHANGED
@@ -291,6 +291,9 @@ var createNavigate = (routes, pathname, setPathname, setHashAndSearch) => {
291
291
  if (newPath.startsWith("./")) {
292
292
  newPath = currentPathname + "/" + newPath.slice(2);
293
293
  }
294
+ if (newPath.startsWith("../")) {
295
+ newPath = currentPathname + "/" + newPath.slice(3);
296
+ }
294
297
  if (options?.replace) {
295
298
  history.replaceState(options.state || null, "", newPath);
296
299
  } else {
@@ -396,14 +399,12 @@ var A = (props) => {
396
399
  if (newPath.startsWith("./")) {
397
400
  newPath = currentPathname + "/" + newPath.slice(2);
398
401
  }
402
+ if (newPath.startsWith("../")) {
403
+ newPath = currentPathname + "/" + newPath.slice(3);
404
+ }
399
405
  return newPath;
400
406
  };
401
- return <a
402
- {...rest}
403
- href={resolvedHref()}
404
- sn-link
405
- d-state={JSON.stringify(props.state)}
406
- />;
407
+ return <a {...rest} href={resolvedHref()} sn-link d-state={JSON.stringify(props.state)} />;
407
408
  };
408
409
  var useMatch = (path) => {
409
410
  const location2 = useLocation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-navigator",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Solid Navigator is a library that is inspired by vue router and solid router.",
5
5
  "license": "MIT",
6
6
  "author": "SupertigerDev",