export type TrustedOriginMatcher = string | RegExp | ((origin: string) => boolean); type ScopedFramePort = MessagePort; type ServicePortMap = Record; export interface ScopedFrameInitMessage { source: string; type: string; scopeId: string; serviceIds: readonly ServiceId[]; } export interface ScopedFrameReadyMessage, ServiceId extends string = string> { source: string; type: string; scopeId: string; payload: Payload; } export interface InstallScopedFrameOptions { source: string; initType: string; readyType: string; scopeId: string; serviceIds: readonly ServiceId[]; readyTransport?: "window" | "first-port"; trustedParentOrigin: TrustedOriginMatcher; onConnect: (ports: ServicePortMap, event: MessageEvent) => Promise<{ payload: Payload; dispose?: () => void; }> | { payload: Payload; dispose?: () => void; }; } export interface MountScopedFrameOptions { source: string; initType: string; readyType: string; scopeId: string; serviceIds: readonly ServiceId[]; readyTransport?: "window" | "first-port"; frameUrl: string; frameOrigin: string; parent?: HTMLElement; timeoutMs?: number; iframeAttributes?: Record; } export interface ScopedFrameHandle { readonly iframe: HTMLIFrameElement; readonly ports: ServicePortMap; readonly payload: Payload; destroy(): void; } export declare function isTrustedOrigin(origin: string, matcher: TrustedOriginMatcher): boolean; export declare function installScopedFrame(options: InstallScopedFrameOptions): () => void; export declare function mountScopedFrame(options: MountScopedFrameOptions): Promise>; export {}; //# sourceMappingURL=scoped-frame.d.ts.map