@jsenv/navi 0.30.21 → 0.30.23

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.
@@ -28155,7 +28155,7 @@ const createResourceLifecycleManager = () => {
28155
28155
 
28156
28156
  for (const restAction of config.restActionSet) {
28157
28157
  const actionCandidateArray = restAction.matchAllSelfOrDescendant(
28158
- (action) => isAnsweredOrAsking(action, triggeringAction),
28158
+ (action) => shouldAskAgain(action, triggeringAction),
28159
28159
  );
28160
28160
 
28161
28161
  for (const actionCandidate of actionCandidateArray) {
@@ -28195,7 +28195,7 @@ const createResourceLifecycleManager = () => {
28195
28195
  break delete_effect;
28196
28196
  }
28197
28197
  if (candidateIsPlural) {
28198
- if (!shouldRerunGetMany) {
28198
+ if (candidateVerb !== "GET" || !shouldRerunGetMany) {
28199
28199
  break delete_effect;
28200
28200
  }
28201
28201
  actionsToRerun.add(actionCandidate);
@@ -28337,7 +28337,7 @@ const createResourceLifecycleManager = () => {
28337
28337
  continue;
28338
28338
  }
28339
28339
  const instanceArray = dependentAction.matchAllSelfOrDescendant(
28340
- (action) => isAnsweredOrAsking(action, triggeringAction),
28340
+ (action) => shouldAskAgain(action, triggeringAction),
28341
28341
  );
28342
28342
  for (const instance of instanceArray) {
28343
28343
  actionsToRerun.add(instance);
@@ -28440,12 +28440,16 @@ const createResourceLifecycleManager = () => {
28440
28440
  };
28441
28441
  };
28442
28442
 
28443
- // A read to ask again after a write: answered before it landed, or still out —
28444
- // an answer that left before the write is as stale as a completed one, and
28445
- // would replace what the write put in the store (a rerun aborts it and asks
28446
- // again). A head start is its owner's to ask (findEffectOnActions resets it).
28447
- const isAnsweredOrAsking = (action, triggeringAction) =>
28448
- (action.completed || action.runningState === RUNNING) &&
28443
+ // A read to ask again after a write: answered before it landed, still out, or
28444
+ // failed. An answer that left before the write is as stale as a completed one,
28445
+ // and would replace what the write put in the store (a rerun aborts it and asks
28446
+ // again). A failed read has no other way back: only a write asks it again.
28447
+ // A head start is its owner's to ask: findEffectOnActions resets one holding an
28448
+ // answer, and one that failed stays FAILED (see prerunAhead in route_action.js).
28449
+ const shouldAskAgain = (action, triggeringAction) =>
28450
+ (action.completed ||
28451
+ action.runningState === RUNNING ||
28452
+ (action.runningState === FAILED && !action.isPrerunSignal.peek())) &&
28449
28453
  action !== triggeringAction;
28450
28454
  // A write named in `writes` says for itself which reads of its own resource it
28451
28455
  // reruns (`rerunOn: { GET_RANGE: true }`); a read it leaves out, and every read
@@ -63057,6 +63061,7 @@ const css$R = /* css */`.navi_control_swap {
63057
63061
  --x-control-swap-size: var(--navi-control-swap-size, calc(var(--navi-control-line-height) + 2 * var(--navi-s) + 2 *
63058
63062
  var(--navi-control-border-width)));
63059
63063
  --x-control-swap-gap: var(--navi-control-swap-gap, var(--navi-xs));
63064
+ --x-control-swap-seam-travel: calc(var(--x-control-swap-gap) + var(--navi-control-border-width));
63060
63065
  height: var(--x-control-swap-size);
63061
63066
  align-items: stretch;
63062
63067
  gap: var(--x-control-swap-gap);
@@ -63070,15 +63075,45 @@ const css$R = /* css */`.navi_control_swap {
63070
63075
  min-width: 0;
63071
63076
  height: 100%;
63072
63077
  position: relative;
63078
+
63079
+ &:has( ~ .navi_control_swap_stage)[aria-expanded="true"] {
63080
+ --x-corner-top-right-radius: 0;
63081
+ --x-corner-bottom-right-radius: 0;
63082
+ }
63083
+
63084
+ .navi_control_swap_stage ~ &[aria-expanded="true"] {
63085
+ --x-corner-top-left-radius: 0;
63086
+ --x-corner-bottom-left-radius: 0;
63087
+ }
63088
+
63089
+ &:focus-visible, &[data-focus-visible] {
63090
+ z-index: var(--navi-z-index-control-focused);
63091
+ }
63073
63092
  }
63074
63093
 
63075
63094
  & > .navi_control_swap_stage {
63095
+ min-width: 0;
63096
+ margin-left: calc(-1 * var(--x-control-swap-seam-travel));
63076
63097
  overflow-clip-margin: var(--navi-focus-outline-width);
63077
63098
  flex: 1 1 0;
63078
- min-width: 0;
63079
63099
  display: flex;
63080
63100
  overflow: clip;
63081
63101
  container-type: inline-size;
63102
+
63103
+ &:hover {
63104
+ z-index: var(--navi-z-index-control-hovered);
63105
+ position: relative;
63106
+ }
63107
+
63108
+ &:has(:focus-visible, [data-focus-visible]) {
63109
+ z-index: var(--navi-z-index-control-focused);
63110
+ position: relative;
63111
+ }
63112
+
63113
+ &:has([aria-expanded="true"]) {
63114
+ z-index: var(--navi-z-index-control-expanded);
63115
+ position: relative;
63116
+ }
63082
63117
  }
63083
63118
 
63084
63119
  & > .navi_control_swap_stage > .navi_control_swap_track {
@@ -63097,20 +63132,43 @@ const css$R = /* css */`.navi_control_swap {
63097
63132
  width: 100%;
63098
63133
  height: 100%;
63099
63134
  }
63135
+
63136
+ &:first-child > :not([navi-out-of-flow]) {
63137
+ --x-corner-top-left-radius: 0;
63138
+ --x-corner-bottom-left-radius: 0;
63139
+ border-top-left-radius: 0 !important;
63140
+ border-bottom-left-radius: 0 !important;
63141
+ }
63142
+
63143
+ &:last-child > :not([navi-out-of-flow]) {
63144
+ --x-corner-top-right-radius: 0;
63145
+ --x-corner-bottom-right-radius: 0;
63146
+ border-top-right-radius: 0 !important;
63147
+ border-bottom-right-radius: 0 !important;
63148
+ }
63100
63149
  }
63101
63150
  }
63102
63151
 
63152
+ &[data-active-index="1"] > .navi_control_swap_stage {
63153
+ transform: translateX(var(--x-control-swap-seam-travel));
63154
+ }
63155
+
63103
63156
  &[data-active-index="1"] > .navi_control_swap_stage > .navi_control_swap_track {
63104
63157
  transform: translateX(calc(-100cqw - var(--x-control-swap-gap)));
63105
63158
  }
63106
63159
 
63107
- &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63160
+ &[data-animation] > .navi_control_swap_stage, &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63108
63161
  transition: transform var(--navi-control-swap-animation-duration, .22s)
63109
63162
  ease;
63110
63163
  }
63111
63164
 
63165
+ &[data-animation] > .navi_control_swap_cap {
63166
+ transition: border-radius
63167
+ var(--navi-control-swap-animation-duration, .22s) ease;
63168
+ }
63169
+
63112
63170
  @media (prefers-reduced-motion: reduce) {
63113
- &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track {
63171
+ &[data-animation] > .navi_control_swap_stage, &[data-animation] > .navi_control_swap_stage > .navi_control_swap_track, &[data-animation] > .navi_control_swap_cap {
63114
63172
  transition: none;
63115
63173
  }
63116
63174
  }
@@ -63141,8 +63199,9 @@ const css$R = /* css */`.navi_control_swap {
63141
63199
  *
63142
63200
  * The row is one length tall — `--navi-control-swap-size`, a line of text
63143
63201
  * 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.
63202
+ * squares of it, the control holding the floor fills it. The control is joined
63203
+ * to its cap by a shared border; `--navi-control-swap-gap` is the space between
63204
+ * it and the other cap.
63146
63205
  */
63147
63206
  const ControlSwap = props => {
63148
63207
  import.meta.css = [css$R, "@jsenv/navi/src/control/control_swap/control_swap.jsx"];
@@ -70236,6 +70295,12 @@ const SlideContainer = ({
70236
70295
  // names a slide, and the container standing on its first one is a fact only
70237
70296
  // the map knows (see the layout effect that paints it).
70238
70297
  const areaOnScreen = containerRef.current.getAttribute(SLIDE_CURRENT_ATTRIBUTE);
70298
+ // Standing on the first slide by default holds a rank, and the slide at
70299
+ // that rank changes with their order. Someone outside is naming slides, so
70300
+ // the one on screen is held by its name from this answer on.
70301
+ if (current !== areaOnScreen) {
70302
+ setCurrentAreaState(areaOnScreen);
70303
+ }
70239
70304
  if (areaAsked === areaOnScreen) {
70240
70305
  return;
70241
70306
  }