@kud/gh-ink 0.77.0 → 0.78.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 +14 -1
- package/dist/index.js +20 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -930,6 +930,19 @@ declare const COLS: number;
|
|
|
930
930
|
* disagrees with the sum of its own tabs is worse than either number alone.
|
|
931
931
|
*/
|
|
932
932
|
declare const workCount: (s: Section) => number;
|
|
933
|
+
/**
|
|
934
|
+
* How many rows in a tab carry a `warning`: what the tab draws as `⚠ N` after
|
|
935
|
+
* its count.
|
|
936
|
+
*
|
|
937
|
+
* Counted off the rows rather than handed in by the host, so the tab can only
|
|
938
|
+
* ever count what a row in it actually says. A separate host figure is a second
|
|
939
|
+
* implementation of the same rule, free to warn on a tab whose rows are silent.
|
|
940
|
+
*
|
|
941
|
+
* Distinct keys, because a ticket can head more than one block in the same tab,
|
|
942
|
+
* and one wrong ticket drawn twice is still one thing to fix. Read off the
|
|
943
|
+
* same sections the badge reads, so a search narrows both together.
|
|
944
|
+
*/
|
|
945
|
+
declare const warningCount: (s: Section) => number;
|
|
933
946
|
declare const drillCmd: (item: AnyItem) => string | null;
|
|
934
947
|
declare const explainGhAction: (e: unknown) => string;
|
|
935
948
|
declare const buildActions: (item: AnyItem, login: string, showFlash: (msg: string) => void, jiraBase?: string, jiraKeyRe?: RegExp, jiraTransitions?: JiraTransition[], onRefresh?: () => void, onRemove?: (item: GHItem) => void, onOpenView?: (item: AnyItem) => boolean, ext?: {
|
|
@@ -1170,5 +1183,5 @@ declare const matchesFilter: (repo: string, filter: RepoFilter) => boolean;
|
|
|
1170
1183
|
*/
|
|
1171
1184
|
declare const parsePatterns: (value: string) => string[];
|
|
1172
1185
|
|
|
1173
|
-
export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DEFAULT_FOCUS_EMPTY, DEFAULT_FOCUS_LABEL, FOCUS_JUMP_KEY, FOCUS_MARK, FocusSlotLine, HealthPanel, LookupMiss, MIN_SIDEBAR_COLS, PrRow, SIDEBAR_COLS, SidePanel, StatusStripLine, ageLabel, budgetNotice, buildActions, buildCheckoutCmd, clipboard, counts, drillCmd, explainGhAction, explainItem, fitCount, focusCellFor, focusRefColor, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, isMenuGap, itermRun, jumpToRepo, jumpToRepoPane, matchesFilter, maxViewStart, menuRowsOf, menuTone, moveCursor, numberColumnsOf, openInTab, parsePatterns, railCapacity, railHeights, railRowsOf, railWidth, railsOf, readCache, renderMarkdown, reposInSections, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, sectionShedOf, signatureOf, stripGlyph, stripRows, stripSignature, toCiStatusState, trailingColumnsOf, truncate, useActionMenu, useChrome, windowCount, withHeaders, withoutItem, workCount, writeCache };
|
|
1186
|
+
export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DEFAULT_FOCUS_EMPTY, DEFAULT_FOCUS_LABEL, FOCUS_JUMP_KEY, FOCUS_MARK, FocusSlotLine, HealthPanel, LookupMiss, MIN_SIDEBAR_COLS, PrRow, SIDEBAR_COLS, SidePanel, StatusStripLine, ageLabel, budgetNotice, buildActions, buildCheckoutCmd, clipboard, counts, drillCmd, explainGhAction, explainItem, fitCount, focusCellFor, focusRefColor, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, isMenuGap, itermRun, jumpToRepo, jumpToRepoPane, matchesFilter, maxViewStart, menuRowsOf, menuTone, moveCursor, numberColumnsOf, openInTab, parsePatterns, railCapacity, railHeights, railRowsOf, railWidth, railsOf, readCache, renderMarkdown, reposInSections, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, sectionShedOf, signatureOf, stripGlyph, stripRows, stripSignature, toCiStatusState, trailingColumnsOf, truncate, useActionMenu, useChrome, warningCount, windowCount, withHeaders, withoutItem, workCount, writeCache };
|
|
1174
1187
|
export type { Action, ActionGroup, ChromeHints, ChromeSpec, ChromeState, CiStatusState, Command, CommentsPanelProps, DetailContext, ExplainSection, ExtensionTarget, FocusGutter, FocusSlot, HealthPanelProps, InboxBudget, InboxExtension, JiraAvailableTransition, JiraTransition, JiraTransitionsFor, LiveLabel, MenuGap, MenuRow, PrRowProps, Rails, RepoFilter, RowAnnouncement, RowMotion, SettledResult, Sidebar, SidebarRow, StatusStrip, StripItem, StripRows, StripSpan, StripState, StripStatusState, TabForStatus, TrailingColumns, TrailingShed };
|
package/dist/index.js
CHANGED
|
@@ -2510,6 +2510,13 @@ var workCount = (s) => {
|
|
|
2510
2510
|
}
|
|
2511
2511
|
return n;
|
|
2512
2512
|
};
|
|
2513
|
+
var [WARNING_MARK, WARNING_INK] = stripGlyph("warn");
|
|
2514
|
+
var warningCount = (s) => {
|
|
2515
|
+
const keys = /* @__PURE__ */ new Set();
|
|
2516
|
+
for (const item of s.items)
|
|
2517
|
+
if (item.kind === "task" && item.warning) keys.add(item.key);
|
|
2518
|
+
return keys.size;
|
|
2519
|
+
};
|
|
2513
2520
|
var countedSections = (sections, departing) => {
|
|
2514
2521
|
if (!departing?.size) return sections;
|
|
2515
2522
|
const sent = new Set(sections.map((s) => s.id));
|
|
@@ -3181,10 +3188,11 @@ var ItemRow = ({
|
|
|
3181
3188
|
] });
|
|
3182
3189
|
if (item.kind === "task") {
|
|
3183
3190
|
const note = item.note ?? "";
|
|
3191
|
+
const warning = item.warning ?? "";
|
|
3184
3192
|
const transitIcon = pending ? PENDING_GLYPH : !transient ? " " : isDeparture(transient) ? TRANSIT_OUT_FRAMES[rampAt(TRANSIT_OUT_FRAMES.length)] : isArrival(transient) ? TRANSIT_IN_FRAMES[rampAt(TRANSIT_IN_FRAMES.length)] : "\u25C9";
|
|
3185
3193
|
const titleMax = Math.max(
|
|
3186
3194
|
1,
|
|
3187
|
-
cols - item.key.length - note.length - (item.pill ? pillWidth(item.pill) + 1 : 0) - (farewellLabel ? pillWidth(farewellLabel) + 2 : 0) - prefix.length - (markerCols > 0 ? markerCols + 1 : 0) - // The focus gutter, priced only when it is drawn: two columns on every
|
|
3195
|
+
cols - item.key.length - note.length - (item.pill ? pillWidth(item.pill) + 1 : 0) - (warning ? warning.length + 3 : 0) - (farewellLabel ? pillWidth(farewellLabel) + 2 : 0) - prefix.length - (markerCols > 0 ? markerCols + 1 : 0) - // The focus gutter, priced only when it is drawn: two columns on every
|
|
3188
3196
|
// url-bearing row while a focus is on screen, none at all without one.
|
|
3189
3197
|
(focus !== void 0 ? 2 : 0) - 12
|
|
3190
3198
|
);
|
|
@@ -3218,6 +3226,11 @@ var ItemRow = ({
|
|
|
3218
3226
|
}
|
|
3219
3227
|
)
|
|
3220
3228
|
] }) : null,
|
|
3229
|
+
warning ? /* @__PURE__ */ jsxs(Text3, { color: WARNING_INK, children: [
|
|
3230
|
+
" ",
|
|
3231
|
+
/* @__PURE__ */ jsx(Text3, { bold: true, children: WARNING_MARK }),
|
|
3232
|
+
` ${warning}`
|
|
3233
|
+
] }) : null,
|
|
3221
3234
|
note ? /* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` ${note}` }) : null,
|
|
3222
3235
|
farewellLabel && !backdropped ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3223
3236
|
/* @__PURE__ */ jsx(Text3, { children: " " }),
|
|
@@ -3848,6 +3861,10 @@ var BrowseScreen = ({
|
|
|
3848
3861
|
const s = counted.find((c) => c.id === id);
|
|
3849
3862
|
return s ? workCount(s) : 0;
|
|
3850
3863
|
};
|
|
3864
|
+
const warningOf = (id) => {
|
|
3865
|
+
const s = counted.find((c) => c.id === id);
|
|
3866
|
+
return s ? warningCount(s) : 0;
|
|
3867
|
+
};
|
|
3851
3868
|
const markedTabs = useMemo(() => {
|
|
3852
3869
|
const out = /* @__PURE__ */ new Set();
|
|
3853
3870
|
if (!transients?.size) return out;
|
|
@@ -4696,6 +4713,7 @@ var BrowseScreen = ({
|
|
|
4696
4713
|
label: s.label,
|
|
4697
4714
|
icon: s.icon,
|
|
4698
4715
|
count: countOf(s.id),
|
|
4716
|
+
warning: warningOf(s.id),
|
|
4699
4717
|
/*
|
|
4700
4718
|
* The denominator, and only where it can still be true.
|
|
4701
4719
|
*
|
|
@@ -5548,4 +5566,4 @@ var matchesFilter = (repo, filter) => {
|
|
|
5548
5566
|
};
|
|
5549
5567
|
var parsePatterns = (value) => value.split(",").map((p) => p.trim()).filter(Boolean);
|
|
5550
5568
|
|
|
5551
|
-
export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DEFAULT_FOCUS_EMPTY, DEFAULT_FOCUS_LABEL, FOCUS_JUMP_KEY, FOCUS_MARK, FocusSlotLine, HealthPanel, LookupMiss, MIN_SIDEBAR_COLS, PrRow, SIDEBAR_COLS, SidePanel, StatusStripLine, ageLabel, budgetNotice, buildActions, buildCheckoutCmd, clipboard, counts, drillCmd, explainGhAction, explainItem, fitCount, focusCellFor, focusRefColor, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, isMenuGap, itermRun, jumpToRepo, jumpToRepoPane, matchesFilter, maxViewStart, menuRowsOf, menuTone, moveCursor, numberColumnsOf, openInTab, parsePatterns, railCapacity, railHeights, railRowsOf, railWidth, railsOf, readCache, renderMarkdown, reposInSections, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, sectionShedOf, signatureOf, stripGlyph, stripRows, stripSignature, toCiStatusState, trailingColumnsOf, truncate, useActionMenu, useChrome, windowCount, withHeaders, withoutItem, workCount, writeCache };
|
|
5569
|
+
export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DEFAULT_FOCUS_EMPTY, DEFAULT_FOCUS_LABEL, FOCUS_JUMP_KEY, FOCUS_MARK, FocusSlotLine, HealthPanel, LookupMiss, MIN_SIDEBAR_COLS, PrRow, SIDEBAR_COLS, SidePanel, StatusStripLine, ageLabel, budgetNotice, buildActions, buildCheckoutCmd, clipboard, counts, drillCmd, explainGhAction, explainItem, fitCount, focusCellFor, focusRefColor, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, isMenuGap, itermRun, jumpToRepo, jumpToRepoPane, matchesFilter, maxViewStart, menuRowsOf, menuTone, moveCursor, numberColumnsOf, openInTab, parsePatterns, railCapacity, railHeights, railRowsOf, railWidth, railsOf, readCache, renderMarkdown, reposInSections, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, sectionShedOf, signatureOf, stripGlyph, stripRows, stripSignature, toCiStatusState, trailingColumnsOf, truncate, useActionMenu, useChrome, warningCount, windowCount, withHeaders, withoutItem, workCount, writeCache };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.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",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@kud/ink-ui": ">=0.
|
|
47
|
+
"@kud/ink-ui": ">=0.42.0 <1",
|
|
48
48
|
"ink": ">=7",
|
|
49
49
|
"react": ">=19"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@kud/gh": "0.21.1",
|
|
53
|
-
"@kud/gh-workflow": "0.
|
|
53
|
+
"@kud/gh-workflow": "0.18.0",
|
|
54
54
|
"zx": "8.8.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@kud/ink-ui": "0.
|
|
57
|
+
"@kud/ink-ui": "0.42.0",
|
|
58
58
|
"@types/node": "26.6.5",
|
|
59
59
|
"@types/react": "19.3.0",
|
|
60
60
|
"ink": "8.0.0",
|