Primitives / Events

foldkit-primitives/events

Raw window events. Four bundles keep a stored fact (Visibility, WindowSize, Idle, InputModality); four entries report keys, pointer moves, scrolls, and focus, and the parent keeps whatever it wants of them. Anything scoped to one element belongs to a Mount in observers or dom, not to these window-level streams. (source)

NameFormModelMessagesArgs
Visibilitybundle{ visible }Changed { visible }none
WindowSizebundle{ width, height }Changed { width, height }none
Idlebundle{ idle }BecameIdle, BecameActive{ timeoutMs }
InputModalitybundle{ modality }Changed { modality }none
keyboardEvents({ preventDefault? })entryPressed { key, repeat, ctrl, shift, alt, meta }, Released { key }
pointerEvents()entryMoved { x, y }
scrollEvents()entryScrolled { x, y }
activeElementEvents()entryChanged { tag, id }
matchHotkey(pattern, press)function