# Changelog

**For consumer sites updating their implementation:** check this section to see what changed and whether any concepts need updating in your codebase.

### v1.7.3 — 2026-07-03
- **Chore:** `CfRs.md` and `validate-consumer-template.md` now included in the npm package (`dist/`) — available offline after `npm install`
- **Chore:** `pnpm build:public` generates AGENTS.md, llms.txt, and components.json in CI only; local `pnpm build` is now just `astro build`
- **Chore:** `AGENTS.md` in git uses `<!-- INJECT:* -->` markers; C8 validator ensures they're never accidentally replaced locally

### v1.7.2 — 2026-07-02
- **Chore:** No consumer-facing changes — internal build pipeline refactor (public file generation moved to CI-only script)

### v1.7.1 — 2026-07-02
- **Fix:** Token naming sweep across all MDX docs and registry — `--*-bg` renamed to `--*-background`, `--_bg` renamed to `--_background` (carousel, toggle, and 19 component docs)
- **Fix:** Validator C2 now covers MDX and JS files (not only CSS); regex fixed to catch multi-segment tokens; `site/` excluded from validation

### v1.7.0 — 2026-07-02
- **Fix:** All C1–C6 validator violations resolved — `pnpm validate:ds` now passes clean (0 violations)
- **Fix:** Token naming enforced across 18 components — `--<component>-bg` renamed to `--<component>-background` (Level 2 public API); `--_bg` renamed to `--_background` (Level 3 private)
- **Fix:** State tokens removed from breadcrumb, pagination, skeleton, toggle — use the same Level 2 token re-declared in your state selector instead (see C3 rule)
- **Fix:** `--spinner-color-active` renamed to `--spinner-arc-color`; `--toggle-track-bg`/`--toggle-track-bg-checked` renamed to `--toggle-track-background`
- **Fix:** CSP strict-mode compatibility — `bp-toast.js` now uses DOM API exclusively (no `innerHTML`); C7 validator rule added
- **Chore:** Validator improvements — C1 correctly handles modifier/pseudo selectors; C2 covers Level 3 abbreviations; C5 skips fenced code blocks; `_*.css` templates excluded; `theme.css` exempted from C1/C6

### v1.6.0 — 2026-06-28
- **Feat:** `public/CfRs.md` — machine-readable Constraints/Forcing Rules for contributor (C1–C6) and consumer (E1–E3) agents
- **Feat:** `pnpm validate:ds` — Node script enforcing contributor rules C1–C6 over CSS and MDX files
- **Feat:** `.githooks/pre-commit` — local hook running `validate:ds` on staged files only; activated via `pnpm install`
- **Feat:** CSS behaviour snapshots for canonical components (accordion, button, card, dropdown); `pnpm snapshot:update` / `pnpm snapshot:test` scripts
- **Docs:** `docs/validate-consumer-template.md` — copyable E1–E3 validation script for external consumer projects
- **Docs:** AGENTS.md and for-ai guide updated with CfRs pointer and validate:ds instructions

### v1.4.9 — 2026-06-24
- **Fix:** `.bp-card` container is now named (`container-name: card`) so its internal `@container` rules resolve correctly when nested inside another `inline-size` container, such as a fluid card grid wrapper
- **Docs:** New "Fluid Card Grid Pattern" guide — `repeat(auto-fit, minmax(...))` grid layer + named-container card layer, replacing fixed-column grids with manual breakpoints. Documented in the for-ai guide, AGENTS.md, and a live example page

### v1.4.8 — 2026-06-24
- **Chore:** No consumer-facing changes — verifies the Cloudflare Pages deploy pipeline after moving the project to a new Cloudflare account and fixing the project-name mismatch (was `bpl-ds`, actual project is `ds`)
- **Chore:** Bumped dev dependencies (prettier, @biomejs/biome, esbuild, sharp) to latest patch/minor versions

### v1.4.6 — 2026-06-06
- **Docs:** Sidebar restructured into Canonical Components, Components, and Examples groups
- **Docs:** Inferable components (Alert, Avatar, Badge, etc.) reclassified as Examples
- **Docs:** Agent quick-start prompt added to home page pointing to AGENTS.md

### v1.4.5 — 2026-06-06
- **Fix:** Token naming convention enforced — Level 2 tokens now match CSS property names exactly (`--btn-background` replaces `--btn-bg`, `--btn-border-radius` replaces `--btn-radius`)
- **Fix:** State tokens removed — `--btn-bg-hover` and `--table-bg-hover` eliminated; override hover by re-declaring the same token in your own `:hover` selector
- **Docs:** 4-level token contract and 5 rules documented in AGENTS.md, agentic guide, and CLAUDE.md
- **Feat:** AGENTS.md split into Canonical Components (Button, Accordion, Dropdown — full tokens + base HTML) and Components (reference: name, description, token count, docs URL). ~38% context reduction
- **Feat:** Docs sidebar split into three groups: Canonical Components, Components, Examples (placeholder for future recipes)

### v1.4.4 — 2026-06-03
- **Docs:** Self-review checklist added to the agentic guide — HTML, CSS, State, JS, Accessibility, and Semantic sections for external project agents to verify DS usage before marking work complete

### v1.4.3 — 2026-06-01
- **Feat:** Grid promoted to `layouts` entry in `components.json` with explicit zone classes, canonical HTML, and public tokens
- **Fix:** Zone classes now unambiguous — `.popout`, `.breakout`, `.full-width` go on the CHILD, content zone needs no class

### v1.4.2 — 2026-06-01
- **Docs:** State override pattern documented — reuse `--<component>-<prop>` in your own `:hover` selector instead of creating new tokens
- **Docs:** Release workflow steps added to CLAUDE.md

### v1.4.1 — 2026-06-01
- **Fix:** Grid zone count corrected to 4 (content, popout, breakout, full-width)
- **Fix:** Zone classes go on the **child** element, not the grid root (`.breakout`, `.popout`, `.full-width`)
- **Fix:** Grid public token names corrected: `--content-max-width`, `--popout-max-width`, `--breakout-max-width`, `--padding-inline`
- **Fix:** `AGENTS.md` component entries now link to docs page instead of incorrect placeholder HTML

### v1.4.0 — 2026-05-31
- **Feat:** AI Registry — `public/registry/components.json` auto-generated from CSS + MDX at build time
- **Feat:** `AGENTS.md` and `llms.txt` regenerated automatically on every build
- **Feat:** 3-level Constructor Pattern documented with reference and examples
- **Feat:** Theming — clients can map their brand tokens to `--bp-*` surface at `:root`
- **Feat:** `/guides/for-ai/` — full guide for AI agents: token chain, container queries, layers, grid, theming, prompt template
- **Build:** `pnpm build` now runs `scripts/build-registry.js` before Astro build

### v1.0.0 — 2026-05-08
- Initial release — Accordion, Badge, Button, Card, Carousel, Footer, Header, Hero, Input, Modal, Nav, Toast
- Design tokens — color, typography, spacing, radius, shadow, motion
- Dark mode via `data-theme` attribute
- CSS custom property public API on all components
