import type { ArtifactBundle, ArtifactLibraryKey } from './artifact-bundle.js';
import { type AssetResolution } from './artifact-asset-resolution.js';
/** The neutral gray the hosted app presents artifacts on. The web stage rule
 *  (.artifact-stage[data-view-mode='fullscreen'] in ArtifactEntityView.svelte)
 *  must use the same value — a source-sync test pins it. */
export declare const ARTIFACT_PRESENT_BACKDROP = "#4a4a4a";
/** Shared dead-band for content-size churn, in px. Single-sourced HERE (core)
 *  so the iframe runtime — which interpolates it into its injected reporter
 *  script below — and the web host's per-slot recorder (which re-exports this
 *  through artifact-view-state.ts) can never drift apart: a tuning change one
 *  side silently filtered out would ship as a no-op. */
export declare const CONTENT_SIZE_DEAD_BAND_PX = 8;
export type ArtifactExportExtension = 'html' | 'png' | 'pdf';
/** Where this render runs (eng review D2 — host mode is EXPLICIT):
 *   - `iframe`: a live host owns the chrome (selection outlines, zoom/pan,
 *     overview scaling, presentation controls). The runtime is interactive and
 *     emits its state to the parent via postMessage. The in-app canvas + the
 *     public share/present page.
 *   - `none`: no host. The downloaded standalone HTML and the headless
 *     Playwright render. The runtime owns minimal self-contained chrome (step
 *     frames + self-fit), capability-frozen at today's export parity — a fence,
 *     not a growth surface. */
export type ArtifactRenderHost = 'iframe' | 'none';
export type ArtifactRenderContextName = 'editor' | 'fullscreen' | 'export';
export type ArtifactCanvasTool = 'pointer' | 'hand';
export type ArtifactLibrarySourceKey = ArtifactLibraryKey | 'threeCore';
export type ArtifactLibrarySources = Partial<Record<ArtifactLibrarySourceKey, string>>;
export declare function artifactExportFilename(bundle: Pick<ArtifactBundle, 'artifactId' | 'title'>, extension?: ArtifactExportExtension): string;
/** How workspace-asset refs resolve in THIS render — drives both the URL
 *  rewrite and the document CSP from one value (see
 *  artifact-asset-resolution.ts). */
export interface ArtifactRenderContext {
    host: ArtifactRenderHost;
    /** The render surface. Drives the `data-artifact-context` attribute + runtime
     *  gating. For host `iframe` it defaults to `editor`. For host `none` it may
     *  be left undefined — a plain self-contained export with no context chrome
     *  (the bare `buildArtifactHtmlExport(bundle)` case). */
    context?: ArtifactRenderContextName;
    tool?: ArtifactCanvasTool;
    assets?: AssetResolution;
    librarySources?: ArtifactLibrarySources;
    /** Base URL for the headless (Playwright) render path so root-relative
     *  `/api/assets/...` URLs resolve in a `setContent` document. The CSP's
     *  `base-uri` is widened to exactly this origin. Never set on the standalone
     *  HTML export — a downloaded file must not phone home. (host: 'none' only) */
    baseHref?: string;
    /** Emit the render-host styles (export-frame flattening, print pagination,
     *  in-document present backdrop). The Playwright + standalone-export paths
     *  set it; the in-app iframe never does. (host: 'none' only) */
    includeRenderHostStyles?: boolean;
}
/**
 * THE single artifact document builder (eng review D2). Every render context —
 * in-app canvas, public share/present page, downloaded standalone HTML, and the
 * headless Playwright render — produces its HTML here, from one set of
 * content-processing helpers and one runtime. `host` selects the document SHAPE
 * (a live-hosted iframe srcdoc vs a self-contained file) and the runtime's
 * capabilities; the asset CSP + URL rewrite come from the one `assets` value.
 */
export declare function buildArtifactDocument(bundle: ArtifactBundle, ctx: ArtifactRenderContext): string;
export interface ArtifactHtmlExportOptions {
    context?: 'editor' | 'fullscreen' | 'export';
    /** Base URL for the headless (Playwright) render path so root-relative
     *  `/api/assets/...` URLs resolve in a `setContent` document. The CSP's
     *  `base-uri` is widened to exactly this origin. Never set on the
     *  standalone HTML export — a downloaded file must not phone home. */
    baseHref?: string;
    includeRenderHostStyles?: boolean;
    librarySources?: ArtifactLibrarySources;
    /** How workspace-asset refs resolve in THIS render — drives both the URL
     *  rewrite and the document CSP from one value (see
     *  artifact-asset-resolution.ts). Headless PNG/PDF passes token mode; the
     *  self-contained HTML export passes relative mode. Defaults to none
     *  (no asset access). */
    assets?: AssetResolution;
}
/**
 * Self-contained HTML export + headless Playwright render. A thin adapter over
 * {@link buildArtifactDocument} with `host: 'none'` — kept for its existing
 * callers (the export route, MCP `export_artifact`, the render service). A
 * bare call (no `context`) yields a plain self-contained file, unchanged.
 */
export declare function buildArtifactHtmlExport(bundle: ArtifactBundle, options?: ArtifactHtmlExportOptions): string;
