import type { ArtifactKind, SupportedSdkAbiVersion } from "./artifact-protocol.ts"; import { type BundledImageAsset } from "./image-assets.ts"; import { type RenderProfile } from "./render-profile.ts"; import type { RationalTime } from "./time.ts"; import type { ArtifactHostOptions, ArtifactSubject, ModifierFill } from "./integration-types.ts"; export interface CompiledArtifactComposition { readonly width: number; readonly height: number; readonly fps: number; readonly fpsSource: string; readonly durationInFrames: number; } export interface CompiledArtifactFont { readonly family: string; readonly source: string; readonly sha256: string; readonly dataUrl?: string; } export interface BrowserBundleSnapshot { readonly javascript: string; readonly css: string; readonly hash: string; readonly imageAssets?: readonly BundledImageAsset[]; } export interface DynamicSubjectSample { readonly dataUrl: string; readonly digest: string; readonly png: Uint8Array; } /** @deprecated Dynamic subjects belong to a timeline runtime request, never a compiled artifact. */ export type DynamicSubjectProvider = (time: RationalTime, signal?: AbortSignal) => Promise; export interface CompiledArtifactDesignPreview { readonly composition: Readonly<{ width: number; height: number; durationSeconds: number; }>; readonly props: Readonly>; readonly fonts?: readonly Readonly<{ family: string; source: string; }>[]; readonly seed?: number; readonly player?: Readonly>; readonly motion?: Readonly<{ startFrame?: number; durationInFrames?: number; fill?: ModifierFill; }>; readonly textSubject?: string; } export interface CompiledVisualArtifact { readonly sdkAbiVersion: SupportedSdkAbiVersion; readonly renderer: "dom-timeline" | "dom-timeline-ffmpeg-video"; readonly kind: ArtifactKind; readonly name: string; readonly snapshotId: string; readonly entryPath: string; /** @deprecated Functions cannot cross the evaluator seam; runtime never returns this field. */ readonly sourceArtifact?: unknown; readonly bundleSnapshot: BrowserBundleSnapshot; readonly designPreview: CompiledArtifactDesignPreview; readonly static: boolean; readonly useDesignPreview: boolean; readonly schema: Readonly>>>; readonly props: Readonly>; readonly propsDigest: string; readonly dependencies: readonly string[]; readonly dependencyDigest: string; readonly composition: CompiledArtifactComposition; readonly fonts: readonly CompiledArtifactFont[]; readonly seed: number; readonly renderProfile: RenderProfile; readonly supportsTextMotion?: boolean; readonly videoComposition?: "ffmpeg"; readonly modifier?: { readonly startFrame: number; readonly durationInFrames: number; readonly fill: ModifierFill; }; /** @deprecated Use modifier. Kept for ABI 1/1.1 Motion consumers. */ readonly motion?: { readonly startFrame: number; readonly durationInFrames: number; readonly fill: ModifierFill; }; readonly textSubject?: string; } export interface CompileVisualArtifactOptions { readonly mode?: "design-preview" | "production"; readonly sourceRoot?: string; readonly resourceRoots?: readonly string[]; readonly signal?: AbortSignal; readonly entryPath?: string; /** @deprecated Only default is accepted; this field will be removed next major. */ readonly exportName?: "default"; readonly props?: Readonly>; readonly composition?: { readonly width: number; readonly height: number; readonly fps: number; readonly fpsSource?: string; readonly durationInFrames: number; }; readonly fonts?: readonly { readonly family: string; readonly source: string; }[]; readonly seed?: number; /** @deprecated ReactNode values cannot cross the secure evaluator seam. */ readonly subject?: ArtifactSubject; readonly modifier?: CompiledVisualArtifact["modifier"]; /** @deprecated Use modifier. */ readonly motion?: CompiledVisualArtifact["motion"]; readonly textSubject?: string; readonly snapshotId?: string; /** @deprecated Supply this to the timeline runtime instead. */ readonly dynamicSubjectProvider?: DynamicSubjectProvider; } export declare function compileVisualArtifact(options: CompileVisualArtifactOptions, integration: ArtifactHostOptions): Promise; //# sourceMappingURL=artifact-compiler.d.ts.map