@kud/gh-ink 0.45.9 → 0.46.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 +8 -2
- package/dist/index.js +40 -30
- package/package.json +3 -3
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;
|
|
@@ -77,8 +77,14 @@ type Sidebar = {
|
|
|
77
77
|
* against a budget, and a budget that does not know the rail is there overflows
|
|
78
78
|
* by the rail's whole width — which in a frame sized to fill the terminal
|
|
79
79
|
* scrolls the panel rather than clipping a row.
|
|
80
|
+
*
|
|
81
|
+
* Widened from 40 once the rail carried real initiative titles: at 40 the label
|
|
82
|
+
* line had 33 columns to spend, which cut the summary of nearly every epic mid
|
|
83
|
+
* word and left the rail listing keys with an ellipsis after them. The key line
|
|
84
|
+
* was never the constraint — the label is what makes a key readable, and a rail
|
|
85
|
+
* you cannot read is forty columns spent on nothing.
|
|
80
86
|
*/
|
|
81
|
-
declare const SIDEBAR_COLS =
|
|
87
|
+
declare const SIDEBAR_COLS = 52;
|
|
82
88
|
/**
|
|
83
89
|
* The dim figures after the key: how far through, and how much is moving.
|
|
84
90
|
*
|
package/dist/index.js
CHANGED
|
@@ -586,7 +586,7 @@ var HealthPanel = ({
|
|
|
586
586
|
] });
|
|
587
587
|
};
|
|
588
588
|
var ACCENT = "#FF8700";
|
|
589
|
-
var SIDEBAR_COLS =
|
|
589
|
+
var SIDEBAR_COLS = 52;
|
|
590
590
|
var RULE = 1;
|
|
591
591
|
var PAD = 2;
|
|
592
592
|
var CONTENT = SIDEBAR_COLS - RULE - PAD;
|
|
@@ -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 =
|
|
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 } =
|
|
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;
|
|
@@ -3036,32 +3038,40 @@ var BrowseScreen = ({
|
|
|
3036
3038
|
width: listCols,
|
|
3037
3039
|
flexShrink: 0,
|
|
3038
3040
|
children: [
|
|
3039
|
-
/* @__PURE__ */ jsxs(
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3041
|
+
/* @__PURE__ */ jsxs(
|
|
3042
|
+
Backdrop,
|
|
3043
|
+
{
|
|
3044
|
+
dimmed: !!overlay || railActive,
|
|
3045
|
+
absolute: !!overlay,
|
|
3046
|
+
height: listHeight,
|
|
3047
|
+
children: [
|
|
3048
|
+
/* @__PURE__ */ jsx(Box, { flexDirection: "column", flexGrow: 1, children: visibleItems.map((item, i) => /* @__PURE__ */ jsx(
|
|
3049
|
+
ItemRow,
|
|
3050
|
+
{
|
|
3051
|
+
item,
|
|
3052
|
+
active: viewStart + i === cursor,
|
|
3053
|
+
login,
|
|
3054
|
+
merged: (item.kind === "pr" || item.kind === "issue") && !!mergedUrls?.includes(item.url),
|
|
3055
|
+
leaving: (item.kind === "pr" || item.kind === "issue") && !!leavingUrls?.includes(item.url),
|
|
3056
|
+
transient: transientOf(transients, item, section.id),
|
|
3057
|
+
transitAt: "url" in item ? transitSince?.get(item.url) : void 0,
|
|
3058
|
+
prefix: treePrefix(section.items, viewStart + i),
|
|
3059
|
+
parent: item.kind === "task" && depthOf(section.items[viewStart + i + 1]) > depthOf(item),
|
|
3060
|
+
sparkFrame,
|
|
3061
|
+
cols: listCols,
|
|
3062
|
+
gap: i > 0 && gapsAbove(section.items, viewStart + i)
|
|
3063
|
+
},
|
|
3064
|
+
`${viewStart + i}:${rowKey(item)}`
|
|
3065
|
+
)) }),
|
|
3066
|
+
hasMore && /* @__PURE__ */ jsxs(Text3, { dimColor: true, children: [
|
|
3067
|
+
" ",
|
|
3068
|
+
"\u2193 ",
|
|
3069
|
+
section.items.length - viewStart - visibleCount,
|
|
3070
|
+
" more"
|
|
3071
|
+
] })
|
|
3072
|
+
]
|
|
3073
|
+
}
|
|
3074
|
+
),
|
|
3065
3075
|
overlay ? /* @__PURE__ */ jsx(
|
|
3066
3076
|
Box,
|
|
3067
3077
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.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",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react": ">=19"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@kud/gh": "0.
|
|
52
|
-
"@kud/gh-workflow": "0.
|
|
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
|
},
|