import { BoardElement, BoardAppState, BoardScene } from './types.js'; /** * Operations over a board scene and their pure application. Every op is * fully materialized (it carries the elements it needs), so its inverse can * be derived without consulting the scene — which is what makes undo/redo a * simple stack of (forward, inverse) pairs (store.ts). */ type BoardOp = { kind: 'add'; elements: BoardElement[]; } | { kind: 'remove'; elements: BoardElement[]; } | { kind: 'update'; before: BoardElement[]; after: BoardElement[]; } | { kind: 'appState'; before: Partial; after: Partial; }; /** Apply an op to a scene, returning a new scene (inputs untouched). */ declare function applyOp(scene: BoardScene, op: BoardOp): BoardScene; /** The op that undoes `op`. */ declare function inverseOp(op: BoardOp): BoardOp; /** Element ids an op touches (drives fine-grained host re-render). */ declare function opChangedIds(op: BoardOp): string[]; export { type BoardOp, applyOp, inverseOp, opChangedIds };