export interface LinkPreviewData { url: string; title: string | null; description: string | null; image: string | null; imageWidth: number | null; imageHeight: number | null; siteName: string | null; favicon: string | null; imageAlt?: string | null; /** The colour the page declares for itself, used when we know no brand. */ themeColor?: string | null; /** `og:type`: "article", "video.other", "music.song". */ type?: string | null; author?: string | null; publishedAt?: string | null; /** Present when the page advertises a real player. */ oembedUrl?: string | null; /** What the page answered with, so a 404 can say so rather than guess. */ status?: number | null; } /** * The links in a message, minus the ones that are already something else: a URL in backticks * is being quoted rather than shared, and a markdown image is already drawn. */ export declare function extractUrls(text: string | null): string[]; /** * How much of a card a preview can fill. A wide image sits under the text, a small one * beside it, and no image takes no space — drawing all three alike gave a grey rectangle. */ export type LinkCardLayout = "large" | "thumbnail" | "text" | "bare"; export declare function getLinkCardLayout(data: LinkPreviewData): LinkCardLayout; /** * Why a page gave us nothing, in words worth showing somebody. Only for statuses that mean * something to a reader: a 500 is the site's problem, so it returns null. */ export declare function describePreviewFailure(status: number | null | undefined): string | null; /** * The line under the title, where the path says something the title does not. Wikipedia * titles its WebRTC page "WebRTC", and `/wiki/WebRTC` printed the word twice. */ export declare function getCardSubtitle(title: string | null, detail: string | null): string | null;