/** * Estimated reading time (minutes) for a post's Editor.js `description` * (spec §8). Walks the rows → columns → blocks shape that * `components/common/Editor.tsx` renders, counting words and images. * * Pure + side-effect free so it can run in the create/update transaction and * be unit-tested against fixture documents. */ interface EditorBlock { type?: string; data?: { text?: string; caption?: string; html?: string; items?: Array; products?: unknown[]; [key: string]: unknown; }; } interface EditorColumn { data?: { blocks?: EditorBlock[]; }; } interface EditorRow { columns?: EditorColumn[]; } export interface ReadingTimeOptions { /** Words per minute (default 200). */ wpm?: number; /** Seconds attributed to the first image; subsequent images decay (default 10). */ secondsPerImage?: number; } /** * @param content - Editor.js rows (array) or the stored JSON string. * @param options - WPM + per-image seconds (from blog settings). * @returns whole minutes, minimum 1. */ export declare function readingTime(content: EditorRow[] | string | null | undefined, options?: ReadingTimeOptions): number; export {};