diff --git a/ui/package-lock.json b/ui/package-lock.json
index 2e219b30e..d107c7bcf 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -24,7 +24,7 @@
"@hey-api/openapi-ts": "^0.53.11",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-static": "^3.0.5",
- "@sveltejs/kit": "^2.7.2",
+ "@sveltejs/kit": "^2.12.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6",
"@types/eslint": "^8.56.0",
"@types/polyline": "^0.1.32",
@@ -1357,25 +1357,23 @@
}
},
"node_modules/@sveltejs/kit": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.8.1.tgz",
- "integrity": "sha512-uuOfFwZ4xvnfPsiTB6a4H1ljjTUksGhWnYq5X/Y9z4x5+3uM2Md8q/YVeHL+7w+mygAwoEFdgKZ8YkUuk+VKww==",
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.16.0.tgz",
+ "integrity": "sha512-S9i1ZWKqluzoaJ6riYnEdbe+xJluMTMkhABouBa66GaWcAyCjW/jAc0NdJQJ/DXyK1CnP5quBW25e99MNyvLxA==",
"dev": true,
- "hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@types/cookie": "^0.6.0",
"cookie": "^0.6.0",
"devalue": "^5.1.0",
- "esm-env": "^1.0.0",
+ "esm-env": "^1.2.2",
"import-meta-resolve": "^4.1.0",
"kleur": "^4.1.5",
"magic-string": "^0.30.5",
"mrmime": "^2.0.0",
"sade": "^1.8.1",
"set-cookie-parser": "^2.6.0",
- "sirv": "^3.0.0",
- "tiny-glob": "^0.2.9"
+ "sirv": "^3.0.0"
},
"bin": {
"svelte-kit": "svelte-kit.js"
@@ -1384,9 +1382,9 @@
"node": ">=18.13"
},
"peerDependencies": {
- "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1",
+ "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0",
"svelte": "^4.0.0 || ^5.0.0-next.0",
- "vite": "^5.0.3"
+ "vite": "^5.0.3 || ^6.0.0"
}
},
"node_modules/@sveltejs/vite-plugin-svelte": {
@@ -2794,9 +2792,9 @@
}
},
"node_modules/esm-env": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.1.4.tgz",
- "integrity": "sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz",
+ "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==",
"license": "MIT"
},
"node_modules/espree": {
@@ -3270,12 +3268,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/globalyzer": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
- "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==",
- "dev": true
- },
"node_modules/globby": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
@@ -3296,12 +3288,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/globrex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
- "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
- "dev": true
- },
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
@@ -5716,16 +5702,6 @@
"node": ">=0.8"
}
},
- "node_modules/tiny-glob": {
- "version": "0.2.9",
- "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
- "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
- "dev": true,
- "dependencies": {
- "globalyzer": "0.1.0",
- "globrex": "^0.1.2"
- }
- },
"node_modules/tinybench": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
diff --git a/ui/package.json b/ui/package.json
index efa3d970f..c75621b5e 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -18,7 +18,7 @@
"@hey-api/openapi-ts": "^0.53.11",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-static": "^3.0.5",
- "@sveltejs/kit": "^2.7.2",
+ "@sveltejs/kit": "^2.12.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6",
"@types/eslint": "^8.56.0",
"@types/polyline": "^0.1.32",
diff --git a/ui/src/app.css b/ui/src/app.css
index 9580eb195..bd8cce8fe 100644
--- a/ui/src/app.css
+++ b/ui/src/app.css
@@ -97,3 +97,11 @@
.maplibregl-popup-content {
background-color: hsl(var(--background)) !important;
}
+
+.maplibregl-control-container .maplibregl-ctrl-top-left {
+ max-width: 100%;
+ bottom: 1rem;
+ display: flex;
+ flex-direction: column;
+ z-index: 3;
+}
diff --git a/ui/src/app.d.ts b/ui/src/app.d.ts
index 743f07b2e..e51b83ab1 100644
--- a/ui/src/app.d.ts
+++ b/ui/src/app.d.ts
@@ -1,11 +1,19 @@
// See https://kit.svelte.dev/docs/types#app
+
+import type { Itinerary } from '$lib/openapi';
+
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
- // interface PageState {}
+ interface PageState {
+ selectedItinerary?: Itinerary;
+ selectedStop?: { name: string; stopId: string; time: Date };
+ stopArriveBy?: boolean;
+ tripId?: string;
+ }
// interface Platform {}
}
}
diff --git a/ui/src/routes/ConnectionDetail.svelte b/ui/src/lib/ConnectionDetail.svelte
similarity index 75%
rename from ui/src/routes/ConnectionDetail.svelte
rename to ui/src/lib/ConnectionDetail.svelte
index e6386fd8e..767cd6450 100644
--- a/ui/src/routes/ConnectionDetail.svelte
+++ b/ui/src/lib/ConnectionDetail.svelte
@@ -1,7 +1,7 @@
+
+
diff --git a/ui/src/routes/ItineraryGeoJSON.svelte b/ui/src/lib/ItineraryGeoJSON.svelte
similarity index 100%
rename from ui/src/routes/ItineraryGeoJSON.svelte
rename to ui/src/lib/ItineraryGeoJSON.svelte
diff --git a/ui/src/routes/ItineraryList.svelte b/ui/src/lib/ItineraryList.svelte
similarity index 72%
rename from ui/src/routes/ItineraryList.svelte
rename to ui/src/lib/ItineraryList.svelte
index 85f9d836a..fa9e40853 100644
--- a/ui/src/routes/ItineraryList.svelte
+++ b/ui/src/lib/ItineraryList.svelte
@@ -1,25 +1,44 @@
{#snippet legSummary(l: Leg)}
@@ -50,7 +69,7 @@
{
- selectedItinerary = d;
+ selectItinerary(d);
}}
/>
{/each}
@@ -58,7 +77,7 @@
{/if}
{#if r.itineraries.length !== 0}
-
+
{#each routingResponses as r, rI}
{#await r}
@@ -73,12 +92,14 @@
routingResponses.splice(
0,
0,
- plan({
- query: { ...baseQuery.query, pageCursor: r.previousPageCursor }
- }).then((x) => x.data!)
+ throwOnError(
+ plan({
+ query: { ...baseQuery.query, pageCursor: r.previousPageCursor }
+ })
+ )
);
}}
- class="px-2 py-1 bg-blue-600 hover:!bg-blue-700 text-white font-bold text-sm border rounded-lg"
+ class="px-2 py-1 bg-blue-600 hover:!bg-blue-700 text-white font-bold text-sm border rounded-lg text-nowrap"
>
{t.earlier}
@@ -88,12 +109,12 @@
{#each r.itineraries as it}