import { html } from '@design.estate/dees-element'; export const demo = () => { const samplePdfs = [ 'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf', 'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf', ]; const generateGridItems = (count: number) => { const items = []; for (let i = 0; i < count; i++) { const pdfUrl = samplePdfs[i % samplePdfs.length]; items.push(html` { console.log('PDF Preview clicked:', e.detail); alert(`PDF clicked: ${e.detail.pageCount} pages`); }} > `); } return items; }; return html`

Single PDF Preview with Stacked Pages

Different Sizes

Small:
Default:
Large:

Non-Clickable Preview

Performance Grid - 50 PDFs with Lazy Loading

This grid demonstrates the performance optimizations with 50 PDF previews. Scroll to see lazy loading in action - previews render only when visible.

${generateGridItems(50)}

Performance Features

Lazy Loading ✓ Enabled
Canvas Pooling ✓ Active
Memory Management ✓ Optimized
Intersection Observer 200px margin
`; };