Add progressive web app companion for cross-platform access

Vite + TypeScript PWA that mirrors the Android app's core features:
- Pre-processed shelter data (build-time UTM33N→WGS84 conversion)
- Leaflet map with shelter markers, user location, and offline tiles
- Canvas compass arrow (ported from DirectionArrowView.kt)
- IndexedDB shelter cache with 7-day staleness check
- Service worker with CacheFirst tiles and precached app shell
- i18n for en, nb, nn (ported from Android strings.xml)
- iOS/Android compass handling with low-pass filter
- Respects user map interaction (no auto-snap on pan/zoom)
- Build revision cache-breaker for reliable SW updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-08 17:41:38 +01:00
commit e8428de775
12051 changed files with 1799735 additions and 0 deletions

46
pwa/node_modules/std-env/package.json generated vendored Normal file
View file

@ -0,0 +1,46 @@
{
"name": "std-env",
"version": "3.10.0",
"description": "Runtime agnostic JS utils",
"repository": "unjs/std-env",
"license": "MIT",
"sideEffects": false,
"type": "module",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "vitest",
"lint": "eslint . && prettier -c src test",
"lint:fix": "eslint --fix . && prettier -w src test",
"prepack": "unbuild",
"play:bun": "bun playground/bun.ts",
"play:deno": "pnpm build && deno run -A playground/deno.ts",
"play:node": "pnpm build && node playground/node.mjs",
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && pnpm typecheck && vitest run --coverage",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^24.7.2",
"@vitest/coverage-v8": "^3.2.4",
"changelogen": "^0.6.2",
"esbuild": "^0.25.10",
"eslint": "^9.37.0",
"eslint-config-unjs": "^0.5.0",
"prettier": "^3.6.2",
"rollup": "^4.52.4",
"typescript": "^5.9.3",
"unbuild": "^3.6.1",
"vitest": "^3.2.4"
},
"packageManager": "pnpm@10.18.2"
}