import { Issue, NodeRegistry, Proposal, RuleContext } from '../../../ai'; import { useComposer } from '../../../hooks/use-composer'; import { NodeId } from '../../../types'; import { EditorQuery } from './execute'; type EditorActions = ReturnType['actions']; export type ApplyResult = { ok: true; selectId?: NodeId; } | { ok: false; issues: Issue[]; } | { ok: false; error: string; }; /** * Blurs the focused contentEditable element, in this document or in the same-origin iframe the canvas renders in, * so inline text that was typed but not yet synced reaches the node props before the page is read. */ export declare function blurActiveEditable(root?: Document): void; /** * Applies a proposal to the live page: flushes in-progress inline typing, revalidates against the page as it is now * (it may have changed since the proposal was made), then runs every step in one craft transaction (one undo entry). * Nothing changes unless it returns `ok: true`. */ export declare function applyProposalToEditor(args: { query: EditorQuery; actions: EditorActions; proposal: Proposal; context: RuleContext; registry?: NodeRegistry; }): ApplyResult; export {};