import { default as React } from 'react'; import { LeafletDocumentRendererProps } from '../renderers/LeafletDocumentRenderer'; import { LeafletDocumentRecord } from '../types/leaflet'; /** * Props for rendering a Leaflet document record. */ export interface LeafletDocumentProps { /** * DID of the Leaflet publisher. */ did: string; /** * Record key of the document within the Leaflet collection. */ rkey: string; /** * Prefetched Leaflet document record. When provided, skips fetching from the network. */ record?: LeafletDocumentRecord; /** * Optional custom renderer for advanced layouts. */ renderer?: React.ComponentType; /** * React node rendered before data begins loading. */ fallback?: React.ReactNode; /** * Indicator rendered while data is being fetched from the PDS. */ loadingIndicator?: React.ReactNode; } /** * Props provided to renderer overrides for Leaflet documents. */ export type LeafletDocumentRendererInjectedProps = LeafletDocumentRendererProps; /** NSID for Leaflet document records. */ export declare const LEAFLET_DOCUMENT_COLLECTION = "pub.leaflet.document"; /** * Loads a Leaflet document along with its associated publication record and renders it * using the provided or default renderer. * * @param did - DID of the Leaflet publisher. * @param rkey - Record key of the Leaflet document. * @param renderer - Optional renderer override used in place of the default. * @param fallback - Node rendered before loading begins. * @param loadingIndicator - Node rendered while the document or publication records are loading. * @param colorScheme - Preferred color scheme forwarded to the renderer. * @returns A JSX subtree that renders a Leaflet document with contextual metadata. */ export declare const LeafletDocument: React.FC; export default LeafletDocument;