/** * Viewport signals for the debug overlay. * * Two ORTHOGONAL signals, deliberately kept apart: * * - `compact` drives **layout** — which shape a surface takes (logo-anchored drawer * vs corner dropdown, full-screen modal vs floating one). Narrow OR short viewport. * - `coarse` drives **hit targets** — how big a tappable thing must be. True on * any touch device, including large tablets. * * They cross: a tablet is coarse-but-not-compact (desktop layout, big targets); * a narrow desktop window is compact-but-not-coarse (mobile layout, normal * targets). Collapsing them into one "isMobile" boolean gets both cases wrong. * * This module imports nothing from the overlay — keep it a leaf so `core.ts`, * `panel.ts` and `predict.ts` can all depend on it without cycles. */ export type LayoutState = { compact: boolean; coarse: boolean; }; /** Re-run every subscriber. Call directly after changing a preference that affects layout. */ export declare function reflow(): void; /** Subscribe to viewport/layout changes. Returns an unsubscribe function. */ export declare function onReflow(fn: (state: LayoutState) => void): () => void; /** True when the viewport is narrow or short — the overlay switches shape. */ export declare function isCompact(): boolean; /** True on touch/stylus input — hit targets grow to 44px. Independent of {@link isCompact}. */ export declare function isCoarsePointer(): boolean; /** Install the one listener set that drives every relayout. Idempotent. */ export declare function initLayout(): void;