import { type CanvasChange, type CanvasChangeFeed, type CanvasChangeFeedOptions, type CanvasEdge, type CanvasEdgeLike, type CanvasNode, type CanvasProposal, type CanvasProposals, type CanvasProposalsOptions } from '@pixerate/editor/canvas'; export interface CanvasProposalStateRune { /** The framework-free store (for `createCanvasProposalToolProvider` and agents). */ readonly store: CanvasProposals; /** Pending proposals (reactive). */ readonly proposals: readonly CanvasProposal[]; /** The canvas with the proposals drawn in as ghosts (reactive): render these instead of your nodes and edges. */ readonly view: { nodes: TNode[]; edges: TEdge[]; }; propose: CanvasProposals['propose']; accept: CanvasProposals['accept']; reject: CanvasProposals['reject']; clear: CanvasProposals['clear']; } /** * Agent-suggested canvas additions as a Svelte 5 rune: ghosts the user accepts (one undo step * on `history`, made by the proposer) or rejects. Render `view` instead of your nodes and edges so * the ghosts show. The same API as React's `useCanvasProposals`; pass getters and setters for the * canvas state. */ export declare function createCanvasProposalState(options: CanvasProposalsOptions): CanvasProposalStateRune; export interface CanvasChangeWatcherOptions extends Omit, 'subscribe'> { /** Called with each change. */ onChange?: (change: CanvasChange) => void; } export interface CanvasChangeWatcherRune { readonly feed: CanvasChangeFeed; /** The latest change (reactive). */ readonly last: CanvasChange | null; } /** * What changed on a canvas, as a Svelte 5 rune: nodes and edges added, removed or edited, the * selection, and who made it, checked whenever `getNodes` / `getEdges` change. For agents that * follow what the user does. Call during component initialisation; the feed stops on unmount. * The same API as React's `useCanvasChangeFeed`. */ export declare function createCanvasChangeWatcher(options: CanvasChangeWatcherOptions): CanvasChangeWatcherRune;