import { type TexturaClient, type TexturaClientOptions } from '@geometra/client'; import { CanvasRenderer, type AccessibilityMirrorOptions, type CanvasRendererOptions } from './renderer.js'; export interface BrowserCanvasClientOptions extends Omit { /** Canvas element to paint into. */ canvas: HTMLCanvasElement; /** Reuse an existing renderer instance instead of creating one. */ renderer?: CanvasRenderer; /** Options for the internally created renderer. Ignored when `renderer` is provided. */ rendererOptions?: Omit; /** Enable canvas text selection helpers. Default: true. */ selection?: boolean | { onSelectionChange?: () => void; }; /** Enable the hidden accessibility DOM mirror. Default: true. */ accessibilityMirror?: boolean | AccessibilityMirrorOptions; /** Host element for the hidden accessibility mirror. Default: `document.body`. */ accessibilityHost?: HTMLElement; /** Focus the canvas on pointerdown so keyboard input stays in the app. Default: true. */ focusOnPointerDown?: boolean; /** Focus the canvas immediately after bootstrap. Default: false. */ autoFocus?: boolean; /** Automatically close the client on `beforeunload`. Default: true. */ closeOnBeforeUnload?: boolean; /** Optional explicit browser window for tests/custom hosts. */ window?: Window; } export interface BrowserCanvasClientHandle { canvas: HTMLCanvasElement; renderer: CanvasRenderer; client: TexturaClient; destroy(): void; } /** * Canonical browser bootstrap for Geometra thin-client canvas apps. * Wires `CanvasRenderer`, `createClient`, selection, focus, resize, and * the accessibility mirror into a single setup path. */ export declare function createBrowserCanvasClient(options: BrowserCanvasClientOptions): BrowserCanvasClientHandle; //# sourceMappingURL=browser-client.d.ts.map