Repository navigation
Releases: bbopen/tw-layout-lint
Release list
tw-layout-lint v0.1.1
Dependency refresh for tw-layout-lint. The public API and runtime class rules have not changed.
- Updated Tailwind CSS, React, Vite, Playwright, and supported test tools.
- Updated GitHub Actions checkout and Node setup to v7.
- Kept TypeScript 6 because tsup's declaration build fails with TypeScript 7. Kept Vitest 4 for Node 20 support.
CI passed on Node 20 and 22. The demo's Chromium tests and fresh consumer package check also passed.
Install this release from its tarball:
npm install https://github.com/bbopen/tw-layout-lint/releases/download/v0.1.1/tw-layout-lint-0.1.1.tgzThe package is not published to the public npm registry. This GitHub release contains the installable tarball.
tw-layout-lint 0.1.0
First public release of tw-layout-lint — a layout-only class validator for Tailwind CSS v4 agent output, with stable diagnostic codes, a finite runtime safelist, and a small React adapter.
What it is
A small package (~12 KB gz) that takes the layout-only Tailwind class strings an LLM emits, validates them against a strict allowlist, and returns stable diagnostic codes so the agent can self-correct. Plus a React adapter and a generated @source inline() artifact that pins the runtime class set so Tailwind v4 actually emits CSS for everything the validator accepts.
Highlights
- 29 stable diagnostic codes with structured payloads (code, severity, phase, path, hint, related). Codes are stable starting at this release: never reused, never removed in 0.x.
- Runtime contract verified end-to-end at four layers: validator accept set → enumeration →
@source inline()brace expansion → real@tailwindcss/clioutput. Verified additionally via a Cloudflare-tunneled fresh-consumer test. - 263 tests across 12 files: token grammar, value grammar, shape, runtime + build-time + family-var-pairing, adversarial categories + deep probes, React adapter under StrictMode / Fragment / memo, real Tailwind compile, build artifact (bundle, ESM/CJS, source maps), public API contract, catalog drift + diagnostic snapshot stability.
- Build-time mode (opt-in) for static numerics + arbitrary values; runtime mode (default) is intentionally narrow with a finite safelist for Tailwind v4 to safelist.
- Demo at
examples/demo/with three pages (Adversarial showcase, Playground, Gallery) and a Playwright e2e suite.
Install
npm install tw-layout-lint/* globals.css */
@import "tailwindcss";
@import "tw-layout-lint/source.css";Documentation
- Skill.md for agent integration:
docs/skills/tw-layout-lint.md - Diagnostic catalog (auto-generated):
docs/diagnostics.md - Design spec:
docs/superpowers/specs/2026-04-27-tw-layout-lint-design.md - Full changelog: CHANGELOG.md
Bundle (gz)
| File | Size |
|---|---|
dist/index.js |
12 KB |
dist/react/index.js |
10 KB |
dist/source.css |
0.8 KB |
License: MIT.