/** * Build the accessibility **greenline** layer for a component. * * Two sources feed it: * * 1. **Issue greenlines** — the renderer's a11y/contrast/i18n {@link Finding}s * (from `@design-parity/candidate`'s `nativeFindings`, or * `@design-parity/checks`). Each becomes a greenline at the finding's bounds. * 2. **Spec greenlines** — `info`-level annotations walked from the * {@link SemanticTree}: every interactive node is annotated with its role and * measured size, so the sheet documents the touch-target contract even when * nothing fails. A node already covered by an issue greenline at the same * bounds is not duplicated. * * Pure functions over core types — no I/O, trivially testable. */ import type { Finding, SemanticTree } from "@design-parity/core"; import type { Greenline } from "./types.js"; /** * Roles that must meet the touch-target contract. Mirrors * `@design-parity/checks` `INTERACTIVE_ROLES` (kept inline so this package * depends on `core` only). */ export declare const INTERACTIVE_ROLES: readonly string[]; /** WCAG 2.5.8 / Material minimum touch target, in dp. */ export declare const MIN_TOUCH_TARGET_DP = 48; /** Map one renderer {@link Finding} to an issue {@link Greenline}. */ export declare function findingToGreenline(finding: Finding): Greenline; /** Map a component's findings to issue greenlines, in finding order. */ export declare function findingsToGreenlines(findings: readonly Finding[]): Greenline[]; /** * Walk a {@link SemanticTree} and emit a spec greenline for every interactive * node — its role, and its bounds when known — at `info` severity. These * document the touch-target contract; the writer/board renders them in the same * green annotation style as the issue greenlines, just non-blocking. */ export declare function specGreenlines(tree: SemanticTree | undefined): Greenline[]; /** * The full greenline layer for a component: issue greenlines first (they lead), * then spec greenlines for interactive nodes not already annotated at the same * bounds (so an interactive node that also has a finding isn't listed twice). */ export declare function buildGreenlines(findings: readonly Finding[] | undefined, semantics: SemanticTree | undefined): Greenline[]; //# sourceMappingURL=greenlines.d.ts.map