/** self-contained media blocks: pictures, audio/voice/document/contact cards, maps, polls, link-preview cards. */ import type { Block } from "./text.js"; import type { Palette } from "./theme.js"; import type { LoosePoll } from "./types.js"; /** picture media (photo/video/animation) width — every bleed block shares this. */ export declare const MW = 252; /** truncate `text` with an ellipsis so it fits `maxW` px at the given px-per-unit width — cuts * on grapheme-cluster boundaries so it never splits a surrogate pair or emoji sequence. */ export declare function ellipsize(text: string, maxW: number, unitW?: number): string; export declare function picture(src: string | undefined, natW: number | undefined, natH: number | undefined, clip: string, seedKey: string, spoiler: boolean, overlay: (x: number, y: number, w: number, h: number) => string): Block; export declare const playGlyph: (cx: number, cy: number) => string; export declare const badge: (x: number, y: number, label: string) => string; export declare const durPill: (x: number, bottomY: number, text: string) => string; /** a 252-wide single-row card (audio/voice/document/contact). */ export declare function card(h: number, draw: (x: number, y: number) => string): Block; export declare function waveform(x: number, y: number, color: string, track: string): string; export declare function mapTile(x: number, y: number, w: number, h: number, p: Palette, clip: string): string; /** poll question + options with percentage bars; shows a quiz/closed marker on the winning option. */ export declare function pollBlock(poll: LoosePoll, w: number, base: string, p: Palette): Block; /** link-preview card — a left accent bar + site/title/description, like telegram's own webpage preview. */ export declare function webpageBlock(site: string | undefined, title: string | undefined, description: string | undefined, src: string | undefined, w: number, base: string, p: Palette): Block; //# sourceMappingURL=media.d.ts.map