refactor: move document domain core to lib/document/

Moves ~25 components, utils (search, filename, groupDocuments,
documentStatusLabel, validateFile), bulkSelection store, and
TranscriptionSection sub-component. Fixes broken relative imports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-05 13:56:36 +02:00
parent 422e86fbf1
commit e7f8aa5894
77 changed files with 47 additions and 47 deletions

View File

@@ -0,0 +1,10 @@
export const ALLOWED_TYPES = new Set(['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']);
export const MAX_SIZE_BYTES = 50 * 1024 * 1024;
export type FileValidationError = 'type' | 'size';
export function validateFile(file: File): FileValidationError | null {
if (!ALLOWED_TYPES.has(file.type)) return 'type';
if (file.size > MAX_SIZE_BYTES) return 'size';
return null;
}