{"version":"1.0","type":"rich","title":"Generated by XState Viz: https://xstate.js.org/viz","description":"This example shows a finite-state machine for a light switch with a hidden mode and history state, visualized interactively. The machine defines states for hidden, visible (with light and dark substates), and a history pseudo-state that restores the last active substate. It uses the XState library’s `Machine` API to declare transitions like `TURN_ON` and `SWITCH`, and the visualization is rendered by XState Viz, which parses the JavaScript machine definition to generate a live statechart diagram. The code includes no external data sources, only the machine’s transition logic.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-95148ce5798f016e7c06dc846539fc70?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}