/*! * Copyright (c) 2025 Akshat Kotpalliwar (alias IntegerAlex on GitHub) * This software is licensed under the GNU Lesser General Public License (LGPL) v3 or later. * * You are free to use, modify, and redistribute this software, but modifications must also be licensed under the LGPL. * This project is distributed without any warranty; see the LGPL for more details. * * For a full copy of the LGPL and ethical contribution guidelines, please refer to the `COPYRIGHT.md` and `NOTICE.md` files. */ /** * Represents a single detection signal used in device type classification. */ export interface DeviceTypeSignal { name: string; value: any; weight: number; detected: boolean; } /** * Result of multi-signal device type detection. */ export interface DeviceTypeInfo { type: 'mobile' | 'tablet' | 'desktop' | 'tv' | 'unknown'; confidence: number; signals: DeviceTypeSignal[]; method: string; } /** * Detects the device type using a multi-signal fusion approach. * * Combines User-Agent Client Hints, Bowser UA parsing, screen characteristics, * touch/pointer analysis, CSS media queries, hardware patterns, behavioural * heuristics, and UA pattern fallback to produce a confident classification. * * @returns A DeviceTypeInfo object with the detected device type, confidence * score, individual signals, and the primary detection method. */ export declare function detectDeviceType(): DeviceTypeInfo;