Spaces:
No application file
No application file
| /** | |
| * PDF Provider Constants | |
| * Separated from pdf-providers.ts to avoid importing sharp in client components | |
| */ | |
| import type { PDFProviderId, PDFProviderConfig } from './types'; | |
| /** | |
| * PDF Provider Registry | |
| */ | |
| export const PDF_PROVIDERS: Record<PDFProviderId, PDFProviderConfig> = { | |
| unpdf: { | |
| id: 'unpdf', | |
| name: 'unpdf', | |
| requiresApiKey: false, | |
| icon: '/logos/unpdf.svg', | |
| features: ['text', 'images', 'metadata'], | |
| }, | |
| mineru: { | |
| id: 'mineru', | |
| name: 'MinerU', | |
| requiresApiKey: false, | |
| icon: '/logos/mineru.png', | |
| features: ['text', 'images', 'tables', 'formulas', 'layout-analysis'], | |
| }, | |
| }; | |
| /** | |
| * Get all available PDF providers | |
| */ | |
| export function getAllPDFProviders(): PDFProviderConfig[] { | |
| return Object.values(PDF_PROVIDERS); | |
| } | |
| /** | |
| * Get PDF provider by ID | |
| */ | |
| export function getPDFProvider(providerId: PDFProviderId): PDFProviderConfig | undefined { | |
| return PDF_PROVIDERS[providerId]; | |
| } | |