+1
-1
| { | ||
| "name": "gridproof", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Gridproof your UI — automated spacing & grid QA in the agent loop (MCP server).", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+12
-15
| # Gridproof | ||
| [](https://www.npmjs.com/package/gridproof) | ||
| [](./LICENSE) | ||
| **Gridproof your UI — automated spacing & grid QA in the agent loop.** | ||
@@ -11,4 +14,3 @@ | ||
| <img src="./docs/report-screenshot.png" alt="Gridproof HTML report showing spacing violations with fix hints" width="800"> | ||
| <!-- SCREENSHOT: HTML report — findings state. Replace docs/report-screenshot.png before launch. --> | ||
| <img src="https://raw.githubusercontent.com/gridproof/gridproof/master/docs/report-screenshot.png" alt="Gridproof HTML report showing spacing violations with fix hints" width="800"> | ||
@@ -19,3 +21,3 @@ ## The problem | ||
| `py-[13px]` instead of `py-3`, sibling cards with three different gaps, | ||
| icons at 17px next to icons at 24px. None of it breaks anything, so it ships — | ||
| icons at 17px next to 24px. None of it breaks anything, so it ships — | ||
| because nothing in the agent loop checks for it. Gridproof is that check. | ||
@@ -25,3 +27,3 @@ | ||
| ``` | ||
| ```text | ||
| agent generates UI → gp_audit(url) → JSON violations with fix hints | ||
@@ -79,13 +81,8 @@ → agent edits source → gp_audit(url) → clean report = done | ||
| - **`spacing-scale`** — computed margin/padding/gap that isn't a multiple of | ||
| the base unit (default 4px) and isn't an allowed value. Carries the nearest | ||
| valid value. | ||
| - **`arbitrary-value`** — off-scale arbitrary Tailwind classes (`p-[13px]` → | ||
| suggests `p-3`). | ||
| - **`gap-consistency`** — siblings in a flex/grid container spaced | ||
| inconsistently when `gap` isn't set → suggests unifying via `gap` on the | ||
| container instead of per-child margins. | ||
| - **`canonical-size`** — icon/interactive-element sizes off the canonical | ||
| scale, and interactive elements below the tap-target minimum (**error**, | ||
| [WCAG 2.5.8](https://www.w3.org/WAI/WCAG21/Understanding/target-size-minimum.html)). | ||
| | Rule | Detects | Severity | Example fix | | ||
| |------|---------|----------|-------------| | ||
| | `spacing-scale` | Computed margin/padding/gap that isn't a multiple of the base unit (default 4px) and isn't an allowed value | warn | Snaps to the nearest valid value | | ||
| | `arbitrary-value` | Off-scale arbitrary Tailwind classes | warn | `py-[13px]` → `py-3` | | ||
| | `gap-consistency` | Siblings in a flex/grid container spaced inconsistently when `gap` isn't set | warn | Set `gap-4` on the container instead of per-child margins | | ||
| | `canonical-size` | Icon/interactive-element sizes off the canonical scale, and interactive elements below the tap-target minimum | warn (icons) / **error** (tap targets) | Snap to canonical size; [WCAG 2.5.8](https://www.w3.org/WAI/WCAG21/Understanding/target-size-minimum.html) | | ||
@@ -92,0 +89,0 @@ ## Tailwind, and non-Tailwind pages |
235747
0.1%162
-1.82%