import { ReactNode } from 'react'; /** * This class handles everything related to fonts. */ declare type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900; declare type Style = 'normal' | 'italic'; interface FontOptions { data: Buffer | ArrayBuffer; name: string; weight?: Weight; style?: Style; } interface SatoriOptions { width: number; height: number; fonts: FontOptions[]; embedFont?: boolean; debug?: boolean; graphemeImages?: Record; detectLanguage?: (segment: string) => Promise | string; loadAdditionalAsset?: (languageCode: string, segment: string) => Promise; } declare function init({ Yoga, Resvg }: any): void; declare function toSvg(element: ReactNode, options: SatoriOptions): Promise; declare function toPng(element: ReactNode, options: SatoriOptions): Promise; export { init, toPng, toSvg };