@kud/gh-ink 0.61.1 → 0.61.3
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 +14 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -475,9 +475,11 @@ var HealthPanel = ({
|
|
|
475
475
|
const safeCursor = Math.min(cursor, Math.max(0, focusCount - 1));
|
|
476
476
|
const selected = safeCursor < checks.length ? checks[safeCursor] : void 0;
|
|
477
477
|
const selectedReviewer = safeCursor >= checks.length ? reviewers[safeCursor - checks.length] : void 0;
|
|
478
|
+
const noteTimer = useRef(null);
|
|
478
479
|
const flash = (msg) => {
|
|
479
480
|
setNote(msg);
|
|
480
|
-
|
|
481
|
+
if (noteTimer.current) clearTimeout(noteTimer.current);
|
|
482
|
+
noteTimer.current = setTimeout(() => setNote(null), 1500);
|
|
481
483
|
};
|
|
482
484
|
const act = async (msg, run, onSuccess) => {
|
|
483
485
|
setBusy(true);
|
|
@@ -2189,7 +2191,7 @@ var RepoHeaderRow = ({
|
|
|
2189
2191
|
/* @__PURE__ */ jsx(Text3, { dimColor: !active, children: " " + rule })
|
|
2190
2192
|
] });
|
|
2191
2193
|
};
|
|
2192
|
-
var MERGED_HOLD_MS =
|
|
2194
|
+
var MERGED_HOLD_MS = 2400;
|
|
2193
2195
|
var MERGED_FRAME_MS = 150;
|
|
2194
2196
|
var MERGED_FRAMES = ["\u2726", "\u2727", "\u2736", "\u2727"];
|
|
2195
2197
|
var MERGED_COLOUR = "#A371F7";
|
|
@@ -2223,7 +2225,7 @@ var TRANSIT_LABEL = {
|
|
|
2223
2225
|
out: "gone"};
|
|
2224
2226
|
var isDeparture = (t) => t === "out" || t === "moved-out";
|
|
2225
2227
|
var isArrival = (t) => t === "in" || t === "moved-in";
|
|
2226
|
-
var LEAVING_HOLD_MS =
|
|
2228
|
+
var LEAVING_HOLD_MS = 1500;
|
|
2227
2229
|
var tabMarker = (marked, id, frame = 0) => marked.has(id) ? `${TAB_PULSE[frame % TAB_PULSE.length]} ` : " ";
|
|
2228
2230
|
var TAB_PULSE = ["\xB7", "\u25CB", "\u25CE", "\u25C9", "\u25CE", "\u25CB"];
|
|
2229
2231
|
var ItemRow = ({
|
|
@@ -2722,10 +2724,6 @@ var BrowseScreen = ({
|
|
|
2722
2724
|
// rows, so the tree never grows taller than the terminal inside the frame.
|
|
2723
2725
|
rows - 10 - (filterActive ? 2 : 0) - (reserveCiRow ? 2 : 0) - (reserveStripRow ? 2 : 0)
|
|
2724
2726
|
);
|
|
2725
|
-
useEffect(() => {
|
|
2726
|
-
setCursors((p) => ({ ...p, [activeId]: 0 }));
|
|
2727
|
-
setViewStarts((p) => ({ ...p, [activeId]: 0 }));
|
|
2728
|
-
}, [search]);
|
|
2729
2727
|
useEffect(() => {
|
|
2730
2728
|
setLocalSections(applyWork(sections));
|
|
2731
2729
|
}, [sections]);
|
|
@@ -2780,6 +2778,10 @@ var BrowseScreen = ({
|
|
|
2780
2778
|
const searched = search != null ? filterBySearch([rawSection], search, login) : [rawSection];
|
|
2781
2779
|
const filtered = repoFilter.size > 0 ? filterByRepos(searched, repoFilter, login) : searched;
|
|
2782
2780
|
const section = filterActive ? { ...rawSection, items: filtered[0]?.items ?? [] } : rawSection;
|
|
2781
|
+
useEffect(() => {
|
|
2782
|
+
setCursors((p) => ({ ...p, [activeId]: firstSelectable(section) }));
|
|
2783
|
+
setViewStarts((p) => ({ ...p, [activeId]: 0 }));
|
|
2784
|
+
}, [search]);
|
|
2783
2785
|
const allRepos = reposInSections(localSections);
|
|
2784
2786
|
const { cursor: repoCursor, setCursor: setRepoCursor } = useListCursor(
|
|
2785
2787
|
allRepos.length,
|
|
@@ -2801,9 +2803,11 @@ var BrowseScreen = ({
|
|
|
2801
2803
|
) : [];
|
|
2802
2804
|
const hasMore = viewStart + visibleCount < section.items.length;
|
|
2803
2805
|
const activeItem = section.items[cursor];
|
|
2806
|
+
const flashTimer = useRef(null);
|
|
2804
2807
|
const showFlash = (msg) => {
|
|
2805
2808
|
setFlash(msg);
|
|
2806
|
-
|
|
2809
|
+
if (flashTimer.current) clearTimeout(flashTimer.current);
|
|
2810
|
+
flashTimer.current = setTimeout(() => setFlash(null), 1500);
|
|
2807
2811
|
};
|
|
2808
2812
|
const markedTabs = useMemo(() => {
|
|
2809
2813
|
const out = /* @__PURE__ */ new Set();
|
|
@@ -2972,7 +2976,7 @@ var BrowseScreen = ({
|
|
|
2972
2976
|
}
|
|
2973
2977
|
return;
|
|
2974
2978
|
}
|
|
2975
|
-
if (searchInput) {
|
|
2979
|
+
if (searchInput && !key.upArrow && !key.downArrow) {
|
|
2976
2980
|
if (key.return) return setSearchInput(false);
|
|
2977
2981
|
if (key.escape) {
|
|
2978
2982
|
setSearch(null);
|
|
@@ -3516,7 +3520,7 @@ var BrowseScreen = ({
|
|
|
3516
3520
|
/* @__PURE__ */ jsx(Text3, { color: colors.info, children: " / " }),
|
|
3517
3521
|
/* @__PURE__ */ jsx(Text3, { children: search }),
|
|
3518
3522
|
searchInput ? /* @__PURE__ */ jsx(Text3, { color: colors.info, children: "\u258F" }) : null,
|
|
3519
|
-
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` ${matchCount} match${matchCount !== 1 ? "es" : ""}${searchInput ? " \u21B5 accept \xB7 esc clear" : " esc clear"}` })
|
|
3523
|
+
/* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` ${matchCount} match${matchCount !== 1 ? "es" : ""}${searchInput ? " \u2191\u2193 move \xB7 \u21B5 accept \xB7 esc clear" : " esc clear"}` })
|
|
3520
3524
|
] }) : repoFilter.size > 0 ? /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
|
|
3521
3525
|
/* @__PURE__ */ jsx(Text3, { color: colors.accent, children: " \u25C9 " }),
|
|
3522
3526
|
/* @__PURE__ */ jsx(Text3, { children: `${repoFilter.size} repo${repoFilter.size !== 1 ? "s" : ""}` }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.3",
|
|
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",
|