import type { BrowserContext } from 'playwright'; import { type RenderDocument } from '@variance-authority/core/format'; /** * Serving a resource-closed document out of what it carries. * * A document declaring itself closed brought its own bytes, and a renderer that * reaches past them for the network paints a page that depends on the day. So * every request is answered from `resources` or refused, and a refusal is * carried to the end of the render rather than swallowed: the subject that came * back is missing something, and the caller has to hear which URL. */ export declare function serveClosedResources(context: BrowserContext, document: RenderDocument, missing: Set): Promise; /** * Answer an open document's font requests as the page that declared the faces. * * A render is a `setContent` on `about:blank`, so a face the page served from * its own origin is, in the render, a cross-origin font — and a font is fetched * in CORS mode, so the browser refuses it unless the server says otherwise, and * a collector's server or a developer's has no reason to. What is left is the * fallback, in a document that names the face, and a change to that face moves * no image. The closed path does not meet this: it answers every request itself * and says so. * * Only fonts are taken over, and only for a document that carries a face: a * context with a route holds no HTTP cache, which is a cost every other render * has no reason to pay. */ export declare function serveOpenFaces(context: BrowserContext, document: RenderDocument): Promise; export declare function assertClosedResources(document: RenderDocument): void; export declare function refuseMissingResources(document: RenderDocument, missing: ReadonlySet): void; //# sourceMappingURL=resources.d.ts.map