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>
26 lines
963 B
TypeScript
26 lines
963 B
TypeScript
import { Strategy } from './Strategy.js';
|
|
import { StrategyHandler } from './StrategyHandler.js';
|
|
import './_version.js';
|
|
/**
|
|
* An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only)
|
|
* request strategy.
|
|
*
|
|
* This class is useful if you want to take advantage of any
|
|
* [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).
|
|
*
|
|
* If there is no cache match, this will throw a `WorkboxError` exception.
|
|
*
|
|
* @extends workbox-strategies.Strategy
|
|
* @memberof workbox-strategies
|
|
*/
|
|
declare class CacheOnly extends Strategy {
|
|
/**
|
|
* @private
|
|
* @param {Request|string} request A request to run this strategy for.
|
|
* @param {workbox-strategies.StrategyHandler} handler The event that
|
|
* triggered the request.
|
|
* @return {Promise<Response>}
|
|
*/
|
|
_handle(request: Request, handler: StrategyHandler): Promise<Response>;
|
|
}
|
|
export { CacheOnly };
|