diff --git a/packages/frontend/package.json b/packages/frontend/package.json
index 4f07689..3f2e4bc 100644
--- a/packages/frontend/package.json
+++ b/packages/frontend/package.json
@@ -18,17 +18,19 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
+ "@l2beat/discovery-types": "0.4.1",
+ "@total-typescript/ts-reset": "^0.3.7",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"classnames": "^2.3.2",
+ "d3-force": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.20.2",
- "zustand": "^4.3.2",
- "@total-typescript/ts-reset": "^0.3.7",
- "@l2beat/discovery-types": "0.4.1"
+ "zustand": "^4.3.2"
},
"devDependencies": {
+ "@types/d3-force": "^3.0.9",
"@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.13",
"postcss": "^8.4.21",
diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx
index 7749b74..c9f1582 100644
--- a/packages/frontend/src/App.tsx
+++ b/packages/frontend/src/App.tsx
@@ -15,6 +15,7 @@ import {
decodeNodeLocations,
getLayoutStorageKey,
} from './store/utils/storageParsing'
+import { AutoLayoutButton } from './view/AutoLayoutButton'
import { Sidebar } from './view/Sidebar'
import { Viewport } from './view/Viewport'
@@ -151,7 +152,7 @@ export function App() {
-
+
+
{props.children}
diff --git a/packages/frontend/src/view/Sidebar.tsx b/packages/frontend/src/view/Sidebar.tsx
index 032b52e..c0e1503 100644
--- a/packages/frontend/src/view/Sidebar.tsx
+++ b/packages/frontend/src/view/Sidebar.tsx
@@ -38,7 +38,7 @@ function SidebarForSingleNode({
Click on the "🔍" to discover
{' '}
onDeleteNodes([node.id])}
>
@@ -82,7 +82,7 @@ function SidebarForSingleNode({
onDeleteNodes([node.id])}
>
@@ -102,7 +102,7 @@ function SidebarForMultipleNodes({
Selected {selectedNodes.length} nodes
onDeleteNode(selectedNodes.map((n) => n.id))}
>
diff --git a/tsconfig.json b/tsconfig.json
index fb5fd4a..0b90c27 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -5,6 +5,7 @@
"module": "CommonJS",
"sourceMap": true,
"strict": true,
+ "skipLibCheck": true,
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
diff --git a/yarn.lock b/yarn.lock
index 6895991..7ccb264 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -736,6 +736,11 @@
"@types/keygrip" "*"
"@types/node" "*"
+"@types/d3-force@^3.0.9":
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-3.0.9.tgz#dd96ccefba4386fe4ff36b8e4ee4e120c21fcf29"
+ integrity sha512-IKtvyFdb4Q0LWna6ymywQsEYjK/94SGhPrMfEr1TIc5OBeziTi+1jcCvttts8e0UWZIxpasjnQk9MNk/3iS+kA==
+
"@types/etag@*":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@types/etag/-/etag-1.8.1.tgz#593ca8ddb43acb3db049bd0955fd64d281ab58b9"
@@ -1697,6 +1702,30 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9"
integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==
+"d3-dispatch@1 - 3":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e"
+ integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==
+
+d3-force@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4"
+ integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==
+ dependencies:
+ d3-dispatch "1 - 3"
+ d3-quadtree "1 - 3"
+ d3-timer "1 - 3"
+
+"d3-quadtree@1 - 3":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f"
+ integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==
+
+"d3-timer@1 - 3":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0"
+ integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==
+
debug@4.3.4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"