Skip to content
Loamis build console Read only

toast

READ ONLY: generated from the specification

2 states, 6 events, 10 rules. Initial state: idle.

Transition graph

idleshowing

Double outline: the initial state. Dashed line and ◆: the rule has a guard.

Transitions, as a list

  1. idle, on configure, to idle
  2. showing, on configure, to showing
  3. idle, on alert, to showing, guarded: event.kind is a piece of ctx.allowKinds split on ","
  4. showing, on alert, to showing, guarded: event.kind is a piece of ctx.allowKinds split on ","
  5. showing, on dismiss, to idle, guarded: ctx.count <= 1
  6. showing, on dismiss, to showing, guarded: ctx.count > 1
  7. showing, on tick, to idle, guarded: ctx.paused == false and (event.now - ctx.shownAt >= ctx.showFor and ctx.count <= 1)
  8. showing, on tick, to showing, guarded: ctx.paused == false and (event.now - ctx.shownAt >= ctx.showFor and ctx.count > 1)
  9. showing, on pause, to showing
  10. showing, on resume, to showing

Live runner

Current state: idle

text; the machine samples "error", "warning", "info", ""

a whole number; the machine samples 0, 3, 10

a whole number; the machine samples 0, 3, 10

text; the machine samples "error,warning", "", "info"

a whole number; the machine samples 0, 5

Context

count
0
current
""
shownAt
0
showFor
0
paused
false
allowKinds
""

View flags now

visible
false
ariaLive
"off"
dismissEnabled
false
showCount
false
timerRunning
false
paused
false
kind
""
defaultFocus
"none"

Effects emitted

None.

Trace

No event sent yet.

States

idle

initial

View flags

visible
false
ariaLive
"off"
dismissEnabled
false
showCount
false
timerRunning
false
paused
false
kind
""
defaultFocus
"none"

Rules that leave it

  1. configure to idle ; sets allowKinds := event.allow, showFor := event.showFor
  2. alert to showing when event.kind is a piece of ctx.allowKinds split on "," ; sets count := 1, paused := false, current := event.kind, shownAt := event.now ; emits show(event.kind)

showing

View flags

visible
true
ariaLive
"polite"
dismissEnabled
true
showCount
false
timerRunning
true
paused
false
kind
""
defaultFocus
"none"

Rules that leave it

  1. configure to showing ; sets allowKinds := event.allow, showFor := event.showFor
  2. alert to showing when event.kind is a piece of ctx.allowKinds split on "," ; sets count += 1, current := event.kind, shownAt := event.now ; emits show(event.kind)
  3. dismiss to idle when ctx.count <= 1 ; sets count := 0, current := "", paused := false ; emits hide()
  4. dismiss to showing when ctx.count > 1 ; sets count -= 1
  5. tick to idle when ctx.paused == false and (event.now - ctx.shownAt >= ctx.showFor and ctx.count <= 1) ; sets count := 0, current := "", paused := false ; emits hide()
  6. tick to showing when ctx.paused == false and (event.now - ctx.shownAt >= ctx.showFor and ctx.count > 1) ; sets count -= 1, shownAt := event.now
  7. pause to showing ; sets paused := true
  8. resume to showing ; sets paused := false
All machines