import { n as EventTag, r as Eventa } from "../../eventa-CCPqecvv.mjs"; import { t as EventContext } from "../../context-C4Cia9QU.mjs"; import { n as AdapterErrorPayload, t as AdapterErrorKind } from "../../errors-BKTILLCx.mjs"; //#region src/adapters/window-message/shared.d.ts interface Payload { id: string; type: EventTag; payload: T; } interface WindowMessageEnvelope { __eventa: true; channel: string; sourceId: string; payload: Payload; } /** * Emitted by the window-message adapter when an inbound message fails to parse * (`kind: 'parse'`) or the window dispatches a `messageerror` * (`kind: 'messageerror'`). Neither is fatal — the window itself stays alive, * so the context is not aborted. Has a stable id so it can be subscribed to * across module boundaries. */ declare const errorEvent: Eventa; //#endregion //#region src/adapters/window-message/index.d.ts interface WindowMessageAdapterOptions { channel: string; currentWindow: Window; targetWindow: () => Window | null | undefined; expectedSource?: () => MessageEventSource | null | undefined; targetOrigin?: string; expectedOrigin?: string | ((origin: string) => boolean); acceptMessage?: (event: MessageEvent) => boolean; messageEvents?: boolean; messageErrorEvents?: boolean; } declare function createContext(options: WindowMessageAdapterOptions): { context: EventContext; dispose: (reason?: unknown) => void; }; //#endregion export { type AdapterErrorKind, type AdapterErrorPayload, type Payload, WindowMessageAdapterOptions, type WindowMessageEnvelope, createContext, errorEvent }; //# sourceMappingURL=index.d.mts.map