import { ReactNode } from 'react'; import { PluginIframe, PluginIframeProps, PluginIframeRpcHandler } from './PluginIframe'; import { DiscoveredContribution, InProcessPluginEntry, RuntimePreference } from './types'; export interface PluginMountChildProps { /** Discovered contribution being mounted. */ contribution: DiscoveredContribution; /** The chosen runtime (`'iframe'` or `'in-process'`). */ runtime: 'iframe' | 'in-process'; /** Rendered iframe element (only present for `runtime === 'iframe'`). */ iframeProps?: Omit; /** Rendered React component (only present for `runtime === 'in-process'`). */ inProcessNode?: ReactNode; } export interface PluginMountProps { /** Discovered iframe contributions from the agent. */ contributions: DiscoveredContribution[]; /** In-process plugin components registered by the host shell. */ inProcess?: InProcessPluginEntry[]; /** Per-page context passed to the plugin via `host:init`. */ context: Record; /** Agent id whose tunnel serves the iframe contributions. */ agentId: string; /** Theme broadcast to plugin iframes (and to in-process plugins via the bridge). */ theme: { colorMode: 'light' | 'dark'; tokens: Record; }; /** Locale broadcast to plugins. */ locale: string; /** Feature flags surfaced to plugins. */ featureFlags: Record; /** Host shell version surfaced via `host:init`. */ hostVersion: string; /** RPC handler that resolves `plugin:rpc-request` calls. */ onRpcRequest: PluginIframeRpcHandler; /** * Preference between runtimes when a contribution declares both. The * default is `iframe` (sandboxed; works for user-installable plugins). * Pages that want first-party in-process plugins to win can pass * `'in-process'`. */ prefer?: RuntimePreference; /** * Renders each contribution. The host page is responsible for the * actual tab/widget chrome; this primitive just feeds it the right * props. */ children: (props: PluginMountChildProps) => ReactNode; } /** * Iterator over discovered contributions. Picks a runtime per * contribution (iframe or in-process), mints/refreshes the iframe * token, and delegates rendering to the consumer via the `children` * render-prop. */ export declare function PluginMount(props: PluginMountProps): import("react/jsx-runtime").JSX.Element; /** Re-export so consumers can render the iframe directly from their child render-prop. */ export { PluginIframe }; //# sourceMappingURL=PluginMount.d.ts.map