@ai-matrx/design-system 0.61.15 → 0.61.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.61.16 — a pill panned past a chart's viewport is not an overflowing pill
4
+
5
+ - Pill guard: when a transformed layer sits between a pill and its nearest clipping ancestor (a
6
+ pan/zoom world inside a chart or canvas viewport), the pill is flagged against that clip only
7
+ when it is wider than the clip. 0.61.15 still compared position, so every chip on a card panned
8
+ out of view logged "overflows its clipping container" (measured on /agents/org-chart: 2460px).
9
+ Guard case red on 0.61.15.
10
+
11
+ No consumer action.
12
+
3
13
  ## 0.61.15 — a pill in a panned tile is not an overflowing pill
4
14
 
5
15
  - Pill guard: the viewport judges only the part of the pill its clipping ancestors leave drawn, and
package/dist/index.cjs CHANGED
@@ -746,18 +746,20 @@ function overflowPast(el, rect, view) {
746
746
  }
747
747
  let clip = null;
748
748
  let transformed = false;
749
+ let pannedInsideClip = false;
749
750
  const root = el.ownerDocument.documentElement;
750
751
  for (let p = el.parentElement; p && p !== root; p = p.parentElement) {
751
752
  const pcs = view.getComputedStyle(p);
752
753
  if (!clip && pcs.overflowX !== "visible" && pcs.overflowX !== "") clip = p;
753
754
  if (pcs.transform && pcs.transform !== "none" || pcs.translate && pcs.translate !== "none" || pcs.scale && pcs.scale !== "none" || pcs.rotate && pcs.rotate !== "none") {
754
755
  transformed = true;
756
+ if (!clip) pannedInsideClip = true;
755
757
  }
756
758
  }
757
759
  if (clip && !pinned && clip !== parent) {
758
760
  const cr = clip.getBoundingClientRect();
759
761
  if (cr.width > 0) {
760
- const by = Math.max(rect.right - cr.right, cr.left - rect.left);
762
+ const by = pannedInsideClip ? rect.width - cr.width : Math.max(rect.right - cr.right, cr.left - rect.left);
761
763
  if (by > 0.5) return { what: "its clipping container", by };
762
764
  }
763
765
  }