@kud/gh-ink 0.8.1 → 0.9.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.
Files changed (2) hide show
  1. package/dist/index.js +152 -157
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import React2, { useState, useRef, useEffect } from 'react';
1
+ import React2, { createContext, useState, useRef, useEffect, useContext } from 'react';
2
2
  import { useWindowSize, useInput, Text, Box } from 'ink';
3
3
  import { colors, ScrollView, TextInput, LoadingScreen, Switch, useListCursor, Tabs, FooterHints } from '@kud/ink-ui';
4
4
  import { isPassCheck, isFailCheck, resolveThread, unresolveThread, replyToThread, rerunFailedRun, mergePr, reRequestReviewer } from '@kud/gh';
@@ -1066,6 +1066,27 @@ var FRAME_PAD_X = 1;
1066
1066
  var FRAME_CHROME_COLS = 2 + FRAME_PAD_X * 2;
1067
1067
  var COLS = (process.stdout.columns ?? 120) - FRAME_CHROME_COLS;
1068
1068
  var MODAL_CHROME_COLS = 2 + 1 * 2;
1069
+ var OVERLAY_BG = "#22222e";
1070
+ var DimContext = createContext(false);
1071
+ var Text2 = ({ children, ...props }) => {
1072
+ const dimmed = useContext(DimContext);
1073
+ return dimmed ? /* @__PURE__ */ jsx(Text, { ...props, bold: false, dimColor: true, children }) : /* @__PURE__ */ jsx(Text, { ...props, children });
1074
+ };
1075
+ var Backdrop = ({
1076
+ dimmed,
1077
+ absolute,
1078
+ height,
1079
+ children
1080
+ }) => /* @__PURE__ */ jsx(DimContext.Provider, { value: dimmed, children: absolute ? /* @__PURE__ */ jsx(
1081
+ Box,
1082
+ {
1083
+ position: "absolute",
1084
+ flexDirection: "column",
1085
+ width: "100%",
1086
+ height,
1087
+ children
1088
+ }
1089
+ ) : children });
1069
1090
  var topLevelCount = (s) => s.items.filter(
1070
1091
  (i) => i.kind !== "repo-header" && i.kind !== "subgroup-header" && !i.indent
1071
1092
  ).length;
@@ -1357,16 +1378,16 @@ var InboxHeader = ({
1357
1378
  COLS - brand.length - countSeg.length - userSeg.length - workLabel.length - statusSeg.length
1358
1379
  );
1359
1380
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
1360
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", bold: true, children: brand }),
1361
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: countSeg }),
1362
- userSeg ? /* @__PURE__ */ jsx(Text, { children: userSeg }) : null,
1381
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", bold: true, children: brand }),
1382
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: countSeg }),
1383
+ userSeg ? /* @__PURE__ */ jsx(Text2, { children: userSeg }) : null,
1363
1384
  work !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1364
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " w " }),
1385
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " w " }),
1365
1386
  /* @__PURE__ */ jsx(Switch, { left: "work", right: "home", value: work ? "left" : "right" }),
1366
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " })
1387
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " })
1367
1388
  ] }) : null,
1368
1389
  statusText ? /* @__PURE__ */ jsx(
1369
- Text,
1390
+ Text2,
1370
1391
  {
1371
1392
  color: statusColor,
1372
1393
  dimColor: !statusColor,
@@ -1374,7 +1395,7 @@ var InboxHeader = ({
1374
1395
  children: statusSeg
1375
1396
  }
1376
1397
  ) : null,
1377
- /* @__PURE__ */ jsx(Text, { color: "cyan", dimColor: true, children: "\u254C".repeat(fill) })
1398
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", dimColor: true, children: "\u254C".repeat(fill) })
1378
1399
  ] });
1379
1400
  };
1380
1401
  var toCiStatusState = (status) => status ? { kind: "ready", status } : { kind: "error" };
