/** * Slot contexts (e.g. Design's `DesignExtensionSlotContext`) commonly carry * live callback functions alongside plain data — the host component uses * those callbacks itself, but `window.postMessage` uses the structured clone * algorithm, which throws a `DataCloneError` on any function-valued property * (see MDN's postMessage docs). Round-tripping through JSON drops functions * (and other non-cloneable values like symbols) the same way * `JSON.stringify` already silently omits them, producing a payload that's * safe to post. Exported so a test can verify functions never reach the * iframe instead of only reading the code. */ export declare function sanitizeSlotContextForPostMessage(context: Record | null | undefined): Record; export interface EmbeddedExtensionProps { extensionId: string; /** Slot identifier passed via the iframe URL so the extension runtime knows it's * embedded and enables auto-resize. */ slotId: string; /** Object pushed into the extension as `window.slotContext`. Re-posted whenever * the host re-renders with a new context. */ context?: Record | null; /** Optional className applied to the iframe container. */ className?: string; /** Initial iframe height before content reports a real height. */ initialHeight?: number; /** Fires once when the embedded iframe first signals content readiness — its * first height report, or iframe load as a fallback. Hosts that gate on * content paint (e.g. dashboard report screenshots) use this. */ onReady?: () => void; /** Fires when the extension can't be loaded for this viewer (e.g. 403/404 — * the extension isn't shared with them or no longer exists). Hosts can use * this to render an explanatory fallback instead of a blank panel. By default * the component renders nothing on failure (slot-style silent skip). */ onUnavailable?: (status?: number) => void; } /** * Renders a extension inline as a small auto-sized iframe — for use inside an * ``. Different from `` (which is full-page with a * toolbar): no header, sized to content, receives a `slotContext`. */ export declare function EmbeddedExtension({ extensionId, slotId, context, className, initialHeight, onReady, onUnavailable, }: EmbeddedExtensionProps): import("react").JSX.Element | null; //# sourceMappingURL=EmbeddedExtension.d.ts.map