@deaquinodev/querky 0.4.1 → 0.4.2
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 +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1617,11 +1617,14 @@ var ERROR_FG = "#ff4444";
|
|
|
1617
1617
|
function ErrorBox({ message }) {
|
|
1618
1618
|
const cols = Math.max(0, (process.stdout.columns ?? 80) - 2);
|
|
1619
1619
|
const blank = " ".repeat(cols);
|
|
1620
|
-
const
|
|
1621
|
-
const padded = label.length < cols ? label + " ".repeat(cols - label.length) : label;
|
|
1620
|
+
const lines = message.split("\n");
|
|
1622
1621
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
1623
1622
|
/* @__PURE__ */ jsx3(Text3, { backgroundColor: ERROR_BG, children: blank }),
|
|
1624
|
-
|
|
1623
|
+
lines.map((line, i) => {
|
|
1624
|
+
const content = (i === 0 ? " \u2717 " : " ") + line;
|
|
1625
|
+
const padded = content.length < cols ? content + " ".repeat(cols - content.length) : content;
|
|
1626
|
+
return /* @__PURE__ */ jsx3(Text3, { backgroundColor: ERROR_BG, color: ERROR_FG, bold: true, children: padded }, i);
|
|
1627
|
+
}),
|
|
1625
1628
|
/* @__PURE__ */ jsx3(Text3, { backgroundColor: ERROR_BG, children: blank })
|
|
1626
1629
|
] });
|
|
1627
1630
|
}
|