@justai/core 0.26.0 → 0.27.0

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.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "The framework-free heart of the persona shell \u2014 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
@@ -720,7 +720,13 @@ export function personaScroll(options) {
720
720
  if (!app) return;
721
721
  const strip = tbTitle ? tbTitle.getBoundingClientRect().height : 0;
722
722
  const open = parseFloat(getComputedStyle(toolbar).getPropertyValue("--tb-strip")) || 26;
723
- const h = Math.round(toolbar.getBoundingClientRect().height - strip + open);
723
+ // CEIL, NOT ROUND, AND IT IS LOAD-BEARING NOW: `--shell-top` is the slot's min-height as well as
724
+ // the subtrahend, so it must never be LESS than the bar's tallest state or the slot starts
725
+ // following the bar again and the 26px returns as a fraction. A bar under Dynamic Type is not an
726
+ // integer — this file has already recorded one at 82.3 — and rounding down is half a CSS pixel,
727
+ // one and a half device pixels at DPR 3, of permanent error in a law judged by eye against a
728
+ // drawn rectangle.
729
+ const h = Math.ceil(toolbar.getBoundingClientRect().height - strip + open);
724
730
  if (h > 0) app.style.setProperty("--shell-top", h + "px");
725
731
  };
726
732
  measureShell();