/** * The custom events layer: events a Lit element dispatches on itself. * * `dispatchEvent` is wrapped once, on the shared ReactiveElement prototype * the lifecycle layer already finds, not on every instance and not on * `EventTarget.prototype`: only a component's own `this.dispatchEvent(...)` * is seen, and an event the browser dispatches never goes through it. The * wrapper records type, flags and a bounded detail preview, attributed to the * dispatching element, and is a flag check while the layer is off. * * A recorded dispatch is marked as an event cause for as long as it runs, so * an update a listener requests points back at this row (`cause-context.ts`). * * Runs inside the inspected page: nothing here may throw into the app, and * the original `dispatchEvent` always runs with the arguments it was given. */ import type { TimelineEvent } from '../../../types/timeline.js'; type AnyFn = (this: object, ...args: unknown[]) => unknown; type Proto = Record; /** The consumers `install.ts` wires in; unset until then, so wrapping is inert. */ interface Sink { emit: (event: TimelineEvent) => void; recording: () => boolean; enabled: () => boolean; /** The update tick `el` is inside right now, as a groupId. */ groupOf: (el: object) => string | undefined; } /** Point the wrapper (installed by the lifecycle layer) at its consumers. */ export declare const installCustomEventsLayer: (s: Sink) => void; /** Wraps `dispatchEvent` for every element inheriting from `proto`. Idempotent. */ export declare const wrapDispatchEvent: (proto: Proto) => void; export {}; //# sourceMappingURL=custom-events.d.ts.map