@kud/gh-ink 0.45.8 → 0.45.10

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.d.ts CHANGED
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { PrComments, PrHealthData, PrCheck, Health } from '@kud/gh';
3
3
  import { StyledLine } from '@kud/ink-ui';
4
4
  import { AnyItem, Section, CiStatus, GHItem, OriginSplit } from '@kud/gh-workflow';
5
- export { AnyItem, CiStatus, GHDetail, GHItem, InboxConfig, OriginSplit, PIN_MARK, RepoHeader, RepoProfile, Section, ShowLess, ShowMore, Standing, SubgroupHeader, TaskRow, checkoutDirs, configureInbox, filterByOrigin, filterByRepos, filterBySearch, inboxConfig, insertRepoHeaders, labelPriority, layoutGHItems, profileOf, relativeTime, repoPriority, resetInboxConfig, sortByRecency, sortItems, whoseMove } from '@kud/gh-workflow';
5
+ export { AnyItem, CiStatus, GHDetail, GHItem, InboxConfig, Move, OriginSplit, PIN_MARK, RepoHeader, RepoProfile, Section, ShowLess, ShowMore, Standing, SubgroupHeader, TaskRow, checkoutDirs, configureInbox, filterByOrigin, filterByRepos, filterBySearch, inboxConfig, insertRepoHeaders, labelPriority, layoutGHItems, profileOf, relativeTime, repoPriority, resetInboxConfig, sortByRecency, sortItems, whoseMove } from '@kud/gh-workflow';
6
6
 
7
7
  type CommentsPanelProps = {
8
8
  repo: string;
package/dist/index.js CHANGED
@@ -700,6 +700,8 @@ var healthLegend = [
700
700
  ["merged", "Merged"],
701
701
  ["closed", "Closed"]
702
702
  ];
703
+ var UNREAD_DISPLAY = { glyph: "\u25CB", color: colors.muted };
704
+ var displayFor = (h) => h ? healthDisplay[h] : UNREAD_DISPLAY;
703
705
 
704
706
  // src/inbox/cache.ts
705
707
  var cacheTtlMs = () => inboxConfig().cacheTtlMs;
@@ -891,7 +893,7 @@ var tabsOfMarks = (sections, marks) => {
891
893
  };
892
894
  var quietly = $({ quiet: true });
893
895
  var healthSentence = (item) => {
894
- const glyph = healthDisplay[item.health].glyph.trim();
896
+ const glyph = displayFor(item.health).glyph.trim();
895
897
  const d = item.detail;
896
898
  const plural = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
897
899
  switch (item.health) {
@@ -925,7 +927,7 @@ var healthSentence = (item) => {
925
927
  case "waiting":
926
928
  return `Nobody has reviewed it yet (${glyph}).`;
927
929
  default:
928
- return "An open issue \u2014 no review state applies.";
930
+ return item.health === void 0 ? `Fetched without its review state (${glyph}), so whose move it is cannot be read from here.` : "An open issue \u2014 no review state applies.";
929
931
  }
930
932
  };
931
933
  var checksSentence = (d) => {
@@ -1911,7 +1913,7 @@ var ItemRow = ({
1911
1913
  ] }) : null
1912
1914
  ] });
1913
1915
  }
1914
- const { glyph: healthIcon, color: healthColor2 } = healthDisplay[item.health];
1916
+ const { glyph: healthIcon, color: healthColor2 } = displayFor(item.health);
1915
1917
  const icon = merged ? MERGED_FRAMES[sparkFrame % MERGED_FRAMES.length] : transient && isDeparture(transient) ? TRANSIT_OUT_FRAMES[rampAt(TRANSIT_OUT_FRAMES.length)] : transient && isArrival(transient) ? TRANSIT_IN_FRAMES[rampAt(TRANSIT_IN_FRAMES.length)] : healthIcon;
1916
1918
  const color = merged ? MERGED_COLOUR : transient ? TRANSIT_COLOUR[transient] : healthColor2;
1917
1919
  const spokeLast = !!login && !!item.lastActor && item.lastActor === login;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.45.8",
3
+ "version": "0.45.10",
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",
@@ -48,8 +48,8 @@
48
48
  "react": ">=19"
49
49
  },
50
50
  "dependencies": {
51
- "@kud/gh": "0.12.3",
52
- "@kud/gh-workflow": "0.3.3",
51
+ "@kud/gh": "0.13.0",
52
+ "@kud/gh-workflow": "0.4.0",
53
53
  "@kud/ink-ui": "0.23.0",
54
54
  "zx": "8.8.5"
55
55
  },