@kud/gh-ink 0.64.0 → 0.65.1
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 +21 -12
- package/dist/index.js +146 -90
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -209,6 +209,13 @@ type PrRowProps = {
|
|
|
209
209
|
item: GHItem;
|
|
210
210
|
active: boolean;
|
|
211
211
|
login?: string;
|
|
212
|
+
/**
|
|
213
|
+
* The selection wash for this frame, resolved by the list — see
|
|
214
|
+
* `selectionBackground` in the inbox. A prop rather than an import because
|
|
215
|
+
* the constant lives next to the inbox's `OVERLAY_BG` and importing the inbox
|
|
216
|
+
* here would cycle back through this module. Absent the row draws no wash.
|
|
217
|
+
*/
|
|
218
|
+
selectionBg?: string;
|
|
212
219
|
/**
|
|
213
220
|
* Columns available to this row, which is NOT always the frame width: a rail
|
|
214
221
|
* beside the list takes its share, and a budget that does not know the rail is
|
|
@@ -318,7 +325,7 @@ declare const sectionShedOf: (rows: readonly Pick<LayoutInput, "item" | "prefix"
|
|
|
318
325
|
* arrival, merge and departure belongs to whoever owns the list, and reaches
|
|
319
326
|
* the row as `icon`, `motion` and `announcements` after the decisions are made.
|
|
320
327
|
*/
|
|
321
|
-
declare const PrRow: ({ item, active, login, cols, icon: iconOverride, prefix, uniformLabels, motion, announcements, columns, shed, numberCols, }: PrRowProps) => React.JSX.Element;
|
|
328
|
+
declare const PrRow: ({ item, active, login, cols, selectionBg, icon: iconOverride, prefix, uniformLabels, motion, announcements, columns, shed, numberCols, }: PrRowProps) => React.JSX.Element;
|
|
322
329
|
|
|
323
330
|
/**
|
|
324
331
|
* One state per thing, from a closed set the strip knows how to draw. The host
|
|
@@ -543,18 +550,20 @@ declare const reposInSections: (sections: Section[]) => string[];
|
|
|
543
550
|
/**
|
|
544
551
|
* The next selectable row in `dir`, or `current` when there is none.
|
|
545
552
|
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
553
|
+
* Both header kinds are STOPS. A repo-header names a thing you can act on —
|
|
554
|
+
* open the checkout, copy every URL under it — and a band header
|
|
555
|
+
* ("» Your move") does now too: `c` copies the whole band. Landing on one
|
|
556
|
+
* used to be a keystroke spent on a row whose every key was inert, which is
|
|
557
|
+
* why `moveCursor` stepped over subgroup-headers; now that the key does
|
|
558
|
+
* something there, skipping it would hide the row that says how many links
|
|
559
|
+
* the key will take.
|
|
551
560
|
*
|
|
552
|
-
* Unconditional in both directions, deliberately. Skipping
|
|
553
|
-
* and landing on it going up would make ↓ then ↑ end somewhere other
|
|
554
|
-
* it started, and an arrow pair that is not its own inverse reads
|
|
555
|
-
* drifting rather than as a shortcut. The cost is one press per
|
|
556
|
-
*
|
|
557
|
-
* anyway, so the press buys orientation as well as position.
|
|
561
|
+
* Unconditional in both directions, deliberately. Skipping a header going
|
|
562
|
+
* down and landing on it going up would make ↓ then ↑ end somewhere other
|
|
563
|
+
* than where it started, and an arrow pair that is not its own inverse reads
|
|
564
|
+
* as the list drifting rather than as a shortcut. The cost is one press per
|
|
565
|
+
* header; each is also the "you have crossed into another group" beat the eye
|
|
566
|
+
* takes anyway, so the press buys orientation as well as position.
|
|
558
567
|
*/
|
|
559
568
|
declare const moveCursor: (items: AnyItem[], current: number, dir: 1 | -1) => number;
|
|
560
569
|
/**
|
package/dist/index.js
CHANGED
|
@@ -950,6 +950,7 @@ var PrRow = ({
|
|
|
950
950
|
active,
|
|
951
951
|
login,
|
|
952
952
|
cols,
|
|
953
|
+
selectionBg,
|
|
953
954
|
icon: iconOverride,
|
|
954
955
|
prefix = "",
|
|
955
956
|
uniformLabels = [],
|
|
@@ -990,68 +991,72 @@ var PrRow = ({
|
|
|
990
991
|
shed,
|
|
991
992
|
numberCols
|
|
992
993
|
});
|
|
993
|
-
return
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
Text3,
|
|
1001
|
-
{
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
{
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
/* @__PURE__ */ jsx(
|
|
1053
|
-
|
|
1054
|
-
|
|
994
|
+
return (
|
|
995
|
+
// The wash paints every cell of the fixed-width row — an Ink Box's
|
|
996
|
+
// background covers its full measure, not just the inked cells.
|
|
997
|
+
/* @__PURE__ */ jsxs(Box, { width: cols, backgroundColor: selectionBg, children: [
|
|
998
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
999
|
+
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: prefix }),
|
|
1000
|
+
/* @__PURE__ */ jsx(Text3, { color, bold: true, children: icon + " " }),
|
|
1001
|
+
/* @__PURE__ */ jsx(Text3, { color: turnColor, bold: turnIcon === "\u2190", children: turnIcon + " " }),
|
|
1002
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.accent, children: numStr }),
|
|
1003
|
+
/* @__PURE__ */ jsx(
|
|
1004
|
+
Text3,
|
|
1005
|
+
{
|
|
1006
|
+
bold: active || motion === "arriving",
|
|
1007
|
+
dimColor: motion === "departing" || motion === "withdrawn",
|
|
1008
|
+
strikethrough: motion === "withdrawn",
|
|
1009
|
+
children: truncate(
|
|
1010
|
+
item.needsYou?.decision ? item.needsYou.decision : item.title,
|
|
1011
|
+
titleMax
|
|
1012
|
+
) + " "
|
|
1013
|
+
}
|
|
1014
|
+
),
|
|
1015
|
+
labelLabel ? /* @__PURE__ */ jsx(Text3, { color: colors.secondary, children: labelLabel + " " }) : null,
|
|
1016
|
+
repoLabel && !givingUp.repo ? /* @__PURE__ */ jsx(Text3, { dimColor: true, children: repoLabel }) : null,
|
|
1017
|
+
showAuthor && !givingUp.author ? /* @__PURE__ */ jsx(Text3, { dimColor: true, italic: true, children: " by " + item.author }) : null,
|
|
1018
|
+
/* @__PURE__ */ jsx(Box, { flexGrow: 1 }),
|
|
1019
|
+
block.threads > 0 && !givingUp.threads ? /* @__PURE__ */ jsx(
|
|
1020
|
+
Box,
|
|
1021
|
+
{
|
|
1022
|
+
marginLeft: 2,
|
|
1023
|
+
width: block.threads,
|
|
1024
|
+
justifyContent: "flex-end",
|
|
1025
|
+
flexShrink: 0,
|
|
1026
|
+
children: unresolvedLabel ? /* @__PURE__ */ jsx(
|
|
1027
|
+
Text3,
|
|
1028
|
+
{
|
|
1029
|
+
bold: !spokeLast,
|
|
1030
|
+
color: spokeLast ? colors.secondary : colors.accent,
|
|
1031
|
+
children: unresolvedLabel
|
|
1032
|
+
}
|
|
1033
|
+
) : null
|
|
1034
|
+
}
|
|
1035
|
+
) : null,
|
|
1036
|
+
block.size > 0 && !givingUp.size ? /* @__PURE__ */ jsx(
|
|
1037
|
+
Box,
|
|
1038
|
+
{
|
|
1039
|
+
marginLeft: 2,
|
|
1040
|
+
width: block.size,
|
|
1041
|
+
justifyContent: "flex-end",
|
|
1042
|
+
flexShrink: 0,
|
|
1043
|
+
children: sizeParts ? /* @__PURE__ */ jsxs(Text3, { children: [
|
|
1044
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.success, children: sizeParts.added }),
|
|
1045
|
+
" ",
|
|
1046
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.error, children: sizeParts.removed })
|
|
1047
|
+
] }) : null
|
|
1048
|
+
}
|
|
1049
|
+
) : null,
|
|
1050
|
+
block.age > 0 && !givingUp.age ? /* @__PURE__ */ jsx(Box, { marginLeft: 2, width: block.age, flexShrink: 0, children: agePair ? /* @__PURE__ */ jsxs(Text3, { children: [
|
|
1051
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.secondary, children: agePair.activity }),
|
|
1052
|
+
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` (${agePair.lifetime})` })
|
|
1053
|
+
] }) : ageLabel2 ? /* @__PURE__ */ jsx(Text3, { color: colors.secondary, children: ageLabel2 }) : null }) : null,
|
|
1054
|
+
backdropped ? null : announcements.map((a) => /* @__PURE__ */ jsxs(React2.Fragment, { children: [
|
|
1055
|
+
/* @__PURE__ */ jsx(Text3, { children: " " }),
|
|
1056
|
+
/* @__PURE__ */ jsx(Pill, { color: a.color, children: a.label })
|
|
1057
|
+
] }, a.label))
|
|
1058
|
+
] })
|
|
1059
|
+
);
|
|
1055
1060
|
};
|
|
1056
1061
|
var stripGlyph = (state) => {
|
|
1057
1062
|
switch (state) {
|
|
@@ -1524,9 +1529,7 @@ var reposInSections = (sections) => [
|
|
|
1524
1529
|
)
|
|
1525
1530
|
].sort();
|
|
1526
1531
|
var moveCursor = (items, current, dir) => {
|
|
1527
|
-
|
|
1528
|
-
while (next >= 0 && next < items.length && items[next].kind === "subgroup-header")
|
|
1529
|
-
next += dir;
|
|
1532
|
+
const next = current + dir;
|
|
1530
1533
|
if (next < 0 || next >= items.length) return current;
|
|
1531
1534
|
return next;
|
|
1532
1535
|
};
|
|
@@ -1602,6 +1605,28 @@ var treeUrls = (items, i) => {
|
|
|
1602
1605
|
}
|
|
1603
1606
|
return urls;
|
|
1604
1607
|
};
|
|
1608
|
+
var bandUrls = (items, i) => {
|
|
1609
|
+
const urls = [];
|
|
1610
|
+
for (let j = i + 1; j < items.length; j += 1) {
|
|
1611
|
+
const item = items[j];
|
|
1612
|
+
if (item.kind === "subgroup-header") break;
|
|
1613
|
+
if (item.kind === "show-more") {
|
|
1614
|
+
for (const child of item.hidden) if (child.url) urls.push(child.url);
|
|
1615
|
+
continue;
|
|
1616
|
+
}
|
|
1617
|
+
const url = item.url;
|
|
1618
|
+
if (url) urls.push(url);
|
|
1619
|
+
}
|
|
1620
|
+
return urls;
|
|
1621
|
+
};
|
|
1622
|
+
var copyUrls = (items, i) => {
|
|
1623
|
+
const item = items[i];
|
|
1624
|
+
if (!item) return [];
|
|
1625
|
+
if (item.kind === "repo-header") return groupUrls(items, i);
|
|
1626
|
+
if (item.kind === "subgroup-header") return bandUrls(items, i);
|
|
1627
|
+
const url = item.url;
|
|
1628
|
+
return url ? [url] : [];
|
|
1629
|
+
};
|
|
1605
1630
|
var gapsAbove = (items, i) => {
|
|
1606
1631
|
const item = items[i];
|
|
1607
1632
|
if (!item || i === 0) return false;
|
|
@@ -1830,6 +1855,11 @@ var COLS = (process.stdout.columns ?? 120) - FRAME_CHROME_COLS;
|
|
|
1830
1855
|
var MODAL_CHROME_COLS = 2 + 1 * 2;
|
|
1831
1856
|
var ROW_MAX_COLS = 140;
|
|
1832
1857
|
var OVERLAY_BG = "#22222e";
|
|
1858
|
+
var SELECTION_BG = "#16161f";
|
|
1859
|
+
var selectionBackground = (active, backdropped) => active && !backdropped ? SELECTION_BG : void 0;
|
|
1860
|
+
var taskKeyStyle = (active) => ({
|
|
1861
|
+
bold: active
|
|
1862
|
+
});
|
|
1833
1863
|
var workCount = (s) => {
|
|
1834
1864
|
let n = 0;
|
|
1835
1865
|
for (let i = 0; i < s.items.length; i++) {
|
|
@@ -2296,12 +2326,14 @@ var FENCE_COLS = 46;
|
|
|
2296
2326
|
var RepoHeaderRow = ({
|
|
2297
2327
|
repo,
|
|
2298
2328
|
gap,
|
|
2299
|
-
active
|
|
2329
|
+
active,
|
|
2330
|
+
cols,
|
|
2331
|
+
selectionBg
|
|
2300
2332
|
}) => {
|
|
2301
2333
|
const label = `\u2500\u2500 ${repo} `;
|
|
2302
2334
|
const fill = Math.max(4, FENCE_COLS - label.length);
|
|
2303
2335
|
const rule = "\u2500".repeat(fill);
|
|
2304
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
|
|
2336
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, width: cols, backgroundColor: selectionBg, children: [
|
|
2305
2337
|
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
2306
2338
|
/* @__PURE__ */ jsx(Text3, { dimColor: !active, children: "\u2500\u2500 " }),
|
|
2307
2339
|
/* @__PURE__ */ jsx(
|
|
@@ -2373,26 +2405,37 @@ var ItemRow = ({
|
|
|
2373
2405
|
numberCols
|
|
2374
2406
|
}) => {
|
|
2375
2407
|
const backdropped = useBackdropped();
|
|
2408
|
+
const selBg = selectionBackground(active, backdropped);
|
|
2376
2409
|
const transient = leaving ? "out" : refreshMark;
|
|
2377
2410
|
const transitFrame = Math.floor(sparkFrame / TRANSIT_FRAME_TICKS);
|
|
2378
2411
|
const rampAt = (len) => rampFrame(len, transitFrame, transitAt);
|
|
2379
2412
|
const farewellLabel = leaving ? TRANSIT_LABEL.out : "";
|
|
2380
2413
|
if (item.kind === "repo-header")
|
|
2381
|
-
return /* @__PURE__ */ jsx(
|
|
2414
|
+
return /* @__PURE__ */ jsx(
|
|
2415
|
+
RepoHeaderRow,
|
|
2416
|
+
{
|
|
2417
|
+
repo: item.repo,
|
|
2418
|
+
gap: gap ?? false,
|
|
2419
|
+
active,
|
|
2420
|
+
cols,
|
|
2421
|
+
selectionBg: selBg
|
|
2422
|
+
}
|
|
2423
|
+
);
|
|
2382
2424
|
if (item.kind === "subgroup-header")
|
|
2383
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
|
|
2384
|
-
/* @__PURE__ */ jsx(Text3, { color: colors.
|
|
2425
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, width: cols, backgroundColor: selBg, children: [
|
|
2426
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
2427
|
+
/* @__PURE__ */ jsx(Text3, { color: colors.accent, bold: true, children: "\xBB " }),
|
|
2385
2428
|
/* @__PURE__ */ jsx(Text3, { bold: true, children: item.label })
|
|
2386
2429
|
] });
|
|
2387
2430
|
if (item.kind === "show-more")
|
|
2388
|
-
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
2431
|
+
return /* @__PURE__ */ jsxs(Box, { width: cols, backgroundColor: selBg, children: [
|
|
2389
2432
|
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
2390
2433
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: prefix }),
|
|
2391
2434
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: active ? "\u21B5 " : " " }),
|
|
2392
2435
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: `+${item.hidden.length} more` })
|
|
2393
2436
|
] });
|
|
2394
2437
|
if (item.kind === "show-less")
|
|
2395
|
-
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
2438
|
+
return /* @__PURE__ */ jsxs(Box, { width: cols, backgroundColor: selBg, children: [
|
|
2396
2439
|
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
2397
2440
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: prefix }),
|
|
2398
2441
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: active ? "\u21B5 " : " " }),
|
|
@@ -2405,13 +2448,13 @@ var ItemRow = ({
|
|
|
2405
2448
|
1,
|
|
2406
2449
|
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) - 12
|
|
2407
2450
|
);
|
|
2408
|
-
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
|
|
2451
|
+
return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, width: cols, backgroundColor: selBg, children: [
|
|
2409
2452
|
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
|
|
2410
2453
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: prefix }),
|
|
2411
2454
|
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: parent ? "\u252C " : " " }),
|
|
2412
2455
|
/* @__PURE__ */ jsx(Text3, { bold: true, color: transient ? TRANSIT_COLOUR[transient] : void 0, children: transitIcon + " " }),
|
|
2413
2456
|
markerCols > 0 ? /* @__PURE__ */ jsx(Text3, { color: item.markerColor, children: (item.marker ?? "").padEnd(markerCols) + " " }) : null,
|
|
2414
|
-
/* @__PURE__ */ jsx(Text3, {
|
|
2457
|
+
/* @__PURE__ */ jsx(Text3, { ...taskKeyStyle(active), children: item.key + " " }),
|
|
2415
2458
|
/* @__PURE__ */ jsx(
|
|
2416
2459
|
Text3,
|
|
2417
2460
|
{
|
|
@@ -2459,6 +2502,7 @@ var ItemRow = ({
|
|
|
2459
2502
|
active,
|
|
2460
2503
|
login,
|
|
2461
2504
|
cols,
|
|
2505
|
+
selectionBg: selBg,
|
|
2462
2506
|
prefix,
|
|
2463
2507
|
uniformLabels,
|
|
2464
2508
|
columns,
|
|
@@ -2879,17 +2923,7 @@ var BrowseScreen = ({
|
|
|
2879
2923
|
s.items.length - 1
|
|
2880
2924
|
);
|
|
2881
2925
|
if (c < 0) return [s.id, 0];
|
|
2882
|
-
return [
|
|
2883
|
-
s.id,
|
|
2884
|
-
// Only `subgroup-header`, which is the one kind the arrows refuse to
|
|
2885
|
-
// stand on — `moveCursor` skips it and nothing else. A REPO header is
|
|
2886
|
-
// selectable on purpose: it opens the repo and `C` copies the group,
|
|
2887
|
-
// and the footer advertises both. Stepping off it here meant that
|
|
2888
|
-
// standing on a repo and pressing `r` moved you onto an issue, every
|
|
2889
|
-
// single time, and the rule predated repo headers being selectable
|
|
2890
|
-
// at all.
|
|
2891
|
-
s.items[c]?.kind === "subgroup-header" ? moveCursor(s.items, c, 1) : c
|
|
2892
|
-
];
|
|
2926
|
+
return [s.id, c];
|
|
2893
2927
|
})
|
|
2894
2928
|
)
|
|
2895
2929
|
);
|
|
@@ -3226,8 +3260,10 @@ var BrowseScreen = ({
|
|
|
3226
3260
|
return;
|
|
3227
3261
|
}
|
|
3228
3262
|
if (input === "c") {
|
|
3229
|
-
|
|
3230
|
-
|
|
3263
|
+
const urls = copyUrls(section.items, cursor);
|
|
3264
|
+
if (urls.length === 0) return;
|
|
3265
|
+
clipboard(urls.join("\n"));
|
|
3266
|
+
showFlash(`\u2713 Copied ${urls.length} link${urls.length === 1 ? "" : "s"}`);
|
|
3231
3267
|
return;
|
|
3232
3268
|
}
|
|
3233
3269
|
if (input === "C" || input === "O") {
|
|
@@ -3246,7 +3282,16 @@ var BrowseScreen = ({
|
|
|
3246
3282
|
}
|
|
3247
3283
|
return;
|
|
3248
3284
|
}
|
|
3249
|
-
if (
|
|
3285
|
+
if (activeItem?.kind === "subgroup-header") {
|
|
3286
|
+
if (input === "c") {
|
|
3287
|
+
const urls = copyUrls(section.items, cursor);
|
|
3288
|
+
if (urls.length === 0) return;
|
|
3289
|
+
clipboard(urls.join("\n"));
|
|
3290
|
+
showFlash(`\u2713 Copied ${urls.length} link${urls.length === 1 ? "" : "s"}`);
|
|
3291
|
+
}
|
|
3292
|
+
return;
|
|
3293
|
+
}
|
|
3294
|
+
if (!activeItem) return;
|
|
3250
3295
|
if (key.return && activeItem.kind === "show-more") {
|
|
3251
3296
|
setLocalSections(
|
|
3252
3297
|
(prev) => prev.map((s) => ({
|
|
@@ -3438,6 +3483,11 @@ var BrowseScreen = ({
|
|
|
3438
3483
|
menu.open(actions);
|
|
3439
3484
|
}
|
|
3440
3485
|
});
|
|
3486
|
+
const headerLinks = activeItem?.kind === "repo-header" || activeItem?.kind === "subgroup-header" ? copyUrls(section.items, cursor).length : 0;
|
|
3487
|
+
const headerHint = [
|
|
3488
|
+
"c",
|
|
3489
|
+
`copy ${headerLinks} link${headerLinks === 1 ? "" : "s"}`
|
|
3490
|
+
];
|
|
3441
3491
|
const hints = railActive ? (
|
|
3442
3492
|
// The rail's own keymap while it holds focus, not the list's with a line
|
|
3443
3493
|
// bolted on. A footer advertising `m actions` beside a cursor that cannot
|
|
@@ -3457,7 +3507,13 @@ var BrowseScreen = ({
|
|
|
3457
3507
|
["\u2190\u2192", "tab"],
|
|
3458
3508
|
["\u21B5", "open repo"],
|
|
3459
3509
|
["o", "browser"],
|
|
3460
|
-
|
|
3510
|
+
headerHint,
|
|
3511
|
+
["?", "help"],
|
|
3512
|
+
["q", "quit"]
|
|
3513
|
+
] : activeItem?.kind === "subgroup-header" ? [
|
|
3514
|
+
["\u2191\u2193", "nav"],
|
|
3515
|
+
["\u2190\u2192", "tab"],
|
|
3516
|
+
headerHint,
|
|
3461
3517
|
["?", "help"],
|
|
3462
3518
|
["q", "quit"]
|
|
3463
3519
|
] : [
|
|
@@ -3695,7 +3751,7 @@ var BrowseScreen = ({
|
|
|
3695
3751
|
prefix: treePrefix(section.items, viewStart + i),
|
|
3696
3752
|
parent: item.kind === "task" && depthOf(section.items[viewStart + i + 1]) > depthOf(item),
|
|
3697
3753
|
sparkFrame,
|
|
3698
|
-
cols: item.kind === "pr" || item.kind === "issue" ? rowCols : listCols,
|
|
3754
|
+
cols: item.kind === "pr" || item.kind === "issue" || item.kind === "repo-header" || item.kind === "subgroup-header" || item.kind === "task" || item.kind === "show-more" || item.kind === "show-less" ? rowCols : listCols,
|
|
3699
3755
|
markerCols,
|
|
3700
3756
|
uniformLabels,
|
|
3701
3757
|
columns: trailingColumns,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.1",
|
|
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",
|