Primitives / API

foldkit-primitives/events

Functions

activeElementEventsFocus changes on the document. Without a document the stream is empty instead of throwing. Lift with Subscription.persistentEntry, mapping into the parent's…
keyboardEventsKey presses and releases on the window. Without a window the stream is empty instead of throwing. Lift with Subscription.persistentEntry, mapping into the…
matchHotkeyHotkey matching as a pure function over a Pressed payload: matchHotkey answers whether a press is the shortcut, so update stays a table of chords instead of…
modalityOfKeyA modifier alone says nothing about how the page is being driven.
pointerEventsPointer moves on the window. Without a window the stream is empty instead of throwing. Lift with Subscription.persistentEntry, mapping into the parent's…
scrollEventsScrolls on the window, in the capture phase so container scrolls (which do not bubble) report too. Without a window the stream is empty instead of throwing.…

Values

ActiveElementMessage
IdleIdleness as a bundle: idle in the Model, flipped by activity and silence. While active, activity debounced past timeoutMs settles to BecameIdle; while idle,…
IdleMessage
IdleModel
InputModalityInput modality as a bundle: whether the user last drove the page by keyboard or by pointer. The browser reports the facts; the Model keeps the answer, so a…
InputModalityMessage
InputModalityModel
KeyboardMessage
Modality
PointerMessage
ScrollMessage
VisibilityPage visibility as a bundle: visible in the Model, read from the document at startup and kept current by visibilitychange. A hidden page is the…
VisibilityMessage
VisibilityModel
WindowSizeWindow size as a bundle: { width, height } in the Model, read from the window at startup and kept current by one resize listener. Breakpoints owns its own…
WindowSizeMessage
WindowSizeModel

Interfaces