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

21
pwa/node_modules/tinyrainbow/LICENCE generated vendored Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Tinylibs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

28
pwa/node_modules/tinyrainbow/README.md generated vendored Normal file
View file

@ -0,0 +1,28 @@
# tinyrainbow
Output your colorful messages in the terminal or browser console that support ANSI colors (Chrome engines).
A small (`~ 6 kB` unpacked) fork of [picocolors](https://www.npmjs.com/package/picocolors) with support for `exports` field.
Supports only ESM.
## Installing
```bash
# with npm
$ npm install -D tinyrainbow
# with pnpm
$ pnpm add -D tinyrainbow
# with yarn
$ yarn add -D tinyrainbow
```
## Usage
```js
import c from 'tinyrainbow'
console.log(c.red(c.bold('Hello World!')))
```

6
pwa/node_modules/tinyrainbow/dist/browser.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import { C as Colors } from './index-c1cfc5e9.js';
export { F as Formatter, c as createColors, g as getDefaultColors, i as isSupported } from './index-c1cfc5e9.js';
declare const _default: Colors;
export { Colors, _default as default };

14
pwa/node_modules/tinyrainbow/dist/browser.js generated vendored Normal file
View file

@ -0,0 +1,14 @@
import {
a as r,
b as e,
c as o
} from "./chunk-BVHSVHOK.js";
// src/browser.ts
var f = o(!1);
export {
o as createColors,
f as default,
r as getDefaultColors,
e as isSupported
};

90
pwa/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js generated vendored Normal file
View file

@ -0,0 +1,90 @@
// src/index.ts
var f = {
reset: [0, 0],
bold: [1, 22, "\x1B[22m\x1B[1m"],
dim: [2, 22, "\x1B[22m\x1B[2m"],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29],
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39],
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}, h = Object.entries(f);
function a(n) {
return String(n);
}
a.open = "";
a.close = "";
var B = /* @__PURE__ */ h.reduce(
(n, [e]) => (n[e] = a, n),
{ isColorSupported: !1 }
);
function m() {
return { ...B };
}
function C(n = !1) {
let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
}
function p(n = !1) {
let e = C(n), i = (r, t, c, o) => {
let l = "", s = 0;
do
l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
while (~o);
return l + r.substring(s);
}, g = (r, t, c = r) => {
let o = (l) => {
let s = String(l), b = s.indexOf(t, r.length);
return ~b ? r + i(s, t, c, b) + t : r + s + t;
};
return o.open = r, o.close = t, o;
}, u = {
isColorSupported: e
}, d = (r) => `\x1B[${r}m`;
for (let [r, t] of h)
u[r] = e ? g(
d(t[0]),
d(t[1]),
t[2]
) : a;
return u;
}
export {
m as a,
C as b,
p as c
};

61
pwa/node_modules/tinyrainbow/dist/index-c1cfc5e9.d.ts generated vendored Normal file
View file

@ -0,0 +1,61 @@
declare const colorsMap: {
readonly reset: readonly [0, 0];
readonly bold: readonly [1, 22, "\u001B[22m\u001B[1m"];
readonly dim: readonly [2, 22, "\u001B[22m\u001B[2m"];
readonly italic: readonly [3, 23];
readonly underline: readonly [4, 24];
readonly inverse: readonly [7, 27];
readonly hidden: readonly [8, 28];
readonly strikethrough: readonly [9, 29];
readonly black: readonly [30, 39];
readonly red: readonly [31, 39];
readonly green: readonly [32, 39];
readonly yellow: readonly [33, 39];
readonly blue: readonly [34, 39];
readonly magenta: readonly [35, 39];
readonly cyan: readonly [36, 39];
readonly white: readonly [37, 39];
readonly gray: readonly [90, 39];
readonly bgBlack: readonly [40, 49];
readonly bgRed: readonly [41, 49];
readonly bgGreen: readonly [42, 49];
readonly bgYellow: readonly [43, 49];
readonly bgBlue: readonly [44, 49];
readonly bgMagenta: readonly [45, 49];
readonly bgCyan: readonly [46, 49];
readonly bgWhite: readonly [47, 49];
readonly blackBright: readonly [90, 39];
readonly redBright: readonly [91, 39];
readonly greenBright: readonly [92, 39];
readonly yellowBright: readonly [93, 39];
readonly blueBright: readonly [94, 39];
readonly magentaBright: readonly [95, 39];
readonly cyanBright: readonly [96, 39];
readonly whiteBright: readonly [97, 39];
readonly bgBlackBright: readonly [100, 49];
readonly bgRedBright: readonly [101, 49];
readonly bgGreenBright: readonly [102, 49];
readonly bgYellowBright: readonly [103, 49];
readonly bgBlueBright: readonly [104, 49];
readonly bgMagentaBright: readonly [105, 49];
readonly bgCyanBright: readonly [106, 49];
readonly bgWhiteBright: readonly [107, 49];
};
interface Formatter {
(input?: unknown): string;
open: string;
close: string;
}
type ColorName = keyof typeof colorsMap;
type ColorsMethods = {
[Key in ColorName]: Formatter;
};
type Colors = ColorsMethods & {
isColorSupported: boolean;
reset: (input: unknown) => string;
};
declare function getDefaultColors(): Colors;
declare function isSupported(isTTY?: boolean): boolean;
declare function createColors(isTTY?: boolean): Colors;
export { Colors as C, Formatter as F, createColors as c, getDefaultColors as g, isSupported as i };

6
pwa/node_modules/tinyrainbow/dist/node.d.ts generated vendored Normal file
View file

@ -0,0 +1,6 @@
import { C as Colors } from './index-c1cfc5e9.js';
export { F as Formatter, c as createColors, g as getDefaultColors, i as isSupported } from './index-c1cfc5e9.js';
declare const _default: Colors;
export { Colors, _default as default };

15
pwa/node_modules/tinyrainbow/dist/node.js generated vendored Normal file
View file

@ -0,0 +1,15 @@
import {
a as t,
b as e,
c as o
} from "./chunk-BVHSVHOK.js";
// src/node.ts
import { isatty as r } from "tty";
var p = o(r(1));
export {
o as createColors,
p as default,
t as getDefaultColors,
e as isSupported
};

36
pwa/node_modules/tinyrainbow/package.json generated vendored Normal file
View file

@ -0,0 +1,36 @@
{
"name": "tinyrainbow",
"version": "1.2.0",
"description": "A small library to print colourful messages.",
"type": "module",
"main": "./dist/node.js",
"module": "./dist/browser.js",
"browser": "./dist/browser.js",
"types": "./dist/node.d.ts",
"exports": {
"types": "./dist/node.d.ts",
"node": "./dist/node.js",
"browser": "./dist/browser.js",
"import": "./dist/browser.js",
"default": "./dist/browser.js"
},
"files": [
"dist/**"
],
"repository": {
"type": "git",
"url": "git+https://github.com/tinylibs/tinyrainbow.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/tinylibs/tinyrainbow/issues"
},
"homepage": "https://github.com/tinylibs/tinyrainbow#readme",
"keywords": [
"colors",
"tty"
],
"engines": {
"node": ">=14.0.0"
}
}