Primitives / Events

WindowSize, Idle, InputModality

WindowSize keeps raw { width, height }, read from the window on subscribe and kept current by one resize listener; a server starts at zero. Placing it beside Breakpoints doubles the listeners.

Idle keeps idle: boolean with args.timeoutMs (positive and finite). While active, activity (mouse, keys, pointer, scroll) debounced past the timeout settles to BecameIdle; while idle, the first activity wakes to BecameActive and restarts the watch. It starts active, so a lurker idles once the silence elapses, because subscribe time seeds the debounce.

InputModality keeps { modality }, 'keyboard', 'pointer', or 'unknown' before any input, fed by the window's keydown (a modifier alone says nothing) and pointerdown. FocusVisible in interaction turns it into a focus ring for keyboard users.