import { type OpenGeniSiteLocationValue, type SiteBridgeToolHandlers } from "@opengeni/sdk/site-bridge-host"; import type { OpenGeniSiteSignInResult, OpenGeniSiteViewer } from "@opengeni/sdk/site"; import { type CSSProperties } from "react"; export { SiteBridgeDocumentLease, SiteBridgeRequestRegistry, handleSiteBridgeRequest, openGeniSiteBridgePortFromBootstrap, siteBridgeError, siteBridgeReadyMessage, } from "@opengeni/sdk/site-bridge-host"; export declare const PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX: string; export type PublishedHtmlArtifactFrameProps = { html: string; /** * Size the frame to the height its document reports (`opengeni.preview.height`), * between 80 px and `maxAutoHeight` (default 1200 px). Taller content scrolls * inside the frame. */ autoHeight?: boolean; /** Upper bound for `autoHeight`, in CSS pixels. */ maxAutoHeight?: number; theme?: "light" | "dark"; title: string; className?: string; style?: CSSProperties; toolBridge?: PublishedHtmlArtifactToolBridge; /** * The signed-in member viewing the Site, answered to `site.viewer`. When * omitted the frame does not advertise viewers and the SDK resolves `null`. */ viewer?: OpenGeniSiteViewer; /** * Answer `site.auth.signIn()`. The console viewer is already signed in, so * the default resolves `{ started: false }`. */ onSignIn?: () => Promise | OpenGeniSiteSignInResult; /** * The Site's own address in this page (`/admin?tab=2#top`), answered to * `site.location`; defaults to `/`. Changing it moves the Site there (the * Site hears it through `site.onLocationChange`) without reloading it. */ location?: string; /** * The Site moved itself with `site.navigate`: a host that keeps the * address (for example in its own URL) stores `href` and passes it back as * `location`. `replace` asks not to add a history entry. */ onLocationChange?: (href: string, options: { replace: boolean; }) => void; }; /** Host handlers for Site tools and the Site HTTP channel (see `@opengeni/sdk/site-bridge-host`). */ export type PublishedHtmlArtifactToolBridge = SiteBridgeToolHandlers; export declare function publishedHtmlArtifactDocument(html: string, toolBridgeEnabled: boolean): string; /** A host-kept Site address as a location; anything unusable is the Site's root. */ export declare function siteFrameLocation(href: string | undefined): OpenGeniSiteLocationValue; /** * Render exact published HTML in an opaque-origin iframe. Artifact scripts, * external resources, forms, popups, downloads, and the host-filtered tool * bridge work without granting parent-origin authority, shared cookies/storage, * or top-level navigation. */ export declare function PublishedHtmlArtifactFrame(props: PublishedHtmlArtifactFrameProps): import("react").JSX.Element;