@justai/core 0.9.1 → 0.9.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/core",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "The framework-free heart of the persona shell — the load-bearing behaviour (auth capture, reveal, ready) as plain strings, so Astro and Next inject the SAME logic instead of each re-writing it.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -654,6 +654,12 @@ export function personaScroll(options) {
654
654
  const t = cuts.find((c) => "#" + c[0].id === a.getAttribute("href"));
655
655
  if (!t) return;
656
656
  e.preventDefault();
657
+ // A NEW LANDING RE-ARMS THE PROMISE. Somebody asking for a cut is asking to arrive at it, and the
658
+ // arrival needs the same protection the page's first one had: the title strip opens as the kernel
659
+ // becomes current, which drags the scroll ~18px past the mark and tucks the kernel's first line
660
+ // under the sticky bar. Without this the toolbar's own icon landed flush and the avatar did not,
661
+ // for no reason a person could see.
662
+ landed = false;
657
663
  goTo(t[0], "smooth");
658
664
  setHash(t[0].id);
659
665
  });
@@ -662,7 +668,7 @@ export function personaScroll(options) {
662
668
  // `setHash` uses replaceState and fires nothing, so this can only be somebody else's navigation.
663
669
  window.addEventListener("hashchange", () => {
664
670
  const t = cuts.find((c) => "#" + c[0].id === location.hash);
665
- if (t) goTo(t[0], "smooth");
671
+ if (t) { landed = false; goTo(t[0], "smooth"); }
666
672
  });
667
673
  }
668
674