import type { ReactNode } from "react"; import type { ThemeTokens, ViewerServices } from "../plugin/services"; /** * Default tool ids supported by the bundled toolbar. Hosts that want * a different set pass `tools={...}`; hosts that want a totally * different toolbar shouldn't use `` and should * compose the lower-level components themselves. * * @public */ export type LensPDFViewerTool = "zoom" | "color-picker" | "measure" | "layers"; /** * Props for the default {@link LensPDFViewer} composition. * * @public */ /** * Viewer state exposed to slot render props. * * @public */ export interface LensPDFViewerState { zoom: number; setZoom: (z: number) => void; currentPage: number; setCurrentPage: (n: number) => void; pageCount: number | null; activeTool: "none" | "color-picker" | "measure"; setActiveTool: (t: "none" | "color-picker" | "measure") => void; enabledLayers: Set; toggleLayer: (ocgIndex: number) => void; setAllLayers: (enabled: boolean) => void; hasLayers: boolean; layersOpen: boolean; setLayersOpen: (v: boolean) => void; } export interface LensPDFViewerProps { /** PDF URL the viewer fetches. Sign / scope upstream. */ pdfUrl: string; /** Optional override for the pdf.js worker URL. */ workerSrc?: string; /** Optional services to override the pdf.js fallback path. */ services?: ViewerServices; /** Optional theme tokens. */ tokens?: ThemeTokens; /** Optional className hook for hosts that want to restyle the chrome. */ className?: string; /** Page rendering mode. */ mode?: "scroll" | "single"; /** Tools shown in the toolbar / mobile drawer. */ tools?: ReadonlyArray; /** Initial zoom percentage. Default `100`. */ initialZoom?: number; /** Optional brand label rendered in the top-left of the toolbar. */ brand?: string; /** * Render prop for a custom header. When provided, replaces the * default toolbar. Receives viewer state for building controls. */ header?: (state: LensPDFViewerState) => ReactNode; /** * Render prop for a custom sidebar. When provided, replaces the * default layer panel sidebar. */ sidebar?: (state: LensPDFViewerState) => ReactNode; /** Static footer content rendered below the viewer stage. */ footer?: ReactNode; } /** * One-line responsive PDF viewer. * * ```tsx * * ``` * * @public */ export declare function LensPDFViewer(props: LensPDFViewerProps): import("react").JSX.Element; //# sourceMappingURL=LensPDFViewer.d.ts.map