Logo Mibo

ActionState Module

Functions and values

Function or value Description

empty

Full Usage: empty

Returns: ActionState<'a>
Type parameters: 'a (requires comparison)
Returns: ActionState<'a>

mergeEdges current incoming

Full Usage: mergeEdges current incoming

Parameters:
    current : ActionState<'Action> - The root's current state — its edges may already hold unread events.
    incoming : ActionState<'Action> - The freshly built state — its edges are the new delta's events.

Returns: ActionState<'Action>
Type parameters: 'Action (requires comparison)

Merges a freshly built state into the current one: the edge events (Started/Released) UNION — several deltas arriving between two consumptions must not drop the earlier deltas' edges (a mouse-move build has empty edges and would otherwise wipe a key delta's events) — while Held/Values/HeldTriggers stay last-wins: they are the current truth, not events. Pairs with ActionState.nextFrame: the adaptive input subscription clears the edges at the post drain after Update, so the next merge starts from an empty edge set.

current : ActionState<'Action>

The root's current state — its edges may already hold unread events.

incoming : ActionState<'Action>

The freshly built state — its edges are the new delta's events.

Returns: ActionState<'Action>

nextFrame state

Full Usage: nextFrame state

Parameters:
Returns: ActionState<'Action>
Type parameters: 'Action (requires comparison)
state : ActionState<'Action>
Returns: ActionState<'Action>

update map isDown trigger state

Full Usage: update map isDown trigger state

Parameters:
Returns: ActionState<'Action>
Type parameters: 'Action (requires comparison)

Pure state-update for a single trigger transition. Backend-agnostic: the caller supplies isDown, so this function never touches a native API.

map : InputMap<'Action>
isDown : bool
trigger : Trigger
state : ActionState<'Action>
Returns: ActionState<'Action>

Type something to start searching.