import { type ReactElement, type ReactNode } from "react"; import type { SiteViewer } from "@opengeni/sdk"; import { type PublishedHtmlArtifactToolBridge } from "./published-html-artifact-frame.js"; /** * What the frame's Live label says when the host watches the Site for new * versions: showing the current version, loading a newer one, or unable to * check for them. */ export type SiteLiveState = "live" | "updating" | "reconnecting"; export type ArtifactSandboxProps = { html: string; height?: number | undefined; /** * Size the frame to its document's reported height (see * `PublishedHtmlArtifactFrame`); `height` is the size until the first report. */ autoHeight?: boolean | undefined; /** Upper bound for `autoHeight`, in CSS pixels; taller content scrolls inside. */ maxAutoHeight?: number | undefined; theme?: "light" | "dark" | undefined; headerControls?: ReactNode | undefined; /** * The toolbar's first control, for example the host's Back to the page the * Site was opened from. Full screen shows its own Back there instead. */ toolbarStart?: ReactNode | undefined; title: string; /** Hide the visible title/icon while retaining the accessible iframe title. */ showTitle?: boolean | undefined; /** * Wraps the visible title, so a host can attach its own menu to it (the * Site view's Copy title). Returns the title itself when absent. */ renderTitle?: ((title: ReactElement) => ReactNode) | undefined; showLiveStatus?: boolean | undefined; /** * Replaces the "Live" indicator, for example with the host's link to the * published Site. `null` shows nothing there; omit it for the default. */ liveStatus?: ReactNode | undefined; /** * The real state of the Site on screen, from a host that watches it for new * versions. `updating` and `reconnecting` show beside the Live indicator * (or the host's replacement); without it the plain "Live" badge shows. */ liveState?: SiteLiveState | undefined; versionLabel?: string | undefined; className?: string | undefined; editDisabled?: boolean | undefined; onEdit?: (() => void) | undefined; toolBridge?: PublishedHtmlArtifactToolBridge | undefined; /** Who is viewing, answered to the Site's `site.viewer` over the bridge. */ viewer?: SiteViewer | undefined; /** * The Site's own address (`/admin?tab=2`), answered to `site.location`. * Omit it to let the frame keep the address itself (starting at `/`, kept * across reloads); pass it with `onSiteLocationChange` to keep it in the * host, for example in its URL. */ siteLocation?: string | undefined; /** The Site moved itself with `site.navigate`. */ onSiteLocationChange?: ((href: string, options: { replace: boolean; }) => void) | undefined; connectedToolCount?: number | undefined; sourceFileCount?: number | undefined; fill?: boolean | undefined; /** * Control full screen from the host (for example from its URL). Omit to let * the frame's own expand and back buttons manage it. */ fullScreen?: boolean | undefined; /** Called when the person expands the frame or leaves full screen. */ onFullScreenChange?: ((fullScreen: boolean) => void) | undefined; /** * Hide the frame's toolbar when the host draws its own reload and full * screen controls. Full screen always shows it, for its Back button. */ showToolbar?: boolean | undefined; /** Reload the Site whenever this changes, from a host-drawn reload control. */ reloadToken?: number | undefined; /** * The page the frame shows, for example its version: a new key replaces * the frame in the same render as its HTML, so the Site loads once. */ frameKey?: string | undefined; }; /** * The Site/preview frame chrome shared by the console and embedding hosts: * title, version and tool badges, live status, reload, and a full-screen mode * that escapes the host's scroll containers through the modal top layer. */ export declare function ArtifactSandbox(props: ArtifactSandboxProps): import("react").JSX.Element;