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>
This commit is contained in:
2025-11-17 11:35:20 +01:00
parent de3997f4df
commit 594a0ca314
10 changed files with 6 additions and 1867 deletions

View File

@@ -1,13 +1,12 @@
# Convert UI
A modern, browser-based file conversion application built with Next.js 16, Tailwind CSS 4, and WebAssembly. Convert videos, images, and documents directly in your browser without uploading files to any server.
A modern, browser-based file conversion application built with Next.js 16, Tailwind CSS 4, and WebAssembly. Convert videos, audio, and images directly in your browser without uploading files to any server.
## Features
- **🎬 Video Conversion** - Convert between MP4, WebM, AVI, MOV, MKV, and GIF
- **🎵 Audio Conversion** - Convert between MP3, WAV, OGG, AAC, and FLAC
- **🖼️ Image Conversion** - Convert between PNG, JPG, WebP, GIF, BMP, TIFF, and SVG
- **📄 Document Conversion** - Convert between PDF, Markdown, HTML, and Plain Text
- **🔒 Privacy First** - All conversions happen locally in your browser, no server uploads
- **⚡ Fast & Efficient** - Powered by WebAssembly for near-native performance
- **🎨 Beautiful UI** - Modern, responsive design with dark/light theme support
@@ -23,13 +22,6 @@ A modern, browser-based file conversion application built with Next.js 16, Tailw
- **Tailwind CSS 4** - Utility-first CSS with OKLCH color system
- **FFmpeg.wasm** - Video and audio conversion
- **ImageMagick WASM** - Image processing and conversion
- **Marked** - Markdown to HTML conversion
- **Turndown** - HTML to Markdown conversion
- **DOMPurify** - HTML sanitization
- **jsPDF** - PDF generation
- **PDF.js** - PDF text extraction
- **docx** - DOCX document generation
- **mammoth** - DOCX document reading
- **Fuse.js** - Fuzzy search for format selection
- **Lucide React** - Beautiful icon library
@@ -92,8 +84,7 @@ convert-ui/
├── lib/
│ ├── converters/ # Conversion services
│ │ ├── ffmpegService.ts # Video/audio conversion
│ │ ── imagemagickService.ts # Image conversion
│ │ └── pandocService.ts # Document conversion (placeholder)
│ │ ── imagemagickService.ts # Image conversion
│ ├── wasm/
│ │ └── wasmLoader.ts # WASM module lazy loading
│ ├── storage/
@@ -118,31 +109,6 @@ convert-ui/
### Images (ImageMagick)
- **Input/Output:** PNG, JPG, WebP, GIF, BMP, TIFF, SVG
### Documents
- **PDF → Text/Markdown** - Extract text from PDF files with page-by-page processing
- **Markdown/HTML/Text → PDF** - Generate formatted PDF documents
- **DOCX → Text/HTML/Markdown** - Extract content from Word documents
- **Markdown/HTML/Text → DOCX** - Create formatted Word documents with headings
- **Markdown → HTML** - Full GitHub Flavored Markdown support with styling
- **HTML → Markdown** - Clean conversion with formatting preservation
- **Markdown ↔ Plain Text** - Strip or add basic formatting
- **HTML → Plain Text** - Extract text content
- **Plain Text → HTML** - Convert to formatted HTML document
**Supported PDF Operations:**
- Read PDFs and extract all text content
- Convert extracted text to Markdown or plain text
- Create PDFs from Markdown, HTML, or plain text
- Automatic pagination and formatting
**Supported DOCX Operations:**
- Read DOCX files and extract text, HTML, or Markdown
- Create DOCX files from Markdown with proper heading levels (H1-H3)
- Create DOCX files from HTML or plain text
- Automatic paragraph formatting and spacing
**Note:** Uses PDF.js for reading and jsPDF for generation. Uses mammoth for DOCX reading and docx library for generation. Lightweight JavaScript libraries (marked, turndown) used instead of Pandoc WASM for fast, reliable conversions.
## How It Works
1. **File Upload** - Users can drag-and-drop or click to select a file