import { type PropsWithChildren, type ReactNode } from "react"; export interface PixelImageBlockConfig { /** * Image widths supported by the API, used to pick a render width. * Generally derived from `dextinityConfig.images.imageSizes` and `dextinityConfig.images.deviceSizes`. */ validSizes: number[]; /** * Origin to prefix relative image URLs with, e.g. `http://localhost:3000`. */ baseUrl: string; } /** * Configuration context for mails. * * Add custom keys via TypeScript interface declaration merging: * * ```ts * declare module "@dextinity/mail-react" { * interface Config { * myKey?: { foo: string }; * } * } * ``` */ export interface Config { /** * Configuration consumed by `HtmlPixelImageBlock` and `MjmlPixelImageBlock`. * Required when those components are rendered. */ pixelImageBlock?: PixelImageBlockConfig; } /** * Places a `Config` value into a React context, making it available to all * descendants via `useConfig`. */ export declare function ConfigProvider({ config, children }: PropsWithChildren<{ config: Config; }>): ReactNode; /** * Returns the nearest `Config` from context, defined by `ConfigProvider` or by the `config` prop on `MjmlMailRoot`. */ export declare function useConfig(): Config;