@kud/gh-ink 0.26.5 → 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.js +19 -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;
|
|
@@ -1968,6 +1979,7 @@ var HelpModal = ({
|
|
|
1968
1979
|
["e", "explain this row"],
|
|
1969
1980
|
["o", "open in browser"],
|
|
1970
1981
|
["c", "copy URL"],
|
|
1982
|
+
["C", "copy ticket + its PRs"],
|
|
1971
1983
|
["b", "copy branch"],
|
|
1972
1984
|
["s", "switch to branch here"],
|
|
1973
1985
|
["j", "open repo in new tab"],
|
|
@@ -2482,6 +2494,13 @@ var BrowseScreen = ({
|
|
|
2482
2494
|
showFlash(`\u2713 Copied URL for ${label}`);
|
|
2483
2495
|
return;
|
|
2484
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
|
+
}
|
|
2485
2504
|
if (input === "d") {
|
|
2486
2505
|
if (openDrillView(activeItem)) return;
|
|
2487
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",
|