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
78
pwa/node_modules/@vitest/mocker/dist/mocker-pQgp1HFr.d.ts
generated
vendored
Normal file
78
pwa/node_modules/@vitest/mocker/dist/mocker-pQgp1HFr.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
import { MaybeMockedDeep } from '@vitest/spy';
|
||||
import { l as ModuleMockOptions, k as ModuleMockFactoryWithHelper, g as MockedModule, c as MockerRegistry, M as MockedModuleType } from './types-DZOqTgiN.js';
|
||||
|
||||
interface CompilerHintsOptions {
|
||||
/**
|
||||
* This is the key used to access the globalThis object in the worker.
|
||||
* Unlike `globalThisAccessor` in other APIs, this is not injected into the script.
|
||||
* ```ts
|
||||
* // globalThisKey: '__my_variable__' produces:
|
||||
* globalThis['__my_variable__']
|
||||
* // globalThisKey: '"__my_variable__"' produces:
|
||||
* globalThis['"__my_variable__"'] // notice double quotes
|
||||
* ```
|
||||
* @default '__vitest_mocker__'
|
||||
*/
|
||||
globalThisKey?: string;
|
||||
}
|
||||
interface ModuleMockerCompilerHints {
|
||||
hoisted: <T>(factory: () => T) => T;
|
||||
mock: (path: string | Promise<unknown>, factory?: ModuleMockOptions | ModuleMockFactoryWithHelper) => void;
|
||||
unmock: (path: string | Promise<unknown>) => void;
|
||||
doMock: (path: string | Promise<unknown>, factory?: ModuleMockOptions | ModuleMockFactoryWithHelper) => void;
|
||||
doUnmock: (path: string | Promise<unknown>) => void;
|
||||
importActual: <T>(path: string) => Promise<T>;
|
||||
importMock: <T>(path: string) => Promise<MaybeMockedDeep<T>>;
|
||||
}
|
||||
declare function createCompilerHints(options?: CompilerHintsOptions): ModuleMockerCompilerHints;
|
||||
|
||||
interface ModuleMockerInterceptor {
|
||||
register: (module: MockedModule) => Promise<void>;
|
||||
delete: (url: string) => Promise<void>;
|
||||
invalidate: () => void;
|
||||
}
|
||||
|
||||
declare class ModuleMocker {
|
||||
private interceptor;
|
||||
private rpc;
|
||||
private spyOn;
|
||||
private config;
|
||||
protected registry: MockerRegistry;
|
||||
private queue;
|
||||
private mockedIds;
|
||||
constructor(interceptor: ModuleMockerInterceptor, rpc: ModuleMockerRPC, spyOn: (obj: any, method: string | symbol) => any, config: ModuleMockerConfig);
|
||||
prepare(): Promise<void>;
|
||||
resolveFactoryModule(id: string): Promise<Record<string | symbol, any>>;
|
||||
getFactoryModule(id: string): any;
|
||||
invalidate(): Promise<void>;
|
||||
importActual<T>(id: string, importer: string): Promise<T>;
|
||||
importMock<T>(rawId: string, importer: string): Promise<T>;
|
||||
mockObject(object: Record<string | symbol, any>, moduleType?: MockedModuleType): Record<string | symbol, any>;
|
||||
queueMock(rawId: string, importer: string, factoryOrOptions?: ModuleMockOptions | (() => any)): void;
|
||||
queueUnmock(id: string, importer: string): void;
|
||||
wrapDynamicImport<T>(moduleFactory: () => Promise<T>): Promise<T>;
|
||||
private resolveMockPath;
|
||||
}
|
||||
interface ResolveIdResult {
|
||||
id: string;
|
||||
url: string;
|
||||
optimized: boolean;
|
||||
}
|
||||
interface ResolveMockResul {
|
||||
mockType: MockedModuleType;
|
||||
resolvedId: string;
|
||||
redirectUrl?: string | null;
|
||||
needsInterop?: boolean;
|
||||
}
|
||||
interface ModuleMockerRPC {
|
||||
invalidate: (ids: string[]) => Promise<void>;
|
||||
resolveId: (id: string, importer: string) => Promise<ResolveIdResult | null>;
|
||||
resolveMock: (id: string, importer: string, options: {
|
||||
mock: 'spy' | 'factory' | 'auto';
|
||||
}) => Promise<ResolveMockResul>;
|
||||
}
|
||||
interface ModuleMockerConfig {
|
||||
root: string;
|
||||
}
|
||||
|
||||
export { type CompilerHintsOptions as C, type ModuleMockerInterceptor as M, type ResolveIdResult as R, type ModuleMockerCompilerHints as a, ModuleMocker as b, createCompilerHints as c, type ModuleMockerConfig as d, type ModuleMockerRPC as e, type ResolveMockResul as f };
|
||||
Loading…
Add table
Add a link
Reference in a new issue