import type { CommandBus } from './command-bus.ts'; import type { PlanExecutor } from './executor.ts'; import type { UINode, CommandSource } from './types.ts'; export type PatchOp = { readonly type: 'add'; readonly parentId: string; readonly node: UINode; readonly index?: number; } | { readonly type: 'remove'; readonly targetId: string; } | { readonly type: 'replace'; readonly targetId: string; readonly node: UINode; } | { readonly type: 'set-attribute'; readonly targetId: string; readonly name: string; readonly value: string; } | { readonly type: 'remove-attribute'; readonly targetId: string; readonly name: string; } | { readonly type: 'set-property'; readonly targetId: string; readonly name: string; readonly value: unknown; } | { readonly type: 'set-text'; readonly targetId: string; readonly text: string; } | { readonly type: 'set-event'; readonly targetId: string; readonly event: string; readonly commandType: string; } | { readonly type: 'remove-event'; readonly targetId: string; readonly event: string; }; export interface UIPatch { readonly planId: string; readonly ops: readonly PatchOp[]; readonly source: CommandSource; readonly timestamp: number; } export interface PatchResult { readonly applied: number; readonly errors: readonly PatchError[]; } export interface PatchError { readonly op: PatchOp; readonly message: string; } export declare function applyPatch(patch: UIPatch, executor: PlanExecutor, bus?: CommandBus): PatchResult; //# sourceMappingURL=patch.d.ts.map