@jsenv/navi 0.29.228 → 0.29.229
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/dev/jsenv_navi.js +61 -58
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +61 -58
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/AI_INSTRUCTIONS.md +3 -2
- package/docs/scroll.md +25 -0
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -64960,52 +64960,59 @@ const ListContent = ({
|
|
|
64960
64960
|
children
|
|
64961
64961
|
}) => {
|
|
64962
64962
|
const listProps = useContext(BoxForwardedPropsContext);
|
|
64963
|
-
return
|
|
64964
|
-
|
|
64965
|
-
|
|
64966
|
-
|
|
64967
|
-
|
|
64968
|
-
|
|
64969
|
-
|
|
64970
|
-
|
|
64971
|
-
|
|
64972
|
-
|
|
64973
|
-
|
|
64974
|
-
|
|
64975
|
-
|
|
64976
|
-
|
|
64977
|
-
|
|
64978
|
-
|
|
64979
|
-
|
|
64980
|
-
|
|
64981
|
-
|
|
64982
|
-
|
|
64983
|
-
|
|
64984
|
-
|
|
64985
|
-
|
|
64986
|
-
|
|
64987
|
-
|
|
64988
|
-
|
|
64989
|
-
|
|
64990
|
-
|
|
64991
|
-
|
|
64992
|
-
|
|
64993
|
-
|
|
64994
|
-
|
|
64995
|
-
|
|
64996
|
-
|
|
64997
|
-
|
|
64998
|
-
|
|
64999
|
-
|
|
65000
|
-
|
|
65001
|
-
|
|
65002
|
-
|
|
65003
|
-
|
|
65004
|
-
|
|
65005
|
-
|
|
64963
|
+
return (
|
|
64964
|
+
// Every provider the list puts around its items stands OUTSIDE the <ul>:
|
|
64965
|
+
// the walk that gives the rows their places (see ListDeclaredChildren) is
|
|
64966
|
+
// over the <ul>'s children, and one component between it and the caller's
|
|
64967
|
+
// rows is one child — all the rows would then stand in a single slot, and
|
|
64968
|
+
// reordering them would move nothing.
|
|
64969
|
+
jsx(PendingScrollRefContext.Provider, {
|
|
64970
|
+
value: pendingScrollRef,
|
|
64971
|
+
children: jsx(Box, {
|
|
64972
|
+
className: "navi_list_scroll_container",
|
|
64973
|
+
overflow: overflow,
|
|
64974
|
+
overflowX: overflowX,
|
|
64975
|
+
overflowY: overflowY,
|
|
64976
|
+
...scrollBoxPaddingProps,
|
|
64977
|
+
children: jsx(UnorderedList, {
|
|
64978
|
+
role: role,
|
|
64979
|
+
fallback: fallback,
|
|
64980
|
+
fallbackShown: fallbackShown,
|
|
64981
|
+
searchFallback: searchFallback,
|
|
64982
|
+
searchFallbackShown: searchFallbackShown,
|
|
64983
|
+
loadingPlaceholderShown: loadingPlaceholderShown,
|
|
64984
|
+
error: error,
|
|
64985
|
+
searchNoMatchMode: searchNoMatchMode,
|
|
64986
|
+
separator: separator,
|
|
64987
|
+
itemTransition: itemTransition,
|
|
64988
|
+
expandX: expandX
|
|
64989
|
+
// Deliberately not expandY here (unlike expandX above): the outer
|
|
64990
|
+
// .navi_list_container already gets its own expandY treatment (see
|
|
64991
|
+
// ListUI's own Box above) to fill whatever space its *own* parent
|
|
64992
|
+
// gives it (e.g. a flex-column ancestor's flex-grow) — the <ul>
|
|
64993
|
+
// itself must stay auto-height regardless, or it gets capped to
|
|
64994
|
+
// match .navi_list_scroll_container's own (possibly much smaller)
|
|
64995
|
+
// flex-resolved height instead of its real content height. That
|
|
64996
|
+
// breaks two things at once: virtual scroll's own filler sizing
|
|
64997
|
+
// (nothing to overflow into the scroll container in the first
|
|
64998
|
+
// place) and any sticky List.Item header/footer inside it (their
|
|
64999
|
+
// sticky "containing block" — the <ul>'s own box — would be
|
|
65000
|
+
// artificially small, so they run out of room to stay stuck well
|
|
65001
|
+
// before the user has actually scrolled through all the content).
|
|
65002
|
+
,
|
|
65003
|
+
horizontal: horizontal,
|
|
65004
|
+
spacing: spacing,
|
|
65005
|
+
columns: columns,
|
|
65006
|
+
itemColumns: itemColumns,
|
|
65007
|
+
...listProps,
|
|
65008
|
+
tracker: tracker,
|
|
65009
|
+
renderWindow: renderWindow,
|
|
65010
|
+
virtual: virtual,
|
|
65011
|
+
children: children
|
|
65012
|
+
})
|
|
65006
65013
|
})
|
|
65007
65014
|
})
|
|
65008
|
-
|
|
65015
|
+
);
|
|
65009
65016
|
};
|
|
65010
65017
|
// Where the items sit is a question about the track (the <ul>), not about the
|
|
65011
65018
|
// frame around it: the frame's only child is the scroll box, which fills it and
|
|
@@ -65210,17 +65217,14 @@ const useListScrollSync = ({
|
|
|
65210
65217
|
item
|
|
65211
65218
|
});
|
|
65212
65219
|
};
|
|
65213
|
-
|
|
65214
|
-
|
|
65215
|
-
|
|
65216
|
-
|
|
65217
|
-
const
|
|
65218
|
-
if (
|
|
65219
|
-
|
|
65220
|
-
|
|
65221
|
-
scrollItemIntoView(itemEl);
|
|
65222
|
-
return;
|
|
65223
|
-
}
|
|
65220
|
+
|
|
65221
|
+
// Whether the row is drawn is asked of the dom, not of the render window:
|
|
65222
|
+
// the window says what a run draws, and a list whose rows are declared one
|
|
65223
|
+
// by one has them all in the dom whatever the window says.
|
|
65224
|
+
const itemEl = findRowElement(getListEl(), item.id);
|
|
65225
|
+
if (itemEl) {
|
|
65226
|
+
scrollItemIntoView(itemEl);
|
|
65227
|
+
return;
|
|
65224
65228
|
}
|
|
65225
65229
|
// Not in DOM — shift the render window. The item will read
|
|
65226
65230
|
// pendingScrollRef on mount and scroll into view.
|
|
@@ -65342,9 +65346,8 @@ const useListScrollSync = ({
|
|
|
65342
65346
|
}, []);
|
|
65343
65347
|
// Watch scores of the top renderBudget items.
|
|
65344
65348
|
// When scores change during an active search, scroll to top to reveal the most relevant items.
|
|
65345
|
-
// When search becomes empty,
|
|
65346
|
-
//
|
|
65347
|
-
// and survives render-window shifts or item reordering.
|
|
65349
|
+
// When search becomes empty, put the list back at the offset (and the render
|
|
65350
|
+
// window) it was at when the search started — see docs/scroll.md.
|
|
65348
65351
|
|
|
65349
65352
|
// NOTE POUR LE JOUR OU ON A LE MULTISELECT:
|
|
65350
65353
|
// Lorsqu'on selectionne quelque chose pendant une recherche, alors ensuite meme si on clear
|