@jsenv/navi 0.11.0 → 0.11.2

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.
@@ -8765,20 +8765,17 @@ const ActiveRouteManager = ({
8765
8765
  children
8766
8766
  }) => {
8767
8767
  const registerChildRouteFromContext = useContext(RegisterChildRouteContext);
8768
- const elementId = getElementSignature(element);
8768
+ getElementSignature(element);
8769
8769
  const candidateSet = new Set();
8770
8770
  const registerChildRoute = (ChildActiveElement, childRoute, childFallback) => {
8771
- const childElementId = getElementSignature(ChildActiveElement);
8772
- console.debug(`${elementId}.registerChildRoute(${childElementId})`);
8771
+ getElementSignature(ChildActiveElement);
8773
8772
  candidateSet.add({
8774
8773
  ActiveElement: ChildActiveElement,
8775
8774
  route: childRoute,
8776
8775
  fallback: childFallback
8777
8776
  });
8778
8777
  };
8779
- console.group(`👶 Discovery of ${elementId}`);
8780
8778
  useLayoutEffect(() => {
8781
- console.groupEnd();
8782
8779
  initRouteObserver({
8783
8780
  element,
8784
8781
  route,
@@ -8801,9 +8798,8 @@ const initRouteObserver = ({
8801
8798
  onActiveInfoChange,
8802
8799
  registerChildRouteFromContext
8803
8800
  }) => {
8804
- const elementId = getElementSignature(element);
8801
+ getElementSignature(element);
8805
8802
  const candidateElementIds = Array.from(candidateSet, c => getElementSignature(c.ActiveElement)).join(", ");
8806
- console.log(`🔍 initRouteObserver ${elementId}, candidates: ${candidateElementIds}`);
8807
8803
  const [publishCompositeStatus, subscribeCompositeStatus] = createPubSub();
8808
8804
  const compositeRoute = {
8809
8805
  urlPattern: `composite(${candidateElementIds})`,
@@ -8858,7 +8854,6 @@ const initRouteObserver = ({
8858
8854
  const ActiveElement = () => {
8859
8855
  useContentKey(activeRouteSignal.value.urlPattern);
8860
8856
  const SlotActiveElement = SlotActiveElementSignal.value;
8861
- console.log(`📄 Returning JSX element for ${getElementSignature(element)} with slot set to ${getElementSignature(SlotActiveElement)}`);
8862
8857
  if (typeof element === "function") {
8863
8858
  const Element = element;
8864
8859
  return jsx(SlotContext.Provider, {
@@ -11530,38 +11525,38 @@ const LinkPlain = forwardRef((props, ref) => {
11530
11525
  layout: true,
11531
11526
  typo: true
11532
11527
  });
11533
- return jsx(LoadableInlineElement, {
11534
- loading: loading,
11535
- color: "light-dark(#355fcc, #3b82f6)",
11536
- children: jsx("a", {
11537
- ...remainingProps,
11538
- ref: innerRef,
11539
- href: href,
11540
- className: innerClassName,
11541
- style: innerStyle,
11542
- "aria-busy": loading,
11543
- inert: disabled,
11544
- "data-disabled": disabled ? "" : undefined,
11545
- "data-readonly": readOnly ? "" : undefined,
11546
- "data-active": active ? "" : undefined,
11547
- "data-visited": visited || isVisited ? "" : undefined,
11548
- onClick: e => {
11549
- closeValidationMessage(e.target, "click");
11550
- if (readOnly) {
11551
- e.preventDefault();
11552
- return;
11553
- }
11554
- onClick?.(e);
11555
- },
11556
- onKeyDown: e => {
11557
- if (spaceToClick && e.key === " ") {
11558
- e.preventDefault(); // Prevent page scroll
11559
- if (!readOnly && !disabled) {
11560
- e.target.click();
11561
- }
11528
+ return jsx("a", {
11529
+ ...remainingProps,
11530
+ ref: innerRef,
11531
+ href: href,
11532
+ className: innerClassName,
11533
+ style: innerStyle,
11534
+ "aria-busy": loading,
11535
+ inert: disabled,
11536
+ "data-disabled": disabled ? "" : undefined,
11537
+ "data-readonly": readOnly ? "" : undefined,
11538
+ "data-active": active ? "" : undefined,
11539
+ "data-visited": visited || isVisited ? "" : undefined,
11540
+ onClick: e => {
11541
+ closeValidationMessage(e.target, "click");
11542
+ if (readOnly) {
11543
+ e.preventDefault();
11544
+ return;
11545
+ }
11546
+ onClick?.(e);
11547
+ },
11548
+ onKeyDown: e => {
11549
+ if (spaceToClick && e.key === " ") {
11550
+ e.preventDefault(); // Prevent page scroll
11551
+ if (!readOnly && !disabled) {
11552
+ e.target.click();
11562
11553
  }
11563
- onKeyDown?.(e);
11564
- },
11554
+ }
11555
+ onKeyDown?.(e);
11556
+ },
11557
+ children: jsx(LoaderBackground, {
11558
+ loading: loading,
11559
+ color: "light-dark(#355fcc, #3b82f6)",
11565
11560
  children: children
11566
11561
  })
11567
11562
  });
@@ -11672,6 +11667,9 @@ const RouteLink = ({
11672
11667
  children,
11673
11668
  ...rest
11674
11669
  }) => {
11670
+ if (!route) {
11671
+ throw new Error("RouteLink: route prop is required");
11672
+ }
11675
11673
  const {
11676
11674
  active
11677
11675
  } = useRouteStatus(route);