import { type ReactElement, type ReactNode } from "react"; import type { SiteViewer } from "@opengeni/sdk"; import type { SiteSnapshotClient, SiteToolBridgeFactory } from "./chat-interactive-block.js"; export type SiteViewProps = { client: SiteSnapshotClient; workspaceId: string; siteId: string; /** Host-owned Site API access. Omit it and the Site renders without workspace tools. */ toolBridge?: SiteToolBridgeFactory | undefined; /** Who is viewing, answered to the Site's `site.viewer`. */ viewer?: SiteViewer | undefined; /** * The Site's own address (`/admin?tab=2`), answered to `site.location`; * with `onSiteLocationChange` the host keeps it, for example in its URL. * Omit both and the view keeps it itself, starting at `/`. */ siteLocation?: string | undefined; /** The Site moved itself with `site.navigate`. */ onSiteLocationChange?: ((href: string, options: { replace: boolean; }) => void) | undefined; theme?: "light" | "dark" | undefined; /** Shown instead of the archived notice; the console links to its full page. */ archivedMessage?: string | undefined; /** Show the Site title in the frame bar; hide it under a host header that already does. */ showTitle?: boolean | undefined; /** Wraps the visible title (a host's menu on it); see ArtifactSandbox. */ renderTitle?: ((title: ReactElement) => ReactNode) | undefined; /** Loading copy; defaults to "Loading Site…". */ loadingLabel?: string | undefined; /** Called with the loaded title, for a host header. */ onTitle?: ((title: string) => void) | undefined; /** Hide the frame toolbar under a host header that draws reload and full screen. */ showToolbar?: boolean | undefined; /** * Replaces the toolbar's "Live" indicator, for example with a link to the * published Site; `null` shows nothing there. Omit it for the default. */ liveStatus?: ReactNode | undefined; /** Reload the Site whenever this changes. */ reloadToken?: number | undefined; /** * The Site's current version as the host last read it, for a host that * watches the Site for new versions. When it differs from the version * shown, the view loads it and the Site reloads in place; the version on * screen stays until the new one has loaded. */ versionId?: string | null | undefined; /** * Whether the host's watch for new versions is working: `live` (the * default once `versionId` is given) or `reconnecting`. With it, the frame's * Live label tells the truth: Live, Updating while a new version loads, or * Reconnecting. Without `versionId` or this, the label stays as before. */ watch?: "live" | "reconnecting" | undefined; /** Drawn instead of the version badge, for example a version history menu. */ versionControl?: ReactNode | undefined; /** * The toolbar's first control, for example a Back to the page the Site was * opened from. It shows while the Site loads or can't be shown, too. */ toolbarStart?: ReactNode | undefined; /** Host-controlled full screen; omit to let the frame manage it. */ fullScreen?: boolean | undefined; onFullScreenChange?: ((fullScreen: boolean) => void) | undefined; className?: string | undefined; }; /** * A published Site filling its container: the console's session dock and an * embedding host's artifact viewer render the same view. */ export declare function SiteView({ client, workspaceId, siteId, toolBridge, viewer, siteLocation, onSiteLocationChange, theme, archivedMessage, showTitle, renderTitle, loadingLabel, onTitle, showToolbar, liveStatus, reloadToken, versionId, watch, versionControl, toolbarStart, fullScreen, onFullScreenChange, className, }: SiteViewProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable | Promise | ReactElement> | import("react").ReactPortal | null | undefined> | null | undefined;