@@ -1397,30 +1418,30 @@ var CiStatusLine = ({
1397
1418
  const name = job ?? "ci";
1398
1419
  if (state.kind === "loading")
1399
1420
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
1400
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \xB7 " }),
1401
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: `${name} loading\u2026` })
1421
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " \xB7 " }),
1422
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: `${name} loading\u2026` })
1402
1423
  ] });
1403
1424
  if (state.kind === "error")
1404
1425
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
1405
- /* @__PURE__ */ jsx(Text, { color: "red", bold: true, children: " \u2717 " }),
1406
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: `${name} no build / not configured` })
1426
+ /* @__PURE__ */ jsx(Text2, { color: "red", bold: true, children: " \u2717 " }),
1427
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: `${name} no build / not configured` })
1407
1428
  ] });
1408
1429
  const { status } = state;
1409
1430
  const [, color] = jenkinsResultDisplay(status.result, status.building);
1410
1431
  const label = status.building ? "BUILDING" : status.result;
1411
1432
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
1412
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " }),
1413
- /* @__PURE__ */ jsx(Text, { color, bold: true, children: "\u25CF " }),
1414
- /* @__PURE__ */ jsx(Text, { bold: true, children: status.job }),
1415
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " + label }),
1416
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", children: " #" + status.buildNumber }),
1417
- status.age ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " + status.age }) : null
1433
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " }),
1434
+ /* @__PURE__ */ jsx(Text2, { color, bold: true, children: "\u25CF " }),
1435
+ /* @__PURE__ */ jsx(Text2, { bold: true, children: status.job }),
1436
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + label }),
1437
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", children: " #" + status.buildNumber }),
1438
+ status.age ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + status.age }) : null
1418
1439
  ] });
1419
1440
  };
1420
1441
  var RepoHeaderRow = ({ repo, gap }) => {
1421
1442
  const label = `\u2500\u2500 ${repo} `;
1422
1443
  const fill = Math.max(4, 46 - label.length);
1423
- return /* @__PURE__ */ jsx(Box, { marginTop: gap ? 1 : 0, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " + label + "\u2500".repeat(fill) }) });
1444
+ return /* @__PURE__ */ jsx(Box, { marginTop: gap ? 1 : 0, children: /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + label + "\u2500".repeat(fill) }) });
1424
1445
  };
1425
1446
  var ItemRow = ({
1426
1447
  item,
@@ -1432,29 +1453,29 @@ var ItemRow = ({
1432
1453
  return /* @__PURE__ */ jsx(RepoHeaderRow, { repo: item.repo, gap: gap ?? false });
1433
1454
  if (item.kind === "subgroup-header")
1434
1455
  return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
1435
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", bold: true, children: " \xBB " }),
1436
- /* @__PURE__ */ jsx(Text, { bold: true, children: item.label })
1456
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", bold: true, children: " \xBB " }),
1457
+ /* @__PURE__ */ jsx(Text2, { bold: true, children: item.label })
1437
1458
  ] });
1438
1459
  if (item.kind === "show-more")
1439
1460
  return /* @__PURE__ */ jsxs(Box, { children: [
1440
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
1441
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2514\u2500 " }),
1442
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: active ? "\u21B5 " : " " }),
1443
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: `+${item.hidden.length} more` })
1461
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
1462
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2514\u2500 " }),
1463
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: active ? "\u21B5 " : " " }),
1464
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: `+${item.hidden.length} more` })
1444
1465
  ] });
1445
1466
  if (item.kind === "show-less")
1446
1467
  return /* @__PURE__ */ jsxs(Box, { children: [
1447
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
1448
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2514\u2500 " }),
1449
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: active ? "\u21B5 " : " " }),
1450
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "show less" })
1468
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
1469
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2514\u2500 " }),
1470
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: active ? "\u21B5 " : " " }),
1471
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "show less" })
1451
1472
  ] });
