@jsenv/navi 0.29.451 → 0.29.453

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.
@@ -33796,6 +33796,34 @@ const pushPopupThemeColor = ({
33796
33796
  };
33797
33797
  };
33798
33798
 
33799
+ /**
33800
+ * What a popup's wall paints, read off the `--backdrop-background` it is
33801
+ * painted from rather than off the wall: for the length of a route transition
33802
+ * played on an area the wall itself is turned transparent and stood in for
33803
+ * (transition_furniture.js), and a popup opening then would find nothing laid
33804
+ * over the edge. The variable holds a token list, resolved to a colour on an
33805
+ * element of its own, given what the wall inherits that a colour depends on:
33806
+ * color-scheme for light-dark() and the system colours, color for
33807
+ * currentcolor.
33808
+ *
33809
+ * @param {Element} element - The element declaring the variable: the dialog
33810
+ * for its ::backdrop, a popover's wall for itself.
33811
+ * @returns {string}
33812
+ */
33813
+ const readBackdropColor = (element) => {
33814
+ const elementStyle = getComputedStyle(element);
33815
+ const probe = document.createElement("div");
33816
+ probe.style.colorScheme = elementStyle.colorScheme;
33817
+ probe.style.color = elementStyle.color;
33818
+ probe.style.background = elementStyle.getPropertyValue(
33819
+ "--backdrop-background",
33820
+ );
33821
+ document.body.append(probe);
33822
+ const color = getComputedStyle(probe).backgroundColor;
33823
+ probe.remove();
33824
+ return color;
33825
+ };
33826
+
33799
33827
  let renderQueued = false;
33800
33828
  // Once per commit: a Head re-rendering leaves and arrives again in the same
33801
33829
  // commit, and the browser must not be handed the colour from in between.
@@ -35057,9 +35085,16 @@ const WALL_ATTRIBUTE = "data-navi-transition-wall";
35057
35085
  // property would replace it.
35058
35086
  const FURNITURE_ATTRIBUTE = "data-navi-transition-furniture";
35059
35087
  // What the wall paints, resolved on the matched element in both cases (the
35060
- // dialog for its ::backdrop, the popover's wall for itself): the same two
35061
- // properties, copied onto the stand-in.
35062
- const WALL_PROPERTIES = ["--backdrop-background", "--backdrop-filter"];
35088
+ // dialog for its ::backdrop, the popover's wall for itself), and what a colour
35089
+ // in it depends on: color-scheme for light-dark() and the system colours,
35090
+ // color for currentcolor. Copied onto the stand-in, which paints them in a
35091
+ // context of its own.
35092
+ const WALL_PROPERTIES = [
35093
+ "--backdrop-background",
35094
+ "--backdrop-filter",
35095
+ "color-scheme",
35096
+ "color",
35097
+ ];
35063
35098
 
35064
35099
  // The pictures the wall is painted into: the pages', and every bar's own.
35065
35100
  const FIXED_BAR_SELECTOR$1 = ".navi_fixed_bar";
@@ -40042,27 +40077,34 @@ const TARGET_WAIT_MS = 1000;
40042
40077
  // covers is a render, not a fetch. Past it the popup's picture plays out on
40043
40078
  // its own.
40044
40079
  const LANDING_WAIT_MS = 300;
40045
- // The popup's own animation duration, published on the root because the
40046
- // ::view-transition tree hangs off it and inherits from nowhere else.
40080
+ // What the pictures are told — the popup's pace, the lifted card's paint, the
40081
+ // corners — is written on ::view-transition (transition_values.js), the root of
40082
+ // the pseudo-element tree they inherit from. Never on the document's root: a
40083
+ // custom property there is inherited by every element, and writing or removing
40084
+ // it restyles the whole document — at the press, again when the app reads
40085
+ // style before the first picture, and once more as the movement ends.
40086
+ //
40087
+ // The popup's own animation duration, for the pictures; the wall reads it off
40088
+ // the popup itself (dialog.jsx).
40047
40089
  const DURATION_PROPERTY = "--navi-popup-lift-duration";
40048
40090
  // The fixed bars (fixed_bar.jsx): the popup is placed in the room between
40049
40091
  // them, and the moving picture is clipped to that room on the way.
40050
40092
  const FIXED_BAR_SELECTOR = ".navi_fixed_bar";
