import type { RoutePreviewArtifactResolution } from './routePreview.js'; import type { RoutePreviewArtifactV3Status } from './routePreviewArtifactV3.js'; export interface RoutePreviewArtifactStatusInput { stale: boolean; resolution: RoutePreviewArtifactResolution; captureStatus?: RoutePreviewArtifactV3Status; diagnostic?: string; liveInteractionReady?: boolean; } export interface RoutePreviewArtifactStatusPresentation { title: string; detail: string; tone: 'info' | 'warning' | 'error'; role: 'status' | 'alert'; retryable: boolean; } export type StaticRoutePreviewSurface = 'screenshot' | 'dom' | 'none'; /** * Background canvas frames prefer the already captured bitmap. Reconstructing * every frozen DOM tree at once blocks the editor main thread; the selected * frame still promotes to the live/detailed path independently. * * The bitmap stops being enough when the camera magnifies a frame beyond the * screenshot's pixel density — a design surface must not look like a blurry * screenshot under zoom. `magnifiedPastBitmap` (the frame LOD controller's * density signal, gated on the `full` tier) trades the screenshot for the * frozen DOM tree; at magnifying zoom levels only a handful of frames fit the * viewport, so reconstruction stays bounded. * * A frame under preview intent (`preparedForPromotion`) also mounts its * frozen DOM: the mounted preview is what the D2 bootless promotion imports * from, so hovering prepares a ~50ms activation instead of a live boot. * Intent slots are LRU-bounded, so preparation stays bounded too. */ export declare function resolveStaticRoutePreviewSurface({ hasScreenshot, hasDomSnapshot, magnifiedPastBitmap, preparedForPromotion, preferDom, }: { hasScreenshot: boolean; hasDomSnapshot: boolean; magnifiedPastBitmap?: boolean; preparedForPromotion?: boolean; /** * Host preference: mount the frozen DOM from the start. On per-section * canvases a canvas holds a section's worth of frames, so the whole-catalog * reconstruction concern behind bitmap-first no longer applies, and every * frame stays promotion-ready without a mount wait. */ preferDom?: boolean; }): StaticRoutePreviewSurface; /** Turns artifact freshness and capture state into one unambiguous frame badge. */ export declare function resolveRoutePreviewArtifactStatus({ stale, resolution, captureStatus, diagnostic, liveInteractionReady, }: RoutePreviewArtifactStatusInput): RoutePreviewArtifactStatusPresentation | null;