/** * Ambient declarations for app-wide constants and virtual modules. * * - `virtual:pwa-register/svelte` is provided at build time by * `vite-plugin-pwa`'s Svelte helper (Fase 14.1). vite-plugin-pwa ships * `svelte.d.ts` for this but TypeScript only picks it up if the path * is referenced; declaring the module here inlines the (small) surface * without coupling to the package's internal layout. * * - `__APP_VERSION__`, `__APP_COMMIT__`, `__BUILD_TIME__` (Fase 14.3) * are replaced literally by Vite at build time via the `define` * option in `vite.config.ts`. They're consumed exclusively through * `$lib/version.ts` — never inline — so tree-shaking can't drop * the build-time substitution. */ declare module 'virtual:pwa-register/svelte' { import type { Writable } from 'svelte/store'; export interface RegisterSWOptions { immediate?: boolean; onNeedRefresh?: () => void; onOfflineReady?: () => void; onRegisteredSW?: ( swScriptUrl: string, registration: ServiceWorkerRegistration | undefined ) => void; onRegisterError?: (error: unknown) => void; } export function useRegisterSW(options?: RegisterSWOptions): { needRefresh: Writable; offlineReady: Writable; updateServiceWorker: (reloadPage?: boolean) => Promise; }; } declare const __APP_VERSION__: string; declare const __APP_COMMIT__: string; declare const __BUILD_TIME__: string;