@kud/gh-ink 0.26.5 → 0.28.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.js +28 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1055,6 +1055,17 @@ var budgetNotice = (budget, now = Date.now()) => {
|
|
|
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
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
|
+
};
|
|
1058
1069
|
var gapsAbove = (items, i) => {
|
|
1059
1070
|
const item = items[i];
|
|
1060
1071
|
if (!item || i === 0) return false;
|
|
@@ -1967,7 +1978,9 @@ var HelpModal = ({
|
|
|
1967
1978
|
["m", "actions \xB7 close"],
|
|
1968
1979
|
["e", "explain this row"],
|
|
1969
1980
|
["o", "open in browser"],
|
|
1981
|
+
["O", "open ticket + its PRs"],
|
|
1970
1982
|
["c", "copy URL"],
|
|
1983
|
+
["C", "copy ticket + its PRs"],
|
|
1971
1984
|
["b", "copy branch"],
|
|
1972
1985
|
["s", "switch to branch here"],
|
|
1973
1986
|
["j", "open repo in new tab"],
|
|
@@ -2476,12 +2489,27 @@ var BrowseScreen = ({
|
|
|
2476
2489
|
showFlash(`\u2197 Opened ${label}`);
|
|
2477
2490
|
return;
|
|
2478
2491
|
}
|
|
2492
|
+
if (input === "O") {
|
|
2493
|
+
const urls = treeUrls(section.items, cursor);
|
|
2494
|
+
if (urls.length === 0) return;
|
|
2495
|
+
quietly`open ${urls}`.catch(() => {
|
|
2496
|
+
});
|
|
2497
|
+
showFlash(`\u2197 Opened ${urls.length} tab${urls.length === 1 ? "" : "s"}`);
|
|
2498
|
+
return;
|
|
2499
|
+
}
|
|
2479
2500
|
if (input === "c") {
|
|
2480
2501
|
clipboard(activeItem.url);
|
|
2481
2502
|
const label = activeItem.kind === "task" ? activeItem.key : `#${activeItem.number}`;
|
|
2482
2503
|
showFlash(`\u2713 Copied URL for ${label}`);
|
|
2483
2504
|
return;
|
|
2484
2505
|
}
|
|
2506
|
+
if (input === "C") {
|
|
2507
|
+
const urls = treeUrls(section.items, cursor);
|
|
2508
|
+
if (urls.length === 0) return;
|
|
2509
|
+
clipboard(urls.join("\n"));
|
|
2510
|
+
showFlash(`\u2713 Copied ${urls.length} URL${urls.length === 1 ? "" : "s"}`);
|
|
2511
|
+
return;
|
|
2512
|
+
}
|
|
2485
2513
|
if (input === "d") {
|
|
2486
2514
|
if (openDrillView(activeItem)) return;
|
|
2487
2515
|
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.28.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",
|