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:
Julien Calixte
2026-07-02 18:55:34 +02:00
parent c66f13c1c5
commit 8e7a903fe4
2 changed files with 21 additions and 10 deletions

View File

@@ -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",
}