import * as pdfjs_dist_types_src_display_api from 'pdfjs-dist/types/src/display/api'; import { TextItem } from 'pdfjs-dist/types/src/display/api'; import * as react from 'react'; import { ReactNode, PropsWithChildren, CSSProperties } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { PDFDocumentProxy } from 'pdfjs-dist'; declare const isSSR: () => boolean; declare const isLocalFileSystem: boolean; declare function loadFromFile(file: Blob): Promise; declare const isDataURI: (str: string) => boolean; declare function dataURItoUint8Array(dataURI: string): Uint8Array; type PdfFile = string | ArrayBuffer | Blob | File; interface GetPdfDocumentParams { file: PdfFile; workerSource?: string; cMapUrl?: string | null; cMapPacked?: boolean; withCredentials?: boolean; } declare function getPdfDocument({ file, workerSource, cMapUrl, cMapPacked, withCredentials, }: GetPdfDocumentParams): Promise; declare function getPixelRatio(): number; declare const PageCanvas: react.NamedExoticComponent; declare const AnnotationLayer: react.NamedExoticComponent; declare const TextLayerItem: react.NamedExoticComponent<{ textItem: TextItem; }>; declare const TextLayer: react.NamedExoticComponent; declare const Page: react.NamedExoticComponent<{ pageNumber: number; }>; declare const Pages: react.NamedExoticComponent<{ children?: ReactNode; }>; type ExternalLinkTarget = '_self' | '_blank' | '_parent' | '_top'; interface PdfProviderContext { pdf: PDFDocumentProxy; /** * pdf 렌더링 시 필요한 props */ width?: number; lazyLoading?: boolean; tokenize?: boolean; externalLinkTarget?: ExternalLinkTarget; } declare function PdfProvider({ pdf, children, ...options }: PropsWithChildren): react_jsx_runtime.JSX.Element; declare function usePdfContext(): PdfProviderContext; type PdfRenderProps = Omit; type PdfViewerProps = PdfRenderProps & { /** * pdf load 시 필요한 props */ pdfUrl: string; pdfWorkerSource?: string; cMapUrl?: string; cMapCompressed?: boolean; withCredentials?: boolean; /** * pdf viewer custom props */ onClickWords?: { target: string | RegExp; callback: () => void | Promise; }[]; /** * pdf load 및 rendering 관련 callback */ onLoadPDFRender?: () => void; onErrorPDFRender?: (e: unknown) => void; /** * pdf 외 rendering 할 컴포넌트 */ header?: ReactNode; footer?: ReactNode; /** * pdf viewer 최상단 div style */ style?: CSSProperties; }; declare function PdfViewer({ pdfUrl, pdfWorkerSource, tokenize: injectedTokenize, onClickWords, header, footer, lazyLoading, externalLinkTarget, onLoadPDFRender, onErrorPDFRender, style, ...options }: PdfViewerProps): react_jsx_runtime.JSX.Element | null; export { AnnotationLayer, Page, PageCanvas, Pages, PdfProvider, type PdfProviderContext, PdfViewer, type PdfViewerProps, TextLayer, TextLayerItem, dataURItoUint8Array, getPdfDocument, getPixelRatio, isDataURI, isLocalFileSystem, isSSR, loadFromFile, usePdfContext };