/** * UIQuality -- maps buffer occupancy + device capability to UI complexity tier. * * Same pattern as video ABR (Adaptive Bitrate). Composite signal from * buffer occupancy and device tier determines rendering fidelity. * * @module */ import type { MotionTier as _MotionTier } from '@czap/_spine'; import { Boundary } from './boundary.js'; /** * Motion tier — re-anchored from `@czap/_spine` (the canonical declaration * per ADR-0010). The ladder runs from lowest capability (`none`, forced by * `prefers-reduced-motion: reduce` regardless of GPU tier) to highest * (`compute`, which unlocks the Rust/WASM kernels). */ export type MotionTier = _MotionTier; /** * Coarse UI-complexity ladder, in increasing fidelity: `skeleton` (placeholder * blocks only) up through `rich` (full interactive styled content). */ export type UIQualityTier = 'skeleton' | 'text-only' | 'styled' | 'interactive' | 'rich'; /** {@link Boundary.Shape} instantiation used by {@link UIQuality} — input = `buffer-occupancy`, states = the {@link UIQualityTier} ladder. */ export type UIQualityBoundary = Boundary.Shape<'buffer-occupancy', readonly ['skeleton', 'text-only', 'styled', 'interactive', 'rich']>; interface UIQualityEvaluatorShape { evaluate(bufferOccupancy: number, deviceTier?: MotionTier): UIQualityTier; readonly boundary: UIQualityBoundary; } declare function _make(): UIQualityEvaluatorShape; /** * UIQuality — adaptive-bitrate-style UI fidelity gate. * * Combines buffer occupancy (how far ahead the generator is) and device * {@link MotionTier} into a composite score and maps it via {@link Boundary} * with hysteresis to a {@link UIQualityTier}. */ export declare const UIQuality: { /** Build a stateful evaluator that remembers the previous tier for hysteresis. */ make: typeof _make; /** The pre-built boundary — exposed so callers can compile it to CSS/GLSL directly. */ boundary: UIQualityBoundary; }; export declare namespace UIQuality { /** Structural shape of a UIQuality evaluator. */ type Shape = UIQualityEvaluatorShape; /** Alias for {@link UIQualityTier}. */ type Tier = UIQualityTier; } export {}; //# sourceMappingURL=ui-quality.d.ts.map