import type { Chapter, StoryState } from '../core/types/story'; import type { MediaSource, MediaType } from '../iiif/mediaResolver'; export type ChapterTaskId = 'details' | 'position' | 'focus' | 'motion' | 'audio-timing' | 'transition-timing' | 'media-timing' | 'layers' | 'comparison' | 'source'; /** * The three groups of the chapter inspector. Every task lives in exactly one, * and the stage tools — the tasks that open something on the stage — sit * among the others rather than behind a drill-down. */ export type InspectorGroup = 'about' | 'timing' | 'source'; export declare const INSPECTOR_GROUPS: InspectorGroup[]; export declare const inspectorGroupForTask: (task: ChapterTaskId) => InspectorGroup; /** * Whether a task opens a tool on the stage — the frame's handles, a drawing * mode, a bottom panel. */ export declare const isStageTool: (task: ChapterTaskId) => boolean; export type TaskAvailability = { state: 'available'; } | { state: 'disabled'; reason: string; action?: string; } | { state: 'hidden'; }; export type CompletionState = 'empty' | 'partial' | 'complete' | 'attention'; export type TaskStatus = { completion: CompletionState; /** * Overrides the generic completion wording where a task can say something * more useful than "Needs attention" about why it needs attention. */ labelKey?: string; translated?: number; languageTotal?: number; messages: string[]; }; export type ChapterTaskContext = { story: StoryState; chapter: Chapter; chapterIndex: number; mediaType: MediaType | null; layers?: MediaSource[]; loadedSources?: MediaSource[]; validationErrors?: string[]; languages: string[]; }; export type ChapterTaskEvaluation = { id: ChapterTaskId; availability: TaskAvailability; status: TaskStatus; }; export declare const evaluateTaskAvailability: (task: ChapterTaskId, context: ChapterTaskContext) => TaskAvailability; export declare const evaluateTaskStatus: (task: ChapterTaskId, context: ChapterTaskContext) => TaskStatus; export declare const evaluateChapterTasks: (context: ChapterTaskContext) => ChapterTaskEvaluation[]; export declare const taskForValidationMessage: (message: string) => ChapterTaskId;