@libredb/studio 0.9.12 → 0.9.13
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/dist/{chunk-VWVRUCQO.mjs → chunk-CPF7XWV5.mjs} +77 -77
- package/dist/chunk-CPF7XWV5.mjs.map +1 -0
- package/dist/{chunk-DZ2UB3C6.mjs → chunk-G3S66G64.mjs} +259 -265
- package/dist/chunk-G3S66G64.mjs.map +1 -0
- package/dist/{chunk-JOGLIOFO.js → chunk-HGPD6PWV.js} +129 -129
- package/dist/chunk-HGPD6PWV.js.map +1 -0
- package/dist/{chunk-RBVDMLFV.js → chunk-Y52UIFEX.js} +259 -265
- package/dist/chunk-Y52UIFEX.js.map +1 -0
- package/dist/components.js +14 -14
- package/dist/components.mjs +2 -2
- package/dist/index.js +14 -14
- package/dist/index.mjs +2 -2
- package/dist/workspace.js +350 -358
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.mjs +220 -228
- package/dist/workspace.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DZ2UB3C6.mjs.map +0 -1
- package/dist/chunk-JOGLIOFO.js.map +0 -1
- package/dist/chunk-RBVDMLFV.js.map +0 -1
- package/dist/chunk-VWVRUCQO.mjs.map +0 -1
|
@@ -1225,10 +1225,10 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1225
1225
|
{
|
|
1226
1226
|
variant: "ghost",
|
|
1227
1227
|
size: "sm",
|
|
1228
|
-
className: "h-7 text-xs font-
|
|
1228
|
+
className: "h-7 text-xs font-medium text-white bg-blue-600 hover:bg-blue-500 hover:text-white gap-2 shadow-[0_0_10px_rgba(37,99,235,0.3)] animate-in fade-in zoom-in duration-200",
|
|
1229
1229
|
onClick: handleExecute,
|
|
1230
1230
|
children: [
|
|
1231
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3 h-3 fill-current" }),
|
|
1231
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3 h-3 fill-current" }),
|
|
1232
1232
|
" Run Sel"
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
@@ -1238,11 +1238,11 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1238
1238
|
{
|
|
1239
1239
|
variant: "ghost",
|
|
1240
1240
|
size: "sm",
|
|
1241
|
-
className: "h-7 text-xs font-
|
|
1241
|
+
className: "h-7 text-xs font-medium text-zinc-500 hover:text-white gap-2",
|
|
1242
1242
|
onClick: handleFormat,
|
|
1243
1243
|
title: language === "json" ? "Format JSON (Shift+Alt+F)" : "Format SQL (Shift+Alt+F)",
|
|
1244
1244
|
children: [
|
|
1245
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignLeft, { className: "w-3 h-3" }),
|
|
1245
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignLeft, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
1246
1246
|
" Format"
|
|
1247
1247
|
]
|
|
1248
1248
|
}
|
|
@@ -1252,10 +1252,10 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "ghost",
|
|
1254
1254
|
size: "sm",
|
|
1255
|
-
className: "h-7 text-xs font-
|
|
1255
|
+
className: "h-7 text-xs font-medium text-zinc-500 hover:text-white gap-2",
|
|
1256
1256
|
onClick: handleCopy,
|
|
1257
1257
|
children: [
|
|
1258
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3" }),
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
1259
1259
|
" ",
|
|
1260
1260
|
hasSelection ? "Copy Sel" : "Copy"
|
|
1261
1261
|
]
|
|
@@ -1266,10 +1266,10 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1266
1266
|
{
|
|
1267
1267
|
variant: "ghost",
|
|
1268
1268
|
size: "sm",
|
|
1269
|
-
className: "h-7 text-xs font-
|
|
1269
|
+
className: "h-7 text-xs font-medium text-zinc-500 hover:text-red-400 gap-2",
|
|
1270
1270
|
onClick: handleClear,
|
|
1271
1271
|
children: [
|
|
1272
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3 h-3" }),
|
|
1272
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
1273
1273
|
" Clear"
|
|
1274
1274
|
]
|
|
1275
1275
|
}
|
|
@@ -1281,13 +1281,13 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1281
1281
|
variant: "ghost",
|
|
1282
1282
|
size: "sm",
|
|
1283
1283
|
className: cn(
|
|
1284
|
-
"h-7 text-xs font-
|
|
1284
|
+
"h-7 text-xs font-medium gap-2",
|
|
1285
1285
|
showLineNumbers ? "text-zinc-300" : "text-zinc-500 hover:text-white"
|
|
1286
1286
|
),
|
|
1287
1287
|
onClick: () => setShowLineNumbers(!showLineNumbers),
|
|
1288
1288
|
title: showLineNumbers ? "Hide line numbers" : "Show line numbers",
|
|
1289
1289
|
children: [
|
|
1290
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-3 h-3" }),
|
|
1290
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
1291
1291
|
" Lines"
|
|
1292
1292
|
]
|
|
1293
1293
|
}
|
|
@@ -1298,7 +1298,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1298
1298
|
variant: "ghost",
|
|
1299
1299
|
size: "sm",
|
|
1300
1300
|
className: cn(
|
|
1301
|
-
"h-7 text-xs font-
|
|
1301
|
+
"h-7 text-xs font-medium gap-2",
|
|
1302
1302
|
showAi ? "text-white bg-blue-600 hover:bg-blue-500 hover:text-white shadow-[0_0_10px_rgba(37,99,235,0.4)]" : "text-zinc-500 hover:text-blue-400"
|
|
1303
1303
|
),
|
|
1304
1304
|
onClick: () => setShowAi(!showAi),
|
|
@@ -1315,15 +1315,15 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1315
1315
|
{
|
|
1316
1316
|
variant: "ghost",
|
|
1317
1317
|
size: "sm",
|
|
1318
|
-
className: "h-7 text-xs font-
|
|
1318
|
+
className: "h-7 text-xs font-medium text-amber-500 hover:text-amber-400 gap-2",
|
|
1319
1319
|
onClick: onExplain,
|
|
1320
1320
|
children: [
|
|
1321
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "w-3 h-3" }),
|
|
1321
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
1322
1322
|
" Explain"
|
|
1323
1323
|
]
|
|
1324
1324
|
}
|
|
1325
1325
|
),
|
|
1326
|
-
/* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "px-1.5 py-0.5 rounded bg-zinc-900 border border-white/5 text-
|
|
1326
|
+
/* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "px-1.5 py-0.5 rounded bg-zinc-900 border border-white/5 text-[0.5625rem] text-zinc-600 font-mono", children: "\u2318+Enter" })
|
|
1327
1327
|
] })
|
|
1328
1328
|
] }),
|
|
1329
1329
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showAi && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1341,8 +1341,8 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1341
1341
|
children: [
|
|
1342
1342
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-3 py-1.5 border-b border-white/5 mb-1.5", children: [
|
|
1343
1343
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1344
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded-md bg-blue-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3
|
|
1345
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
1344
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded-md bg-blue-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3 h-3 text-blue-400" }) }),
|
|
1345
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.625rem] font-black text-blue-400", children: "Expert DBA Mode" })
|
|
1346
1346
|
] }),
|
|
1347
1347
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1348
1348
|
aiConversationHistory.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1350,7 +1350,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1350
1350
|
{
|
|
1351
1351
|
type: "button",
|
|
1352
1352
|
onClick: () => setAiConversationHistory([]),
|
|
1353
|
-
className: "text-
|
|
1353
|
+
className: "text-[0.625rem] text-zinc-500 hover:text-zinc-300 font-medium px-1.5 py-0.5 rounded bg-white/5 hover:bg-white/10 transition-colors",
|
|
1354
1354
|
title: "Clear conversation history",
|
|
1355
1355
|
children: [
|
|
1356
1356
|
aiConversationHistory.length / 2,
|
|
@@ -1358,7 +1358,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1358
1358
|
]
|
|
1359
1359
|
}
|
|
1360
1360
|
),
|
|
1361
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
1361
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[0.625rem] text-zinc-500 font-medium", children: [
|
|
1362
1362
|
"Context: ",
|
|
1363
1363
|
tables.length,
|
|
1364
1364
|
" tables"
|
|
@@ -1374,10 +1374,10 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1374
1374
|
exit: { height: 0, opacity: 0 },
|
|
1375
1375
|
className: "px-3 pb-2",
|
|
1376
1376
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-red-500/10 border border-red-500/20 rounded-lg p-2.5 flex items-start gap-2.5", children: [
|
|
1377
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-red-500/20 mt-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3 text-red-400" }) }),
|
|
1377
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-red-500/20 mt-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3 text-red-400" }) }),
|
|
1378
1378
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
1379
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
1380
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
1379
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-red-400 mb-0.5", children: "AI Error" }),
|
|
1380
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-red-300/90 leading-relaxed", children: aiError })
|
|
1381
1381
|
] }),
|
|
1382
1382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1383
1383
|
"button",
|
|
@@ -1385,7 +1385,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1385
1385
|
type: "button",
|
|
1386
1386
|
onClick: () => setAiError(null),
|
|
1387
1387
|
className: "text-red-400/50 hover:text-red-400 transition-colors",
|
|
1388
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3
|
|
1388
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
1389
1389
|
}
|
|
1390
1390
|
)
|
|
1391
1391
|
] })
|
|
@@ -1399,7 +1399,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1399
1399
|
value: aiPrompt,
|
|
1400
1400
|
onChange: (e) => setAiPrompt(e.target.value),
|
|
1401
1401
|
placeholder: "Describe the data you need in plain English... (e.g. 'Show me the revenue growth per month')",
|
|
1402
|
-
className: "bg-transparent border-none outline-none text-
|
|
1402
|
+
className: "bg-transparent border-none outline-none text-xs text-zinc-100 w-full h-12 placeholder:text-zinc-600 font-medium"
|
|
1403
1403
|
}
|
|
1404
1404
|
),
|
|
1405
1405
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
@@ -1409,7 +1409,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1409
1409
|
type: "button",
|
|
1410
1410
|
onClick: () => setShowAi(false),
|
|
1411
1411
|
className: "p-2.5 rounded-xl hover:bg-white/5 text-zinc-500 transition-colors",
|
|
1412
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
1412
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
1413
1413
|
}
|
|
1414
1414
|
),
|
|
1415
1415
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1417,13 +1417,13 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1417
1417
|
{
|
|
1418
1418
|
type: "submit",
|
|
1419
1419
|
disabled: isAiLoading || !aiPrompt.trim(),
|
|
1420
|
-
className: "bg-blue-600 hover:bg-blue-500 disabled:opacity-50 disabled:hover:bg-blue-600 px-4 py-2 rounded-xl text-white text-
|
|
1420
|
+
className: "bg-blue-600 hover:bg-blue-500 disabled:opacity-50 disabled:hover:bg-blue-600 px-4 py-2 rounded-xl text-white text-[0.625rem] font-medium transition-all shadow-lg shadow-blue-600/30 flex items-center gap-2",
|
|
1421
1421
|
children: isAiLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1422
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3
|
|
1422
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin" }),
|
|
1423
1423
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Thinking..." })
|
|
1424
1424
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1425
1425
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Generate" }),
|
|
1426
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "w-3
|
|
1426
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
1427
1427
|
] })
|
|
1428
1428
|
}
|
|
1429
1429
|
)
|
|
@@ -1443,7 +1443,7 @@ var QueryEditor = React6.forwardRef(({
|
|
|
1443
1443
|
value,
|
|
1444
1444
|
beforeMount: handleBeforeMount,
|
|
1445
1445
|
onChange: handleEditorChange,
|
|
1446
|
-
loading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-full bg-[#050505] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-6 h-6 animate-spin text-zinc-800" }) }),
|
|
1446
|
+
loading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-full bg-[#050505] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-6 h-6 animate-spin text-zinc-800" }) }),
|
|
1447
1447
|
onMount: (editor, monaco2) => {
|
|
1448
1448
|
editorRef.current = editor;
|
|
1449
1449
|
editor.onDidBlurEditorText(() => {
|
|
@@ -2077,10 +2077,10 @@ function ResultCard({
|
|
|
2077
2077
|
children: [
|
|
2078
2078
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
2079
2079
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
2080
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-
|
|
2080
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-blue-400" }) }),
|
|
2081
2081
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2082
2082
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
2083
|
-
"text-
|
|
2083
|
+
"text-xs font-medium truncate",
|
|
2084
2084
|
maskingActive && (sensitiveColumns == null ? void 0 : sensitiveColumns.has(primaryColumn)) ? "text-zinc-500 italic" : "text-zinc-100"
|
|
2085
2085
|
), children: displayPrimary }),
|
|
2086
2086
|
idValue != null && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-zinc-500 font-mono", children: [
|
|
@@ -2089,7 +2089,7 @@ function ResultCard({
|
|
|
2089
2089
|
] })
|
|
2090
2090
|
] })
|
|
2091
2091
|
] }),
|
|
2092
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-
|
|
2092
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-zinc-600" })
|
|
2093
2093
|
] }),
|
|
2094
2094
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2095
2095
|
previewFields.map((field) => {
|
|
@@ -2100,7 +2100,7 @@ function ResultCard({
|
|
|
2100
2100
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-xs", children: [
|
|
2101
2101
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-zinc-500 truncate mr-2", children: [
|
|
2102
2102
|
field,
|
|
2103
|
-
isMasked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-2.5 h-2.5 inline ml-1 text-purple-400" })
|
|
2103
|
+
isMasked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-2.5 h-2.5 inline ml-1 text-purple-400" })
|
|
2104
2104
|
] }),
|
|
2105
2105
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate max-w-[60%] text-right font-mono", className), children: displayValue })
|
|
2106
2106
|
] }, field);
|
|
@@ -2311,7 +2311,7 @@ function RowDetailSheet({
|
|
|
2311
2311
|
return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "bottom", className: "h-[85vh] bg-[#0a0a0a] border-t border-white/10 rounded-t-3xl", children: [
|
|
2312
2312
|
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { className: "pb-4 border-b border-white/5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2313
2313
|
/* @__PURE__ */ jsxRuntime.jsxs(SheetTitle, { className: "text-zinc-100 flex items-center gap-2", children: [
|
|
2314
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileJson, { className: "w-
|
|
2314
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileJson, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-blue-400" }) }),
|
|
2315
2315
|
"Row #",
|
|
2316
2316
|
rowIndex + 1
|
|
2317
2317
|
] }),
|
|
@@ -2323,10 +2323,10 @@ function RowDetailSheet({
|
|
|
2323
2323
|
className: "h-8 text-xs border-white/10 hover:bg-white/5",
|
|
2324
2324
|
onClick: copyAllAsJson,
|
|
2325
2325
|
children: copiedField === "__all__" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2326
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3 h-3 mr-1 text-emerald-400" }),
|
|
2326
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { strokeWidth: 1.5, className: "w-3 h-3 mr-1 text-emerald-400" }),
|
|
2327
2327
|
" Copied"
|
|
2328
2328
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2329
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3 mr-1" }),
|
|
2329
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3 h-3 mr-1" }),
|
|
2330
2330
|
" Copy JSON"
|
|
2331
2331
|
] })
|
|
2332
2332
|
}
|
|
@@ -2341,12 +2341,12 @@ function RowDetailSheet({
|
|
|
2341
2341
|
className: "group p-3 rounded-lg hover:bg-white/5 transition-colors",
|
|
2342
2342
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
2343
2343
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2344
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs
|
|
2344
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-zinc-500 mb-1 font-mono flex items-center gap-1", children: [
|
|
2345
2345
|
field,
|
|
2346
|
-
isMasked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-2.5 h-2.5 text-purple-400" })
|
|
2346
|
+
isMasked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-purple-400" })
|
|
2347
2347
|
] }),
|
|
2348
2348
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
2349
|
-
"font-mono text-
|
|
2349
|
+
"font-mono text-xs break-all",
|
|
2350
2350
|
isMasked ? "text-zinc-500 italic" : formatCellValue(row[field]).className,
|
|
2351
2351
|
isLongValue && "text-xs"
|
|
2352
2352
|
), children: text })
|
|
@@ -2370,7 +2370,7 @@ function RowDetailSheet({
|
|
|
2370
2370
|
size: "sm",
|
|
2371
2371
|
className: "h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2372
2372
|
onClick: () => copyValue(field, row[field]),
|
|
2373
|
-
children: copiedField === field ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3.5 h-3.5 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3.5 h-3.5 text-zinc-500" })
|
|
2373
|
+
children: copiedField === field ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-zinc-500" })
|
|
2374
2374
|
}
|
|
2375
2375
|
)
|
|
2376
2376
|
] })
|
|
@@ -2417,14 +2417,14 @@ function StatsBar({
|
|
|
2417
2417
|
onClick: onClearFilters,
|
|
2418
2418
|
title: "Clear all filters",
|
|
2419
2419
|
children: [
|
|
2420
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "w-3 h-3" }),
|
|
2420
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
2421
2421
|
activeFilterCount,
|
|
2422
2422
|
" filter",
|
|
2423
2423
|
activeFilterCount > 1 ? "s" : "",
|
|
2424
2424
|
" \u2022 ",
|
|
2425
2425
|
filteredRowCount,
|
|
2426
2426
|
" shown",
|
|
2427
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
2427
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
2428
2428
|
]
|
|
2429
2429
|
}
|
|
2430
2430
|
),
|
|
@@ -2437,7 +2437,7 @@ function StatsBar({
|
|
|
2437
2437
|
variant: "ghost",
|
|
2438
2438
|
size: "sm",
|
|
2439
2439
|
className: cn(
|
|
2440
|
-
"h-6 px-2 text-xs font-
|
|
2440
|
+
"h-6 px-2 text-xs font-medium gap-1",
|
|
2441
2441
|
effectiveMaskingEnabled ? "text-purple-400 bg-purple-500/10" : "text-zinc-500"
|
|
2442
2442
|
),
|
|
2443
2443
|
onClick: onToggleMasking,
|
|
@@ -2447,8 +2447,8 @@ function StatsBar({
|
|
|
2447
2447
|
effectiveMaskingEnabled ? "MASKED" : "MASK"
|
|
2448
2448
|
]
|
|
2449
2449
|
}
|
|
2450
|
-
) : effectiveMaskingEnabled ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "h-6 px-2 text-xs font-
|
|
2451
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-3 h-3" }),
|
|
2450
|
+
) : effectiveMaskingEnabled ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "h-6 px-2 text-xs font-medium text-purple-400 bg-purple-500/10 rounded flex items-center gap-1", children: [
|
|
2451
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
2452
2452
|
"MASKED"
|
|
2453
2453
|
] }) : null),
|
|
2454
2454
|
editingEnabled && pendingChanges && pendingChanges.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
@@ -2464,7 +2464,7 @@ function StatsBar({
|
|
|
2464
2464
|
size: "sm",
|
|
2465
2465
|
className: "h-6 px-1.5 text-xs text-emerald-400 hover:bg-emerald-500/10",
|
|
2466
2466
|
onClick: onApplyChanges,
|
|
2467
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { className: "w-3 h-3" })
|
|
2467
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
2468
2468
|
}
|
|
2469
2469
|
),
|
|
2470
2470
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2474,7 +2474,7 @@ function StatsBar({
|
|
|
2474
2474
|
size: "sm",
|
|
2475
2475
|
className: "h-6 px-1.5 text-xs text-red-400 hover:bg-red-500/10",
|
|
2476
2476
|
onClick: onDiscardChanges,
|
|
2477
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
2477
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
2478
2478
|
}
|
|
2479
2479
|
)
|
|
2480
2480
|
] }),
|
|
@@ -2491,7 +2491,7 @@ function StatsBar({
|
|
|
2491
2491
|
"p-1.5 rounded transition-all",
|
|
2492
2492
|
viewMode === "card" ? "bg-blue-600 text-white" : "text-zinc-500"
|
|
2493
2493
|
),
|
|
2494
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "w-
|
|
2494
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
2495
2495
|
}
|
|
2496
2496
|
),
|
|
2497
2497
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2502,7 +2502,7 @@ function StatsBar({
|
|
|
2502
2502
|
"p-1.5 rounded transition-all",
|
|
2503
2503
|
viewMode === "table" ? "bg-blue-600 text-white" : "text-zinc-500"
|
|
2504
2504
|
),
|
|
2505
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table2, { className: "w-
|
|
2505
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table2, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
2506
2506
|
}
|
|
2507
2507
|
)
|
|
2508
2508
|
] })
|
|
@@ -2520,10 +2520,10 @@ function LoadMoreFooter({ hasMore, onLoadMore, isLoadingMore }) {
|
|
|
2520
2520
|
disabled: isLoadingMore,
|
|
2521
2521
|
className: "h-8 px-4 text-xs border-white/10 hover:bg-white/5",
|
|
2522
2522
|
children: isLoadingMore ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2523
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 mr-2 animate-spin" }),
|
|
2523
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 mr-2 animate-spin" }),
|
|
2524
2524
|
"Loading..."
|
|
2525
2525
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2526
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 mr-2" }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { strokeWidth: 1.5, className: "w-3 h-3 mr-2" }),
|
|
2527
2527
|
"Load More (500 rows)"
|
|
2528
2528
|
] })
|
|
2529
2529
|
}
|
|
@@ -2644,8 +2644,8 @@ function ResultsGrid({
|
|
|
2644
2644
|
onClick: () => column.toggleSorting(column.getIsSorted() === "asc"),
|
|
2645
2645
|
children: [
|
|
2646
2646
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: field }),
|
|
2647
|
-
isSensitive && /* @__PURE__ */ jsxRuntime.jsx("span", { title: "Masked column", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-3 h-3 text-purple-400 shrink-0" }) }),
|
|
2648
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 opacity-0 group-hover/header:opacity-100 transition-opacity", children: column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3 h-3" }) : column.getIsSorted() === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { className: "w-3 h-3" }) })
|
|
2647
|
+
isSensitive && /* @__PURE__ */ jsxRuntime.jsx("span", { title: "Masked column", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-3 h-3 text-purple-400 shrink-0" }) }),
|
|
2648
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 opacity-0 group-hover/header:opacity-100 transition-opacity", children: column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "w-3 h-3" }) : column.getIsSorted() === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { strokeWidth: 1.5, className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { strokeWidth: 1.5, className: "w-3 h-3" }) })
|
|
2649
2649
|
]
|
|
2650
2650
|
}
|
|
2651
2651
|
),
|
|
@@ -2661,7 +2661,7 @@ function ResultsGrid({
|
|
|
2661
2661
|
setActiveFilterCol(activeFilterCol === field ? null : field);
|
|
2662
2662
|
},
|
|
2663
2663
|
title: "Filter column",
|
|
2664
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "w-3 h-3" })
|
|
2664
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
2665
2665
|
}
|
|
2666
2666
|
),
|
|
2667
2667
|
activeFilterCol === field && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2685,7 +2685,7 @@ function ResultsGrid({
|
|
|
2685
2685
|
onKeyDown: (e) => {
|
|
2686
2686
|
if (e.key === "Escape" || e.key === "Enter") setActiveFilterCol(null);
|
|
2687
2687
|
},
|
|
2688
|
-
className: "w-full bg-[#050505] border border-white/10 rounded px-2 py-1 text-
|
|
2688
|
+
className: "w-full bg-[#050505] border border-white/10 rounded px-2 py-1 text-xs text-zinc-200 outline-none focus:border-blue-500/30"
|
|
2689
2689
|
}
|
|
2690
2690
|
),
|
|
2691
2691
|
hasFilter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2771,7 +2771,7 @@ function ResultsGrid({
|
|
|
2771
2771
|
const { display: display2, className: className2 } = formatCellValue(val);
|
|
2772
2772
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate w-full h-full flex items-center gap-1", children: [
|
|
2773
2773
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: className2, children: display2 }),
|
|
2774
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-2.5 h-2.5 text-purple-400/50 shrink-0" })
|
|
2774
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-purple-400/50 shrink-0" })
|
|
2775
2775
|
] });
|
|
2776
2776
|
}
|
|
2777
2777
|
const displayVal = pendingChange !== void 0 ? pendingChange.newValue : val;
|
|
@@ -2832,7 +2832,7 @@ function ResultsGrid({
|
|
|
2832
2832
|
if (!result || result.rows.length === 0) {
|
|
2833
2833
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col items-center justify-center p-8 text-center text-zinc-600 animate-in fade-in zoom-in-95 duration-500", children: [
|
|
2834
2834
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-2xl bg-zinc-900/50 flex items-center justify-center mb-6 border border-white/5 shadow-2xl", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl text-zinc-500", children: "\u2205" }) }),
|
|
2835
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
2835
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-400", children: "Query returned no data" }),
|
|
2836
2836
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-600 mt-2 max-w-[280px] leading-relaxed", children: "The operation was successful, but the result set is currently empty." })
|
|
2837
2837
|
] });
|
|
2838
2838
|
}
|
|
@@ -2915,13 +2915,13 @@ function ResultsGrid({
|
|
|
2915
2915
|
"div",
|
|
2916
2916
|
{
|
|
2917
2917
|
className: cn(
|
|
2918
|
-
"h-10 px-4 flex items-center gap-1 border-r border-b border-white/5 text-xs uppercase font-mono
|
|
2918
|
+
"h-10 px-4 flex items-center gap-1 border-r border-b border-white/5 text-xs uppercase font-mono text-zinc-500 bg-[#0d0d0d] whitespace-nowrap",
|
|
2919
2919
|
idx === 0 && "sticky left-0 z-30 bg-[#0d0d0d] shadow-[2px_0_8px_rgba(0,0,0,0.3)]",
|
|
2920
2920
|
"min-w-[120px]"
|
|
2921
2921
|
),
|
|
2922
2922
|
children: [
|
|
2923
2923
|
field,
|
|
2924
|
-
isSensitive && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-2.5 h-2.5 text-purple-400" })
|
|
2924
|
+
isSensitive && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-purple-400" })
|
|
2925
2925
|
]
|
|
2926
2926
|
},
|
|
2927
2927
|
field
|
|
@@ -2986,7 +2986,7 @@ function ResultsGrid({
|
|
|
2986
2986
|
"div",
|
|
2987
2987
|
{
|
|
2988
2988
|
style: { width: header.getSize(), minWidth: header.getSize() },
|
|
2989
|
-
className: "h-10 px-4 flex items-center border-r border-b border-white/5 text-xs uppercase font-mono
|
|
2989
|
+
className: "h-10 px-4 flex items-center border-r border-b border-white/5 text-xs uppercase font-mono text-zinc-500 bg-[#0d0d0d] relative group shrink-0",
|
|
2990
2990
|
children: [
|
|
2991
2991
|
header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
2992
2992
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3068,9 +3068,9 @@ var TableNode = ({ data }) => {
|
|
|
3068
3068
|
const fkColumns = new Set((table.foreignKeys || []).map((fk) => fk.columnName));
|
|
3069
3069
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `bg-[#0d0d0d] border rounded-lg overflow-hidden min-w-[200px] shadow-2xl transition-all ${isHighlighted ? "border-blue-500/60 ring-1 ring-blue-500/30" : "border-white/10"}`, children: [
|
|
3070
3070
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-blue-600/10 px-3 py-2 border-b border-white/5 flex items-center gap-2", children: [
|
|
3071
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "w-3.5 h-3.5 text-blue-400" }),
|
|
3072
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
3073
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
3071
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-blue-400" }),
|
|
3072
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-100r", children: table.name }),
|
|
3073
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[0.625rem] text-zinc-600 ml-auto", children: [
|
|
3074
3074
|
((_a = table.columns) == null ? void 0 : _a.length) || 0,
|
|
3075
3075
|
" cols"
|
|
3076
3076
|
] })
|
|
@@ -3097,14 +3097,14 @@ var TableNode = ({ data }) => {
|
|
|
3097
3097
|
}
|
|
3098
3098
|
),
|
|
3099
3099
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3100
|
-
col.isPrimary ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Key, { className: "w-2.5 h-2.5 text-yellow-500" }) : isFk ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, { className: "w-2.5 h-2.5 text-blue-400" }) : col.type.toLowerCase().includes("int") ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-2.5 h-2.5 text-zinc-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-2.5 h-2.5 text-zinc-500" }),
|
|
3100
|
+
col.isPrimary ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Key, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-yellow-500" }) : isFk ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-blue-400" }) : col.type.toLowerCase().includes("int") ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-zinc-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-zinc-500" }),
|
|
3101
3101
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: col.isPrimary ? "text-yellow-500/90 font-medium" : isFk ? "text-blue-400/80" : "text-zinc-400", children: col.name })
|
|
3102
3102
|
] }),
|
|
3103
3103
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3104
|
-
col.nullable === false && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
3105
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
3104
|
+
col.nullable === false && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.5rem] text-red-500/60", children: "NN" }),
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.625rem] text-zinc-600 font-mono uppercase", children: col.type })
|
|
3106
3106
|
] }),
|
|
3107
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-full ml-2 top-0 z-50 hidden group-hover:block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#1a1a1a] border border-white/10 rounded px-2 py-1 text-
|
|
3107
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-full ml-2 top-0 z-50 hidden group-hover:block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#1a1a1a] border border-white/10 rounded px-2 py-1 text-[0.625rem] whitespace-nowrap shadow-xl", children: [
|
|
3108
3108
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-zinc-300", children: [
|
|
3109
3109
|
col.name,
|
|
3110
3110
|
": ",
|
|
@@ -3317,8 +3317,8 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3317
3317
|
}, []);
|
|
3318
3318
|
if (schema.length === 0) {
|
|
3319
3319
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 z-50 bg-[#050505] flex flex-col items-center justify-center", children: [
|
|
3320
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-8 h-8 text-blue-500 animate-spin mb-4" }),
|
|
3321
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-500 text-
|
|
3320
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-8 h-8 text-blue-500 animate-spin mb-4" }),
|
|
3321
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-500 text-xs", children: "Generating ERD Diagram..." })
|
|
3322
3322
|
] });
|
|
3323
3323
|
}
|
|
3324
3324
|
const hasForeignKeys = schema.some((t) => (t.foreignKeys || []).length > 0);
|
|
@@ -3358,7 +3358,7 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3358
3358
|
className: "bg-[#0d0d0d] border-white/10 hover:bg-white/5 text-xs gap-1",
|
|
3359
3359
|
onClick: () => exportDiagram("png"),
|
|
3360
3360
|
children: [
|
|
3361
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "w-3 h-3" }),
|
|
3361
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
3362
3362
|
" PNG"
|
|
3363
3363
|
]
|
|
3364
3364
|
}
|
|
@@ -3371,7 +3371,7 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3371
3371
|
className: "bg-[#0d0d0d] border-white/10 hover:bg-white/5 text-xs gap-1",
|
|
3372
3372
|
onClick: () => exportDiagram("svg"),
|
|
3373
3373
|
children: [
|
|
3374
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "w-3 h-3" }),
|
|
3374
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
3375
3375
|
" SVG"
|
|
3376
3376
|
]
|
|
3377
3377
|
}
|
|
@@ -3396,12 +3396,12 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3396
3396
|
size: "icon",
|
|
3397
3397
|
className: "rounded-full bg-[#0d0d0d] border-white/10 hover:bg-white/5",
|
|
3398
3398
|
onClick: onClose,
|
|
3399
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
3399
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
3400
3400
|
}
|
|
3401
3401
|
)
|
|
3402
3402
|
] }) }),
|
|
3403
3403
|
/* @__PURE__ */ jsxRuntime.jsx(react.Panel, { position: "top-left", className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0d0d0d]/80 backdrop-blur-md border border-white/10 p-3 rounded-xl shadow-2xl space-y-2", children: [
|
|
3404
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-xs font-
|
|
3404
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-xs font-medium text-white mb-1 flex items-center gap-2", children: [
|
|
3405
3405
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-500 animate-pulse" }),
|
|
3406
3406
|
"ERD Visualizer"
|
|
3407
3407
|
] }),
|
|
@@ -3416,7 +3416,7 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3416
3416
|
] })
|
|
3417
3417
|
] }),
|
|
3418
3418
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3419
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-zinc-600" }),
|
|
3419
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { strokeWidth: 1.5, className: "absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-zinc-600" }),
|
|
3420
3420
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3421
3421
|
"input",
|
|
3422
3422
|
{
|
|
@@ -3428,13 +3428,13 @@ function SchemaDiagramInner({ schema, onClose }) {
|
|
|
3428
3428
|
}
|
|
3429
3429
|
)
|
|
3430
3430
|
] }),
|
|
3431
|
-
!hasForeignKeys && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-1.5 text-
|
|
3432
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "w-3 h-3 mt-0.5 shrink-0" }),
|
|
3431
|
+
!hasForeignKeys && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-1.5 text-[0.625rem] text-amber-500/80", children: [
|
|
3432
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { strokeWidth: 1.5, className: "w-3 h-3 mt-0.5 shrink-0" }),
|
|
3433
3433
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "No FK data available. Showing heuristic relationships (dashed)." })
|
|
3434
3434
|
] }),
|
|
3435
3435
|
selectedNode && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-blue-400 border-t border-white/5 pt-2", children: [
|
|
3436
3436
|
"Selected: ",
|
|
3437
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-
|
|
3437
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium", children: selectedNode }),
|
|
3438
3438
|
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => setSelectedNode(null), className: "ml-2 text-zinc-600 hover:text-zinc-400", children: "clear" })
|
|
3439
3439
|
] })
|
|
3440
3440
|
] }) })
|
|
@@ -3775,7 +3775,7 @@ var CustomTooltip = ({ active, payload, label }) => {
|
|
|
3775
3775
|
if (!active || !payload || !payload.length) return null;
|
|
3776
3776
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/10 rounded-lg px-3 py-2 shadow-xl", children: [
|
|
3777
3777
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-400 text-xs mb-1", children: label }),
|
|
3778
|
-
payload.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-
|
|
3778
|
+
payload.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs", style: { color: entry.color }, children: [
|
|
3779
3779
|
entry.name,
|
|
3780
3780
|
": ",
|
|
3781
3781
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium", children: formatNumber(entry.value) })
|
|
@@ -4022,30 +4022,30 @@ function DataCharts({ result }) {
|
|
|
4022
4022
|
if (!analysis.isVisualizable) {
|
|
4023
4023
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col items-center justify-center bg-[#080808] text-zinc-500", children: [
|
|
4024
4024
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "w-12 h-12 mb-4 opacity-30" }),
|
|
4025
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
4025
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium mb-1", children: "Cannot Visualize Data" }),
|
|
4026
4026
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-600", children: analysis.reason })
|
|
4027
4027
|
] });
|
|
4028
4028
|
}
|
|
4029
4029
|
const chartTypes = [
|
|
4030
|
-
{ type: "bar", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-
|
|
4031
|
-
{ type: "line", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LineChart, { className: "w-
|
|
4032
|
-
{ type: "pie", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PieChart, { className: "w-
|
|
4033
|
-
{ type: "area", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AreaChart, { className: "w-
|
|
4034
|
-
{ type: "scatter", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "w-
|
|
4035
|
-
{ type: "histogram", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart2, { className: "w-
|
|
4036
|
-
{ type: "stacked-bar", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-
|
|
4037
|
-
{ type: "stacked-area", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AreaChart, { className: "w-
|
|
4030
|
+
{ type: "bar", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Bar" },
|
|
4031
|
+
{ type: "line", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LineChart, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Line" },
|
|
4032
|
+
{ type: "pie", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PieChart, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Pie" },
|
|
4033
|
+
{ type: "area", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AreaChart, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Area" },
|
|
4034
|
+
{ type: "scatter", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Scatter" },
|
|
4035
|
+
{ type: "histogram", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart2, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Histogram" },
|
|
4036
|
+
{ type: "stacked-bar", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Stacked" },
|
|
4037
|
+
{ type: "stacked-area", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AreaChart, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }), label: "Stack Area" }
|
|
4038
4038
|
];
|
|
4039
4039
|
const getFieldIcon = (type) => {
|
|
4040
4040
|
switch (type) {
|
|
4041
4041
|
case "numeric":
|
|
4042
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-3 h-3" });
|
|
4042
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3 h-3" });
|
|
4043
4043
|
case "date":
|
|
4044
4044
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "w-3 h-3" });
|
|
4045
4045
|
case "categorical":
|
|
4046
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-3 h-3" });
|
|
4046
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { strokeWidth: 1.5, className: "w-3 h-3" });
|
|
4047
4047
|
default:
|
|
4048
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "w-3 h-3" });
|
|
4048
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { strokeWidth: 1.5, className: "w-3 h-3" });
|
|
4049
4049
|
}
|
|
4050
4050
|
};
|
|
4051
4051
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col bg-[#080808]", children: [
|
|
@@ -4068,7 +4068,7 @@ function DataCharts({ result }) {
|
|
|
4068
4068
|
)) }),
|
|
4069
4069
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-px bg-white/10 hidden sm:block" }),
|
|
4070
4070
|
chartType !== "pie" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4071
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4071
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: "X-Axis" }),
|
|
4072
4072
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: xAxis, onValueChange: setXAxis, children: [
|
|
4073
4073
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-7 w-[140px] text-xs bg-white/5 border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select field" }) }),
|
|
4074
4074
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "bg-[#111] border-white/10", children: analysis.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: field.name, className: "text-xs", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -4078,11 +4078,11 @@ function DataCharts({ result }) {
|
|
|
4078
4078
|
] })
|
|
4079
4079
|
] }),
|
|
4080
4080
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4081
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4081
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: chartType === "pie" ? "Value" : "Y-Axis" }),
|
|
4082
4082
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
4083
4083
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", className: "h-7 text-xs bg-white/5 border-white/10 gap-1", children: [
|
|
4084
4084
|
yAxis.length > 0 ? yAxis.join(", ") : "Select fields",
|
|
4085
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "w-3 h-3 ml-1" })
|
|
4085
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { strokeWidth: 1.5, className: "w-3 h-3 ml-1" })
|
|
4086
4086
|
] }) }),
|
|
4087
4087
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { className: "bg-[#111] border-white/10", children: analysis.numericFields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4088
4088
|
DropdownMenuItem,
|
|
@@ -4093,7 +4093,7 @@ function DataCharts({ result }) {
|
|
|
4093
4093
|
yAxis.includes(field) && "bg-blue-600/20 text-blue-400"
|
|
4094
4094
|
),
|
|
4095
4095
|
children: [
|
|
4096
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-3 h-3 mr-2" }),
|
|
4096
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3 h-3 mr-2" }),
|
|
4097
4097
|
field,
|
|
4098
4098
|
yAxis.includes(field) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto", children: "\u2713" })
|
|
4099
4099
|
]
|
|
@@ -4103,28 +4103,28 @@ function DataCharts({ result }) {
|
|
|
4103
4103
|
] })
|
|
4104
4104
|
] }),
|
|
4105
4105
|
chartType === "scatter" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4106
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4106
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: "Y" }),
|
|
4107
4107
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: scatterY, onValueChange: setScatterY, children: [
|
|
4108
4108
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-7 w-[120px] text-xs bg-white/5 border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Y field" }) }),
|
|
4109
4109
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "bg-[#111] border-white/10", children: analysis.numericFields.filter((f) => f !== xAxis).map((field) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: field, className: "text-xs", children: field }, field)) })
|
|
4110
4110
|
] })
|
|
4111
4111
|
] }),
|
|
4112
4112
|
chartType === "histogram" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4113
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4113
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: "Buckets" }),
|
|
4114
4114
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: String(histogramBuckets), onValueChange: (v) => setHistogramBuckets(Number(v)), children: [
|
|
4115
4115
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-7 w-[70px] text-xs bg-white/5 border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
4116
4116
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "bg-[#111] border-white/10", children: [5, 10, 20, 50].map((n) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(n), className: "text-xs", children: n }, n)) })
|
|
4117
4117
|
] })
|
|
4118
4118
|
] }),
|
|
4119
4119
|
chartType !== "scatter" && chartType !== "histogram" && chartType !== "pie" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4120
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4120
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: "Agg" }),
|
|
4121
4121
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: aggregation, onValueChange: (v) => setAggregation(v), children: [
|
|
4122
4122
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-7 w-[80px] text-xs bg-white/5 border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
4123
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "bg-[#111] border-white/10", children: ["none", "sum", "avg", "count", "min", "max"].map((a) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: a, className: "text-xs
|
|
4123
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "bg-[#111] border-white/10", children: ["none", "sum", "avg", "count", "min", "max"].map((a) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: a, className: "text-xs", children: a }, a)) })
|
|
4124
4124
|
] })
|
|
4125
4125
|
] }),
|
|
4126
4126
|
analysis.dateFields.length > 0 && chartType !== "scatter" && chartType !== "histogram" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4127
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4127
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600r", children: "Group" }),
|
|
4128
4128
|
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: dateGrouping || "none", onValueChange: (v) => setDateGrouping(v === "none" ? "" : v), children: [
|
|
4129
4129
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-7 w-[80px] text-xs bg-white/5 border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
4130
4130
|
/* @__PURE__ */ jsxRuntime.jsxs(SelectContent, { className: "bg-[#111] border-white/10", children: [
|
|
@@ -4151,12 +4151,12 @@ function DataCharts({ result }) {
|
|
|
4151
4151
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "h-7 text-xs text-zinc-500", onClick: () => setShowSaveDialog(false), children: "Cancel" })
|
|
4152
4152
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
4153
4153
|
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "h-7 text-xs text-zinc-500 hover:text-white gap-1", onClick: () => setShowSaveDialog(true), children: [
|
|
4154
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { className: "w-3 h-3" }),
|
|
4154
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4155
4155
|
" Save"
|
|
4156
4156
|
] }),
|
|
4157
4157
|
savedCharts.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
4158
4158
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "h-7 text-xs text-zinc-500 hover:text-white gap-1", children: [
|
|
4159
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "w-3 h-3" }),
|
|
4159
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4160
4160
|
" Saved (",
|
|
4161
4161
|
savedCharts.length,
|
|
4162
4162
|
")"
|
|
@@ -4174,13 +4174,13 @@ function DataCharts({ result }) {
|
|
|
4174
4174
|
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: (e) => {
|
|
4175
4175
|
e.stopPropagation();
|
|
4176
4176
|
deleteSavedChart(chart.id);
|
|
4177
|
-
}, className: "text-zinc-600 hover:text-red-400", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" }) })
|
|
4177
|
+
}, className: "text-zinc-600 hover:text-red-400", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3" }) })
|
|
4178
4178
|
] }, chart.id)) })
|
|
4179
4179
|
] })
|
|
4180
4180
|
] }),
|
|
4181
4181
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
4182
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "h-7 text-xs font-
|
|
4183
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "w-3 h-3" }),
|
|
4182
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "h-7 text-xs font-medium text-zinc-500 hover:text-white gap-1", children: [
|
|
4183
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4184
4184
|
" Export"
|
|
4185
4185
|
] }) }),
|
|
4186
4186
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "bg-[#111] border-white/10", children: [
|
|
@@ -4189,7 +4189,7 @@ function DataCharts({ result }) {
|
|
|
4189
4189
|
] })
|
|
4190
4190
|
] })
|
|
4191
4191
|
] }),
|
|
4192
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: chartRef, className: "flex-1 p-4 min-h-0", children: yAxis.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full flex items-center justify-center text-zinc-600 text-
|
|
4192
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: chartRef, className: "flex-1 p-4 min-h-0", children: yAxis.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full flex items-center justify-center text-zinc-600 text-xs", children: "Select at least one numeric field for the chart" }) : /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data: chartData, margin: { top: 20, right: 30, left: 20, bottom: 60 }, children: [
|
|
4193
4193
|
/* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "#222" }),
|
|
4194
4194
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4195
4195
|
recharts.XAxis,
|
|
@@ -4633,12 +4633,12 @@ function CodeGenerator({
|
|
|
4633
4633
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/10 rounded-xl shadow-2xl w-full max-w-xl mx-4 overflow-hidden", children: [
|
|
4634
4634
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-b border-white/5", children: [
|
|
4635
4635
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4636
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code, { className: "w-
|
|
4637
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4636
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-purple-400" }),
|
|
4637
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: "Code Generator" }),
|
|
4638
4638
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500 font-mono", children: tableName }),
|
|
4639
4639
|
databaseType && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600 font-mono uppercase", children: databaseType })
|
|
4640
4640
|
] }),
|
|
4641
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
4641
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }) })
|
|
4642
4642
|
] }),
|
|
4643
4643
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-2 border-b border-white/5 bg-[#0a0a0a]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4644
4644
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4648,7 +4648,7 @@ function CodeGenerator({
|
|
|
4648
4648
|
className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-white/5 border border-white/10 text-xs text-zinc-300 hover:bg-white/10 transition-colors",
|
|
4649
4649
|
children: [
|
|
4650
4650
|
currentLang.label,
|
|
4651
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 text-zinc-500" })
|
|
4651
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { strokeWidth: 1.5, className: "w-3 h-3 text-zinc-500" })
|
|
4652
4652
|
]
|
|
4653
4653
|
}
|
|
4654
4654
|
),
|
|
@@ -4669,14 +4669,14 @@ function CodeGenerator({
|
|
|
4669
4669
|
)) })
|
|
4670
4670
|
] }) }),
|
|
4671
4671
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4672
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "p-5 text-
|
|
4672
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "p-5 text-xs font-mono text-zinc-300 overflow-auto max-h-[50vh] bg-[#050505] leading-relaxed whitespace-pre", children: code }),
|
|
4673
4673
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4674
4674
|
"button",
|
|
4675
4675
|
{
|
|
4676
4676
|
onClick: handleCopy,
|
|
4677
4677
|
className: "absolute top-3 right-3 flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white/10 hover:bg-white/20 text-xs text-zinc-400 transition-colors",
|
|
4678
4678
|
children: [
|
|
4679
|
-
copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3 h-3 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3" }),
|
|
4679
|
+
copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { strokeWidth: 1.5, className: "w-3 h-3 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4680
4680
|
copied ? "Copied!" : "Copy"
|
|
4681
4681
|
]
|
|
4682
4682
|
}
|
|
@@ -4828,21 +4828,21 @@ VALUES
|
|
|
4828
4828
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/10 rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[85vh] flex flex-col overflow-hidden", children: [
|
|
4829
4829
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-b border-white/5", children: [
|
|
4830
4830
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4831
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { className: "w-
|
|
4832
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
4831
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-amber-400" }),
|
|
4832
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: "Test Data Generator" }),
|
|
4833
4833
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500 font-mono", children: tableName })
|
|
4834
4834
|
] }),
|
|
4835
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
4835
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }) })
|
|
4836
4836
|
] }),
|
|
4837
4837
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 py-3 border-b border-white/5 bg-[#0a0a0a] flex items-center gap-4", children: [
|
|
4838
4838
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4839
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-
|
|
4839
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500r font-medium", children: "Rows:" }),
|
|
4840
4840
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: [5, 10, 25, 50, 100].map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4841
4841
|
"button",
|
|
4842
4842
|
{
|
|
4843
4843
|
onClick: () => setRowCount(n),
|
|
4844
4844
|
className: cn(
|
|
4845
|
-
"px-2 py-0.5 rounded text-xs font-
|
|
4845
|
+
"px-2 py-0.5 rounded text-xs font-medium transition-colors",
|
|
4846
4846
|
rowCount === n ? "bg-amber-500/20 text-amber-400 border border-amber-500/20" : "text-zinc-500 hover:text-zinc-300 hover:bg-white/5"
|
|
4847
4847
|
),
|
|
4848
4848
|
children: n
|
|
@@ -4854,10 +4854,10 @@ VALUES
|
|
|
4854
4854
|
"button",
|
|
4855
4855
|
{
|
|
4856
4856
|
onClick: () => setRefreshKey((k) => k + 1),
|
|
4857
|
-
className: "flex items-center gap-1 px-2 py-1 rounded text-xs font-
|
|
4857
|
+
className: "flex items-center gap-1 px-2 py-1 rounded text-xs font-medium text-zinc-500 hover:text-zinc-300 hover:bg-white/5 transition-colors",
|
|
4858
4858
|
title: "Regenerate random data",
|
|
4859
4859
|
children: [
|
|
4860
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "w-3 h-3" }),
|
|
4860
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4861
4861
|
" Regenerate"
|
|
4862
4862
|
]
|
|
4863
4863
|
}
|
|
@@ -4879,7 +4879,7 @@ VALUES
|
|
|
4879
4879
|
},
|
|
4880
4880
|
col.name
|
|
4881
4881
|
)) }) }),
|
|
4882
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto relative", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "p-5 text-
|
|
4882
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto relative", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "p-5 text-xs font-mono text-blue-300 whitespace-pre-wrap leading-relaxed", children: generatedQuery }) }),
|
|
4883
4883
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-t border-white/5 bg-[#0a0a0a]", children: [
|
|
4884
4884
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-zinc-600", children: [
|
|
4885
4885
|
columnConfigs.filter((c) => c.faker.generator !== "autoIncrement").length,
|
|
@@ -4892,9 +4892,9 @@ VALUES
|
|
|
4892
4892
|
"button",
|
|
4893
4893
|
{
|
|
4894
4894
|
onClick: handleCopy,
|
|
4895
|
-
className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-white/5 text-zinc-400 text-xs font-
|
|
4895
|
+
className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-white/5 text-zinc-400 text-xs font-medium hover:bg-white/10 transition-colors",
|
|
4896
4896
|
children: [
|
|
4897
|
-
copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3 h-3 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3" }),
|
|
4897
|
+
copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { strokeWidth: 1.5, className: "w-3 h-3 text-emerald-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
4898
4898
|
copied ? "Copied!" : "Copy"
|
|
4899
4899
|
]
|
|
4900
4900
|
}
|
|
@@ -4906,9 +4906,9 @@ VALUES
|
|
|
4906
4906
|
onExecuteQuery(generatedQuery);
|
|
4907
4907
|
onClose();
|
|
4908
4908
|
},
|
|
4909
|
-
className: "flex items-center gap-1.5 px-4 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white text-xs font-
|
|
4909
|
+
className: "flex items-center gap-1.5 px-4 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white text-xs font-medium transition-colors",
|
|
4910
4910
|
children: [
|
|
4911
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3 h-3 fill-current" }),
|
|
4911
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3 h-3 fill-current" }),
|
|
4912
4912
|
" Execute"
|
|
4913
4913
|
]
|
|
4914
4914
|
}
|
|
@@ -5020,15 +5020,15 @@ function analyzePlan(plan) {
|
|
|
5020
5020
|
};
|
|
5021
5021
|
}
|
|
5022
5022
|
var NodeIcon = ({ type }) => {
|
|
5023
|
-
if (type.includes("Seq Scan")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-
|
|
5024
|
-
if (type.includes("Index Scan") || type.includes("Index Only")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Target, { className: "w-
|
|
5025
|
-
if (type.includes("Scan")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-
|
|
5026
|
-
if (type.includes("Join")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layers, { className: "w-
|
|
5027
|
-
if (type.includes("Sort")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "w-
|
|
5028
|
-
if (type.includes("Limit")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "w-
|
|
5029
|
-
if (type.includes("Aggregate") || type.includes("Group")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "w-
|
|
5030
|
-
if (type.includes("Hash")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { className: "w-
|
|
5031
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "w-
|
|
5023
|
+
if (type.includes("Seq Scan")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-amber-400" });
|
|
5024
|
+
if (type.includes("Index Scan") || type.includes("Index Only")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Target, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-emerald-400" });
|
|
5025
|
+
if (type.includes("Scan")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-blue-400" });
|
|
5026
|
+
if (type.includes("Join")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layers, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-purple-400" });
|
|
5027
|
+
if (type.includes("Sort")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-amber-400" });
|
|
5028
|
+
if (type.includes("Limit")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-zinc-400" });
|
|
5029
|
+
if (type.includes("Aggregate") || type.includes("Group")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-pink-400" });
|
|
5030
|
+
if (type.includes("Hash")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-cyan-400" });
|
|
5031
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-zinc-500" });
|
|
5032
5032
|
};
|
|
5033
5033
|
var StatusBadge = ({ status }) => {
|
|
5034
5034
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-2 h-2 rounded-full", status === "good" ? "bg-emerald-500" : status === "warning" ? "bg-amber-500" : "bg-red-500") });
|
|
@@ -5061,7 +5061,7 @@ var PlanNode = ({ node, depth = 0, maxTime }) => {
|
|
|
5061
5061
|
isSeqScan ? "bg-amber-500/10" : isIndexScan ? "bg-emerald-500/10" : "bg-white/5"
|
|
5062
5062
|
), children: /* @__PURE__ */ jsxRuntime.jsx(NodeIcon, { type: nodeType }) }),
|
|
5063
5063
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5064
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5064
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200 truncate", children: nodeType }),
|
|
5065
5065
|
node["Relation Name"] && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500 font-mono truncate", children: node["Relation Name"] })
|
|
5066
5066
|
] }) }),
|
|
5067
5067
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4 text-xs font-mono", children: [
|
|
@@ -5183,16 +5183,16 @@ function AIExplainTab({
|
|
|
5183
5183
|
elements.push(
|
|
5184
5184
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-3 relative group/code", children: [
|
|
5185
5185
|
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: cn(
|
|
5186
|
-
"text-
|
|
5186
|
+
"text-xs font-mono p-3 rounded-lg overflow-x-auto border",
|
|
5187
5187
|
isSql ? "bg-blue-500/5 border-blue-500/10 text-blue-300" : "bg-white/[0.02] border-white/5 text-zinc-400"
|
|
5188
5188
|
), children: content }),
|
|
5189
5189
|
isSql && onLoadQuery && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5190
5190
|
"button",
|
|
5191
5191
|
{
|
|
5192
5192
|
onClick: () => onLoadQuery(content),
|
|
5193
|
-
className: "absolute top-2 right-2 opacity-0 group-hover/code:opacity-100 transition-opacity px-2 py-1 rounded bg-blue-600 hover:bg-blue-500 text-white text-xs font-
|
|
5193
|
+
className: "absolute top-2 right-2 opacity-0 group-hover/code:opacity-100 transition-opacity px-2 py-1 rounded bg-blue-600 hover:bg-blue-500 text-white text-xs font-medium flex items-center gap-1",
|
|
5194
5194
|
children: [
|
|
5195
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3 h-3" }),
|
|
5195
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
5196
5196
|
" Try This"
|
|
5197
5197
|
]
|
|
5198
5198
|
}
|
|
@@ -5214,15 +5214,15 @@ function AIExplainTab({
|
|
|
5214
5214
|
}
|
|
5215
5215
|
if (line.startsWith("## ")) {
|
|
5216
5216
|
elements.push(
|
|
5217
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-
|
|
5217
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xs font-medium text-zinc-200 mt-4 mb-2 flex items-center gap-2", children: line.slice(3) }, idx)
|
|
5218
5218
|
);
|
|
5219
5219
|
} else if (line.startsWith("### ")) {
|
|
5220
5220
|
elements.push(
|
|
5221
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-
|
|
5221
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-300 mt-3 mb-1", children: line.slice(4) }, idx)
|
|
5222
5222
|
);
|
|
5223
5223
|
} else if (line.startsWith("- ")) {
|
|
5224
5224
|
elements.push(
|
|
5225
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-
|
|
5225
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs text-zinc-400 leading-relaxed ml-2 my-0.5", children: [
|
|
5226
5226
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-zinc-600 mt-1 shrink-0", children: "\u2022" }),
|
|
5227
5227
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: renderInlineFormatting(line.slice(2)) })
|
|
5228
5228
|
] }, idx)
|
|
@@ -5230,8 +5230,8 @@ function AIExplainTab({
|
|
|
5230
5230
|
} else if (/^\d+\.\s/.test(line)) {
|
|
5231
5231
|
const num = (_a = line.match(/^(\d+)\./)) == null ? void 0 : _a[1];
|
|
5232
5232
|
elements.push(
|
|
5233
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-
|
|
5234
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-blue-400 font-
|
|
5233
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-xs text-zinc-400 leading-relaxed ml-2 my-0.5", children: [
|
|
5234
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-blue-400 font-medium mt-0 shrink-0 w-4", children: [
|
|
5235
5235
|
num,
|
|
5236
5236
|
"."
|
|
5237
5237
|
] }),
|
|
@@ -5242,7 +5242,7 @@ function AIExplainTab({
|
|
|
5242
5242
|
elements.push(/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1" }, idx));
|
|
5243
5243
|
} else {
|
|
5244
5244
|
elements.push(
|
|
5245
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
5245
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-400 leading-relaxed my-0.5", children: renderInlineFormatting(line) }, idx)
|
|
5246
5246
|
);
|
|
5247
5247
|
}
|
|
5248
5248
|
});
|
|
@@ -5262,20 +5262,20 @@ function AIExplainTab({
|
|
|
5262
5262
|
};
|
|
5263
5263
|
if (!hasRun) {
|
|
5264
5264
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col items-center justify-center p-8 text-center", children: [
|
|
5265
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-14 h-14 rounded-2xl bg-gradient-to-br from-purple-500/20 to-blue-500/10 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-7 h-7 text-purple-400" }) }),
|
|
5266
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-
|
|
5267
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
5265
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-14 h-14 rounded-2xl bg-gradient-to-br from-purple-500/20 to-blue-500/10 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-7 h-7 text-purple-400" }) }),
|
|
5266
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-200 mb-1", children: "AI Query Analysis" }),
|
|
5267
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-500 max-w-[280px] leading-relaxed mb-4", children: "Get a plain-language explanation of your query's execution plan with concrete optimization suggestions." }),
|
|
5268
5268
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5269
5269
|
"button",
|
|
5270
5270
|
{
|
|
5271
5271
|
onClick: analyzeWithAI,
|
|
5272
5272
|
disabled: !query,
|
|
5273
5273
|
className: cn(
|
|
5274
|
-
"flex items-center gap-2 px-4 py-2 rounded-lg text-xs font-
|
|
5274
|
+
"flex items-center gap-2 px-4 py-2 rounded-lg text-xs font-medium transition-all",
|
|
5275
5275
|
query ? "bg-purple-600 hover:bg-purple-500 text-white shadow-lg shadow-purple-900/20" : "bg-white/5 text-zinc-600 cursor-not-allowed"
|
|
5276
5276
|
),
|
|
5277
5277
|
children: [
|
|
5278
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3
|
|
5278
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
5279
5279
|
"Analyze with AI"
|
|
5280
5280
|
]
|
|
5281
5281
|
}
|
|
@@ -5286,17 +5286,17 @@ function AIExplainTab({
|
|
|
5286
5286
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col", children: [
|
|
5287
5287
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-b border-white/5 bg-[#0a0a0a]", children: [
|
|
5288
5288
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5289
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3
|
|
5290
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
5289
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3 h-3 text-purple-400" }),
|
|
5290
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-purple-400r", children: "AI Analysis" })
|
|
5291
5291
|
] }),
|
|
5292
5292
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5293
5293
|
"button",
|
|
5294
5294
|
{
|
|
5295
5295
|
onClick: analyzeWithAI,
|
|
5296
5296
|
disabled: isLoading,
|
|
5297
|
-
className: "flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-
|
|
5297
|
+
className: "flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium text-zinc-400 hover:text-white hover:bg-white/5 transition-all",
|
|
5298
5298
|
children: [
|
|
5299
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3 h-3" }),
|
|
5299
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3 h-3" }),
|
|
5300
5300
|
isLoading ? "Analyzing..." : "Re-analyze"
|
|
5301
5301
|
]
|
|
5302
5302
|
}
|
|
@@ -5304,16 +5304,16 @@ function AIExplainTab({
|
|
|
5304
5304
|
] }),
|
|
5305
5305
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-auto p-4", children: [
|
|
5306
5306
|
error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 p-3 rounded-lg bg-red-500/5 border border-red-500/10 text-red-400 text-xs mb-4", children: [
|
|
5307
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "w-
|
|
5307
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { strokeWidth: 1.5, className: "w-3.5 h-3.5 shrink-0" }),
|
|
5308
5308
|
error
|
|
5309
5309
|
] }),
|
|
5310
5310
|
aiResponse && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0", children: renderMarkdown(aiResponse) }),
|
|
5311
|
-
isLoading && !aiResponse && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-zinc-500 text-
|
|
5312
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-
|
|
5311
|
+
isLoading && !aiResponse && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-zinc-500 text-xs", children: [
|
|
5312
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3.5 h-3.5 animate-spin text-purple-400" }),
|
|
5313
5313
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Analyzing execution plan..." })
|
|
5314
5314
|
] }),
|
|
5315
5315
|
isLoading && aiResponse && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2 text-zinc-600 text-xs", children: [
|
|
5316
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin" }),
|
|
5316
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin" }),
|
|
5317
5317
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Still generating..." })
|
|
5318
5318
|
] })
|
|
5319
5319
|
] })
|
|
@@ -5328,8 +5328,8 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5328
5328
|
}, [plan]);
|
|
5329
5329
|
if (!plan || !Array.isArray(plan) || plan.length === 0) {
|
|
5330
5330
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col items-center justify-center text-zinc-500 bg-[#080808] p-12 text-center", children: [
|
|
5331
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-xl bg-white/5 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "w-6 h-6 text-zinc-600" }) }),
|
|
5332
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-
|
|
5331
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-xl bg-white/5 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { strokeWidth: 1.5, className: "w-6 h-6 text-zinc-600" }) }),
|
|
5332
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-300 mb-1", children: "No execution plan" }),
|
|
5333
5333
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-600 max-w-[240px]", children: "Run a SELECT query to see its execution plan and performance insights." })
|
|
5334
5334
|
] });
|
|
5335
5335
|
}
|
|
@@ -5338,18 +5338,18 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5338
5338
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 border-b border-white/5 bg-[#0a0a0a]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5339
5339
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-6", children: [
|
|
5340
5340
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5341
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "w-3
|
|
5342
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5341
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { strokeWidth: 1.5, className: "w-3 h-3 text-blue-400" }),
|
|
5342
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: formatTime((analysis == null ? void 0 : analysis.executionTime) || 0) }),
|
|
5343
5343
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600", children: "execution" })
|
|
5344
5344
|
] }),
|
|
5345
5345
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5346
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "w-3
|
|
5347
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5346
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "w-3 h-3 text-zinc-500" }),
|
|
5347
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-400", children: formatNumber2((analysis == null ? void 0 : analysis.totalRows) || 0) }),
|
|
5348
5348
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600", children: "rows" })
|
|
5349
5349
|
] }),
|
|
5350
5350
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5351
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { className: "w-3
|
|
5352
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5351
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { strokeWidth: 1.5, className: "w-3 h-3 text-zinc-500" }),
|
|
5352
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-400", children: formatNumber2((analysis == null ? void 0 : analysis.totalCost) || 0) }),
|
|
5353
5353
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-600", children: "cost" })
|
|
5354
5354
|
] })
|
|
5355
5355
|
] }),
|
|
@@ -5358,14 +5358,14 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5358
5358
|
{
|
|
5359
5359
|
onClick: () => setActiveTab(tab),
|
|
5360
5360
|
className: cn(
|
|
5361
|
-
"px-3 py-1 text-xs font-medium rounded-md transition-all
|
|
5361
|
+
"px-3 py-1 text-xs font-medium rounded-md transition-all",
|
|
5362
5362
|
activeTab === tab ? tab === "ai" ? "bg-purple-500/20 text-purple-300" : "bg-white/10 text-zinc-200" : "text-zinc-500 hover:text-zinc-300"
|
|
5363
5363
|
),
|
|
5364
5364
|
children: [
|
|
5365
|
-
tab === "insights" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "w-3 h-3 inline mr-1" }),
|
|
5366
|
-
tab === "ai" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3 h-3 inline mr-1" }),
|
|
5367
|
-
tab === "tree" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layers, { className: "w-3 h-3 inline mr-1" }),
|
|
5368
|
-
tab === "raw" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileJson, { className: "w-3 h-3 inline mr-1" }),
|
|
5365
|
+
tab === "insights" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { strokeWidth: 1.5, className: "w-3 h-3 inline mr-1" }),
|
|
5366
|
+
tab === "ai" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3 h-3 inline mr-1" }),
|
|
5367
|
+
tab === "tree" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layers, { strokeWidth: 1.5, className: "w-3 h-3 inline mr-1" }),
|
|
5368
|
+
tab === "raw" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileJson, { strokeWidth: 1.5, className: "w-3 h-3 inline mr-1" }),
|
|
5369
5369
|
tab === "ai" ? "AI Explain" : tab
|
|
5370
5370
|
]
|
|
5371
5371
|
},
|
|
@@ -5385,7 +5385,7 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5385
5385
|
),
|
|
5386
5386
|
activeTab === "insights" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 space-y-4", children: [
|
|
5387
5387
|
analysis && analysis.warnings.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5388
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-
|
|
5388
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-500r mb-2", children: "Performance Issues" }),
|
|
5389
5389
|
analysis.warnings.map((warning, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5390
5390
|
"div",
|
|
5391
5391
|
{
|
|
@@ -5397,10 +5397,10 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5397
5397
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
5398
5398
|
"p-1 rounded",
|
|
5399
5399
|
warning.type === "critical" ? "bg-red-500/10" : warning.type === "warning" ? "bg-amber-500/10" : "bg-blue-500/10"
|
|
5400
|
-
), children: warning.type === "critical" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "w-3
|
|
5400
|
+
), children: warning.type === "critical" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { strokeWidth: 1.5, className: "w-3 h-3 text-red-400" }) : warning.type === "warning" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { strokeWidth: 1.5, className: "w-3 h-3 text-amber-400" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { strokeWidth: 1.5, className: "w-3 h-3 text-blue-400" }) }),
|
|
5401
5401
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
5402
5402
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn(
|
|
5403
|
-
"text-
|
|
5403
|
+
"text-xs font-medium",
|
|
5404
5404
|
warning.type === "critical" ? "text-red-300" : warning.type === "warning" ? "text-amber-300" : "text-blue-300"
|
|
5405
5405
|
), children: warning.title }),
|
|
5406
5406
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-500 mt-0.5 leading-relaxed", children: warning.description })
|
|
@@ -5411,21 +5411,21 @@ function VisualExplain({ plan, query, schemaContext, databaseType, onLoadQuery }
|
|
|
5411
5411
|
))
|
|
5412
5412
|
] }),
|
|
5413
5413
|
analysis && analysis.warnings.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-emerald-500/5 border border-emerald-500/10", children: [
|
|
5414
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-emerald-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "w-3
|
|
5414
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-emerald-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { strokeWidth: 1.5, className: "w-3 h-3 text-emerald-400" }) }),
|
|
5415
5415
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5416
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-
|
|
5416
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-medium text-emerald-300", children: "Query looks good" }),
|
|
5417
5417
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-500", children: "No obvious performance issues detected." })
|
|
5418
5418
|
] })
|
|
5419
5419
|
] }),
|
|
5420
5420
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: analysis == null ? void 0 : analysis.insights.map((insight, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 rounded-lg bg-white/[0.02] border border-white/5", children: [
|
|
5421
5421
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
5422
5422
|
/* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: insight.status }),
|
|
5423
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5423
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.625rem] text-zinc-500r font-medium", children: insight.label })
|
|
5424
5424
|
] }),
|
|
5425
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: insight.value })
|
|
5426
5426
|
] }, idx)) }),
|
|
5427
5427
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5428
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-
|
|
5428
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-500r mb-2", children: "Execution Plan" }),
|
|
5429
5429
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-white/5 bg-white/[0.01] p-2", children: rootPlan && analysis && /* @__PURE__ */ jsxRuntime.jsx(PlanNode, { node: rootPlan, maxTime: analysis.executionTime || 1 }) })
|
|
5430
5430
|
] })
|
|
5431
5431
|
] }),
|
|
@@ -5541,9 +5541,9 @@ Columns: ${cols}`;
|
|
|
5541
5541
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col bg-[#080808]", children: [
|
|
5542
5542
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-b border-white/5 bg-[#0a0a0a]", children: [
|
|
5543
5543
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5544
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-violet-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-3
|
|
5545
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
5546
|
-
messages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
5544
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1 rounded bg-violet-500/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { strokeWidth: 1.5, className: "w-3 h-3 text-violet-400" }) }),
|
|
5545
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-violet-400", children: "Natural Language Query" }),
|
|
5546
|
+
messages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[0.625rem] text-zinc-500 font-mono", children: [
|
|
5547
5547
|
messages.filter((m) => m.role === "user").length,
|
|
5548
5548
|
" questions"
|
|
5549
5549
|
] })
|
|
@@ -5555,7 +5555,7 @@ Columns: ${cols}`;
|
|
|
5555
5555
|
onClick: clearConversation,
|
|
5556
5556
|
className: "p-1.5 rounded hover:bg-white/5 text-zinc-500 hover:text-zinc-300 transition-colors",
|
|
5557
5557
|
title: "Clear conversation",
|
|
5558
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3
|
|
5558
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
5559
5559
|
}
|
|
5560
5560
|
),
|
|
5561
5561
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5563,15 +5563,15 @@ Columns: ${cols}`;
|
|
|
5563
5563
|
{
|
|
5564
5564
|
onClick: onClose,
|
|
5565
5565
|
className: "p-1.5 rounded hover:bg-white/5 text-zinc-500 hover:text-zinc-300 transition-colors",
|
|
5566
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3
|
|
5566
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
5567
5567
|
}
|
|
5568
5568
|
)
|
|
5569
5569
|
] })
|
|
5570
5570
|
] }),
|
|
5571
5571
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-auto p-4 space-y-3", children: [
|
|
5572
5572
|
messages.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-full opacity-40", children: [
|
|
5573
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-8 h-8 mb-3" }),
|
|
5574
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
5573
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-8 h-8 mb-3" }),
|
|
5574
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium", children: "Ask a question in plain English" }),
|
|
5575
5575
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-500 mt-1", children: 'e.g. "Show me the top 10 employees by salary"' })
|
|
5576
5576
|
] }),
|
|
5577
5577
|
messages.map((msg, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-2", msg.role === "user" ? "justify-end" : "justify-start"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
@@ -5579,15 +5579,15 @@ Columns: ${cols}`;
|
|
|
5579
5579
|
msg.role === "user" ? "bg-violet-600/20 border border-violet-500/20 text-zinc-200" : "bg-[#111] border border-white/5 text-zinc-300"
|
|
5580
5580
|
), children: msg.role === "user" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: msg.content }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5581
5581
|
msg.query && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
5582
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "bg-[#050505] rounded p-2 text-
|
|
5582
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "bg-[#050505] rounded p-2 text-xs font-mono text-blue-300 overflow-x-auto whitespace-pre-wrap border border-white/5", children: msg.query }),
|
|
5583
5583
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1.5 mt-1.5", children: [
|
|
5584
5584
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5585
5585
|
"button",
|
|
5586
5586
|
{
|
|
5587
5587
|
onClick: () => onExecuteQuery(msg.query),
|
|
5588
|
-
className: "flex items-center gap-1 px-2 py-1 rounded bg-blue-600/20 border border-blue-500/20 text-blue-400 text-xs font-
|
|
5588
|
+
className: "flex items-center gap-1 px-2 py-1 rounded bg-blue-600/20 border border-blue-500/20 text-blue-400 text-xs font-medium hover:bg-blue-600/30 transition-colors",
|
|
5589
5589
|
children: [
|
|
5590
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3 h-3 fill-current" }),
|
|
5590
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3 h-3 fill-current" }),
|
|
5591
5591
|
" Run"
|
|
5592
5592
|
]
|
|
5593
5593
|
}
|
|
@@ -5596,16 +5596,16 @@ Columns: ${cols}`;
|
|
|
5596
5596
|
"button",
|
|
5597
5597
|
{
|
|
5598
5598
|
onClick: () => onLoadQuery(msg.query),
|
|
5599
|
-
className: "flex items-center gap-1 px-2 py-1 rounded bg-white/5 border border-white/5 text-zinc-400 text-xs font-
|
|
5599
|
+
className: "flex items-center gap-1 px-2 py-1 rounded bg-white/5 border border-white/5 text-zinc-400 text-xs font-medium hover:bg-white/10 transition-colors",
|
|
5600
5600
|
children: "Load to Editor"
|
|
5601
5601
|
}
|
|
5602
5602
|
)
|
|
5603
5603
|
] })
|
|
5604
5604
|
] }),
|
|
5605
|
-
msg.content.replace(/```[\s\S]*?```/g, "").trim() && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-400 text-
|
|
5605
|
+
msg.content.replace(/```[\s\S]*?```/g, "").trim() && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-400 text-xs leading-relaxed whitespace-pre-wrap", children: msg.content.replace(/```[\s\S]*?```/g, "").trim() })
|
|
5606
5606
|
] }) }) }, i)),
|
|
5607
5607
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2 justify-start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/5 rounded-lg px-3 py-2 flex items-center gap-2 text-zinc-500 text-xs", children: [
|
|
5608
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin" }),
|
|
5608
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin" }),
|
|
5609
5609
|
"Generating query..."
|
|
5610
5610
|
] }) }),
|
|
5611
5611
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-red-500/10 border border-red-500/20 rounded-lg px-3 py-2 text-xs text-red-400", children: error }),
|
|
@@ -5628,8 +5628,8 @@ Columns: ${cols}`;
|
|
|
5628
5628
|
{
|
|
5629
5629
|
type: "submit",
|
|
5630
5630
|
disabled: isLoading || !question.trim(),
|
|
5631
|
-
className: "bg-violet-600 hover:bg-violet-500 disabled:opacity-50 px-3 py-2 rounded-lg text-white text-xs font-
|
|
5632
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "w-3 h-3" })
|
|
5631
|
+
className: "bg-violet-600 hover:bg-violet-500 disabled:opacity-50 px-3 py-2 rounded-lg text-white text-xs font-medium transition-colors flex items-center gap-1.5",
|
|
5632
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { strokeWidth: 1.5, className: "w-3 h-3" })
|
|
5633
5633
|
}
|
|
5634
5634
|
)
|
|
5635
5635
|
] }) })
|
|
@@ -5742,52 +5742,52 @@ ${schemaContext || ""}`;
|
|
|
5742
5742
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/10 rounded-xl shadow-2xl w-full max-w-2xl mx-4 max-h-[85vh] flex flex-col overflow-hidden", children: [
|
|
5743
5743
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-b border-white/5", children: [
|
|
5744
5744
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5745
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-
|
|
5746
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5745
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-cyan-400" }),
|
|
5746
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: "Data Profiler" }),
|
|
5747
5747
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500 font-mono", children: tableName })
|
|
5748
5748
|
] }),
|
|
5749
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
5749
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }) })
|
|
5750
5750
|
] }),
|
|
5751
5751
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-auto p-5 space-y-4", children: [
|
|
5752
5752
|
isLoading && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-12 text-zinc-500", children: [
|
|
5753
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 animate-spin" }),
|
|
5754
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
5753
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-5 h-5 animate-spin" }),
|
|
5754
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs", children: [
|
|
5755
5755
|
"Profiling ",
|
|
5756
5756
|
tableName,
|
|
5757
5757
|
"..."
|
|
5758
5758
|
] })
|
|
5759
5759
|
] }),
|
|
5760
5760
|
error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-red-500/10 border border-red-500/20 rounded-lg p-3 text-xs text-red-400 flex items-center gap-2", children: [
|
|
5761
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "w-
|
|
5761
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { strokeWidth: 1.5, className: "w-3.5 h-3.5 shrink-0" }),
|
|
5762
5762
|
error
|
|
5763
5763
|
] }),
|
|
5764
5764
|
profile && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5765
5765
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3", children: [
|
|
5766
5766
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0a0a0a] rounded-lg p-3 border border-white/5", children: [
|
|
5767
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-
|
|
5768
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
5767
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-500r", children: "Total Rows" }),
|
|
5768
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-200 mt-1", children: profile.totalRows.toLocaleString() })
|
|
5769
5769
|
] }),
|
|
5770
5770
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0a0a0a] rounded-lg p-3 border border-white/5", children: [
|
|
5771
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-
|
|
5772
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
5771
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-500r", children: "Columns" }),
|
|
5772
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-200 mt-1", children: profile.columns.length })
|
|
5773
5773
|
] }),
|
|
5774
5774
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0a0a0a] rounded-lg p-3 border border-white/5", children: [
|
|
5775
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-
|
|
5776
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-
|
|
5775
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-500r", children: "Avg Null %" }),
|
|
5776
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-medium text-zinc-200 mt-1", children: [
|
|
5777
5777
|
profile.columns.length > 0 ? Math.round(profile.columns.reduce((sum, c) => sum + c.nullPercent, 0) / profile.columns.length) : 0,
|
|
5778
5778
|
"%"
|
|
5779
5779
|
] })
|
|
5780
5780
|
] })
|
|
5781
5781
|
] }),
|
|
5782
5782
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5783
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-
|
|
5783
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-medium text-zinc-400r", children: "Column Profiles" }),
|
|
5784
5784
|
profile.columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0a0a0a] rounded-lg p-3 border border-white/5", children: [
|
|
5785
5785
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5786
5786
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5787
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-3 h-3 text-blue-400" }),
|
|
5788
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
5787
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3 h-3 text-blue-400" }),
|
|
5788
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: col.name }),
|
|
5789
5789
|
col.type && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500 font-mono", children: col.type }),
|
|
5790
|
-
sensitiveColumnNames.has(col.name) && /* @__PURE__ */ jsxRuntime.jsx("span", { title: "Sensitive column - values masked", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-3 h-3 text-purple-400" }) })
|
|
5790
|
+
sensitiveColumnNames.has(col.name) && /* @__PURE__ */ jsxRuntime.jsx("span", { title: "Sensitive column - values masked", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { strokeWidth: 1.5, className: "w-3 h-3 text-purple-400" }) })
|
|
5791
5791
|
] }),
|
|
5792
5792
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-zinc-500", children: [
|
|
5793
5793
|
col.distinctCount.toLocaleString(),
|
|
@@ -5842,9 +5842,9 @@ ${schemaContext || ""}`;
|
|
|
5842
5842
|
] }),
|
|
5843
5843
|
(aiSummary || isAiLoading) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-cyan-500/5 border border-cyan-500/10 rounded-lg p-4", children: [
|
|
5844
5844
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
5845
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-3.5 h-3.5 text-cyan-400" }),
|
|
5846
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
5847
|
-
isAiLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin text-cyan-400" })
|
|
5845
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-cyan-400" }),
|
|
5846
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-cyan-400r", children: "AI Analysis" }),
|
|
5847
|
+
isAiLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-3 h-3 animate-spin text-cyan-400" })
|
|
5848
5848
|
] }),
|
|
5849
5849
|
aiSummary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap", children: aiSummary })
|
|
5850
5850
|
] })
|
|
@@ -5951,23 +5951,23 @@ function QuerySafetyDialog({
|
|
|
5951
5951
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#111] border border-white/10 rounded-xl shadow-2xl w-full max-w-lg mx-4 overflow-hidden", children: [
|
|
5952
5952
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-b border-white/5", children: [
|
|
5953
5953
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5954
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldAlert, { className: "w-
|
|
5955
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5954
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldAlert, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-amber-400" }),
|
|
5955
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-200", children: "Query Safety Check" })
|
|
5956
5956
|
] }),
|
|
5957
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-
|
|
5957
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "p-1 rounded hover:bg-white/5 text-zinc-500", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { strokeWidth: 1.5, className: "w-3.5 h-3.5" }) })
|
|
5958
5958
|
] }),
|
|
5959
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-3 bg-[#0a0a0a] border-b border-white/5", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-
|
|
5959
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-3 bg-[#0a0a0a] border-b border-white/5", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs font-mono text-zinc-400 whitespace-pre-wrap max-h-24 overflow-auto", children: query.length > 300 ? query.substring(0, 300) + "..." : query }) }),
|
|
5960
5960
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-5 py-4 max-h-80 overflow-auto", children: [
|
|
5961
5961
|
isAnalyzing && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-8 text-zinc-500", children: [
|
|
5962
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 animate-spin" }),
|
|
5963
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
5962
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-5 h-5 animate-spin" }),
|
|
5963
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: "Analyzing query safety..." })
|
|
5964
5964
|
] }),
|
|
5965
5965
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-red-500/10 border border-red-500/20 rounded-lg p-3 text-xs text-red-400", children: error }),
|
|
5966
5966
|
analysis && risk && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
5967
5967
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2 px-3 py-2 rounded-lg", risk.bg, "border", risk.border), children: [
|
|
5968
5968
|
/* @__PURE__ */ jsxRuntime.jsx(RiskIcon, { className: cn("w-5 h-5", risk.color) }),
|
|
5969
5969
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5970
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-
|
|
5970
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs font-medium", risk.color), children: risk.label }),
|
|
5971
5971
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-400 mt-0.5", children: analysis.summary })
|
|
5972
5972
|
] })
|
|
5973
5973
|
] }),
|
|
@@ -5975,7 +5975,7 @@ function QuerySafetyDialog({
|
|
|
5975
5975
|
"px-3 py-2 rounded-lg border text-xs",
|
|
5976
5976
|
w.severity === "critical" ? "bg-red-500/5 border-red-500/20" : w.severity === "warning" ? "bg-amber-500/5 border-amber-500/20" : "bg-blue-500/5 border-blue-500/20"
|
|
5977
5977
|
), children: [
|
|
5978
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-
|
|
5978
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-zinc-300", children: w.message }),
|
|
5979
5979
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-zinc-500 mt-0.5", children: w.detail })
|
|
5980
5980
|
] }, i)) }),
|
|
5981
5981
|
analysis.affectedRows && analysis.affectedRows !== "none" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs", children: [
|
|
@@ -5987,7 +5987,7 @@ function QuerySafetyDialog({
|
|
|
5987
5987
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-zinc-300", children: analysis.cascadeEffects })
|
|
5988
5988
|
] }),
|
|
5989
5989
|
analysis.recommendation && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#0a0a0a] rounded-lg p-3 border border-white/5", children: [
|
|
5990
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-
|
|
5990
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-zinc-500r mb-1", children: "Recommendation" }),
|
|
5991
5991
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-zinc-300", children: analysis.recommendation })
|
|
5992
5992
|
] })
|
|
5993
5993
|
] }),
|
|
@@ -5998,7 +5998,7 @@ function QuerySafetyDialog({
|
|
|
5998
5998
|
"button",
|
|
5999
5999
|
{
|
|
6000
6000
|
onClick: onClose,
|
|
6001
|
-
className: "px-4 py-2 rounded-lg bg-white/5 text-zinc-400 text-xs font-
|
|
6001
|
+
className: "px-4 py-2 rounded-lg bg-white/5 text-zinc-400 text-xs font-medium hover:bg-white/10 transition-colors",
|
|
6002
6002
|
children: "Cancel"
|
|
6003
6003
|
}
|
|
6004
6004
|
),
|
|
@@ -6008,12 +6008,12 @@ function QuerySafetyDialog({
|
|
|
6008
6008
|
onClick: onProceed,
|
|
6009
6009
|
disabled: isAnalyzing,
|
|
6010
6010
|
className: cn(
|
|
6011
|
-
"px-4 py-2 rounded-lg text-white text-xs font-
|
|
6011
|
+
"px-4 py-2 rounded-lg text-white text-xs font-medium transition-colors flex items-center gap-1.5",
|
|
6012
6012
|
(analysis == null ? void 0 : analysis.riskLevel) === "critical" || (analysis == null ? void 0 : analysis.riskLevel) === "high" ? "bg-red-600 hover:bg-red-500" : "bg-blue-600 hover:bg-blue-500",
|
|
6013
6013
|
isAnalyzing && "opacity-50 cursor-not-allowed"
|
|
6014
6014
|
),
|
|
6015
6015
|
children: [
|
|
6016
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3 h-3 fill-current" }),
|
|
6016
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3 h-3 fill-current" }),
|
|
6017
6017
|
(analysis == null ? void 0 : analysis.riskLevel) === "critical" ? "Execute Anyway" : (analysis == null ? void 0 : analysis.riskLevel) === "high" ? "Proceed with Caution" : "Execute Query"
|
|
6018
6018
|
]
|
|
6019
6019
|
}
|
|
@@ -6121,8 +6121,8 @@ var ColumnList = React6__default.default.memo(function ColumnList2({ columns, in
|
|
|
6121
6121
|
{
|
|
6122
6122
|
className: "flex items-center gap-2 py-1 px-2 rounded-sm group/col hover:bg-accent/20 cursor-default",
|
|
6123
6123
|
children: [
|
|
6124
|
-
column.isPrimary ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Key, { className: "w-2.5 h-2.5 text-yellow-500/70" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1 h-1 rounded-full bg-muted-foreground/50" }) }),
|
|
6125
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6124
|
+
column.isPrimary ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Key, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-yellow-500/70" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1 h-1 rounded-full bg-muted-foreground/50" }) }),
|
|
6125
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground flex-1 truncate group-hover/col:text-foreground", children: column.name }),
|
|
6126
6126
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-mono text-muted-foreground/60 uppercase group-hover/col:text-muted-foreground", children: column.type.split("(")[0] })
|
|
6127
6127
|
]
|
|
6128
6128
|
},
|
|
@@ -6130,8 +6130,8 @@ var ColumnList = React6__default.default.memo(function ColumnList2({ columns, in
|
|
|
6130
6130
|
)),
|
|
6131
6131
|
indexes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-2 pb-1", children: [
|
|
6132
6132
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-2 mb-1", children: [
|
|
6133
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-2.5 h-2.5 text-purple-500/40" }),
|
|
6134
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6133
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-2.5 h-2.5 text-purple-500/40" }),
|
|
6134
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.625rem] font-medium text-muted-foreground", children: "Indexes" })
|
|
6135
6135
|
] }),
|
|
6136
6136
|
indexes.map((idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 py-0.5 px-2", children: [
|
|
6137
6137
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2.5 h-2.5" }),
|
|
@@ -6146,18 +6146,18 @@ function renderMenuItems(table, labels, isAdmin, callbacks, copyToClipboard, Ite
|
|
|
6146
6146
|
var _a;
|
|
6147
6147
|
return (_a = callbacks.onTableClick) == null ? void 0 : _a.call(callbacks, table.name);
|
|
6148
6148
|
}, children: [
|
|
6149
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "w-3.5 h-3.5 mr-2 text-green-500" }),
|
|
6149
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-green-500" }),
|
|
6150
6150
|
(labels == null ? void 0 : labels.selectAction) || "Select Top 100"
|
|
6151
6151
|
] }),
|
|
6152
6152
|
/* @__PURE__ */ jsxRuntime.jsxs(Item4, { onClick: () => {
|
|
6153
6153
|
var _a;
|
|
6154
6154
|
return (_a = callbacks.onGenerateSelect) == null ? void 0 : _a.call(callbacks, table.name);
|
|
6155
6155
|
}, children: [
|
|
6156
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "w-3.5 h-3.5 mr-2 text-blue-500" }),
|
|
6156
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-blue-500" }),
|
|
6157
6157
|
(labels == null ? void 0 : labels.generateAction) || "Generate Query"
|
|
6158
6158
|
] }),
|
|
6159
6159
|
/* @__PURE__ */ jsxRuntime.jsxs(Item4, { onClick: () => copyToClipboard(table.name, `${(labels == null ? void 0 : labels.entityName) || "Table"} name`), children: [
|
|
6160
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3.5 h-3.5 mr-2 text-muted-foreground" }),
|
|
6160
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-muted-foreground" }),
|
|
6161
6161
|
"Copy Name"
|
|
6162
6162
|
] }),
|
|
6163
6163
|
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
@@ -6165,21 +6165,21 @@ function renderMenuItems(table, labels, isAdmin, callbacks, copyToClipboard, Ite
|
|
|
6165
6165
|
var _a;
|
|
6166
6166
|
return (_a = callbacks.onProfileTable) == null ? void 0 : _a.call(callbacks, table.name);
|
|
6167
6167
|
}, children: [
|
|
6168
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-3.5 h-3.5 mr-2 text-cyan-500" }),
|
|
6168
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-cyan-500" }),
|
|
6169
6169
|
"Profile Table"
|
|
6170
6170
|
] }),
|
|
6171
6171
|
/* @__PURE__ */ jsxRuntime.jsxs(Item4, { onClick: () => {
|
|
6172
6172
|
var _a;
|
|
6173
6173
|
return (_a = callbacks.onGenerateCode) == null ? void 0 : _a.call(callbacks, table.name);
|
|
6174
6174
|
}, children: [
|
|
6175
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code, { className: "w-3.5 h-3.5 mr-2 text-purple-500" }),
|
|
6175
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-purple-500" }),
|
|
6176
6176
|
"Generate Code"
|
|
6177
6177
|
] }),
|
|
6178
6178
|
/* @__PURE__ */ jsxRuntime.jsxs(Item4, { onClick: () => {
|
|
6179
6179
|
var _a;
|
|
6180
6180
|
return (_a = callbacks.onGenerateTestData) == null ? void 0 : _a.call(callbacks, table.name);
|
|
6181
6181
|
}, children: [
|
|
6182
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { className: "w-3.5 h-3.5 mr-2 text-amber-500" }),
|
|
6182
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-amber-500" }),
|
|
6183
6183
|
"Generate Test Data"
|
|
6184
6184
|
] }),
|
|
6185
6185
|
isAdmin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -6188,14 +6188,14 @@ function renderMenuItems(table, labels, isAdmin, callbacks, copyToClipboard, Ite
|
|
|
6188
6188
|
var _a;
|
|
6189
6189
|
return (_a = callbacks.onOpenMaintenance) == null ? void 0 : _a.call(callbacks, "tables", table.name);
|
|
6190
6190
|
}, children: [
|
|
6191
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-3.5 h-3.5 mr-2 text-amber-500" }),
|
|
6191
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-amber-500" }),
|
|
6192
6192
|
(labels == null ? void 0 : labels.analyzeAction) || "Analyze Table"
|
|
6193
6193
|
] }),
|
|
6194
6194
|
/* @__PURE__ */ jsxRuntime.jsxs(Item4, { onClick: () => {
|
|
6195
6195
|
var _a;
|
|
6196
6196
|
return (_a = callbacks.onOpenMaintenance) == null ? void 0 : _a.call(callbacks, "tables", table.name);
|
|
6197
6197
|
}, children: [
|
|
6198
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-3.5 h-3.5 mr-2 text-blue-400" }),
|
|
6198
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { strokeWidth: 1.5, className: "w-3.5 h-3.5 mr-2 text-blue-400" }),
|
|
6199
6199
|
(labels == null ? void 0 : labels.vacuumAction) || "Vacuum Table"
|
|
6200
6200
|
] })
|
|
6201
6201
|
] })
|
|
@@ -6236,7 +6236,7 @@ var TableItem = React6__default.default.memo(function TableItem2({
|
|
|
6236
6236
|
animate: { rotate: isExpanded ? 90 : 0 },
|
|
6237
6237
|
transition: { duration: 0.2 },
|
|
6238
6238
|
className: "shrink-0",
|
|
6239
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-3 h-3 text-muted-foreground" })
|
|
6239
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-muted-foreground" })
|
|
6240
6240
|
}
|
|
6241
6241
|
),
|
|
6242
6242
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6252,23 +6252,21 @@ var TableItem = React6__default.default.memo(function TableItem2({
|
|
|
6252
6252
|
"span",
|
|
6253
6253
|
{
|
|
6254
6254
|
className: cn(
|
|
6255
|
-
"truncate min-w-0 flex-1 text-
|
|
6255
|
+
"truncate min-w-0 flex-1 text-xs font-medium transition-colors",
|
|
6256
6256
|
isExpanded ? "text-foreground" : "text-muted-foreground group-hover:text-foreground"
|
|
6257
6257
|
),
|
|
6258
6258
|
children: table.name
|
|
6259
6259
|
}
|
|
6260
6260
|
),
|
|
6261
6261
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 relative w-8 h-6 flex items-center justify-center", children: [
|
|
6262
|
-
table.rowCount !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center text-
|
|
6262
|
+
table.rowCount !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center text-[0.625rem] font-mono text-muted-foreground/70 whitespace-nowrap opacity-100 group-hover:opacity-0 transition-opacity pointer-events-none", children: table.rowCount >= 1e3 ? `${(table.rowCount / 1e3).toFixed(1)}k` : table.rowCount }),
|
|
6263
6263
|
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
6264
6264
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6265
|
-
|
|
6265
|
+
"button",
|
|
6266
6266
|
{
|
|
6267
|
-
|
|
6268
|
-
size: "icon",
|
|
6269
|
-
className: "absolute inset-0 w-full h-full opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 focus-within:opacity-100 transition-opacity hover:bg-accent",
|
|
6267
|
+
className: "absolute inset-0 w-full h-full opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 focus-within:opacity-100 transition-opacity hover:bg-accent flex items-center justify-center",
|
|
6270
6268
|
onClick: (e) => e.stopPropagation(),
|
|
6271
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { className: "w-
|
|
6269
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-muted-foreground group-hover:text-foreground" })
|
|
6272
6270
|
}
|
|
6273
6271
|
) }),
|
|
6274
6272
|
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "end", className: "w-48", children: renderMenuItems(table, labels, isAdmin, callbacks, copyToClipboard, DropdownMenuItem, DropdownMenuSeparator) })
|
|
@@ -6332,61 +6330,57 @@ function SchemaExplorer({
|
|
|
6332
6330
|
if (isLoadingSchema) {
|
|
6333
6331
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
6334
6332
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mb-4", children: [
|
|
6335
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-8 h-8 animate-spin text-blue-500/20" }),
|
|
6336
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "w-
|
|
6333
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { strokeWidth: 1.5, className: "w-8 h-8 animate-spin text-blue-500/20" }),
|
|
6334
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { strokeWidth: 1.5, className: "w-3.5 h-3.5 absolute inset-0 m-auto text-blue-500 animate-pulse" })
|
|
6337
6335
|
] }),
|
|
6338
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs
|
|
6336
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium animate-pulse", children: "Scanning Schema..." })
|
|
6339
6337
|
] });
|
|
6340
6338
|
}
|
|
6341
6339
|
if (schema.length === 0) {
|
|
6342
6340
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-6 text-center", children: [
|
|
6343
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4 border border-border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "w-6 h-6 text-muted-foreground" }) }),
|
|
6344
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-
|
|
6345
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-
|
|
6341
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4 border border-border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { strokeWidth: 1.5, className: "w-6 h-6 text-muted-foreground" }) }),
|
|
6342
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-xs font-medium mb-1", children: "No structures found" }),
|
|
6343
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: "We couldn't find any tables or views in this connection." })
|
|
6346
6344
|
] });
|
|
6347
6345
|
}
|
|
6348
6346
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
6349
6347
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 z-10 px-3 pb-3 pt-1 space-y-3 bg-background", children: [
|
|
6350
6348
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
6351
6349
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6352
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { className: "w-3.5 h-3.5 text-blue-500/50" }),
|
|
6353
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-
|
|
6350
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Database, { strokeWidth: 1.5, className: "w-3.5 h-3.5 text-blue-500/50" }),
|
|
6351
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Explorer" })
|
|
6354
6352
|
] }),
|
|
6355
6353
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
6356
6354
|
isAdmin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6357
|
-
|
|
6355
|
+
"button",
|
|
6358
6356
|
{
|
|
6359
|
-
|
|
6360
|
-
size: "icon",
|
|
6361
|
-
className: "w-6 h-6 hover:bg-accent text-muted-foreground hover:text-amber-400 transition-colors",
|
|
6357
|
+
className: "p-1 rounded hover:bg-accent text-muted-foreground hover:text-amber-400 transition-colors",
|
|
6362
6358
|
onClick: () => onOpenMaintenance == null ? void 0 : onOpenMaintenance("global"),
|
|
6363
6359
|
title: "Database Maintenance",
|
|
6364
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "w-3.5 h-3.5" })
|
|
6360
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
6365
6361
|
}
|
|
6366
6362
|
),
|
|
6367
6363
|
(capabilities == null ? void 0 : capabilities.supportsCreateTable) !== false && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6368
|
-
|
|
6364
|
+
"button",
|
|
6369
6365
|
{
|
|
6370
|
-
|
|
6371
|
-
size: "icon",
|
|
6372
|
-
className: "w-6 h-6 hover:bg-accent text-muted-foreground hover:text-blue-400 transition-colors",
|
|
6366
|
+
className: "p-1 rounded hover:bg-accent text-muted-foreground hover:text-blue-400 transition-colors",
|
|
6373
6367
|
onClick: onCreateTableClick,
|
|
6374
6368
|
title: `Create ${(labels == null ? void 0 : labels.entityName) || "Table"}`,
|
|
6375
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-3.5 h-3.5" })
|
|
6369
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { strokeWidth: 1.5, className: "w-3.5 h-3.5" })
|
|
6376
6370
|
}
|
|
6377
6371
|
),
|
|
6378
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
6372
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.625rem] bg-blue-500/10 text-blue-400 px-1.5 py-0.5 rounded-full font-mono border border-blue-500/10", children: schema.length })
|
|
6379
6373
|
] })
|
|
6380
6374
|
] }),
|
|
6381
6375
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
|
|
6382
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-blue-500 transition-colors" }),
|
|
6376
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { strokeWidth: 1.5, className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-blue-500 transition-colors" }),
|
|
6383
6377
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6384
6378
|
Input,
|
|
6385
6379
|
{
|
|
6386
6380
|
placeholder: (labels == null ? void 0 : labels.searchPlaceholder) || "Search tables or columns...",
|
|
6387
6381
|
value: searchQuery,
|
|
6388
6382
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
6389
|
-
className: "h-8 pl-8 pr-8 text-
|
|
6383
|
+
className: "h-8 pl-8 pr-8 text-xs bg-muted/50 border-border focus-visible:ring-1 focus-visible:ring-blue-500/50 placeholder:text-muted-foreground/50"
|
|
6390
6384
|
}
|
|
6391
6385
|
),
|
|
6392
6386
|
searchQuery && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6394,7 +6388,7 @@ function SchemaExplorer({
|
|
|
6394
6388
|
{
|
|
6395
6389
|
onClick: () => setSearchQuery(""),
|
|
6396
6390
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
|
|
6397
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "w-3 h-3 rotate-45" })
|
|
6391
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { strokeWidth: 1.5, className: "w-3.5 h-3.5 rotate-45" })
|
|
6398
6392
|
}
|
|
6399
6393
|
)
|
|
6400
6394
|
] })
|
|
@@ -6743,5 +6737,5 @@ exports.getDBConfig = getDBConfig;
|
|
|
6743
6737
|
exports.getDBIcon = getDBIcon;
|
|
6744
6738
|
exports.isDangerousQuery = isDangerousQuery;
|
|
6745
6739
|
exports.storage = storage;
|
|
6746
|
-
//# sourceMappingURL=chunk-
|
|
6747
|
-
//# sourceMappingURL=chunk-
|
|
6740
|
+
//# sourceMappingURL=chunk-Y52UIFEX.js.map
|
|
6741
|
+
//# sourceMappingURL=chunk-Y52UIFEX.js.map
|