import type { EntityRaw, EntityRuntime, EntityRuntimeKey, EntityWithoutRuntime } from '@flighthq/entity/contract'; export interface Adjustment extends EntityRaw { [EntityRuntimeKey]: EntityRuntime | undefined; kind: AdjustmentKind; } /** * Identifies a pointwise value-remap adjustment for realization dispatch. An open-registry string * key: the canonical PascalCase type name (`'ColorScaleBiasAdjustment'`, `'Brightness'`), simultaneously the * registry key and the serialized form. Third-party adjustments namespace with a vendor prefix * (`'acme.Duotone'`). Concrete kinds are declared by the packages that own them. */ export type AdjustmentKind = string; export interface BrightnessContrastAdjustment extends ColorMatrixAdjustment { kind: 'BrightnessContrastAdjustment'; brightness?: number; contrast?: number; } export interface ChannelMixerAdjustment extends ColorMatrixAdjustment { kind: 'ChannelMixerAdjustment'; matrix: readonly number[]; } export interface ColorAdjustmentRuntime { colorAdjustments: readonly Adjustment[] | null; colorAdjustmentsUnsupported: boolean; resolvedColorMatrix: Readonly | null; resolvedColorScaleBias: ColorScaleBias | null; } export type ColorBlindType = 'protanopia' | 'deuteranopia' | 'tritanopia' | 'protanomaly' | 'deuteranomaly' | 'tritanomaly' | 'achromatopsia' | 'achromatomaly'; export interface ColorBlindSimulationAdjustment extends ColorMatrixAdjustment { kind: 'ColorBlindSimulationAdjustment'; type?: ColorBlindType; } export interface ColorGradeAdjustment extends ColorLutAdjustment { kind: 'ColorGradeAdjustment'; exposure?: number; brightness?: number; contrast?: number; saturation?: number; temperature?: number; tint?: number; lift?: number; gamma?: number; gain?: number; } export interface ColorLut { size: number; samples: readonly number[]; } export interface ColorLutAdjustment extends Adjustment { transform: ColorTransformFunction; } export interface ColorLutCache extends EntityRaw { [EntityRuntimeKey]: EntityRuntime | undefined; signature: string | null; lut: ColorLut | null; } export interface ColorMatrixAdjustment extends Adjustment { colorMatrix: Readonly; } /** * Per-channel affine color adjustment: `out = in * scale + bias`. * * Scale is dimensionless. Bias is an unbounded normalized-linear float, where `1` adds one full * channel of intensity; byte-domain consumers convert it at their boundary. */ export interface ColorScaleBias extends EntityRaw { [EntityRuntimeKey]: EntityRuntime | undefined; alphaScale: number; alphaBias: number; blueScale: number; blueBias: number; greenScale: number; greenBias: number; redScale: number; redBias: number; } export type ColorScaleBiasLike = EntityWithoutRuntime; export interface ColorScaleBiasAdjustment extends ColorMatrixAdjustment { colorScaleBias: Readonly; kind: 'ColorScaleBiasAdjustment'; } export type ColorTransformFunction = (out: [number, number, number], r: number, g: number, b: number) => void; export interface ExposureAdjustment extends ColorMatrixAdjustment { kind: 'ExposureAdjustment'; exposure?: number; } export interface GrayscaleAdjustment extends ColorMatrixAdjustment { kind: 'GrayscaleAdjustment'; intensity?: number; } export interface HueSaturationAdjustment extends ColorLutAdjustment { kind: 'HueSaturationAdjustment'; hue?: number; saturation?: number; lightness?: number; } export interface InvertAdjustment extends ColorMatrixAdjustment { kind: 'InvertAdjustment'; intensity?: number; } export interface LiftGammaGainAdjustment extends ColorLutAdjustment { kind: 'LiftGammaGainAdjustment'; lift?: number; gamma?: number; gain?: number; } export interface LookupTableGradeAdjustment extends ColorLutAdjustment { kind: 'LookupTableGradeAdjustment'; lut?: ColorLut; strength?: number; } export interface SepiaAdjustment extends ColorMatrixAdjustment { kind: 'SepiaAdjustment'; intensity?: number; } export interface TintAdjustment extends ColorMatrixAdjustment { kind: 'TintAdjustment'; } //# sourceMappingURL=types.d.ts.map