import { ViewStyle, ImageStyle, TextStyle } from 'react-native'; /** Tailwind-style spacing scale → pixel values (shared by padding, margin, position offsets). */ declare const spacingScale: { readonly '0': 0; readonly px: 1; readonly '1': 4; readonly '2': 8; readonly '3': 12; readonly '4': 16; readonly '5': 20; readonly '6': 24; readonly '7': 28; readonly '8': 32; readonly '9': 36; readonly '10': 40; readonly '11': 44; readonly '12': 48; readonly '14': 56; readonly '16': 64; readonly '20': 80; readonly '24': 96; readonly '28': 112; readonly '32': 128; readonly '36': 144; readonly '40': 160; readonly '44': 176; readonly '48': 192; readonly '52': 208; readonly '56': 224; readonly '60': 240; readonly '64': 256; readonly '72': 288; readonly '80': 320; readonly '96': 384; }; /** Single flex-related style fragment returned by utilities and preset keys. */ type Flex = Partial>; type SpacingScaleKey = keyof typeof spacingScale; type FlexSpacingToken = `gap_${SpacingScaleKey}` | `gap_x_${SpacingScaleKey}` | `gap_y_${SpacingScaleKey}` | `basis_${SpacingScaleKey}`; /** Default export of [`flex`](../flexbox/flex.ts): presets, callables, and spacing-scale tokens. */ interface FlexUtilitiesCore { f_: (num?: number | string) => Flex; f_1: Flex; f_2: Flex; f_3: Flex; f_4: Flex; f_5: Flex; f_6: Flex; f_7: Flex; f_8: Flex; f_9: Flex; gap_: (num?: number | string) => Flex; gap_x_: (num?: number | string) => Flex; gap_y_: (num?: number | string) => Flex; basis_: (value?: string | number) => Flex; row: Flex; row_reverse: Flex; col: Flex; column_reverse: Flex; grow: Flex; grow_0: Flex; shrink: Flex; shrink_0: Flex; wrap: Flex; wrap_reverse: Flex; nowrap: Flex; basis_auto: Flex; } type FlexUtilities = FlexUtilitiesCore & Record & Record>; type DynamicArg = string | number; type DynamicSingleFn = (value: DynamicArg) => TStyle; type DynamicSpacingFn = { (all: DynamicArg): TStyle; (vertical: DynamicArg, horizontal: DynamicArg): TStyle; (top: DynamicArg, right: DynamicArg, bottom: DynamicArg, left: DynamicArg): TStyle; }; type DynamicStyleMap = Record | DynamicSpacingFn>; type Padding = Pick; type Margin = Pick; type SpacingScaleOrAuto = SpacingScaleKey | 'auto'; type PaddingPrefix = 'px' | 'py' | 'pt' | 'pr' | 'pb' | 'pl' | 'ps' | 'pe' | 'p'; type PaddingStaticToken = { [P in PaddingPrefix]: `${P}_${SpacingScaleOrAuto}`; }[PaddingPrefix]; type MarginPrefix = 'mx' | 'my' | 'mt' | 'mr' | 'mb' | 'ml' | 'ms' | 'me' | 'm'; type MarginStaticToken = { [P in MarginPrefix]: `${P}_${SpacingScaleOrAuto}`; }[MarginPrefix]; interface PaddingHelpers { p_: DynamicSpacingFn; px_: DynamicSingleFn; py_: DynamicSingleFn; pt_: DynamicSingleFn; pr_: DynamicSingleFn; pb_: DynamicSingleFn; pl_: DynamicSingleFn; ps_: DynamicSingleFn; pe_: DynamicSingleFn; } type PaddingStyles = PaddingHelpers & Record & Record | DynamicSpacingFn>; interface MarginHelpers { m_: DynamicSpacingFn; mx_: DynamicSingleFn; my_: DynamicSingleFn; mt_: DynamicSingleFn; mr_: DynamicSingleFn; mb_: DynamicSingleFn; ml_: DynamicSingleFn; ms_: DynamicSingleFn; me_: DynamicSingleFn; } type MarginStyles = MarginHelpers & Record & Record | DynamicSpacingFn>; declare const p: PaddingStyles; declare const m: MarginStyles; type AspectRatio = Pick; type Direction = Pick; type Display = Pick; type SizeMode = NonNullable | 'fill' | 'scale_down'; type PositionValue = Partial>; type PositionPreset = { position: NonNullable | 'fixed' | 'sticky'; }; declare const aspect: Record AspectRatio)>; declare const object_fit: { [key: string]: { resizeMode: SizeMode; } | { objectFit: SizeMode; }; }; declare const display: { [key: string]: Display; }; declare const direction: { [key: string]: Direction; }; type PositionFn = (value: number | string) => PositionValue; type PositionToken = PositionValue | PositionPreset | PositionFn; declare const pos: Record & { relative: PositionPreset; absolute: PositionPreset; fixed: PositionPreset; sticky: PositionPreset; r_: PositionFn; t_: PositionFn; l_: PositionFn; b_: PositionFn; }; declare const z: { index_0: { zIndex: number; }; index_10: { zIndex: number; }; index_20: { zIndex: number; }; index_30: { zIndex: number; }; index_40: { zIndex: number; }; index_50: { zIndex: number; }; index_auto: { zIndex: string; }; index_(value: number | string): { zIndex: number | "auto"; }; }; declare const overflow: { visible: { overflow: "visible"; }; hidden: { overflow: "hidden"; }; }; declare const flex: FlexUtilities; declare const align: { items_center: { alignItems: "center"; }; items_start: { alignItems: "flex-start"; }; items_end: { alignItems: "flex-end"; }; items_baseline: { alignItems: "baseline"; }; items_stretch: { alignItems: "stretch"; }; content_center: { alignContent: "center"; }; content_start: { alignContent: "flex-start"; }; content_end: { alignContent: "flex-end"; }; content_stretch: { alignContent: "stretch"; }; content_between: { alignContent: "space-between"; }; content_around: { alignContent: "space-around"; }; self_auto: { alignSelf: "auto"; }; self_center: { alignSelf: "center"; }; self_start: { alignSelf: "flex-start"; }; self_end: { alignSelf: "flex-end"; }; self_stretch: { alignSelf: "stretch"; }; self_baseline: { alignSelf: "baseline"; }; }; declare const justify: { center: { justifyContent: "center"; }; start: { justifyContent: "flex-start"; }; end: { justifyContent: "flex-end"; }; between: { justifyContent: "space-between"; }; around: { justifyContent: "space-around"; }; evenly: { justifyContent: "space-evenly"; }; }; declare const place: { items_center: { alignItems: string; justifyContent: string; }; items_stretch: { alignItems: string; justifyContent: string; }; items_start: { alignItems: string; justifyContent: string; }; items_end: { alignItems: string; justifyContent: string; }; items_between: { alignItems: string; justifyContent: string; }; items_around: { alignItems: string; justifyContent: string; }; items_evenly: { alignItems: string; justifyContent: string; }; }; /** * Function type assignable from `(a: X) => R` implementations used in dynamic style maps. * Uses TS bivariance trick so concrete handlers with narrower parameters still type-check. */ type VariadicStyleFn = { bivarianceHack(...args: Array): TResult; }['bivarianceHack']; type StyleMap = Record>; type BorderStyleFn = VariadicStyleFn; /** Explicit call signatures so dynamic index signature does not erase callability. */ interface BorderStyleCallables { color_: (value: string) => ViewStyle; w_: (value: number | string) => ViewStyle; rounded_: (value: number | string) => ViewStyle; rounded_s_: (value: number | string) => ViewStyle; rounded_e_: (value: number | string) => ViewStyle; rounded_t_: (value: number | string) => ViewStyle; rounded_r_: (value: number | string) => ViewStyle; rounded_b_: (value: number | string) => ViewStyle; rounded_l_: (value: number | string) => ViewStyle; rounded_ss_: (value: number | string) => ViewStyle; rounded_se_: (value: number | string) => ViewStyle; rounded_ee_: (value: number | string) => ViewStyle; rounded_es_: (value: number | string) => ViewStyle; rounded_tl_: (value: number | string) => ViewStyle; rounded_tr_: (value: number | string) => ViewStyle; rounded_br_: (value: number | string) => ViewStyle; rounded_bl_: (value: number | string) => ViewStyle; b_color_: (value: string) => ViewStyle; b_w_: (value: number | string) => ViewStyle; l_color_: (value: string) => ViewStyle; l_w_: (value: number | string) => ViewStyle; r_color_: (value: string) => ViewStyle; r_w_: (value: number | string) => ViewStyle; t_color_: (value: string) => ViewStyle; t_w_: (value: number | string) => ViewStyle; s_color_: (value: string) => ViewStyle; s_w_: (value: number | string) => ViewStyle; e_color_: (value: string) => ViewStyle; e_w_: (value: number | string) => ViewStyle; } /** Known callables stay callable; every other key is a border-related style object (see [`BorderStyleCallables`](BorderStyleCallables)). */ type BorderStyles = BorderStyleCallables & { [K in string]: K extends keyof BorderStyleCallables ? BorderStyleCallables[K] : ViewStyle | TextStyle; }; declare const bdr: BorderStyles; type BgStyleFn = VariadicStyleFn; type ShadowStyleFn = VariadicStyleFn; interface BgStyleCallables { bg_color_: (value: string) => ViewStyle; tint_: (value: string) => ImageStyle; opacity_: (value: number | string) => ViewStyle; overlay_: (value: string) => ImageStyle; elevation_: (value: number | string) => ViewStyle; } type BgStyles = BgStyleCallables & { [K in string]: K extends keyof BgStyleCallables ? BgStyleCallables[K] : ViewStyle | ImageStyle; }; interface ShadowStyleCallables { color_: (value: string) => ViewStyle; offset_: (width: number | string, height: number | string) => ViewStyle; opacity_: (value: number | string) => ViewStyle; rounded_: (value: number | string) => ViewStyle; } type ShadowStyles = ShadowStyleCallables & { [K in string]: K extends keyof ShadowStyleCallables ? ShadowStyleCallables[K] : ViewStyle; }; declare const fx: BgStyles; declare const shadow: ShadowStyles; /** Scale-backed height tokens (`h_4`, `max_14`, …). */ type HeightSpacingToken = `h_${SpacingScaleKey}` | `max_${SpacingScaleKey}` | `min_${SpacingScaleKey}`; /** Scale-backed width tokens (`w_4`, `max_14`, …). */ type WidthSpacingToken = `w_${SpacingScaleKey}` | `max_${SpacingScaleKey}` | `min_${SpacingScaleKey}`; interface HeightStylesCore { h_full: ViewStyle; h_half: ViewStyle; h_auto: ViewStyle; w_: (value: number | string) => ViewStyle; max_: (value: number | string) => ViewStyle; min_: (value: number | string) => ViewStyle; } /** Default export of [`h`](../sizing/h.ts): core helpers plus any string key resolving to height-related `ViewStyle`. */ type HeightStyles = HeightStylesCore & Record; interface WidthStylesCore { w_full: ViewStyle; w_half: ViewStyle; w_auto: ViewStyle; w_: (value: number | string) => ViewStyle; max_: (value: number | string) => ViewStyle; min_: (value: number | string) => ViewStyle; } /** Default export of [`w`](../sizing/w.ts). */ type WidthStyles = WidthStylesCore & Record; declare const h: HeightStyles; declare const w: WidthStyles; declare const size: Record; type TextStyleFn = VariadicStyleFn; interface ColoredTextStyleCallables { color_: (value: string) => TextStyle; font_family: (path: string) => TextStyle; shadow_color_: (color: string) => TextStyle; shadow_offset_: (widthVal: number | string, heightVal: number | string) => TextStyle; shadow_radius_: (radius: number | string) => TextStyle; } type ColoredTextStyle = ColoredTextStyleCallables & { [K in string]: K extends keyof ColoredTextStyleCallables ? ColoredTextStyleCallables[K] : TextStyle; }; interface DecorationStyleCallables { color_: (color: string) => TextStyle; } type DecorationStyles = DecorationStyleCallables & { [K in string]: K extends keyof DecorationStyleCallables ? DecorationStyleCallables[K] : TextStyle; }; declare const text: ColoredTextStyle; declare const decoration: DecorationStyles; export { type AspectRatio, type BgStyleCallables, type BgStyleFn, type BgStyles, type BorderStyleCallables, type BorderStyleFn, type BorderStyles, type ColoredTextStyle, type ColoredTextStyleCallables, type DecorationStyleCallables, type DecorationStyles, type Direction, type Display, type DynamicArg, type DynamicSingleFn, type DynamicSpacingFn, type DynamicStyleMap, type Flex, type FlexSpacingToken, type FlexUtilities, type FlexUtilitiesCore, type HeightSpacingToken, type HeightStyles, type HeightStylesCore, type Margin, type MarginStaticToken, type MarginStyles, type Padding, type PaddingStaticToken, type PaddingStyles, type PositionPreset, type PositionValue, type ShadowStyleCallables, type ShadowStyleFn, type ShadowStyles, type SizeMode, type SpacingScaleKey, type SpacingScaleOrAuto, type StyleMap, type TextStyleFn, type VariadicStyleFn, type WidthSpacingToken, type WidthStyles, type WidthStylesCore, align, aspect, bdr, decoration, direction, display, flex, fx, h, justify, m, object_fit, overflow, p, place, pos, shadow, size, text, w, z };