@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.
@@ -32840,6 +32840,34 @@ const pushPopupThemeColor = ({
32840
32840
  };
32841
32841
  };
32842
32842
 
32843
+ /**
32844
+ * What a popup's wall paints, read off the `--backdrop-background` it is
32845
+ * painted from rather than off the wall: for the length of a route transition
32846
+ * played on an area the wall itself is turned transparent and stood in for
32847
+ * (transition_furniture.js), and a popup opening then would find nothing laid
32848
+ * over the edge. The variable holds a token list, resolved to a colour on an
32849
+ * element of its own, given what the wall inherits that a colour depends on:
32850
+ * color-scheme for light-dark() and the system colours, color for
32851
+ * currentcolor.
32852
+ *
32853
+ * @param {Element} element - The element declaring the variable: the dialog
32854
+ * for its ::backdrop, a popover's wall for itself.
32855
+ * @returns {string}
32856
+ */
32857
+ const readBackdropColor = (element) => {
32858
+ const elementStyle = getComputedStyle(element);
32859
+ const probe = document.createElement("div");
32860
+ probe.style.colorScheme = elementStyle.colorScheme;
32861
+ probe.style.color = elementStyle.color;
32862
+ probe.style.background = elementStyle.getPropertyValue(
32863
+ "--backdrop-background",
32864
+ );
32865
+ document.body.append(probe);
32866
+ const color = getComputedStyle(probe).backgroundColor;
32867
+ probe.remove();
32868
+ return color;
32869
+ };
32870
+
32843
32871
  let renderQueued = false;
32844
32872
  // Once per commit: a Head re-rendering leaves and arrives again in the same
32845
32873
  // commit, and the browser must not be handed the colour from in between.
@@ -34061,9 +34089,16 @@ const WALL_ATTRIBUTE = "data-navi-transition-wall";
34061
34089
  // property would replace it.
34062
34090
  const FURNITURE_ATTRIBUTE = "data-navi-transition-furniture";
34063
34091
  // What the wall paints, resolved on the matched element in both cases (the
34064
- // dialog for its ::backdrop, the popover's wall for itself): the same two
34065
- // properties, copied onto the stand-in.
34066
- const WALL_PROPERTIES = ["--backdrop-background", "--backdrop-filter"];
34092
+ // dialog for its ::backdrop, the popover's wall for itself), and what a colour
34093
+ // in it depends on: color-scheme for light-dark() and the system colours,
34094
+ // color for currentcolor. Copied onto the stand-in, which paints them in a
34095
+ // context of its own.
34096
+ const WALL_PROPERTIES = [
34097
+ "--backdrop-background",
34098
+ "--backdrop-filter",
34099
+ "color-scheme",
34100
+ "color",
34101
+ ];
34067
34102
 
34068
34103
  // The pictures the wall is painted into: the pages', and every bar's own.
34069
34104
  const FIXED_BAR_SELECTOR$1 = ".navi_fixed_bar";
@@ -39046,27 +39081,34 @@ const TARGET_WAIT_MS = 1000;
39046
39081
  // covers is a render, not a fetch. Past it the popup's picture plays out on
39047
39082
  // its own.
39048
39083
  const LANDING_WAIT_MS = 300;
39049
- // The popup's own animation duration, published on the root because the
39050
- // ::view-transition tree hangs off it and inherits from nowhere else.
39084
+ // What the pictures are told — the popup's pace, the lifted card's paint, the
39085
+ // corners — is written on ::view-transition (transition_values.js), the root of
39086
+ // the pseudo-element tree they inherit from. Never on the document's root: a
39087
+ // custom property there is inherited by every element, and writing or removing
39088
+ // it restyles the whole document — at the press, again when the app reads
39089
+ // style before the first picture, and once more as the movement ends.
39090
+ //
39091
+ // The popup's own animation duration, for the pictures; the wall reads it off
39092
+ // the popup itself (dialog.jsx).
39051
39093
  const DURATION_PROPERTY = "--navi-popup-lift-duration";
39052
39094
  // The fixed bars (fixed_bar.jsx): the popup is placed in the room between
39053
39095
  // them, and the moving picture is clipped to that room on the way.
39054
39096
  const FIXED_BAR_SELECTOR = ".navi_fixed_bar";