1452
1473
  if (item.kind === "jira") {
1453
1474
  const titleMax2 = Math.max(20, COLS - item.key.length - 10);
1454
1475
  return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
1455
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
1456
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", bold: active, children: item.key + " " }),
1457
- /* @__PURE__ */ jsx(Text, { bold: active, children: truncate(item.summary, titleMax2) })
1476
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
1477
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", bold: active, children: item.key + " " }),
1478
+ /* @__PURE__ */ jsx(Text2, { bold: active, children: truncate(item.summary, titleMax2) })
1458
1479
  ] });
1459
1480
  }
1460
1481
  const { glyph: icon, color } = healthDisplay[item.health];
@@ -1471,16 +1492,16 @@ var ItemRow = ({
1471
1492
  const fixedWidth = 2 + (item.indent ? 3 : 0) + 2 + 2 + 7 + repoLabel.length + suffix.length + 6;
1472
1493
  const titleMax = Math.max(20, COLS - fixedWidth);
1473
1494
  return /* @__PURE__ */ jsxs(Box, { children: [
1474
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
1475
- item.indent ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2514\u2500 " }) : null,
1476
- /* @__PURE__ */ jsx(Text, { color, bold: true, children: icon + " " }),
1477
- /* @__PURE__ */ jsx(Text, { color: turnColor, bold: turnIcon === "\u2190", children: turnIcon + " " }),
1478
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", children: numStr }),
1479
- /* @__PURE__ */ jsx(Text, { bold: active, children: truncate(item.title, titleMax) + " " }),
1480
- repoLabel ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: repoLabel }) : null,
1481
- unresolvedLabel ? /* @__PURE__ */ jsx(Text, { bold: true, color: "#FF8700", children: " " + unresolvedLabel }) : null,
1482
- showAuthor ? /* @__PURE__ */ jsx(Text, { dimColor: true, italic: true, children: " by " + item.author }) : null,
1483
- item.age ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " + item.age }) : null
1495
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
1496
+ item.indent ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2514\u2500 " }) : null,
1497
+ /* @__PURE__ */ jsx(Text2, { color, bold: true, children: icon + " " }),
1498
+ /* @__PURE__ */ jsx(Text2, { color: turnColor, bold: turnIcon === "\u2190", children: turnIcon + " " }),
1499
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", children: numStr }),
1500
+ /* @__PURE__ */ jsx(Text2, { bold: active, children: truncate(item.title, titleMax) + " " }),
1501
+ repoLabel ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: repoLabel }) : null,
1502
+ unresolvedLabel ? /* @__PURE__ */ jsx(Text2, { bold: true, color: "#FF8700", children: " " + unresolvedLabel }) : null,
1503
+ showAuthor ? /* @__PURE__ */ jsx(Text2, { dimColor: true, italic: true, children: " by " + item.author }) : null,
1504
+ item.age ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + item.age }) : null
1484
1505
  ] });
1485
1506
  };
1486
1507
  var useActionMenu = () => {
@@ -1522,18 +1543,19 @@ var ActionMenu = ({
1522
1543
  flexDirection: "column",
1523
1544
  borderStyle: "round",
1524
1545
  borderColor: "cyan",
1546
+ backgroundColor: OVERLAY_BG,
1525
1547
  paddingX: 1,
1526
1548
  marginTop: 1,
1527
1549
  children: [
1528
- /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: title }),
1529
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2500".repeat(32) }),
1550
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", bold: true, children: title }),
1551
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2500".repeat(32) }),
1530
1552
  actions.map((a, i) => /* @__PURE__ */ jsxs(Box, { children: [
1531
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: i === cursor ? "\u276F " : " " }),
1532
- /* @__PURE__ */ jsx(Text, { bold: i === cursor, children: a.label }),
1533
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " " + a.hint })
1553
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: i === cursor ? "\u276F " : " " }),
1554
+ /* @__PURE__ */ jsx(Text2, { bold: i === cursor, children: a.label }),
1555
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " " + a.hint })
1534
1556
  ] }, a.label)),
1535
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2500".repeat(32) }),
1536
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2191\u2193 navigate \u21B5 confirm esc cancel" })
1557
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2500".repeat(32) }),
1558
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2191\u2193 navigate \u21B5 confirm esc cancel" })
1537
1559
  ]
