/opt/canhelp/node_modules/next/dist/compiled/@vercel/og/satori
Edit: /opt/canhelp/node_modules/next/dist/compiled/@vercel/og/satori/index.d.ts (4771B)
import { ReactNode } from 'react';
type Yoga = any;
declare const code: {
readonly 'ja-JP': RegExp;
readonly 'ko-KR': RegExp;
readonly 'zh-CN': RegExp;
readonly 'zh-TW': RegExp;
readonly 'zh-HK': RegExp;
readonly 'th-TH': RegExp;
readonly 'bn-IN': RegExp;
readonly 'ar-AR': RegExp;
readonly 'ta-IN': RegExp;
readonly 'ml-IN': RegExp;
readonly 'he-IL': RegExp;
readonly 'te-IN': RegExp;
readonly devanagari: RegExp;
readonly kannada: RegExp;
};
type Locale = keyof typeof code;
/**
* This class handles everything related to fonts.
*/
type Weight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
type FontStyle = 'normal' | 'italic';
interface FontOptions {
data: Buffer | ArrayBuffer;
name: string;
weight?: Weight;
style?: FontStyle;
lang?: string;
}
declare type Style = {
[key: string]: string[] | string | number | boolean | Style;
};
declare type NotImplemented = (...args: any) => unknown;
declare type AddedUtilities = Record
;
declare type PluginFunction = (obj: {
addUtilities(utilities: AddedUtilities): unknown;
/**
* @deprecated not supported in @jaredh159/twrn
*/
addComponents: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
addBase: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
addVariant: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
e: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
prefix: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
theme: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
variants: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
config: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
corePlugins: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
matchUtilities: NotImplemented;
/**
* @deprecated not supported in @jaredh159/twrn
*/
postcss: unknown;
}) => unknown;
declare type TwFontSize = string | [string, string] | [string, {
lineHeight?: string;
letterSpacing?: string;
}];
declare type TwScreen = string | {
max?: string;
min?: string;
};
declare type TwColors = {
[key: string]: V | TwColors;
};
interface TwTheme {
fontSize?: Record;
lineHeight?: Record;
spacing?: Record;
padding?: Record;
margin?: Record;
inset?: Record;
height?: Record;
width?: Record;
maxWidth?: Record;
maxHeight?: Record;
minWidth?: Record;
minHeight?: Record;
letterSpacing?: Record;
borderWidth?: Record;
borderRadius?: Record;
screens?: Record;
opacity?: Record;
flex?: Record;
flexGrow?: Record;
flexShrink?: Record;
fontWeight?: Record;
fontFamily?: Record;
zIndex?: Record;
colors?: TwColors;
backgroundColor?: TwColors;
borderColor?: TwColors;
textColor?: TwColors;
extend?: Omit;
}
interface TwConfig {
theme?: TwTheme;
plugins?: Array<{
handler: PluginFunction;
}>;
}
/**
* This module is used to calculate the layout of the current sub-tree.
*/
interface SatoriNode {
left: number;
top: number;
width: number;
height: number;
type: string;
key?: string | number;
props: Record;
textContent?: string;
}
declare function init(yoga: Yoga): void;
type SatoriOptions = ({
width: number;
height: number;
} | {
width: number;
} | {
height: number;
}) & {
fonts: FontOptions[];
embedFont?: boolean;
debug?: boolean;
graphemeImages?: Record;
loadAdditionalAsset?: (languageCode: string, segment: string) => Promise>;
tailwindConfig?: TwConfig;
onNodeDetected?: (node: SatoriNode) => void;
pointScaleFactor?: number;
};
declare function satori(element: ReactNode, options: SatoriOptions): Promise;
export { FontOptions as Font, FontStyle, Weight as FontWeight, Locale, SatoriNode, SatoriOptions, satori as default, init };