/** * Service Worker Registration Helper for Motor WASM * Provides utilities for registering and managing the Motor service worker in web applications. */ export interface RegistrationOptions { /** URL to the service worker script */ workerUrl?: string; /** Service worker scope */ scope?: string; /** Whether to skip waiting during update */ skipWaiting?: boolean; /** Whether to enable debug logging */ debug?: boolean; /** Callback when registration succeeds */ onSuccess?: (registration: ServiceWorkerRegistration) => void; /** Callback when registration fails */ onError?: (error: Error) => void; /** Callback when an update is found */ onUpdateFound?: (registration: ServiceWorkerRegistration) => void; /** Callback when the worker is ready */ onReady?: (registration: ServiceWorkerRegistration) => void; } /** * Registers the Motor service worker with comprehensive lifecycle management. * @param options Registration options * @returns Promise resolving to the service worker registration */ export declare function registerMotorServiceWorker(options?: RegistrationOptions): Promise; /** * Unregisters all Motor service workers. * @returns Promise resolving to whether unregistration was successful */ export declare function unregisterMotorServiceWorker(): Promise; /** * Checks if a Motor service worker is currently registered and active. * @returns Promise resolving to registration status */ export declare function getMotorServiceWorkerStatus(): Promise<{ registered: boolean; active: boolean; waiting: boolean; installing: boolean; registration?: ServiceWorkerRegistration; }>; /** * Updates the Motor service worker if an update is available. * @returns Promise resolving to whether an update was performed */ export declare function updateMotorServiceWorker(): Promise; /** * React hook for Motor service worker registration (if using React). * This is a conditional export that only works when React is available. * @param options Registration options * @returns Service worker registration state */ export declare function useMotorServiceWorker(options?: RegistrationOptions): any; /** * Utility to create a Motor service worker update prompt for the user. * @param options Prompt options * @returns Update prompt handler */ export declare function createUpdatePrompt(options?: { message?: string; confirmText?: string; cancelText?: string; onUpdate?: () => void; onCancel?: () => void; }): (registration: ServiceWorkerRegistration) => Promise; export default registerMotorServiceWorker; //# sourceMappingURL=register.d.ts.map