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:
parent
46365b713b
commit
e8428de775
12051 changed files with 1799735 additions and 0 deletions
19
pwa/node_modules/workbox-routing/utils/constants.d.ts
generated
vendored
Normal file
19
pwa/node_modules/workbox-routing/utils/constants.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import '../_version.js';
|
||||
export type HTTPMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT';
|
||||
/**
|
||||
* The default HTTP method, 'GET', used when there's no specific method
|
||||
* configured for a route.
|
||||
*
|
||||
* @type {string}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const defaultMethod: HTTPMethod;
|
||||
/**
|
||||
* The list of valid HTTP methods associated with requests that could be routed.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const validMethods: HTTPMethod[];
|
||||
32
pwa/node_modules/workbox-routing/utils/constants.js
generated
vendored
Normal file
32
pwa/node_modules/workbox-routing/utils/constants.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
Copyright 2018 Google LLC
|
||||
|
||||
Use of this source code is governed by an MIT-style
|
||||
license that can be found in the LICENSE file or at
|
||||
https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
import '../_version.js';
|
||||
/**
|
||||
* The default HTTP method, 'GET', used when there's no specific method
|
||||
* configured for a route.
|
||||
*
|
||||
* @type {string}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const defaultMethod = 'GET';
|
||||
/**
|
||||
* The list of valid HTTP methods associated with requests that could be routed.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const validMethods = [
|
||||
'DELETE',
|
||||
'GET',
|
||||
'HEAD',
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
];
|
||||
1
pwa/node_modules/workbox-routing/utils/constants.mjs
generated
vendored
Normal file
1
pwa/node_modules/workbox-routing/utils/constants.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from './constants.js';
|
||||
10
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.d.ts
generated
vendored
Normal file
10
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { Router } from '../Router.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Creates a new, singleton Router instance if one does not exist. If one
|
||||
* does already exist, that instance is returned.
|
||||
*
|
||||
* @private
|
||||
* @return {Router}
|
||||
*/
|
||||
export declare const getOrCreateDefaultRouter: () => Router;
|
||||
26
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js
generated
vendored
Normal file
26
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Copyright 2019 Google LLC
|
||||
|
||||
Use of this source code is governed by an MIT-style
|
||||
license that can be found in the LICENSE file or at
|
||||
https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
import { Router } from '../Router.js';
|
||||
import '../_version.js';
|
||||
let defaultRouter;
|
||||
/**
|
||||
* Creates a new, singleton Router instance if one does not exist. If one
|
||||
* does already exist, that instance is returned.
|
||||
*
|
||||
* @private
|
||||
* @return {Router}
|
||||
*/
|
||||
export const getOrCreateDefaultRouter = () => {
|
||||
if (!defaultRouter) {
|
||||
defaultRouter = new Router();
|
||||
// The helpers that use the default Router assume these listeners exist.
|
||||
defaultRouter.addFetchListener();
|
||||
defaultRouter.addCacheListener();
|
||||
}
|
||||
return defaultRouter;
|
||||
};
|
||||
1
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.mjs
generated
vendored
Normal file
1
pwa/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from './getOrCreateDefaultRouter.js';
|
||||
10
pwa/node_modules/workbox-routing/utils/normalizeHandler.d.ts
generated
vendored
Normal file
10
pwa/node_modules/workbox-routing/utils/normalizeHandler.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { RouteHandler, RouteHandlerObject } from 'workbox-core/types.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* @param {function()|Object} handler Either a function, or an object with a
|
||||
* 'handle' method.
|
||||
* @return {Object} An object with a handle method.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export declare const normalizeHandler: (handler: RouteHandler) => RouteHandlerObject;
|
||||
40
pwa/node_modules/workbox-routing/utils/normalizeHandler.js
generated
vendored
Normal file
40
pwa/node_modules/workbox-routing/utils/normalizeHandler.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2018 Google LLC
|
||||
|
||||
Use of this source code is governed by an MIT-style
|
||||
license that can be found in the LICENSE file or at
|
||||
https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
import { assert } from 'workbox-core/_private/assert.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* @param {function()|Object} handler Either a function, or an object with a
|
||||
* 'handle' method.
|
||||
* @return {Object} An object with a handle method.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
export const normalizeHandler = (handler) => {
|
||||
if (handler && typeof handler === 'object') {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
assert.hasMethod(handler, 'handle', {
|
||||
moduleName: 'workbox-routing',
|
||||
className: 'Route',
|
||||
funcName: 'constructor',
|
||||
paramName: 'handler',
|
||||
});
|
||||
}
|
||||
return handler;
|
||||
}
|
||||
else {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
assert.isType(handler, 'function', {
|
||||
moduleName: 'workbox-routing',
|
||||
className: 'Route',
|
||||
funcName: 'constructor',
|
||||
paramName: 'handler',
|
||||
});
|
||||
}
|
||||
return { handle: handler };
|
||||
}
|
||||
};
|
||||
1
pwa/node_modules/workbox-routing/utils/normalizeHandler.mjs
generated
vendored
Normal file
1
pwa/node_modules/workbox-routing/utils/normalizeHandler.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from './normalizeHandler.js';
|
||||
Loading…
Add table
Add a link
Reference in a new issue