/** * useSx — converts an `SxProps` value into a React Native `ViewStyle`. * * @param sx The sx prop (object, array, or undefined/null/false). * @param theme The current `Theme` (obtained from `useTheme().theme` by the caller). * @returns A React Native style object, or `undefined` when `sx` is falsy. * * Design decisions (see research.md): * - Zero-allocation fast path: when `sx` is falsy, `undefined` is returned * immediately without any object creation (D5). * - Array notation is supported: falsy items (null, false, undefined) are * filtered out; remaining objects are merged left→right. * - Breakpoints use `useWindowDimensions().width`; resolved once per render * and shared across all responsive properties (xs/sm/md/lg/xl). * - CSS-only properties (pseudo-selectors, @media strings, etc.) are silently * dropped with a `// RN-DEVIATION:` comment. * - The result is memoized on `[sx, viewportWidth]` to avoid re-allocation. * * @example * const sxStyle = useSx(props.sx, theme); * */ import type { ViewStyle } from 'react-native'; import type { SxProps } from '../types/shared'; import type { Theme } from '../theme/types'; /** * Converts `SxProps` to a React Native `ViewStyle` (or `undefined` when falsy). * Memoized on `[sx, viewportWidth]`. */ export declare function useSx(sx: SxProps | undefined, theme: Theme): ViewStyle | undefined; //# sourceMappingURL=useSx.d.ts.map