39055
- // The paint of the lifted node, published the same way: the box wears the
39056
- // card's own background, so where it has grown past the picture it carries it
39057
- // is the card that has grown, not a picture fading into a bigger one. Read off
39058
- // the lifted node rather than the anchor: the anchor is often a bare trigger
39059
- // around the card, painting nothing of its own, while the lifted node IS the
39060
- // card — and a card does not change colour on the way.
39097
+ // The paint of the lifted node: the box wears the card's own background, so
39098
+ // where it has grown past the picture it carries it is the card that has
39099
+ // grown, not a picture fading into a bigger one. Read off the lifted node
39100
+ // rather than the anchor: the anchor is often a bare trigger around the card,
39101
+ // painting nothing of its own, while the lifted node IS the card — and a card
39102
+ // does not change colour on the way.
39061
39103
  const BACKGROUND_COLOR_PROPERTY = "--navi-popup-lift-background-color";
39062
39104
  const BACKGROUND_IMAGE_PROPERTY = "--navi-popup-lift-background-image";
39063
- // The corners of the box the movement starts from, published the same way —
39064
- // and, unlike the paint, not kept for the length of the movement: a corner is
39065
- // written per box, on purpose, the same card at two sizes not wanting the same
39066
- // round (a 6px corner stops showing on a big card). The moving box leaves with
39067
- // the corners of the box it leaves and arrives with those of the box it
39068
- // arrives on, the two authored values interpolated on the group's own clock
39069
- // (see animateMovingBox).
39105
+ // The corners of the box the movement starts from — and, unlike the paint, not
39106
+ // kept for the length of the movement: a corner is written per box, on
39107
+ // purpose, the same card at two sizes not wanting the same round (a 6px corner
39108
+ // stops showing on a big card). The moving box leaves with the corners of the
39109
+ // box it leaves and arrives with those of the box it arrives on, the two
39110
+ // authored values interpolated on the group's own clock (see
39111
+ // animateMovingBox).
39070
39112
  const BORDER_RADIUS_PROPERTY = "--navi-popup-lift-border-radius";
39071
39113
 
39072
39114
  let releaseLiftInProgress = null;
