@kud/gh-ink 0.39.0 → 0.40.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
@@ -44,6 +44,17 @@ type SidebarRow = {
44
44
  * hard 0 asserts the first from evidence for neither.
45
45
  */
46
46
  live?: number;
47
+ /**
48
+ * How far through it is — `done` of `total` children resolved.
49
+ *
50
+ * Both or neither, and only ever drawn together: a numerator with no
51
+ * denominator is not progress, it is a number. Absent for the same reason
52
+ * `live` is — a host that cannot count says nothing rather than claiming zero,
53
+ * and the two counts genuinely can be unavailable while `live` is known, since
54
+ * `live` is what the board already drew and this needs asking Jira again.
55
+ */
56
+ done?: number;
57
+ total?: number;
47
58
  /** Something under it is waiting on you. */
48
59
  wantsYou?: boolean;
49
60
  /**
@@ -66,6 +77,16 @@ type Sidebar = {
66
77
  * scrolls the panel rather than clipping a row.
67
78
  */
68
79
  declare const SIDEBAR_COLS = 40;
80
+ /**
81
+ * The dim figures after the key: how far through, and how much is moving.
82
+ *
83
+ * Either half may be missing and the other still worth saying, so this is a join
84
+ * of what is known rather than one of three fixed shapes. `done`/`total` are
85
+ * treated as a pair — a numerator with no denominator is not progress, it is a
86
+ * number — and a zero is printed wherever it was counted, because "nothing is
87
+ * moving" is exactly the thing a roadmap is read to notice.
88
+ */
89
+ declare const counts: (row: SidebarRow) => string;
69
90
  /**
70
91
  * How many rows fit in `height` — one fewer than would physically fit whenever
71
92
  * that means anything is left over, to buy the line that says so.
@@ -698,4 +719,4 @@ declare const matchesFilter: (repo: string, filter: RepoFilter) => boolean;
698
719
  */
699
720
  declare const parsePatterns: (value: string) => string[];
700
721
 
701
- export { type Action, ActionMenu, type AnyItem, App, COLS, type CiStatus, CiStatusLine, type CiStatusState, CommentsPanel, type CommentsPanelProps, type DetailContext, type ExplainSection, type ExtensionTarget, type GHDetail, type GHItem, HealthPanel, type HealthPanelProps, type InboxBudget, type InboxConfig, type InboxExtension, type JiraTransition, type OriginSplit, PIN_MARK, type RepoFilter, type RepoHeader, type RepoProfile, SIDEBAR_COLS, type Section, type ShowLess, type ShowMore, SidePanel, type Sidebar, type SidebarRow, type Standing, type SubgroupHeader, type TaskRow, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache };
722
+ export { type Action, ActionMenu, type AnyItem, App, COLS, type CiStatus, CiStatusLine, type CiStatusState, CommentsPanel, type CommentsPanelProps, type DetailContext, type ExplainSection, type ExtensionTarget, type GHDetail, type GHItem, HealthPanel, type HealthPanelProps, type InboxBudget, type InboxConfig, type InboxExtension, type JiraTransition, type OriginSplit, PIN_MARK, type RepoFilter, type RepoHeader, type RepoProfile, SIDEBAR_COLS, type Section, type ShowLess, type ShowMore, SidePanel, type Sidebar, type SidebarRow, type Standing, type SubgroupHeader, type TaskRow, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache };
package/dist/index.js CHANGED
@@ -590,6 +590,10 @@ var PAD = 2;
590
590
  var CONTENT = SIDEBAR_COLS - RULE - PAD;
591
591
  var LABEL_INDENT = 2;
592
592
  var RULE_COLOR = "gray";
593
+ var counts = (row) => [
594
+ row.done !== void 0 && row.total !== void 0 ? `${row.done}/${row.total}` : "",
595
+ row.live !== void 0 ? `${row.live} live` : ""
596
+ ].filter(Boolean).join(" \xB7 ");
593
597
  var truncate = (text, max) => [...text].length <= max ? text : [...text].slice(0, Math.max(0, max - 1)).join("") + "\u2026";
594
598
  var ROW_LINES = 3;
595
599
  var HEADING_LINES = 2;
@@ -640,7 +644,7 @@ var SidePanel = ({
640
644
  /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
641
645
  /* @__PURE__ */ jsx(Text, { color: ACCENT, bold: true, children: row.wantsYou ? "\u2190 " : " " }),
642
646
  /* @__PURE__ */ jsx(Text, { color: ACCENT, bold: active, children: row.key }),
643
- row.live !== void 0 ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${row.live} live` }) : null
647
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${counts(row)}` })
644
648
  ] }),
645
649
  /* @__PURE__ */ jsx(Box, { paddingLeft: LABEL_INDENT + 2, children: /* @__PURE__ */ jsx(Text, { dimColor: !active, children: truncate(row.label, CONTENT - LABEL_INDENT - 2) }) })
646
650
  ] }, row.key);
@@ -858,11 +862,11 @@ var diffSections = (prev, next) => {
858
862
  counts: { added, removed, changed: changedRows.size }
859
863
  };
860
864
  };
861
- var summariseDiff = (counts) => {
865
+ var summariseDiff = (counts2) => {
862
866
  const parts = [];
863
- if (counts.added) parts.push(`${counts.added} new`);
864
- if (counts.removed) parts.push(`${counts.removed} gone`);
865
- if (counts.changed) parts.push(`${counts.changed} moved`);
867
+ if (counts2.added) parts.push(`${counts2.added} new`);
868
+ if (counts2.removed) parts.push(`${counts2.removed} gone`);
869
+ if (counts2.changed) parts.push(`${counts2.changed} moved`);
866
870
  return parts.join(" \xB7 ");
867
871
  };
868
872
  var transientOf = (transients, item, sectionId) => {
@@ -3288,8 +3292,8 @@ var App = ({
3288
3292
  }
3289
3293
  showData(fresh.sections, fresh.login);
3290
3294
  } else if (freshKey !== displayedKey.current) {
3291
- const { counts } = diffSections(displayedSections.current, fresh.sections);
3292
- if (counts.added + counts.removed + counts.changed === 0)
3295
+ const { counts: counts2 } = diffSections(displayedSections.current, fresh.sections);
3296
+ if (counts2.added + counts2.removed + counts2.changed === 0)
3293
3297
  showData(fresh.sections, fresh.login);
3294
3298
  else setPending(fresh);
3295
3299
  } else {
@@ -3533,4 +3537,4 @@ var matchesFilter = (repo, filter) => {
3533
3537
  };
3534
3538
  var parsePatterns = (value) => value.split(",").map((p) => p.trim()).filter(Boolean);
3535
3539
 
3536
- export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate2 as truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache };
3540
+ export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate2 as truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.39.0",
3
+ "version": "0.40.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",