/** * Viewport-size media queries for frozen shadow previews. * * A shadow root has no viewport of its own, so `@media (max-width: …)` inside * a frozen document is judged against the editor window instead of the frame: * a 480px frame in a 1600px editor draws its desktop layout. The frame box is * a named size container (`:host`), and size conditions are rewritten into * container queries on it. Conditions that are not about the viewport size * (print, prefers-*, hover, device-*) stay media queries, and a query that * cannot be split that way is kept as written and reported. */ /** The container name the frozen preview host carries; app containers never answer to it. */ export declare const PREVIEW_VIEWPORT_CONTAINER = "pygmalion-viewport"; export interface PreviewMediaScope { cssText: string; /** Size-dependent media the rewrite could not express; the frame may draw at the editor window's size. */ issues: string[]; } export type PreviewMediaConversion = { kind: 'keep'; } | { kind: 'never'; } | { kind: 'container'; condition: string; } | { kind: 'nested'; media: string; condition: string; } | { kind: 'unsupported'; reason: string; }; /** Converts one `@media` prelude, or says why it stays as written. */ export declare function convertPreviewMediaPrelude(prelude: string): PreviewMediaConversion; /** * Rewrites the size conditions of every `@media` rule, at any nesting depth, * into container queries on the preview viewport. Comments and strings are * copied untouched. */ export declare function scopeViewportMediaToPreviewContainer(cssText: string): PreviewMediaScope; /** * The media condition of a `