/** * @grove-dev/ui — score helpers (V1). * * Mirrors `open-apps/src/lib/scores.ts` so the openapps-derived * component library and any other consumer (Astro, Svelte, Next.js) * can share the same score-bar rendering math. * * The score object is the V1 `AppScores` shape, exposed by * `@grove-dev/core` as `Record` with * these named keys. We keep the local `AppScores` type permissive * (any string → number?) to avoid forcing `@grove-dev/ui` to depend * on the core zod schema's strict shape — the only contract here is * "the score bar cares about numbers 0-100". */ export type AppScores = { activity?: number; maturity?: number; learning?: number; contribution?: number; docs?: number; overall?: number; [key: string]: number | undefined; }; /** * Format a single score (0-100) into a 0-5 "tier" used by the UI: * * 0-19 → 0 (very low) * 20-39 → 1 (low) * 40-59 → 2 (medium) * 60-79 → 3 (high) * 80-100 → 4 (very high) * * The list page renders each score as a 4-cell bar; this gives the * visual a stable shape regardless of the underlying number. * * Non-number input collapses to tier 0 so the bar still renders. */ export declare function scoreTier(n: number | null | undefined): 0 | 1 | 2 | 3 | 4; /** Compact textual label for a score tier (used in tooltips). */ export declare function scoreTierLabel(n: number | null | undefined): string; /** Short numeric label used inline next to a score bar, e.g. "82". */ export declare function scoreLabel(n: number | null | undefined): string; /** Order of score dimensions, used by both list and detail. */ export declare const SCORE_DIMENSIONS: (keyof AppScores)[]; /** Human-readable label for a score dimension. */ export declare const SCORE_LABELS: Record; /** * Reasoning copy per dimension, surfaced in the detail page so the * numbers don't feel magical. These are intentionally short — the * curation.notes on each record carries the longer story. */ export declare const SCORE_REASONING: Record; //# sourceMappingURL=scoring.d.ts.map