@kud/gh-ink 0.9.1 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -67,6 +67,7 @@ type GHItem = {
67
67
  health: Health;
68
68
  author?: string;
69
69
  age: string;
70
+ activityAge?: string;
70
71
  ts: number;
71
72
  unresolved: number;
72
73
  conversation: number;
package/dist/index.js CHANGED
@@ -733,7 +733,9 @@ var repoPriority = (repo) => {
733
733
  };
734
734
  var sortItems = (items) => [...items].sort((a, b) => {
735
735
  const pd = repoPriority(a.repo) - repoPriority(b.repo);
736
- return pd !== 0 ? pd : a.repo.localeCompare(b.repo);
736
+ if (pd !== 0) return pd;
737
+ const rd = a.repo.localeCompare(b.repo);
738
+ return rd !== 0 ? rd : b.ts - a.ts;
737
739
  });
738
740
  var sortByRecency = (items) => [...items].sort((a, b) => b.ts - a.ts);
739
741
  var insertRepoHeaders = (items) => {
@@ -1484,8 +1486,9 @@ var ItemRow = ({
1484
1486
  const numStr = `#${item.number}`.padEnd(7);
1485
1487
  const showAuthor = !!item.author && item.author !== login;
1486
1488
  const unresolvedLabel = item.unresolved > 0 ? `\uF086 ${item.unresolved}` : "";
1489
+ const ageLabel = item.activityAge && item.activityAge !== item.age ? `${item.activityAge} \xB7 ${item.age}` : item.age;
1487
1490
  const suffix = [
1488
- item.age || "",
1491
+ ageLabel || "",
1489
1492
  unresolvedLabel,
1490
1493
  showAuthor ? `by ${item.author}` : ""
1491
1494
  ].filter(Boolean).join(" ");
@@ -1502,7 +1505,7 @@ var ItemRow = ({
1502
1505
  repoLabel ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: repoLabel }) : null,
1503
1506
  unresolvedLabel ? /* @__PURE__ */ jsx(Text2, { bold: true, color: "#FF8700", children: " " + unresolvedLabel }) : null,
1504
1507
  showAuthor ? /* @__PURE__ */ jsx(Text2, { dimColor: true, italic: true, children: " by " + item.author }) : null,
1505
- item.age ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + item.age }) : null
1508
+ ageLabel ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + ageLabel }) : null
1506
1509
  ] });
1507
1510
  };
1508
1511
  var useActionMenu = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.9.1",
3
+ "version": "0.10.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",