import * as React from 'react'; import type { Color, ColorFormat } from '../lib/color'; export interface ColorPickerContextValue { value: Color; setValue: (color: Color) => void; commitValue: (color: Color) => void; format: ColorFormat; disabled: boolean; } export declare const ColorPickerContext: React.Context; /** The enclosing picker, or `null` when the control stands on its own. */ export declare function useColorPickerContext(): ColorPickerContextValue | null; /** The enclosing picker, for the parts that only exist inside one. */ export declare function useRequiredColorPickerContext(part: string): ColorPickerContextValue; export interface ColorControlOptions { value?: Color | string; defaultValue: Color | string; onValueChange?: (value: Color) => void; onValueCommitted?: (value: Color) => void; disabled?: boolean; } export interface ColorControl { color: Color; disabled: boolean; setColor: (color: Color) => void; commitColor: (color: Color) => void; } /** * Resolves a control's color from, in order: its own `value`, the enclosing picker, * its own state. Writes go to the picker and to the callbacks either way, so a * control stays reportable even when the picker owns the value. */ export declare function useColorControl({ value, defaultValue, onValueChange, onValueCommitted, disabled, }: ColorControlOptions): ColorControl; //# sourceMappingURL=color-picker-context.d.ts.map