import { default as React } from 'react'; import { FeedPostRecord } from '../types/bluesky'; /** * Props for rendering a single Bluesky post with optional customization hooks. */ export interface BlueskyPostProps { /** * Decentralized identifier for the repository that owns the post. */ did: string; /** * Record key identifying the specific post within the collection. */ rkey: string; /** * Prefetched post record. When provided, skips fetching the post from the network. * Note: Profile and avatar data will still be fetched unless a custom renderer is used. */ record?: FeedPostRecord; /** * Custom renderer component that receives resolved post data and status flags. */ renderer?: React.ComponentType; /** * React node shown while the post query has not yet produced data or an error. */ fallback?: React.ReactNode; /** * React node displayed while the post fetch is actively loading. */ loadingIndicator?: React.ReactNode; /** * Whether the default renderer should show the Bluesky icon. * Defaults to `true`. */ showIcon?: boolean; /** * Placement strategy for the icon when it is rendered. * Defaults to `'timestamp'`. */ iconPlacement?: "cardBottomRight" | "timestamp" | "linkInline"; /** * Controls whether to show the parent post if this post is a reply. * Defaults to `false`. */ showParent?: boolean; /** * Controls whether to recursively show all parent posts to the root. * Only applies when `showParent` is `true`. Defaults to `false`. */ recursiveParent?: boolean; } /** * Values injected by `BlueskyPost` into a downstream renderer component. */ export type BlueskyPostRendererInjectedProps = { /** * Resolved record payload for the post. */ record: FeedPostRecord; /** * `true` while network operations are in-flight. */ loading: boolean; /** * Error encountered during loading, if any. */ error?: Error; /** * The author's public handle derived from the DID. */ authorHandle: string; /** * The author's display name from their profile. */ authorDisplayName?: string; /** * The DID that owns the post record. */ authorDid: string; /** * Resolved URL for the author's avatar blob, if available. */ avatarUrl?: string; /** * Placement strategy for the Bluesky icon. */ iconPlacement?: "cardBottomRight" | "timestamp" | "linkInline"; /** * Controls whether the icon should render at all. */ showIcon?: boolean; /** * Fully qualified AT URI of the post, when resolvable. */ atUri?: string; /** * Optional override for the rendered embed contents. */ embed?: React.ReactNode; /** * Whether this post is part of a thread. */ isInThread?: boolean; /** * Depth of this post in a thread (0 = root, 1 = first reply, etc.). */ threadDepth?: number; /** * Whether to show border even when in thread context. */ showThreadBorder?: boolean; }; export declare const BLUESKY_POST_COLLECTION = "app.bsky.feed.post"; /** * Fetches a Bluesky feed post, resolves metadata such as author handle and avatar, * and renders it via a customizable renderer component. * * @param did - DID of the repository that stores the post. * @param rkey - Record key for the post within the feed collection. * @param record - Prefetched record for the post. * @param renderer - Optional renderer component to override the default. * @param fallback - Node rendered before the first fetch attempt resolves. * @param loadingIndicator - Node rendered while the post is loading. * @param showIcon - Controls whether the Bluesky icon should render alongside the post. Defaults to `true`. * @param iconPlacement - Determines where the icon is positioned in the rendered post. Defaults to `'timestamp'`. * @returns A component that renders loading/fallback states and the resolved post. */ export declare const BlueskyPost: React.FC; export default BlueskyPost;