/** Matches `@charcuterie/server`'s default build-marker URL. */ export declare const DEFAULT_DEPLOYMENT_PATH = "/__charcuterie/deployment"; /** Matches `@charcuterie/server`'s default SSE URL. */ export declare const DEFAULT_DEPLOYMENT_EVENTS_PATH = "/__charcuterie/deployment/events"; export type UseDeploymentUpdateOptions = { deploymentPath?: string; deploymentEventsPath?: string; /** `0` disables polling. SSE is normally enough. */ pollIntervalMs?: number; /** Disable when an app calls `checkForUpdate` after its own SSE reconnects. */ isEventSourceEnabled?: boolean; }; export type DeploymentUpdate = { isUpdateAvailable: boolean; /** Revalidate the marker now. Safe to call after an app SSE reconnects. */ checkForUpdate: () => Promise; /** Reload after the user has saved or finished their current work. */ reload: () => void; }; /** * Detects a replacement static SPA without taking control away from * the app. It never reloads by itself: a tab can contain unsaved * form state, so the app shows its own accessible update action and * calls `reload` only when the user is ready. * * `createStaticHandler` supplies both endpoints by default. Existing * app SSE can keep its one connection: set `isEventSourceEnabled` to * `false`, then call `checkForUpdate` in its post-reconnect callback. */ export declare const useDeploymentUpdate: ({ deploymentEventsPath, deploymentPath, isEventSourceEnabled, pollIntervalMs, }?: UseDeploymentUpdateOptions) => DeploymentUpdate; //# sourceMappingURL=useDeploymentUpdate.d.ts.map