move some files around to confuse everyone

This commit is contained in:
Joeri Exelmans 2025-10-25 23:30:08 +02:00
parent 710f7be68c
commit 30fa1aaca1
46 changed files with 45 additions and 45 deletions

View file

@ -2,13 +2,13 @@ import { ReactElement, useCallback, useEffect, useMemo, useRef, useState } from
import { handleInputEvent, initialize, RuntimeError } from "../statecharts/interpreter"; import { handleInputEvent, initialize, RuntimeError } from "../statecharts/interpreter";
import { BigStep, RT_Event } from "../statecharts/runtime_types"; import { BigStep, RT_Event } from "../statecharts/runtime_types";
import { InsertMode, VisualEditor, VisualEditorState } from "../VisualEditor/VisualEditor"; import { InsertMode, VisualEditor, VisualEditorState } from "./VisualEditor/VisualEditor";
import { getSimTime, getWallClkDelay, TimeMode } from "../statecharts/time"; import { getSimTime, getWallClkDelay, TimeMode } from "../statecharts/time";
import "../index.css"; import "../index.css";
import "./App.css"; import "./App.css";
import { TopPanel } from "./TopPanel"; import { TopPanel } from "./TopPanel/TopPanel";
import { ShowAST, ShowInputEvents, ShowInternalEvents, ShowOutputEvents } from "./ShowAST"; import { ShowAST, ShowInputEvents, ShowInternalEvents, ShowOutputEvents } from "./ShowAST";
import { parseStatechart } from "../statecharts/parser"; import { parseStatechart } from "../statecharts/parser";
import { getKeyHandler } from "./shortcut_handler"; import { getKeyHandler } from "./shortcut_handler";
@ -18,7 +18,7 @@ import { PersistentDetails } from "./PersistentDetails";
import { DigitalWatchPlant } from "@/Plant/DigitalWatch/DigitalWatch"; import { DigitalWatchPlant } from "@/Plant/DigitalWatch/DigitalWatch";
import { DummyPlant } from "@/Plant/Dummy/Dummy"; import { DummyPlant } from "@/Plant/Dummy/Dummy";
import { Plant } from "@/Plant/Plant"; import { Plant } from "@/Plant/Plant";
import { usePersistentState } from "@/util/persistent_state"; import { usePersistentState } from "@/App/persistent_state";
import { RTHistory } from "./RTHistory"; import { RTHistory } from "./RTHistory";
import { detectConnections } from "@/statecharts/detect_connections"; import { detectConnections } from "@/statecharts/detect_connections";
import { MicrowavePlant } from "@/Plant/Microwave/Microwave"; import { MicrowavePlant } from "@/Plant/Microwave/Microwave";

View file

