UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

72 lines 2.26 kB
/** * ArtifactDisplay Component * * Universal content renderer for blockchain artifacts (ordinals, inscriptions, files) * Supports images, videos, audio, HTML, text, JSON, SVG, and more * Uses BitcoinImage component for blockchain URL processing */ import React from "react"; export declare enum ArtifactType { Image = "image", Video = "video", Audio = "audio", HTML = "html", Text = "text", JSON = "json", SVG = "svg", PDF = "pdf", Model = "model", Unknown = "unknown" } export interface ArtifactData { /** The URL or blockchain reference to the artifact */ src: string; /** Content type (MIME type) */ contentType?: string; /** Artifact type (auto-detected if not provided) */ type?: ArtifactType; /** Size in bytes */ size?: number; /** Display name */ name?: string; /** Description */ description?: string; /** Transaction ID (for blockchain artifacts) */ txid?: string; /** Output index */ vout?: number; /** Inscription number */ number?: string | number; /** Additional metadata */ metadata?: Record<string, unknown>; } export interface ArtifactDisplayProps { /** Artifact data */ artifact: ArtifactData; /** Display size */ size?: number; /** Maximum width */ maxWidth?: number; /** Whether to show controls/footer */ showControls?: boolean; /** Whether to allow zooming */ allowZoom?: boolean; /** Whether to show metadata */ showMetadata?: boolean; /** Loading state */ loading?: boolean; /** Error state */ error?: string; /** Custom CSS classes */ className?: string; /** Click handler */ onClick?: (artifact: ArtifactData) => void; /** Download handler */ onDownload?: (artifact: ArtifactData) => void; /** Share handler */ onShare?: (artifact: ArtifactData) => void; /** Custom fallback component */ fallback?: React.ReactNode; } export declare function ArtifactDisplay({ artifact, size, maxWidth, showControls, allowZoom, showMetadata, loading, error, className, onClick, onDownload, onShare, fallback, }: ArtifactDisplayProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=ArtifactDisplay.d.ts.map