@jsenv/navi 0.29.513 → 0.29.514
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 +40 -11
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +40 -11
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/route_transitions.md +3 -2
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -38356,9 +38356,11 @@ const releaseTransitionDestination = (owner) => {
|
|
|
38356
38356
|
* inside its rectangle — which is where the hand thinks it pressed. The same
|
|
38357
38357
|
* move route_travel.jsx makes for the box a finger reaches for mid-flight.
|
|
38358
38358
|
*
|
|
38359
|
-
* A `RouteTravel` holds this too
|
|
38360
|
-
* gets its click on its own
|
|
38361
|
-
*
|
|
38359
|
+
* A `RouteTravel` holds this too, for the bars it leaves live. A control there
|
|
38360
|
+
* gets its click on its own except in the first frames of the travel, when a
|
|
38361
|
+
* press falls to the document root like any other; the part of a bar photographed
|
|
38362
|
+
* for the travel (`data-navi-fixed-bar-overhang`, fixed_bar.jsx) is deaf
|
|
38363
|
+
* throughout.
|
|
38362
38364
|
*
|
|
38363
38365
|
* ASKED FOR, never derived, and that is the whole safety of it: only the
|
|
38364
38366
|
* application knows the control does not move. One that travels with the pages
|
|
@@ -39362,6 +39364,21 @@ const placeTransitionWindow = (owner, groupName) => {
|
|
|
39362
39364
|
document.documentElement.setAttribute(WINDOW_PLACED_ATTRIBUTE, "");
|
|
39363
39365
|
};
|
|
39364
39366
|
|
|
39367
|
+
/**
|
|
39368
|
+
* Whether a point of the window lies in a band the furniture keeps: the pictures
|
|
39369
|
+
* are cut at those bands, so what is seen there is never a page, however far the
|
|
39370
|
+
* box runs under it.
|
|
39371
|
+
*/
|
|
39372
|
+
const isPointInTransitionBand = (clientX, clientY) => {
|
|
39373
|
+
const band = readBand();
|
|
39374
|
+
return (
|
|
39375
|
+
clientX < band.left ||
|
|
39376
|
+
clientX > window.innerWidth - band.right ||
|
|
39377
|
+
clientY < band.top ||
|
|
39378
|
+
clientY > window.innerHeight - band.bottom
|
|
39379
|
+
);
|
|
39380
|
+
};
|
|
39381
|
+
|
|
39365
39382
|
// The live layout takes the box back. A discontinuity by construction — the
|
|
39366
39383
|
// window stands at the held height, the box is at its own — and an invisible
|
|
39367
39384
|
// one: the page arriving is fully in place, and the strip below it that the
|
|
@@ -42549,11 +42566,16 @@ const RouteTravel = ({
|
|
|
42549
42566
|
gestureRef.current = gesture;
|
|
42550
42567
|
};
|
|
42551
42568
|
|
|
42552
|
-
// A press
|
|
42553
|
-
// the browser's transition covers the page and the press
|
|
42554
|
-
// document root instead, whatever the pictures are told about pointer
|
|
42555
|
-
// So while a travel plays, the press is caught at the document and
|
|
42556
|
-
// the box when it fell
|
|
42569
|
+
// A press aimed at a page while a travel is playing does not always reach the
|
|
42570
|
+
// box: the browser's transition covers the page and the press can be delivered
|
|
42571
|
+
// to the document root instead, whatever the pictures are told about pointer
|
|
42572
|
+
// events. So while a travel plays, the press is caught at the document and
|
|
42573
|
+
// handed to the box when it fell where a page is SEEN, which is where the hand
|
|
42574
|
+
// thinks it pressed.
|
|
42575
|
+
//
|
|
42576
|
+
// Decided by the position and never by the target: in the first frames of a
|
|
42577
|
+
// travel a press on a live bar falls to the root like any other, and what lies
|
|
42578
|
+
// under a picture is not what the hand is aiming at.
|
|
42557
42579
|
pointerDownRef.current = onPointerDown;
|
|
42558
42580
|
useLayoutEffect(() => {
|
|
42559
42581
|
const onDocumentPointerDown = pointerDownEvent => {
|
|
@@ -42578,6 +42600,11 @@ const RouteTravel = ({
|
|
|
42578
42600
|
if (clientX < left || clientX > right || clientY < top || clientY > bottom) {
|
|
42579
42601
|
return;
|
|
42580
42602
|
}
|
|
42603
|
+
// A box scrolled under a bar still has the press in its rectangle, but
|
|
42604
|
+
// the pictures are cut at that bar: the press is aimed at the bar.
|
|
42605
|
+
if (isPointInTransitionBand(clientX, clientY)) {
|
|
42606
|
+
return;
|
|
42607
|
+
}
|
|
42581
42608
|
pointerDownRef.current(pointerDownEvent);
|
|
42582
42609
|
};
|
|
42583
42610
|
document.addEventListener("pointerdown", onDocumentPointerDown, true);
|
|
@@ -58011,8 +58038,9 @@ const LinkPseudoElements = ["::-navi-loader", "::-navi-indicator"];
|
|
|
58011
58038
|
* press on it is aimed at what the reader can see. Say it there, and only
|
|
58012
58039
|
* there: a control that TRAVELS with the pages has a rectangle where it will
|
|
58013
58040
|
* be, not where it is seen, and a press handed to it fires something nobody
|
|
58014
|
-
* aimed at. A `RouteTravel` honours it as well, for a control in
|
|
58015
|
-
*
|
|
58041
|
+
* aimed at. A `RouteTravel` honours it as well, for a control in a `FixedBar`:
|
|
58042
|
+
* the part it photographs (`data-navi-fixed-bar-overhang`) is deaf for the
|
|
58043
|
+
* whole travel, and the rest for its first frames.
|
|
58016
58044
|
* @param {boolean} [props.replace] - Go to the destination by TAKING THE PLACE
|
|
58017
58045
|
* of the current history entry instead of stacking onto it: the link stays a
|
|
58018
58046
|
* link (an address, a middle click, the keyboard, `aria-current`), only the
|
|
@@ -64006,7 +64034,8 @@ const COMMAND_DEFAULT_PROPS_FACTORIES = {
|
|
|
64006
64034
|
* drawn — must still close it. What `<Link pressableDuringRouteTransition>`
|
|
64007
64035
|
* says, for the other half of a toggle. Only for a control that does not
|
|
64008
64036
|
* travel with the pages. A `RouteTravel` honours it as well, for a control in
|
|
64009
|
-
*
|
|
64037
|
+
* a `FixedBar`: the part it photographs (`data-navi-fixed-bar-overhang`) is
|
|
64038
|
+
* deaf for the whole travel, and the rest for its first frames.
|
|
64010
64039
|
* @param {Function} [action] What the press runs: a button holds no value, so
|
|
64011
64040
|
* every press is one call. Inside a `<Form>` or a group it carries the value
|
|
64012
64041
|
* around it, merged over the action's bound params — a value that is not an
|