@ai-matrx/design-system 0.61.12 → 0.61.13
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 +8 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.61.13 — a pinned count badge is not an overflowing pill
|
|
4
|
+
|
|
5
|
+
- Pill guard: a capsule positioned `absolute`/`fixed` (a count badge pinned to an icon's corner)
|
|
6
|
+
overhangs its parent by design; only the viewport judges it. 0.61.12 flagged the shell assists
|
|
7
|
+
dock's "4" badge (3px past its button) on every page.
|
|
8
|
+
|
|
9
|
+
No consumer action.
|
|
10
|
+
|
|
3
11
|
## 0.61.12 — the pill guard flags a pill that runs past its row or the screen
|
|
4
12
|
|
|
5
13
|
- Pill guard: a capsule whose box runs past its parent's box or the viewport is outlined. Measured:
|
package/dist/index.cjs
CHANGED
|
@@ -735,8 +735,9 @@ function overflowPast(el, rect, view) {
|
|
|
735
735
|
const ox = view.getComputedStyle(p).overflowX;
|
|
736
736
|
if (ox === "auto" || ox === "scroll") return null;
|
|
737
737
|
}
|
|
738
|
+
const pinned = ["absolute", "fixed"].includes(view.getComputedStyle(el).position);
|
|
738
739
|
const parent = el.parentElement;
|
|
739
|
-
if (parent) {
|
|
740
|
+
if (parent && !pinned) {
|
|
740
741
|
const pr = parent.getBoundingClientRect();
|
|
741
742
|
if (pr.width > 0) {
|
|
742
743
|
const by = Math.max(rect.right - pr.right, pr.left - rect.left);
|