import { BaseProcessor, ProcessorOptions, ExtractStringsResult, TranslatedString, SourceString } from '../core/baseProcessor'; import { AACTree } from '../core/treeStructure'; import { ProcessorInput } from '../utils/io'; export declare function normalizeHexColor(hexColor: string): string | null; export declare function adjustHexColor(hexColor: string, amount: number): string; export declare function getHighContrastNeutralColor(backgroundColor: string): string; /** * Calculate relative luminance of a color using WCAG formula * @param hexColor - Hex color string (e.g., "#1d90ff") * @returns Relative luminance value between 0 and 1 */ export declare function calculateLuminance(hexColor: string): number; /** * Choose white or black text color based on background luminance for optimal contrast * @param backgroundColor - Background color hex string * @returns "#FFFFFF" for dark backgrounds, "#000000" for light backgrounds */ export declare function getContrastingTextColor(backgroundColor: string): string; declare class AstericsGridProcessor extends BaseProcessor { readonly capabilities: { wordList: "none"; preservesAssetsOnSave: boolean; newCellCreation: "allowed"; }; private loadAudio; constructor(options?: ProcessorOptions & { loadAudio?: boolean; }); extractTexts(filePathOrBuffer: ProcessorInput): Promise; private extractRawTexts; private extractActionTexts; loadIntoTree(filePathOrBuffer: ProcessorInput): Promise; private getLocalizedLabel; private getLocalizedText; private createButtonFromElement; processTexts(filePathOrBuffer: ProcessorInput, translations: Map, outputPath: string): Promise; private applyTranslationsToGridFile; private applyTranslationsToAction; saveFromTree(tree: AACTree, outputPath: string): Promise; /** * Add audio recording to a specific grid element */ addAudioToElement(filePath: string, elementId: string, audioData: Buffer, metadata?: string): Promise; /** * Create a copy of the grid file with audio recordings added */ createAudioEnhancedGridFile(sourceFilePath: string, targetFilePath: string, audioMappings: Map): Promise; /** * Extract all element IDs from the grid file for audio mapping */ getElementIds(filePathOrBuffer: ProcessorInput): Promise; /** * Check if an element has audio recording */ hasAudioRecording(filePathOrBuffer: ProcessorInput, elementId: string): Promise; /** * Extract strings with metadata for aac-tools-platform compatibility * Uses the generic implementation from BaseProcessor */ extractStringsWithMetadata(filePath: string): Promise; /** * Generate translated download for aac-tools-platform compatibility * Uses the generic implementation from BaseProcessor */ generateTranslatedDownload(filePath: string, translatedStrings: TranslatedString[], sourceStrings: SourceString[]): Promise; } export { AstericsGridProcessor };