@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.
@@ -57366,6 +57366,7 @@ const NOTHING = {
57366
57366
  known: false,
57367
57367
  current: undefined,
57368
57368
  toward: undefined,
57369
+ base: undefined,
57369
57370
  areas: NO_WAYS,
57370
57371
  ways: NO_WAYS,
57371
57372
  held: NO_WAYS,
@@ -57388,6 +57389,14 @@ const readSlideContainerState = (element) => ({
57388
57389
  known: true,
57389
57390
  current: readSlideOnScreen(element),
57390
57391
  toward: element.getAttribute(SLIDE_TOWARD_ATTRIBUTE) ?? undefined,
57392
+ // The slide --slide-travel-progress counts from, which is what a follower
57393
+ // drawing the travel measures from (a Nav's bar, a StepList's halo). Not the
57394
+ // slide on screen: a landing changes it after the heading has already said
57395
+ // where the row was going.
57396
+ base:
57397
+ element.getAttribute(SLIDE_BASE_ATTRIBUTE) ??
57398
+ element.getAttribute(SLIDE_CURRENT_ATTRIBUTE) ??
57399
+ undefined,
57391
57400
  // In DOM order — which is the order of the WALK for a line, and not
57392
57401
  // necessarily for a map: there the order is the one the areas are written in
57393
57402
  // (see parseAreas). Ask `can("first")` / `can("last")` about the ends rather
@@ -57405,6 +57414,7 @@ const sameSlideContainerState = (a, b) =>
57405
57414
  a.known === b.known &&
57406
57415
  a.current === b.current &&
57407
57416
  a.toward === b.toward &&
57417
+ a.base === b.base &&
57408
57418
  a.areas.join(" ") === b.areas.join(" ") &&
57409
57419
  a.ways.join(" ") === b.ways.join(" ") &&
57410
57420
  a.held.join(" ") === b.held.join(" ");
@@ -57467,7 +57477,12 @@ const useSlideContainer = (target) => {
57467
57477
  // (the box was already standing somewhere when this mounted), and one way
57468
57478
  // of reading is one thing that can be wrong.
57469
57479
  const read = () => {
57470
- const nextState = readSlideContainerState(element);
57480
+ // Without the base, which this does not return: a landing changes it
57481
+ // alone, and that is no reason to render the readers.
57482
+ const nextState = {
57483
+ ...readSlideContainerState(element),
57484
+ base: undefined,
57485
+ };
57471
57486
  setState((previous) =>
57472
57487
  sameSlideContainerState(previous, nextState) ? previous : nextState,
57473
57488
  );