@kud/gh-ink 0.59.0 → 0.60.0

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/index.js +26 -11
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -751,16 +751,16 @@ var SidePanel = ({
751
751
  var stripGlyph = (state) => {
752
752
  switch (state) {
753
753
  case "ok":
754
- return ["\u2713", colors.success];
754
+ return ["\uF00C", colors.success];
755
755
  case "warn":
756
- return ["!", colors.warning];
756
+ return ["\uF071", colors.warning];
757
757
  case "fail":
758
- return ["\u2717", colors.error];
758
+ return ["\uF00D", colors.error];
759
759
  case "unknown":
760
- return ["\u25CB", colors.muted];
760
+ return ["?", colors.muted];
761
761
  }
762
762
  };
763
- var ALARM = "\u25B2";
763
+ var ALARM = "\uF06D";
764
764
  var SEVERITY = {
765
765
  fail: 0,
766
766
  warn: 1,
@@ -775,7 +775,7 @@ var ageLabel = (at, now = Date.now()) => {
775
775
  if (m < 60) return `${m}m`;
776
776
  return `${Math.round(m / 60)}h`;
777
777
  };
778
- var itemText = (item) => `${stripGlyph(item.state)[0]} ${item.key}${item.alarm ? ALARM : ""}`;
778
+ var itemText = (item) => `${stripGlyph(item.state)[0]}${item.alarm ? ` ${ALARM}` : ""} ${item.key}`;
779
779
  var stripLayout = (strip, width, now = Date.now()) => {
780
780
  const age = ageLabel(strip.at, now);
781
781
  const fixed = 2 + strip.title.length + 2 + (age ? age.length + 3 : 0);
@@ -799,6 +799,12 @@ var stripLayout = (strip, width, now = Date.now()) => {
799
799
  }
800
800
  return { parts: null, summary: text, age };
801
801
  };
802
+ var nameStyle = (item) => {
803
+ if (item.state === "fail" || item.alarm)
804
+ return { color: colors.error, bold: true };
805
+ if (item.state === "unknown") return { dimColor: true };
806
+ return {};
807
+ };
802
808
  var StatusStripLine = ({
803
809
  strip,
804
810
  label = "status",
@@ -812,7 +818,7 @@ var StatusStripLine = ({
812
818
  ] });
813
819
  if (strip === null)
814
820
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
815
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \u25CB " }),
821
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${stripGlyph("unknown")[0]} ` }),
816
822
  /* @__PURE__ */ jsx(Text, { dimColor: true, children: `${label} no signal / not configured` })
817
823
  ] });
818
824
  const { parts, summary, age } = stripLayout(strip, width, now);
@@ -820,14 +826,23 @@ var StatusStripLine = ({
820
826
  /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${strip.title} ` }),
821
827
  parts ? parts.map((item, i) => {
822
828
  const [glyph, color] = stripGlyph(item.state);
829
+ const asking = item.state === "fail" || item.state === "warn";
823
830
  return /* @__PURE__ */ jsxs(React2.Fragment, { children: [
824
831
  i > 0 ? /* @__PURE__ */ jsx(Text, { children: " " }) : null,
825
- /* @__PURE__ */ jsx(Text, { color, bold: true, children: glyph }),
826
- /* @__PURE__ */ jsxs(Text, { children: [
832
+ /* @__PURE__ */ jsx(
833
+ Text,
834
+ {
835
+ color: item.state === "unknown" ? void 0 : color,
836
+ dimColor: item.state === "unknown",
837
+ bold: asking,
838
+ children: glyph
839
+ }
840
+ ),
841
+ item.alarm ? /* @__PURE__ */ jsx(Text, { color: colors.error, bold: true, children: ` ${ALARM}` }) : null,
842
+ /* @__PURE__ */ jsxs(Text, { ...nameStyle(item), children: [
827
843
  " ",
828
844
  item.key
829
- ] }),
830
- item.alarm ? /* @__PURE__ */ jsx(Text, { color: colors.error, bold: true, children: ALARM }) : null
845
+ ] })
831
846
  ] }, item.key);
832
847
  }) : /* @__PURE__ */ jsx(Text, { children: summary }),
833
848
  age ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${age}` }) : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.59.0",
3
+ "version": "0.60.0",
4
4
  "description": "Ink components for rendering GitHub PR review comments and health — controlled, presentation-only, built on @kud/ink-ui and fed by @kud/gh.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@kud/gh": "0.17.0",
52
- "@kud/gh-workflow": "0.12.1",
52
+ "@kud/gh-workflow": "0.13.0",
53
53
  "@kud/ink-ui": "0.30.0",
54
54
  "zx": "8.8.5"
55
55
  },