ngx-mq 2.11.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-mq.mjs","sources":["../../src/lib/constants.ts","../../src/lib/tokens.ts","../../src/lib/utils/breakpoints.utils.ts","../../src/lib/mql-registry/mql-registry.listeners.ts","../../src/lib/mql-registry/mql-registry.ts","../../src/lib/mql-registry/mql-registry.extensions.ts","../../src/lib/core.ts","../../src/lib/utils/common.utils.ts","../../src/lib/api.ts","../../src/lib/providers.ts","../../src/ngx-mq.ts"],"sourcesContent":["import { MqBreakpoints } from './models';\n\nexport const TAILWIND_BREAKPOINTS: MqBreakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\nexport const BOOTSTRAP_BREAKPOINTS: MqBreakpoints = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400,\n};\n\nexport const MATERIAL_BREAKPOINTS: MqBreakpoints = {\n sm: 600,\n md: 905,\n lg: 1240,\n xl: 1440,\n};\n\nexport const DEFAULT_BREAKPOINT_EPSILON: number = 0.02;\n","import { InjectionToken } from '@angular/core';\nimport { DEFAULT_BREAKPOINT_EPSILON } from './constants';\nimport { MqBreakpoints } from './models';\n\nexport const MQ_BREAKPOINTS: InjectionToken<MqBreakpoints> = new InjectionToken('MQ_BREAKPOINTS');\n\nexport const MQ_BREAKPOINT_EPSILON: InjectionToken<number> = new InjectionToken('MQ_BREAKPOINT_EPSILON', {\n providedIn: 'root',\n factory: () => DEFAULT_BREAKPOINT_EPSILON,\n});\n\nexport const NGX_MQ_SSR_VALUE: InjectionToken<boolean> = new InjectionToken('NGX_MQ_SSR_VALUE', {\n providedIn: 'root',\n factory: () => false,\n});\n","import { inject, isDevMode } from '@angular/core';\nimport { MQ_BREAKPOINT_EPSILON, MQ_BREAKPOINTS } from '../tokens';\nimport { MqBreakpoints } from '../models';\n\nfunction assertBreakpointsProvided(): MqBreakpoints {\n const breakpoints: MqBreakpoints | null = inject(MQ_BREAKPOINTS, { optional: true });\n\n if (isDevMode() && !breakpoints) {\n throw new Error(\n '[ngx-mq]: No breakpoints provided.\\n' +\n 'Please configure your app with provideBreakpoints(), ' +\n 'or use one of the built-in presets: ' +\n 'provideTailwindBreakpoints(), provideBootstrapBreakpoints(), provideMaterialBreakpoints().'\n );\n }\n\n return breakpoints!;\n}\n\nfunction assertBreakpointExists(bp: string, breakpoints: MqBreakpoints): number {\n if (isDevMode() && !(bp in breakpoints)) {\n throw new Error(\n `[ngx-mq]: Breakpoint \"${bp}\" not found in provided configuration.\\n` +\n `Available breakpoints: ${Object.keys(breakpoints).join(', ')}.`\n );\n }\n\n return breakpoints[bp];\n}\n\nexport function resolveBreakpoint(bp: string): number {\n const breakpoints: MqBreakpoints = assertBreakpointsProvided();\n\n return assertBreakpointExists(bp, breakpoints);\n}\n\nexport function normalizeBreakpoints(bps: MqBreakpoints): Readonly<MqBreakpoints> {\n const out: Record<string, number> = {};\n\n for (const [rawKey, value] of Object.entries(bps)) {\n const key = rawKey.trim();\n\n if (isDevMode()) {\n if (!Number.isFinite(value)) {\n throw new Error(`[ngx-mq] Breakpoint \"${key}\" must be a finite number, got ${value}.`);\n }\n\n if (value <= 0) {\n throw new Error(`[ngx-mq] Breakpoint \"${key}\" must be > 0, got ${value}.`);\n }\n }\n\n out[key] = value;\n }\n\n return Object.freeze(out);\n}\n\nexport function validateEpsilon(epsilon: number): void {\n if (!Number.isFinite(epsilon) || epsilon <= 0 || epsilon > 1) {\n throw new Error(`[ngx-mq] Epsilon must be in (0, 1]. Got: ${epsilon}`);\n }\n}\n\nexport function applyMaxEpsilon(value: number): number {\n const epsilon: number = inject(MQ_BREAKPOINT_EPSILON, { optional: true }) ?? 0.02;\n\n return value - epsilon;\n}\n","export function addChangeListenerToMql(mql: MediaQueryList, onChange: (event?: MediaQueryListEvent) => void): void {\n if (typeof mql.addEventListener === 'function') {\n // Modern browsers\n mql.addEventListener('change', onChange);\n } else {\n // Legacy fallback (Safari < 14)\n (mql as any).addListener(onChange);\n }\n}\n\nexport function removeChangeListenerFromMql(\n mql: MediaQueryList,\n onChange: (event?: MediaQueryListEvent) => void\n): void {\n if (typeof mql.removeEventListener === 'function') {\n // Modern browsers\n mql.removeEventListener('change', onChange);\n } else {\n // Legacy fallback (Safari < 14)\n (mql as any).removeListener(onChange);\n }\n}\n","import { signal as createSignal, Signal, WritableSignal } from '@angular/core';\nimport { addChangeListenerToMql, removeChangeListenerFromMql } from './mql-registry.listeners';\nimport { MqlRegistry, MqRetainToken, MqHandle } from './mql-registry.models';\n\nconst REGISTRY_KEY: symbol = Symbol.for('ngx-mq:mql-registry');\n\nconst getRegistry = (): MqlRegistry => {\n const realmGlobal: Record<PropertyKey, unknown> = globalThis;\n\n return (realmGlobal[REGISTRY_KEY] ??= new Map()) as MqlRegistry;\n};\n\nconst createMqHandle = (query: string): MqHandle => {\n const mql: MediaQueryList = matchMedia(query);\n const signal: WritableSignal<boolean> = createSignal(mql.matches, { debugName: `ngx-mq: ${query}` });\n\n const onChange = (event?: MediaQueryListEvent) => signal.set(event?.matches ?? mql.matches);\n\n addChangeListenerToMql(mql, onChange);\n\n return { mql, signal, onChange, retainers: new Set() };\n};\n\nexport function retain(query: string, token: MqRetainToken, ssrValue: boolean): Signal<boolean> {\n // SSR mode\n if (typeof globalThis.matchMedia !== 'function') {\n return createSignal(ssrValue).asReadonly();\n }\n\n const registry: MqlRegistry = getRegistry();\n\n let handle: MqHandle | undefined = registry.get(query);\n\n if (!handle) {\n handle = createMqHandle(query);\n registry.set(query, handle);\n }\n\n handle.retainers.add(token);\n\n return handle.signal.asReadonly();\n}\n\nexport function release(query: string, token: MqRetainToken): boolean {\n const registry: MqlRegistry = getRegistry();\n\n let handle: MqHandle | undefined = registry.get(query);\n\n if (!handle) return false;\n\n const removed: boolean = handle.retainers.delete(token);\n\n if (handle.retainers.size === 0) {\n removeChangeListenerFromMql(handle.mql, handle.onChange);\n registry.delete(query);\n }\n\n return removed;\n}\n\n/* @internal\n * Returns the current registry (used only in tests).\n */\nexport function _getRegistry(): MqlRegistry {\n return getRegistry();\n}\n\n/* @internal\n * Clears all registry entries and removes media-query listeners.\n */\nexport function _resetRegistry(): void {\n const registry: MqlRegistry = getRegistry();\n\n registry.forEach((handle: MqHandle) => {\n removeChangeListenerFromMql(handle.mql, handle.onChange);\n });\n\n registry.clear();\n}\n","import { DestroyRef, inject, Signal } from '@angular/core';\nimport { retain, release } from './mql-registry';\n\nexport function retainUntilDestroy(query: string, ssrValue: boolean): Signal<boolean> {\n const destroyRef: DestroyRef = inject(DestroyRef);\n\n const querySignal: Signal<boolean> = retain(query, destroyRef, ssrValue);\n\n destroyRef.onDestroy(() => release(query, destroyRef));\n\n return querySignal;\n}\n","import { isDevMode, Signal, inject } from '@angular/core';\nimport { createComputed, SIGNAL } from '@angular/core/primitives/signals';\nimport { retainUntilDestroy } from './mql-registry';\nimport { CreateMediaQueryOptions } from './models';\nimport { NGX_MQ_SSR_VALUE } from './tokens';\n\nexport function createConsumer(query: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n const defaultSsrValue: boolean = inject(NGX_MQ_SSR_VALUE);\n const effectiveSsrValue: boolean = options?.ssrValue ?? defaultSsrValue;\n\n const querySignal: Signal<boolean> = retainUntilDestroy(query, effectiveSsrValue);\n\n const getter = createComputed(() => querySignal());\n\n if (isDevMode()) {\n getter[SIGNAL].debugName = options?.debugName;\n }\n\n return getter satisfies Signal<boolean>;\n}\n\nexport function createConsumerLabel(descriptor: string): string {\n return `[NgxMq Signal: ${descriptor}]`;\n}\n","export function normalizeQuery(value: string): string {\n return value.trim().replace(/\\s+/g, ' ').toLowerCase();\n}\n","import { assertInInjectionContext, isDevMode, Signal } from '@angular/core';\nimport { applyMaxEpsilon, resolveBreakpoint } from './utils/breakpoints.utils';\nimport { CreateMediaQueryOptions, DisplayModeOption } from './models';\nimport { createConsumer, createConsumerLabel } from './core';\nimport { normalizeQuery } from './utils/common.utils';\n\nexport function up(bp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(up);\n\n const query: string = normalizeQuery(`(min-width: ${resolveBreakpoint(bp)}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`up(${bp})`);\n\n return consumer;\n}\n\nexport function down(bp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(down);\n\n const query: string = normalizeQuery(`(max-width: ${applyMaxEpsilon(resolveBreakpoint(bp))}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`down(${bp})`);\n\n return consumer;\n}\n\nexport function between(minBp: string, maxBp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(between);\n\n const minPx: number = resolveBreakpoint(minBp);\n const maxPx: number = resolveBreakpoint(maxBp);\n const query: string = normalizeQuery(`(min-width: ${minPx}px) and (max-width: ${applyMaxEpsilon(maxPx)}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`between(${minBp}, ${maxBp})`);\n\n return consumer;\n}\n\nexport function orientation(value: 'portrait' | 'landscape', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(orientation);\n\n const query: string = normalizeQuery(`(orientation: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`orientation(${value})`);\n\n return consumer;\n}\n\nexport function colorScheme(value: 'light' | 'dark', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(colorScheme);\n\n const query: string = normalizeQuery(`(prefers-color-scheme: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`colorScheme(${value})`);\n\n return consumer;\n}\n\nexport function displayMode(value: DisplayModeOption, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(displayMode);\n\n const query = normalizeQuery(`(display-mode: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`displayMode(${value})`);\n\n return consumer;\n}\n\nexport function reducedMotion(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(reducedMotion);\n\n const query: string = normalizeQuery('(prefers-reduced-motion: reduce)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('reducedMotion');\n\n return consumer;\n}\n\nexport function hover(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(hover);\n\n const query: string = normalizeQuery('(hover: hover)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('hover');\n\n return consumer;\n}\n\nexport function anyHover(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(anyHover);\n\n const query: string = normalizeQuery('(any-hover: hover)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('anyHover');\n\n return consumer;\n}\n\nexport function pointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(pointer);\n\n const query: string = normalizeQuery(`(pointer: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`pointer(${value})`);\n\n return consumer;\n}\n\nexport function anyPointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(anyPointer);\n\n const query: string = normalizeQuery(`(any-pointer: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`anyPointer(${value})`);\n\n return consumer;\n}\n\nexport function colorGamut(value: 'srgb' | 'p3' | 'rec2020', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(colorGamut);\n\n const query: string = normalizeQuery(`(color-gamut: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`colorGamut(${value})`);\n\n return consumer;\n}\n\nexport function matchMediaSignal(query: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(matchMediaSignal);\n\n const media: string = normalizeQuery(query);\n const consumer: Signal<boolean> = createConsumer(media, options);\n\n consumer.toString = () => createConsumerLabel(`matchMediaSignal(${query})`);\n\n return consumer;\n}\n","import { isDevMode, Provider } from '@angular/core';\nimport { MQ_BREAKPOINT_EPSILON, MQ_BREAKPOINTS, NGX_MQ_SSR_VALUE } from './tokens';\nimport { normalizeBreakpoints, validateEpsilon } from './utils/breakpoints.utils';\nimport { MqBreakpoints } from './models';\nimport {\n BOOTSTRAP_BREAKPOINTS,\n DEFAULT_BREAKPOINT_EPSILON,\n MATERIAL_BREAKPOINTS,\n TAILWIND_BREAKPOINTS,\n} from './constants';\n\nexport function provideBreakpoints(bps: MqBreakpoints): Provider {\n return { provide: MQ_BREAKPOINTS, useValue: normalizeBreakpoints(bps) };\n}\n\nexport function provideTailwindBreakpoints(): Provider {\n return provideBreakpoints(TAILWIND_BREAKPOINTS);\n}\n\nexport function provideBootstrapBreakpoints(): Provider {\n return provideBreakpoints(BOOTSTRAP_BREAKPOINTS);\n}\n\nexport function provideMaterialBreakpoints(): Provider {\n return provideBreakpoints(MATERIAL_BREAKPOINTS);\n}\n\nexport function provideBreakpointEpsilon(epsilon: number = DEFAULT_BREAKPOINT_EPSILON): Provider {\n if (isDevMode()) validateEpsilon(epsilon);\n\n return { provide: MQ_BREAKPOINT_EPSILON, useValue: epsilon };\n}\n\nexport function provideSsrValue(value: boolean): Provider {\n return { provide: NGX_MQ_SSR_VALUE, useValue: value };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["signal","createSignal"],"mappings":";;;AAE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ry/mql-registry.listeners.ts","../../src/lib/mql-registry/mql-registry.ts","../../src/lib/mql-registry/mql-registry.extensions.ts","../../src/lib/core.ts","../../src/lib/utils/common.utils.ts","../../src/lib/api.ts","../../src/lib/composition.ts","../../src/lib/providers.ts","../../src/index.ts","../../src/ngx-mq.ts"],"sourcesContent":["import { MqBreakpoints } from './models';\n\nexport const TAILWIND_BREAKPOINTS: MqBreakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\nexport const BOOTSTRAP_BREAKPOINTS: MqBreakpoints = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400,\n};\n\nexport const MATERIAL_BREAKPOINTS: MqBreakpoints = {\n sm: 600,\n md: 905,\n lg: 1240,\n xl: 1440,\n};\n\nexport const DEFAULT_BREAKPOINT_EPSILON: number = 0.02;\n","import { InjectionToken } from '@angular/core';\nimport { DEFAULT_BREAKPOINT_EPSILON } from './constants';\nimport { MqBreakpoints } from './models';\n\n/**\n * Holds the active {@link MqBreakpoints} map. Has no default: configure it with\n * {@link provideBreakpoints} or a preset. Inject it to read breakpoints directly.\n *\n * @category Injection Tokens\n */\nexport const MQ_BREAKPOINTS: InjectionToken<MqBreakpoints> = new InjectionToken('MQ_BREAKPOINTS');\n\n/**\n * Holds the epsilon used for exclusive upper bounds. Set it with\n * {@link provideBreakpointEpsilon}; defaults to `0.02`.\n *\n * @category Injection Tokens\n */\nexport const MQ_BREAKPOINT_EPSILON: InjectionToken<number> = new InjectionToken('MQ_BREAKPOINT_EPSILON', {\n providedIn: 'root',\n factory: () => DEFAULT_BREAKPOINT_EPSILON,\n});\n\n/**\n * Holds the value query signals report during SSR. Set it with\n * {@link provideSsrValue}; defaults to `false`.\n *\n * @category Injection Tokens\n */\nexport const NGX_MQ_SSR_VALUE: InjectionToken<boolean> = new InjectionToken('NGX_MQ_SSR_VALUE', {\n providedIn: 'root',\n factory: () => false,\n});\n","import { inject, isDevMode } from '@angular/core';\nimport { MQ_BREAKPOINT_EPSILON, MQ_BREAKPOINTS } from '../tokens';\nimport { MqBreakpoints } from '../models';\n\nfunction assertBreakpointsProvided(): MqBreakpoints {\n const breakpoints: MqBreakpoints | null = inject(MQ_BREAKPOINTS, { optional: true });\n\n if (isDevMode() && !breakpoints) {\n throw new Error(\n '[ngx-mq]: No breakpoints provided.\\n' +\n 'Please configure your app with provideBreakpoints(), ' +\n 'or use one of the built-in presets: ' +\n 'provideTailwindBreakpoints(), provideBootstrapBreakpoints(), provideMaterialBreakpoints().'\n );\n }\n\n return breakpoints!;\n}\n\nfunction assertBreakpointExists(bp: string, breakpoints: MqBreakpoints): number {\n if (isDevMode() && !(bp in breakpoints)) {\n throw new Error(\n `[ngx-mq]: Breakpoint \"${bp}\" not found in provided configuration.\\n` +\n `Available breakpoints: ${Object.keys(breakpoints).join(', ')}.`\n );\n }\n\n return breakpoints[bp];\n}\n\nexport function resolveBreakpoint(bp: string): number {\n const breakpoints: MqBreakpoints = assertBreakpointsProvided();\n\n return assertBreakpointExists(bp.trim(), breakpoints);\n}\n\nexport function normalizeBreakpoints(bps: MqBreakpoints): Readonly<MqBreakpoints> {\n const out: Record<string, number> = {};\n\n for (const [rawKey, value] of Object.entries(bps)) {\n const key = rawKey.trim();\n\n if (isDevMode()) {\n if (!Number.isFinite(value)) {\n throw new Error(`[ngx-mq] Breakpoint \"${key}\" must be a finite number, got ${value}.`);\n }\n\n if (value <= 0) {\n throw new Error(`[ngx-mq] Breakpoint \"${key}\" must be > 0, got ${value}.`);\n }\n }\n\n out[key] = value;\n }\n\n return Object.freeze(out);\n}\n\nexport function validateEpsilon(epsilon: number): void {\n if (!Number.isFinite(epsilon) || epsilon <= 0 || epsilon > 1) {\n throw new Error(`[ngx-mq] Epsilon must be in (0, 1]. Got: ${epsilon}`);\n }\n}\n\nexport function applyMaxEpsilon(value: number): number {\n const epsilon: number = inject(MQ_BREAKPOINT_EPSILON);\n\n return value - epsilon;\n}\n","export function addChangeListenerToMql(mql: MediaQueryList, onChange: (event?: MediaQueryListEvent) => void): void {\n if (typeof mql.addEventListener === 'function') {\n // Modern browsers\n mql.addEventListener('change', onChange);\n } else {\n // Legacy fallback (Safari < 14)\n (mql as any).addListener(onChange);\n }\n}\n\nexport function removeChangeListenerFromMql(\n mql: MediaQueryList,\n onChange: (event?: MediaQueryListEvent) => void\n): void {\n if (typeof mql.removeEventListener === 'function') {\n // Modern browsers\n mql.removeEventListener('change', onChange);\n } else {\n // Legacy fallback (Safari < 14)\n (mql as any).removeListener(onChange);\n }\n}\n","import { signal as createSignal, Signal, WritableSignal } from '@angular/core';\nimport { addChangeListenerToMql, removeChangeListenerFromMql } from './mql-registry.listeners';\nimport { MqlRegistry, MqRetainToken, MqHandle } from './mql-registry.models';\n\nconst REGISTRY_KEY: symbol = Symbol.for('ngx-mq:mql-registry');\n\nconst getRegistry = (): MqlRegistry => {\n const realmGlobal: Record<PropertyKey, unknown> = globalThis;\n\n return (realmGlobal[REGISTRY_KEY] ??= new Map()) as MqlRegistry;\n};\n\nconst createMqHandle = (query: string): MqHandle => {\n const mql: MediaQueryList = matchMedia(query);\n const signal: WritableSignal<boolean> = createSignal(mql.matches, { debugName: `ngx-mq: ${query}` });\n\n const onChange = (event?: MediaQueryListEvent) => signal.set(event?.matches ?? mql.matches);\n\n addChangeListenerToMql(mql, onChange);\n\n return { mql, signal, onChange, retainers: new Set() };\n};\n\nexport function retain(query: string, token: MqRetainToken, ssrValue: boolean): Signal<boolean> {\n // SSR mode\n if (typeof globalThis.matchMedia !== 'function') {\n return createSignal(ssrValue).asReadonly();\n }\n\n const registry: MqlRegistry = getRegistry();\n\n let handle: MqHandle | undefined = registry.get(query);\n\n if (!handle) {\n handle = createMqHandle(query);\n registry.set(query, handle);\n }\n\n handle.retainers.add(token);\n\n return handle.signal.asReadonly();\n}\n\nexport function release(query: string, token: MqRetainToken): boolean {\n const registry: MqlRegistry = getRegistry();\n\n let handle: MqHandle | undefined = registry.get(query);\n\n if (!handle) return false;\n\n const removed: boolean = handle.retainers.delete(token);\n\n if (handle.retainers.size === 0) {\n removeChangeListenerFromMql(handle.mql, handle.onChange);\n registry.delete(query);\n }\n\n return removed;\n}\n\n/* @internal\n * Returns the current registry (used only in tests).\n */\nexport function _getRegistry(): MqlRegistry {\n return getRegistry();\n}\n\n/* @internal\n * Clears all registry entries and removes media-query listeners.\n */\nexport function _resetRegistry(): void {\n const registry: MqlRegistry = getRegistry();\n\n registry.forEach((handle: MqHandle) => {\n removeChangeListenerFromMql(handle.mql, handle.onChange);\n });\n\n registry.clear();\n}\n","import { DestroyRef, inject, Signal } from '@angular/core';\nimport { retain, release } from './mql-registry';\n\nexport function retainUntilDestroy(query: string, ssrValue: boolean): Signal<boolean> {\n const destroyRef: DestroyRef = inject(DestroyRef);\n\n const querySignal: Signal<boolean> = retain(query, destroyRef, ssrValue);\n\n destroyRef.onDestroy(() => release(query, destroyRef));\n\n return querySignal;\n}\n","import { computed, isDevMode, Signal, inject } from '@angular/core';\nimport { retainUntilDestroy } from './mql-registry';\nimport { CreateMediaQueryOptions } from './models';\nimport { NGX_MQ_SSR_VALUE } from './tokens';\n\nexport function createConsumer(query: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n const defaultSsrValue: boolean = inject(NGX_MQ_SSR_VALUE);\n const effectiveSsrValue: boolean = options?.ssrValue ?? defaultSsrValue;\n\n const querySignal: Signal<boolean> = retainUntilDestroy(query, effectiveSsrValue);\n\n return computed(() => querySignal(), {\n debugName: isDevMode() ? options?.debugName : undefined,\n });\n}\n\nexport function createConsumerLabel(descriptor: string): string {\n return `[NgxMq Signal: ${descriptor}]`;\n}\n","export function normalizeQuery(value: string): string {\n return value.trim().replace(/\\s+/g, ' ').toLowerCase();\n}\n","import { assertInInjectionContext, isDevMode, Signal } from '@angular/core';\nimport { applyMaxEpsilon, resolveBreakpoint } from './utils/breakpoints.utils';\nimport { CreateMediaQueryOptions, DisplayModeOption } from './models';\nimport { createConsumer, createConsumerLabel } from './core';\nimport { normalizeQuery } from './utils/common.utils';\n\n/**\n * Tracks whether the viewport width is **at or above** a breakpoint.\n *\n * Builds a `(min-width: <bp>px)` query from the value registered for `bp` via\n * {@link provideBreakpoints} (or a preset like {@link provideTailwindBreakpoints}).\n *\n * @param bp - Name of a configured breakpoint, e.g. `'md'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the viewport width is `>=` the breakpoint.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * export class LayoutComponent {\n * readonly isDesktop = up('lg');\n * }\n * ```\n *\n * @see {@link down} and {@link between} for the complementary ranges.\n * @category Breakpoints\n */\nexport function up(bp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(up);\n\n const query: string = normalizeQuery(`(min-width: ${resolveBreakpoint(bp)}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`up(${bp})`);\n\n return consumer;\n}\n\n/**\n * Tracks whether the viewport width is **below** a breakpoint.\n *\n * Builds a `(max-width: <bp - epsilon>px)` query. The upper bound is **exclusive**:\n * a small epsilon is subtracted so `down('md')` and {@link up}`('md')` never overlap.\n *\n * @param bp - Name of a configured breakpoint, e.g. `'md'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the viewport width is `<` the breakpoint.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * export class NavComponent {\n * readonly isMobile = down('md');\n * }\n * ```\n *\n * @see {@link provideBreakpointEpsilon} to tune the exclusive-bound epsilon.\n * @category Breakpoints\n */\nexport function down(bp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(down);\n\n const query: string = normalizeQuery(`(max-width: ${applyMaxEpsilon(resolveBreakpoint(bp))}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`down(${bp})`);\n\n return consumer;\n}\n\n/**\n * Tracks whether the viewport width falls within the range `[minBp, maxBp)`.\n *\n * Combines `min-width` and `max-width` into a single query. The lower bound is\n * inclusive and the upper bound is **exclusive** (epsilon is subtracted from `maxBp`).\n *\n * @param minBp - Name of the lower (inclusive) breakpoint.\n * @param maxBp - Name of the upper (exclusive) breakpoint.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the width is in `[minBp, maxBp)`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * export class GridComponent {\n * readonly isTablet = between('md', 'lg');\n * }\n * ```\n *\n * @category Breakpoints\n */\nexport function between(minBp: string, maxBp: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(between);\n\n const minPx: number = resolveBreakpoint(minBp);\n const maxPx: number = resolveBreakpoint(maxBp);\n const query: string = normalizeQuery(`(min-width: ${minPx}px) and (max-width: ${applyMaxEpsilon(maxPx)}px)`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`between(${minBp}, ${maxBp})`);\n\n return consumer;\n}\n\n/**\n * Tracks the screen orientation via the `(orientation: ...)` media feature.\n *\n * @param value - `'portrait'` (height `>=` width) or `'landscape'` (width `>` height).\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the orientation matches `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isLandscape = orientation('landscape');\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/orientation | MDN: orientation}\n * @category Media Features\n */\nexport function orientation(value: 'portrait' | 'landscape', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(orientation);\n\n const query: string = normalizeQuery(`(orientation: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`orientation(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks the user's preferred color scheme via `(prefers-color-scheme: ...)`.\n *\n * @param value - `'light'` or `'dark'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the system scheme matches `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isDark = colorScheme('dark');\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme | MDN: prefers-color-scheme}\n * @category Media Features\n */\nexport function colorScheme(value: 'light' | 'dark', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(colorScheme);\n\n const query: string = normalizeQuery(`(prefers-color-scheme: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`colorScheme(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks how the app is being displayed via the `(display-mode: ...)` feature,\n * useful for detecting installed PWAs.\n *\n * @param value - One of {@link DisplayModeOption}, e.g. `'standalone'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the display mode matches `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isInstalledPwa = displayMode('standalone');\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/display-mode | MDN: display-mode}\n * @category Media Features\n */\nexport function displayMode(value: DisplayModeOption, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(displayMode);\n\n const query = normalizeQuery(`(display-mode: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`displayMode(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks whether the user has requested reduced motion via\n * `(prefers-reduced-motion: reduce)`.\n *\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while reduced motion is preferred.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly reduceMotion = reducedMotion();\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion | MDN: prefers-reduced-motion}\n * @category Media Features\n */\nexport function reducedMotion(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(reducedMotion);\n\n const query: string = normalizeQuery('(prefers-reduced-motion: reduce)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('reducedMotion');\n\n return consumer;\n}\n\n/**\n * Tracks whether the **primary** input device can hover via `(hover: hover)`.\n *\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the primary pointer supports hover.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly canHover = hover();\n * ```\n *\n * @see {@link anyHover} to test **any** available input device.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover | MDN: hover}\n * @category Media Features\n */\nexport function hover(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(hover);\n\n const query: string = normalizeQuery('(hover: hover)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('hover');\n\n return consumer;\n}\n\n/**\n * Tracks whether **any** available input device can hover via `(any-hover: hover)`.\n *\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while at least one pointer supports hover.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly anyCanHover = anyHover();\n * ```\n *\n * @see {@link hover} to test only the primary input device.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-hover | MDN: any-hover}\n * @category Media Features\n */\nexport function anyHover(options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(anyHover);\n\n const query: string = normalizeQuery('(any-hover: hover)');\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel('anyHover');\n\n return consumer;\n}\n\n/**\n * Tracks the accuracy of the **primary** pointer via `(pointer: ...)`.\n *\n * @param value - `'fine'` (mouse/stylus), `'coarse'` (touch), or `'none'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the primary pointer matches `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isTouch = pointer('coarse');\n * ```\n *\n * @see {@link anyPointer} to test **any** available input device.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer | MDN: pointer}\n * @category Media Features\n */\nexport function pointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(pointer);\n\n const query: string = normalizeQuery(`(pointer: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`pointer(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks the accuracy of **any** available pointer via `(any-pointer: ...)`.\n *\n * @param value - `'fine'` (mouse/stylus), `'coarse'` (touch), or `'none'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while at least one pointer matches `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly hasFinePointer = anyPointer('fine');\n * ```\n *\n * @see {@link pointer} to test only the primary input device.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-pointer | MDN: any-pointer}\n * @category Media Features\n */\nexport function anyPointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(anyPointer);\n\n const query: string = normalizeQuery(`(any-pointer: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`anyPointer(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks the approximate color gamut of the display via `(color-gamut: ...)`.\n *\n * @param value - `'srgb'`, `'p3'`, or `'rec2020'` (ordered by increasing range).\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that is `true` while the display covers `value`.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isWideGamut = colorGamut('p3');\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut | MDN: color-gamut}\n * @category Media Features\n */\nexport function colorGamut(value: 'srgb' | 'p3' | 'rec2020', options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(colorGamut);\n\n const query: string = normalizeQuery(`(color-gamut: ${value})`);\n const consumer: Signal<boolean> = createConsumer(query, options);\n\n consumer.toString = () => createConsumerLabel(`colorGamut(${value})`);\n\n return consumer;\n}\n\n/**\n * Tracks an arbitrary, raw CSS media query.\n *\n * Use this escape hatch for any feature not covered by the dedicated helpers.\n * The query is normalized (trimmed, collapsed whitespace, lower-cased) before use.\n *\n * @param query - A valid CSS media query, e.g. `'(min-resolution: 2dppx)'`.\n * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).\n * @returns A `Signal<boolean>` that reflects the live result of the query.\n *\n * @remarks Must be called within an Angular\n * [injection context](https://angular.dev/guide/di/dependency-injection-context).\n *\n * @example\n * ```ts\n * readonly isRetina = matchMediaSignal('(min-resolution: 2dppx)');\n * ```\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries | MDN: CSS media queries}\n * @category Custom Queries\n */\nexport function matchMediaSignal(query: string, options?: CreateMediaQueryOptions): Signal<boolean> {\n isDevMode() && assertInInjectionContext(matchMediaSignal);\n\n const media: string = normalizeQuery(query);\n const consumer: Signal<boolean> = createConsumer(media, options);\n\n consumer.toString = () => createConsumerLabel(`matchMediaSignal(${query})`);\n\n return consumer;\n}\n","import { computed, Signal } from '@angular/core';\nimport { createConsumerLabel } from './core';\n\nconst LABEL_RE = /^\\[NgxMq Signal: (.+)]$/;\n\n/** Extracts the inner descriptor from an ngx-mq signal label, or falls back to its raw toString(). */\nfunction describe(condition: Signal<boolean>): string {\n const raw: string = condition.toString();\n const match: RegExpExecArray | null = LABEL_RE.exec(raw);\n\n return match ? match[1] : raw;\n}\n\n/**\n * Combines boolean signals with logical **AND**.\n *\n * Composition happens at the signal level, so the underlying media-query\n * listeners stay shared and are still cleaned up automatically.\n *\n * @param conditions - Boolean signals to combine. An empty call returns a\n * signal that is always `true` (vacuous truth).\n * @returns A `Signal<boolean>` that is `true` only when **every** condition is `true`.\n *\n * @example\n * ```ts\n * readonly isLandscapeDesktop = and(up('lg'), orientation('landscape'), hover());\n * ```\n *\n * @see {@link or} and {@link not}.\n * @category Combining Signals\n */\nexport function and(...conditions: Signal<boolean>[]): Signal<boolean> {\n const result: Signal<boolean> = computed(() => conditions.every((condition: Signal<boolean>) => condition()));\n\n result.toString = () => createConsumerLabel(`and(${conditions.map(describe).join(', ')})`);\n\n return result;\n}\n\n/**\n * Combines boolean signals with logical **OR**.\n *\n * Composition happens at the signal level, so the underlying media-query\n * listeners stay shared and are still cleaned up automatically.\n *\n * @param conditions - Boolean signals to combine. An empty call returns a\n * signal that is always `false`.\n * @returns A `Signal<boolean>` that is `true` when **at least one** condition is `true`.\n *\n * @example\n * ```ts\n * readonly prefersSimpleUi = or(down('md'), reducedMotion());\n * ```\n *\n * @see {@link and} and {@link not}.\n * @category Combining Signals\n */\nexport function or(...conditions: Signal<boolean>[]): Signal<boolean> {\n const result: Signal<boolean> = computed(() => conditions.some((condition: Signal<boolean>) => condition()));\n\n result.toString = () => createConsumerLabel(`or(${conditions.map(describe).join(', ')})`);\n\n return result;\n}\n\n/**\n * Negates a boolean signal.\n *\n * Useful for features that have no direct inverse helper, such as\n * \"devices without hover\": `not(hover())`.\n *\n * @param condition - The boolean signal to invert.\n * @returns A `Signal<boolean>` that is `true` when `condition` is `false`, and vice versa.\n *\n * @example\n * ```ts\n * readonly isTouchLike = not(hover());\n * ```\n *\n * @see {@link and} and {@link or}.\n * @category Combining Signals\n */\nexport function not(condition: Signal<boolean>): Signal<boolean> {\n const result: Signal<boolean> = computed(() => !condition());\n\n result.toString = () => createConsumerLabel(`not(${describe(condition)})`);\n\n return result;\n}\n","import { isDevMode, Provider } from '@angular/core';\nimport { MQ_BREAKPOINT_EPSILON, MQ_BREAKPOINTS, NGX_MQ_SSR_VALUE } from './tokens';\nimport { normalizeBreakpoints, validateEpsilon } from './utils/breakpoints.utils';\nimport { MqBreakpoints } from './models';\nimport {\n BOOTSTRAP_BREAKPOINTS,\n DEFAULT_BREAKPOINT_EPSILON,\n MATERIAL_BREAKPOINTS,\n TAILWIND_BREAKPOINTS,\n} from './constants';\n\n/**\n * Registers a custom breakpoint map, enabling {@link up}, {@link down} and {@link between}.\n *\n * Provide once at bootstrap, or at any injector level to scope/override breakpoints.\n *\n * @param bps - A {@link MqBreakpoints} map of names to minimum widths in pixels.\n * @returns An Angular {@link Provider}.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideBreakpoints({ sm: 640, md: 768, lg: 1024 })],\n * });\n * ```\n *\n * @category Providers\n */\nexport function provideBreakpoints(bps: MqBreakpoints): Provider {\n return { provide: MQ_BREAKPOINTS, useValue: normalizeBreakpoints(bps) };\n}\n\n/**\n * Registers the default Tailwind CSS breakpoints:\n * `sm: 640, md: 768, lg: 1024, xl: 1280, 2xl: 1536`.\n *\n * @returns An Angular {@link Provider}.\n * @category Providers\n */\nexport function provideTailwindBreakpoints(): Provider {\n return provideBreakpoints(TAILWIND_BREAKPOINTS);\n}\n\n/**\n * Registers the default Bootstrap breakpoints:\n * `sm: 576, md: 768, lg: 992, xl: 1200, xxl: 1400`.\n *\n * @returns An Angular {@link Provider}.\n * @category Providers\n */\nexport function provideBootstrapBreakpoints(): Provider {\n return provideBreakpoints(BOOTSTRAP_BREAKPOINTS);\n}\n\n/**\n * Registers the default Material 2 breakpoints:\n * `sm: 600, md: 905, lg: 1240, xl: 1440`.\n *\n * @returns An Angular {@link Provider}.\n * @category Providers\n */\nexport function provideMaterialBreakpoints(): Provider {\n return provideBreakpoints(MATERIAL_BREAKPOINTS);\n}\n\n/**\n * Sets the epsilon subtracted from exclusive upper bounds in {@link down} and\n * {@link between}, preventing adjacent ranges from overlapping.\n *\n * @param epsilon - A value in the range `(0, 1]`. Defaults to `0.02`.\n * @returns An Angular {@link Provider}.\n *\n * @example\n * ```ts\n * provideBreakpointEpsilon(0.02);\n * ```\n *\n * @category Providers\n */\nexport function provideBreakpointEpsilon(epsilon: number = DEFAULT_BREAKPOINT_EPSILON): Provider {\n if (isDevMode()) validateEpsilon(epsilon);\n\n return { provide: MQ_BREAKPOINT_EPSILON, useValue: epsilon };\n}\n\n/**\n * Sets the app-wide value query signals report during server-side rendering,\n * where `matchMedia` is unavailable. A per-call `ssrValue` overrides this.\n *\n * @param value - The boolean returned by every signal on the server.\n * @returns An Angular {@link Provider}.\n *\n * @example\n * ```ts\n * provideSsrValue(true);\n * ```\n *\n * @category Providers\n */\nexport function provideSsrValue(value: boolean): Provider {\n return { provide: NGX_MQ_SSR_VALUE, useValue: value };\n}\n","/**\n * @packageDocumentation\n *\n * @document ../guides/getting-started.md\n * @document ../guides/ssr.md\n * @document ../guides/recipes.md\n */\n\nexport * from './lib/api';\nexport * from './lib/composition';\nexport * from './lib/tokens';\nexport * from './lib/providers';\nexport * from './lib/models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["signal","createSignal"],"mappings":";;AAEO,MAAM,oBAAoB,GAAkB;AACjD,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,KAAK,EAAE,IAAI;CACZ;AAEM,MAAM,qBAAqB,GAAkB;AAClD,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,GAAG,EAAE,IAAI;CACV;AAEM,MAAM,oBAAoB,GAAkB;AACjD,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,EAAE,EAAE,IAAI;CACT;AAEM,MAAM,0BAA0B,GAAW,IAAI;;ACrBtD;;;;;AAKG;MACU,cAAc,GAAkC,IAAI,cAAc,CAAC,gBAAgB;AAEhG;;;;;AAKG;MACU,qBAAqB,GAA2B,IAAI,cAAc,CAAC,uBAAuB,EAAE;AACvG,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC1C,CAAA;AAED;;;;;AAKG;MACU,gBAAgB,GAA4B,IAAI,cAAc,CAAC,kBAAkB,EAAE;AAC9F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,KAAK;AACrB,CAAA;;AC5BD,SAAS,yBAAyB,GAAA;AAChC,IAAA,MAAM,WAAW,GAAyB,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEpF,IAAA,IAAI,SAAS,EAAE,IAAI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CAAC,GAAkB,EAAA;AACnD,IAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,oBAAoB,CAAC,GAAG,CAAC,EAAE;AACzE;AAEA;;;;;;AAMG;SACa,0BAA0B,GAAA;AACxC,IAAA,OAAO,kBAAkB,CAAC,oBAAoB,CAAC;AACjD;AAEA;;;;;;AAMG;SACa,2BAA2B,GAAA;AACzC,IAAA,OAAO,kBAAkB,CAAC,qBAAqB,CAAC;AAClD;AAEA;;;;;;AAMG;SACa,0BAA0B,GAAA;AACxC,IAAA,OAAO,kBAAkB,CAAC,oBAAoB,CAAC;AACjD;AAEA;;;;;;;;;;;;;AAaG;AACG,SAAU,wBAAwB,CAAC,OAAA,GAAkB,0BAA0B,EAAA;AACnF,IAAA,IAAI,SAAS,EAAE;QAAE,eAAe,CAAC,OAAO,CAAC;IAEzC,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC9D;AAEA;;;;;;;;;;;;;AAaG;AACG,SAAU,eAAe,CAAC,KAAc,EAAA;IAC5C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE;AACvD;;ACrGA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,42 +1,466 @@
1
1
  import { Signal, InjectionToken, Provider } from '@angular/core';
2
2
 
3
+ /**
4
+ * A map of breakpoint names to their minimum widths in **pixels**.
5
+ *
6
+ * Keys are arbitrary range names (e.g. `'sm'`, `'md'`); values are the lower
7
+ * bound of each range. Passed to {@link provideBreakpoints} at bootstrap.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const breakpoints: MqBreakpoints = { sm: 640, md: 768, lg: 1024 };
12
+ * ```
13
+ *
14
+ * @category Types
15
+ */
3
16
  type MqBreakpoints = Record<string, number>;
17
+ /**
18
+ * Per-call options accepted by every query helper (e.g. {@link up}, {@link colorScheme}).
19
+ *
20
+ * @category Types
21
+ */
4
22
  interface CreateMediaQueryOptions {
5
23
  /**
6
- * Static signal value used during SSR.
24
+ * Value the signal reports during server-side rendering, where `matchMedia`
25
+ * is unavailable. Overrides the app-wide default set by {@link provideSsrValue}.
26
+ *
27
+ * @defaultValue `false`
7
28
  */
8
29
  ssrValue?: boolean;
9
30
  /**
10
- * A debug name for the signal. Used in Angular DevTools to identify the signal.
31
+ * A debug name for the signal, shown in Angular DevTools to help identify it.
11
32
  */
12
33
  debugName?: string;
13
34
  }
35
+ /**
36
+ * Allowed values for the {@link displayMode} helper, mirroring the CSS
37
+ * `display-mode` media feature.
38
+ *
39
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/display-mode | MDN: display-mode}
40
+ * @category Types
41
+ */
14
42
  type DisplayModeOption = 'browser' | 'fullscreen' | 'standalone' | 'minimal-ui' | 'window-controls-overlay' | 'picture-in-picture';
15
43
 
44
+ /**
45
+ * Tracks whether the viewport width is **at or above** a breakpoint.
46
+ *
47
+ * Builds a `(min-width: <bp>px)` query from the value registered for `bp` via
48
+ * {@link provideBreakpoints} (or a preset like {@link provideTailwindBreakpoints}).
49
+ *
50
+ * @param bp - Name of a configured breakpoint, e.g. `'md'`.
51
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
52
+ * @returns A `Signal<boolean>` that is `true` while the viewport width is `>=` the breakpoint.
53
+ *
54
+ * @remarks Must be called within an Angular
55
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * export class LayoutComponent {
60
+ * readonly isDesktop = up('lg');
61
+ * }
62
+ * ```
63
+ *
64
+ * @see {@link down} and {@link between} for the complementary ranges.
65
+ * @category Breakpoints
66
+ */
16
67
  declare function up(bp: string, options?: CreateMediaQueryOptions): Signal<boolean>;
68
+ /**
69
+ * Tracks whether the viewport width is **below** a breakpoint.
70
+ *
71
+ * Builds a `(max-width: <bp - epsilon>px)` query. The upper bound is **exclusive**:
72
+ * a small epsilon is subtracted so `down('md')` and {@link up}`('md')` never overlap.
73
+ *
74
+ * @param bp - Name of a configured breakpoint, e.g. `'md'`.
75
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
76
+ * @returns A `Signal<boolean>` that is `true` while the viewport width is `<` the breakpoint.
77
+ *
78
+ * @remarks Must be called within an Angular
79
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * export class NavComponent {
84
+ * readonly isMobile = down('md');
85
+ * }
86
+ * ```
87
+ *
88
+ * @see {@link provideBreakpointEpsilon} to tune the exclusive-bound epsilon.
89
+ * @category Breakpoints
90
+ */
17
91
  declare function down(bp: string, options?: CreateMediaQueryOptions): Signal<boolean>;
92
+ /**
93
+ * Tracks whether the viewport width falls within the range `[minBp, maxBp)`.
94
+ *
95
+ * Combines `min-width` and `max-width` into a single query. The lower bound is
96
+ * inclusive and the upper bound is **exclusive** (epsilon is subtracted from `maxBp`).
97
+ *
98
+ * @param minBp - Name of the lower (inclusive) breakpoint.
99
+ * @param maxBp - Name of the upper (exclusive) breakpoint.
100
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
101
+ * @returns A `Signal<boolean>` that is `true` while the width is in `[minBp, maxBp)`.
102
+ *
103
+ * @remarks Must be called within an Angular
104
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
105
+ *
106
+ * @example
107
+ * ```ts
108
+ * export class GridComponent {
109
+ * readonly isTablet = between('md', 'lg');
110
+ * }
111
+ * ```
112
+ *
113
+ * @category Breakpoints
114
+ */
18
115
  declare function between(minBp: string, maxBp: string, options?: CreateMediaQueryOptions): Signal<boolean>;
116
+ /**
117
+ * Tracks the screen orientation via the `(orientation: ...)` media feature.
118
+ *
119
+ * @param value - `'portrait'` (height `>=` width) or `'landscape'` (width `>` height).
120
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
121
+ * @returns A `Signal<boolean>` that is `true` while the orientation matches `value`.
122
+ *
123
+ * @remarks Must be called within an Angular
124
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * readonly isLandscape = orientation('landscape');
129
+ * ```
130
+ *
131
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/orientation | MDN: orientation}
132
+ * @category Media Features
133
+ */
19
134
  declare function orientation(value: 'portrait' | 'landscape', options?: CreateMediaQueryOptions): Signal<boolean>;
135
+ /**
136
+ * Tracks the user's preferred color scheme via `(prefers-color-scheme: ...)`.
137
+ *
138
+ * @param value - `'light'` or `'dark'`.
139
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
140
+ * @returns A `Signal<boolean>` that is `true` while the system scheme matches `value`.
141
+ *
142
+ * @remarks Must be called within an Angular
143
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * readonly isDark = colorScheme('dark');
148
+ * ```
149
+ *
150
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme | MDN: prefers-color-scheme}
151
+ * @category Media Features
152
+ */
20
153
  declare function colorScheme(value: 'light' | 'dark', options?: CreateMediaQueryOptions): Signal<boolean>;
154
+ /**
155
+ * Tracks how the app is being displayed via the `(display-mode: ...)` feature,
156
+ * useful for detecting installed PWAs.
157
+ *
158
+ * @param value - One of {@link DisplayModeOption}, e.g. `'standalone'`.
159
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
160
+ * @returns A `Signal<boolean>` that is `true` while the display mode matches `value`.
161
+ *
162
+ * @remarks Must be called within an Angular
163
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * readonly isInstalledPwa = displayMode('standalone');
168
+ * ```
169
+ *
170
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/display-mode | MDN: display-mode}
171
+ * @category Media Features
172
+ */
21
173
  declare function displayMode(value: DisplayModeOption, options?: CreateMediaQueryOptions): Signal<boolean>;
174
+ /**
175
+ * Tracks whether the user has requested reduced motion via
176
+ * `(prefers-reduced-motion: reduce)`.
177
+ *
178
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
179
+ * @returns A `Signal<boolean>` that is `true` while reduced motion is preferred.
180
+ *
181
+ * @remarks Must be called within an Angular
182
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * readonly reduceMotion = reducedMotion();
187
+ * ```
188
+ *
189
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion | MDN: prefers-reduced-motion}
190
+ * @category Media Features
191
+ */
22
192
  declare function reducedMotion(options?: CreateMediaQueryOptions): Signal<boolean>;
193
+ /**
194
+ * Tracks whether the **primary** input device can hover via `(hover: hover)`.
195
+ *
196
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
197
+ * @returns A `Signal<boolean>` that is `true` while the primary pointer supports hover.
198
+ *
199
+ * @remarks Must be called within an Angular
200
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
201
+ *
202
+ * @example
203
+ * ```ts
204
+ * readonly canHover = hover();
205
+ * ```
206
+ *
207
+ * @see {@link anyHover} to test **any** available input device.
208
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover | MDN: hover}
209
+ * @category Media Features
210
+ */
23
211
  declare function hover(options?: CreateMediaQueryOptions): Signal<boolean>;
212
+ /**
213
+ * Tracks whether **any** available input device can hover via `(any-hover: hover)`.
214
+ *
215
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
216
+ * @returns A `Signal<boolean>` that is `true` while at least one pointer supports hover.
217
+ *
218
+ * @remarks Must be called within an Angular
219
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
220
+ *
221
+ * @example
222
+ * ```ts
223
+ * readonly anyCanHover = anyHover();
224
+ * ```
225
+ *
226
+ * @see {@link hover} to test only the primary input device.
227
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-hover | MDN: any-hover}
228
+ * @category Media Features
229
+ */
24
230
  declare function anyHover(options?: CreateMediaQueryOptions): Signal<boolean>;
231
+ /**
232
+ * Tracks the accuracy of the **primary** pointer via `(pointer: ...)`.
233
+ *
234
+ * @param value - `'fine'` (mouse/stylus), `'coarse'` (touch), or `'none'`.
235
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
236
+ * @returns A `Signal<boolean>` that is `true` while the primary pointer matches `value`.
237
+ *
238
+ * @remarks Must be called within an Angular
239
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
240
+ *
241
+ * @example
242
+ * ```ts
243
+ * readonly isTouch = pointer('coarse');
244
+ * ```
245
+ *
246
+ * @see {@link anyPointer} to test **any** available input device.
247
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer | MDN: pointer}
248
+ * @category Media Features
249
+ */
25
250
  declare function pointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean>;
251
+ /**
252
+ * Tracks the accuracy of **any** available pointer via `(any-pointer: ...)`.
253
+ *
254
+ * @param value - `'fine'` (mouse/stylus), `'coarse'` (touch), or `'none'`.
255
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
256
+ * @returns A `Signal<boolean>` that is `true` while at least one pointer matches `value`.
257
+ *
258
+ * @remarks Must be called within an Angular
259
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
260
+ *
261
+ * @example
262
+ * ```ts
263
+ * readonly hasFinePointer = anyPointer('fine');
264
+ * ```
265
+ *
266
+ * @see {@link pointer} to test only the primary input device.
267
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-pointer | MDN: any-pointer}
268
+ * @category Media Features
269
+ */
26
270
  declare function anyPointer(value: 'fine' | 'coarse' | 'none', options?: CreateMediaQueryOptions): Signal<boolean>;
271
+ /**
272
+ * Tracks the approximate color gamut of the display via `(color-gamut: ...)`.
273
+ *
274
+ * @param value - `'srgb'`, `'p3'`, or `'rec2020'` (ordered by increasing range).
275
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
276
+ * @returns A `Signal<boolean>` that is `true` while the display covers `value`.
277
+ *
278
+ * @remarks Must be called within an Angular
279
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
280
+ *
281
+ * @example
282
+ * ```ts
283
+ * readonly isWideGamut = colorGamut('p3');
284
+ * ```
285
+ *
286
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut | MDN: color-gamut}
287
+ * @category Media Features
288
+ */
27
289
  declare function colorGamut(value: 'srgb' | 'p3' | 'rec2020', options?: CreateMediaQueryOptions): Signal<boolean>;
290
+ /**
291
+ * Tracks an arbitrary, raw CSS media query.
292
+ *
293
+ * Use this escape hatch for any feature not covered by the dedicated helpers.
294
+ * The query is normalized (trimmed, collapsed whitespace, lower-cased) before use.
295
+ *
296
+ * @param query - A valid CSS media query, e.g. `'(min-resolution: 2dppx)'`.
297
+ * @param options - Optional per-call settings ({@link CreateMediaQueryOptions}).
298
+ * @returns A `Signal<boolean>` that reflects the live result of the query.
299
+ *
300
+ * @remarks Must be called within an Angular
301
+ * [injection context](https://angular.dev/guide/di/dependency-injection-context).
302
+ *
303
+ * @example
304
+ * ```ts
305
+ * readonly isRetina = matchMediaSignal('(min-resolution: 2dppx)');
306
+ * ```
307
+ *
308
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries | MDN: CSS media queries}
309
+ * @category Custom Queries
310
+ */
28
311
  declare function matchMediaSignal(query: string, options?: CreateMediaQueryOptions): Signal<boolean>;
29
312
 
313
+ /**
314
+ * Combines boolean signals with logical **AND**.
315
+ *
316
+ * Composition happens at the signal level, so the underlying media-query
317
+ * listeners stay shared and are still cleaned up automatically.
318
+ *
319
+ * @param conditions - Boolean signals to combine. An empty call returns a
320
+ * signal that is always `true` (vacuous truth).
321
+ * @returns A `Signal<boolean>` that is `true` only when **every** condition is `true`.
322
+ *
323
+ * @example
324
+ * ```ts
325
+ * readonly isLandscapeDesktop = and(up('lg'), orientation('landscape'), hover());
326
+ * ```
327
+ *
328
+ * @see {@link or} and {@link not}.
329
+ * @category Combining Signals
330
+ */
331
+ declare function and(...conditions: Signal<boolean>[]): Signal<boolean>;
332
+ /**
333
+ * Combines boolean signals with logical **OR**.
334
+ *
335
+ * Composition happens at the signal level, so the underlying media-query
336
+ * listeners stay shared and are still cleaned up automatically.
337
+ *
338
+ * @param conditions - Boolean signals to combine. An empty call returns a
339
+ * signal that is always `false`.
340
+ * @returns A `Signal<boolean>` that is `true` when **at least one** condition is `true`.
341
+ *
342
+ * @example
343
+ * ```ts
344
+ * readonly prefersSimpleUi = or(down('md'), reducedMotion());
345
+ * ```
346
+ *
347
+ * @see {@link and} and {@link not}.
348
+ * @category Combining Signals
349
+ */
350
+ declare function or(...conditions: Signal<boolean>[]): Signal<boolean>;
351
+ /**
352
+ * Negates a boolean signal.
353
+ *
354
+ * Useful for features that have no direct inverse helper, such as
355
+ * "devices without hover": `not(hover())`.
356
+ *
357
+ * @param condition - The boolean signal to invert.
358
+ * @returns A `Signal<boolean>` that is `true` when `condition` is `false`, and vice versa.
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * readonly isTouchLike = not(hover());
363
+ * ```
364
+ *
365
+ * @see {@link and} and {@link or}.
366
+ * @category Combining Signals
367
+ */
368
+ declare function not(condition: Signal<boolean>): Signal<boolean>;
369
+
370
+ /**
371
+ * Holds the active {@link MqBreakpoints} map. Has no default: configure it with
372
+ * {@link provideBreakpoints} or a preset. Inject it to read breakpoints directly.
373
+ *
374
+ * @category Injection Tokens
375
+ */
30
376
  declare const MQ_BREAKPOINTS: InjectionToken<MqBreakpoints>;
377
+ /**
378
+ * Holds the epsilon used for exclusive upper bounds. Set it with
379
+ * {@link provideBreakpointEpsilon}; defaults to `0.02`.
380
+ *
381
+ * @category Injection Tokens
382
+ */
31
383
  declare const MQ_BREAKPOINT_EPSILON: InjectionToken<number>;
384
+ /**
385
+ * Holds the value query signals report during SSR. Set it with
386
+ * {@link provideSsrValue}; defaults to `false`.
387
+ *
388
+ * @category Injection Tokens
389
+ */
32
390
  declare const NGX_MQ_SSR_VALUE: InjectionToken<boolean>;
33
391
 
392
+ /**
393
+ * Registers a custom breakpoint map, enabling {@link up}, {@link down} and {@link between}.
394
+ *
395
+ * Provide once at bootstrap, or at any injector level to scope/override breakpoints.
396
+ *
397
+ * @param bps - A {@link MqBreakpoints} map of names to minimum widths in pixels.
398
+ * @returns An Angular {@link Provider}.
399
+ *
400
+ * @example
401
+ * ```ts
402
+ * bootstrapApplication(AppComponent, {
403
+ * providers: [provideBreakpoints({ sm: 640, md: 768, lg: 1024 })],
404
+ * });
405
+ * ```
406
+ *
407
+ * @category Providers
408
+ */
34
409
  declare function provideBreakpoints(bps: MqBreakpoints): Provider;
410
+ /**
411
+ * Registers the default Tailwind CSS breakpoints:
412
+ * `sm: 640, md: 768, lg: 1024, xl: 1280, 2xl: 1536`.
413
+ *
414
+ * @returns An Angular {@link Provider}.
415
+ * @category Providers
416
+ */
35
417
  declare function provideTailwindBreakpoints(): Provider;
418
+ /**
419
+ * Registers the default Bootstrap breakpoints:
420
+ * `sm: 576, md: 768, lg: 992, xl: 1200, xxl: 1400`.
421
+ *
422
+ * @returns An Angular {@link Provider}.
423
+ * @category Providers
424
+ */
36
425
  declare function provideBootstrapBreakpoints(): Provider;
426
+ /**
427
+ * Registers the default Material 2 breakpoints:
428
+ * `sm: 600, md: 905, lg: 1240, xl: 1440`.
429
+ *
430
+ * @returns An Angular {@link Provider}.
431
+ * @category Providers
432
+ */
37
433
  declare function provideMaterialBreakpoints(): Provider;
434
+ /**
435
+ * Sets the epsilon subtracted from exclusive upper bounds in {@link down} and
436
+ * {@link between}, preventing adjacent ranges from overlapping.
437
+ *
438
+ * @param epsilon - A value in the range `(0, 1]`. Defaults to `0.02`.
439
+ * @returns An Angular {@link Provider}.
440
+ *
441
+ * @example
442
+ * ```ts
443
+ * provideBreakpointEpsilon(0.02);
444
+ * ```
445
+ *
446
+ * @category Providers
447
+ */
38
448
  declare function provideBreakpointEpsilon(epsilon?: number): Provider;
449
+ /**
450
+ * Sets the app-wide value query signals report during server-side rendering,
451
+ * where `matchMedia` is unavailable. A per-call `ssrValue` overrides this.
452
+ *
453
+ * @param value - The boolean returned by every signal on the server.
454
+ * @returns An Angular {@link Provider}.
455
+ *
456
+ * @example
457
+ * ```ts
458
+ * provideSsrValue(true);
459
+ * ```
460
+ *
461
+ * @category Providers
462
+ */
39
463
  declare function provideSsrValue(value: boolean): Provider;
40
464
 
41
- export { MQ_BREAKPOINTS, MQ_BREAKPOINT_EPSILON, NGX_MQ_SSR_VALUE, anyHover, anyPointer, between, colorGamut, colorScheme, displayMode, down, hover, matchMediaSignal, orientation, pointer, provideBootstrapBreakpoints, provideBreakpointEpsilon, provideBreakpoints, provideMaterialBreakpoints, provideSsrValue, provideTailwindBreakpoints, reducedMotion, up };
465
+ export { MQ_BREAKPOINTS, MQ_BREAKPOINT_EPSILON, NGX_MQ_SSR_VALUE, and, anyHover, anyPointer, between, colorGamut, colorScheme, displayMode, down, hover, matchMediaSignal, not, or, orientation, pointer, provideBootstrapBreakpoints, provideBreakpointEpsilon, provideBreakpoints, provideMaterialBreakpoints, provideSsrValue, provideTailwindBreakpoints, reducedMotion, up };
42
466
  export type { CreateMediaQueryOptions, DisplayModeOption, MqBreakpoints };