/** * Stash/adopt across re-key / re-parent (API §10). A live window handed off across * an unmount so a remount can ADOPT it instead of closing + reloading it. Mirrors * ShellProvider's deferred-teardown pattern: the unmounting host stashes the * record, and either the remount takes it (one macrotask) or it disposes. */ import type { Window } from '@astrale-os/shell'; import type { WindowState } from './lifecycle/states.js'; import type { StageSlot } from './placement.js'; export interface AdoptRecord { readonly windowId: string; readonly window: Window; readonly slot: StageSlot; readonly state: WindowState; /** Close the window, release its slot, drop it from the registry (fired if unadopted). */ dispose(): void; } export interface AdoptStash { /** Stash an unmounting host's live window; disposes after one macrotask if unadopted. */ stash(key: string, record: AdoptRecord): void; /** Reclaim a stashed window for a remount of the same source, cancelling its dispose. */ take(key: string): AdoptRecord | null; } /** The pending-adoption registry — one per stage hub. */ export declare function createAdoptStash(): AdoptStash; //# sourceMappingURL=adopt.d.ts.map