Files
convert-ui/types/conversion.ts
Sebastian Krüger 594a0ca314 refactor: remove all document conversion support, keep only media conversions
This commit completely removes document conversion functionality to focus
exclusively on media file conversions (video, audio, images).

Changes:
- Remove all document converter services (pandocService.ts, pdfService.ts, docxService.ts)
- Uninstall document-related packages: marked, turndown, dompurify, jspdf, pdfjs-dist, docx, mammoth, @types/turndown
- Remove document formats (PDF, DOCX, Markdown, HTML, TXT) from formatMappings.ts
- Remove pandoc converter from FileConverter.tsx
- Remove pandoc loader and references from wasmLoader.ts
- Update TypeScript types to remove 'pandoc' from ConverterEngine and 'document' from FileCategory
- Remove pandoc from WASMModuleState interface
- Update README.md to remove all document conversion documentation
- Update UI descriptions to reflect media-only conversions

Supported conversions now:
- Video: MP4, WebM, AVI, MOV, MKV, GIF
- Audio: MP3, WAV, OGG, AAC, FLAC
- Images: PNG, JPG, WebP, GIF, BMP, TIFF, SVG

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 11:35:20 +01:00

122 lines
2.2 KiB
TypeScript

/**
* Supported converter engines
*/
export type ConverterEngine = 'ffmpeg' | 'imagemagick';
/**
* File category based on type
*/
export type FileCategory = 'video' | 'audio' | 'image';
/**
* Conversion status
*/
export type ConversionStatus = 'pending' | 'loading' | 'processing' | 'completed' | 'error';
/**
* Supported conversion format
*/
export interface ConversionFormat {
id: string;
name: string;
extension: string;
mimeType: string;
category: FileCategory;
converter: ConverterEngine;
description?: string;
}
/**
* Conversion job configuration
*/
export interface ConversionJob {
id: string;
inputFile: File;
inputFormat: ConversionFormat;
outputFormat: ConversionFormat;
options: ConversionOptions;
status: ConversionStatus;
progress: number;
result?: Blob;
error?: string;
startTime?: number;
endTime?: number;
}
/**
* Generic conversion options
*/
export interface ConversionOptions {
// Video options
videoBitrate?: string;
videoCodec?: string;
videoResolution?: string;
videoFps?: number;
// Audio options
audioBitrate?: string;
audioCodec?: string;
audioSampleRate?: number;
audioChannels?: number;
// Image options
imageQuality?: number;
imageWidth?: number;
imageHeight?: number;
imageFormat?: string;
// Generic options
[key: string]: string | number | boolean | undefined;
}
/**
* History item for conversion history
*/
export interface ConversionHistoryItem {
id: string;
inputFileName: string;
inputFormat: string;
outputFormat: string;
outputFileName: string;
timestamp: number;
fileSize: number;
result?: Blob;
}
/**
* Format preset for common conversions
*/
export interface FormatPreset {
id: string;
name: string;
description: string;
category: FileCategory;
sourceFormats: string[];
targetFormat: string;
options: ConversionOptions;
icon?: string;
}
/**
* WASM module loading state
*/
export interface WASMModuleState {
ffmpeg: boolean;
imagemagick: boolean;
}
/**
* Progress callback for conversion
*/
export type ProgressCallback = (progress: number) => void;
/**
* Conversion result
*/
export interface ConversionResult {
success: boolean;
blob?: Blob;
error?: string;
duration?: number;
}