diff --git a/src/App/App.tsx b/src/App/App.tsx index b320e0d..e937535 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -3,7 +3,7 @@ import { Dispatch, ReactElement, SetStateAction, useEffect, useRef, useState } f import { emptyStatechart, Statechart } from "../statecharts/abstract_syntax"; import { handleInputEvent, initialize } from "../statecharts/interpreter"; import { BigStep, BigStepOutput } from "../statecharts/runtime_types"; -import { InsertMode, VisualEditor } from "../VisualEditor/VisualEditor"; +import { InsertMode, VisualEditor, VisualEditorState } from "../VisualEditor/VisualEditor"; import { getSimTime, getWallClkDelay, TimeMode } from "../statecharts/time"; import "../index.css"; @@ -17,7 +17,7 @@ import { ShowAST, ShowInputEvents, ShowOutputEvents } from "./ShowAST"; import { TraceableError } from "../statecharts/parser"; import { getKeyHandler } from "./shortcut_handler"; import { BottomPanel } from "./BottomPanel"; -import { emptyState, VisualEditorState } from "@/statecharts/concrete_syntax"; +import { emptyState } from "@/statecharts/concrete_syntax"; import { usePersistentState } from "@/util/persistent_state"; type EditHistory = { diff --git a/src/App/RTHistory.tsx b/src/App/RTHistory.tsx index 41f1a34..56883a8 100644 --- a/src/App/RTHistory.tsx +++ b/src/App/RTHistory.tsx @@ -54,6 +54,7 @@ function ShowMode(props: {mode: Mode, statechart: Statechart}) { function getActiveLeafs(mode: Mode, sc: Statechart) { return new Set([...mode].filter(uid => + // @ts-ignore sc.uid2State.get(uid)?.children?.length === 0 )); } diff --git a/src/App/ShowAST.tsx b/src/App/ShowAST.tsx index 9c18fe2..232f48f 100644 --- a/src/App/ShowAST.tsx +++ b/src/App/ShowAST.tsx @@ -36,7 +36,7 @@ export function ShowAST(props: {root: ConcreteState | PseudoState, transitions: const description = stateDescription(props.root); // const outgoing = props.transitions.get(props.root.uid) || []; - return
  • {props.root.kind}: {description} + return
  • {props.root.kind}: {description} {props.root.kind !== "pseudo" && props.root.children.length>0 &&