import type { RoutePreviewCache } from './routePreview.js'; import type { EditorDeclarations } from './declarations.js'; import type { PageModel } from './store.js'; /** * The preview environment of one page: its own declared environment, plus the * host's preview-environment override when the page is the active one. * * `active` is required rather than looked up. This module used to default it * to a read of the store's active page, and inside a MobX observer render that * read subscribed the component to every selection change — which is how a * single click once re-rendered all 79 frames. A caller knows whether its page * is active (FrameView receives it as a prop; a store-side caller compares * ids), and passing it keeps the computation free of any store. */ export declare function pagePreviewEnvironment(declarations: Pick, page: PageModel, active: boolean): import("./designImport.js").StoryboardEnvironment | undefined; /** What a cache key needs from the preview cache: its namespace and its key format. */ export type RoutePreviewKeySource = Pick; /** What a cache key needs from a runtime: its preview cache and its host declarations. */ export interface RoutePreviewKeyRuntime { readonly previews: RoutePreviewKeySource; readonly declarations: EditorDeclarations; } /** * The recipe cache key of one page in one runtime's cache. `active` is * forwarded to pagePreviewEnvironment — see its note on selection reactivity. */ export declare function routePreviewCacheKey(runtime: RoutePreviewKeyRuntime, page: PageModel, previewRevision: string, active: boolean, viewport?: { width: number; height: number; }): string;