feat: add route selection functionality and improve station handling

- Added `vitest` for testing and created initial tests for route utilities.
- Implemented route selection logic in the App component, allowing users to select start and end stations.
- Updated the NetworkMap component to reflect focused and selected stations, including visual indicators for start and end stations.
- Enhanced the route panel UI to display selected route information and estimated lengths.
- Introduced utility functions for building track adjacency and computing routes based on selected stations.
- Improved styling for route selection and station list items to enhance user experience.
This commit is contained in:
2025-10-11 19:28:35 +02:00
parent 92d19235d8
commit 090dca29c2
10 changed files with 1441 additions and 52 deletions

View File

@@ -9,6 +9,7 @@
"preview": "vite preview",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
"test": "vitest run",
"test:e2e": "playwright test"
},
"dependencies": {
@@ -34,6 +35,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"prettier": "^3.3.3",
"typescript": "^5.5.3",
"vite": "^5.4.0"
"vite": "^5.4.0",
"vitest": "^1.6.0"
}
}