import { type FC } from 'react'; /** * Type for basic metadata */ export interface BasicMetadata { /** * Page title */ title?: string; /** * Page description */ description?: string; /** * Canonical URL */ canonical?: string; /** * Language code (e.g., 'en', 'fr') */ locale?: string; /** * Alternative locales */ alternateLocales?: string[]; /** * Type of content */ type?: 'website' | 'article' | 'profile' | 'book' | string; /** * Site name */ siteName?: string; } /** * Type for image metadata */ export interface ImageMetadata { /** * Image URL */ url: string; /** * Alternative text for the image */ alt?: string; /** * Image width in pixels */ width?: number; /** * Image height in pixels */ height?: number; /** * MIME type of the image */ type?: string; /** * Secret used to generate the image (Next.js compatibility) */ secureUrl?: string; } /** * Type for Twitter-specific metadata */ export interface TwitterMetadata { /** * Twitter card type */ card?: 'summary' | 'summary_large_image' | 'app' | 'player'; /** * Twitter site username (with @) */ site?: string; /** * Twitter creator username (with @) */ creator?: string; /** * Twitter creator ID */ creatorId?: string; /** * Twitter site ID */ siteId?: string; /** * Title specifically for Twitter */ title?: string; /** * Description specifically for Twitter */ description?: string; /** * Image specifically for Twitter */ image?: ImageMetadata | string; } /** * Type for OpenGraph article metadata */ export interface ArticleMetadata { /** * Article publication date */ publishedTime?: string; /** * Article modified date */ modifiedTime?: string; /** * Article expiration date */ expirationTime?: string; /** * Article section */ section?: string; /** * Article tags */ tags?: string[]; /** * Article authors */ authors?: string[]; } /** * Type for common verification records */ export interface VerificationMetadata { /** * Google verification */ google?: string | string[]; /** * Yandex verification */ yandex?: string | string[]; /** * Bing verification */ bing?: string | string[]; /** * Yahoo verification */ yahoo?: string | string[]; /** * Other verification */ other?: Record; } /** * Props for the OpenGraph component */ export interface OpenGraphProps { /** * Basic metadata */ basic?: BasicMetadata; /** * OpenGraph image(s) */ images?: ImageMetadata | ImageMetadata[]; /** * Twitter-specific metadata */ twitter?: TwitterMetadata; /** * Article-specific metadata (only used when type is 'article') */ article?: ArticleMetadata; /** * Site verification records */ verification?: VerificationMetadata; /** * Robots directives */ robots?: { /** * Follow links on the page */ follow?: boolean; /** * Index the page */ index?: boolean; /** * Allow page archiving */ archive?: boolean; /** * Allow indexing of images */ imageIndex?: boolean; /** * Allow snippets in search results */ snippet?: boolean; /** * Allow translation of page */ translate?: boolean; /** * Allow video indexing */ videoIndex?: boolean; /** * Maximum snippet length */ maxSnippet?: number; /** * Maximum image preview size */ maxImagePreview?: 'none' | 'standard' | 'large'; /** * Maximum video preview length */ maxVideoPreview?: number; }; /** * Additional custom meta tags */ additionalMetaTags?: Array<{ name?: string; property?: string; content: string; }>; } /** * Component for adding Open Graph, Twitter Card, and other meta tags to your pages. * API compatible with Next.js metadata API. * * @example * ```tsx * * ``` */ export declare const OpenGraph: FC; export default OpenGraph;