/** Files whose cross-references this module understands. */ export declare const REFERENCE_EXTENSIONS: Set; /** * `blocking` marks a broken reference — a name used that exists nowhere, or a * state change that cannot take effect. `advisory` marks drift that is usually * a defect but has legitimate uses (utility classes, a11y helpers). * * The severity is a priority label, not a gate. The CLI reports findings and * feeds them to reconciliation; it does not refuse to write on a blocking * finding, because a page that renders correctly can still trip one — the * hidden-attribute check fires on real but cosmetic defects. Use * {@link hasBlockingFindings} if you want a caller-side gate. */ export type ReferenceSeverity = "blocking" | "advisory"; export type ReferenceFindingCode = "JS_SELECTOR_MISSING" | "HTML_ASSET_MISSING" | "STATE_CLASS_DEFEATED" | "HIDDEN_ATTRIBUTE_OVERRIDDEN" | "HTML_CLASS_UNSTYLED" | "CSS_SELECTOR_UNUSED" | "CSS_COMPOUND_SELECTOR_UNMATCHED" | "EMPTY_VISUAL_ZERO_SIZE"; export interface ReferenceFinding { code: ReferenceFindingCode; severity: ReferenceSeverity; /** Project-relative file the finding is about. */ path: string; /** Bounded, single-line explanation safe to show and to send as a repair hint. */ detail: string; /** Exact generated selector involved, when one can be identified. */ selector?: string; } export interface ReferenceFile { /** Project-relative POSIX path. */ path: string; content: string; /** True when this file is a candidate from the current run. */ generated: boolean; } interface CssRule { selectors: string[]; declarations: Map; order: number; } /** * Walk style rules with brace awareness so rules nested in `@media`/`@supports` * are still seen and statement at-rules such as `@import` do not leak into the * next selector. */ export declare function scanCssRules(content: string): CssRule[]; /** CSS specificity as (ids, classes+attributes+pseudo-classes, elements+pseudo-elements). */ export declare function selectorSpecificity(selector: string): readonly [number, number, number]; /** * Cross-check the supplied web files against one another. Only files produced * by this run are reported against, so a pre-existing inconsistency in the * working tree never blocks a run that did not touch it. */ export declare function collectReferenceFindings(files: readonly ReferenceFile[]): ReferenceFinding[]; /** True when any finding must stop the run before files are written. */ export declare function hasBlockingFindings(findings: readonly ReferenceFinding[]): boolean; /** Group findings by the file that has to change, for bounded repair. */ export declare function findingsByPath(findings: readonly ReferenceFinding[]): Map; export {}; //# sourceMappingURL=reference-validation.d.ts.map