@llamaindex/ui
Version:
A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications
70 lines (63 loc) • 1.9 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React from 'react';
interface BoundingBox {
id: string;
x: number;
y: number;
width: number;
height: number;
confidence?: number;
label?: string;
color?: string;
}
interface PageData {
pageNumber: number;
imageUrl: string;
width: number;
height: number;
boundingBoxes: BoundingBox[];
}
interface FileData$1 {
fileName: string;
pages: PageData[];
totalPages: number;
}
interface Highlight {
page: number;
x: number;
y: number;
width: number;
height: number;
}
interface FileData {
url?: string;
name?: string;
type?: string;
}
declare function useFileData(fileId: string, mockData?: FileData): {
data: FileData | null;
loading: boolean;
error: string | null;
};
interface FilePreviewProps {
onBoundingBoxClick?: (box: BoundingBox, pageNumber?: number) => void;
fileId: string;
highlight?: Highlight;
mockData?: FileData;
}
declare function FilePreview({ onBoundingBoxClick, highlight, fileId, mockData, }: FilePreviewProps): react_jsx_runtime.JSX.Element | null;
declare const PdfPreview: React.MemoExoticComponent<({ url, highlight }: {
url: string;
highlight?: Highlight;
}) => react_jsx_runtime.JSX.Element | null>;
interface PdfNavigatorProps {
currentPage: number;
totalPages: number;
scale: number;
onPageChange: (page: number) => void;
onScaleChange: (scale: number) => void;
onDownload?: () => void;
onReset?: () => void;
}
declare const PdfNavigator: ({ currentPage, totalPages, scale, onPageChange, onScaleChange, onDownload, onReset, }: PdfNavigatorProps) => react_jsx_runtime.JSX.Element;
export { type BoundingBox, type FileData$1 as FileData, FilePreview, type FilePreviewProps, type Highlight, type PageData, PdfNavigator, PdfPreview, useFileData };