import * as react_native from 'react-native'; import { ViewStyle, TextStyle, ImageStyle, ColorValue, OpaqueColorValue, StyleSheet as StyleSheet$1 } from 'react-native'; declare const REM_KEYS_ARRAY: readonly ["fontSize", "lineHeight", "letterSpacing", "textShadowRadius", "textShadowOffset.width", "textShadowOffset.height", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight", "marginHorizontal", "marginVertical", "marginStart", "marginEnd", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd", "padding", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "paddingHorizontal", "paddingVertical", "paddingStart", "paddingEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "top", "left", "right", "bottom", "start", "end", "inset", "insetBlock", "insetBlockStart", "insetBlockEnd", "insetInline", "insetInlineStart", "insetInlineEnd", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderTopStartRadius", "borderTopEndRadius", "borderBottomStartRadius", "borderBottomEndRadius", "borderWidth", "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth", "borderStartWidth", "borderEndWidth", "gap", "rowGap", "columnGap"]; type RemKey = typeof REM_KEYS_ARRAY[number]; /** * Represents a value expressed in `rem` units. * * Example: * ```ts * "1rem" * "0.5rem" * "-2rem" * ``` */ type RemValue = `${number}rem`; /** * Augments a style type to allow `rem` values for specific properties. * * Only keys listed in {@link RemKey} will accept `rem` values in addition * to their original type. * * @typeParam T - The base style object type (e.g. `ViewStyle`, `TextStyle`) * * @example * ```ts * type MyStyle = WithRem; * * const style: MyStyle = { * width: "10rem", // ✅ allowed * opacity: "1rem", // ❌ not allowed (not in REM_KEYS) * }; * ``` * * @remarks * - This type does **not** perform any runtime transformation * - `rem` values are resolved at runtime by the `processRem` pipeline */ type WithRem = { [K in keyof T]: K extends RemKey ? T[K] | RemValue : T[K]; }; /** * Represents a color in the OKLCH color space. * * Components: * - `l` — Lightness (`0` to `1`) * - `c` — Chroma (color intensity/saturation) * - `h` — Hue angle in degrees (`0`–`360`) * - `alpha` — Opacity (`0` to `1`, defaults to `1`) * * @remarks * - Values are stored in their native OKLCH form and resolved at runtime * by the color processing pipeline. * - On web platforms, colors are emitted as native CSS `oklch(...)` values. * - On native platforms, colors are converted to sRGB hexadecimal strings. * * @example * ```ts * const color: OklchColor = { * __type: 'oklch', * l: 0.65, * c: 0.12, * h: 348, * alpha: 1, * }; * ``` * * @example * ```ts * const { oklch } = Colors; * const accent = oklch(0.65, 0.12, 348); * ``` */ interface OklchColor { /** Internal discriminator used for color detection and processing. */ readonly __type: 'oklch'; /** Perceived lightness, from `0` (black) to `1` (white). */ l: number; /** Colorfulness (chroma). Higher values produce more vivid colors. */ c: number; /** Hue angle in degrees, typically in the range `0–360`. */ h: number; /** Opacity, from `0` (fully transparent) to `1` (fully opaque). */ alpha: number; } /** * Represents a color in the RGB color space. * * Components: * - `r` — Red channel (`0` to `255`) * - `g` — Green channel (`0` to `255`) * - `b` — Blue channel (`0` to `255`) * - `alpha` — Opacity (`0` to `1`, defaults to `1`) * * @remarks * - Values are emitted as RGB or RGBA strings depending on opacity * - Both web and native platforms support this format natively * * @example * ```ts * const { rgb } = Colors; * const white = rgb(255, 255, 255); * const transparent = rgb(0, 0, 0, 0.5); * ``` */ interface RGBColor { /** Internal discriminator used for color detection and processing. */ readonly __type: 'rgb'; /** Red channel, from `0` to `255`. */ r: number; /** Green channel, from `0` to `255`. */ g: number; /** Blue channel, from `0` to `255`. */ b: number; /** Opacity, from `0` (fully transparent) to `1` (fully opaque). */ alpha: number; } /** * Represents a color in the HSL color space. * * Components: * - `h` — Hue angle in degrees (`0`–`360`) * - `s` — Saturation (`0` to `100`) * - `l` — Lightness (`0` to `100`) * - `alpha` — Opacity (`0` to `1`, defaults to `1`) * * @remarks * - Values are emitted as HSL or HSLA strings depending on opacity * - Both web and native platforms support this format natively * * @example * ```ts * const { hsl } = Colors; * const red = hsl(0, 100, 50); * const transparent = hsl(120, 100, 50, 0.5); * ``` */ interface HSLColor { /** Internal discriminator used for color detection and processing. */ readonly __type: 'hsl'; /** Hue angle in degrees, typically in the range `0–360`. */ h: number; /** Saturation percentage, from `0` to `100`. */ s: number; /** Lightness percentage, from `0` to `100`. */ l: number; /** Opacity, from `0` (fully transparent) to `1` (fully opaque). */ alpha: number; } /** * Represents a color in the HWB color space. * * Components: * - `h` — Hue angle in degrees (`0`–`360`) * - `w` — Whiteness (`0` to `100`) * - `b` — Blackness (`0` to `100`) * - `alpha` — Opacity (`0` to `1`, defaults to `1`) * * @remarks * - Values are emitted as HWB or HWBA strings depending on opacity * - Both web and native platforms support this format natively * * @example * ```ts * const { hwb } = Colors; * const navyBlue = hwb(240, 0, 33); * const transparent = hwb(0, 20, 20, 0.5); * ``` */ interface HWBColor { /** Internal discriminator used for color detection and processing. */ readonly __type: 'hwb'; /** Hue angle in degrees, typically in the range `0–360`. */ h: number; /** Whiteness percentage, from `0` to `100`. */ w: number; /** Blackness percentage, from `0` to `100`. */ b: number; /** Opacity, from `0` (fully transparent) to `1` (fully opaque). */ alpha: number; } /** * Shorthand property for margin/padding with x and y variants. * * Supports: * - `x`: Applies to left and right * - `y`: Applies to top and bottom * - Individual directions: `top`, `bottom`, `left`, `right`, `start`, `end` * - Logical directions: `inline`, `inlineStart`, `inlineEnd`, `block`, `blockStart`, `blockEnd` * - Aliases: `horizontal`, `vertical` */ type SpacingShorthand = { x?: T; y?: T; start?: T; end?: T; inline?: T; inlineStart?: T; inlineEnd?: T; block?: T; blockStart?: T; blockEnd?: T; top?: T; bottom?: T; left?: T; right?: T; horizontal?: T; vertical?: T; }; /** * Shorthand property for border radius. * * Supports: * - Individual corners: `topLeft`, `topRight`, `bottomLeft`, `bottomRight` * - Logical corners: `topStart`, `topEnd`, `bottomStart`, `bottomEnd` * - Sides: `top`, `bottom`, `left`, `right`, `start`, `end` */ type BorderRadiusShorthand = { topLeft?: T; topRight?: T; bottomLeft?: T; bottomRight?: T; topStart?: T; topEnd?: T; bottomStart?: T; bottomEnd?: T; top?: T; bottom?: T; left?: T; right?: T; start?: T; end?: T; }; /** * Shorthand property for gap (flexbox gap). * * Supports: * - `row`: Sets row gap * - `column`: Sets column gap */ type GapShorthand = { row?: T; column?: T; }; /** * Shorthand property for inset (positioning). * * Supports: * - `x`: Applies to left and right * - `y`: Applies to top and bottom * - Individual directions: `top`, `bottom`, `left`, `right`, `start`, `end` * - Logical directions: `inline`, `inlineStart`, `inlineEnd`, `block`, `blockStart`, `blockEnd` * - Aliases: `horizontal`, `vertical` */ type InsetShorthand = { x?: T; y?: T; start?: T; end?: T; inline?: T; inlineStart?: T; inlineEnd?: T; block?: T; blockStart?: T; blockEnd?: T; top?: T; bottom?: T; left?: T; right?: T; horizontal?: T; vertical?: T; }; type ShorthandPropertyKey = 'margin' | 'padding' | 'inset' | 'borderRadius' | 'gap'; type ExpandSpacingShorthand = (T extends { x?: infer V; } ? { marginLeft?: V; marginRight?: V; } : {}) & (T extends { y?: infer V; } ? { marginTop?: V; marginBottom?: V; } : {}) & (T extends { start?: infer V; } ? { marginStart?: V; } : {}) & (T extends { end?: infer V; } ? { marginEnd?: V; } : {}) & (T extends { inline?: infer V; } ? { marginInlineStart?: V; marginInlineEnd?: V; } : {}) & (T extends { inlineStart?: infer V; } ? { marginInlineStart?: V; } : {}) & (T extends { inlineEnd?: infer V; } ? { marginInlineEnd?: V; } : {}) & (T extends { block?: infer V; } ? { marginBlockStart?: V; marginBlockEnd?: V; } : {}) & (T extends { blockStart?: infer V; } ? { marginBlockStart?: V; } : {}) & (T extends { blockEnd?: infer V; } ? { marginBlockEnd?: V; } : {}) & (T extends { top?: infer V; } ? { marginTop?: V; } : {}) & (T extends { bottom?: infer V; } ? { marginBottom?: V; } : {}) & (T extends { left?: infer V; } ? { marginLeft?: V; } : {}) & (T extends { right?: infer V; } ? { marginRight?: V; } : {}) & (T extends { horizontal?: infer V; } ? { marginLeft?: V; marginRight?: V; } : {}) & (T extends { vertical?: infer V; } ? { marginTop?: V; marginBottom?: V; } : {}); type ExpandPaddingShorthand = (T extends { x?: infer V; } ? { paddingLeft?: V; paddingRight?: V; } : {}) & (T extends { y?: infer V; } ? { paddingTop?: V; paddingBottom?: V; } : {}) & (T extends { start?: infer V; } ? { paddingStart?: V; } : {}) & (T extends { end?: infer V; } ? { paddingEnd?: V; } : {}) & (T extends { inline?: infer V; } ? { paddingInlineStart?: V; paddingInlineEnd?: V; } : {}) & (T extends { inlineStart?: infer V; } ? { paddingInlineStart?: V; } : {}) & (T extends { inlineEnd?: infer V; } ? { paddingInlineEnd?: V; } : {}) & (T extends { block?: infer V; } ? { paddingBlockStart?: V; paddingBlockEnd?: V; } : {}) & (T extends { blockStart?: infer V; } ? { paddingBlockStart?: V; } : {}) & (T extends { blockEnd?: infer V; } ? { paddingBlockEnd?: V; } : {}) & (T extends { top?: infer V; } ? { paddingTop?: V; } : {}) & (T extends { bottom?: infer V; } ? { paddingBottom?: V; } : {}) & (T extends { left?: infer V; } ? { paddingLeft?: V; } : {}) & (T extends { right?: infer V; } ? { paddingRight?: V; } : {}) & (T extends { horizontal?: infer V; } ? { paddingLeft?: V; paddingRight?: V; } : {}) & (T extends { vertical?: infer V; } ? { paddingTop?: V; paddingBottom?: V; } : {}); type ExpandInsetShorthand = (T extends { x?: infer V; } ? { left?: V; right?: V; } : {}) & (T extends { y?: infer V; } ? { top?: V; bottom?: V; } : {}) & (T extends { start?: infer V; } ? { start?: V; } : {}) & (T extends { end?: infer V; } ? { end?: V; } : {}) & (T extends { inline?: infer V; } ? { insetInlineStart?: V; insetInlineEnd?: V; } : {}) & (T extends { inlineStart?: infer V; } ? { insetInlineStart?: V; } : {}) & (T extends { inlineEnd?: infer V; } ? { insetInlineEnd?: V; } : {}) & (T extends { block?: infer V; } ? { insetBlockStart?: V; insetBlockEnd?: V; } : {}) & (T extends { blockStart?: infer V; } ? { insetBlockStart?: V; } : {}) & (T extends { blockEnd?: infer V; } ? { insetBlockEnd?: V; } : {}) & (T extends { top?: infer V; } ? { top?: V; } : {}) & (T extends { bottom?: infer V; } ? { bottom?: V; } : {}) & (T extends { left?: infer V; } ? { left?: V; } : {}) & (T extends { right?: infer V; } ? { right?: V; } : {}) & (T extends { horizontal?: infer V; } ? { left?: V; right?: V; } : {}) & (T extends { vertical?: infer V; } ? { top?: V; bottom?: V; } : {}); type ExpandBorderRadiusShorthand = (T extends { topLeft?: infer V; } ? { borderTopLeftRadius?: V; } : {}) & (T extends { topRight?: infer V; } ? { borderTopRightRadius?: V; } : {}) & (T extends { bottomLeft?: infer V; } ? { borderBottomLeftRadius?: V; } : {}) & (T extends { bottomRight?: infer V; } ? { borderBottomRightRadius?: V; } : {}) & (T extends { topStart?: infer V; } ? { borderTopStartRadius?: V; } : {}) & (T extends { topEnd?: infer V; } ? { borderTopEndRadius?: V; } : {}) & (T extends { bottomStart?: infer V; } ? { borderBottomStartRadius?: V; } : {}) & (T extends { bottomEnd?: infer V; } ? { borderBottomEndRadius?: V; } : {}) & (T extends { top?: infer V; } ? { borderTopLeftRadius?: V; borderTopRightRadius?: V; } : {}) & (T extends { bottom?: infer V; } ? { borderBottomLeftRadius?: V; borderBottomRightRadius?: V; } : {}) & (T extends { left?: infer V; } ? { borderTopLeftRadius?: V; borderBottomLeftRadius?: V; } : {}) & (T extends { right?: infer V; } ? { borderTopRightRadius?: V; borderBottomRightRadius?: V; } : {}) & (T extends { start?: infer V; } ? { borderTopStartRadius?: V; borderBottomStartRadius?: V; } : {}) & (T extends { end?: infer V; } ? { borderTopEndRadius?: V; borderBottomEndRadius?: V; } : {}); type ExpandGapShorthand = (T extends { row?: infer V; } ? { rowGap?: V; } : {}) & (T extends { column?: infer V; } ? { columnGap?: V; } : {}); type KeepShorthandNonObject = [ Exclude ] extends [never] ? {} : { [K in Prop]: ResolveShorthandObject>; }; type ExpandShorthandProps = (T extends { margin: infer M; } ? ExpandSpacingShorthand>> : {}) & (T extends { padding: infer P; } ? ExpandPaddingShorthand>> : {}) & (T extends { inset: infer I; } ? ExpandInsetShorthand>> : {}) & (T extends { borderRadius: infer B; } ? ExpandBorderRadiusShorthand>> : {}) & (T extends { gap: infer G; } ? ExpandGapShorthand>> : {}); type KeepShorthandProps = (T extends { margin: infer M; } ? KeepShorthandNonObject<'margin', M, SpacingShorthand> : {}) & (T extends { padding: infer P; } ? KeepShorthandNonObject<'padding', P, SpacingShorthand> : {}) & (T extends { inset: infer I; } ? KeepShorthandNonObject<'inset', I, InsetShorthand> : {}) & (T extends { borderRadius: infer B; } ? KeepShorthandNonObject<'borderRadius', B, BorderRadiusShorthand> : {}) & (T extends { gap: infer G; } ? KeepShorthandNonObject<'gap', G, GapShorthand> : {}); type MergeIntersection = { [K in keyof T]: T[K]; }; type ResolveShorthandObject = T extends readonly unknown[] ? { [K in keyof T]: ResolveShorthandObject; } : T extends object ? MergeIntersection<{ [K in keyof T as K extends ShorthandPropertyKey ? never : K]: ResolveShorthandObject; } & KeepShorthandProps & ExpandShorthandProps> : T; type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderTopColor' | 'borderRightColor' | 'borderBottomColor' | 'borderLeftColor' | 'borderStartColor' | 'borderEndColor' | 'borderBlockColor' | 'borderBlockEndColor' | 'borderBlockStartColor' | 'shadowColor' | 'textDecorationColor' | 'textShadowColor' | 'tintColor' | 'overlayColor' | 'outlineColor'; /** Union of all supported color types. */ type SupportedColor = OklchColor | RGBColor | HSLColor | HWBColor; type WithColors = { [K in keyof T]: K extends ColorKeys ? T[K] | SupportedColor : T[K]; }; /** * Allows shorthand properties (margin, padding, etc.) to use custom types * (colors, rem values) in their nested objects. */ type WithShorthands = { [K in keyof T]: K extends 'margin' ? SpacingShorthand | T[K] : K extends 'padding' ? SpacingShorthand | T[K] : K extends 'inset' ? InsetShorthand | T[K] : K extends 'borderRadius' ? BorderRadiusShorthand | T[K] : K extends 'gap' ? GapShorthand | T[K] : T[K]; }; /** * Represents a React Native style object with support for custom extensions: * - `rem` values on supported properties * - OKLCH and other color formats * - Shorthand properties (margin, padding, borderRadius, gap, inset) * * This type extends the built-in React Native style types (`ViewStyle`, * `TextStyle`, and `ImageStyle`) to allow these custom value types. * * @remarks * - Only specific properties accept `rem` values (defined in `REM_KEYS`) * - Only specific properties accept color overrides (defined in `ColorKeys`) * - Only specific properties support shorthand syntax (margin, padding, inset, borderRadius, gap) * - All custom values are resolved to React Native-compatible types at runtime * * Type composition order (important for proper type inference): * 1. WithColors - enables custom color types * 2. WithRem - enables rem units (must wrap shorthand values) * 3. WithShorthands - enables shorthand syntax with proper rem support */ type BaseStyle = WithShorthands>> | WithShorthands>> | WithShorthands>>; /** * Represents a recursively nested style object. * * This allows grouping styles in a hierarchical structure: * * @example * ```ts * const styles = { * container: { * header: { * padding: { x: "1rem", y: "2rem" }, * }, * }, * }; * ``` * * @remarks * - Each leaf node must be a {@link BaseStyle} * - Nested objects are processed recursively by the style system */ type NestedStyles = { [key: string]: BaseStyle | NestedStyles; }; /** * Creates a color in the OKLCH color space. * * OKLCH is a perceptually uniform color model that provides more predictable * lightness and saturation adjustments than RGB, HSL, or HSV. * * @param l - Lightness, from `0` (black) to `1` (white). * @param c - Chroma (color intensity). Higher values produce more vivid colors. * @param h - Hue angle in degrees, typically in the range `0–360`. * @param alpha - Opacity, from `0` (fully transparent) to `1` (fully opaque). * Defaults to `1`. * * @returns An {@link OklchColor} object that can be used in Fluffle style * definitions and will be resolved automatically by the styling pipeline. * * @example * ```ts * const { oklch } = Colors; * * const primary = oklch(0.65, 0.12, 348); * ``` * * @example * ```ts * const overlay = Colors.oklch(0.2, 0, 0, 0.5); * ``` * * @remarks * - On web platforms, colors are emitted as native CSS `oklch(...)` values. * - On native platforms, colors are converted to sRGB hexadecimal strings. * - Values are processed automatically when passed through * {@link StyleSheet.create}. */ declare function oklch(l: number, c: number, h: number, alpha?: number): OklchColor; /** * Creates a color in the RGB color space. * * @param r - Red channel, from `0` to `255`. * @param g - Green channel, from `0` to `255`. * @param b - Blue channel, from `0` to `255`. * @param alpha - Opacity, from `0` (fully transparent) to `1` (fully opaque). * Defaults to `1`. * * @returns An {@link RGBColor} object that can be used in Fluffle style * definitions and will be resolved automatically by the styling pipeline. * * @example * ```ts * const { rgb } = Colors; * * const red = rgb(255, 0, 0); * const transparent = rgb(0, 0, 0, 0.5); * ``` * * @remarks * - Colors are emitted as `rgb(...)` or `rgba(...)` strings depending on opacity. * - Both web and native platforms support this format natively. * - Values are processed automatically when passed through * {@link StyleSheet.create}. */ declare function rgb(r: number, g: number, b: number, alpha?: number): RGBColor; /** * Creates a color in the HSL color space. * * @param h - Hue angle in degrees, typically in the range `0–360`. * @param s - Saturation percentage, from `0` to `100` (do not include the % symbol). * @param l - Lightness percentage, from `0` to `100` (do not include the % symbol). * @param alpha - Opacity, from `0` (fully transparent) to `1` (fully opaque). * Defaults to `1`. * * @returns An {@link HSLColor} object that can be used in Fluffle style * definitions and will be resolved automatically by the styling pipeline. * * @example * ```ts * const { hsl } = Colors; * * const red = hsl(0, 100, 50); * const transparent = hsl(120, 100, 50, 0.5); * ``` * * @remarks * - Colors are emitted as `hsl(...)` or `hsla(...)` strings depending on opacity. * - Both web and native platforms support this format natively. * - Values are processed automatically when passed through * {@link StyleSheet.create}. */ declare function hsl(h: number, s: number, l: number, alpha?: number): HSLColor; /** * Creates a color in the HWB color space. * * @param h - Hue angle in degrees, typically in the range `0–360`. * @param w - Whiteness percentage, from `0` to `100` (do not include the % symbol). * @param b - Blackness percentage, from `0` to `100` (do not include the % symbol). * @param alpha - Opacity, from `0` (fully transparent) to `1` (fully opaque). * Defaults to `1`. * * @returns An {@link HWBColor} object that can be used in Fluffle style * definitions and will be resolved automatically by the styling pipeline. * * @example * ```ts * const { hwb } = Colors; * * const navyBlue = hwb(240, 0, 33); * const transparent = hwb(0, 20, 20, 0.5); * ``` * * @remarks * - Colors are emitted as `hwb(...)` or `hwba(...)` strings depending on opacity. * - Both web and native platforms support this format natively. * - Values are processed automatically when passed through * {@link StyleSheet.create}. */ declare function hwb(h: number, w: number, b: number, alpha?: number): HWBColor; declare const Colors: { oklch: typeof oklch; rgb: typeof rgb; hsl: typeof hsl; hwb: typeof hwb; }; /** * Resolves any supported color type into a React Native-compatible * {@link ColorValue} type. * * @typeParam T - The value to resolve. */ type ResolveColor = T extends OklchColor | RGBColor | HSLColor | HWBColor ? ColorValue : T; /** * Recursively resolves all custom OKLCH color objects within a type. * * Any property whose key is listed in {@link ColorKeys} will have * {@link OklchColor} replaced with React Native's {@link ColorValue}. * * This mirrors the runtime behavior of {@link processColors}, ensuring * that styles returned from the processing pipeline have the correct * React Native color types. * * @typeParam T - The object type to transform. * * @example * ```ts * type Input = { * color: OklchColor; * backgroundColor: OklchColor; * marginTop: number; * }; * * type Output = ResolveColorObject; * // { * // color: ColorValue; * // backgroundColor: ColorValue; * // marginTop: number; * // } * ``` */ type ResolveColorObject = T extends readonly unknown[] ? { [K in keyof T]: ResolveColorObject; } : T extends object ? { [K in keyof T]: K extends ColorKeys ? ResolveColor : ResolveColorObject; } : T; /** Resolves a `rem` string type into a number. */ type ResolveRemValue = T extends `${number}rem` ? number : T; /** Recursively resolves all `rem` values within an object type. */ type ResolveRemObject = T extends OpaqueColorValue ? OpaqueColorValue : T extends readonly unknown[] ? { [K in keyof T]: ResolveRemObject; } : T extends object ? { [K in keyof T]: ResolveRemObject; } : ResolveRemValue; /** A lightweight styling utility built on top of React Native's `StyleSheet`. */ declare namespace StyleSheet { /** Maps style keys to either a base React Native style object or nested styles. */ type NamedStyles = { [P in keyof T]: BaseStyle | NestedStyles; }; /** * Recursively resolves all `rem` values within an object type. * * Converts: * ```ts * { fontSize: "2rem" } * ``` * into: * ```ts * { fontSize: number } * ``` */ type ResolveStyleOutput = ResolveRemObject>>; /** * The returned object is safe to pass directly to React Native components. * All custom extensions (shorthands, colors, rem units) are resolved to standard RN values. */ /** * Creates a style sheet with support for `rem` units. * * This function behaves similarly to React Native's `StyleSheet.create`, * but additionally: * * - Accepts `rem` values (e.g. `"1.5rem"`) * - Converts them to pixel values at runtime * - Returns fully resolved styles (no `rem` strings remain) * * @param styles - An object containing style definitions * @returns A new object with all `rem` values resolved to numbers * * @example * ```ts * const styles = StyleSheet.create({ * text: { * fontSize: "2rem", * marginTop: "1rem", * }, * }); * ``` * * @remarks * * - The returned object is safe to pass directly to React Native components * - This is a runtime transformation (not compile-time) */ export function create>( /** * The extra `& NamedStyles` here helps TypeScript catch typos: e.g., * the following code would not error with `styles: T | NamedStyles` * but would error with `styles: T & NamedStyles`: * * ```ts * StyleSheet.create({ * someComponent: { marginLeft: 1, magrinRight: 1 }, * }); * ``` */ styles: T & NamedStyles): ResolveStyleOutput; export const hairlineWidth: number; export const flatten: typeof StyleSheet$1.flatten; export const absoluteFill: react_native.RegisteredStyle; export { }; } export { type BaseStyle, Colors, type NestedStyles, StyleSheet };