fix: fix value editor scrolling and add selection highlight

- Fix value editor not scrollable when content exceeds container
  (overflow-hidden -> overflow-auto)
- Extract vscodeSelectionLayer from QueryEditor into shared module
  and apply to value editor for consistent selection highlighting
This commit is contained in:
t8y2
2026-05-27 16:05:30 +08:00
parent 84e2093b82
commit 68c8a5cc7b
4 changed files with 93 additions and 89 deletions
@@ -8,6 +8,7 @@ import {
highlightSpecialChars,
highlightActiveLine,
} from "@codemirror/view";
import { vscodeSelectionLayer } from "@/lib/codemirrorVscodeSelectionLayer";
import { json } from "@codemirror/lang-json";
import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
import { bracketMatching } from "@codemirror/language";
@@ -81,6 +82,7 @@ export function useCellDetailEditor(options: UseCellDetailEditorOptions): UseCel
highlightSpecialChars(),
history(),
drawSelection(),
vscodeSelectionLayer(),
dropCursor(),
highlightActiveLine(),
EditorView.theme({