/** * Pure surface-key helpers (no map reads). Surface keys originate from artifact * filenames and flow into the PR-comment summary — strip Markdown/HTML control * characters so they cannot inject a link, image, or table into that bot comment. */ export declare const safeKey: (s: string) => string; export declare const surfaceBase: (s: string) => string; export declare const surfaceWidth: (s: string) => number; /** * Capture keys name map files under the output directory. Reject anything that * is not a single relative path segment: separators, traversal, drive prefixes, * absolute forms, NUL, and empty keys. Uniqueness alone is not filesystem-safe. */ export declare function assertSafeCaptureKey(key: string): string; /** * Build the map/screenshot stem inside `outputDir`. Always validates the surface * key first so hostile keys cannot escape the output directory. */ export declare function captureArtifactStem(outputDir: string, surfaceKey: string, width: number | string): string; /** * Product surface base for counting: authoritative `metadata.surfaceKey` when the * caller supplies it, otherwise strip a trailing `@width` from the capture key * (older captures without metadata). */ export declare function productSurfaceBase(captureKey: string, authoringSurfaceKey?: string): string; export declare function pushSurfaceWidth(byBase: Map, base: string, surface: string): void; export declare function renderSurfaceGroups(byBase: Map): string; /** "landing @ 1280, 1080, 390 · landing-nav-open @ 1080" from the surface keys. */ export declare function formatSurfaceList(surfaces: string[]): string; /** Unique product surface bases and capture keys among surfaces that carry a grouped change. */ export declare function countChangedSurfaceScope(groups: Array<{ surfaces: string[]; }>, surfaceKeyOf?: (captureKey: string) => string | undefined): { bases: number; variants: number; }; /** Unique product surface bases across a set of capture keys (e.g. every map in a dir). */ export declare function countCapturedSurfaceBases(captureKeys: Iterable, surfaceKeyOf?: (captureKey: string) => string | undefined): number; /** Headline / summary phrasing for changed-surface counts (bases first; variants when wider). */ export declare function formatChangedSurfaceScope(bases: number, variants: number): string;