/** * 平台检测工具 * 用于检测设备特性、系统版本等 */ /** * 设备类型 */ export declare enum DeviceType { PHONE = "phone", TABLET = "tablet", FOLDABLE = "foldable", UNKNOWN = "unknown" } /** * 折叠状态 */ export declare enum FoldState { FOLDED = "folded", UNFOLDED = "unfolded", HALF_FOLDED = "half_folded", UNKNOWN = "unknown" } /** * 设备信息 */ export interface DeviceInfo { type: DeviceType; isTablet: boolean; isFoldable: boolean; screenSize: { width: number; height: number; scale: number; fontScale: number; }; aspectRatio: number; isLandscape: boolean; } /** * 系统版本信息 */ export interface SystemVersion { platform: 'ios' | 'android'; version: number; isAndroid14Plus: boolean; isIOS17Plus: boolean; } /** * 平台检测器类 */ export declare class PlatformDetector { private static deviceInfo; private static systemVersion; /** * 获取系统版本信息 */ static getSystemVersion(): SystemVersion; /** * 获取设备信息 */ static getDeviceInfo(): DeviceInfo; /** * 检测折叠屏设备 */ private static detectFoldable; /** * 检测当前折叠状态(需要原生支持) */ static getFoldState(): FoldState; /** * 是否为 iPad */ static isIPad(): boolean; /** * 是否支持多任务 */ static supportsMultitasking(): boolean; /** * 是否需要 Android 14+ 新权限流程 */ static needsAndroid14Permissions(): boolean; /** * 是否支持 iOS 17+ 新特性 */ static supportsiOS17Features(): boolean; /** * 监听屏幕尺寸变化(折叠屏展开/折叠) */ static addDimensionChangeListener(callback: (info: DeviceInfo) => void): () => void; /** * 重置缓存(用于测试或强制刷新) */ static resetCache(): void; } /** * 便捷的导出函数 */ export declare const isAndroid14Plus: () => boolean; export declare const isiOS17Plus: () => boolean; export declare const isTablet: () => boolean; export declare const isFoldable: () => boolean; export declare const isIPad: () => boolean; //# sourceMappingURL=PlatformDetector.d.ts.map