feat(editor): eslint/tsconfig migration + type fixes

@robonen/editor: migrate to eslint flat config + composite tsconfig; fix
convergence test type annotations.
This commit is contained in:
2026-06-07 16:30:05 +07:00
parent 626fbc70d8
commit 09272dffeb
136 changed files with 7248 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
/**
* Whether a node is (inside) an atom's interactive control — a form field or a
* `contenteditable="false"` island. Events from these must NOT be treated as
* editor input: e.g. typing in an image's caption `<input>` bubbles up to the
* single contenteditable, and without this guard the editor would re-sync a text
* block and yank the caret to the start of the document.
*/
export function isInteractiveTarget(node: EventTarget | null): boolean {
return node instanceof Element
&& node.closest('input, textarea, select, button, [contenteditable="false"]') !== null;
}