import { type PropsWithChildren } from 'react'; import { type ImageSourcePropType, type TextProps, type ViewProps } from 'react-native'; import type { PaletteSwatchOptions, PaletteSwatch, PaletteSwatchVariant } from './types'; export type PaletteViewProps = ViewProps & PaletteSwatchOptions & { /** The image source to extract colors from. */ source: ImageSourcePropType; /** * Determines which color from the swatch to use as the background. * Defaults to the main swatch color. */ variant?: PaletteSwatchVariant; /** * A fallback swatch to use while loading or if generation fails. */ fallback?: Omit; }; /** * A View that uses a palette swatch color as its background. * * It also provides the swatch to nested `Palette.Text` components. */ declare function PaletteView({ source, type, maximumColorCount, region, variant, fallback, style, children, ...rest }: PaletteViewProps): import("react/jsx-runtime").JSX.Element; export type PaletteTextProps = TextProps & Partial & { /** The image source to extract colors from. Only needed when used standalone (not nested in Palette.View). */ source?: ImageSourcePropType; /** * Determines which color from the swatch to use as the text color. * Defaults to the body text color. */ variant?: PaletteSwatchVariant; /** * A fallback swatch to use while loading or if generation fails. */ fallback?: PaletteSwatch; }; /** * A Text component that uses palette swatch colors. * * When nested inside `Palette.View`, automatically uses the swatch from the parent. * It can be overridden with explicit `source` and `type` props. * * When not nested inside `Palette.View`, `source` and `type` props are required. */ declare function PaletteText({ source, type, maximumColorCount, region, variant, fallback, style, children, ...rest }: PropsWithChildren): import("react/jsx-runtime").JSX.Element; /** * Components for using palette colors in views and text. * * - `Palette.View` - Shows a view with the swatch color as background. * - `Palette.Text` - Shows text with colors from the swatch. */ export declare const Palette: { View: typeof PaletteView; Text: typeof PaletteText; }; export {}; //# sourceMappingURL=PaletteComponents.d.ts.map