export type Layout = 'fixed' | 'constrained' | 'fullWidth'; type Prettify = { [K in keyof T]: T[K]; } & {}; export interface OEmbedSourceOptions { src: string; width?: number; height?: number; aspectRatio?: number; layout?: Layout; } /** * HTML image attributes, common to image components in multiple frameworks. * For React (and potentially other frameworks added in the future), convert to camelCase. */ export interface CoreOEmbedAttributes> { src?: string | number | null; width?: string | number | null; height?: string | number | null; loading?: 'eager' | 'lazy' | null; style?: TStyle; } export type BaseOEmbedProps, TStyle> = Exclude & OEmbedSourceOptions; type BaseOEmbedWithAspectRatioProps, TStyle> = BaseOEmbedProps & { aspectRatio: number; }; type OEmbedWithAspectRatioAndWidthProps, TStyle> = BaseOEmbedWithAspectRatioProps & { width: number; }; type OEmbedWithAspectRatioAndHeightProps, TStyle> = BaseOEmbedWithAspectRatioProps & { height: number; }; type OEmbedWithWidthAndHeightProps, TStyle> = BaseOEmbedProps & { width: number; height: number; }; type OEmbedWithSizeProps, TStyle> = OEmbedWithAspectRatioAndWidthProps | OEmbedWithAspectRatioAndHeightProps | OEmbedWithWidthAndHeightProps; export type FixedOEmbedProps, TStyle> = Prettify & { layout: 'fixed'; }>; export type ConstrainedOEmbedProps, TStyle> = OEmbedWithSizeProps & { layout?: 'constrained'; }; export type FullWidthOEmbedProps, TStyle> = BaseOEmbedProps & { layout: 'fullWidth'; width?: never; }; export type AWCOEmbedProps, TStyle = TOEmbedAttributes['style']> = FixedOEmbedProps | ConstrainedOEmbedProps | FullWidthOEmbedProps; /** * Gets the styles for an OEmbed */ export declare const getStyle: , TStyle = Record>({ width, height, aspectRatio, layout }: Pick, 'width' | 'height' | 'aspectRatio' | 'layout'>) => TOEmbedAttributes['style']; /** * Generates the props for an img element */ export declare function transformProps, TStyle = Record>({ width, height, layout, aspectRatio, ...props }: AWCOEmbedProps): TOEmbedAttributes; export {};