refactor(state-machine): derive legend from the machine's edges
Add navigate/changeScope transition kinds and build the legend from the transitions a machine actually has, so each blueprint shows only its own kinds — needed for Calendar, whose lifecycle has no loadMore().
This commit is contained in:
@@ -58,7 +58,7 @@ export interface SmNode {
|
||||
label: string
|
||||
}
|
||||
|
||||
export type SmKind = "succeed" | "fail" | "refresh" | "loadMore"
|
||||
export type SmKind = "succeed" | "fail" | "refresh" | "loadMore" | "navigate" | "changeScope"
|
||||
|
||||
export interface SmEdge {
|
||||
from: string
|
||||
@@ -78,6 +78,8 @@ export const SM_COLORS: Record<SmKind | "init", string> = {
|
||||
fail: "#ff8f8f",
|
||||
refresh: "#ffb84d",
|
||||
loadMore: "#8fd0ff",
|
||||
navigate: "#b79cff",
|
||||
changeScope: "#67d0c0",
|
||||
init: "#4f7099",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user