import type { ImageStyle, TextStyle, ViewStyle } from 'react-native'; import type { ColorTokens } from './colors'; import type { ShadowTokens } from './shadow'; /** RN 0.85 strict-api 不再导出 `StyleSheet.NamedStyles`,这里本地保留同名约束: * `{ [k]: ViewStyle | TextStyle | ImageStyle }` —— 给 maker 返回值兜底。 */ type NamedStyles = { [P in keyof T]: ViewStyle | TextStyle | ImageStyle; }; export type StylesMaker> = (c: ColorTokens, s: ShadowTokens) => S; /** maker 产物按 fontScale 缩放字号系属性。factor = 1 时恒等返回**原引用**—— * 未接入 fontScale 的消费方(web 文档站等)行为与引用完全不变。 * 导出仅供单测,不进 barrel。 */ export declare function scaleNamedStyles>(styles: S, factor: unknown): S; /** * 接收 (colors, shadow) => StyleSheet 工厂,返回当前主题对应的 themed StyleSheet, * 并按 ThemeProvider 的 fontScale 缩放字号系属性(fontSize / lineHeight / * letterSpacing;fontScale = 1 时恒等)。 * * 缓存依赖 [colors, shadow, fontScale, maker]。`maker` 必须定义在模块顶层 * (不要写在组件内联),否则引用每次变,缓存失效。ThemeProvider 通过 * useMemo([scheme, fontScale]) 保证主题不变时 colors / shadow 引用稳定。 */ export declare function useThemedStyles>(maker: StylesMaker): S; export {}; //# sourceMappingURL=useThemedStyles.d.ts.map