@@ -39127,11 +39169,9 @@ const liftPopupFromAnchor = (
39127
39169
  releaseLiftInProgress?.();
39128
39170
 
39129
39171
  const elementLeaving = opened ? resolveAnchor() : resolveLiftTarget(popupEl);
39130
- // Everything read about the leaving side, before the first write. A read
39131
- // brings the style up to date, and the writes below land on the root — an
39132
- // attribute or an unregistered custom property there invalidates the
39133
- // computed style of every element — so a read placed after any of them is
39134
- // the whole document's style over again. Nothing on the leaving side moves
39172
+ // Everything read about the leaving side, before the first write: a read
39173
+ // brings the style up to date, and one placed after the writes below would
39174
+ // pay for them on the spot, in the press. Nothing on the leaving side moves
39135
39175
  // before the movement, the page being held from here on.
39136
39176
  releaseScrollHold = trapScrollInside(popupEl, { backdrop: true });
39137
39177
  const duration = getComputedStyle(popupEl)
@@ -39149,9 +39189,9 @@ const liftPopupFromAnchor = (
39149
39189
  // Empty would substitute into `animation-duration:` as nothing at all,
39150
39190
  // which computes to 0s — a movement nobody sees rather than one at the
39151
39191
  // browser's own pace.
39152
- root.style.setProperty(DURATION_PROPERTY, duration);
39192
+ setTransitionValue(DURATION_PROPERTY, duration);
39153
39193
  }
39154
- root.style.setProperty(BORDER_RADIUS_PROPERTY, cornersLeaving);
39194
+ setTransitionValue(BORDER_RADIUS_PROPERTY, cornersLeaving);
39155
39195
  if (paintLeaving) {
39156
39196
  publishBoxPaint(paintLeaving);
39157
39197
  }
@@ -39178,10 +39218,10 @@ const liftPopupFromAnchor = (
39178
39218
  root.removeAttribute(ROOT_ATTRIBUTE);
39179
39219
  root.removeAttribute(KIND_ATTRIBUTE);
39180
39220
  root.removeAttribute(FIT_ATTRIBUTE);
39181
- root.style.removeProperty(DURATION_PROPERTY);
39182
- root.style.removeProperty(BORDER_RADIUS_PROPERTY);
39183
- root.style.removeProperty(BACKGROUND_COLOR_PROPERTY);
39184
- root.style.removeProperty(BACKGROUND_IMAGE_PROPERTY);
39221
+ removeTransitionValue(DURATION_PROPERTY);
39222
+ removeTransitionValue(BORDER_RADIUS_PROPERTY);
39223
+ removeTransitionValue(BACKGROUND_COLOR_PROPERTY);
39224
+ removeTransitionValue(BACKGROUND_IMAGE_PROPERTY);
39185
39225
  callLiftOverCallbacks();
39186
39226
  };
39187
39227
  releaseLiftInProgress = release;
@@ -39255,8 +39295,6 @@ const liftPopupFromAnchor = (
39255
39295
  popupEl.removeAttribute(ARRIVING_ATTRIBUTE);
39256
39296
  };
39257
39297
  const liftTarget = (target) => {
39258
- // The last write before the transition: nothing reads between it and the
39259
- // style pass the browser makes on its own to take the first picture.
39260
39298
  publishBoxPaint(readBoxPaint(target));
39261
39299
  startMovement(reveal, () => target);
39262
39300
  };
@@ -39285,9 +39323,8 @@ const readBoxPaint = (liftedElement) => {
39285
39323
  };
39286
39324
 
39287
39325
  const publishBoxPaint = ({ backgroundColor, backgroundImage }) => {
39288
- const root = document.documentElement;
39289
- root.style.setProperty(BACKGROUND_COLOR_PROPERTY, backgroundColor);
39290
- root.style.setProperty(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
39326
+ setTransitionValue(BACKGROUND_COLOR_PROPERTY, backgroundColor);
39327
+ setTransitionValue(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
39291
39328
  };
39292
39329
 
39293
39330
  // The corners of a box: the first round found going down through children
@@ -56331,24 +56368,32 @@ const ControlSwap = props => {
56331
56368
  }
56332
56369
  // Reading .value during render is what subscribes the row to it.
56333
56370
  const valueRequested = signal ? signal.value : value;
56334
- const [activeName, setActiveName] = useState(() => {
56371
+ // The side holding the floor, and the cap whose press gave it (null when
56372
+ // `value`/`signal` did): which cap was pressed decides where the focus goes.
56373
+ const [floor, setFloor] = useState(() => {
56335
56374
  const nameRequested = valueRequested === undefined ? defaultValue : valueRequested;
56336
- return nameRequested === undefined ? sides[0].name : nameRequested;
56375
+ return {
56376
+ name: nameRequested === undefined ? sides[0].name : nameRequested,
56377
+ pressedCapIndex: null
56378
+ };
56337
56379
  });
56338
- const activeIndexFound = sides.findIndex(side => side.name === activeName);
56380
+ const activeIndexFound = sides.findIndex(side => side.name === floor.name);
56339
56381
  const activeIndex = activeIndexFound === -1 ? 0 : activeIndexFound;
56340
56382
  const activeSide = sides[activeIndex];
56341
56383
  const capRefs = [useRef(), useRef()];
56342
56384
  const slotRefs = [useRef(), useRef()];
56343
56385
  const slotIdPrefix = useId();
56344
- const activeNameRef = useRef(activeName);
56386
+ const activeNameRef = useRef(floor.name);
56345
56387
  activeNameRef.current = activeSide.name;
56346
- const swapTo = (name, event) => {
56388
+ const swapTo = (name, event, pressedCapIndex = null) => {
56347
56389
  if (name === activeNameRef.current) {
56348
56390
  return;
56349
56391
  }
56350
56392
  activeNameRef.current = name;
56351
- setActiveName(name);
56393
+ setFloor({
56394
+ name,
56395
+ pressedCapIndex
56396
+ });
56352
56397
  if (signal) {
56353
56398
  signal.value = name;
56354
56399
  }
@@ -56381,14 +56426,14 @@ const ControlSwap = props => {
56381
56426
  isFirstActiveRunRef.current = false;
56382
56427
  return;
56383
56428
  }
56384
- focusWithTheFloor(slotRefs[activeIndex].current, activeSide, capRefs[activeIndex].current);
56429
+ focusWithTheFloor(slotRefs[activeIndex].current, activeSide, capRefs[activeIndex].current, floor.pressedCapIndex === null ? null : capRefs[floor.pressedCapIndex].current);
56385
56430
  }, [activeSide.name]);
56386
56431
 
56387
56432
  // Both caps do the same thing, and it is the reason they sit outside the
56388
56433
  // controls: whichever one the finger lands on, the floor goes to the other
56389
56434
  // side. The same pixel opens the search and closes it.
56390
- const swapOnPress = event => {
56391
- swapTo(sides[activeIndex === 0 ? 1 : 0].name, event);
56435
+ const swapOnPress = (event, pressedCapIndex) => {
56436
+ swapTo(sides[activeIndex === 0 ? 1 : 0].name, event, pressedCapIndex);
56392
56437
  };
56393
56438
  return jsxs(Box, {
56394
56439
  flex: "x",
@@ -56402,7 +56447,7 @@ const ControlSwap = props => {
56402
56447
  side: sides[0],
56403
56448
  slotId: `${slotIdPrefix}_0`,
56404
56449
  active: activeIndex === 0,
56405
- onPress: swapOnPress
56450
+ onPress: event => swapOnPress(event, 0)
56406
56451
  }), jsx("div", {
56407
56452
  className: "navi_control_swap_stage",
56408
56453
  children: jsx("div", {
@@ -56420,7 +56465,7 @@ const ControlSwap = props => {
56420
56465
  side: sides[1],
56421
56466
  slotId: `${slotIdPrefix}_1`,
56422
56467
  active: activeIndex === 1,
56423
- onPress: swapOnPress
56468
+ onPress: event => swapOnPress(event, 1)
56424
56469
  })]
56425
56470
  });
56426
56471
  };
@@ -56451,12 +56496,14 @@ const ControlSwap = props => {
56451
56496
  * the collapsed one — the side holding the floor spells out in full what a
56452
56497
  * dot could only hint at — so it is read straight off the state
56453
56498
  * (`badge={Boolean(groupId)}`), with no "and this side is hidden" to add.
56454
- * @param autoFocus - On by default: the focus goes into this control when it
56455
- * takes the floor, where navi's ladder puts it — an `autoFocus` inside the
56456
- * control first, its first focusable otherwise. `false` leaves it on the cap
56457
- * that was pressed, for a control one reads before writing in (and, on a
56458
- * phone, for a keyboard that must not rise). Never on mount, whatever the
56459
- * setting.
56499
+ * @param autoFocus - On by default: the focus goes into this control when its
56500
+ * own cap (or `value`/`signal`) gives it the floor, where navi's ladder puts
56501
+ * it — an `autoFocus` inside the control first, its first focusable
56502
+ * otherwise. `false` leaves it on the cap that was pressed, for a control one
56503
+ * reads before writing in (and, on a phone, for a keyboard that must not
56504
+ * rise). Whatever the setting, never on mount, and never when the floor comes
56505
+ * back because the other side was put away by its own cap: that press closed
56506
+ * something, it did not ask for this control.
56460
56507
  *
56461
56508
  * Anything else — `data-testid`, `variant`, `backgroundColor`, `color`, an
56462
56509
  * `aria-describedby` — goes to the cap, which is a `<Button>`. It is the one
@@ -56531,9 +56578,13 @@ const readSides = children => {
56531
56578
  return sides;
56532
56579
  };
56533
56580
 
56534
- // The floor moved: the press that gave it landed on a cap, and what one wants
56535
- // next is the control that just arrived — typing into the search field one just
56536
- // opened, not pressing its icon again.
56581
+ // The floor moved. A press on the arriving side's own cap — the collapsed one —
56582
+ // asks for that control: what one wants next is typing into the search field
56583
+ // one just opened, not pressing its icon again. A press on the other cap puts
56584
+ // the side holding the floor away, and the arriving one only comes back because
56585
+ // the row has room for one control: the focus stays on the cap pressed, and on
56586
+ // a phone no keyboard rises over the list one went back to. A swap with no
56587
+ // press behind it (`value`/`signal` moved) is taken as asking for the arrival.
56537
56588
  //
56538
56589
  // WHERE inside is navi's own ladder (findFocusTarget): an `autoFocus` in the
56539
56590
  // control's own content first, the first focusable otherwise, a last resort
@@ -56548,8 +56599,9 @@ const readSides = children => {
56548
56599
  // open". A field marked that way so its sheet opens quietly would otherwise
56549
56600
  // leave the focus on the magnifier that was pressed to reach it.
56550
56601
  // A side one reads before writing in says `autoFocus={false}`.
56551
- const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap) => {
56552
- if (arrivingSide.autoFocus !== false) {
56602
+ const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap, pressedCap) => {
56603
+ const arrivalAskedFor = !pressedCap || pressedCap === arrivingCap;
56604
+ if (arrivalAskedFor && arrivingSide.autoFocus !== false) {
56553
56605
  const found = findFocusTarget(arrivingSlot, {
56554
56606
  restoreMayClaim: true
56555
56607
  });
@@ -56559,13 +56611,14 @@ const focusWithTheFloor = (arrivingSlot, arrivingSide, arrivingCap) => {
56559
56611
  }
56560
56612
  }
56561
56613
  // Whatever the leaving slot held is inert and off the window now, so the
56562
- // browser dropped its focus to the document body: it has to land somewhere,
56563
- // and the cap of the side taking over is where the gesture was.
56614
+ // browser dropped its focus to the document body (Safari never gave it to
56615
+ // the pressed button in the first place): it has to land somewhere, and the
56616
+ // cap pressed is where the gesture was.
56564
56617
  const {
56565
56618
  activeElement
56566
56619
  } = document;
56567
56620
  if (!activeElement || activeElement === document.body) {
56568
- moveFocusTo(arrivingCap);
56621
+ moveFocusTo(pressedCap || arrivingCap);
56569
56622
  }
56570
56623
  };
56571
56624
 
@@ -65058,6 +65111,70 @@ const giveUpOnControlsHoldingPopup = (controlsHolding, reason) => {
65058
65111
  */
65059
65112
 
65060
65113
  const popupCss = /* css */ `
65114
+ /* Not inherited: what the placement writes on a popup (applyNewPosition in
65115
+ @jsenv/dom) and what the popup derives from it are read by the popup
65116
+ alone, for its own size and cut. Inherited, every element of its content
65117
+ carries a copy, and each placement restyles all of them before the first
65118
+ frame. A popup nested in another also stops reading the outer one's values
65119
+ where its own are unset. "*" keeps them untyped: var() substitutes them as
65120
+ it does an unregistered property. */
65121
+ @property --container-position-room-top {
65122
+ syntax: "*";
65123
+ inherits: false;
65124
+ }
65125
+ @property --container-position-room-right {
65126
+ syntax: "*";
65127
+ inherits: false;
65128
+ }
65129
+ @property --container-position-room-bottom {
65130
+ syntax: "*";
65131
+ inherits: false;
65132
+ }
65133
+ @property --container-position-room-left {
65134
+ syntax: "*";
65135
+ inherits: false;
65136
+ }
65137
+ @property --container-position-remaining-height {
65138
+ syntax: "*";
65139
+ inherits: false;
65140
+ }
65141
+ @property --container-position-remaining-width {
65142
+ syntax: "*";
65143
+ inherits: false;
65144
+ }
65145
+ @property --x-popup-cut-top-at-area {
65146
+ syntax: "*";
65147
+ inherits: false;
65148
+ }
65149
+ @property --x-popup-cut-right-at-area {
65150
+ syntax: "*";
65151
+ inherits: false;
65152
+ }
65153
+ @property --x-popup-cut-bottom-at-area {
65154
+ syntax: "*";
65155
+ inherits: false;
65156
+ }
65157
+ @property --x-popup-cut-left-at-area {
65158
+ syntax: "*";
65159
+ inherits: false;
65160
+ }
65161
+ @property --x-popup-cut-top {
65162
+ syntax: "*";
65163
+ inherits: false;
65164
+ }
65165
+ @property --x-popup-cut-right {
65166
+ syntax: "*";
65167
+ inherits: false;
65168
+ }
65169
+ @property --x-popup-cut-bottom {
65170
+ syntax: "*";
65171
+ inherits: false;
65172
+ }
65173
+ @property --x-popup-cut-left {
65174
+ syntax: "*";
65175
+ inherits: false;
65176
+ }
65177
+
65061
65178
  @layer navi {
65062
65179
  .navi_popover,
65063
65180
  .navi_dialog {
@@ -65072,29 +65189,6 @@ const popupCss = /* css */ `
65072
65189
 
65073
65190
  .navi_popover,
65074
65191
  .navi_dialog {
65075
- /* The translate property is deliberately absent from this list — it
65076
- carries where the popup stands, and applyNewPosition (visible_rect.js)
65077
- owns it and drives its own transition through the Web Animations API
65078
- instead of CSS, so it stays independent of whatever this list contains
65079
- (no shared transition-property to clobber, no propertyName to filter).
65080
- What moves here is transform, which composes under it. */
65081
- &[navi-animation] {
65082
- /* clip-path takes the translate's own duration, for the one cut that
65083
- still moves (a band of glass beside the app — see this file's top
65084
- comment for why every other cut is a constant). A constant cut, or a
65085
- kind that sets none, has the same value on both sides of the change,
65086
- which costs nothing. */
65087
- transition-property:
65088
- display, overlay, opacity, transform, scale, box-shadow, clip-path;
65089
- transition-duration:
65090
- var(--popup-animation-duration), var(--popup-animation-duration),
65091
- var(--popup-opacity-duration), var(--popup-translate-duration),
65092
- var(--popup-scale-duration), var(--popup-animation-duration),
65093
- var(--popup-translate-duration);
65094
- transition-timing-function: ease;
65095
- transition-behavior: allow-discrete;
65096
- }
65097
-
65098
65192
  /* Where a travel may be cut, per side, in the popup's own coordinates.
65099
65193
  --container-position-room-* is how far past each of its own edges the
65100
65194
  popup may still paint before reaching the edge of the area it was placed
@@ -65126,6 +65220,28 @@ const popupCss = /* css */ `
65126
65220
  -1 * var(--container-position-room-left, 100vmax) - 100vmax +
65127
65221
  min(100vmax, var(--navi-app-inset-left, 0px) * 1000000)
65128
65222
  );
65223
+ /* The translate property is deliberately absent from this list — it
65224
+ carries where the popup stands, and applyNewPosition (visible_rect.js)
65225
+ owns it and drives its own transition through the Web Animations API
65226
+ instead of CSS, so it stays independent of whatever this list contains
65227
+ (no shared transition-property to clobber, no propertyName to filter).
65228
+ What moves here is transform, which composes under it. */
65229
+ &[navi-animation] {
65230
+ /* clip-path takes the translate's own duration, for the one cut that
65231
+ still moves (a band of glass beside the app — see this file's top
65232
+ comment for why every other cut is a constant). A constant cut, or a
65233
+ kind that sets none, has the same value on both sides of the change,
65234
+ which costs nothing. */
65235
+ transition-property:
65236
+ display, overlay, opacity, transform, scale, box-shadow, clip-path;
65237
+ transition-duration:
65238
+ var(--popup-animation-duration), var(--popup-animation-duration),
65239
+ var(--popup-opacity-duration), var(--popup-translate-duration),
65240
+ var(--popup-scale-duration), var(--popup-animation-duration),
65241
+ var(--popup-translate-duration);
65242
+ transition-timing-function: ease;
65243
+ transition-behavior: allow-discrete;
65244
+ }
65129
65245
  /* A local popup is clipped by its clip wrapper (a static ancestor sized to
65130
65246
  the container, overflow: hidden): nothing is left for a cut to hide. */
65131
65247
  &[data-layer="local"] {
@@ -65255,7 +65371,6 @@ const popupCss = /* css */ `
65255
65371
  transform: translate(var(--x-popup-travel-x), var(--x-popup-travel-y));
65256
65372
  }
65257
65373
  }
65258
-
65259
65374
  }
65260
65375
 
65261
65376
  .navi_popover {
@@ -65620,6 +65735,62 @@ let openLocalDialogCount = 0;
65620
65735
  const css$E = /* css */`
65621
65736
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
65622
65737
  order depending on which popup renders first. */
65738
+
65739
+ /* Not inherited: each is written on the dialog or derived there — by its
65740
+ placement (see popup_css.js for what inheriting would cost), by its
65741
+ opening (the anchor box under sizeFromAnchor, the stack order) or from the
65742
+ minWidth/maxWidth/minHeight/maxHeight props — and read by the dialog
65743
+ alone. Inherited, a dialog nested in this one would also open at this
65744
+ one's size. */
65745
+ @property --dialog-stack-order {
65746
+ syntax: "*";
65747
+ inherits: false;
65748
+ }
65749
+ @property --anchor-width {
65750
+ syntax: "*";
65751
+ inherits: false;
65752
+ }
65753
+ @property --anchor-height {
65754
+ syntax: "*";
65755
+ inherits: false;
65756
+ }
65757
+ @property --dialog-min-width {
65758
+ syntax: "*";
65759
+ inherits: false;
65760
+ }
65761
+ @property --dialog-max-width {
65762
+ syntax: "*";
65763
+ inherits: false;
65764
+ }
65765
+ @property --dialog-min-height {
65766
+ syntax: "*";
65767
+ inherits: false;
65768
+ }
65769
+ @property --dialog-max-height {
65770
+ syntax: "*";
65771
+ inherits: false;
65772
+ }
65773
+ @property --x-dialog-container-spacing {
65774
+ syntax: "*";
65775
+ inherits: false;
65776
+ }
65777
+ @property --dialog-maxmax-width {
65778
+ syntax: "*";
65779
+ inherits: false;
65780
+ }
65781
+ @property --dialog-maxmax-height {
65782
+ syntax: "*";
65783
+ inherits: false;
65784
+ }
65785
+ @property --x-dialog-max-width {
65786
+ syntax: "*";
65787
+ inherits: false;
65788
+ }
65789
+ @property --x-dialog-max-height {
65790
+ syntax: "*";
65791
+ inherits: false;
65792
+ }
65793
+
65623
65794
  @layer navi {
65624
65795
  .navi_dialog {
65625
65796
  /* Min gap between the dialog and the edges of its container. Written
@@ -65717,18 +65888,6 @@ const css$E = /* css */`
65717
65888
  --x-corner-bottom-right-radius: initial;
65718
65889
  --x-corner-bottom-left-radius: initial;
65719
65890
 
65720
- /* Sizing is per dialog: the anchor box (sizeFromAnchor) and the
65721
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
65722
- element, and an inline declaration wins over these resets. Without
65723
- them, a dialog nested in another dialog would inherit its parent's
65724
- inline values and open at the parent's size. */
65725
- --anchor-width: initial;
65726
- --anchor-height: initial;
65727
- --dialog-min-width: initial;
65728
- --dialog-max-width: initial;
65729
- --dialog-min-height: initial;
65730
- --dialog-max-height: initial;
65731
-
65732
65891
  /* Computed once, reused by both max-width itself and min-width's own
65733
65892
  clamp below (see its comment for why) — avoids repeating the same
65734
65893
  min(..., ...) expression twice. */
@@ -65983,7 +66142,7 @@ const css$E = /* css */`
65983
66142
  &[aria-expanded="true"]:not([navi-transitions-off])::backdrop {
65984
66143
  opacity: 1;
65985
66144
  transition-property: opacity;
65986
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
66145
+ transition-duration: var(--popup-animation-duration, 0.18s);
65987
66146
  transition-timing-function: ease;
65988
66147
 
65989
66148
  @starting-style {
@@ -66166,7 +66325,7 @@ const css$E = /* css */`
66166
66325
  &[aria-expanded="true"] {
66167
66326
  opacity: 1;
66168
66327
  transition-property: opacity;
66169
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
66328
+ transition-duration: var(--popup-animation-duration);
66170
66329
  transition-timing-function: ease;
66171
66330
  }
66172
66331
  }
@@ -66204,8 +66363,9 @@ const css$E = /* css */`
66204
66363
  and unpressable while the movement plays: under a modal wall at the
66205
66364
  opening, and for the popup's --popup-animation-duration at the closing. */
66206
66365
  :root[data-navi-popup-lift] {
66207
- /* The popup's own pace, published on the root by popup_lift.js because the
66208
- ::view-transition tree hangs off it and inherits from nowhere else. */
66366
+ /* The popup's own pace, published on ::view-transition by popup_lift.js:
66367
+ the pictures inherit from nowhere else. The wall reads it off the
66368
+ dialog itself (the [data-lifting] backdrop rules above). */
66209
66369
  &::view-transition-group(navi-popup-lift),
66210
66370
  &::view-transition-old(navi-popup-lift),
66211
66371
  &::view-transition-new(navi-popup-lift),
@@ -67563,7 +67723,7 @@ const useDialogProps = props => {
67563
67723
  if (isTopLayer && themeColor !== false) {
67564
67724
  addCleanup(pushPopupThemeColor({
67565
67725
  themeColor,
67566
- backdropColor: backdrop ? getComputedStyle(dialogEl, "::backdrop").backgroundColor : null,
67726
+ backdropColor: backdrop ? readBackdropColor(dialogEl) : null,
67567
67727
  surfaceColor: flushEdges.top ? getComputedStyle(dialogEl).backgroundColor : null
67568
67728
  }));
67569
67729
  }
@@ -67947,6 +68107,58 @@ let openLocalPopoverCount = 0;
67947
68107
  const css$D = /* css */`
67948
68108
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
67949
68109
  order depending on which popup renders first. */
68110
+
68111
+ /* Not inherited: each is written on the popover or derived there — by its
68112
+ placement (the anchor box included; see popup_css.js for what inheriting
68113
+ would cost), by its opening (the stack order, which the backdrop gets a
68114
+ copy of) or from the minWidth/maxWidth/minHeight/maxHeight props — and
68115
+ read by the popover alone. Inherited, a popover nested in another popup
68116
+ would also open at the outer one's size. */
68117
+ @property --popover-stack-order {
68118
+ syntax: "*";
68119
+ inherits: false;
68120
+ }
68121
+ @property --anchor-width {
68122
+ syntax: "*";
68123
+ inherits: false;
68124
+ }
68125
+ @property --anchor-height {
68126
+ syntax: "*";
68127
+ inherits: false;
68128
+ }
68129
+ @property --anchor-inner-width {
68130
+ syntax: "*";
68131
+ inherits: false;
68132
+ }
68133
+ @property --anchor-inner-height {
68134
+ syntax: "*";
68135
+ inherits: false;
68136
+ }
68137
+ @property --popover-min-width {
68138
+ syntax: "*";
68139
+ inherits: false;
68140
+ }
68141
+ @property --popover-max-width {
68142
+ syntax: "*";
68143
+ inherits: false;
68144
+ }
68145
+ @property --popover-min-height {
68146
+ syntax: "*";
68147
+ inherits: false;
68148
+ }
68149
+ @property --popover-max-height {
68150
+ syntax: "*";
68151
+ inherits: false;
68152
+ }
68153
+ @property --x-popover-max-width {
68154
+ syntax: "*";
68155
+ inherits: false;
68156
+ }
68157
+ @property --x-popover-max-height {
68158
+ syntax: "*";
68159
+ inherits: false;
68160
+ }
68161
+
67950
68162
  @layer navi {
67951
68163
  .navi_popover {
67952
68164
  /* soft: user-configurable preferred max-height. Kept as a *default*
@@ -68008,21 +68220,6 @@ const css$D = /* css */`
68008
68220
  --x-corner-bottom-right-radius: initial;
68009
68221
  --x-corner-bottom-left-radius: initial;
68010
68222
 
68011
- /* Sizing is per popover: the anchor box and the
68012
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
68013
- element, and an inline declaration wins over these resets. Without
68014
- them, a popover nested in another popup (or opened without an anchor
68015
- inside one sized from its own) would inherit the outer inline values
68016
- and open at the outer size. */
68017
- --anchor-width: initial;
68018
- --anchor-height: initial;
68019
- --anchor-inner-width: initial;
68020
- --anchor-inner-height: initial;
68021
- --popover-min-width: initial;
68022
- --popover-max-width: initial;
68023
- --popover-min-height: initial;
68024
- --popover-max-height: initial;
68025
-
68026
68223
  --x-popover-max-width: min(
68027
68224
  var(--popover-max-width, var(--popover-maxmax-width)),
68028
68225
  var(--container-position-remaining-width, var(--popover-maxmax-width)),
@@ -68151,10 +68348,8 @@ const css$D = /* css */`
68151
68348
  "position: absolute" above. */
68152
68349
  &[popover] {
68153
68350
  position: fixed;
68154
- /* The native top layer already gives "last shown wins" for free —
68155
- --popover-stack-order is only ever set by the custom renderer's own
68156
- openEffect, but reset here regardless in case a consumer sets the
68157
- var directly on an ancestor. */
68351
+ /* The native top layer already gives "last shown wins" for free: the
68352
+ custom renderer's stack order has no say here. */
68158
68353
  z-index: unset;
68159
68354
  padding: 0;
68160
68355
 
@@ -69330,7 +69525,7 @@ const usePopoverProps = props => {
69330
69525
  if (isTopLayer && themeColor !== false) {
69331
69526
  addCleanup(pushPopupThemeColor({
69332
69527
  themeColor,
69333
- backdropColor: backdropEl ? getComputedStyle(backdropEl).backgroundColor : null
69528
+ backdropColor: backdropEl ? readBackdropColor(backdropEl) : null
69334
69529
  }));
69335
69530
  }
69336
69531
  const cancelOpenInteractionSuppression = !silent && hasCssTransitionAnimation ? suppressPointerEventsDuringTransition(popoverEl) : null;