/** * Reactive network status. * * Provides a reactive signal tracking the browser's network connectivity * and connection quality via the Network Information API. * * @module bquery/media */ import type { NetworkSignal } from './types'; /** * Returns a reactive signal tracking network connectivity and quality. * * Tracks whether the browser is online/offline and, where supported, * the effective connection type, downlink speed, and round-trip time * via the Network Information API. * * @returns A readonly reactive signal with `{ online, effectiveType, downlink, rtt }` * and a `destroy()` method to remove attached listeners * * @example * ```ts * import { useNetworkStatus } from '@bquery/bquery/media'; * import { effect } from '@bquery/bquery/reactive'; * * const net = useNetworkStatus(); * effect(() => { * if (!net.value.online) { * console.warn('You are offline!'); * } * console.log(`Connection: ${net.value.effectiveType}, RTT: ${net.value.rtt}ms`); * }); * ``` */ export declare const useNetworkStatus: () => NetworkSignal; //# sourceMappingURL=network.d.ts.map