Skip to content

Commit

Permalink
T-11 import cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rontap committed May 2, 2023
1 parent ceb908f commit d49aac0
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 42 deletions.
14 changes: 3 additions & 11 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect, useState} from 'react';
import React, {useState} from 'react';

//---------------------
import './ui/styles/App.css';
Expand All @@ -10,24 +10,16 @@ import './ui/styles/mat.css';
import {NodeBuilder} from "./node/Builder";
import Svg from "./svg/Svg";
import {jsobj} from './util/util';
import ActiveNodes from "./ui/ActiveNodes";
import PropertyViewer from "./ui/PropertyViewer";
import ZoomInfo from "./ui/ZoomInfo";
import State, {useTemporalStore} from "./graph/State";
import {Line} from "./node/Line";
import BtnGroup from "./ui/components/BtnGroup";
import State from "./graph/State";
import Button from "./ui/components/Button";
import ContextMenu from "./ui/components/ContextMenu";
import AddNodes from "./ui/components/AddNodes";
import Recenter from "./ui/Recenter";
import Header from "./ui/Header";
import NodeBlueprints from "./ui/NodeBlueprints";
import AvailableNodes from "./ui/AvailableNodes";
import NodeBlueprints, {NodeGroups} from "./ui/NodeBlueprints";
import BlueprintSvg from "./svg/BlueprintSvg";
import NodeBlueprintConfigEditor from "./node/NodeBlueprintConfigEditor";
import Taskbar from "./ui/Taskbar";
import InspectLine from "./svg/InspectLine";
import {NodeGroups} from "./ui/NodeBlueprints";


function App() {
Expand Down
8 changes: 2 additions & 6 deletions app/src/__snapshots__/App.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ exports[`Renders <App/> without issues 1`] = `
>
Toggle Theme
</button>
<button
className=" btn "
onClick={[Function]}
>
FRF
</button>
version 1.0
</span>
</nav>
<div
Expand Down
2 changes: 1 addition & 1 deletion app/src/node/Line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CONST from "../const";
import {GraphUtil, GraphUtilInst} from "../graph/GraphUtil";
import {MouseEventHandler, ReactElement} from "react";
import {Geom, Point} from "../util/Geom";
import svgContainer from "../svg/Movable.js";
import svgContainer from "../svg/Movable";
import {jsobj} from "../util/util";

export type LineId = number;
Expand Down
2 changes: 1 addition & 1 deletion app/src/node/NodeFC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ErrorBoundary} from "react-error-boundary";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faCode} from "@fortawesome/free-solid-svg-icons";
import {jsobj, preventBubble} from "../util/util";
import {MovableState} from "../svg/Movable.js";
import {MovableState} from "../svg/Movable";
import {FormRoot} from "../ui/form/FormRoot";
import {Node} from "./Node";
import Button from "../ui/components/Button";
Expand Down
2 changes: 1 addition & 1 deletion app/src/svg/Movable.js.ts → app/src/svg/Movable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {jsobj} from "../util/util";
import CONST from "../const";
import State from "../graph/State";
import {Line, NodeId} from "../node/Line";
import {Line} from "../node/Line";

import {Node} from "../node/Node";
import {DragHandler, DragHandlerInst} from "./Draggable";
Expand Down
2 changes: 1 addition & 1 deletion app/src/svg/Svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {jsobj} from "../util/util";
import State, {getState} from "../graph/State";
import {Geom, Point} from "../util/Geom";
import {Node} from "../node/Node";
import Movable from "./Movable.js";
import Movable from "./Movable";
import {Line} from "../node/Line";
import SvgLines from "./SvgLines";
import InspectLine from "./InspectLine";
Expand Down
19 changes: 6 additions & 13 deletions app/src/ui/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import {getState, useTemporalStore} from "../graph/State";
import {useTemporalStore} from "../graph/State";
import BtnGroup from "./components/BtnGroup";
import Button from "./components/Button";
import AddNodes from "./components/AddNodes";
import React from "react";
import {Line} from "../node/Line";
import {jsobj} from "../util/util";
import {NodeBuilder} from "../node/Builder";
import {GraphUtilInst} from "../graph/GraphUtil";
import {SerialiserInst} from "../graph/Serialiser";
import PositionInst from "../svg/Positioning";

const items: Map<string, jsobj> = NodeBuilder.Build();

export default function Header({toggleBg, graph}: {
toggleBg: Function, graph: boolean

Expand All @@ -32,9 +25,7 @@ export default function Header({toggleBg, graph}: {

return <span id={"header"}>


{/*<Button className={"blue"}>Run</Button>*/}

&nbsp;&nbsp;
{graph && <>
<BtnGroup>
Expand All @@ -48,9 +39,11 @@ export default function Header({toggleBg, graph}: {
<Button onClick={toggleBg}>
Toggle Theme
</Button>
<Button onClick={toggleBg}>
FRF
</Button>
{/*<Button onClick={toggleBg}>*/}
{/* FRF*/}
{/*</Button>*/}
{" "}
version 1.0
</>}

{/*<Button>*/}
Expand Down
1 change: 0 additions & 1 deletion app/src/ui/PropertyViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import State, {End, getState} from "../graph/State";
import Button from "./components/Button";
import {Line} from "../node/Line";
import {Node} from "../node/Node";
import {NodeEdgeRef} from "../app/EdgeLoader";
import SingleEdgeRef from "./SingleEdgeRef";
import ActiveNodes from "./ActiveNodes";

Expand Down
7 changes: 1 addition & 6 deletions app/src/ui/Taskbar.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import AvailableNodes from "./AvailableNodes";
import ActiveNodes from "./ActiveNodes";
import PropertyViewer from "./PropertyViewer";
import React, {ReactElement, useEffect, useState} from "react";
import React, {ReactElement, useState} from "react";
import {jsobj} from "../util/util";
import {DndContext, DragEndEvent, useDndMonitor, useDraggable, useDroppable} from '@dnd-kit/core';
import {stat} from "fs";
import {Point} from "../util/Geom";
import Button from "./components/Button";
import IO from "./IO";
import InspectLine from "../svg/InspectLine";


const taskbarStyles = {
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/ZoomInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import State from "../graph/State";
import Button from "./components/Button";
import BtnGroup from "./components/BtnGroup";
import {MovableState} from "../svg/Movable.js";
import {MovableState} from "../svg/Movable";
import CONST from "../const";

export default function ZoomInfo() {
Expand Down

0 comments on commit d49aac0

Please sign in to comment.