import type { Shader } from '../canvas'; import type { StandardProperties } from 'csstype'; import { EventEmitter } from 'eventemitter3'; type LayoutStyles = { display?: 'none'; position?: 'relative' | 'absolute'; flexGrow?: number; flexShrink?: number; flexBasis?: number | string; alignSelf?: 'auto' | LayoutStyles['alignItems']; width?: number | string | 'auto'; height?: number | string | 'auto'; minWidth?: number | string | 'auto'; minHeight?: number | string | 'auto'; maxWidth?: number | string | 'auto'; maxHeight?: number | string | 'auto'; paddingTop?: number | string; paddingRight?: number | string; paddingBottom?: number | string; paddingLeft?: number | string; marginTop?: number | string; marginRight?: number | string; marginBottom?: number | string; marginLeft?: number | string; left?: number | string; top?: number | string; right?: number | string; bottom?: number | string; flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse'; flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse'; justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'; alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline'; alignContent?: 'flex-start' | 'flex-end' | 'stretch' | 'center' | 'space-between' | 'space-around'; }; type PaintStyles = { visibility?: 'visible' | 'hidden'; }; type TextStyles = { fontStyle?: StandardProperties['fontStyle']; fontVariant?: StandardProperties['fontVariant']; fontWeight?: StandardProperties['fontWeight']; fontStretch?: StandardProperties['fontStretch']; fontSize?: number; lineHeight?: number; fontFamily?: StandardProperties['fontFamily']; font?: StandardProperties['font']; color?: StandardProperties['color']; maxLines?: number; textAlign?: StandardProperties['textAlign']; }; type BoxDecorationStyles = { borderColor?: StandardProperties['color']; borderImage?: Shader; borderWidth?: number; borderRadius?: number; boxShadow?: StandardProperties['boxShadow']; backgroundColor?: StandardProperties['color']; backgroundImage?: Shader; }; type InteractiveStyles = { cursor?: StandardProperties['cursor']; }; type ShapeStyles = { fill?: string; stroke?: string; strokeWidth?: number; }; type RRectStyles = { rx?: number; ry?: number; }; type CircleStyles = { radius?: number; }; export type StyleProps = LayoutStyles & PaintStyles & InteractiveStyles & TextStyles & BoxDecorationStyles & ShapeStyles & RRectStyles & CircleStyles; export interface StyleMap extends StyleProps, Record any)> { } type ChangeEventTypes = { [K in keyof T]-?: (value: T[K]) => void; }; export type StyleMapEventTypes = ChangeEventTypes; export declare class StyleMap extends EventEmitter { constructor(); has(styleName: keyof StyleProps): this is StyleMap & Required>; } export {};