/** * engine.ts — The heart of universal-pwa. * * This class is completely framework-agnostic. It: * 1. Detects the current platform * 2. Listens for the browser's `beforeinstallprompt` event * 3. Checks stored user preferences * 4. Exposes a simple async install() method * 5. Emits events so any UI layer can react * * It has zero DOM manipulation — all UI is the responsibility of the * layer above (UIComponent or the developer's own code). */ import { EventEmitter, type EngineEvents } from './events'; import type { UniversalPWAConfig, InstallStatus } from '../types'; export declare class InstallEngine extends EventEmitter { private config; private state; private _readyResolve; readonly ready: Promise; constructor(config?: UniversalPWAConfig); private _init; private _setStatus; /** * Programmatically trigger the install flow. * * On Chrome/Android/Desktop: calls the deferred browser prompt. * On iOS: this is a no-op — the UI layer should show manual instructions. * Returns the user's outcome: 'accepted' | 'dismissed' | 'ios' | 'unsupported' */ install(): Promise<'accepted' | 'dismissed' | 'ios' | 'unsupported'>; /** * Record that the user dismissed the prompt and emit the event. */ dismiss(): void; /** * Resets all stored state. Useful for dev/testing. */ reset(): void; get status(): InstallStatus; get platform(): import("..").Platform; get isInstallable(): boolean; get isInstalled(): boolean; }