dotenvx-ui 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.js +5 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -718,6 +718,7 @@ function DiffView({ left, files, onClose }) {
718
718
  if (key.pageUp) setRowScroll(Math.max(0, scroll - maxRows));
719
719
  if (key.pageDown) setRowScroll(Math.min(maxScroll, scroll + maxRows));
720
720
  }, { isActive: isRawModeSupported });
721
+ const keyColWidth = Math.min(48, Math.max(16, ...rows.map((r) => r.key.length))) + 2;
721
722
  const leftName = trunc(left.relativePath, COL_VAL);
722
723
  const rightName = rightFile ? trunc(rightFile.relativePath, COL_VAL) : "\u2014";
723
724
  return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
@@ -772,7 +773,7 @@ function DiffView({ left, files, onClose }) {
772
773
  ),
773
774
  /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", flexGrow: 1, paddingX: 1, children: [
774
775
  /* @__PURE__ */ jsxs4(Box4, { borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, children: [
775
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: "cyan", children: "KEY".padEnd(22) }),
776
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: "cyan", children: "KEY".padEnd(keyColWidth) }),
776
777
  /* @__PURE__ */ jsxs4(Text4, { bold: true, children: [
777
778
  " ",
778
779
  leftName.padEnd(COL_VAL + 2)
@@ -784,7 +785,7 @@ function DiffView({ left, files, onClose }) {
784
785
  rowsAbove,
785
786
  " more"
786
787
  ] }),
787
- visibleRows.map((row) => /* @__PURE__ */ jsx4(DiffRow, { row }, row.key)),
788
+ visibleRows.map((row) => /* @__PURE__ */ jsx4(DiffRow, { row, keyColWidth }, row.key)),
788
789
  rowsBelow > 0 && /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
789
790
  "\u2193 ",
790
791
  rowsBelow,
@@ -798,11 +799,11 @@ function DiffView({ left, files, onClose }) {
798
799
  ] })
799
800
  ] });
800
801
  }
801
- function DiffRow({ row }) {
802
+ function DiffRow({ row, keyColWidth }) {
802
803
  const { key, leftDisplay, rightDisplay, status } = row;
803
804
  const color = status === "same" ? "green" : void 0;
804
805
  return /* @__PURE__ */ jsxs4(Box4, { children: [
805
- /* @__PURE__ */ jsx4(Text4, { color, children: key.padEnd(22) }),
806
+ /* @__PURE__ */ jsx4(Text4, { color, children: key.padEnd(keyColWidth) }),
806
807
  /* @__PURE__ */ jsxs4(Text4, { color, children: [
807
808
  " ",
808
809
  (leftDisplay || "\u2014").padEnd(COL_VAL + 2)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotenvx-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Terminal and web UI for managing dotenvx environment files",
5
5
  "author": "Alexandru Burla <alexandru.burla@gmail.com>",
6
6
  "license": "MIT",