@jsenv/navi 0.29.77 → 0.29.79

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.
@@ -29849,6 +29849,43 @@ const popupCss = /* css */ `
29849
29849
  }
29850
29850
  }
29851
29851
  }
29852
+
29853
+ /* While the PAGES are the ones moving — a route transition, a route travel —
29854
+ an open popup takes a picture of its own. The pictures of such a movement
29855
+ are drawn in the top layer, above everything the document paints, and a
29856
+ popup lives in the top layer too: uncaptured, it is simply covered for the
29857
+ length of the movement, so it disappears the instant its page starts to
29858
+ leave and lands abruptly when the arriving one settles. Captured, it is a
29859
+ group beside the pages, painted over them where it stands, and the browser
29860
+ fades it out with the page it belonged to or in with the page it comes
29861
+ with.
29862
+
29863
+ An identity of its own (match-element), never a shared name: two popups on
29864
+ either side of a navigation are two different popups, and what is wanted is
29865
+ precisely that one goes and the other comes. A browser with no
29866
+ match-element takes no name and the pictures cover the popup. */
29867
+ @supports (view-transition-name: match-element) {
29868
+ :root[data-navi-route-transition] .navi_popover[aria-expanded="true"],
29869
+ :root[data-navi-route-transition] .navi_dialog[aria-expanded="true"],
29870
+ :root[data-navi-route-travel] .navi_popover[aria-expanded="true"],
29871
+ :root[data-navi-route-travel] .navi_dialog[aria-expanded="true"] {
29872
+ view-transition-name: match-element;
29873
+ view-transition-class: navi_popup;
29874
+ }
29875
+ }
29876
+
29877
+ /* On the same clock as the pages: a popup going in a quarter of the time the
29878
+ page it belongs to takes to leave is gone long before the page it was on. */
29879
+ :root[data-navi-route-transition]::view-transition-group(.navi_popup),
29880
+ :root[data-navi-route-transition]::view-transition-old(.navi_popup),
29881
+ :root[data-navi-route-transition]::view-transition-new(.navi_popup) {
29882
+ animation-duration: var(--navi-route-transition-duration, 300ms);
29883
+ }
29884
+ :root[data-navi-route-travel]::view-transition-group(.navi_popup),
29885
+ :root[data-navi-route-travel]::view-transition-old(.navi_popup),
29886
+ :root[data-navi-route-travel]::view-transition-new(.navi_popup) {
29887
+ animation-duration: var(--navi-route-travel-duration, 300ms);
29888
+ }
29852
29889
  `;
29853
29890
 
29854
29891
  /**
@@ -57395,6 +57432,28 @@ const css$w = /* css */`
57395
57432
  the corners would visually overflow the rounded corners during scroll. */
57396
57433
  overflow: hidden;
57397
57434
 
57435
+ /* overflow="visible" asks for the exact opposite of the clipping above: the
57436
+ content must be free to paint outside the list's box and to overflow into
57437
+ whatever scroll container is around it. Setting it on the inner scroll
57438
+ element alone changes nothing visible — this frame would clip it right
57439
+ back — so the frame has to let go of it too, and with it of the rounded
57440
+ corners it was clipping to. The two cannot both be true.
57441
+ An axis asked to be visible pairs with "clip" on the other one rather
57442
+ than "hidden": mixing visible with a scrollport value makes the browser
57443
+ compute the visible one to "auto" (a scrollport again), while
57444
+ visible/clip is the one pairing it keeps as written. */
57445
+ &[data-overflow-visible="both"] {
57446
+ overflow: visible;
57447
+ }
57448
+ &[data-overflow-visible="x"] {
57449
+ overflow-x: visible;
57450
+ overflow-y: clip;
57451
+ }
57452
+ &[data-overflow-visible="y"] {
57453
+ overflow-x: clip;
57454
+ overflow-y: visible;
57455
+ }
57456
+
57398
57457
  .navi_list_scroll_container {
57399
57458
  /* The ask stops here: this element is inside the list's frame, so a row
57400
57459
  or a control it holds is not at the surface's corner. */
@@ -58135,6 +58194,7 @@ const ListUI = props => {
58135
58194
  popover: popover,
58136
58195
  "data-horizontal": horizontal ? "" : undefined,
58137
58196
  "data-scroller": getScrollerAttribute(scroller),
58197
+ "data-overflow-visible": getOverflowVisibleAttribute(overflow, overflowX, overflowY),
58138
58198
  "navi-hover-while-scrolling": hoverWhileScrolling ? "" : undefined,
58139
58199
  "data-expand-x": expandX || expand ? "" : undefined,
58140
58200
  "data-expand-y": expandY || expand ? "" : undefined,
@@ -59413,6 +59473,27 @@ const getScrollerAttribute = scroller => {
59413
59473
  return "parent";
59414
59474
  };
59415
59475
 
59476
+ // overflow lands as an inline style on the inner scroll element, which is
59477
+ // enough for every value but "visible": that one only means anything once the
59478
+ // frame around it stops clipping too. Reading the per-axis props over the
59479
+ // shorthand mirrors how CSS itself resolves them.
59480
+ const getOverflowVisibleAttribute = (overflow, overflowX, overflowY) => {
59481
+ const x = overflowX === undefined ? overflow : overflowX;
59482
+ const y = overflowY === undefined ? overflow : overflowY;
59483
+ const xVisible = x === "visible";
59484
+ const yVisible = y === "visible";
59485
+ if (xVisible && yVisible) {
59486
+ return "both";
59487
+ }
59488
+ if (xVisible) {
59489
+ return "x";
59490
+ }
59491
+ if (yVisible) {
59492
+ return "y";
59493
+ }
59494
+ return undefined;
59495
+ };
59496
+
59416
59497
  // scroller="parent": the list virtualizes against the scroll box it lives in
59417
59498
  // instead of one of its own. Which box that is can only be measured, and a
59418
59499
  // measurement holds for the geometry it was taken on — see resolveScroller in