/** * db-rn-ui Runtime 类型定义 * * 运行时适配器的类型支持 */ import type { ComponentType, FC, ReactNode } from 'react'; import type { ViewStyle, TextStyle, ViewProps, TextProps } from 'react-native'; export interface BaseComponentProps { style?: ViewStyle; children?: ReactNode; } export type DbRnUIModule = Record | FC>; export interface RuntimeConfig { /** 是否强制使用本地导入(忽略全局变量) */ forceLocal?: boolean; /** 自定义全局变量名称 */ globalName?: string; /** 是否在组件不存在时抛出错误 */ strictMode?: boolean; } export type { ViewStyle, TextStyle, ViewProps, TextProps, }; /** * 使用运行时适配器的类型: * * import { DbButton, DbTag } from 'db-rn-ui/runtime'; * import type { BaseComponentProps } from 'db-rn-ui/runtime'; * * // 组件 Props 类型可以从原始库导入 * import type { DbButtonProps } from 'db-rn-ui'; */