Skip to content
Loamis build console Read only

content

READ ONLY: generated from the specification

5 states, 7 events, 15 rules. Initial state: idle.

Transition graph

idleloadingreadynotFoundfailed

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

Transitions, as a list

  1. idle, on open, to loading
  2. loading, on open, to loading
  3. ready, on open, to loading
  4. notFound, on open, to loading
  5. failed, on open, to loading
  6. loading, on loaded, to ready, guarded: event.path == ctx.path
  7. loading, on missing, to notFound, guarded: event.path == ctx.path
  8. loading, on failedToLoad, to failed, guarded: event.path == ctx.path
  9. failed, on retry, to loading
  10. ready, on toggleToc, to ready, guarded: ctx.tocOpen == false
  11. ready, on toggleToc, to ready, guarded: ctx.tocOpen == true
  12. loading, on close, to idle
  13. ready, on close, to idle
  14. notFound, on close, to idle
  15. failed, on close, to idle

Live runner

Current state: idle

text; the machine samples "a", "b"

text; the machine samples "a", "b"

text; the machine samples "a", "b"

text; the machine samples "a", "b"

text; the machine samples "boom"

Context

path
""
error
""
attempt
0
tocOpen
false

View flags now

ariaBusy
false
ariaLive
"off"
alert
false
showEmpty
true
showSkeleton
false
showContent
false
showNotFound
false
showError
false
retryEnabled
false
tocToggleEnabled
false
ariaExpanded
false
showToc
false
defaultFocus
"none"

Effects emitted

None.

Trace

No event sent yet.

States

idle

initial

View flags

ariaBusy
false
ariaLive
"off"
alert
false
showEmpty
true
showSkeleton
false
showContent
false
showNotFound
false
showError
false
retryEnabled
false
tocToggleEnabled
false
ariaExpanded
false
showToc
false
defaultFocus
"none"

Rules that leave it

  1. open to loading ; sets path := event.path, error := "", attempt := 0, tocOpen := false ; emits load(event.path), announce("loading")

loading

View flags

ariaBusy
true
ariaLive
"polite"
alert
false
showEmpty
false
showSkeleton
true
showContent
false
showNotFound
false
showError
false
retryEnabled
false
tocToggleEnabled
false
ariaExpanded
false
showToc
false
defaultFocus
"none"

Rules that leave it

  1. open to loading ; sets path := event.path, error := "", attempt := 0, tocOpen := false ; emits load(event.path), announce("loading")
  2. loaded to ready when event.path == ctx.path ; emits focusHeading(), announce("loaded")
  3. missing to notFound when event.path == ctx.path ; emits announce("notFound")
  4. failedToLoad to failed when event.path == ctx.path ; sets error := event.message ; emits announce("failed")
  5. close to idle ; sets reset the context

ready

View flags

ariaBusy
false
ariaLive
"polite"
alert
false
showEmpty
false
showSkeleton
false
showContent
true
showNotFound
false
showError
false
retryEnabled
false
tocToggleEnabled
true
ariaExpanded
false
showToc
false
defaultFocus
"heading"

Rules that leave it

  1. open to loading ; sets path := event.path, error := "", attempt := 0, tocOpen := false ; emits load(event.path), announce("loading")
  2. toggleToc to ready when ctx.tocOpen == false ; sets tocOpen := true
  3. toggleToc to ready when ctx.tocOpen == true ; sets tocOpen := false
  4. close to idle ; sets reset the context

notFound

View flags

ariaBusy
false
ariaLive
"polite"
alert
false
showEmpty
false
showSkeleton
false
showContent
false
showNotFound
true
showError
false
retryEnabled
false
tocToggleEnabled
false
ariaExpanded
false
showToc
false
defaultFocus
"heading"

Rules that leave it

  1. open to loading ; sets path := event.path, error := "", attempt := 0, tocOpen := false ; emits load(event.path), announce("loading")
  2. close to idle ; sets reset the context

failed

View flags

ariaBusy
false
ariaLive
"assertive"
alert
true
showEmpty
false
showSkeleton
false
showContent
false
showNotFound
false
showError
true
retryEnabled
true
tocToggleEnabled
false
ariaExpanded
false
showToc
false
defaultFocus
"retry"

Rules that leave it

  1. open to loading ; sets path := event.path, error := "", attempt := 0, tocOpen := false ; emits load(event.path), announce("loading")
  2. retry to loading ; sets attempt += 1 ; emits load(ctx.path), announce("loading")
  3. close to idle ; sets reset the context
All machines