@jsenv/navi 0.21.5 → 0.21.7
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 +78 -40
- package/dist/jsenv_navi.js.map +5 -6
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -12389,10 +12389,23 @@ const route = (pattern, { searchParams } = {}) => {
|
|
|
12389
12389
|
|
|
12390
12390
|
// If we found a more specific route, delegate to it; otherwise handle it ourselves
|
|
12391
12391
|
if (!isMostSpecificRoute) {
|
|
12392
|
-
//
|
|
12393
|
-
//
|
|
12392
|
+
// For signal-originated calls, only skip delegation if the more specific route
|
|
12393
|
+
// has its own signal connection for the same params — meaning its own effect will
|
|
12394
|
+
// fire and handle the redirect. If it doesn't have the connection, the signal
|
|
12395
|
+
// change would be silently dropped, so we must delegate anyway.
|
|
12394
12396
|
if (isSignalChange) {
|
|
12395
|
-
|
|
12397
|
+
const mostSpecificRoutePrivateProperties =
|
|
12398
|
+
getRoutePrivateProperties(mostSpecificRoute);
|
|
12399
|
+
const { pathConnectionMap, queryConnectionMap } =
|
|
12400
|
+
mostSpecificRoutePrivateProperties.routePattern;
|
|
12401
|
+
const willHandleItself = Object.keys(newParams).every(
|
|
12402
|
+
(paramName) =>
|
|
12403
|
+
pathConnectionMap.has(paramName) ||
|
|
12404
|
+
queryConnectionMap.has(paramName),
|
|
12405
|
+
);
|
|
12406
|
+
if (willHandleItself) {
|
|
12407
|
+
return null;
|
|
12408
|
+
}
|
|
12396
12409
|
}
|
|
12397
12410
|
return mostSpecificRoute.redirectTo(newParams, {
|
|
12398
12411
|
callReason: `replaceParams delegation from ${route} to ${mostSpecificRoute} (original reason: ${callReason})`,
|
|
@@ -18829,6 +18842,7 @@ const css$3 = /* css */`
|
|
|
18829
18842
|
|
|
18830
18843
|
.navi_text {
|
|
18831
18844
|
position: relative;
|
|
18845
|
+
border-radius: var(--x-border-radius);
|
|
18832
18846
|
|
|
18833
18847
|
/* There is a chrome specific bug that prevents text-transform: capitalize to be applied in nested DOM structure */
|
|
18834
18848
|
/* The CSS below ensure capitalize is propagated to the bold clones */
|
|
@@ -18880,35 +18894,59 @@ const css$3 = /* css */`
|
|
|
18880
18894
|
}
|
|
18881
18895
|
}
|
|
18882
18896
|
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
&[data-text-overflow][data-skeleton] {
|
|
18886
|
-
flex-wrap: nowrap;
|
|
18887
|
-
text-overflow: clip;
|
|
18888
|
-
/* overflow:hidden on [data-text-overflow] would clip the absolutely
|
|
18889
|
-
positioned skeleton span — keep it visible */
|
|
18890
|
-
overflow: visible;
|
|
18897
|
+
&[data-skeleton] {
|
|
18898
|
+
--x-border-radius: 0.2em;
|
|
18891
18899
|
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
display: contents;
|
|
18900
|
+
/* Children stay in the DOM to preserve natural layout dimensions,
|
|
18901
|
+
but are hidden so only the skeleton is visible. */
|
|
18902
|
+
visibility: hidden;
|
|
18896
18903
|
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18904
|
+
/* When there are no children a placeholder "W" is injected (see JSX).
|
|
18905
|
+
It must stretch to the full available width so the skeleton
|
|
18906
|
+
fills the container rather than collapsing to a single character. */
|
|
18907
|
+
.navi_text_skeleton_children_placeholder {
|
|
18908
|
+
display: inline-flex;
|
|
18909
|
+
width: 100%;
|
|
18901
18910
|
}
|
|
18902
|
-
}
|
|
18903
18911
|
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
|
|
18912
|
+
/* Three-level structure to respect padding AND border-radius:
|
|
18913
|
+
|
|
18914
|
+
1. navi_text_skeleton_container — absolutely fills the border box
|
|
18915
|
+
(inset:0), then applies padding:inherit so its content box equals
|
|
18916
|
+
the parent's content box. line-height:normal prevents the container
|
|
18917
|
+
from inheriting a large line-height that would make it taller than
|
|
18918
|
+
the border box. border-radius:inherit passes the radius down.
|
|
18919
|
+
visibility:visible overrides the parent's visibility:hidden.
|
|
18920
|
+
|
|
18921
|
+
2. navi_text_skeleton_inset — a relative block that fills 100% of the
|
|
18922
|
+
container's content box (= parent's content box). It is the
|
|
18923
|
+
positioned ancestor for the absolutely placed skeleton bar.
|
|
18924
|
+
border-radius:inherit chains the radius further down.
|
|
18925
|
+
|
|
18926
|
+
3. navi_text_skeleton — the visible gradient bar. position:absolute
|
|
18927
|
+
inset:0 fills the inset box precisely. border-radius:inherit
|
|
18928
|
+
finally applies the radius at this level, which is now correctly
|
|
18929
|
+
sized to the content area. */
|
|
18930
|
+
.navi_text_skeleton_container {
|
|
18931
|
+
position: absolute;
|
|
18932
|
+
inset: 0;
|
|
18933
|
+
padding: inherit;
|
|
18934
|
+
line-height: normal;
|
|
18935
|
+
border-radius: inherit;
|
|
18936
|
+
visibility: visible;
|
|
18937
|
+
}
|
|
18938
|
+
|
|
18939
|
+
.navi_text_skeleton_inset {
|
|
18940
|
+
position: relative;
|
|
18941
|
+
display: inline-flex;
|
|
18942
|
+
width: 100%;
|
|
18943
|
+
height: 100%;
|
|
18944
|
+
border-radius: inherit;
|
|
18945
|
+
}
|
|
18907
18946
|
|
|
18908
18947
|
.navi_text_skeleton {
|
|
18909
18948
|
position: absolute;
|
|
18910
18949
|
inset: 0;
|
|
18911
|
-
/* top/bottom inset may not perfectly align with text bounds — acceptable */
|
|
18912
18950
|
background: linear-gradient(
|
|
18913
18951
|
90deg,
|
|
18914
18952
|
#e0e0e0 25%,
|
|
@@ -18916,14 +18954,7 @@ const css$3 = /* css */`
|
|
|
18916
18954
|
#e0e0e0 75%
|
|
18917
18955
|
);
|
|
18918
18956
|
background-size: 200% 100%;
|
|
18919
|
-
border-radius:
|
|
18920
|
-
visibility: visible;
|
|
18921
|
-
}
|
|
18922
|
-
|
|
18923
|
-
&[data-empty] {
|
|
18924
|
-
.navi_text_skeleton {
|
|
18925
|
-
height: 1em;
|
|
18926
|
-
}
|
|
18957
|
+
border-radius: inherit;
|
|
18927
18958
|
}
|
|
18928
18959
|
|
|
18929
18960
|
&[data-loading] {
|
|
@@ -19126,25 +19157,32 @@ const TextSkeleton = ({
|
|
|
19126
19157
|
children,
|
|
19127
19158
|
...props
|
|
19128
19159
|
}) => {
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19160
|
+
// Three-level structure — see CSS comment on [data-skeleton] for details.
|
|
19161
|
+
const skeletonOverlay = jsx("span", {
|
|
19162
|
+
className: "navi_text_skeleton_container",
|
|
19163
|
+
"aria-hidden": "true",
|
|
19164
|
+
children: jsx("span", {
|
|
19165
|
+
className: "navi_text_skeleton_inset",
|
|
19166
|
+
children: jsx("span", {
|
|
19167
|
+
className: "navi_text_skeleton"
|
|
19168
|
+
})
|
|
19169
|
+
})
|
|
19132
19170
|
});
|
|
19133
|
-
// When there are no children
|
|
19134
|
-
//
|
|
19135
|
-
//
|
|
19171
|
+
// When there are no children, inject a full-width placeholder so the element
|
|
19172
|
+
// has measurable height driven by the current font-size/line-height, and the
|
|
19173
|
+
// skeleton fills the available width instead of shrinking to a single char.
|
|
19136
19174
|
const hasChildren = children !== null && children !== undefined && children !== false;
|
|
19137
19175
|
const innerChildren = hasChildren ? children : jsx("span", {
|
|
19176
|
+
className: "navi_text_skeleton_children_placeholder",
|
|
19138
19177
|
"aria-hidden": "true",
|
|
19139
19178
|
children: "W"
|
|
19140
19179
|
});
|
|
19141
19180
|
return jsx(Text, {
|
|
19142
19181
|
"data-skeleton": "",
|
|
19143
19182
|
"data-loading": loading ? "" : undefined,
|
|
19144
|
-
"data-empty": !hasChildren ? "" : undefined,
|
|
19145
19183
|
...props,
|
|
19146
19184
|
skeleton: undefined,
|
|
19147
|
-
childrenOutsideFlow:
|
|
19185
|
+
childrenOutsideFlow: skeletonOverlay,
|
|
19148
19186
|
children: innerChildren
|
|
19149
19187
|
});
|
|
19150
19188
|
};
|