@jsenv/navi 0.30.37 → 0.30.38
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 +38 -12
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +38 -12
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/scroll.md +6 -0
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -42632,7 +42632,12 @@ const watchRowScroll = (
|
|
|
42632
42632
|
};
|
|
42633
42633
|
|
|
42634
42634
|
installImportMetaCssBuild(import.meta);
|
|
42635
|
-
const css$16 = /* css
|
|
42635
|
+
const css$16 = /* css */`@property --navi-route-row-pin {
|
|
42636
|
+
syntax: "*";
|
|
42637
|
+
inherits: false
|
|
42638
|
+
}
|
|
42639
|
+
|
|
42640
|
+
.navi_route_travel {
|
|
42636
42641
|
flex-direction: column;
|
|
42637
42642
|
display: flex;
|
|
42638
42643
|
position: relative;
|
|
@@ -42688,7 +42693,7 @@ const css$16 = /* css */`.navi_route_travel {
|
|
|
42688
42693
|
display: flex;
|
|
42689
42694
|
}
|
|
42690
42695
|
|
|
42691
|
-
& > [data-route-row-pane][inert]:not([data-route-row-held]),
|
|
42696
|
+
& > [data-route-row-pane][inert]:not([data-route-row-held]), &[data-route-row-holding] > [data-route-row-pane]:not([data-route-row-held]) {
|
|
42692
42697
|
top: var(--navi-route-row-pin, 0);
|
|
42693
42698
|
contain: paint;
|
|
42694
42699
|
max-height: 100dvh;
|
|
@@ -42860,11 +42865,25 @@ const RouteTravel = ({
|
|
|
42860
42865
|
// when the row rests. Not what readers are told the page held is
|
|
42861
42866
|
// (route_travel_hold.js): that follows the hand, and goes at its lift.
|
|
42862
42867
|
const heldPaneRef = useRef(null);
|
|
42863
|
-
const releasePaneAtRest =
|
|
42868
|
+
const releasePaneAtRest = row => {
|
|
42864
42869
|
const heldPane = heldPaneRef.current;
|
|
42865
42870
|
if (heldPane) {
|
|
42866
42871
|
heldPaneRef.current = null;
|
|
42867
42872
|
heldPane.removeAttribute("data-route-row-held");
|
|
42873
|
+
row.removeAttribute("data-route-row-holding");
|
|
42874
|
+
}
|
|
42875
|
+
};
|
|
42876
|
+
|
|
42877
|
+
// How far down the reader is looking, on every pane, for those the CSS pins.
|
|
42878
|
+
const pinPanes = row => {
|
|
42879
|
+
const pin = `${pinOf(row)}px`;
|
|
42880
|
+
for (const pane of panesOf(row)) {
|
|
42881
|
+
pane.style.setProperty("--navi-route-row-pin", pin);
|
|
42882
|
+
}
|
|
42883
|
+
};
|
|
42884
|
+
const unpinPanes = row => {
|
|
42885
|
+
for (const pane of panesOf(row)) {
|
|
42886
|
+
pane.style.removeProperty("--navi-route-row-pin");
|
|
42868
42887
|
}
|
|
42869
42888
|
};
|
|
42870
42889
|
|
|
@@ -42891,13 +42910,14 @@ const RouteTravel = ({
|
|
|
42891
42910
|
if (!windowed && paneAtRest) {
|
|
42892
42911
|
heldPaneRef.current = paneAtRest;
|
|
42893
42912
|
paneAtRest.setAttribute("data-route-row-held", "");
|
|
42913
|
+
row.setAttribute("data-route-row-holding", "");
|
|
42894
42914
|
}
|
|
42895
42915
|
if (movement.scrollsDocument) {
|
|
42896
42916
|
// Whatever the browser does with the offset meanwhile (clamping it to a page
|
|
42897
42917
|
// shorter than the trip) is not the reader scrolling, and the address it
|
|
42898
42918
|
// would be written against may already be another page's.
|
|
42899
42919
|
movement.resumeScrollRecording = suspendScrollRecording();
|
|
42900
|
-
|
|
42920
|
+
pinPanes(row);
|
|
42901
42921
|
}
|
|
42902
42922
|
return movement;
|
|
42903
42923
|
};
|
|
@@ -43190,7 +43210,7 @@ const RouteTravel = ({
|
|
|
43190
43210
|
row.removeAttribute("data-route-row-taken");
|
|
43191
43211
|
publishRouteRowMove(null);
|
|
43192
43212
|
releaseHeldPage();
|
|
43193
|
-
releasePaneAtRest();
|
|
43213
|
+
releasePaneAtRest(row);
|
|
43194
43214
|
if (liveRef.current) {
|
|
43195
43215
|
liveRef.current.style.top = "";
|
|
43196
43216
|
}
|
|
@@ -43198,7 +43218,7 @@ const RouteTravel = ({
|
|
|
43198
43218
|
picture.remove();
|
|
43199
43219
|
}
|
|
43200
43220
|
if (movement.scrollsDocument) {
|
|
43201
|
-
|
|
43221
|
+
unpinPanes(row);
|
|
43202
43222
|
const {
|
|
43203
43223
|
pages,
|
|
43204
43224
|
currentIndex
|
|
@@ -43503,7 +43523,7 @@ const RouteTravel = ({
|
|
|
43503
43523
|
movementRef.current = null;
|
|
43504
43524
|
publishRouteRowMove(null);
|
|
43505
43525
|
releaseHeldPage();
|
|
43506
|
-
releasePaneAtRest();
|
|
43526
|
+
releasePaneAtRest(row);
|
|
43507
43527
|
};
|
|
43508
43528
|
}, [windowed]);
|
|
43509
43529
|
|
|
@@ -43567,7 +43587,7 @@ const RouteTravel = ({
|
|
|
43567
43587
|
const row = rowRef.current;
|
|
43568
43588
|
const onTouchStart = () => {
|
|
43569
43589
|
if (!movementRef.current && rowFollowsDocument(row)) {
|
|
43570
|
-
|
|
43590
|
+
pinPanes(row);
|
|
43571
43591
|
}
|
|
43572
43592
|
};
|
|
43573
43593
|
row.addEventListener("touchstart", onTouchStart, {
|
|
@@ -84371,9 +84391,15 @@ const PickerNaviMinute = props => {
|
|
|
84371
84391
|
* element crossing the cursor — a dozen per wheel tick. Those hovers are noise:
|
|
84372
84392
|
* the user asked to scroll, not to hover. Anything doing real work on hover (a
|
|
84373
84393
|
* map highlight, a preview, a prefetch) then pays for that noise on the main
|
|
84374
|
-
* thread, exactly while a scroll animation is running. A rule
|
|
84375
|
-
* `[navi-scrolling]
|
|
84376
|
-
*
|
|
84394
|
+
* thread, exactly while a scroll animation is running. A rule like
|
|
84395
|
+
* `[navi-scrolling] .my_row { pointer-events: none }` takes the rows out of
|
|
84396
|
+
* hit-testing and the browser suppresses it all.
|
|
84397
|
+
*
|
|
84398
|
+
* Such a rule must end on a class (or an id, a tag, an attribute) of what it
|
|
84399
|
+
* styles: Chrome then restyles only those elements when the attribute comes and
|
|
84400
|
+
* goes. One ending on `*`, including `.my_row:is([navi-scrolling] *)`, gives it
|
|
84401
|
+
* nothing to narrow to, so it restyles everything under the scroller (the whole
|
|
84402
|
+
* document when the page scrolls) at the start and at the end of every scroll.
|
|
84377
84403
|
*
|
|
84378
84404
|
* One capturing listener on the document sees them all: "scroll" does not
|
|
84379
84405
|
* bubble, but it does propagate in the capture phase.
|
|
@@ -86758,7 +86784,7 @@ const css$w = /* css */`@property --list-group-label-height {
|
|
|
86758
86784
|
}
|
|
86759
86785
|
}
|
|
86760
86786
|
|
|
86761
|
-
&:not([navi-hover-while-scrolling]) > .navi_list_scroll_container > .navi_list:
|
|
86787
|
+
[navi-scrolling] &:not([navi-hover-while-scrolling]) > .navi_list_scroll_container > .navi_list, &[navi-scrolling]:not([navi-hover-while-scrolling]) > .navi_list_scroll_container > .navi_list, &:not([navi-hover-while-scrolling]) > .navi_list_scroll_container[navi-scrolling] > .navi_list {
|
|
86762
86788
|
pointer-events: none;
|
|
86763
86789
|
}
|
|
86764
86790
|
|