import { type CanvasEdge, type CanvasNode, type NodeRectOptions } from '@pixerate/editor/canvas'; import { type AgentPlayback, type PlaybackChromeOptions, type PresenceStore } from '@pixerate/editor/tools'; type MaybeGetter = T | (() => T); /** * `locate`, `locateElement` and `open` (see `PlaybackChromeOptions`) let the host's own chrome over * the canvas (a HUD, toolbar or panels) answer refs the canvas does not find, such as * `{ kind: 'panel' | 'control', id }`: `locate` in flow coordinates, `locateElement` as an element * whose client box is mapped into flow coordinates through the viewport. */ export interface CreateCanvasPlaybackSurfaceOptions extends PlaybackChromeOptions { /** The flow's nodes and edges now (e.g. the `bind:nodes` state). */ getNodes: () => readonly TNode[]; getEdges?: () => readonly TEdge[]; /** The flow viewport now (Svelte Flow's `useSvelteFlow().getViewport`). */ getViewport: () => { x: number; y: number; zoom: number; }; /** The element the flow fills (and the `` sits in); for bounds and screen mapping. */ container: () => HTMLElement | null | undefined; /** Node size resolution (match the canvas' own). */ rectOptions?: NodeRectOptions; /** Bring the canvas on screen (switch to its tab) before the agent acts. */ reveal?: () => void | Promise; /** Whether the canvas is on screen (default: the container has a size and the page is visible). */ visible?: () => boolean; } /** * Svelte 5 rune: attaches the node canvas as an agent playback surface under `id` (the canvas tool * provider's id) for the component's lifetime (call during init) and returns its cursors. Draw them * with `` inside the container. Parity with * React's `useCanvasPlaybackSurface`. */ export declare function createCanvasPlaybackSurface(playback: MaybeGetter, id: MaybeGetter, options: CreateCanvasPlaybackSurfaceOptions): PresenceStore; export {};