@jsenv/navi 0.11.1 → 0.11.3
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 +63 -63
- package/dist/jsenv_navi.js.map +17 -18
- 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, {
|
|
@@ -9782,14 +9777,14 @@ const withPropsStyle = (
|
|
|
9782
9777
|
expandX = expand,
|
|
9783
9778
|
expandY = expand,
|
|
9784
9779
|
// typo props
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9780
|
+
textSize,
|
|
9781
|
+
textBold,
|
|
9782
|
+
textThin,
|
|
9783
|
+
textItalic,
|
|
9784
|
+
textUnderline,
|
|
9785
|
+
textUnderlineStyle,
|
|
9786
|
+
textUnderlineColor,
|
|
9787
|
+
textColor,
|
|
9793
9788
|
// props not related to styling
|
|
9794
9789
|
...remainingProps
|
|
9795
9790
|
} = props;
|
|
@@ -9957,35 +9952,37 @@ const withPropsStyle = (
|
|
|
9957
9952
|
}
|
|
9958
9953
|
typoStyles = {};
|
|
9959
9954
|
|
|
9960
|
-
if (
|
|
9961
|
-
const
|
|
9962
|
-
typeof
|
|
9963
|
-
|
|
9955
|
+
if (textSize) {
|
|
9956
|
+
const fontSize =
|
|
9957
|
+
typeof textSize === "string"
|
|
9958
|
+
? typoSizes[textSize] || textSize
|
|
9959
|
+
: textSize;
|
|
9960
|
+
typoStyles.fontSize = fontSize;
|
|
9964
9961
|
}
|
|
9965
|
-
if (
|
|
9962
|
+
if (textBold) {
|
|
9966
9963
|
typoStyles.fontWeight = "bold";
|
|
9967
|
-
} else if (
|
|
9964
|
+
} else if (textThin) {
|
|
9968
9965
|
typoStyles.fontWeight = "thin";
|
|
9969
|
-
} else if (
|
|
9966
|
+
} else if (textThin === false || textBold === false) {
|
|
9970
9967
|
typoStyles.fontWeight = "normal";
|
|
9971
9968
|
}
|
|
9972
|
-
if (
|
|
9969
|
+
if (textItalic) {
|
|
9973
9970
|
typoStyles.fontStyle = "italic";
|
|
9974
|
-
} else if (
|
|
9971
|
+
} else if (textItalic === false) {
|
|
9975
9972
|
typoStyles.fontStyle = "normal";
|
|
9976
9973
|
}
|
|
9977
|
-
if (
|
|
9974
|
+
if (textUnderline) {
|
|
9978
9975
|
typoStyles.textDecoration = "underline";
|
|
9979
|
-
} else if (
|
|
9976
|
+
} else if (textUnderline === false) {
|
|
9980
9977
|
typoStyles.textDecoration = "none";
|
|
9981
9978
|
}
|
|
9982
|
-
if (
|
|
9983
|
-
typoStyles.textDecorationStyle =
|
|
9979
|
+
if (textUnderlineStyle) {
|
|
9980
|
+
typoStyles.textDecorationStyle = textUnderlineStyle;
|
|
9984
9981
|
}
|
|
9985
|
-
if (
|
|
9986
|
-
typoStyles.textDecorationColor =
|
|
9982
|
+
if (textUnderlineColor) {
|
|
9983
|
+
typoStyles.textDecorationColor = textUnderlineColor;
|
|
9987
9984
|
}
|
|
9988
|
-
typoStyles.color =
|
|
9985
|
+
typoStyles.color = textColor;
|
|
9989
9986
|
}
|
|
9990
9987
|
props_styles: {
|
|
9991
9988
|
if (!style && !hasRemainingConfig) {
|
|
@@ -11530,38 +11527,38 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11530
11527
|
layout: true,
|
|
11531
11528
|
typo: true
|
|
11532
11529
|
});
|
|
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
|
-
}
|
|
11530
|
+
return jsx("a", {
|
|
11531
|
+
...remainingProps,
|
|
11532
|
+
ref: innerRef,
|
|
11533
|
+
href: href,
|
|
11534
|
+
className: innerClassName,
|
|
11535
|
+
style: innerStyle,
|
|
11536
|
+
"aria-busy": loading,
|
|
11537
|
+
inert: disabled,
|
|
11538
|
+
"data-disabled": disabled ? "" : undefined,
|
|
11539
|
+
"data-readonly": readOnly ? "" : undefined,
|
|
11540
|
+
"data-active": active ? "" : undefined,
|
|
11541
|
+
"data-visited": visited || isVisited ? "" : undefined,
|
|
11542
|
+
onClick: e => {
|
|
11543
|
+
closeValidationMessage(e.target, "click");
|
|
11544
|
+
if (readOnly) {
|
|
11545
|
+
e.preventDefault();
|
|
11546
|
+
return;
|
|
11547
|
+
}
|
|
11548
|
+
onClick?.(e);
|
|
11549
|
+
},
|
|
11550
|
+
onKeyDown: e => {
|
|
11551
|
+
if (spaceToClick && e.key === " ") {
|
|
11552
|
+
e.preventDefault(); // Prevent page scroll
|
|
11553
|
+
if (!readOnly && !disabled) {
|
|
11554
|
+
e.target.click();
|
|
11562
11555
|
}
|
|
11563
|
-
|
|
11564
|
-
|
|
11556
|
+
}
|
|
11557
|
+
onKeyDown?.(e);
|
|
11558
|
+
},
|
|
11559
|
+
children: jsx(LoaderBackground, {
|
|
11560
|
+
loading: loading,
|
|
11561
|
+
color: "light-dark(#355fcc, #3b82f6)",
|
|
11565
11562
|
children: children
|
|
11566
11563
|
})
|
|
11567
11564
|
});
|
|
@@ -11672,6 +11669,9 @@ const RouteLink = ({
|
|
|
11672
11669
|
children,
|
|
11673
11670
|
...rest
|
|
11674
11671
|
}) => {
|
|
11672
|
+
if (!route) {
|
|
11673
|
+
throw new Error("RouteLink: route prop is required");
|
|
11674
|
+
}
|
|
11675
11675
|
const {
|
|
11676
11676
|
active
|
|
11677
11677
|
} = useRouteStatus(route);
|