40051
- // The paint of the lifted node, published the same way: the box wears the
40052
- // card's own background, so where it has grown past the picture it carries it
40053
- // is the card that has grown, not a picture fading into a bigger one. Read off
40054
- // the lifted node rather than the anchor: the anchor is often a bare trigger
40055
- // around the card, painting nothing of its own, while the lifted node IS the
40056
- // card — and a card does not change colour on the way.
40093
+ // The paint of the lifted node: the box wears the card's own background, so
40094
+ // where it has grown past the picture it carries it is the card that has
40095
+ // grown, not a picture fading into a bigger one. Read off the lifted node
40096
+ // rather than the anchor: the anchor is often a bare trigger around the card,
40097
+ // painting nothing of its own, while the lifted node IS the card — and a card
40098
+ // does not change colour on the way.
40057
40099
  const BACKGROUND_COLOR_PROPERTY = "--navi-popup-lift-background-color";
40058
40100
  const BACKGROUND_IMAGE_PROPERTY = "--navi-popup-lift-background-image";
40059
- // The corners of the box the movement starts from, published the same way —
40060
- // and, unlike the paint, not kept for the length of the movement: a corner is
40061
- // written per box, on purpose, the same card at two sizes not wanting the same
40062
- // round (a 6px corner stops showing on a big card). The moving box leaves with
40063
- // the corners of the box it leaves and arrives with those of the box it
40064
- // arrives on, the two authored values interpolated on the group's own clock
40065
- // (see animateMovingBox).
40101
+ // The corners of the box the movement starts from — and, unlike the paint, not
40102
+ // kept for the length of the movement: a corner is written per box, on
40103
+ // purpose, the same card at two sizes not wanting the same round (a 6px corner
40104
+ // stops showing on a big card). The moving box leaves with the corners of the
40105
+ // box it leaves and arrives with those of the box it arrives on, the two
40106
+ // authored values interpolated on the group's own clock (see
40107
+ // animateMovingBox).
40066
40108
  const BORDER_RADIUS_PROPERTY = "--navi-popup-lift-border-radius";
40067
40109
 
40068
40110
  let releaseLiftInProgress = null;
