-
+
{['history', 'final'].includes(stateNode.type) && (
-
+ css={{
+ height: '1.5rem',
+ width: '1.5rem',
+ margin: '0.5rem',
+ marginRight: 0,
+ borderRadius: 'var(--viz-radius)',
+ background: 'var(--viz-color-transparent)',
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ ...(stateNode.type === 'final' && {
+ border: '2px solid var(--viz-color-transparent)',
+ background: 'transparent',
+ }),
+ }}
+ _before={{
+ content:
+ stateNode.type === 'final'
+ ? "''"
+ : stateNode.type === 'history' &&
+ stateNode.history === 'deep'
+ ? "'H٭'"
+ : 'H',
+ display: 'block',
+ fontWeight: 'bold',
+ ...(stateNode.type === 'final' && {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ width: '100%',
+ height: '100%',
+ borderRadius: 'inherit',
+ transform: 'scale(0.7)',
+ background: 'var(--viz-color-transparent)',
+ }),
+ ...(stateNode.type === 'history' &&
+ stateNode.history === 'deep' && {
+ fontSize: '80%',
+ }),
+ }}
+ >
)}
{stateNode.tags.length > 0 && (
-
+
{stateNode.tags.map((tag, i) => {
return (
-
+
{tag}
-
+
);
})}
-
+
)}
-
+
{stateNode.definition.invoke.length > 0 && (
-
+
{stateNode.definition.invoke.map((invokeDef) => {
return ;
})}
-
+
)}
{stateNode.definition.entry.length > 0 && (
-
+
{stateNode.definition.entry.map((action, index) => {
return ;
})}
-
+
)}
{stateNode.definition.exit.length > 0 && (
-
+
{stateNode.definition.exit.map((action, index) => {
return ;
})}
-
+
)}
{description && (
-
+ p': {
+ maxWidth: '10rem',
+ },
+ }}
+ >
,
@@ -177,11 +308,21 @@ export const StateNodeViz: React.FC<{
>
{description}
-
+
)}
-