1538
1560
  }
1539
1561
  );
@@ -1570,10 +1592,10 @@ var LegendGroup = ({
1570
1592
  flexDirection: "column",
1571
1593
  marginTop: index === 0 ? 0 : 1,
1572
1594
  children: [
1573
- /* @__PURE__ */ jsx(Text, { bold: true, dimColor: true, children: col.title }),
1595
+ /* @__PURE__ */ jsx(Text2, { bold: true, dimColor: true, children: col.title }),
1574
1596
  col.rows.map((row) => /* @__PURE__ */ jsxs(Box, { children: [
1575
- /* @__PURE__ */ jsx(Text, { color: row.color, bold: row.bold, children: row.cell.padEnd(cellWidth) }),
1576
- /* @__PURE__ */ jsx(Text, { wrap: "truncate-end", children: row.label })
1597
+ /* @__PURE__ */ jsx(Text2, { color: row.color, bold: row.bold, children: row.cell.padEnd(cellWidth) }),
1598
+ /* @__PURE__ */ jsx(Text2, { wrap: "truncate-end", children: row.label })
1577
1599
  ] }, col.title + row.cell + row.label))
1578
1600
  ]
1579
1601
  },
@@ -1661,10 +1683,11 @@ var HelpModal = ({
1661
1683
  flexDirection: "column",
1662
1684
  borderStyle: "round",
1663
1685
  borderColor: "cyan",
1686
+ backgroundColor: OVERLAY_BG,
1664
1687
  paddingX: 1,
1665
1688
  width: contentWidth + MODAL_CHROME_COLS,
1666
1689
  children: [
1667
- /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: "Legend" }),
1690
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", bold: true, children: "Legend" }),
1668
1691
  /* @__PURE__ */ jsx(Box, { marginTop: 1, width: contentWidth, children: groups.map((group, index) => /* @__PURE__ */ jsx(
1669
1692
  LegendGroup,
1670
1693
  {
@@ -1674,8 +1697,8 @@ var HelpModal = ({
1674
1697
  },
1675
1698
  group[0]?.title ?? index
1676
1699
  )) }),
1677
- tabHelp ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: "Each item lands in the FIRST tab that claims it, so counts are residuals rather than totals." }) : null,
1678
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "esc \xB7 ? close" })
1700
+ tabHelp ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "Each item lands in the FIRST tab that claims it, so counts are residuals rather than totals." }) : null,
1701
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "esc \xB7 ? close" })
1679
1702
  ]
1680
1703
  }
1681
1704
  );
@@ -1686,16 +1709,17 @@ var ExplainModal = ({ item, login }) => /* @__PURE__ */ jsxs(
1686
1709
  flexDirection: "column",
1687
1710
  borderStyle: "round",
1688
1711
  borderColor: "cyan",
1712
+ backgroundColor: OVERLAY_BG,
1689
1713
  paddingX: 1,
1690
1714
  width: Math.min(COLS, 78),
1691
1715
  children: [
1692
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", bold: true, children: `#${item.number} \xB7 ${item.repo}` }),
1693
- /* @__PURE__ */ jsx(Text, { children: item.title }),
1716
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", bold: true, children: `#${item.number} \xB7 ${item.repo}` }),
1717
+ /* @__PURE__ */ jsx(Text2, { children: item.title }),
1694
1718
  explainItem(item, login).map((section) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
1695
- /* @__PURE__ */ jsx(Text, { bold: true, dimColor: true, children: section.heading }),
1696
- section.lines.map((line, i) => /* @__PURE__ */ jsx(Text, { children: " " + line }, i))
1719
+ /* @__PURE__ */ jsx(Text2, { bold: true, dimColor: true, children: section.heading }),
1720
+ section.lines.map((line, i) => /* @__PURE__ */ jsx(Text2, { children: " " + line }, i))
1697
1721
  ] }, section.heading)),
