@kud/gh-ink 0.26.4 → 0.27.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 +1 -14
- package/dist/index.js +22 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -280,7 +280,7 @@ declare const moveCursor: (items: AnyItem[], current: number, dir: 1 | -1) => nu
|
|
|
280
280
|
* What to say about the remaining budget, or nothing at all.
|
|
281
281
|
*
|
|
282
282
|
* Priced in whole fetches because that is the unit that runs out: the query
|
|
283
|
-
* costs ~
|
|
283
|
+
* costs ~73 points against a 5,000 pool, so "some points left" and "another
|
|
284
284
|
* fetch left" are different questions and only the second one is actionable.
|
|
285
285
|
*
|
|
286
286
|
* Silent above the threshold. A counter on a healthy account is noise in a
|
|
@@ -291,19 +291,6 @@ declare const budgetNotice: (budget: InboxBudget | null | undefined, now?: numbe
|
|
|
291
291
|
label: string;
|
|
292
292
|
critical: boolean;
|
|
293
293
|
} | null;
|
|
294
|
-
/**
|
|
295
|
-
* Whether this row draws a blank line above it.
|
|
296
|
-
*
|
|
297
|
-
* ONE definition, because two readers need the same answer: the renderer draws
|
|
298
|
-
* the gap, and fitCount pays for it out of the window budget. They disagreed
|
|
299
|
-
* until 2026-08-27 — fitCount priced only headers at two lines while the
|
|
300
|
-
* renderer ALSO gapped a task row following a header — so a tab with that shape
|
|
301
|
-
* drew one line more than the window had bought. The frame is sized to fill the
|
|
302
|
-
* terminal exactly, so the overflow scrolls the whole panel instead of clipping.
|
|
303
|
-
*
|
|
304
|
-
* Index-based rather than item-based: whether a row gaps depends on what sits
|
|
305
|
-
* above it, which an item alone cannot answer.
|
|
306
|
-
*/
|
|
307
294
|
declare const gapsAbove: (items: readonly AnyItem[], i: number) => boolean;
|
|
308
295
|
declare const fitCount: (items: AnyItem[], start: number, budget: number) => number;
|
|
309
296
|
declare const windowCount: (items: AnyItem[], start: number, budget: number) => number;
|
package/dist/index.js
CHANGED
|
@@ -1054,11 +1054,24 @@ var budgetNotice = (budget, now = Date.now()) => {
|
|
|
1054
1054
|
);
|
|
1055
1055
|
return fetches <= 0 ? { label: `\u26A1 API budget spent \xB7 ${mins}m`, critical: true } : { label: `\u26A1 ${fetches} fetch${fetches === 1 ? "" : "es"} left`, critical: false };
|
|
1056
1056
|
};
|
|
1057
|
+
var isChildRow = (item) => !!item && (item.kind === "show-more" || item.kind === "show-less" || "indent" in item && item.indent === true);
|
|
1058
|
+
var treeUrls = (items, i) => {
|
|
1059
|
+
let root = i;
|
|
1060
|
+
while (root > 0 && isChildRow(items[root])) root -= 1;
|
|
1061
|
+
const urls = [];
|
|
1062
|
+
for (let j = root; j < items.length; j += 1) {
|
|
1063
|
+
if (j > root && !isChildRow(items[j])) break;
|
|
1064
|
+
const url = items[j].url;
|
|
1065
|
+
if (url) urls.push(url);
|
|
1066
|
+
}
|
|
1067
|
+
return urls;
|
|
1068
|
+
};
|
|
1057
1069
|
var gapsAbove = (items, i) => {
|
|
1058
1070
|
const item = items[i];
|
|
1059
1071
|
if (!item || i === 0) return false;
|
|
1060
1072
|
if (item.kind === "repo-header" || item.kind === "subgroup-header") return true;
|
|
1061
|
-
|
|
1073
|
+
if (item.kind !== "task") return false;
|
|
1074
|
+
return isChildRow(items[i + 1]) || isChildRow(items[i - 1]);
|
|
1062
1075
|
};
|
|
1063
1076
|
var fitCount = (items, start, budget) => {
|
|
1064
1077
|
let lines = 0;
|
|
@@ -1735,7 +1748,6 @@ var TRANSIT_LABEL = {
|
|
|
1735
1748
|
};
|
|
1736
1749
|
var TAB_MARK = "\u25CF";
|
|
1737
1750
|
var tabLabel = (label, marked, id) => marked.size === 0 ? label : `${marked.has(id) ? TAB_MARK : " "} ${label}`;
|
|
1738
|
-
var isChildRow = (item) => !!item && (item.kind === "show-more" || item.kind === "show-less" || "indent" in item && item.indent === true);
|
|
1739
1751
|
var ItemRow = ({
|
|
1740
1752
|
item,
|
|
1741
1753
|
active,
|
|
@@ -1967,6 +1979,7 @@ var HelpModal = ({
|
|
|
1967
1979
|
["e", "explain this row"],
|
|
1968
1980
|
["o", "open in browser"],
|
|
1969
1981
|
["c", "copy URL"],
|
|
1982
|
+
["C", "copy ticket + its PRs"],
|
|
1970
1983
|
["b", "copy branch"],
|
|
1971
1984
|
["s", "switch to branch here"],
|
|
1972
1985
|
["j", "open repo in new tab"],
|
|
@@ -2481,6 +2494,13 @@ var BrowseScreen = ({
|
|
|
2481
2494
|
showFlash(`\u2713 Copied URL for ${label}`);
|
|
2482
2495
|
return;
|
|
2483
2496
|
}
|
|
2497
|
+
if (input === "C") {
|
|
2498
|
+
const urls = treeUrls(section.items, cursor);
|
|
2499
|
+
if (urls.length === 0) return;
|
|
2500
|
+
clipboard(urls.join("\n"));
|
|
2501
|
+
showFlash(`\u2713 Copied ${urls.length} URL${urls.length === 1 ? "" : "s"}`);
|
|
2502
|
+
return;
|
|
2503
|
+
}
|
|
2484
2504
|
if (input === "d") {
|
|
2485
2505
|
if (openDrillView(activeItem)) return;
|
|
2486
2506
|
const cmd = drillCmd(activeItem);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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,7 +48,7 @@
|
|
|
48
48
|
"react": ">=19"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@kud/gh": "0.7.
|
|
51
|
+
"@kud/gh": "0.7.1",
|
|
52
52
|
"@kud/ink-ui": "0.14.0",
|
|
53
53
|
"zx": "8.8.5"
|
|
54
54
|
},
|