hyperframes 0.4.41 → 0.4.43
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 +4663 -4392
- package/dist/commands/contrast-audit.browser.js +2 -0
- package/dist/hyperframe-runtime.js +19 -19
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +19 -19
- package/dist/skills/hyperframes/scripts/contrast-report.mjs +10 -0
- package/dist/studio/assets/{index-D4-n3yWG.js → index-Dzq4sUj7.js} +21 -21
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
|
@@ -90,6 +90,7 @@ window.__contrastAudit = async function (imgBase64, time) {
|
|
|
90
90
|
if (parseFloat(cs.opacity) <= 0.01) continue;
|
|
91
91
|
var rect = el.getBoundingClientRect();
|
|
92
92
|
if (rect.width < 8 || rect.height < 8) continue;
|
|
93
|
+
if (rect.right <= 0 || rect.bottom <= 0 || rect.left >= w || rect.top >= h) continue;
|
|
93
94
|
|
|
94
95
|
var fg = parseColor(cs.color);
|
|
95
96
|
if (fg[3] <= 0.01) continue;
|
|
@@ -103,6 +104,7 @@ window.__contrastAudit = async function (imgBase64, time) {
|
|
|
103
104
|
var y0 = Math.max(0, Math.floor(rect.y) - 4);
|
|
104
105
|
var y1 = Math.min(h - 1, Math.ceil(rect.y + rect.height) + 4);
|
|
105
106
|
var sample = function (sx, sy) {
|
|
107
|
+
if (sx < 0 || sx >= w || sy < 0 || sy >= h) return;
|
|
106
108
|
var idx = (sy * w + sx) * 4;
|
|
107
109
|
rr.push(px[idx]);
|
|
108
110
|
gg.push(px[idx + 1]);
|