mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-02 00:29:30 +00:00
feat: editor enhancements, DataGrid refactor, and sidebar improvements
- Add bracket auto-close and matching to SQL editor (closeBrackets, bracketMatching) - Show truncation warning banner when query results exceed 10,000 rows - Extract shared export format functions (CSV/JSON/SQL INSERT) to lib/exportFormats.ts - Add progressive rendering to sidebar tree (50-node cap with "show more") - Fix connection node expanding before connect succeeds - Split DataGrid.vue (3177→2535 lines) into 4 composables: useDataGridExport, useDataGridColumnResize, useDataGridSelection, useDataGridEditor
This commit is contained in:
@@ -210,8 +210,9 @@ onMounted(async () => {
|
||||
{ EditorState, Compartment, Prec },
|
||||
{ sql, MSSQL, MySQL, PostgreSQL, SQLDialect },
|
||||
{ basicSetup },
|
||||
{ autocompletion, startCompletion },
|
||||
{ autocompletion, startCompletion, closeBrackets, closeBracketsKeymap },
|
||||
{ indentWithTab },
|
||||
{ bracketMatching },
|
||||
] = await Promise.all([
|
||||
import("@codemirror/view"),
|
||||
import("@codemirror/state"),
|
||||
@@ -219,6 +220,7 @@ onMounted(async () => {
|
||||
import("codemirror"),
|
||||
import("@codemirror/autocomplete"),
|
||||
import("@codemirror/commands"),
|
||||
import("@codemirror/language"),
|
||||
]);
|
||||
editorViewModule = { EditorView, keymap } as typeof import("@codemirror/view");
|
||||
fontThemeComp = new Compartment();
|
||||
@@ -285,7 +287,9 @@ onMounted(async () => {
|
||||
override: [async (context: CompletionContext) => provideSqlCompletions(context.state, context.pos)],
|
||||
}),
|
||||
codeMirrorTheme.of(theme),
|
||||
Prec.highest(keymap.of([indentWithTab])),
|
||||
closeBrackets(),
|
||||
bracketMatching(),
|
||||
Prec.highest(keymap.of([...closeBracketsKeymap, indentWithTab])),
|
||||
runKeymap,
|
||||
wordWrapComp.of(ss.wordWrap ? EditorView.lineWrapping : []),
|
||||
EditorView.updateListener.of((update) => {
|
||||
|
||||
Reference in New Issue
Block a user