import type { TextStyle, ViewStyle } from 'react-native'; import type { SemanticColorName } from '../tokens.types'; import type { ThemeState } from '../themeState.types'; import type { StateLevels, StateNames, StateSource, StyleDefFromTokens } from '../../styling/branchedStyle'; export type ViewColorStyle = Pick; export type TextColorStyle = Pick; /** * A semantic color key available in the Flex tokens. */ export type ColorKey = SemanticColorName; type AnyColorStyle = ViewColorStyle | TextColorStyle; type ColorKeysForStyle = { [K in keyof StyleType]: ColorKey; }; type ColorStateEntries = Levels extends readonly [ infer Head extends readonly string[], ...infer Tail extends StateLevels ] ? Partial>> & ColorStateEntries : unknown; /** * A hierarchical style definition that uses semantic color keys in place of * resolved React Native color values. */ export type ColorStyleDefinition = ColorKeysForStyle & ColorStateEntries; /** * Creates a token factory that resolves a semantic color definition. */ export declare function colorStyleDef(colorDef: ColorStyleDefinition, stateLevels: Levels): StyleDefFromTokens; /** * Creates a themed semantic color getter with ordered hierarchy precedence. */ export declare function getThemedColorStyleFactory(name: string, colorDef: ColorStyleDefinition, stateLevels: Levels): (state: ThemeState, source: StateSource>) => StyleType; export {}; //# sourceMappingURL=colorStyles.d.ts.map