@jsenv/navi 0.30.21 → 0.30.22

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.
@@ -63057,6 +63057,7 @@ const css$R = /* css */`.navi_control_swap {
63057
63057
  --x-control-swap-size: var(--navi-control-swap-size, calc(var(--navi-control-line-height) + 2 * var(--navi-s) + 2 *
63058
63058
  var(--navi-control-border-width)));
63059
63059
  --x-control-swap-gap: var(--navi-control-swap-gap, var(--navi-xs));
63060
+ --x-control-swap-seam-travel: calc(var(--x-control-swap-gap) + var(--navi-control-border-width));
63060
63061
  height: var(--x-control-swap-size);
63061
63062
  align-items: stretch;
63062
63063
  gap: var(--x-control-swap-gap);
@@ -63070,15 +63071,45 @@ const css$R = /* css */`.navi_control_swap {
63070
63071
  min-width: 0;
63071
63072
  height: 100%;
63072
63073
  position: relative;
63074
+
63075
+ &:has( ~ .navi_control_swap_stage)[aria-expanded="true"] {
63076
+ --x-corner-top-right-radius: 0;
63077
+ --x-corner-bottom-right-radius: 0;
63078
+ }
63079
+
63080
+ .navi_control_swap_stage ~ &[aria-expanded="true"] {
63081
+ --x-corner-top-left-radius: 0;
63082
+ --x-corner-bottom-left-radius: 0;
63083
+ }
63084
+
63085
+ &:focus-visible, &[data-focus-visible] {
63086
+ z-index: var(--navi-z-index-control-focused);
63087
+ }
63073
63088
  }
63074
63089
 
63075
63090
  & > .navi_control_swap_stage {
63091
+ min-width: 0;
63092
+ margin-left: calc(-1 * var(--x-control-swap-seam-travel));
63076
63093
  overflow-clip-margin: var(--navi-focus-outline-width);
63077
63094
  flex: 1 1 0;
63078
- min-width: 0;
63079
63095
  display: flex;
63080
63096
  overflow: clip;
63081
63097
  container-type: inline-size;
63098
+
63099
+ &:hover {
63100
+ z-index: var(--navi-z-index-control-hovered);
63101
+ position: relative;
63102
+ }
63103
+
63104
+ &:has(:focus-visible, [data-focus-visible]) {
63105
+ z-index: var(--navi-z-index-control-focused);
63106
+ position: relative;
63107
+ }
63108
+
63109
+ &:has([aria-expanded="true"]) {
63110
+ z-index: var(--navi-z-index-control-expanded);
63111
+ position: relative;
63112
+ }
63082
63113
  }
63083
63114
 
63084
63115
  & > .navi_control_swap_stage > .navi_control_swap_track {
@@ -63097,20 +63128,43 @@ const css$R = /* css */`.navi_control_swap {
63097
63128
  width: 100%;
63098
63129
  height: 100%;
63099
63130
  }
63131
+
63132
+ &:first-child > :not([navi-out-of-flow]) {
63133
+ --x-corner-top-left-radius: 0;
63134
+ --x-corner-bottom-left-radius: 0;
63135
+ border-top-left-radius: 0 !important;
63136
+ border-bottom-left-radius: 0 !important;
63137
+ }
63138
+
63139
+ &:last-child > :not([navi-out-of-flow]) {
63140
+ --x-corner-top-right-radius: 0;
63141
+ --x-corner-bottom-right-radius: 0;
63142
+ border-top-right-radius: 0 !important;
63143
+ border-bottom-right-radius: 0 !important;
63144
+ }
63100
63145
  }
63101
63146
  }
63102
63147
 
63148
+ &[data-active-index="1"] > .navi_control_swap_stage {
63149
+ transform: translateX(var(--x-control-swap-seam-travel));
63150
+ }
63151
+
63103
63152
  &[data-active-index="1"] > .navi_control_swap_stage > .navi_control_swap_track {
63104
63153
  transform: translateX(calc(-100cqw - var(--x-control-swap-gap)));
63105
63154
  }
63106
63155
 
63107
- &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63156
+ &[data-animation] > .navi_control_swap_stage, &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63108
63157
  transition: transform var(--navi-control-swap-animation-duration, .22s)
63109
63158
  ease;
63110
63159
  }
63111
63160
 
63161
+ &[data-animation] > .navi_control_swap_cap {
63162
+ transition: border-radius
63163
+ var(--navi-control-swap-animation-duration, .22s) ease;
63164
+ }
63165
+
63112
63166
  @media (prefers-reduced-motion: reduce) {
63113
- &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63167
+ &[data-animation] > .navi_control_swap_stage, &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track, &[data-animation] > .navi_control_swap_cap {
63114
63168
  transition: none;
63115
63169
  }
63116
63170
  }
@@ -63141,8 +63195,9 @@ const css$R = /* css */`.navi_control_swap {
63141
63195
  *
63142
63196
  * The row is one length tall — `--navi-control-swap-size`, a line of text
63143
63197
  * between two `s` paddings — and everything in it is that tall: the caps are
63144
- * squares of it, the control holding the floor fills it. `--navi-control-swap-gap`
63145
- * is the space between the boxes.
63198
+ * squares of it, the control holding the floor fills it. The control is joined
63199
+ * to its cap by a shared border; `--navi-control-swap-gap` is the space between
63200
+ * it and the other cap.
63146
63201
  */
63147
63202
  const ControlSwap = props => {
63148
63203
  import.meta.css = [css$R, "@jsenv/navi/src/control/control_swap/control_swap.jsx"];
@@ -70236,6 +70291,12 @@ const SlideContainer = ({
70236
70291
  // names a slide, and the container standing on its first one is a fact only
70237
70292
  // the map knows (see the layout effect that paints it).
70238
70293
  const areaOnScreen = containerRef.current.getAttribute(SLIDE_CURRENT_ATTRIBUTE);
70294
+ // Standing on the first slide by default holds a rank, and the slide at
70295
+ // that rank changes with their order. Someone outside is naming slides, so
70296
+ // the one on screen is held by its name from this answer on.
70297
+ if (current !== areaOnScreen) {
70298
+ setCurrentAreaState(areaOnScreen);
70299
+ }
70239
70300
  if (areaAsked === areaOnScreen) {
70240
70301
  return;
70241
70302
  }