@thebuoyant-tsdev/mui-ts-library 3.28.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.de.md CHANGED
@@ -191,7 +191,7 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
191
191
 
192
192
  ### SqlEditor
193
193
 
194
- SQL-Code-Editor mit Syntax-Highlighting, dialektbewusstem Autocomplete und Inline-Linting. Konzipiert für Developer-Tools, Datenbank-Clients und Admin-Panels — mit `Cmd+Enter` (Ausführen) und `Shift+Alt+F` (SQL formatieren) als Tastenkürzel, Multi-Dialekt-Support (MySQL, PostgreSQL, SQLite, MSSQL) und Schema-basiertem Autocomplete.
194
+ SQL-Code-Editor mit Syntax-Highlighting, dialektbewusstem Autocomplete und Inline-Linting. Konzipiert für Developer-Tools, Datenbank-Clients und Admin-Panels — mit `Cmd+Enter`-Shortcut, Multi-Dialekt-Support (MySQL, PostgreSQL, SQLite, MSSQL) und Schema-basiertem Autocomplete.
195
195
 
196
196
  ```tsx
197
197
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
@@ -483,24 +483,6 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/):
483
483
 
484
484
  ## Changelog
485
485
 
486
- ### [Unveröffentlicht]
487
-
488
- ---
489
-
490
- ### [3.28.1] — 2026-07-15
491
-
492
- **Behoben**
493
- - Release-Script: `[Unveröffentlicht]`-Überschriften werden jetzt vor dem Publish automatisch auf die Versionsnummer umbenannt — damit npm immer den korrekten Changelog-Eintrag anzeigt.
494
-
495
- ---
496
-
497
- ### [3.28.0] — 2026-07-15
498
-
499
- **Hinzugefügt**
500
- - `SqlEditor`: `Shift+Alt+F` Tastenkürzel — löst den vorhandenen SQL-Format-Button direkt aus dem Editor heraus aus (respektiert `readonly` und `toolbarConfig.showFormat`). Keine API-Änderung.
501
-
502
- ---
503
-
504
486
  ### [3.27.1] — 2026-07-14
505
487
 
506
488
  **Behoben**
package/README.md CHANGED
@@ -191,7 +191,7 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
191
191
 
192
192
  ### SqlEditor
193
193
 
194
- SQL code editor with syntax highlighting, dialect-aware autocomplete, and inline linting. Designed for developer tools, database clients, and admin panels where users write and execute SQL queries — with `Cmd+Enter` (Execute) and `Shift+Alt+F` (Format SQL) shortcuts, multi-dialect support (MySQL, PostgreSQL, SQLite, MSSQL), and schema-based autocomplete.
194
+ SQL code editor with syntax highlighting, dialect-aware autocomplete, and inline linting. Designed for developer tools, database clients, and admin panels where users write and execute SQL queries — with `Cmd+Enter` shortcut, multi-dialect support (MySQL, PostgreSQL, SQLite, MSSQL), and schema-based autocomplete.
195
195
 
196
196
  ```tsx
