@justai/core 0.9.0 → 0.9.1
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.
- package/package.json +1 -1
- package/src/index.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
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
|
@@ -538,9 +538,13 @@ export function personaScroll(options) {
|
|
|
538
538
|
// a persona's own code — and is left alone. Derived from the toolbar rather than chosen, so it
|
|
539
539
|
// stays true if the bar ever changes shape.
|
|
540
540
|
const drift = toolbar ? toolbar.getBoundingClientRect().height : 0;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
// Arriving does NOT end the promise. The page can be nudged again long after it settled — a
|
|
542
|
+
// consent sheet closing moved qr by 3px, and released early that is enough to hand the section
|
|
543
|
+
// back to the profile while the kernel fills the screen. The promise ends when somebody takes
|
|
544
|
+
// over, or when the page is moved somewhere it was plainly never sent.
|
|
545
|
+
if (off <= 1) return;
|
|
546
|
+
if (off <= drift) land();
|
|
547
|
+
else landed = true;
|
|
544
548
|
};
|
|
545
549
|
requestAnimationFrame(landIfUntouched);
|
|
546
550
|
window.addEventListener("load", landIfUntouched);
|