-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use normalized StateNode instead of raw config (#11)
- Loading branch information
1 parent
246d5bd
commit 1424d6a
Showing
26 changed files
with
332 additions
and
848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"key": "alarm", | ||
"initial": "inactive", | ||
"states": { | ||
"inactive": { "on": { "ENABLE": "active.waiting" } }, | ||
"active": { | ||
"states": { | ||
"snoozing": { "on": { "TIMER": "beeping" } }, | ||
"waiting": { "on": { "TIMER": "beeping" } }, | ||
"beeping": { "on": { "SNOOZE": "snoozing" } } | ||
}, | ||
"on": { | ||
"DISABLE": "inactive" | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@startuml | ||
left to right direction | ||
state "alarm" as alarm { | ||
[*] --> alarm.inactive | ||
|
||
state "inactive" as alarm.inactive { | ||
alarm.inactive --> alarm.active.waiting : ENABLE | ||
} | ||
|
||
state "active" as alarm.active { | ||
alarm.active --> alarm.inactive : DISABLE | ||
state "snoozing" as alarm.active.snoozing { | ||
alarm.active.snoozing --> alarm.active.beeping : TIMER | ||
} | ||
|
||
state "waiting" as alarm.active.waiting { | ||
alarm.active.waiting --> alarm.active.beeping : TIMER | ||
} | ||
|
||
state "beeping" as alarm.active.beeping { | ||
alarm.active.beeping --> alarm.active.snoozing : SNOOZE | ||
} | ||
} | ||
} | ||
@enduml |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"key": "wordmachine", | ||
"parallel": true, | ||
"states": { | ||
"bold": { | ||
"initial": "off", | ||
"states": { | ||
"on": { "on": { "TOGGLE_BOLD": "off" } }, | ||
"off": { "on": { "TOGGLE_BOLD": "on" } } | ||
} | ||
}, | ||
"underline": { | ||
"initial": "off", | ||
"states": { | ||
"on": { "on": { "TOGGLE_UNDERLINE": "off" } }, | ||
"off": { "on": { "TOGGLE_UNDERLINE": "on" } } | ||
} | ||
}, | ||
"italics": { | ||
"initial": "off", | ||
"states": { | ||
"on": { "on": { "TOGGLE_ITALICS": "off" } }, | ||
"off": { "on": { "TOGGLE_ITALICS": "on" } } | ||
} | ||
}, | ||
"list": { | ||
"initial": "none", | ||
"states": { | ||
"none": { | ||
"on": { "BULLETS": "bullets", "NUMBERS": "numbers" } | ||
}, | ||
"bullets": { "on": { "NONE": "none", "NUMBERS": "numbers" } }, | ||
"numbers": { "on": { "BULLETS": "bullets", "NONE": "none" } } | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,59 @@ | ||
@startuml | ||
state "bold" as bold { | ||
state "on" as bold_on | ||
state "off" as bold_off | ||
[*] --> bold_off | ||
bold_on --> bold_off : TOGGLE_BOLD | ||
bold_off --> bold_on : TOGGLE_BOLD | ||
} | ||
state "underline" as underline { | ||
state "on" as underline_on | ||
state "off" as underline_off | ||
[*] --> underline_off | ||
underline_on --> underline_off : TOGGLE_UNDERLINE | ||
underline_off --> underline_on : TOGGLE_UNDERLINE | ||
} | ||
state "italics" as italics { | ||
state "on" as italics_on | ||
state "off" as italics_off | ||
[*] --> italics_off | ||
italics_on --> italics_off : TOGGLE_ITALICS | ||
italics_off --> italics_on : TOGGLE_ITALICS | ||
} | ||
state "list" as list { | ||
state "none" as list_none | ||
state "bullets" as list_bullets | ||
state "numbers" as list_numbers | ||
[*] --> list_none | ||
list_none --> list_bullets : BULLETS | ||
list_none --> list_numbers : NUMBERS | ||
list_bullets --> list_none : NONE | ||
list_bullets --> list_numbers : NUMBERS | ||
list_numbers --> list_bullets : BULLETS | ||
list_numbers --> list_none : NONE | ||
left to right direction | ||
state "wordmachine" as wordmachine { | ||
state "bold" as wordmachine.bold { | ||
[*] --> wordmachine.bold.off | ||
|
||
state "on" as wordmachine.bold.on { | ||
wordmachine.bold.on --> wordmachine.bold.off : TOGGLE_BOLD | ||
} | ||
|
||
state "off" as wordmachine.bold.off { | ||
wordmachine.bold.off --> wordmachine.bold.on : TOGGLE_BOLD | ||
} | ||
} | ||
|
||
state "underline" as wordmachine.underline { | ||
[*] --> wordmachine.underline.off | ||
|
||
state "on" as wordmachine.underline.on { | ||
wordmachine.underline.on --> wordmachine.underline.off : TOGGLE_UNDERLINE | ||
} | ||
|
||
state "off" as wordmachine.underline.off { | ||
wordmachine.underline.off --> wordmachine.underline.on : TOGGLE_UNDERLINE | ||
} | ||
} | ||
|
||
state "italics" as wordmachine.italics { | ||
[*] --> wordmachine.italics.off | ||
|
||
state "on" as wordmachine.italics.on { | ||
wordmachine.italics.on --> wordmachine.italics.off : TOGGLE_ITALICS | ||
} | ||
|
||
state "off" as wordmachine.italics.off { | ||
wordmachine.italics.off --> wordmachine.italics.on : TOGGLE_ITALICS | ||
} | ||
} | ||
|
||
state "list" as wordmachine.list { | ||
[*] --> wordmachine.list.none | ||
|
||
state "none" as wordmachine.list.none { | ||
wordmachine.list.none --> wordmachine.list.bullets : BULLETS | ||
wordmachine.list.none --> wordmachine.list.numbers : NUMBERS | ||
} | ||
|
||
state "bullets" as wordmachine.list.bullets { | ||
wordmachine.list.bullets --> wordmachine.list.none : NONE | ||
wordmachine.list.bullets --> wordmachine.list.numbers : NUMBERS | ||
} | ||
|
||
state "numbers" as wordmachine.list.numbers { | ||
wordmachine.list.numbers --> wordmachine.list.bullets : BULLETS | ||
wordmachine.list.numbers --> wordmachine.list.none : NONE | ||
} | ||
} | ||
} | ||
@enduml |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.