@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/jsenv_navi.js
CHANGED
|
@@ -37105,9 +37105,11 @@ const releaseTransitionDestination = (owner) => {
|
|
|
37105
37105
|
* inside its rectangle — which is where the hand thinks it pressed. The same
|
|
37106
37106
|
* move route_travel.jsx makes for the box a finger reaches for mid-flight.
|
|
37107
37107
|
*
|
|
37108
|
-
* A `RouteTravel` holds this too
|
|
37109
|
-
* gets its click on its own
|
|
37110
|
-
*
|
|
37108
|
+
* A `RouteTravel` holds this too, for the bars it leaves live. A control there
|
|
37109
|
+
* gets its click on its own except in the first frames of the travel, when a
|
|
37110
|
+
* press falls to the document root like any other; the part of a bar photographed
|
|
37111
|
+
* for the travel (`data-navi-fixed-bar-overhang`, fixed_bar.jsx) is deaf
|
|
37112
|
+
* throughout.
|
|
37111
37113
|
*
|
|
37112
37114
|
* ASKED FOR, never derived, and that is the whole safety of it: only the
|
|
37113
37115
|
* application knows the control does not move. One that travels with the pages
|
|
@@ -38071,6 +38073,21 @@ const placeTransitionWindow = (owner, groupName) => {
|
|
|
38071
38073
|
document.documentElement.setAttribute(WINDOW_PLACED_ATTRIBUTE, "");
|
|
38072
38074
|
};
|
|
38073
38075
|
|
|
38076
|
+
/**
|
|
38077
|
+
* Whether a point of the window lies in a band the furniture keeps: the pictures
|
|
38078
|
+
* are cut at those bands, so what is seen there is never a page, however far the
|
|
38079
|
+
* box runs under it.
|
|
38080
|
+
*/
|
|
38081
|
+
const isPointInTransitionBand = (clientX, clientY) => {
|
|
38082
|
+
const band = readBand();
|
|
38083
|
+
return (
|
|
38084
|
+
clientX < band.left ||
|
|
38085
|
+
clientX > window.innerWidth - band.right ||
|
|
38086
|
+
clientY < band.top ||
|
|
38087
|
+
clientY > window.innerHeight - band.bottom
|
|
38088
|
+
);
|
|
38089
|
+
};
|
|
38090
|
+
|
|
38074
38091
|
// The live layout takes the box back. A discontinuity by construction — the
|
|
38075
38092
|
// window stands at the held height, the box is at its own — and an invisible
|
|
38076
38093
|
// one: the page arriving is fully in place, and the strip below it that the
|
|
@@ -41255,11 +41272,16 @@ const RouteTravel = ({
|
|
|
41255
41272
|
gestureRef.current = gesture;
|
|
41256
41273
|
};
|
|
41257
41274
|
|
|
41258
|
-
// A press
|
|
41259
|
-
// the browser's transition covers the page and the press
|
|
41260
|
-
// document root instead, whatever the pictures are told about pointer
|
|
41261
|
-
// So while a travel plays, the press is caught at the document and
|
|
41262
|
-
// the box when it fell
|
|
41275
|
+
// A press aimed at a page while a travel is playing does not always reach the
|
|
41276
|
+
// box: the browser's transition covers the page and the press can be delivered
|
|
41277
|
+
// to the document root instead, whatever the pictures are told about pointer
|
|
41278
|
+
// events. So while a travel plays, the press is caught at the document and
|
|
41279
|
+
// handed to the box when it fell where a page is SEEN, which is where the hand
|
|
41280
|
+
// thinks it pressed.
|
|
41281
|
+
//
|
|
41282
|
+
// Decided by the position and never by the target: in the first frames of a
|
|
41283
|
+
// travel a press on a live bar falls to the root like any other, and what lies
|
|
41284
|
+
// under a picture is not what the hand is aiming at.
|
|
41263
41285
|
pointerDownRef.current = onPointerDown;
|
|
41264
41286
|
useLayoutEffect(() => {
|
|
41265
41287
|
const onDocumentPointerDown = pointerDownEvent => {
|
|
@@ -41284,6 +41306,11 @@ const RouteTravel = ({
|
|
|
41284
41306
|
if (clientX < left || clientX > right || clientY < top || clientY > bottom) {
|
|
41285
41307
|
return;
|
|
41286
41308
|
}
|
|
41309
|
+
// A box scrolled under a bar still has the press in its rectangle, but
|
|
41310
|
+
// the pictures are cut at that bar: the press is aimed at the bar.
|
|
41311
|
+
if (isPointInTransitionBand(clientX, clientY)) {
|
|
41312
|
+
return;
|
|
41313
|
+
}
|
|
41287
41314
|
pointerDownRef.current(pointerDownEvent);
|
|
41288
41315
|
};
|
|
41289
41316
|
document.addEventListener("pointerdown", onDocumentPointerDown, true);
|
|
@@ -56467,8 +56494,9 @@ const LinkPseudoElements = ["::-navi-loader", "::-navi-indicator"];
|
|
|
56467
56494
|
* press on it is aimed at what the reader can see. Say it there, and only
|
|
56468
56495
|
* there: a control that TRAVELS with the pages has a rectangle where it will
|
|
56469
56496
|
* be, not where it is seen, and a press handed to it fires something nobody
|
|
56470
|
-
* aimed at. A `RouteTravel` honours it as well, for a control in
|
|
56471
|
-
*
|
|
56497
|
+
* aimed at. A `RouteTravel` honours it as well, for a control in a `FixedBar`:
|
|
56498
|
+
* the part it photographs (`data-navi-fixed-bar-overhang`) is deaf for the
|
|
56499
|
+
* whole travel, and the rest for its first frames.
|
|
56472
56500
|
* @param {boolean} [props.replace] - Go to the destination by TAKING THE PLACE
|
|
56473
56501
|
* of the current history entry instead of stacking onto it: the link stays a
|
|
56474
56502
|
* link (an address, a middle click, the keyboard, `aria-current`), only the
|
|
@@ -62432,7 +62460,8 @@ const COMMAND_DEFAULT_PROPS_FACTORIES = {
|
|
|
62432
62460
|
* drawn — must still close it. What `<Link pressableDuringRouteTransition>`
|
|
62433
62461
|
* says, for the other half of a toggle. Only for a control that does not
|
|
62434
62462
|
* travel with the pages. A `RouteTravel` honours it as well, for a control in
|
|
62435
|
-
*
|
|
62463
|
+
* a `FixedBar`: the part it photographs (`data-navi-fixed-bar-overhang`) is
|
|
62464
|
+
* deaf for the whole travel, and the rest for its first frames.
|
|
62436
62465
|
* @param {Function} [action] What the press runs: a button holds no value, so
|
|
62437
62466
|
* every press is one call. Inside a `<Form>` or a group it carries the value
|
|
62438
62467
|
* around it, merged over the action's bound params — a value that is not an
|