UNPKG

bitcoin-inscription-viewer

Version:

🔍 A robust, production-ready React/TypeScript library for viewing Bitcoin Ordinals inscriptions with advanced optimization features including LRU caching, LaserEyes wallet integration, virtual scrolling, and performance monitoring

54 lines 1.97 kB
import React from 'react'; import { InscriptionData } from '../../types'; export interface InscriptionGalleryProps { /** Array of inscription IDs to display */ inscriptionIds: string[]; /** Optional custom API endpoint (defaults to recursive endpoints) */ apiEndpoint?: string; /** Grid columns (1-6, defaults to 3) */ columns?: 1 | 2 | 3 | 4 | 5 | 6; /** Card size in pixels (defaults to 200) */ cardSize?: number; /** Show inscription number/index */ showIndex?: boolean; /** Enable modal view on click */ enableModal?: boolean; /** Show content-specific controls */ showControls?: boolean; /** HTML render mode for HTML content */ htmlRenderMode?: 'iframe' | 'sandbox'; /** Force iframe rendering for all content */ forceIframe?: boolean; /** Custom loading component */ loadingComponent?: React.ReactNode; /** Custom error component */ errorComponent?: (error: string) => React.ReactNode; /** Callback when inscription is clicked */ onInscriptionClick?: (inscription: InscriptionData) => void; /** Custom CSS class */ className?: string; /** Enable virtual scrolling for large datasets */ enableVirtualScrolling?: boolean; /** Custom performance monitor instance */ performanceMonitor?: any; /** Custom API service instance */ apiService?: any; /** Enable caching */ cacheEnabled?: boolean; /** Lazy loading offset in pixels */ lazyLoadOffset?: number; /** Batch fetching configuration */ batchFetching?: { enabled?: boolean; batchSize?: number; batchDelay?: number; }; /** Performance optimization options */ performanceOptions?: { preloadNext?: number; enableMemoryOptimization?: boolean; }; } export declare const InscriptionGallery: React.FC<InscriptionGalleryProps>; export default InscriptionGallery; //# sourceMappingURL=InscriptionGallery.d.ts.map