@jsenv/navi 0.30.18 → 0.30.19

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.
@@ -58921,6 +58921,7 @@ const NOTHING = {
58921
58921
  known: false,
58922
58922
  current: undefined,
58923
58923
  toward: undefined,
58924
+ base: undefined,
58924
58925
  areas: NO_WAYS,
58925
58926
  ways: NO_WAYS,
58926
58927
  held: NO_WAYS,
@@ -58943,6 +58944,14 @@ const readSlideContainerState = (element) => ({
58943
58944
  known: true,
58944
58945
  current: readSlideOnScreen(element),
58945
58946
  toward: element.getAttribute(SLIDE_TOWARD_ATTRIBUTE) ?? undefined,
58947
+ // The slide --slide-travel-progress counts from, which is what a follower
58948
+ // drawing the travel measures from (a Nav's bar, a StepList's halo). Not the
58949
+ // slide on screen: a landing changes it after the heading has already said
58950
+ // where the row was going.
58951
+ base:
58952
+ element.getAttribute(SLIDE_BASE_ATTRIBUTE) ??
58953
+ element.getAttribute(SLIDE_CURRENT_ATTRIBUTE) ??
58954
+ undefined,
58946
58955
  // In DOM order — which is the order of the WALK for a line, and not
58947
58956
  // necessarily for a map: there the order is the one the areas are written in
58948
58957
  // (see parseAreas). Ask `can("first")` / `can("last")` about the ends rather
@@ -58960,6 +58969,7 @@ const sameSlideContainerState = (a, b) =>
58960
58969
  a.known === b.known &&
58961
58970
  a.current === b.current &&
58962
58971
  a.toward === b.toward &&
58972
+ a.base === b.base &&
58963
58973
  a.areas.join(" ") === b.areas.join(" ") &&
58964
58974
  a.ways.join(" ") === b.ways.join(" ") &&
58965
58975
  a.held.join(" ") === b.held.join(" ");
@@ -59022,7 +59032,12 @@ const useSlideContainer = (target) => {
59022
59032
  // (the box was already standing somewhere when this mounted), and one way
59023
59033
  // of reading is one thing that can be wrong.
59024
59034
  const read = () => {
59025
- const nextState = readSlideContainerState(element);
59035
+ // Without the base, which this does not return: a landing changes it
59036
+ // alone, and that is no reason to render the readers.
59037
+ const nextState = {
59038
+ ...readSlideContainerState(element),
59039
+ base: undefined,
59040
+ };
59026
59041
  setState((previous) =>
59027
59042
  sameSlideContainerState(previous, nextState) ? previous : nextState,
59028
59043
  );