@jsenv/navi 0.29.510 → 0.29.512
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 +91 -11
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +77 -11
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/actions.md +6 -1
- package/docs/form_changed.md +3 -0
- package/docs/interactions.md +1 -0
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -40523,7 +40523,11 @@ const RouteTravel = ({
|
|
|
40523
40523
|
// by CSS until then, so an empty hand here costs nothing: there is
|
|
40524
40524
|
// nothing to stop, only nowhere to put them yet.
|
|
40525
40525
|
animations: null,
|
|
40526
|
-
ended: false
|
|
40526
|
+
ended: false,
|
|
40527
|
+
// The box as it set off, kept rather than read from the ref: the
|
|
40528
|
+
// navigation a travel asks for can take the box down (see the update
|
|
40529
|
+
// callback), and the name it wears is still given back to it.
|
|
40530
|
+
element: elementRef.current
|
|
40527
40531
|
};
|
|
40528
40532
|
travelRef.current = travel;
|
|
40529
40533
|
// A press landing on a playing travel lands on the document root: the box
|
|
@@ -40539,7 +40543,7 @@ const RouteTravel = ({
|
|
|
40539
40543
|
});
|
|
40540
40544
|
// Whether the document's offset is this row's business at all (see
|
|
40541
40545
|
// pagesScrollTheDocument), asked once and before anything is swapped.
|
|
40542
|
-
travel.scrollsDocument = pagesScrollTheDocument(
|
|
40546
|
+
travel.scrollsDocument = pagesScrollTheDocument(travel.element);
|
|
40543
40547
|
if (travel.scrollsDocument) {
|
|
40544
40548
|
// One of the tabs is about to be swapped out from under that scrollport,
|
|
40545
40549
|
// and whatever the browser does with the offset meanwhile — clamping it
|
|
@@ -40556,7 +40560,7 @@ const RouteTravel = ({
|
|
|
40556
40560
|
// at the same moment and for the same reason: whoever names something for
|
|
40557
40561
|
// a movement between two pages decides on it now (see
|
|
40558
40562
|
// transition_destination.js).
|
|
40559
|
-
nameForTravel(
|
|
40563
|
+
nameForTravel(travel.element);
|
|
40560
40564
|
holdTransitionDestination(travel, page.route.buildUrl(page.params));
|
|
40561
40565
|
document.documentElement.setAttribute(TRAVEL_ATTRIBUTE, direction);
|
|
40562
40566
|
document.documentElement.setAttribute(TRAVEL_AXIS_ATTRIBUTE, axis);
|
|
@@ -40568,7 +40572,7 @@ const RouteTravel = ({
|
|
|
40568
40572
|
// The box as it stands before anything moves, and the band the furniture
|
|
40569
40573
|
// around it leaves free: rendering is held, so both are still the page
|
|
40570
40574
|
// being left (see transition_window.js).
|
|
40571
|
-
const stateBefore = measureTransitionWindowState(
|
|
40575
|
+
const stateBefore = measureTransitionWindowState(travel.element);
|
|
40572
40576
|
// The hold a navigation already took, if this travel is the answer to one:
|
|
40573
40577
|
// taking another would be taking a hold on a page that is holding still.
|
|
40574
40578
|
const releaseRendering = takeoverRoutingRenderingHold();
|
|
@@ -40606,6 +40610,16 @@ const RouteTravel = ({
|
|
|
40606
40610
|
} = travel.page;
|
|
40607
40611
|
arriveAtScrollPosition(route.buildUrl(params));
|
|
40608
40612
|
}
|
|
40613
|
+
// The box itself may be gone: rendered inside one of the pages of its
|
|
40614
|
+
// row rather than around them, it went down with the page being left,
|
|
40615
|
+
// and there is no box left for the page arriving to be photographed in.
|
|
40616
|
+
// The navigation stands — it is what was asked for — and the movement
|
|
40617
|
+
// is dropped.
|
|
40618
|
+
if (!travel.element.isConnected) {
|
|
40619
|
+
travel.viewTransition.skipTransition();
|
|
40620
|
+
endTravel(travel);
|
|
40621
|
+
return;
|
|
40622
|
+
}
|
|
40609
40623
|
// The page arriving is in the DOM and the transition has not started
|
|
40610
40624
|
// playing: the one moment both boxes can be known. After the scroll,
|
|
40611
40625
|
// which is what the box is measured through: the two states are at the
|
|
@@ -40613,7 +40627,7 @@ const RouteTravel = ({
|
|
|
40613
40627
|
// (see transition_window.js).
|
|
40614
40628
|
// The bars stay live under the pictures for a travel: only the box is
|
|
40615
40629
|
// photographed (see the TRAVEL_ATTRIBUTE css).
|
|
40616
|
-
holdTransitionWindow(travel,
|
|
40630
|
+
holdTransitionWindow(travel, travel.element, stateBefore, {
|
|
40617
40631
|
furnitureLive: true
|
|
40618
40632
|
});
|
|
40619
40633
|
});
|
|
@@ -40960,7 +40974,7 @@ const RouteTravel = ({
|
|
|
40960
40974
|
// Given back, so another box may wear it: kept, two of them on a page
|
|
40961
40975
|
// would both answer to it and the browser refuses the whole transition
|
|
40962
40976
|
// rather than pick.
|
|
40963
|
-
unnameAfterTravel(
|
|
40977
|
+
unnameAfterTravel(travel.element);
|
|
40964
40978
|
document.documentElement.removeAttribute(TRAVEL_ATTRIBUTE);
|
|
40965
40979
|
document.documentElement.removeAttribute(TRAVEL_AXIS_ATTRIBUTE);
|
|
40966
40980
|
document.documentElement.removeAttribute(DRAGGED_ATTRIBUTE);
|
|
@@ -58987,6 +59001,7 @@ const css$Y = /* css */`@layer navi {
|
|
|
58987
59001
|
--navi-fixed-bar-border-width: 1px;
|
|
58988
59002
|
--navi-fixed-bar-border-color: var(--navi-separator-color-default);
|
|
58989
59003
|
--navi-fixed-bar-padding: 0px;
|
|
59004
|
+
--navi-fixed-bar-shadow: none;
|
|
58990
59005
|
}
|
|
58991
59006
|
}
|
|
58992
59007
|
|
|
@@ -59051,6 +59066,45 @@ const css$Y = /* css */`@layer navi {
|
|
|
59051
59066
|
var(--navi-fixed-bar-border-color);
|
|
59052
59067
|
}
|
|
59053
59068
|
}
|
|
59069
|
+
|
|
59070
|
+
.navi_fixed_bar_shadow {
|
|
59071
|
+
border-radius: inherit;
|
|
59072
|
+
box-shadow: var(--navi-fixed-bar-shadow);
|
|
59073
|
+
pointer-events: none;
|
|
59074
|
+
position: absolute;
|
|
59075
|
+
inset: 0;
|
|
59076
|
+
}
|
|
59077
|
+
|
|
59078
|
+
.navi_fixed_bar[data-area="top"] > .navi_fixed_bar_shadow {
|
|
59079
|
+
bottom: calc(-1 * var(--navi-fixed-bar-border-width));
|
|
59080
|
+
clip-path: inset(0 0 -100vh);
|
|
59081
|
+
}
|
|
59082
|
+
|
|
59083
|
+
.navi_fixed_bar[data-area="bottom"] > .navi_fixed_bar_shadow {
|
|
59084
|
+
top: calc(-1 * var(--navi-fixed-bar-border-width));
|
|
59085
|
+
clip-path: inset(-100vh 0 0);
|
|
59086
|
+
}
|
|
59087
|
+
|
|
59088
|
+
.navi_fixed_bar[data-area="left"] > .navi_fixed_bar_shadow {
|
|
59089
|
+
right: calc(-1 * var(--navi-fixed-bar-border-width));
|
|
59090
|
+
clip-path: inset(0 -100vw 0 0);
|
|
59091
|
+
}
|
|
59092
|
+
|
|
59093
|
+
.navi_fixed_bar[data-area="right"] > .navi_fixed_bar_shadow {
|
|
59094
|
+
left: calc(-1 * var(--navi-fixed-bar-border-width));
|
|
59095
|
+
clip-path: inset(0 0 0 -100vw);
|
|
59096
|
+
}
|
|
59097
|
+
|
|
59098
|
+
@supports (view-transition-name: match-element) {
|
|
59099
|
+
:root[data-navi-route-travel] .navi_fixed_bar_shadow {
|
|
59100
|
+
view-transition-name: match-element;
|
|
59101
|
+
view-transition-class: navi_fixed_bar_shadow;
|
|
59102
|
+
}
|
|
59103
|
+
}
|
|
59104
|
+
|
|
59105
|
+
:root[data-navi-route-travel-turned]::view-transition-group(.navi_fixed_bar_shadow) {
|
|
59106
|
+
display: block;
|
|
59107
|
+
}
|
|
59054
59108
|
`;
|
|
59055
59109
|
const FixedBarStyleCSSVars = {
|
|
59056
59110
|
// width/height go through the vars the size calc reads: written as plain
|
|
@@ -59062,7 +59116,8 @@ const FixedBarStyleCSSVars = {
|
|
|
59062
59116
|
padding: "--navi-fixed-bar-padding",
|
|
59063
59117
|
background: "--navi-fixed-bar-background",
|
|
59064
59118
|
borderWidth: "--navi-fixed-bar-border-width",
|
|
59065
|
-
borderColor: "--navi-fixed-bar-border-color"
|
|
59119
|
+
borderColor: "--navi-fixed-bar-border-color",
|
|
59120
|
+
shadow: ["--navi-fixed-bar-shadow", "boxShadow"]
|
|
59066
59121
|
};
|
|
59067
59122
|
|
|
59068
59123
|
/**
|
|
@@ -59076,6 +59131,7 @@ const FixedBarStyleCSSVars = {
|
|
|
59076
59131
|
* border?: boolean,
|
|
59077
59132
|
* borderWidth?: string|number,
|
|
59078
59133
|
* borderColor?: string,
|
|
59134
|
+
* shadow?: string,
|
|
59079
59135
|
* }>}
|
|
59080
59136
|
* @param {"top"|"bottom"|"left"|"right"} [props.area="top"] - Which edge of
|
|
59081
59137
|
* the window it is pinned to. One bar per edge: a second one does not stack
|
|
@@ -59098,6 +59154,11 @@ const FixedBarStyleCSSVars = {
|
|
|
59098
59154
|
* @param {string|number} [props.padding=0] - Along the bar only: left/right on
|
|
59099
59155
|
* a top or bottom bar, top/bottom on a side one. Across it, the size is
|
|
59100
59156
|
* `height`/`width`.
|
|
59157
|
+
* @param {string} [props.shadow] - What the bar casts over the content, in
|
|
59158
|
+
* `box-shadow` syntax, cut at the bar's box on every side but the content's.
|
|
59159
|
+
* Takes no room. Prefer it to a `boxShadow` or a `filter` on the bar: those
|
|
59160
|
+
* are covered by the pages while a `RouteTravel` plays, this one stays over
|
|
59161
|
+
* them.
|
|
59101
59162
|
*/
|
|
59102
59163
|
const FixedBar = ({
|
|
59103
59164
|
children,
|
|
@@ -59161,12 +59222,14 @@ const FixedBar = ({
|
|
|
59161
59222
|
setFixedBarSpace(area, barElement, null);
|
|
59162
59223
|
};
|
|
59163
59224
|
}, [area, vertical]);
|
|
59164
|
-
return
|
|
59225
|
+
return jsxs(Box, {
|
|
59165
59226
|
baseClassName: "navi_fixed_bar",
|
|
59166
59227
|
"data-area": area,
|
|
59167
59228
|
...props,
|
|
59168
59229
|
styleCSSVars: FixedBarStyleCSSVars,
|
|
59169
|
-
children: children
|
|
59230
|
+
children: [children, jsx("span", {
|
|
59231
|
+
className: "navi_fixed_bar_shadow"
|
|
59232
|
+
})]
|
|
59170
59233
|
});
|
|
59171
59234
|
};
|
|
59172
59235
|
|
|
@@ -62351,8 +62414,11 @@ const COMMAND_DEFAULT_PROPS_FACTORIES = {
|
|
|
62351
62414
|
* says, for the other half of a toggle. Only for a control that does not
|
|
62352
62415
|
* travel with the pages.
|
|
62353
62416
|
* @param {Function} [action] What the press runs: a button holds no value, so
|
|
62354
|
-
* every press is one call.
|
|
62355
|
-
*
|
|
62417
|
+
* every press is one call. Inside a `<Form>` or a group it carries the value
|
|
62418
|
+
* around it, merged over the action's bound params — a value that is not an
|
|
62419
|
+
* object replaces them; in a picker's popup it carries nothing
|
|
62420
|
+
* (docs/actions.md#the-instance-a-control-runs). The button is busy while it
|
|
62421
|
+
* runs, refuses a second press and draws the error on itself. On a button with an `href` or a
|
|
62356
62422
|
* `route`, the same order as a Link's: it runs on the press, before the
|
|
62357
62423
|
* navigation, and the navigation does not wait for it (see Link's `action`).
|
|
62358
62424
|
* @param {"GET"|"POST"|"PUT"|"PATCH"|"DELETE"} [actionVerb] What a plain
|