@jsenv/navi 0.11.1 → 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.
- package/dist/jsenv_navi.js +37 -39
- package/dist/jsenv_navi.js.map +16 -17
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -8765,20 +8765,17 @@ const ActiveRouteManager = ({
|
|
|
8765
8765
|
children
|
|
8766
8766
|
}) => {
|
|
8767
8767
|
const registerChildRouteFromContext = useContext(RegisterChildRouteContext);
|
|
8768
|
-
|
|
8768
|
+
getElementSignature(element);
|
|
8769
8769
|
const candidateSet = new Set();
|
|
8770
8770
|
const registerChildRoute = (ChildActiveElement, childRoute, childFallback) => {
|
|
8771
|
-
|
|
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
|
-
|
|
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(
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
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
|
-
|
|
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);
|