@deaquinodev/querky 0.4.14 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/index.js +42 -68
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A quirky terminal SQL client with vim keybindings, schema-aware autocomplete, query aliases, and AI-powered query explanation.
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-
|
|
7
5
|
## Features
|
|
8
6
|
|
|
9
7
|
- **Beautiful tables** — clean, aligned output with automatic expanded mode for wide results
|
package/dist/index.js
CHANGED
|
@@ -1477,15 +1477,15 @@ function tokenizeSql(sql) {
|
|
|
1477
1477
|
|
|
1478
1478
|
// src/ui/theme.ts
|
|
1479
1479
|
var theme = {
|
|
1480
|
-
accent: "#
|
|
1481
|
-
insertMode: "#
|
|
1482
|
-
normalMode: "#
|
|
1483
|
-
shellMode: "#
|
|
1484
|
-
logo: "#
|
|
1485
|
-
success: "
|
|
1486
|
-
error: "
|
|
1487
|
-
warning: "
|
|
1488
|
-
muted: "
|
|
1480
|
+
accent: "#d75f87",
|
|
1481
|
+
insertMode: "#87afaf",
|
|
1482
|
+
normalMode: "#af875f",
|
|
1483
|
+
shellMode: "#5faf5f",
|
|
1484
|
+
logo: "#d7af87",
|
|
1485
|
+
success: "#5faf5f",
|
|
1486
|
+
error: "#af5f5f",
|
|
1487
|
+
warning: "#d7af87",
|
|
1488
|
+
muted: "#9e9e9e"
|
|
1489
1489
|
};
|
|
1490
1490
|
|
|
1491
1491
|
// src/ui/components/QueryInput.tsx
|
|
@@ -1505,13 +1505,13 @@ function FuzzyHighlight({ text, token, selected }) {
|
|
|
1505
1505
|
) });
|
|
1506
1506
|
}
|
|
1507
1507
|
var BG = "#1e1e1e";
|
|
1508
|
-
var ACCENT =
|
|
1509
|
-
var PROMPT_MUTED =
|
|
1510
|
-
var PLACEHOLDER = "#
|
|
1511
|
-
var KW_COLOR = "#
|
|
1512
|
-
var STR_COLOR = "#
|
|
1513
|
-
var NUM_COLOR = "#
|
|
1514
|
-
var CMT_COLOR = "#
|
|
1508
|
+
var ACCENT = theme.insertMode;
|
|
1509
|
+
var PROMPT_MUTED = theme.muted;
|
|
1510
|
+
var PLACEHOLDER = "#585858";
|
|
1511
|
+
var KW_COLOR = "#af87af";
|
|
1512
|
+
var STR_COLOR = "#5faf5f";
|
|
1513
|
+
var NUM_COLOR = "#d7af87";
|
|
1514
|
+
var CMT_COLOR = "#767676";
|
|
1515
1515
|
function sqlTokenColor(type) {
|
|
1516
1516
|
if (type === "keyword") return KW_COLOR;
|
|
1517
1517
|
if (type === "string") return STR_COLOR;
|
|
@@ -1752,10 +1752,12 @@ import { Box as Box3, Text as Text3 } from "ink";
|
|
|
1752
1752
|
// src/ui/components/Table.tsx
|
|
1753
1753
|
import { Box as Box2, Text as Text2 } from "ink";
|
|
1754
1754
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1755
|
+
var HEADER_COLOR = theme.accent;
|
|
1756
|
+
var NULL_COLOR = theme.muted;
|
|
1755
1757
|
|
|
1756
1758
|
// src/ui/components/QueryResult.tsx
|
|
1757
1759
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1758
|
-
var ERROR_FG =
|
|
1760
|
+
var ERROR_FG = theme.error;
|
|
1759
1761
|
function ErrorBox({ message }) {
|
|
1760
1762
|
const lines = message.split("\n");
|
|
1761
1763
|
return /* @__PURE__ */ jsx3(Box3, { flexDirection: "column", marginTop: 1, children: lines.map((line, i) => /* @__PURE__ */ jsxs3(Text3, { color: ERROR_FG, bold: true, children: [
|
|
@@ -1767,47 +1769,18 @@ function ErrorBox({ message }) {
|
|
|
1767
1769
|
// src/ui/components/Banner.tsx
|
|
1768
1770
|
import { Box as Box4, Text as Text4 } from "ink";
|
|
1769
1771
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1770
|
-
var version = true ? "0.4.
|
|
1771
|
-
var MASCOT = [
|
|
1772
|
-
" \u2597\u2584\u2584\u2584\u2584\u2584\u2596",
|
|
1773
|
-
"\u2590\u2591 \u25CF \u25CF \u2591\u258C",
|
|
1774
|
-
"\u2590\u2591 \u25E1\u25E1\u25E1 \u2591\u258C",
|
|
1775
|
-
"\u2590\u2591 \u2597\u259F\u258C",
|
|
1776
|
-
" \u2580\u2580\u2580\u2580\u259D\u2580\u2584"
|
|
1777
|
-
];
|
|
1772
|
+
var version = true ? "0.4.16" : process.env.npm_package_version ?? "unknown";
|
|
1778
1773
|
var WORDMARK = [
|
|
1779
1774
|
"\u2597\u2584\u2584\u2584\u2596 \u2597\u2596 \u2597\u2596\u2597\u2584\u2584\u2584\u2596\u2597\u2584\u2584\u2596 \u2597\u2596 \u2597\u2596\u2597\u2596 \u2597\u2596",
|
|
1780
1775
|
"\u2590\u258C \u2590\u258C \u2590\u258C \u2590\u258C\u2590\u258C \u2590\u258C \u2590\u258C\u2590\u258C\u2597\u259E\u2598 \u259D\u259A\u259E\u2598",
|
|
1781
1776
|
"\u2590\u258C \u2590\u258C \u2590\u258C \u2590\u258C\u2590\u259B\u2580\u2580\u2598\u2590\u259B\u2580\u259A\u2596\u2590\u259B\u259A\u2596 \u2590\u258C",
|
|
1782
|
-
"\u2590\u2599\u2584\u259F\u2599\u2596\u259D\u259A\u2584\u259E\u2598\u2590\u2599\u2584\u2584\u2596\u2590\u258C \u2590\u258C\u2590\u258C \u2590\u258C \u2590\u258C"
|
|
1783
|
-
];
|
|
1784
|
-
var WORDMARK_WIDTH = Math.max(...WORDMARK.map((l) => [...l].length));
|
|
1785
|
-
var GRADIENT = [
|
|
1786
|
-
"#ff00dd",
|
|
1787
|
-
"#ff33bb",
|
|
1788
|
-
"#ff6699",
|
|
1789
|
-
"#ff9966",
|
|
1790
|
-
"#ff7722"
|
|
1777
|
+
"\u2590\u2599\u2584\u259F\u2599\u2596\u259D\u259A\u2584\u259E\u2598\u2590\u2599\u2584\u2584\u2596\u2590\u258C \u2590\u258C\u2590\u258C \u2590\u258C \u2590\u258C \u2584\u2584\u2584"
|
|
1791
1778
|
];
|
|
1792
|
-
|
|
1793
|
-
return [parseInt(hex.slice(1, 3), 16), parseInt(hex.slice(3, 5), 16), parseInt(hex.slice(5, 7), 16)];
|
|
1794
|
-
}
|
|
1795
|
-
function gradientColor(t) {
|
|
1796
|
-
const seg = Math.max(0, Math.min(1, t)) * (GRADIENT.length - 1);
|
|
1797
|
-
const i = Math.min(Math.floor(seg), GRADIENT.length - 2);
|
|
1798
|
-
const f = seg - i;
|
|
1799
|
-
const [r1, g1, b1] = hexToRgb(GRADIENT[i]);
|
|
1800
|
-
const [r2, g2, b2] = hexToRgb(GRADIENT[i + 1]);
|
|
1801
|
-
const mix = (a, b) => Math.round(a + (b - a) * f).toString(16).padStart(2, "0");
|
|
1802
|
-
return `#${mix(r1, r2)}${mix(g1, g2)}${mix(b1, b2)}`;
|
|
1803
|
-
}
|
|
1779
|
+
var WORDMARK_COLOR = "#d75f87";
|
|
1804
1780
|
function Banner({ connectionState }) {
|
|
1805
1781
|
const isConnected = connectionState.status === "connected";
|
|
1806
1782
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 2, marginBottom: 1, children: [
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */ jsx4(Box4, { flexDirection: "column", marginRight: 2, children: MASCOT.map((line, i) => /* @__PURE__ */ jsx4(Text4, { color: GRADIENT[i], bold: true, children: line }, i)) }),
|
|
1809
|
-
/* @__PURE__ */ jsx4(Box4, { flexDirection: "column", marginTop: 1, children: WORDMARK.map((line, li) => /* @__PURE__ */ jsx4(Box4, { children: [...line].map((ch, x) => /* @__PURE__ */ jsx4(Text4, { color: gradientColor(WORDMARK_WIDTH > 1 ? x / (WORDMARK_WIDTH - 1) : 0), bold: true, children: ch }, x)) }, li)) })
|
|
1810
|
-
] }),
|
|
1783
|
+
/* @__PURE__ */ jsx4(Box4, { flexDirection: "column", children: WORDMARK.map((line, li) => /* @__PURE__ */ jsx4(Box4, { children: [...line].map((ch, x) => /* @__PURE__ */ jsx4(Text4, { color: WORDMARK_COLOR, bold: true, children: ch }, x)) }, li)) }),
|
|
1811
1784
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 1, marginLeft: 1, children: [
|
|
1812
1785
|
/* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
|
|
1813
1786
|
"v",
|
|
@@ -1860,23 +1833,24 @@ function cbold(hex, s) {
|
|
|
1860
1833
|
function cdim(hex, s) {
|
|
1861
1834
|
return fg(hex) + DIM + s + R;
|
|
1862
1835
|
}
|
|
1863
|
-
var ACCENT2 =
|
|
1864
|
-
var HEADER_COL =
|
|
1865
|
-
var NULL_COL =
|
|
1866
|
-
var INDIGO =
|
|
1867
|
-
var AI_COL =
|
|
1868
|
-
var ERROR_COL =
|
|
1869
|
-
var WARN_COL =
|
|
1870
|
-
var
|
|
1836
|
+
var ACCENT2 = theme.accent;
|
|
1837
|
+
var HEADER_COL = theme.muted;
|
|
1838
|
+
var NULL_COL = theme.muted;
|
|
1839
|
+
var INDIGO = theme.accent;
|
|
1840
|
+
var AI_COL = theme.insertMode;
|
|
1841
|
+
var ERROR_COL = theme.error;
|
|
1842
|
+
var WARN_COL = theme.warning;
|
|
1843
|
+
var SHELL_COL = theme.shellMode;
|
|
1844
|
+
var ERD_BORDER = "#767676";
|
|
1871
1845
|
var ERD_PALETTE = [
|
|
1872
|
-
"#
|
|
1873
|
-
"#
|
|
1874
|
-
"#
|
|
1875
|
-
"#
|
|
1876
|
-
"#
|
|
1877
|
-
"#
|
|
1878
|
-
"#
|
|
1879
|
-
"#
|
|
1846
|
+
"#d75f87",
|
|
1847
|
+
"#5faf5f",
|
|
1848
|
+
"#87afaf",
|
|
1849
|
+
"#af87af",
|
|
1850
|
+
"#af875f",
|
|
1851
|
+
"#d7af87",
|
|
1852
|
+
"#5f87af",
|
|
1853
|
+
"#5f8787"
|
|
1880
1854
|
];
|
|
1881
1855
|
var NULL_MARKER = "\u2205";
|
|
1882
1856
|
var COL_PAD = 1;
|
|
@@ -2120,8 +2094,8 @@ function fmtEntry(entry) {
|
|
|
2120
2094
|
|
|
2121
2095
|
// src/ui/components/App.tsx
|
|
2122
2096
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2123
|
-
var PLACEHOLDER2 =
|
|
2124
|
-
var QUERY_HEADER_COLOR =
|
|
2097
|
+
var PLACEHOLDER2 = theme.muted;
|
|
2098
|
+
var QUERY_HEADER_COLOR = theme.muted;
|
|
2125
2099
|
function QueryHeader({ label, query }) {
|
|
2126
2100
|
const isMultiLine = query.includes("\n");
|
|
2127
2101
|
if (isMultiLine) {
|