import { Viewer } from '../viewers/Viewer'; export type WorkerViewerCommand = (payload: unknown) => unknown | Promise; export type WorkerViewerDispose = () => void | Promise; export interface WorkerViewerRuntime { readonly viewer: Viewer; readonly canvas: OffscreenCanvas; status(message: string): void; emit(type: string, detail?: unknown): void; registerCommand(name: string, command: WorkerViewerCommand): () => void; onDispose(dispose: WorkerViewerDispose): () => void; ready(detail?: unknown): void; } /** * Creates a u-space Viewer after the main thread transfers an OffscreenCanvas. * Call this at module top level; the message listener is installed synchronously * before the returned promise waits for the host initialization message. */ export declare function createWorkerViewer(): Promise;