@seanyeh77/ui-cli 0.8.1 → 0.10.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.
- package/dist/cli.js +11 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -64,8 +64,17 @@ function measure() {
|
|
|
64
64
|
for (const pe of ["::before", "::after"]) {
|
|
65
65
|
const ps = getComputedStyle(el, pe);
|
|
66
66
|
if (ps.content && ps.content !== "none" && ps.position === "absolute" && ps.pointerEvents !== "none") {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
let sx = 1;
|
|
68
|
+
let sy = 1;
|
|
69
|
+
for (let n = el; n; n = n.parentElement) {
|
|
70
|
+
const t = getComputedStyle(n).transform;
|
|
71
|
+
if (!t || t === "none") continue;
|
|
72
|
+
const m = new DOMMatrixReadOnly(t);
|
|
73
|
+
sx *= Math.hypot(m.a, m.b);
|
|
74
|
+
sy *= Math.hypot(m.c, m.d);
|
|
75
|
+
}
|
|
76
|
+
const pw = (parseFloat(ps.width) || 0) * sx;
|
|
77
|
+
const ph = (parseFloat(ps.height) || 0) * sy;
|
|
69
78
|
if (cs.position === "static" || pw > Math.max(r.width, 48) + 1 || ph > Math.max(r.height, 48) + 1) {
|
|
70
79
|
if (out.escaped.length < 8) out.escaped.push(`${describe(el)}${pe} ${Math.round(pw)} x ${Math.round(ph)} px`);
|
|
71
80
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanyeh77/ui-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Checks a page against SeanYeh's design system and prints component docs: ui check, ui docs, ui list.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hsiu-An Yeh",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"playwright": "^1.65.0",
|
|
21
|
-
"@seanyeh77/ui": "^0.
|
|
21
|
+
"@seanyeh77/ui": "^0.10.0"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22"
|