import type { ValuesType } from 'utility-types'; import type { KeyValue } from '../../common'; import { Registry } from '../registry'; export interface BackgroundOptions { color?: string; image?: string; position?: BackgroundPosition<{ x: number; y: number; }>; size?: BackgroundSize<{ width: number; height: number; }>; repeat?: BackgroundRepeat; opacity?: number; } export interface BackgroundCommonOptions extends Omit { quality?: number; } export type BackgroundDefinition = (img: HTMLImageElement, options: T) => HTMLCanvasElement; type Presets = typeof presets; type OptionsMap = { readonly [K in keyof Presets]-?: Parameters[1] & { repeat: K; }; }; export type BackgroundNativeItem = ValuesType; export type BackgroundManualItem = BackgroundCommonOptions & KeyValue & { repeat: string; }; declare const presets: { [name: string]: BackgroundDefinition; }; export declare const backgroundRegistry: Registry, { [name: string]: BackgroundDefinition; }, never>; type Globals = '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'unset'; type BgPosition = TLength | 'bottom' | 'center' | 'left' | 'right' | 'top' | (string & {}); type BgSize = TLength | 'auto' | 'contain' | 'cover' | (string & {}); type RepeatStyle = 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y' | 'round' | 'space' | (string & {}); export type BackgroundPosition = Globals | BgPosition | (string & {}); export type BackgroundSize = Globals | BgSize | (string & {}); export type BackgroundRepeat = Globals | RepeatStyle | (string & {}); export {};