import type { DismissTooltipMsg, PinTooltipMsg, SetCursorMsg, UserClickMsg, UserSelectMsg } from "../transport/protocol"; import type { CssBounds, HostSink, UserClickPayload, UserSelectPayload } from "./tooltip-controller"; /** * The subset of `WorkerMsg`s that flow chart → host through a * `MessageHostSink`. Identical to the worker-side post payloads so the * sink can ship them straight to `WorkerRenderer.post` with no * intermediate translation. */ export type HostSinkEnvelope = PinTooltipMsg | DismissTooltipMsg | SetCursorMsg | UserClickMsg | UserSelectMsg; /** * `HostSink` that posts pin / dismiss / setCursor / user-event intents * over a `postMessage`-style channel as `WorkerMsg`s. The host-side * transport listens for these and drives a `DomHostSink` for * pin/dismiss and dispatches `CustomEvent`s on the viewer for user * events. */ export declare class MessageHostSink implements HostSink { private _send; constructor(send: (msg: HostSinkEnvelope) => void); pin(lines: string[], pos: { px: number; py: number; }, bounds: CssBounds): void; dismiss(): void; setCursor(cursor: string): void; emitUserClick(payload: UserClickPayload): void; emitUserSelect(payload: UserSelectPayload): void; }