import { type Color } from './colors'; /** Predefined Excel pattern types. `'none'` lives here too as an explicit value. */ export type PatternType = 'none' | 'solid' | 'darkDown' | 'darkGray' | 'darkGrid' | 'darkHorizontal' | 'darkTrellis' | 'darkUp' | 'darkVertical' | 'gray0625' | 'gray125' | 'lightDown' | 'lightGray' | 'lightGrid' | 'lightHorizontal' | 'lightTrellis' | 'lightUp' | 'lightVertical' | 'mediumGray'; export declare const PATTERN_TYPES: ReadonlyArray; export interface PatternFill { readonly kind: 'pattern'; readonly patternType?: PatternType; readonly fgColor?: Color; readonly bgColor?: Color; } export declare function makePatternFill(opts?: Partial>): PatternFill; export interface GradientStop { /** 0..1 ratio along the gradient. */ readonly position: number; readonly color: Color; } export type GradientFillType = 'linear' | 'path'; export interface GradientFill { readonly kind: 'gradient'; readonly type: GradientFillType; /** Rotation angle (degrees). Ignored when `type === 'path'`. */ readonly degree?: number; /** path-mode insets (0..1 from each edge). */ readonly left?: number; readonly right?: number; readonly top?: number; readonly bottom?: number; /** Colour stops along the gradient. */ readonly stops: ReadonlyArray; } export declare function makeGradientStop(position: number, color: Color | Partial): GradientStop; export declare function makeGradientFill(opts?: Partial>): GradientFill; export type Fill = PatternFill | GradientFill; /** * Single-arg constructor that defers to the variant-specific maker based on * `kind`. Useful when the caller has a plain object in hand and wants the * freeze invariant applied uniformly. */ export declare function makeFill(opts: Partial | Partial): Fill; /** The empty PatternFill — Excel's default cellXf[0] points here. */ export declare const DEFAULT_EMPTY_FILL: Fill; /** The 'gray125' PatternFill — Excel's default cellXf[1]. */ export declare const DEFAULT_GRAY_FILL: Fill; /** * Translate a {@link Fill} to a CSS-property record suitable for HTML preview. * `'solid'` PatternFill renders as `background-color`, other pattern types * collapse to bgColor (CSS has no built-in equivalent of Excel hatch patterns). * GradientFill emits a CSS `background-image` with `linear-gradient(, * …)` for `type='linear'` or `radial-gradient(circle, …)` for `type='path'`. * * theme/auto colours and unresolvable inputs are skipped (returns `{}`) so * callers can spread without overwriting upstream defaults. */ export declare function fillToCss(fill: Fill | undefined): Record;