a90c8a9354
Battery nudge:
- lib/batteryPlan: project SoC through the planned stops using current
Tesla battery (or 80% default), 85% of rated range, and conservative
per-stop charge rates (Supercharger 1.5%/min, dest charger 0.4%/min).
- LegRow shows "arrive X%" plus a tone (red/amber/transparent) and a
TIGHT / WON'T REACH chip if the projected arrival is below 15%/5%.
- Top-of-itinerary banner when any leg is danger or warning, naming the
current SoC source (live Tesla vs assumed 80%).
PWA / offline:
- vite-plugin-pwa with autoUpdate strategy; ServiceWorker registered in
main.tsx (prod-only).
- Workbox cache strategies:
map tiles CacheFirst, 30 days, 800 entries
nominatim/OSRM NetworkFirst with cached fallback
/api/* NetworkFirst, short TTL, last response stays usable
- App shell precached so the planner renders offline; navigateFallback
ensures deep links serve index.html without a network round trip.
- manifest.webmanifest + theme-color + favicon.svg (replaces dead
/tesla-icon.svg reference). Installable to home screen.
- Sonner toasts on offline-ready and update-available.
42 lines
1.0 KiB
JSON
42 lines
1.0 KiB
JSON
{
|
|
"name": "tesla-roadtrip-client",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@tonycodes/auth-react": "^1.4.0",
|
|
"dompurify": "^3.2.4",
|
|
"framer-motion": "^11.0.0",
|
|
"leaflet": "^1.9.4",
|
|
"lucide-react": "^0.303.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-leaflet": "^4.2.1",
|
|
"react-resizable-panels": "^2.1.7",
|
|
"react-router-dom": "^6.21.1",
|
|
"sonner": "^1.4.0",
|
|
"tailwind-merge": "^2.2.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/dompurify": "^3.0.5",
|
|
"@types/leaflet": "^1.9.14",
|
|
"@types/node": "^20.10.0",
|
|
"@types/react": "^18.2.47",
|
|
"@types/react-dom": "^18.2.18",
|
|
"@vitejs/plugin-react": "^4.2.1",
|
|
"autoprefixer": "^10.4.16",
|
|
"postcss": "^8.4.32",
|
|
"tailwindcss": "^3.4.0",
|
|
"typescript": "^5.3.2",
|
|
"vite": "^5.0.8",
|
|
"vite-plugin-pwa": "^1.3.0",
|
|
"workbox-window": "^7.4.1"
|
|
}
|
|
}
|