197
197
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
@@ -483,24 +483,6 @@ This project follows [Semantic Versioning](https://semver.org/):
483
483
 
484
484
  ## Changelog
485
485
 
486
- ### [Unreleased]
487
-
488
- ---
489
-
490
- ### [3.28.1] — 2026-07-15
491
-
492
- **Fixed**
493
- - Release script: `[Unreleased]` headings are now automatically renamed to the version number before publishing — so npm always shows the correct changelog entry.
494
-
495
- ---
496
-
497
- ### [3.28.0] — 2026-07-15
498
-
499
- **Added**
500
- - `SqlEditor`: `Shift+Alt+F` keyboard shortcut — triggers the existing SQL Format button directly from the editor (respects `readonly` and `toolbarConfig.showFormat`). No API change.
501
-
502
- ---
503
-
504
486
  ### [3.27.1] — 2026-07-14
505
487
 
506
488
  **Fixed**
@@ -2,105 +2,78 @@ import { normalizeSize as e } from "../shared/normalizeSize.js";
2
2
  import { DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG as t, DEFAULT_SQL_EDITOR_TRANSLATION as n } from "./SqlEditor.types.js";
3
3
  import { SqlEditorContent as r } from "./SqlEditorContent.js";
4
4
  import { SqlEditorToolbar as i } from "./SqlEditorToolbar.js";
5
- import { SqlEditorFooter as ee } from "./SqlEditorFooter.js";
6
- import { useSqlQueryHistory as a } from "./useSqlQueryHistory.js";
7
- import { useCallback as o, useMemo as s, useRef as c, useState as l } from "react";
8
- import { Box as u, Divider as d, Paper as te } from "@mui/material";
9
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
10
- import { format as h } from "sql-formatter";
5
+ import { SqlEditorFooter as a } from "./SqlEditorFooter.js";
6
+ import { useSqlQueryHistory as o } from "./useSqlQueryHistory.js";
7
+ import { useCallback as s, useRef as c, useState as l } from "react";
8
+ import { Box as u, Divider as d, Paper as f } from "@mui/material";
9
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
11
10
  //#region src/components/sql-editor/SqlEditor.tsx
12
- var ne = {
13
- standard: "sql",
14
- mysql: "mysql",
15
- postgresql: "postgresql",
16
- sqlite: "sqlite",
17
- mssql: "tsql"
18
- };
19
- function g({ value: g, onChange: _, placeholder: re, height: v, width: y, disabled: b = !1, readonly: x = !1, error: S = !1, helperText: C, name: w, dialect: T = "standard", showLineNumbers: E = !0, showLineColumn: D = !0, showErrorCount: O = !1, toolbarConfig: k, translation: A, highlightColors: j, schema: M, queryHistoryKey: N = "sql-editor-query-history", queryHistoryMaxEntries: P = 20, onExecute: F, onLint: I, onBlur: L, onFocus: R }) {
11
+ function g({ value: g, onChange: _, placeholder: ee, height: v, width: y, disabled: b = !1, readonly: x = !1, error: S = !1, helperText: C, name: w, dialect: T = "standard", showLineNumbers: E = !0, showLineColumn: D = !0, showErrorCount: O = !1, toolbarConfig: k, translation: A, highlightColors: j, schema: M, queryHistoryKey: N = "sql-editor-query-history", queryHistoryMaxEntries: P = 20, onExecute: F, onLint: I, onBlur: L, onFocus: R }) {
20
12
  let z = {
21
13
  ...n,
22
14
  ...A
23
15
  }, B = {
24
16
  ...t,
25
17
  ...k
26
- }, { history: V, addEntry: H, clearHistory: U } = a(N, P), W = e(v), G = e(y), K = W === "auto", q = K ? void 0 : W ?? 300, J = c(null), [Y, X] = l(null), [Z, ie] = l({
18
+ }, { history: te, addEntry: V, clearHistory: H } = o(N, P), U = e(v), W = e(y), G = U === "auto", K = G ? void 0 : U ?? 300, q = c(null), [J, Y] = l(null), [X, Z] = l({
27
19
  line: 1,
28
20
  col: 1
29
- }), [ae, Q] = l(0), oe = o((e) => {
30
- J.current = e, X(e);
31
- }, []), se = o((e, t) => {
32
- ie({
21
+ }), [Q, ne] = l(0), re = s((e) => {
22
+ q.current = e, Y(e);
23
+ }, []), ie = s((e, t) => {
24
+ Z({
33
25
  line: e,
34
26
  col: t
35
27
  });
36
- }, []), ce = o((e) => {
37
- Q(e);
28
+ }, []), ae = s((e) => {
29
+ ne(e);
38
30
  }, []), $ = F ? (e) => {
39
- H(e), F(e);
40
- } : void 0, le = s(() => {
41
- if (!(x || !B.showFormat)) return () => {
42
- let e = J.current;
43
- if (!e) return;
44
- let t = e.state.doc.toString();
45
- try {
46
- let n = h(t, { language: ne[T] });
47
- e.dispatch({ changes: {
48
- from: 0,
49
- to: e.state.doc.length,
50
- insert: n
51
- } });
52
- } catch {}
53
- e.focus();
54
- };
55
- }, [
56
- T,
57
- x,
58
- B.showFormat
59
- ]), ue = o((e) => {
60
- let t = J.current;
31
+ V(e), F(e);
32
+ } : void 0, oe = s((e) => {
33
+ let t = q.current;
61
34
  t && (t.dispatch({ changes: {
62
35
  from: 0,
63
36
  to: t.state.doc.length,
64
37
  insert: e
65
38
  } }), t.focus()), _?.(e);
66
- }, [_]), de = D || O || !!C;
67
- return /* @__PURE__ */ m(u, {
39
+ }, [_]), se = D || O || !!C;
40
+ return /* @__PURE__ */ h(u, {
68
41
  sx: {
69
- width: G ?? "100%",
70
- ...K ? {
42
+ width: W ?? "100%",
43
+ ...G ? {
71
44
  display: "flex",
72
45
  flexDirection: "column",
73
46
  flex: 1
74
47
  } : {}
75
48
  },
76
49
  children: [
77
- /* @__PURE__ */ m(te, {
50
+ /* @__PURE__ */ h(f, {
78
51
  variant: "outlined",
79
52
  sx: {
80
53
  display: "flex",
81
54
  flexDirection: "column",
82
55
  overflow: "hidden",
83
- ...K ? { flex: 1 } : { height: q },
56
+ ...G ? { flex: 1 } : { height: K },
84
57
  borderColor: S ? "error.main" : void 0,
85
58
  "&:focus-within": {
86
59
  borderColor: S ? "error.main" : "primary.main",
87
60
  borderWidth: 2
88
61
  }
89
62
  },
90
- children: [!x && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, {
91
- editorView: Y,
63
+ children: [!x && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(i, {
64
+ editorView: J,
92
65
  toolbarConfig: B,
93
66
  translation: z,
94
67
  dialect: T,
95
68
  disabled: b,
96
69
  onExecute: $,
97
- queryHistory: V,
98
- onSelectHistoryEntry: ue,
99
- onClearHistory: U
100
- }), /* @__PURE__ */ p(d, {})] }), /* @__PURE__ */ p(r, {
70
+ queryHistory: te,
71
+ onSelectHistoryEntry: oe,
72
+ onClearHistory: H
73
+ }), /* @__PURE__ */ m(d, {})] }), /* @__PURE__ */ m(r, {
101
74
  value: g,
102
75
  onChange: _,
103
- placeholder: re,
76
+ placeholder: ee,
104
77
  disabled: b,
105
78
  readonly: x,
106
79
  showLineNumbers: E,
@@ -110,26 +83,25 @@ function g({ value: g, onChange: _, placeholder: re, height: v, width: y, disabl
110
83
  identifierColor: j?.identifier,
111
84
  schema: M,
112
85
  onExecute: $,
113
- onFormat: le,
114
86
  onLint: I,
115
- onDiagnosticsChange: I ? ce : void 0,
116
- onViewReady: oe,
117
- onCursorChange: se,
87
+ onDiagnosticsChange: I ? ae : void 0,
88
+ onViewReady: re,
89
+ onCursorChange: ie,
118
90
  onBlur: L,
119
91
  onFocus: R
120
92
  })]
121
93
  }),
122
- de && /* @__PURE__ */ p(ee, {
94
+ se && /* @__PURE__ */ m(a, {
123
95
  helperText: C,
124
96
  error: S,
125
97
  showLineColumn: D,
126
98
  showErrorCount: O,
127
- diagnosticsCount: ae,
128
- cursorLine: Z.line,
129
- cursorCol: Z.col,
99
+ diagnosticsCount: Q,
100
+ cursorLine: X.line,
101
+ cursorCol: X.col,
130
102
  translation: z
131
103
  }),
132
- w && /* @__PURE__ */ p("input", {
104
+ w && /* @__PURE__ */ m("input", {
133
105
  type: "hidden",
134
106
  name: w,
135
107
  value: g ?? ""
@@ -13,7 +13,6 @@ type SqlEditorContentProps = {
13
13
  identifierColor?: string;
14
14
  schema?: SqlSchema;
15
15
  onExecute?: (sql: string) => void;
16
- onFormat?: () => void;
17
16
  onLint?: (sql: string) => Promise<SqlLintError[]> | SqlLintError[];
18
17
  onDiagnosticsChange?: (count: number) => void;
19
18
  onViewReady: (view: EditorView | null) => void;
@@ -21,5 +20,5 @@ type SqlEditorContentProps = {
21
20
  onBlur?: () => void;
22
21
  onFocus?: () => void;
23
22
  };
24
- export declare function SqlEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, dialect, keywordColor, stringColor, identifierColor, schema, onExecute, onFormat, onLint, onDiagnosticsChange, onViewReady, onCursorChange, onBlur, onFocus, }: SqlEditorContentProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SqlEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, dialect, keywordColor, stringColor, identifierColor, schema, onExecute, onLint, onDiagnosticsChange, onViewReady, onCursorChange, onBlur, onFocus, }: SqlEditorContentProps): import("react/jsx-runtime").JSX.Element;
25
24
  export {};
@@ -1,45 +1,43 @@
1
1
  import { useEffect as e, useRef as t } from "react";
2
2
  import { Box as n, useTheme as r } from "@mui/material";
3
3
  import { jsx as i } from "react/jsx-runtime";
4
- import { EditorView as a, highlightActiveLine as ee, highlightActiveLineGutter as te, keymap as o, lineNumbers as s, placeholder as c } from "@codemirror/view";
5
- import { Compartment as l, EditorState as u } from "@codemirror/state";
6
- import { defaultKeymap as ne, history as d, historyKeymap as f } from "@codemirror/commands";
7
- import { HighlightStyle as p, syntaxHighlighting as m } from "@codemirror/language";
4
+ import { EditorView as a, highlightActiveLine as o, highlightActiveLineGutter as s, keymap as c, lineNumbers as l, placeholder as u } from "@codemirror/view";
5
+ import { Compartment as d, EditorState as f } from "@codemirror/state";
6
+ import { defaultKeymap as p, history as m, historyKeymap as ee } from "@codemirror/commands";
7
+ import { HighlightStyle as te, syntaxHighlighting as ne } from "@codemirror/language";
8
8
  import { lintGutter as h, linter as g } from "@codemirror/lint";
9
9
  import { tags as _ } from "@lezer/highlight";
10
- import { MSSQL as v, MySQL as y, PostgreSQL as b, SQLite as x, StandardSQL as S, sql as re } from "@codemirror/lang-sql";
11
- import { autocompletion as ie, completionKeymap as ae } from "@codemirror/autocomplete";
10
+ import { MSSQL as v, MySQL as y, PostgreSQL as b, SQLite as x, StandardSQL as S, sql as C } from "@codemirror/lang-sql";
11
+ import { autocompletion as re, completionKeymap as w } from "@codemirror/autocomplete";
12
12
  //#region src/components/sql-editor/SqlEditorContent.tsx
13
- var C = {
13
+ var T = {
14
14
  standard: S,
15
15
  mysql: y,
16
16
  postgresql: b,
17
17
  sqlite: x,
18
18
  mssql: v
19
19
  };
20
- function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly: S = !1, showLineNumbers: w = !0, dialect: T = "standard", keywordColor: E, stringColor: D, identifierColor: O, schema: k, onExecute: A, onFormat: j, onLint: M, onDiagnosticsChange: N, onViewReady: P, onCursorChange: F, onBlur: I, onFocus: L }) {
21
- let R = t(null), z = t(null), B = t(y), V = t(F), H = t(I), U = t(L), W = t(P), G = t(A), K = t(j), q = t(M), J = t(N), Y = t(new l()), X = t(new l()), Z = r(), Q = Z.palette.mode === "dark", $ = !!M, oe = JSON.stringify(k);
20
+ function E({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly: S = !1, showLineNumbers: E = !0, dialect: D = "standard", keywordColor: O, stringColor: k, identifierColor: A, schema: j, onExecute: M, onLint: N, onDiagnosticsChange: P, onViewReady: F, onCursorChange: I, onBlur: L, onFocus: R }) {
21
+ let z = t(null), B = t(null), V = t(y), H = t(I), U = t(L), W = t(R), G = t(F), K = t(M), q = t(N), J = t(P), Y = t(new d()), X = t(new d()), Z = r(), Q = Z.palette.mode === "dark", $ = !!N, ie = JSON.stringify(j);
22
22
  return e(() => {
23
- B.current = y;
23
+ V.current = y;
24
24
  }, [y]), e(() => {
25
- V.current = F;
26
- }, [F]), e(() => {
27
25
  H.current = I;
28
26
  }, [I]), e(() => {
29
27
  U.current = L;
30
28
  }, [L]), e(() => {
31
- W.current = P;
32
- }, [P]), e(() => {
33
- G.current = A;
34
- }, [A]), e(() => {
35
- K.current = j;
36
- }, [j]), e(() => {
37
- q.current = M;
29
+ W.current = R;
30
+ }, [R]), e(() => {
31
+ G.current = F;
32
+ }, [F]), e(() => {
33
+ K.current = M;
38
34
  }, [M]), e(() => {
39
- J.current = N;
35
+ q.current = N;
40
36
  }, [N]), e(() => {
41
- if (!R.current) return;
42
- let e = z.current?.state.doc.toString() ?? v ?? "", t = E ?? Z.palette.primary.main, n = D ?? Z.palette.success.main, r = O ?? Z.palette.info.main, i = p.define([
37
+ J.current = P;
38
+ }, [P]), e(() => {
39
+ if (!z.current) return;
40
+ let e = B.current?.state.doc.toString() ?? v ?? "", t = O ?? Z.palette.primary.main, n = k ?? Z.palette.success.main, r = A ?? Z.palette.info.main, i = te.define([
43
41
  {
44
42
  tag: _.keyword,
45
43
  color: t,
@@ -80,7 +78,7 @@ function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly:
80
78
  color: Z.palette.error.main,
81
79
  textDecoration: "underline wavy"
82
80
  }
83
- ]), l = a.theme({
81
+ ]), d = a.theme({
84
82
  "&": {
85
83
  height: "100%",
86
84
  fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
@@ -141,11 +139,11 @@ function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly:
141
139
  ".cm-diagnostic-error": { borderLeft: `3px solid ${Z.palette.error.main}` },
142
140
  ".cm-diagnostic-warning": { borderLeft: `3px solid ${Z.palette.warning.main}` },
143
141
  ".cm-diagnostic-info": { borderLeft: `3px solid ${Z.palette.info.main}` }
144
- }, { dark: Q }), y = k ? Object.fromEntries(k.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
142
+ }, { dark: Q }), y = j ? Object.fromEntries(j.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
145
143
  label: e.name,
146
144
  detail: e.type,
147
145
  type: "property"
148
- }))])) : void 0, A = async (e) => {
146
+ }))])) : void 0, M = async (e) => {
149
147
  let t = q.current;
150
148
  if (!t) return [];
151
149
  let n = e.state.doc.toString();
@@ -163,67 +161,63 @@ function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly:
163
161
  } catch {
164
162
  return [];
165
163
  }
166
- }, j = o.of([{
164
+ }, N = c.of([{
167
165
  key: "Mod-Enter",
168
- run: (e) => (G.current?.(e.state.doc.toString()), !0)
169
- }]), M = o.of([{
170
- key: "Shift-Alt-f",
171
- run: () => (K.current?.(), !0)
172
- }]), N = [
173
- l,
174
- m(i),
175
- re({
176
- dialect: C[T],
166
+ run: (e) => (K.current?.(e.state.doc.toString()), !0)
167
+ }]), P = [
168
+ d,
169
+ ne(i),
170
+ C({
171
+ dialect: T[D],
177
172
  schema: y
178
173
  }),
179
- d(),
180
- ie(),
181
- j,
182
- M,
183
- o.of([
184
- ...ne,
185
- ...f,
186
- ...ae
174
+ m(),
175
+ re(),
176
+ N,
177
+ c.of([
178
+ ...p,
179
+ ...ee,
180
+ ...w
187
181
  ]),
188
182
  Y.current.of(a.editable.of(!x && !S)),
189
- X.current.of(u.readOnly.of(S)),
190
- ee(),
191
- ...w ? [s(), te()] : [],
192
- ...b ? [c(b)] : [],
193
- ...$ ? [h(), g(A, { delay: 600 })] : [],
183
+ X.current.of(f.readOnly.of(S)),
184
+ o(),
185
+ ...E ? [l(), s()] : [],
186
+ ...b ? [u(b)] : [],
187
+ ...$ ? [h(), g(M, { delay: 600 })] : [],
194
188
  a.updateListener.of((e) => {
195
- e.docChanged && B.current?.(e.state.doc.toString());
189
+ e.docChanged && V.current?.(e.state.doc.toString());
196
190
  let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
197
- V.current(n.number, t - n.from + 1);
191
+ H.current(n.number, t - n.from + 1);
198
192
  }),
199
193
  a.domEventHandlers({
200
194
  blur: () => {
201
- H.current?.();
195
+ U.current?.();
202
196
  },
203
197
  focus: () => {
204
- U.current?.();
198
+ W.current?.();
205
199
  }
206
200
  })
207
- ], P = new a({
208
- state: u.create({
201
+ ], F = new a({
202
+ state: f.create({
209
203
  doc: e,
210
- extensions: N
204
+ extensions: P
211
205
  }),
212
- parent: R.current
206
+ parent: z.current
213
207
  });
214
- return z.current = P, W.current(P), () => {
215
- W.current(null), P.destroy(), z.current = null;
208
+ return B.current = F, G.current(F), () => {
209
+ G.current(null), F.destroy(), B.current = null;
216
210
  };
217
211
  }, [
218
212
  Q,
219
- T,
220
- $,
221
- E,
222
213
  D,
214
+ $,
223
215
  O,
224
- oe
216
+ k,
217
+ A,
218
+ ie
225
219
  ]), e(() => {
226
- let e = z.current;
220
+ let e = B.current;
227
221
  if (!e) return;
228
222
  let t = e.state.doc.toString();
229
223
  t !== (v ?? "") && e.dispatch({ changes: {
@@ -232,9 +226,9 @@ function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly:
232
226
  insert: v ?? ""
233
227
  } });
234
228
  }, [v]), e(() => {
235
- z.current?.dispatch({ effects: [Y.current.reconfigure(a.editable.of(!x && !S)), X.current.reconfigure(u.readOnly.of(S))] });
229
+ B.current?.dispatch({ effects: [Y.current.reconfigure(a.editable.of(!x && !S)), X.current.reconfigure(f.readOnly.of(S))] });
236
230
  }, [x, S]), /* @__PURE__ */ i(n, {
237
- ref: R,
231
+ ref: z,
238
232
  sx: {
239
233
  flex: 1,
240
234
  overflow: "hidden",
@@ -251,4 +245,4 @@ function w({ value: v, onChange: y, placeholder: b, disabled: x = !1, readonly:
251
245
  });
252
246
  }
253
247
  //#endregion
254
- export { w as SqlEditorContent };
248
+ export { E as SqlEditorContent };
@@ -10,8 +10,8 @@ import f from "@mui/icons-material/Delete";
10
10
  import p from "@mui/icons-material/Undo";
11
11
  import m from "@mui/icons-material/Redo";
12
12
  import h from "@mui/icons-material/AutoFixHigh";
13
- import { format as g } from "sql-formatter";
14
- import _ from "@mui/icons-material/PlayArrow";
13
+ import g from "@mui/icons-material/PlayArrow";
14
+ import { format as _ } from "sql-formatter";
15
15
  //#region src/components/sql-editor/SqlEditorToolbar.tsx
16
16
  var v = {
17
17
  standard: "sql",
@@ -49,7 +49,7 @@ function y({ editorView: y, toolbarConfig: b, translation: x, dialect: S, disabl
49
49
  if (!e) return;
50
50
  let t = e.state.doc.toString();
51
51
  try {
52
- let n = g(t, { language: v[S] });
52
+ let n = _(t, { language: v[S] });
53
53
  e.dispatch({ changes: {
54
54
  from: 0,
55
55
  to: e.state.doc.length,
@@ -151,7 +151,7 @@ function y({ editorView: y, toolbarConfig: b, translation: x, dialect: S, disabl
151
151
  sx: { mx: .5 }
152
152
  }), /* @__PURE__ */ o(e, {
153
153
  label: x.execute,
154
- icon: /* @__PURE__ */ o(_, { fontSize: "small" }),
154
+ icon: /* @__PURE__ */ o(g, { fontSize: "small" }),
155
155
  onClick: I,
156
156
  disabled: A
157
157
  })] }),