import { ImgHTMLAttributes } from 'react'; import { UseThemeHook } from '../hooks/use-theme.js'; import '../context-DsMFP6un.js'; import '../types-BAqJDAl9.js'; interface ThemedImageProps extends Omit, 'src'> { /** Map of theme → image src. Keys may include any theme plus `'system'`. */ sources: Partial>; /** Fallback src used when no source matches the active theme. */ fallbackSrc?: string; } /** * An `` that swaps `src` based on the active theme. * * Reads the theme store's server snapshot, so when the provider is **seeded * with `initialTheme`** (e.g. from the server cookie via `getTheme()`), the * server render and the client hydration render both pick the seeded `src` — * no post-mount swap, no flash, no hydration warning. * * ⚠️ If you do NOT pass `initialTheme` (or pass a `system`/unresolved value), * the server render cannot know the user's theme: it renders the resolved * `defaultTheme` (`system` resolves to `light` on the server), while the client * resolves the real stored/OS value. When those differ, React logs a hydration * mismatch and you should add `suppressHydrationWarning` to this element. * * For guaranteed zero-flash SSR with `system` resolution, prefer CSS * (`html[data-theme]`-scoped `background-image`) over a JS `src` swap. */ declare function makeThemedImage(useThemeHook: UseThemeHook): ({ sources, fallbackSrc, alt, ...rest }: ThemedImageProps) => React.JSX.Element | null; declare const ThemedImage: ({ sources, fallbackSrc, alt, ...rest }: ThemedImageProps) => React.JSX.Element | null; export { ThemedImage, type ThemedImageProps, makeThemedImage };