@kud/gh-ink 0.66.0 → 0.66.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 +6 -5
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -296,14 +296,15 @@ type TrailingShed = Partial<Record<(typeof TRAILING)[number], boolean>>;
|
|
|
296
296
|
declare const trailingColumnsOf: (items: readonly GHItem[]) => TrailingColumns;
|
|
297
297
|
/**
|
|
298
298
|
* Width of the `#n` cell across these rows: the widest number plus a two-cell
|
|
299
|
-
* gutter, left-aligned.
|
|
300
|
-
* same move as `markerCols` and `trailingColumnsOf`, so
|
|
301
|
-
* column and that column
|
|
299
|
+
* gutter, left-aligned. The inbox measures it once over the rows of EVERY tab
|
|
300
|
+
* (`listColumnsOf`), the same move as `markerCols` and `trailingColumnsOf`, so
|
|
301
|
+
* the titles start on one column and that column moves neither as you scroll
|
|
302
|
+
* nor as you switch tabs. Measured per tab, it put `#1234`'s titles a column
|
|
303
|
+
* right of `#157`'s in the next tab, and every switch shifted the list.
|
|
302
304
|
*
|
|
303
305
|
* It replaced `padEnd(7)`, a constant that fitted the repos it was written
|
|
304
306
|
* against and nothing else: `#31805` left a one-cell gutter where `#172` left
|
|
305
|
-
* three, and a six-digit number would have run straight into its title.
|
|
306
|
-
* section of short numbers no longer pays for a long one it does not hold.
|
|
307
|
+
* three, and a six-digit number would have run straight into its title.
|
|
307
308
|
*/
|
|
308
309
|
declare const numberColumnsOf: (items: readonly GHItem[]) => number;
|
|
309
310
|
type LayoutInput = Pick<PrRowProps, "item" | "login" | "cols" | "prefix" | "uniformLabels" | "announcements" | "columns" | "shed" | "numberCols" | "gutter">;
|
package/dist/index.js
CHANGED
|
@@ -1531,6 +1531,13 @@ var reposInSections = (sections) => [
|
|
|
1531
1531
|
sections.flatMap((s) => s.items).filter((i) => i.kind === "pr" || i.kind === "issue").map((i) => i.repo)
|
|
1532
1532
|
)
|
|
1533
1533
|
].sort();
|
|
1534
|
+
var listColumnsOf = (sections) => {
|
|
1535
|
+
const rows = sections.flatMap((s) => s.items).filter((i) => i.kind === "pr" || i.kind === "issue");
|
|
1536
|
+
return {
|
|
1537
|
+
numberCols: numberColumnsOf(rows),
|
|
1538
|
+
trailingColumns: trailingColumnsOf(rows)
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1534
1541
|
var moveCursor = (items, current, dir) => {
|
|
1535
1542
|
const next = current + dir;
|
|
1536
1543
|
if (next < 0 || next >= items.length) return current;
|
|
@@ -2012,6 +2019,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
2012
2019
|
return base;
|
|
2013
2020
|
}
|
|
2014
2021
|
const actions = drillAction ? [drillAction, open, copyUrl] : [open, copyUrl];
|
|
2022
|
+
const closing = [];
|
|
2015
2023
|
actions.push({
|
|
2016
2024
|
label: "Copy repo name",
|
|
2017
2025
|
hint: "r",
|
|
@@ -2161,7 +2169,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
2161
2169
|
});
|
|
2162
2170
|
}
|
|
2163
2171
|
}
|
|
2164
|
-
|
|
2172
|
+
closing.push({
|
|
2165
2173
|
label: "Close PR",
|
|
2166
2174
|
hint: "",
|
|
2167
2175
|
run: () => {
|
|
@@ -2193,7 +2201,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
2193
2201
|
]
|
|
2194
2202
|
});
|
|
2195
2203
|
if (item.branch) {
|
|
2196
|
-
|
|
2204
|
+
closing.push({
|
|
2197
2205
|
label: "Close PR + Delete branch",
|
|
2198
2206
|
hint: "",
|
|
2199
2207
|
run: () => {
|
|
@@ -2230,6 +2238,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
2230
2238
|
showFlash
|
|
2231
2239
|
})
|
|
2232
2240
|
});
|
|
2241
|
+
actions.push(...closing);
|
|
2233
2242
|
return actions;
|
|
2234
2243
|
};
|
|
2235
2244
|
var agoText = (ms) => {
|
|
@@ -3023,8 +3032,7 @@ var BrowseScreen = ({
|
|
|
3023
3032
|
}, [searchInput, palette, onTyping]);
|
|
3024
3033
|
const railCols = railWidth(COLS);
|
|
3025
3034
|
const listCols = showRail ? COLS - railCols : COLS;
|
|
3026
|
-
const trailingColumns =
|
|
3027
|
-
const numberCols = numberColumnsOf(labelBearing);
|
|
3035
|
+
const { trailingColumns, numberCols } = listColumnsOf(localSections);
|
|
3028
3036
|
const rowCols = Math.min(listCols, ROW_MAX_COLS);
|
|
3029
3037
|
const trailingShed = sectionShedOf(
|
|
3030
3038
|
section.items.flatMap(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.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",
|