@deaquinodev/querky 0.4.12 → 0.4.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/index.js +30 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1767,14 +1767,21 @@ function ErrorBox({ message }) {
|
|
|
1767
1767
|
// src/ui/components/Banner.tsx
|
|
1768
1768
|
import { Box as Box4, Text as Text4 } from "ink";
|
|
1769
1769
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1770
|
-
var version = true ? "0.4.
|
|
1771
|
-
var
|
|
1770
|
+
var version = true ? "0.4.13" : process.env.npm_package_version ?? "unknown";
|
|
1771
|
+
var MASCOT = [
|
|
1772
1772
|
" \u2597\u2584\u2584\u2584\u2584\u2584\u2596",
|
|
1773
1773
|
"\u2590\u2591 \u25CF \u25CF \u2591\u258C",
|
|
1774
1774
|
"\u2590\u2591 \u25E1\u25E1\u25E1 \u2591\u258C",
|
|
1775
1775
|
"\u2590\u2591 \u2597\u259F\u258C",
|
|
1776
1776
|
" \u2580\u2580\u2580\u2580\u259D\u2580\u2584"
|
|
1777
1777
|
];
|
|
1778
|
+
var WORDMARK = [
|
|
1779
|
+
" \u259D\u259C\u2584 \u2597\u2588\u2580\u2580\u259C\u2599\u259D\u2588\u259B\u2580\u2580\u258C\u259C\u2588\u2588\u2596\u259F\u2588\u2588\u2598\u259C\u2588\u2598\u259C\u2588\u2588\u2596\u259D\u2588\u259B\u259D\u2588\u259B",
|
|
1780
|
+
" \u259D\u259C\u2584 \u2588\u258C \u2588\u2599\u259F \u2590\u2588\u259D\u2588\u259B\u2590\u2588 \u2590\u2588 \u2590\u2588\u259D\u2588\u2596\u2588\u258C \u2588\u258C",
|
|
1781
|
+
" \u2597\u259F\u2580 \u259C\u2599 \u259D\u2588\u259B \u2588\u258C\u259D \u2596\u2590\u2588 \u2590\u2588 \u2590\u2588 \u2590\u2588 \u259D\u2588\u2588\u258C \u2588\u258C",
|
|
1782
|
+
" \u259D\u2580 \u2580\u2580\u2580\u2580\u2598\u259D\u2580\u2580\u2580\u2580\u2598\u2580\u2580\u2598 \u2580\u2580\u2598\u2580\u2580\u2598\u2580\u2580\u2598 \u259D\u2580\u2580\u259D\u2580\u2580"
|
|
1783
|
+
];
|
|
1784
|
+
var WORDMARK_WIDTH = Math.max(...WORDMARK.map((l) => [...l].length));
|
|
1778
1785
|
var GRADIENT = [
|
|
1779
1786
|
"#ff00dd",
|
|
1780
1787
|
"#ff33bb",
|
|
@@ -1782,17 +1789,29 @@ var GRADIENT = [
|
|
|
1782
1789
|
"#ff9966",
|
|
1783
1790
|
"#ff7722"
|
|
1784
1791
|
];
|
|
1792
|
+
function hexToRgb(hex) {
|
|
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
|
+
}
|
|
1785
1804
|
function Banner({ connectionState }) {
|
|
1786
1805
|
const isConnected = connectionState.status === "connected";
|
|
1787
|
-
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1806
|
+
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 2, marginBottom: 1, children: [
|
|
1807
|
+
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "row", children: [
|
|
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
|
+
] }),
|
|
1811
|
+
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 1, marginLeft: 1, children: [
|
|
1812
|
+
/* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
|
|
1813
|
+
"v",
|
|
1814
|
+
version
|
|
1796
1815
|
] }),
|
|
1797
1816
|
/* @__PURE__ */ jsx4(Text4, { children: " " }),
|
|
1798
1817
|
isConnected ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|