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

View file

@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _core = require("@babel/core");
var _default = exports.default = (0, _helperPluginUtils.declare)(api => {
api.assertVersion(7);
return {
name: "transform-member-expression-literals",
visitor: {
MemberExpression: {
exit({
node
}) {
const prop = node.property;
if (!node.computed && _core.types.isIdentifier(prop) && !_core.types.isValidES3Identifier(prop.name)) {
node.property = _core.types.stringLiteral(prop.name);
node.computed = true;
}
}
}
}
};
});
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"names":["_helperPluginUtils","require","_core","_default","exports","default","declare","api","assertVersion","name","visitor","MemberExpression","exit","node","prop","property","computed","t","isIdentifier","isValidES3Identifier","stringLiteral"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n return {\n name: \"transform-member-expression-literals\",\n\n visitor: {\n MemberExpression: {\n exit({ node }) {\n const prop = node.property;\n if (\n !node.computed &&\n t.isIdentifier(prop) &&\n !t.isValidES3Identifier(prop.name)\n ) {\n // foo.default -> foo[\"default\"]\n node.property = t.stringLiteral(prop.name);\n node.computed = true;\n }\n },\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAyC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE1B,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAkB,CAAE,CAAC;EAEtC,OAAO;IACLC,IAAI,EAAE,sCAAsC;IAE5CC,OAAO,EAAE;MACPC,gBAAgB,EAAE;QAChBC,IAAIA,CAAC;UAAEC;QAAK,CAAC,EAAE;UACb,MAAMC,IAAI,GAAGD,IAAI,CAACE,QAAQ;UAC1B,IACE,CAACF,IAAI,CAACG,QAAQ,IACdC,WAAC,CAACC,YAAY,CAACJ,IAAI,CAAC,IACpB,CAACG,WAAC,CAACE,oBAAoB,CAACL,IAAI,CAACL,IAAI,CAAC,EAClC;YAEAI,IAAI,CAACE,QAAQ,GAAGE,WAAC,CAACG,aAAa,CAACN,IAAI,CAACL,IAAI,CAAC;YAC1CI,IAAI,CAACG,QAAQ,GAAG,IAAI;UACtB;QACF;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}