1698
- /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: "esc \xB7 e close" }) })
1722
+ /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "esc \xB7 e close" }) })
1699
1723
  ]
1700
1724
  }
1701
1725
  );
@@ -1717,24 +1741,25 @@ var RepoPicker = ({
1717
1741
  flexDirection: "column",
1718
1742
  borderStyle: "round",
1719
1743
  borderColor: "cyan",
1744
+ backgroundColor: OVERLAY_BG,
1720
1745
  paddingX: 1,
1721
1746
  minWidth: 42,
1722
1747
  children: [
1723
- /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: `Filter by repo (${selected.size} on)` }),
1724
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2500".repeat(36) }),
1748
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", bold: true, children: `Filter by repo (${selected.size} on)` }),
1749
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2500".repeat(36) }),
1725
1750
  visible.map((repo, i) => {
1726
1751
  const idx = start + i;
1727
1752
  const on = selected.has(repo);
1728
1753
  const active = idx === cursor;
1729
1754
  return /* @__PURE__ */ jsxs(Box, { children: [
1730
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: active ? "\u276F " : " " }),
1731
- /* @__PURE__ */ jsx(Text, { color: on ? "green" : void 0, children: on ? "\u25C9 " : "\u25CB " }),
1732
- /* @__PURE__ */ jsx(Text, { bold: active, children: repo })
1755
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
1756
+ /* @__PURE__ */ jsx(Text2, { color: on ? "green" : void 0, children: on ? "\u25C9 " : "\u25CB " }),
1757
+ /* @__PURE__ */ jsx(Text2, { bold: active, children: repo })
1733
1758
  ] }, repo);
1734
1759
  }),
1735
- repos.length > budget ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` \u2026 ${repos.length} repos total` }) : null,
1736
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2500".repeat(36) }),
1737
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "space toggle \xB7 a clear all \xB7 \u21B5/esc done" })
1760
+ repos.length > budget ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: ` \u2026 ${repos.length} repos total` }) : null,
1761
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "\u2500".repeat(36) }),
1762
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: "space toggle \xB7 a clear all \xB7 \u21B5/esc done" })
1738
1763
  ]
1739
1764
  }
1740
1765
  );
@@ -2146,6 +2171,22 @@ var BrowseScreen = ({
2146
2171
  (i) => i.kind !== "repo-header" && i.kind !== "subgroup-header"
2147
2172
  ).length;
2148
2173
  if (hidden) return null;
2174
+ const overlay = help ? /* @__PURE__ */ jsx(
2175
+ HelpModal,
2176
+ {
2177
+ workToggle,
2178
+ extensions,
2179
+ hasJira: !!jiraBase,
2180
+ tabHelp
2181
+ }
2182
+ ) : explain && activeItem && (activeItem.kind === "pr" || activeItem.kind === "issue") ? /* @__PURE__ */ jsx(ExplainModal, { item: activeItem, login }) : repoPicker ? /* @__PURE__ */ jsx(
2183
+ RepoPicker,
2184
+ {
2185
+ repos: allRepos,
2186
+ selected: repoFilter,
2187
+ cursor: Math.min(repoCursor, Math.max(0, allRepos.length - 1))
2188
+ }
2189
+ ) : menu.actions && activeItem && activeItem.kind !== "repo-header" ? /* @__PURE__ */ jsx(ActionMenu, { item: activeItem, actions: menu.actions, cursor: menu.cursor }) : null;
2149
2190
  return /* @__PURE__ */ jsxs(
2150
2191
  Box,
2151
2192
  {
@@ -2181,106 +2222,60 @@ var BrowseScreen = ({
2181
2222
  }
2182
2223
  ) }),
2183
2224
  search != null ? /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
2184
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: " / " }),
2185
- /* @__PURE__ */ jsx(Text, { children: search }),
2186
- searchInput ? /* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u258F" }) : null,
2225
+ /* @__PURE__ */ jsx(Text2, { color: "cyan", children: " / " }),
2226
+ /* @__PURE__ */ jsx(Text2, { children: search }),
2227
+ searchInput ? /* @__PURE__ */ jsx(Text2, { color: "cyan", children: "\u258F" }) : null,
2187
2228
  /* @__PURE__ */ jsx(
2188
- Text,
2229
+ Text2,
2189
2230
  {
2190
2231
  dimColor: true,
2191
2232
  children: ` ${matchCount} match${matchCount !== 1 ? "es" : ""}${searchInput ? " \u21B5 accept \xB7 esc clear" : " esc clear"}`
2192
2233
  }
2193
2234
  )