@@ -40123,11 +40165,9 @@ const liftPopupFromAnchor = (
40123
40165
  releaseLiftInProgress?.();
40124
40166
 
40125
40167
  const elementLeaving = opened ? resolveAnchor() : resolveLiftTarget(popupEl);
40126
- // Everything read about the leaving side, before the first write. A read
40127
- // brings the style up to date, and the writes below land on the root — an
40128
- // attribute or an unregistered custom property there invalidates the
40129
- // computed style of every element — so a read placed after any of them is
40130
- // the whole document's style over again. Nothing on the leaving side moves
40168
+ // Everything read about the leaving side, before the first write: a read
40169
+ // brings the style up to date, and one placed after the writes below would
40170
+ // pay for them on the spot, in the press. Nothing on the leaving side moves
40131
40171
  // before the movement, the page being held from here on.
40132
40172
  releaseScrollHold = trapScrollInside(popupEl, { backdrop: true });
40133
40173
  const duration = getComputedStyle(popupEl)
@@ -40145,9 +40185,9 @@ const liftPopupFromAnchor = (
40145
40185
  // Empty would substitute into `animation-duration:` as nothing at all,
40146
40186
  // which computes to 0s — a movement nobody sees rather than one at the
40147
40187
  // browser's own pace.
40148
- root.style.setProperty(DURATION_PROPERTY, duration);
40188
+ setTransitionValue(DURATION_PROPERTY, duration);
40149
40189
  }
40150
- root.style.setProperty(BORDER_RADIUS_PROPERTY, cornersLeaving);
40190
+ setTransitionValue(BORDER_RADIUS_PROPERTY, cornersLeaving);
40151
40191
  if (paintLeaving) {
40152
40192
  publishBoxPaint(paintLeaving);
40153
40193
  }
@@ -40174,10 +40214,10 @@ const liftPopupFromAnchor = (
40174
40214
  root.removeAttribute(ROOT_ATTRIBUTE);
40175
40215
  root.removeAttribute(KIND_ATTRIBUTE);
40176
40216
  root.removeAttribute(FIT_ATTRIBUTE);
40177
- root.style.removeProperty(DURATION_PROPERTY);
40178
- root.style.removeProperty(BORDER_RADIUS_PROPERTY);
40179
- root.style.removeProperty(BACKGROUND_COLOR_PROPERTY);
40180
- root.style.removeProperty(BACKGROUND_IMAGE_PROPERTY);
40217
+ removeTransitionValue(DURATION_PROPERTY);
40218
+ removeTransitionValue(BORDER_RADIUS_PROPERTY);
40219
+ removeTransitionValue(BACKGROUND_COLOR_PROPERTY);
40220
+ removeTransitionValue(BACKGROUND_IMAGE_PROPERTY);
40181
40221
  callLiftOverCallbacks();
40182
40222
  };
40183
40223
  releaseLiftInProgress = release;
@@ -40263,8 +40303,6 @@ const liftPopupFromAnchor = (
40263
40303
  if (lift === "box") {
40264
40304
  warnDrawingLiftedAsBox(target);
40265
40305
  }
40266
- // The last write before the transition: nothing reads between it and the
40267
- // style pass the browser makes on its own to take the first picture.
40268
40306
  publishBoxPaint(readBoxPaint(target));
40269
40307
  startMovement(reveal, () => target);
40270
40308
  };
@@ -40316,9 +40354,8 @@ const readBoxPaint = (liftedElement) => {
40316
40354
  };
40317
40355
 
40318
40356
  const publishBoxPaint = ({ backgroundColor, backgroundImage }) => {
40319
- const root = document.documentElement;
40320
- root.style.setProperty(BACKGROUND_COLOR_PROPERTY, backgroundColor);
40321
- root.style.setProperty(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
40357
+ setTransitionValue(BACKGROUND_COLOR_PROPERTY, backgroundColor);
40358
+ setTransitionValue(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
40322
40359
  };
40323
40360
 
40324
40361
  // The corners of a box: the first round found going down through children
@@ -57540,24 +57577,32 @@ const ControlSwap = props => {
57540
57577
  }
57541
57578
  // Reading .value during render is what subscribes the row to it.
57542
57579
  const valueRequested = signal ? signal.value : value;
57543
- const [activeName, setActiveName] = useState(() => {
57580
+ // The side holding the floor, and the cap whose press gave it (null when
57581
+ // `value`/`signal` did): which cap was pressed decides where the focus goes.
57582
+ const [floor, setFloor] = useState(() => {
57544
57583
  const nameRequested = valueRequested === undefined ? defaultValue : valueRequested;
57545
- return nameRequested === undefined ? sides[0].name : nameRequested;
57584
+ return {
57585
+ name: nameRequested === undefined ? sides[0].name : nameRequested,
57586
+ pressedCapIndex: null
57587
+ };
57546
57588
  });
57547
- const activeIndexFound = sides.findIndex(side => side.name === activeName);
57589
+ const activeIndexFound = sides.findIndex(side => side.name === floor.name);
57548
57590
  const activeIndex = activeIndexFound === -1 ? 0 : activeIndexFound;
57549
57591
  const activeSide = sides[activeIndex];
57550
57592
  const capRefs = [useRef(), useRef()];
57551
57593
  const slotRefs = [useRef(), useRef()];
57552
57594
  const slotIdPrefix = useId();
57553
- const activeNameRef = useRef(activeName);
57595
+ const activeNameRef = useRef(floor.name);
57554
57596
  activeNameRef.current = activeSide.name;
57555
- const swapTo = (name, event) => {
57597
+ const swapTo = (name, event, pressedCapIndex = null) => {
57556
57598
  if (name === activeNameRef.current) {
57557
57599
  return;
57558
57600
  }
57559
57601
  activeNameRef.current = name;
57560
- setActiveName(name);
57602
+ setFloor({
57603
+ name,
57604
+ pressedCapIndex
57605
+ });
57561
57606
  if (signal) {
57562
57607
  signal.value = name;
57563
57608
  }
@@ -57590,14 +57635,14 @@ const ControlSwap = props => {
57590
57635
  isFirstActiveRunRef.current = false;
57591
57636
  return;
57592
57637
  }
57593
- focusWithTheFloor(slotRefs[activeIndex].current, activeSide, capRefs[activeIndex].current);
57638
+ focusWithTheFloor(slotRefs[activeIndex].current, activeSide, capRefs[activeIndex].current, floor.pressedCapIndex === null ? null : capRefs[floor.pressedCapIndex].current);
57594
57639
  }, [activeSide.name]);
57595
57640
 
57596
57641
  // Both caps do the same thing, and it is the reason they sit outside the
57597
57642
  // controls: whichever one the finger lands on, the floor goes to the other
57598
57643
  // side. The same pixel opens the search and closes it.
57599
- const swapOnPress = event => {
57600
- swapTo(sides[activeIndex === 0 ? 1 : 0].name, event);
57644
+ const swapOnPress = (event, pressedCapIndex) => {
57645
+ swapTo(sides[activeIndex === 0 ? 1 : 0].name, event, pressedCapIndex);
57601
57646
  };
57602
57647
  return jsxs(Box, {
57603
57648
  flex: "x",
@@ -57611,7 +57656,7 @@ const ControlSwap = props => {
57611
57656
  side: sides[0],
57612
57657
  slotId: `${slotIdPrefix}_0`,
57613
57658
  active: activeIndex === 0,
57614
- onPress: swapOnPress
57659
+ onPress: event => swapOnPress(event, 0)
57615
57660
  }), jsx("div", {
57616
57661
  className: "navi_control_swap_stage",
57617
57662
  children: jsx("div", {
@@ -57629,7 +57674,7 @@ const ControlSwap = props => {
57629
57674
  side: sides[1],
57630
57675
  slotId: `${slotIdPrefix}_1`,
57631
57676
  active: activeIndex === 1,
57632
- onPress: swapOnPress
57677
+ onPress: event => swapOnPress(event, 1)
57633
57678
  })]
57634
57679
  });
57635
57680
  };
@@ -57660,12 +57705,14 @@ const ControlSwap = props => {
57660
57705
  * the collapsed one — the side holding the floor spells out in full what a
57661
57706
  * dot could only hint at — so it is read straight off the state
57662
57707
  * (`badge={Boolean(groupId)}`), with no "and this side is hidden" to add.
57663
- * @param autoFocus - On by default: the focus goes into this control when it
57664
- * takes the floor, where navi's ladder puts it — an `autoFocus` inside the
57665
- * control first, its first focusable otherwise. `false` leaves it on the cap
57666
- * that was pressed, for a control one reads before writing in (and, on a
57667
- * phone, for a keyboard that must not rise). Never on mount, whatever the
57668
- * setting.
57708
+ * @param autoFocus - On by default: the focus goes into this control when its
57709
+ * own cap (or `value`/`signal`) gives it the floor, where navi's ladder puts
57710
+ * it — an `autoFocus` inside the control first, its first focusable
57711
+ * otherwise. `false` leaves it on the cap that was pressed, for a control one
57712
+ * reads before writing in (and, on a phone, for a keyboard that must not
57713
+ * rise). Whatever the setting, never on mount, and never when the floor comes
57714
+ * back because the other side was put away by its own cap: that press closed
57715
+ * something, it did not ask for this control.
57669
57716
  *
57670
57717
  * Anything else — `data-testid`, `variant`, `backgroundColor`, `color`, an
57671
57718
  * `aria-describedby` — goes to the cap, which is a `<Button>`. It is the one
@@ -57740,9 +57787,13 @@ const readSides = children => {
57740
57787
  return sides;
57741
57788
  };
57742
57789
 
57743
- // The floor moved: the press that gave it landed on a cap, and what one wants
57744
- // next is the control that just arrived — typing into the search field one just
57745
- // opened, not pressing its icon again.
57790
+ // The floor moved. A press on the arriving side's own cap — the collapsed one —
57791
+ // asks for that control: what one wants next is typing into the search field
57792
+ // one just opened, not pressing its icon again. A press on the other cap puts
57793
+ // the side holding the floor away, and the arriving one only comes back because
57794
+ // the row has room for one control: the focus stays on the cap pressed, and on
57795
+ // a phone no keyboard rises over the list one went back to. A swap with no
57796
+ // press behind it (`value`/`signal` moved) is taken as asking for the arrival.
57746
57797
  //
57747
57798
  // WHERE inside is navi's own ladder (findFocusTarget): an `autoFocus` in the
57748
57799
  // control's own content first, the first focusable otherwise, a last resort
@@ -57757,8 +57808,9 @@ const readSides = children => {
57757
57808
  // open". A field marked that way so its sheet opens quietly would otherwise
57758
57809
  // leave the focus on the magnifier that was pressed to reach it.
57759
57810
  // A side one reads before writing in says `autoFocus={false}`.
57760
- const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap) => {
57761
- if (arrivingSide.autoFocus !== false) {
57811
+ const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap, pressedCap) => {
57812
+ const arrivalAskedFor = !pressedCap || pressedCap === arrivingCap;
57813
+ if (arrivalAskedFor && arrivingSide.autoFocus !== false) {
57762
57814
  const found = findFocusTarget(arrivingSlot, {
57763
57815
  restoreMayClaim: true
57764
57816
  });
@@ -57768,13 +57820,14 @@ const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap) => {
57768
57820
  }
57769
57821
  }
57770
57822
  // Whatever the leaving slot held is inert and off the window now, so the
57771
- // browser dropped its focus to the document body: it has to land somewhere,
57772
- // and the cap of the side taking over is where the gesture was.
57823
+ // browser dropped its focus to the document body (Safari never gave it to
57824
+ // the pressed button in the first place): it has to land somewhere, and the
57825
+ // cap pressed is where the gesture was.
57773
57826
  const {
57774
57827
  activeElement
57775
57828
  } = document;
57776
57829
  if (!activeElement || activeElement === document.body) {
57777
- moveFocusTo(arrivingCap);
57830
+ moveFocusTo(pressedCap || arrivingCap);
57778
57831
  }
57779
57832
  };
57780
57833
 
@@ -66355,6 +66408,70 @@ const giveUpOnControlsHoldingPopup = (controlsHolding, reason) => {
66355
66408
  */
66356
66409
 
66357
66410
  const popupCss = /* css */ `
66411
+ /* Not inherited: what the placement writes on a popup (applyNewPosition in
66412
+ @jsenv/dom) and what the popup derives from it are read by the popup
66413
+ alone, for its own size and cut. Inherited, every element of its content
66414
+ carries a copy, and each placement restyles all of them before the first
66415
+ frame. A popup nested in another also stops reading the outer one's values
66416
+ where its own are unset. "*" keeps them untyped: var() substitutes them as
66417
+ it does an unregistered property. */
66418
+ @property --container-position-room-top {
66419
+ syntax: "*";
66420
+ inherits: false;
66421
+ }
66422
+ @property --container-position-room-right {
66423
+ syntax: "*";
66424
+ inherits: false;
66425
+ }
66426
+ @property --container-position-room-bottom {
66427
+ syntax: "*";
66428
+ inherits: false;
66429
+ }
66430
+ @property --container-position-room-left {
66431
+ syntax: "*";
66432
+ inherits: false;
66433
+ }
66434
+ @property --container-position-remaining-height {
66435
+ syntax: "*";
66436
+ inherits: false;
66437
+ }
66438
+ @property --container-position-remaining-width {
66439
+ syntax: "*";
66440
+ inherits: false;
66441
+ }
66442
+ @property --x-popup-cut-top-at-area {
66443
+ syntax: "*";
66444
+ inherits: false;
66445
+ }
66446
+ @property --x-popup-cut-right-at-area {
66447
+ syntax: "*";
66448
+ inherits: false;
66449
+ }
66450
+ @property --x-popup-cut-bottom-at-area {
66451
+ syntax: "*";
66452
+ inherits: false;
66453
+ }
66454
+ @property --x-popup-cut-left-at-area {
66455
+ syntax: "*";
66456
+ inherits: false;
66457
+ }
66458
+ @property --x-popup-cut-top {
66459
+ syntax: "*";
66460
+ inherits: false;
66461
+ }
66462
+ @property --x-popup-cut-right {
66463
+ syntax: "*";
66464
+ inherits: false;
66465
+ }
66466
+ @property --x-popup-cut-bottom {
66467
+ syntax: "*";
66468
+ inherits: false;
66469
+ }
66470
+ @property --x-popup-cut-left {
66471
+ syntax: "*";
66472
+ inherits: false;
66473
+ }
66474
+
66358
66475
  @layer navi {
66359
66476
  .navi_popover,
66360
66477
  .navi_dialog {
@@ -66369,29 +66486,6 @@ const popupCss = /* css */ `
66369
66486
 
66370
66487
  .navi_popover,
66371
66488
  .navi_dialog {
66372
- /* The translate property is deliberately absent from this list — it
66373
- carries where the popup stands, and applyNewPosition (visible_rect.js)
66374
- owns it and drives its own transition through the Web Animations API
66375
- instead of CSS, so it stays independent of whatever this list contains
66376
- (no shared transition-property to clobber, no propertyName to filter).
66377
- What moves here is transform, which composes under it. */
66378
- &[navi-animation] {
66379
- /* clip-path takes the translate's own duration, for the one cut that
66380
- still moves (a band of glass beside the app — see this file's top
66381
- comment for why every other cut is a constant). A constant cut, or a
66382
- kind that sets none, has the same value on both sides of the change,
66383
- which costs nothing. */
66384
- transition-property:
66385
- display, overlay, opacity, transform, scale, box-shadow, clip-path;
66386
- transition-duration:
66387
- var(--popup-animation-duration), var(--popup-animation-duration),
66388
- var(--popup-opacity-duration), var(--popup-translate-duration),
66389
- var(--popup-scale-duration), var(--popup-animation-duration),
66390
- var(--popup-translate-duration);
66391
- transition-timing-function: ease;
66392
- transition-behavior: allow-discrete;
66393
- }
66394
-
66395
66489
  /* Where a travel may be cut, per side, in the popup's own coordinates.
66396
66490
  --container-position-room-* is how far past each of its own edges the
66397
66491
  popup may still paint before reaching the edge of the area it was placed
@@ -66423,6 +66517,28 @@ const popupCss = /* css */ `
66423
66517
  -1 * var(--container-position-room-left, 100vmax) - 100vmax +
66424
66518
  min(100vmax, var(--navi-app-inset-left, 0px) * 1000000)
66425
66519
  );
66520
+ /* The translate property is deliberately absent from this list — it
66521
+ carries where the popup stands, and applyNewPosition (visible_rect.js)
66522
+ owns it and drives its own transition through the Web Animations API
66523
+ instead of CSS, so it stays independent of whatever this list contains
66524
+ (no shared transition-property to clobber, no propertyName to filter).
66525
+ What moves here is transform, which composes under it. */
66526
+ &[navi-animation] {
66527
+ /* clip-path takes the translate's own duration, for the one cut that
66528
+ still moves (a band of glass beside the app — see this file's top
66529
+ comment for why every other cut is a constant). A constant cut, or a
66530
+ kind that sets none, has the same value on both sides of the change,
66531
+ which costs nothing. */
66532
+ transition-property:
66533
+ display, overlay, opacity, transform, scale, box-shadow, clip-path;
66534
+ transition-duration:
66535
+ var(--popup-animation-duration), var(--popup-animation-duration),
66536
+ var(--popup-opacity-duration), var(--popup-translate-duration),
66537
+ var(--popup-scale-duration), var(--popup-animation-duration),
66538
+ var(--popup-translate-duration);
66539
+ transition-timing-function: ease;
66540
+ transition-behavior: allow-discrete;
66541
+ }
66426
66542
  /* A local popup is clipped by its clip wrapper (a static ancestor sized to
66427
66543
  the container, overflow: hidden): nothing is left for a cut to hide. */
66428
66544
  &[data-layer="local"] {
@@ -66552,7 +66668,6 @@ const popupCss = /* css */ `
66552
66668
  transform: translate(var(--x-popup-travel-x), var(--x-popup-travel-y));
66553
66669
  }
66554
66670
  }
66555
-
66556
66671
  }
66557
66672
 
66558
66673
  .navi_popover {
@@ -66917,6 +67032,62 @@ let openLocalDialogCount = 0;
66917
67032
  const css$E = /* css */`
66918
67033
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
66919
67034
  order depending on which popup renders first. */
67035
+
67036
+ /* Not inherited: each is written on the dialog or derived there — by its
67037
+ placement (see popup_css.js for what inheriting would cost), by its
67038
+ opening (the anchor box under sizeFromAnchor, the stack order) or from the
67039
+ minWidth/maxWidth/minHeight/maxHeight props — and read by the dialog
67040
+ alone. Inherited, a dialog nested in this one would also open at this
67041
+ one's size. */
67042
+ @property --dialog-stack-order {
67043
+ syntax: "*";
67044
+ inherits: false;
67045
+ }
67046
+ @property --anchor-width {
67047
+ syntax: "*";
67048
+ inherits: false;
67049
+ }
67050
+ @property --anchor-height {
67051
+ syntax: "*";
67052
+ inherits: false;
67053
+ }
67054
+ @property --dialog-min-width {
67055
+ syntax: "*";
67056
+ inherits: false;
67057
+ }
67058
+ @property --dialog-max-width {
67059
+ syntax: "*";
67060
+ inherits: false;
67061
+ }
67062
+ @property --dialog-min-height {
67063
+ syntax: "*";
67064
+ inherits: false;
67065
+ }
67066
+ @property --dialog-max-height {
67067
+ syntax: "*";
67068
+ inherits: false;
67069
+ }
67070
+ @property --x-dialog-container-spacing {
67071
+ syntax: "*";
67072
+ inherits: false;
67073
+ }
67074
+ @property --dialog-maxmax-width {
67075
+ syntax: "*";
67076
+ inherits: false;
67077
+ }
67078
+ @property --dialog-maxmax-height {
67079
+ syntax: "*";
67080
+ inherits: false;
67081
+ }
67082
+ @property --x-dialog-max-width {
67083
+ syntax: "*";
67084
+ inherits: false;
67085
+ }
67086
+ @property --x-dialog-max-height {
67087
+ syntax: "*";
67088
+ inherits: false;
67089
+ }
67090
+
66920
67091
  @layer navi {
66921
67092
  .navi_dialog {
66922
67093
  /* Min gap between the dialog and the edges of its container. Written
@@ -67014,18 +67185,6 @@ const css$E = /* css */`
67014
67185
  --x-corner-bottom-right-radius: initial;
67015
67186
  --x-corner-bottom-left-radius: initial;
67016
67187
 
67017
- /* Sizing is per dialog: the anchor box (sizeFromAnchor) and the
67018
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
67019
- element, and an inline declaration wins over these resets. Without
67020
- them, a dialog nested in another dialog would inherit its parent's
67021
- inline values and open at the parent's size. */
67022
- --anchor-width: initial;
67023
- --anchor-height: initial;
67024
- --dialog-min-width: initial;
67025
- --dialog-max-width: initial;
67026
- --dialog-min-height: initial;
67027
- --dialog-max-height: initial;
67028
-
67029
67188
  /* Computed once, reused by both max-width itself and min-width's own
67030
67189
  clamp below (see its comment for why) — avoids repeating the same
67031
67190
  min(..., ...) expression twice. */
@@ -67280,7 +67439,7 @@ const css$E = /* css */`
67280
67439
  &[aria-expanded="true"]:not([navi-transitions-off])::backdrop {
67281
67440
  opacity: 1;
67282
67441
  transition-property: opacity;
67283
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
67442
+ transition-duration: var(--popup-animation-duration, 0.18s);
67284
67443
  transition-timing-function: ease;
67285
67444
 
67286
67445
  @starting-style {
@@ -67463,7 +67622,7 @@ const css$E = /* css */`
67463
67622
  &[aria-expanded="true"] {
67464
67623
  opacity: 1;
67465
67624
  transition-property: opacity;
67466
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
67625
+ transition-duration: var(--popup-animation-duration);
67467
67626
  transition-timing-function: ease;
67468
67627
  }
67469
67628
  }
@@ -67501,8 +67660,9 @@ const css$E = /* css */`
67501
67660
  and unpressable while the movement plays: under a modal wall at the
67502
67661
  opening, and for the popup's --popup-animation-duration at the closing. */
67503
67662
  :root[data-navi-popup-lift] {
67504
- /* The popup's own pace, published on the root by popup_lift.js because the
67505
- ::view-transition tree hangs off it and inherits from nowhere else. */
67663
+ /* The popup's own pace, published on ::view-transition by popup_lift.js:
67664
+ the pictures inherit from nowhere else. The wall reads it off the
67665
+ dialog itself (the [data-lifting] backdrop rules above). */
67506
67666
  &::view-transition-group(navi-popup-lift),
67507
67667
  &::view-transition-old(navi-popup-lift),
67508
67668
  &::view-transition-new(navi-popup-lift),
@@ -68919,7 +69079,7 @@ const useDialogProps = props => {
68919
69079
  if (isTopLayer && themeColor !== false) {
68920
69080
  addCleanup(pushPopupThemeColor({
68921
69081
  themeColor,
68922
- backdropColor: backdrop ? getComputedStyle(dialogEl, "::backdrop").backgroundColor : null,
69082
+ backdropColor: backdrop ? readBackdropColor(dialogEl) : null,
68923
69083
  surfaceColor: flushEdges.top ? getComputedStyle(dialogEl).backgroundColor : null
68924
69084
  }));
68925
69085
  }
@@ -69330,6 +69490,58 @@ let openLocalPopoverCount = 0;
69330
69490
  const css$D = /* css */`
69331
69491
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
69332
69492
  order depending on which popup renders first. */
69493
+
69494
+ /* Not inherited: each is written on the popover or derived there — by its
69495
+ placement (the anchor box included; see popup_css.js for what inheriting
69496
+ would cost), by its opening (the stack order, which the backdrop gets a
69497
+ copy of) or from the minWidth/maxWidth/minHeight/maxHeight props — and
69498
+ read by the popover alone. Inherited, a popover nested in another popup
69499
+ would also open at the outer one's size. */
69500
+ @property --popover-stack-order {
69501
+ syntax: "*";
69502
+ inherits: false;
69503
+ }
69504
+ @property --anchor-width {
69505
+ syntax: "*";
69506
+ inherits: false;
69507
+ }
69508
+ @property --anchor-height {
69509
+ syntax: "*";
69510
+ inherits: false;
69511
+ }
69512
+ @property --anchor-inner-width {
69513
+ syntax: "*";
69514
+ inherits: false;
69515
+ }
69516
+ @property --anchor-inner-height {
69517
+ syntax: "*";
69518
+ inherits: false;
69519
+ }
69520
+ @property --popover-min-width {
69521
+ syntax: "*";
69522
+ inherits: false;
69523
+ }
69524
+ @property --popover-max-width {
69525
+ syntax: "*";
69526
+ inherits: false;
69527
+ }
69528
+ @property --popover-min-height {
69529
+ syntax: "*";
69530
+ inherits: false;
69531
+ }
69532
+ @property --popover-max-height {
69533
+ syntax: "*";
69534
+ inherits: false;
69535
+ }
69536
+ @property --x-popover-max-width {
69537
+ syntax: "*";
69538
+ inherits: false;
69539
+ }
69540
+ @property --x-popover-max-height {
69541
+ syntax: "*";
69542
+ inherits: false;
69543
+ }
69544
+
69333
69545
  @layer navi {
69334
69546
  .navi_popover {
69335
69547
  /* soft: user-configurable preferred max-height. Kept as a *default*
@@ -69391,21 +69603,6 @@ const css$D = /* css */`
69391
69603
  --x-corner-bottom-right-radius: initial;
69392
69604
  --x-corner-bottom-left-radius: initial;
69393
69605
 
69394
- /* Sizing is per popover: the anchor box and the
69395
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
69396
- element, and an inline declaration wins over these resets. Without
69397
- them, a popover nested in another popup (or opened without an anchor
69398
- inside one sized from its own) would inherit the outer inline values
69399
- and open at the outer size. */
69400
- --anchor-width: initial;
69401
- --anchor-height: initial;
69402
- --anchor-inner-width: initial;
69403
- --anchor-inner-height: initial;
69404
- --popover-min-width: initial;
69405
- --popover-max-width: initial;
69406
- --popover-min-height: initial;
69407
- --popover-max-height: initial;
69408
-
69409
69606
  --x-popover-max-width: min(
69410
69607
  var(--popover-max-width, var(--popover-maxmax-width)),
69411
69608
  var(--container-position-remaining-width, var(--popover-maxmax-width)),
@@ -69534,10 +69731,8 @@ const css$D = /* css */`
69534
69731
  "position: absolute" above. */
69535
69732
  &[popover] {
69536
69733
  position: fixed;
69537
- /* The native top layer already gives "last shown wins" for free —
69538
- --popover-stack-order is only ever set by the custom renderer's own
69539
- openEffect, but reset here regardless in case a consumer sets the
69540
- var directly on an ancestor. */
69734
+ /* The native top layer already gives "last shown wins" for free: the
69735
+ custom renderer's stack order has no say here. */
69541
69736
  z-index: unset;
69542
69737
  padding: 0;
69543
69738
 
@@ -70721,7 +70916,7 @@ const usePopoverProps = props => {
70721
70916
  if (isTopLayer && themeColor !== false) {
70722
70917
  addCleanup(pushPopupThemeColor({
70723
70918
  themeColor,
70724
- backdropColor: backdropEl ? getComputedStyle(backdropEl).backgroundColor : null
70919
+ backdropColor: backdropEl ? readBackdropColor(backdropEl) : null
70725
70920
  }));
70726
70921
  }
70727
70922
  const cancelOpenInteractionSuppression = !silent && hasCssTransitionAnimation ? suppressPointerEventsDuringTransition(popoverEl) : null;