@ -1,4 +1,4 @@
import { usePersistentState } from "@/util/persistent_state" import { usePersistentState } from "@/App/persistent_state"
import { DetailsHTMLAttributes, PropsWithChildren } from "react"; import { DetailsHTMLAttributes, PropsWithChildren } from "react";
type Props = { type Props = {

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before After
Before After

View file

@ -1,7 +1,7 @@
import { Dispatch, memo, Ref, SetStateAction, useCallback } from "react"; import { Dispatch, memo, Ref, SetStateAction, useCallback } from "react";
import { Statechart, stateDescription } from "../statecharts/abstract_syntax"; import { Statechart, stateDescription } from "../statecharts/abstract_syntax";
import { BigStep, Environment, Mode, RaisedEvent, RT_Event } from "../statecharts/runtime_types"; import { BigStep, Environment, Mode, RaisedEvent, RT_Event } from "../statecharts/runtime_types";
import { formatTime } from "./util"; import { formatTime } from "../util/util";
import { TimeMode } from "../statecharts/time"; import { TimeMode } from "../statecharts/time";
import { TraceItem, TraceState } from "./App"; import { TraceItem, TraceState } from "./App";

View file

@ -72,7 +72,7 @@ export const ShowAST = memo(function ShowASTx(props: {root: ConcreteState | Unst
}); });
import BoltIcon from '@mui/icons-material/Bolt'; import BoltIcon from '@mui/icons-material/Bolt';
import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo"; import { KeyInfoHidden, KeyInfoVisible } from "./TopPanel/KeyInfo";
import { memo, useEffect } from "react"; import { memo, useEffect } from "react";
export function ShowInputEvents({inputEvents, onRaise, disabled, showKeys}: {inputEvents: EventTrigger[], onRaise: (e: string, p: any) => void, disabled: boolean, showKeys: boolean}) { export function ShowInputEvents({inputEvents, onRaise, disabled, showKeys}: {inputEvents: EventTrigger[], onRaise: (e: string, p: any) => void, disabled: boolean, showKeys: boolean}) {

View file

@ -1,7 +1,7 @@
import { Dispatch, memo, ReactElement, SetStateAction } from "react"; import { Dispatch, memo, ReactElement, SetStateAction } from "react";
import { KeyInfoHidden, KeyInfoVisible } from "../KeyInfo"; import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo";
import { InsertMode } from "@/VisualEditor/VisualEditor"; import { InsertMode } from "@/App/VisualEditor/VisualEditor";
import { HistoryIcon, PseudoStateIcon, RountangleIcon } from "../Icons"; import { HistoryIcon, PseudoStateIcon, RountangleIcon } from "./Icons";
import TrendingFlatIcon from '@mui/icons-material/TrendingFlat'; import TrendingFlatIcon from '@mui/icons-material/TrendingFlat';

View file

@ -1,13 +1,13 @@
import { Dispatch, memo, ReactElement, SetStateAction, useCallback, useEffect, useState } from "react"; import { Dispatch, memo, ReactElement, SetStateAction, useCallback, useEffect, useState } from "react";
import { TimerElapseEvent, Timers } from "../statecharts/runtime_types"; import { TimerElapseEvent, Timers } from "../../statecharts/runtime_types";
import { getSimTime, setPaused, setRealtime, TimeMode } from "../statecharts/time"; import { getSimTime, setPaused, setRealtime, TimeMode } from "../../statecharts/time";
import { InsertMode } from "../VisualEditor/VisualEditor"; import { InsertMode } from "../VisualEditor/VisualEditor";
import { About } from "./About"; import { About } from "../Modals/About";
import { EditHistory, TraceState } from "./App"; import { EditHistory, TraceState } from "../App";
import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo"; import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo";
import { UndoRedoButtons } from "./TopPanel/UndoRedoButtons"; import { UndoRedoButtons } from "./UndoRedoButtons";
import { ZoomButtons } from "./TopPanel/ZoomButtons"; import { ZoomButtons } from "./ZoomButtons";
import { formatTime } from "./util"; import { formatTime } from "../../util/util";
import AccessAlarmIcon from '@mui/icons-material/AccessAlarm'; import AccessAlarmIcon from '@mui/icons-material/AccessAlarm';
import CachedIcon from '@mui/icons-material/Cached'; import CachedIcon from '@mui/icons-material/Cached';
@ -17,8 +17,8 @@ import PauseIcon from '@mui/icons-material/Pause';
import PlayArrowIcon from '@mui/icons-material/PlayArrow'; import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import SkipNextIcon from '@mui/icons-material/SkipNext'; import SkipNextIcon from '@mui/icons-material/SkipNext';
import StopIcon from '@mui/icons-material/Stop'; import StopIcon from '@mui/icons-material/Stop';
import { InsertModes } from "./TopPanel/InsertModes"; import { InsertModes } from "./InsertModes";
import { usePersistentState } from "@/util/persistent_state"; import { usePersistentState } from "@/App/persistent_state";
export type TopPanelProps = { export type TopPanelProps = {
trace: TraceState | null, trace: TraceState | null,

View file

@ -1,5 +1,5 @@
import { memo } from "react"; import { memo } from "react";
import { KeyInfoHidden, KeyInfoVisible } from "../KeyInfo"; import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo";
import UndoIcon from '@mui/icons-material/Undo'; import UndoIcon from '@mui/icons-material/Undo';
import RedoIcon from '@mui/icons-material/Redo'; import RedoIcon from '@mui/icons-material/Redo';

View file

@ -1,6 +1,6 @@
import { ZOOM_MAX, ZOOM_MIN, ZOOM_STEP } from "@/VisualEditor/parameters"; import { ZOOM_MAX, ZOOM_MIN, ZOOM_STEP } from "@/App/VisualEditor/parameters";
import { Dispatch, memo, SetStateAction, useEffect } from "react"; import { Dispatch, memo, SetStateAction, useEffect } from "react";
import { KeyInfoHidden, KeyInfoVisible } from "../KeyInfo"; import { KeyInfoHidden, KeyInfoVisible } from "./KeyInfo";
import ZoomInIcon from '@mui/icons-material/ZoomIn'; import ZoomInIcon from '@mui/icons-material/ZoomIn';
import ZoomOutIcon from '@mui/icons-material/ZoomOut'; import ZoomOutIcon from '@mui/icons-material/ZoomOut';

View file

@ -1,8 +1,8 @@
import { memo } from "react"; import { memo } from "react";
import { Arrow, ArrowPart } from "../statecharts/concrete_syntax"; import { Arrow, ArrowPart } from "../../statecharts/concrete_syntax";
import { ArcDirection, euclideanDistance } from "./geometry"; import { ArcDirection, euclideanDistance } from "./geometry";
import { CORNER_HELPER_RADIUS } from "./parameters"; import { CORNER_HELPER_RADIUS } from "./parameters";
import { arraysEqual } from "@/App/util"; import { arraysEqual } from "@/util/util";
export const ArrowSVG = memo(function(props: { arrow: Arrow; selected: ArrowPart[]; error: string; highlight: boolean; fired: boolean; arc: ArcDirection; initialMarker: boolean }) { export const ArrowSVG = memo(function(props: { arrow: Arrow; selected: ArrowPart[]; error: string; highlight: boolean; fired: boolean; arc: ArcDirection; initialMarker: boolean }) {

View file

@ -3,7 +3,7 @@ import { rountangleMinSize } from "./VisualEditor";
import { Vec2D } from "./geometry"; import { Vec2D } from "./geometry";
import { RectHelper } from "./RectHelpers"; import { RectHelper } from "./RectHelpers";
import { memo } from "react"; import { memo } from "react";
import { arraysEqual } from "@/App/util"; import { arraysEqual } from "@/util/util";
export const DiamondShape = memo(function DiamondShape(props: {size: Vec2D, extraAttrs: object}) { export const DiamondShape = memo(function DiamondShape(props: {size: Vec2D, extraAttrs: object}) {
const minSize = rountangleMinSize(props.size); const minSize = rountangleMinSize(props.size);

View file

@ -1,5 +1,5 @@
import { memo } from "react"; import { memo } from "react";
import { RectSide } from "../statecharts/concrete_syntax"; import { RectSide } from "../../statecharts/concrete_syntax";
import { Vec2D } from "./geometry"; import { Vec2D } from "./geometry";
import { CORNER_HELPER_OFFSET, CORNER_HELPER_RADIUS } from "./parameters"; import { CORNER_HELPER_OFFSET, CORNER_HELPER_RADIUS } from "./parameters";

View file

@ -1,9 +1,9 @@
import { memo } from "react"; import { memo } from "react";
import { Rountangle, RectSide } from "../statecharts/concrete_syntax"; import { Rountangle, RectSide } from "../../statecharts/concrete_syntax";
import { ROUNTANGLE_RADIUS } from "./parameters"; import { ROUNTANGLE_RADIUS } from "./parameters";
import { RectHelper } from "./RectHelpers"; import { RectHelper } from "./RectHelpers";
import { rountangleMinSize } from "./VisualEditor"; import { rountangleMinSize } from "./VisualEditor";
import { arraysEqual } from "@/App/util"; import { arraysEqual } from "@/util/util";
export const RountangleSVG = memo(function RountangleSVG(props: {rountangle: Rountangle; selected: RectSide[]; highlight: RectSide[]; error?: string; active: boolean; }) { export const RountangleSVG = memo(function RountangleSVG(props: {rountangle: Rountangle; selected: RectSide[]; highlight: RectSide[]; error?: string; active: boolean; }) {

View file

@ -1,6 +1,6 @@
import { TextDialog } from "@/App/TextDialog"; import { TextDialog } from "@/App/Modals/TextDialog";
import { TraceableError } from "..//statecharts/parser"; import { TraceableError } from "../../statecharts/parser";
import {Text} from "../statecharts/concrete_syntax"; import {Text} from "../../statecharts/concrete_syntax";
import { Dispatch, memo, ReactElement, SetStateAction } from "react"; import { Dispatch, memo, ReactElement, SetStateAction } from "react";
export const TextSVG = memo(function TextSVG(props: {text: Text, error: TraceableError|undefined, selected: boolean, highlight: boolean, onEdit: (text: Text, newText: string) => void, setModal: Dispatch<SetStateAction<ReactElement|null>>}) { export const TextSVG = memo(function TextSVG(props: {text: Text, error: TraceableError|undefined, selected: boolean, highlight: boolean, onEdit: (text: Text, newText: string) => void, setModal: Dispatch<SetStateAction<ReactElement|null>>}) {

View file

@ -1,8 +1,8 @@
import { ClipboardEvent, Dispatch, memo, ReactElement, SetStateAction, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ClipboardEvent, Dispatch, memo, ReactElement, SetStateAction, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Statechart } from "../statecharts/abstract_syntax"; import { Statechart } from "../../statecharts/abstract_syntax";
import { Arrow, ArrowPart, Diamond, History, Rountangle, RectSide, Text } from "../statecharts/concrete_syntax"; import { Arrow, ArrowPart, Diamond, History, Rountangle, RectSide, Text } from "../../statecharts/concrete_syntax";
import { parseStatechart, TraceableError } from "../statecharts/parser"; import { parseStatechart, TraceableError } from "../../statecharts/parser";
import { ArcDirection, Line2D, Rect2D, Vec2D, addV2D, arcDirection, area, getBottomSide, getLeftSide, getRightSide, getTopSide, isEntirelyWithin, normalizeRect, scaleV2D, subtractV2D, transformLine, transformRect } from "./geometry"; import { ArcDirection, Line2D, Rect2D, Vec2D, addV2D, arcDirection, area, getBottomSide, getLeftSide, getRightSide, getTopSide, isEntirelyWithin, normalizeRect, scaleV2D, subtractV2D, transformLine, transformRect } from "./geometry";
import { MIN_ROUNTANGLE_SIZE } from "./parameters"; import { MIN_ROUNTANGLE_SIZE } from "./parameters";
import { getBBoxInSvgCoords } from "./svg_helper"; import { getBBoxInSvgCoords } from "./svg_helper";
@ -11,12 +11,12 @@ import { RountangleSVG } from "./RountangleSVG";
import { TextSVG } from "./TextSVG"; import { TextSVG } from "./TextSVG";
import { DiamondSVG } from "./DiamondSVG"; import { DiamondSVG } from "./DiamondSVG";
import { HistorySVG } from "./HistorySVG"; import { HistorySVG } from "./HistorySVG";
import { Connections, detectConnections } from "../statecharts/detect_connections"; import { Connections, detectConnections } from "../../statecharts/detect_connections";
import "./VisualEditor.css"; import "./VisualEditor.css";
import { TraceState } from "@/App/App"; import { TraceState } from "@/App/App";
import { Mode } from "@/statecharts/runtime_types"; import { Mode } from "@/statecharts/runtime_types";
import { arraysEqual, objectsEqual, setsEqual } from "@/App/util"; import { arraysEqual, objectsEqual, setsEqual } from "@/util/util";
export type VisualEditorState = { export type VisualEditorState = {
rountangles: Rountangle[]; rountangles: Rountangle[];

View file

@ -1,4 +1,4 @@
import { RectSide } from "../statecharts/concrete_syntax"; import { RectSide } from "../../statecharts/concrete_syntax";
export type Vec2D = { export type Vec2D = {
x: number; x: number;

View file

@ -1,5 +1,5 @@
import { Dispatch, SetStateAction } from "react"; import { Dispatch, SetStateAction } from "react";
import { InsertMode } from "../VisualEditor/VisualEditor"; import { InsertMode } from "./VisualEditor/VisualEditor";
export function getKeyHandler(setMode: Dispatch<SetStateAction<InsertMode>>) { export function getKeyHandler(setMode: Dispatch<SetStateAction<InsertMode>>) {
return function onKeyDown(e: KeyboardEvent) { return function onKeyDown(e: KeyboardEvent) {

View file

@ -1,6 +1,6 @@
import { Rect2D, Vec2D, Line2D, euclideanDistance, intersectLines, isWithin, lineBBox, subtractV2D } from "../VisualEditor/geometry"; import { Rect2D, Vec2D, Line2D, euclideanDistance, intersectLines, isWithin, lineBBox, subtractV2D } from "../App/VisualEditor/geometry";
import { ARROW_SNAP_THRESHOLD, HISTORY_RADIUS, TEXT_SNAP_THRESHOLD } from "../VisualEditor/parameters"; import { ARROW_SNAP_THRESHOLD, HISTORY_RADIUS, TEXT_SNAP_THRESHOLD } from "../App/VisualEditor/parameters";
import { sides, VisualEditorState } from "../VisualEditor/VisualEditor"; import { sides, VisualEditorState } from "../App/VisualEditor/VisualEditor";
export type Rountangle = { export type Rountangle = {
uid: string; uid: string;

View file

@ -1,4 +1,4 @@
import { VisualEditorState } from "@/VisualEditor/VisualEditor"; import { VisualEditorState } from "@/App/VisualEditor/VisualEditor";
import { findNearestArrow, findNearestHistory, findNearestSide, findRountangle, RectSide } from "./concrete_syntax"; import { findNearestArrow, findNearestHistory, findNearestSide, findRountangle, RectSide } from "./concrete_syntax";
export type Connections = { export type Connections = {

View file

@ -1,12 +1,12 @@
import { ConcreteState, HistoryState, OrState, UnstableState, Statechart, stateDescription, Transition } from "./abstract_syntax"; import { ConcreteState, HistoryState, OrState, UnstableState, Statechart, stateDescription, Transition } from "./abstract_syntax";
import { Rountangle } from "./concrete_syntax"; import { Rountangle } from "./concrete_syntax";
import { isEntirelyWithin, Rect2D } from "../VisualEditor/geometry"; import { isEntirelyWithin, Rect2D } from "../App/VisualEditor/geometry";
import { Action, EventTrigger, Expression, ParsedText } from "./label_ast"; import { Action, EventTrigger, Expression, ParsedText } from "./label_ast";
import { parse as parseLabel, SyntaxError } from "./label_parser"; import { parse as parseLabel, SyntaxError } from "./label_parser";
import { Connections } from "./detect_connections"; import { Connections } from "./detect_connections";
import { HISTORY_RADIUS } from "../VisualEditor/parameters"; import { HISTORY_RADIUS } from "../App/VisualEditor/parameters";
import { VisualEditorState } from "@/VisualEditor/VisualEditor"; import { VisualEditorState } from "@/App/VisualEditor/VisualEditor";
import { memoize } from "@/App/util"; import { memoize } from "@/util/util";
export type TraceableError = { export type TraceableError = {
shapeUid: string; shapeUid: string;