2194
2235
  ] }) : repoFilter.size > 0 ? /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
2195
- /* @__PURE__ */ jsx(Text, { color: "#FF8700", children: " \u25C9 " }),
2196
- /* @__PURE__ */ jsx(Text, { children: `${repoFilter.size} repo${repoFilter.size !== 1 ? "s" : ""}` }),
2197
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: " f edit \xB7 esc clear" })
2236
+ /* @__PURE__ */ jsx(Text2, { color: "#FF8700", children: " \u25C9 " }),
2237
+ /* @__PURE__ */ jsx(Text2, { children: `${repoFilter.size} repo${repoFilter.size !== 1 ? "s" : ""}` }),
2238
+ /* @__PURE__ */ jsx(Text2, { dimColor: true, children: " f edit \xB7 esc clear" })
2198
2239
  ] }) : null,
2199
- help ? /* @__PURE__ */ jsx(
2200
- Box,
2201
- {
2202
- minHeight: listHeight,
2203
- flexDirection: "column",
2204
- justifyContent: "center",
2205
- alignItems: "center",
2206
- children: /* @__PURE__ */ jsx(
2207
- HelpModal,
2208
- {
2209
- workToggle,
2210
- extensions,
2211
- hasJira: !!jiraBase,
2212
- tabHelp
2213
- }
2214
- )
2215
- }
2216
- ) : explain && activeItem && (activeItem.kind === "pr" || activeItem.kind === "issue") ? /* @__PURE__ */ jsx(
2217
- Box,
2218
- {
2219
- minHeight: listHeight,
2220
- flexDirection: "column",
2221
- justifyContent: "center",
2222
- alignItems: "center",
2223
- children: /* @__PURE__ */ jsx(ExplainModal, { item: activeItem, login })
2224
- }
2225
- ) : repoPicker ? /* @__PURE__ */ jsx(
2226
- Box,
2227
- {
2228
- minHeight: listHeight,
2229
- flexDirection: "column",
2230
- justifyContent: "center",
2231
- alignItems: "center",
2232
- children: /* @__PURE__ */ jsx(
2233
- RepoPicker,
2234
- {
2235
- repos: allRepos,
2236
- selected: repoFilter,
2237
- cursor: Math.min(repoCursor, Math.max(0, allRepos.length - 1))
2238
- }
2239
- )
2240
- }
2241
- ) : menu.actions && activeItem && activeItem.kind !== "repo-header" ? /* @__PURE__ */ jsx(
2242
- Box,
2243
- {
2244
- minHeight: listHeight,
2245
- flexDirection: "column",
2246
- justifyContent: "center",
2247
- alignItems: "center",
2248
- children: /* @__PURE__ */ jsx(
2249
- ActionMenu,
2240
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", minHeight: listHeight, children: [
2241
+ /* @__PURE__ */ jsxs(Backdrop, { dimmed: !!overlay, absolute: !!overlay, height: listHeight, children: [
2242
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", flexGrow: 1, children: visibleItems.map((item, i) => /* @__PURE__ */ jsx(
2243
+ ItemRow,
2250
2244
  {
2251
- item: activeItem,
2252
- actions: menu.actions,
2253
- cursor: menu.cursor
2254
- }
2255
- )
2256
- }
2257
- ) : /* @__PURE__ */ jsxs(Box, { flexDirection: "column", minHeight: listHeight, children: [
2258
- /* @__PURE__ */ jsx(Box, { flexDirection: "column", flexGrow: 1, children: visibleItems.map((item, i) => /* @__PURE__ */ jsx(
2259
- ItemRow,
2245
+ item,
2246
+ active: viewStart + i === cursor,
2247
+ login,
2248
+ gap: viewStart + i > 0 && (item.kind === "repo-header" || item.kind === "subgroup-header" || // A header is always followed by a blank line before its
2249
+ // first child — in Other PRs that's "free" because the
2250
+ // child is itself a repo-header (gap above). A jira row
2251
+ // has no such stand-in, so it needs this explicitly. Never
2252
+ // applies between two tickets/PRs only right after a
2253
+ // header.
2254
+ item.kind === "jira" && ["repo-header", "subgroup-header"].includes(
2255
+ section.items[viewStart + i - 1]?.kind
2256
+ ))
2257
+ },
2258
+ `${viewStart + i}:${item.kind === "jira" ? item.instanceKey ?? item.key : item.kind === "repo-header" ? `header:${item.repo}` : item.kind === "subgroup-header" ? `subgroup:${item.label}` : item.kind === "show-more" ? `show-more:${item.hidden[0]?.repo ?? i}` : item.kind === "show-less" ? `show-less:${item.toHide[0]?.repo ?? i}` : `${item.repo}/${item.number}`}`
2259
+ )) }),
2260
+ hasMore && /* @__PURE__ */ jsxs(Text2, { dimColor: true, children: [
2261
+ " ",
2262
+ "\u2193 ",
2263
+ section.items.length - viewStart - visibleCount,
2264
+ " more"
2265
+ ] })
2266
+ ] }),
2267
+ overlay ? /* @__PURE__ */ jsx(
2268
+ Box,
2260
2269
  {
2261
- item,
2262
- active: viewStart + i === cursor,
2263
- login,
2264
- gap: viewStart + i > 0 && (item.kind === "repo-header" || item.kind === "subgroup-header" || // A header is always followed by a blank line before its
2265
- // first child — in Other PRs that's "free" because the
2266
- // child is itself a repo-header (gap above). A jira row
2267
- // has no such stand-in, so it needs this explicitly. Never
2268
- // applies between two tickets/PRs — only right after a
2269
- // header.
2270
- item.kind === "jira" && ["repo-header", "subgroup-header"].includes(
2271
- section.items[viewStart + i - 1]?.kind
2272
- ))
2273
- },
2274
- `${viewStart + i}:${item.kind === "jira" ? item.instanceKey ?? item.key : item.kind === "repo-header" ? `header:${item.repo}` : item.kind === "subgroup-header" ? `subgroup:${item.label}` : item.kind === "show-more" ? `show-more:${item.hidden[0]?.repo ?? i}` : item.kind === "show-less" ? `show-less:${item.toHide[0]?.repo ?? i}` : `${item.repo}/${item.number}`}`
2275
- )) }),
2276
- hasMore && /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
2277
- " ",
2278
- "\u2193 ",
2279
- section.items.length - viewStart - visibleCount,
2280
- " more"
2281
- ] })
2270
+ flexGrow: 1,
2271
+ flexDirection: "column",
2272
+ justifyContent: "center",
2273
+ alignItems: "center",
2274
+ children: overlay
2275
+ }
2276
+ ) : null
2282
2277
  ] }),
2283
- /* @__PURE__ */ jsx(Box, { marginTop: 1, children: flash ? /* @__PURE__ */ jsx(Text, { color: "green", children: flash }) : /* @__PURE__ */ jsx(FooterHints, { hints }) })
2278
+ /* @__PURE__ */ jsx(Box, { marginTop: 1, children: flash ? /* @__PURE__ */ jsx(Text2, { color: "green", children: flash }) : /* @__PURE__ */ jsx(FooterHints, { hints }) })
2284
2279
  ]
2285
2280
  }
2286
2281
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.8.1",
3
+ "version": "0.9.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",