UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

51 lines (47 loc) 1.31 kB
'use strict'; var lucideReact = require('lucide-react'); var react = require('react'); var jsxRuntime = require('react/jsx-runtime'); // src/file-preview/pdf-preview.tsx var PdfPreviewLazy = react.lazy( () => import('./pdf-preview-impl-AOE5QSNQ.js').then((module) => ({ default: module.PdfPreviewImpl })) ); var PdfPreview = react.memo( ({ url, highlights, fileName, toolbarClassName, onRemove, maxPages, maxPagesWarning }) => { if (typeof window === "undefined") { return null; } return /* @__PURE__ */ jsxRuntime.jsx( react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center p-8", children: [ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-6 w-6 animate-pulse text-gray-400" }), /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-gray-600", children: "Loading PDF viewer..." }) ] }), children: /* @__PURE__ */ jsxRuntime.jsx( PdfPreviewLazy, { url, highlights, fileName, toolbarClassName, onRemove, maxPages, maxPagesWarning } ) } ); } ); exports.PdfPreview = PdfPreview;