@jsenv/navi 0.14.13 → 0.14.15

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.
@@ -7810,9 +7810,14 @@ const createRoute = (urlPatternInput) => {
7810
7810
  buildRelativeUrl(params);
7811
7811
  let processedRelativeUrl = relativeUrl;
7812
7812
  if (processedRelativeUrl[0] === "/") {
7813
+ // we remove the leading slash because we want to resolve against baseUrl which may
7814
+ // not be the root url
7813
7815
  processedRelativeUrl = processedRelativeUrl.slice(1);
7814
7816
  }
7815
7817
  if (hasRawUrlPartWithInvalidChars) {
7818
+ if (!baseUrl.endsWith("/")) {
7819
+ return `${baseUrl}/${processedRelativeUrl}`;
7820
+ }
7816
7821
  return `${baseUrl}${processedRelativeUrl}`;
7817
7822
  }
7818
7823
  const url = new URL(processedRelativeUrl, baseUrl).href;
@@ -16548,9 +16553,10 @@ const LinkPlain = props => {
16548
16553
  } else {
16549
16554
  innerIcon = icon;
16550
16555
  }
16556
+ const innerChildren = children || href;
16551
16557
  return jsxs(Box, {
16552
16558
  as: "a",
16553
- color: anchor && !children ? "inherit" : undefined,
16559
+ color: anchor && !innerChildren ? "inherit" : undefined,
16554
16560
  id: anchor ? href.slice(1) : undefined,
16555
16561
  ...rest,
16556
16562
  ref: ref,
@@ -16602,8 +16608,8 @@ const LinkPlain = props => {
16602
16608
  children: [jsx(LoaderBackground, {
16603
16609
  loading: loading,
16604
16610
  color: "var(--link-loader-color)"
16605
- }), applySpacingOnTextChildren(children, spacing), innerIcon && jsx(Icon, {
16606
- marginLeft: children ? "xxs" : undefined,
16611
+ }), applySpacingOnTextChildren(innerChildren, spacing), innerIcon && jsx(Icon, {
16612
+ marginLeft: innerChildren ? "xxs" : undefined,
16607
16613
  children: innerIcon
16608
16614
  })]
16609
16615
  });