Field Notes
    Preparing search index...

    Interface AwarenessViewport

    What attachAwareness needs from a viewport; Viewport satisfies it.

    This does not extends LocalAwarenessHost, RemoteCursorOverlayHost, RemoteSelectionOverlayHost: those three declare camera with different member sets (screenToWorld vs zoom), and TypeScript rejects an interface that extends multiple parents whose same-named property types are not identical or mutually assignable. Listing the members directly (with camera widened to carry both) keeps AwarenessViewport structurally assignable to all three host types.

    interface AwarenessViewport {
        camera: { zoom: number; screenToWorld(screen: Point): Point };
        domLayer: HTMLElement;
        layerManager: LayerManager;
        store: ElementStore;
        toolManager: {
            activeTool: { name: string } | null;
            onChange(listener: (name: string) => void): () => void;
        };
        getSelectedIds(): string[];
        onSelectionChange(listener: () => void): () => void;
        registerOverlay(draw: OverlayRenderer): () => void;
        requestOverlayRender?(): void;
        requestRender(): void;
    }
    Index
    camera: { zoom: number; screenToWorld(screen: Point): Point }
    domLayer: HTMLElement

    The pointer listener attaches to domLayer.parentElement (the wrapper).

    layerManager: LayerManager
    toolManager: {
        activeTool: { name: string } | null;
        onChange(listener: (name: string) => void): () => void;
    }