@jsenv/navi 0.29.434 → 0.29.435
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 +96 -17
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +36 -5
- package/dist/jsenv_navi.js.map +4 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -53467,6 +53467,26 @@ const Expandable = props => {
|
|
|
53467
53467
|
return stopRide;
|
|
53468
53468
|
};
|
|
53469
53469
|
|
|
53470
|
+
// A silent change is a state the page was already in (see openEffect): it
|
|
53471
|
+
// lands at once. Not playing a reveal is not enough — the stylesheet's own
|
|
53472
|
+
// transition plays it whenever the previous state's style was resolved
|
|
53473
|
+
// before the render: an expandable mounted closed and measured in the same
|
|
53474
|
+
// commit (a List sizing its items) before its deferred mount-time open, or
|
|
53475
|
+
// one kept on screen across the page change.
|
|
53476
|
+
const renderWithoutMovement = (contentContainer, render) => {
|
|
53477
|
+
if (!animation || !contentContainer) {
|
|
53478
|
+
flushSyncRendering(render);
|
|
53479
|
+
return;
|
|
53480
|
+
}
|
|
53481
|
+
contentContainer.style.transitionProperty = "none";
|
|
53482
|
+
flushSyncRendering(render);
|
|
53483
|
+
// The new style must be resolved while transitions are off — re-enabled
|
|
53484
|
+
// in the same recalc, the change would transition after all.
|
|
53485
|
+
// eslint-disable-next-line no-unused-expressions
|
|
53486
|
+
getComputedStyle(contentContainer).transitionProperty;
|
|
53487
|
+
contentContainer.style.transitionProperty = "";
|
|
53488
|
+
};
|
|
53489
|
+
|
|
53470
53490
|
// What opening LOOKS like here, and how to undo it — the one thing an
|
|
53471
53491
|
// expandable owns that a popup does not (see open_controller.js). Reassigned
|
|
53472
53492
|
// on every render so it always closes over the latest props.
|
|
@@ -53487,10 +53507,15 @@ const Expandable = props => {
|
|
|
53487
53507
|
// reopening during a collapse — read while the DOM still says closed.
|
|
53488
53508
|
const startRect = revealing ? contentContainer.getBoundingClientRect() : null;
|
|
53489
53509
|
cancelSettleWatch();
|
|
53490
|
-
|
|
53510
|
+
const renderOpened = () => {
|
|
53491
53511
|
setOpened(true);
|
|
53492
53512
|
setSettled(!revealing);
|
|
53493
|
-
}
|
|
53513
|
+
};
|
|
53514
|
+
if (silent) {
|
|
53515
|
+
renderWithoutMovement(contentContainer, renderOpened);
|
|
53516
|
+
} else {
|
|
53517
|
+
flushSyncRendering(renderOpened);
|
|
53518
|
+
}
|
|
53494
53519
|
if (hasAction) {
|
|
53495
53520
|
runUnwatched(() => effectiveAction.run());
|
|
53496
53521
|
}
|
|
@@ -53529,16 +53554,22 @@ const Expandable = props => {
|
|
|
53529
53554
|
cancelSettleWatch();
|
|
53530
53555
|
// `silent`: closed by the navigation that puts another page on screen,
|
|
53531
53556
|
// which is its movement (see page_change.js).
|
|
53532
|
-
const
|
|
53557
|
+
const silentClose = Boolean(closeEvent.detail.silent);
|
|
53558
|
+
const collapsing = animation && !silentClose && Boolean(contentContainerAtClose);
|
|
53533
53559
|
if (collapsing) {
|
|
53534
53560
|
// Now, while the content is still fully laid out — the collapsing
|
|
53535
53561
|
// track uncovers a content frozen at that size.
|
|
53536
53562
|
freezeContentSize();
|
|
53537
53563
|
}
|
|
53538
|
-
|
|
53564
|
+
const renderClosed = () => {
|
|
53539
53565
|
setOpened(false);
|
|
53540
53566
|
setSettled(!collapsing);
|
|
53541
|
-
}
|
|
53567
|
+
};
|
|
53568
|
+
if (silentClose) {
|
|
53569
|
+
renderWithoutMovement(contentContainerAtClose, renderClosed);
|
|
53570
|
+
} else {
|
|
53571
|
+
flushSyncRendering(renderClosed);
|
|
53572
|
+
}
|
|
53542
53573
|
if (restoreFocus) {
|
|
53543
53574
|
restoreFocus(closeEvent);
|
|
53544
53575
|
} else if (focusedBeforeClose && contentContainerAtClose && contentContainerAtClose.contains(focusedBeforeClose)) {
|