import type { Handle } from "../crop-handles"; import type { ImageEditorEdits } from "./edits"; export type Point = { x: number; y: number; }; export type CropRect = { x: number; y: number; width: number; height: number; }; export type CropSettings = { aspectRatio: string; aspectRatioLocked: boolean; customAspectRatio?: string; rotation?: number; constrainCrop?: boolean; }; export type Bounds = { minX: number; minY: number; maxX: number; maxY: number; }; export type LightAdjustments = { exposure: number; contrast: number; highlights: number; shadows: number; whites: number; blacks: number; }; export type LightAdjustmentName = keyof LightAdjustments; export declare const DEFAULT_LIGHT_ADJUSTMENTS: LightAdjustments; export declare const COLOR_MIXER_BANDS: readonly ["red", "orange", "yellow", "green", "aqua", "blue", "purple", "magenta"]; export type ColorMixerBand = (typeof COLOR_MIXER_BANDS)[number]; export type MixerHslBandAdjustments = { hue: number; saturation: number; luminance: number; }; export type MixerHslAdjustments = Record; export type PointColorAdjustments = { /** * Selected hue center in normalized hue space (0..1). `null` means no point selected. */ hue: number | null; range: number; hueShift: number; saturationShift: number; luminanceShift: number; }; export type ColorAdjustments = { vibrance: number; saturation: number; mixerHsl: MixerHslAdjustments; pointColor: PointColorAdjustments; }; export type ColorAdjustmentName = "vibrance" | "saturation"; export declare function createDefaultMixerHslAdjustments(): MixerHslAdjustments; export declare function createDefaultPointColorAdjustments(): PointColorAdjustments; export declare function createDefaultColorAdjustments(): ColorAdjustments; export declare const DEFAULT_COLOR_ADJUSTMENTS: ColorAdjustments; export type SharpeningSettings = { amount: number; radius: number; detail: number; masking: number; }; export type DenoiseSettings = { luminance: number; color: number; detail: number; }; export declare const DEFAULT_SHARPENING_SETTINGS: SharpeningSettings; export declare const DEFAULT_DENOISE_SETTINGS: DenoiseSettings; export type ToneCurveChannel = "rgb" | "r" | "g" | "b"; export type CurvePoint = { x: number; y: number; }; export type ToneCurveParametricSettings = { highlights: number; lights: number; darks: number; shadows: number; }; export type ToneCurveSettings = { mode: "point" | "parametric"; activeChannel: ToneCurveChannel; point: Record; parametric: { rgb: ToneCurveParametricSettings; }; }; export declare const DEFAULT_TONE_CURVE: ToneCurveSettings; export type WhiteBalancePreset = "daylight" | "cloudy" | "shade" | "tungsten" | "fluorescent" | "flash" | "custom"; export type WhiteBalanceSettings = { temperatureKelvin: number; tint: number; preset: WhiteBalancePreset; }; export declare const DEFAULT_WHITE_BALANCE: WhiteBalanceSettings; export type { ImageEditorEdits } from "./edits"; export type CropCommit = { outputWidth: number; outputHeight: number; bakedOffset: { x: number; y: number; }; rotationDegrees: number; }; interface CropStore { cropRect: CropRect; cropSettings: CropSettings; cropBounds: Bounds; cropCommitted: boolean; cropCommit: CropCommit | null; whiteBalance: WhiteBalanceSettings; lightAdjustments: LightAdjustments; colorAdjustments: ColorAdjustments; toneCurve: ToneCurveSettings; setCropRect: (cropRect: CropRect) => void; updateCropRect: (updates: Partial) => void; setCropSettings: (cropSettings: CropSettings) => void; updateCropSettings: (updates: Partial) => void; initializeCropRect: (bounds: Bounds) => void; resetCropSettings: () => void; resetCropRect: (bounds: Bounds) => void; resetAll: (bounds: Bounds) => void; handleCropSettingsChange: (newSettings: CropSettings) => void; commitCrop: (commit: CropCommit) => void; clearCommittedCrop: () => void; moveCropRect: (newPoint: Point, oldPoint: Point) => void; resizeCropRect: (newPoint: Point, oldPoint: Point, activeHandle: Handle) => void; setRotation: (angle: number) => void; resetRotation: () => void; setConstrainCrop: (constrainCrop: boolean) => void; setWhiteBalance: (updates: Partial) => void; setWhiteBalancePreset: (preset: WhiteBalancePreset) => void; resetWhiteBalance: () => void; setLightAdjustment: (name: LightAdjustmentName, value: number) => void; resetLightAdjustments: () => void; resetLightAdjustment: (name: LightAdjustmentName) => void; setColorAdjustment: (name: ColorAdjustmentName, value: number) => void; resetColorAdjustments: () => void; resetColorAdjustment: (name: ColorAdjustmentName) => void; setToneCurveMode: (mode: ToneCurveSettings["mode"]) => void; setToneCurveChannel: (channel: ToneCurveChannel) => void; setToneCurvePoints: (channel: ToneCurveChannel, points: CurvePoint[]) => void; setToneCurveParametricRgb: (updates: Partial) => void; resetToneCurve: () => void; getEdits: () => ImageEditorEdits; } export declare const useCropStore: import("zustand").UseBoundStore>; export declare function getResizedRect(cropBounds: Bounds, cropSettings: CropSettings, rect: CropRect, handle: string, currentPoint: Point, startPoint: Point): CropRect; export declare function applyAspectRatioConstraints(cropBounds: Bounds, newRect: CropRect, handle: string, aspectRatio: string, customAspectRatio?: string): CropRect; //# sourceMappingURL=cropStore.d.ts.map