import type { BlokkliApp } from '#blokkli/editor/types/app'; import type { ReadabilityBand } from '#blokkli/editor/features/analyze/readability/types'; import type { TextFieldValue } from '#blokkli/editor/providers/fieldValue'; type ReadabilityIssue = { text: string; impact?: string; score?: number; }; type ReadabilityFieldResult = { fieldValue?: string; issues: ReadabilityIssue[]; }; export type ReadabilityResult = Record>; /** User-facing readability level (the band vocabulary is `easy|ok|hard`). */ export type ReadabilityLevel = 'good' | 'ok' | 'hard'; /** Map a readability band to its user-facing level (`easy` → `good`). */ export declare function bandToLevel(band: ReadabilityBand): ReadabilityLevel; /** * Reduce a field's readability chunks to its single worst assessment. Chunks * with a null band/score can't be analyzed (e.g. the text is below the * analyzer's minimum word count) and are ignored. The "worst" chunk is the one * with the highest-severity band, tie-broken by the lowest score, so the * returned `level` and `score` always come from the same chunk. * * Returns `null` when nothing was scorable — callers decide how to surface that * (e.g. an "unknown" level, or "good"/no-retry). */ export declare function worstReadability(chunks: ReadonlyArray<{ band: ReadabilityBand | null; score: number | null; }>): { level: ReadabilityLevel; score: number; } | null; /** * Run readability analysis against all fields on the page and return results * grouped by paragraph UUID and field name. */ export declare function runReadabilityAnalysis(app: BlokkliApp): Promise; /** * Run readability analysis for specific field values (without reading from * DOM/adapter). Used by the retry loop to analyze proposed values directly. */ export declare function runReadabilityAnalysisForValues(app: BlokkliApp, fields: TextFieldValue[]): Promise; export {};