feat(initial): add comprehensive PDF to JPEG preview library with dual-environment support
- Add Node.js implementation using @push.rocks/smartpdf - Add browser implementation with PDF.js and Web Workers - Support configurable quality, dimensions, and page selection - Include comprehensive TypeScript definitions and error handling - Provide extensive test coverage for both environments - Add download functionality and browser compatibility checking
This commit is contained in:
37
ts_web/index.ts
Normal file
37
ts_web/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @push.rocks/smartpreview - Web implementation
|
||||
*
|
||||
* A library for generating efficient JPEG previews from PDFs
|
||||
* in browser environments using PDF.js and Web Workers.
|
||||
*/
|
||||
|
||||
// Main classes
|
||||
export { SmartPreview } from './smartpreview.js';
|
||||
export { WebPdfProcessor } from './pdfprocessor.js';
|
||||
|
||||
// Runtime exports (classes and functions)
|
||||
export {
|
||||
PreviewError
|
||||
} from './interfaces.js';
|
||||
|
||||
// Type-only exports (interfaces and types)
|
||||
export type {
|
||||
IPreviewOptions,
|
||||
IPreviewResult,
|
||||
TWebInputType,
|
||||
TSupportedInputFormat,
|
||||
TSupportedOutputFormat,
|
||||
IWebFormatProcessor,
|
||||
IWebPdfProcessor,
|
||||
TPreviewError,
|
||||
IProgressCallback,
|
||||
IWebPreviewOptions,
|
||||
// Worker-related types
|
||||
TWorkerMessageType,
|
||||
IWorkerMessage,
|
||||
IPdfProcessRequest,
|
||||
IPdfProcessResponse
|
||||
} from './interfaces.js';
|
||||
|
||||
// Default export for convenience
|
||||
export { SmartPreview as default } from './smartpreview.js';
|
Reference in New Issue
Block a user