UNPKG

@cf-wasm/og

Version:

Generate Open Graph Images dynamically from HTML/CSS without a browser.

21 lines (20 loc) 954 B
import { type EmojiType } from './emoji'; import { FontDetector } from './language'; import type { Font } from './satori'; import type { StringWithSuggestions } from './types'; /** Font detector */ export declare const DETECTOR: FontDetector; /** Assets cache map */ export declare const ASSET_CACHE_MAP: Map<string, string | Font[]>; /** Loads dynamic asset requested by satori without caching */ export declare const loadSatoriAsset: (languageCode: StringWithSuggestions<"emoji" | "unknown">, segment: string, emoji?: EmojiType) => Promise<string | Font[]>; /** * Loads dynamic assets requested by satori * * @param languageCode The language code * @param segment The text * @param emoji The {@link EmojiType} * * @returns On success, the asset as either string or {@link Font} */ export declare const loadDynamicAsset: (languageCode: StringWithSuggestions<"emoji" | "unknown">, segment: string, emoji?: EmojiType) => Promise<string | Font[]>;