import * as i0 from '@angular/core'; import { InjectionToken, Signal, EnvironmentProviders } from '@angular/core'; import * as ngwr_media from 'ngwr/media'; /** Named breakpoint identifiers — match the SCSS `_breakpoints.scss` keys. */ type WrBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; /** Map of breakpoint → minimum viewport width in pixels. */ type WrBreakpointMap = Readonly>; /** Defaults mirror `projects/lib/styles/_breakpoints.scss`. */ declare const DEFAULT_WR_BREAKPOINTS: WrBreakpointMap; /** DI token for the breakpoint map — override via {@link provideWrMedia}. */ declare const WR_BREAKPOINTS: InjectionToken>>; /** * Reactive viewport queries backed by signals. * * Each query subscribes lazily — `matches(...)` caches its signal so * repeated calls with the same query share a single `matchMedia` listener. * SSR-safe: on the server every signal stays `false`. * * @example * ```ts * private readonly media = inject(WrMedia); * protected readonly isMd = this.media.matches('md'); * protected readonly isWide = this.media.matches('(min-width: 1200px)'); * ``` * * @see https://ngwr.dev/services/media */ declare class WrMedia { private readonly breakpoints; private readonly destroyRef; private readonly isBrowser; /** Cache of query → signal so we share `matchMedia` listeners. */ private readonly cache; /** Active breakpoint key — `xs` / `sm` / `md` / `lg` / `xl` / `xxl`. */ readonly current: Signal; /** * Returns a signal that tracks the given query. * * - Named breakpoint (`'md'`) → `(min-width: )`. * - Raw query (`'(prefers-color-scheme: dark)'`) → passed through unchanged. */ matches(query: WrBreakpoint | (string & {})): Signal; private resolveQuery; private createSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Override the breakpoint map used by {@link WrMedia}. Partial maps * are merged with {@link DEFAULT_WR_BREAKPOINTS}, so you only need to list * the breakpoints you want to change. * * @example * ```ts * bootstrapApplication(AppComponent, { * providers: [provideWrMedia({ md: 720, lg: 1024 })], * }); * ``` */ declare function provideWrMedia(breakpoints?: Partial): EnvironmentProviders; export { DEFAULT_WR_BREAKPOINTS, WR_BREAKPOINTS, WrMedia, provideWrMedia }; export type { WrBreakpoint, WrBreakpointMap };