import type { PropChange } from './diff.js'; /** * Deterministic, offline plain-English summariser for a crop's changes. Turns a * wall of computed-style deltas into a few bullets that tell a reviewer WHAT to * look for ("Grid: 2 → 3 columns", "Accent recoloured cyan → red") instead of * leaving them to spot the difference. No LLM — just curated rules over the * already-summarised property changes, so the same input always yields the same * words and it runs with no network. */ /** One changed element, with its property deltas already run through summarizeProps. */ export type ElementChange = { label: string; added?: boolean; removed?: boolean; retagged?: boolean; /** Base/computed-style deltas (not interactive-state ones). */ props: PropChange[]; /** Interactive states this element gained/changed/dropped, by name. */ states?: string[]; }; /** A short colour word for an rgb/rgba value: "cyan", "dark blue", "transparent". */ export declare function colorName(v: string): string | null; /** rgb/rgba → `#rrggbb` (opaque) or the rgba string (translucent); non-colours pass through. */ export declare function toHex(v: string): string; /** Reverse-index a token map (`--red-200` → `rgb(...)`) to value → token name, * preferring a scale step (`red-200`) over an alias, then the shorter name. */ export declare function tokenIndex(tokens?: Record): Map; /** Count grid tracks in a `grid-template-*` value, honouring the `Npx ×K` form. */ export declare function trackCount(v: string): number; /** Token reverse-indexes for each side, so colour rules can name `red-200`. */ export type DescribeCtx = { tokensBefore?: Map; tokensAfter?: Map; }; /** * Plain-English bullets for a crop's changes — DOM verbs, then labelled restyle * phrases, then a flag for interaction-state changes a static screenshot can't * show. Capped so the summary stays a glance (the exact tables live in the fold). */ export declare function describeChange(els: ElementChange[], ctx?: DescribeCtx, maxBullets?: number): string[];