@kud/gh-ink 0.34.0 → 0.35.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.d.ts +45 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -140,6 +140,31 @@ type GHItem = {
|
|
|
140
140
|
* handing back a `lastActor` that no longer claims a turn.
|
|
141
141
|
*/
|
|
142
142
|
pinned?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* What this row STANDS FOR, when that differs from what it is. Absent means
|
|
145
|
+
* the row is a unit of work and is counted as one.
|
|
146
|
+
*
|
|
147
|
+
* `"container"` marks a row that exists to carry context rather than to be
|
|
148
|
+
* done: the initiative a story hangs under, drawn as a real row because it is
|
|
149
|
+
* still selectable, openable, and worth seeing until it closes — but not
|
|
150
|
+
* itself a thing on anyone's plate. Four stories under one container is four
|
|
151
|
+
* items, not five.
|
|
152
|
+
*
|
|
153
|
+
* Deliberately not `uncounted`. A host knows what a row IS; it should not have
|
|
154
|
+
* to know what the tab badge does with that, and a field named after one
|
|
155
|
+
* consumer starts lying the moment a second one reads it.
|
|
156
|
+
*
|
|
157
|
+
* Orthogonal to `depth`, which says where the row hangs rather than what it
|
|
158
|
+
* stands for. A container is a genuine depth-0 row with genuine depth-1
|
|
159
|
+
* children; spelling it as a depth would mean lying about the tree to fix a
|
|
160
|
+
* number, and every site that draws indentation reads that lie as truth.
|
|
161
|
+
*
|
|
162
|
+
* A union with one member rather than a boolean. `indent` was a boolean that
|
|
163
|
+
* turned out to need a scalar, and widening it cost a deprecation that is
|
|
164
|
+
* still in this file. Adding a second role here is additive; turning a boolean
|
|
165
|
+
* into a union is not.
|
|
166
|
+
*/
|
|
167
|
+
role?: "container";
|
|
143
168
|
/**
|
|
144
169
|
* How deep this row hangs in the tree: 0 top level, 1 a child, 2 a
|
|
145
170
|
* grandchild. Absent means 0.
|
|
@@ -165,6 +190,8 @@ type TaskRow = {
|
|
|
165
190
|
url: string;
|
|
166
191
|
status: string;
|
|
167
192
|
age: string;
|
|
193
|
+
/** What this row stands for. See `GHItem.role`. */
|
|
194
|
+
role?: "container";
|
|
168
195
|
/** How deep this row hangs. See `GHItem.depth`; read it through `depthOf`. */
|
|
169
196
|
depth?: number;
|
|
170
197
|
/** @deprecated Legacy spelling of `depth: 1`. See `GHItem.indent`. */
|
|
@@ -375,6 +402,24 @@ declare const openInTab: (cmd: string) => Promise<void>;
|
|
|
375
402
|
declare const runInPaneHorizontal: (cmd: string) => Promise<void>;
|
|
376
403
|
declare const runHere: (cmd: string) => void;
|
|
377
404
|
declare const COLS: number;
|
|
405
|
+
/**
|
|
406
|
+
* What the tab badge and the header total both count: rows that are somebody's
|
|
407
|
+
* work, at the top level.
|
|
408
|
+
*
|
|
409
|
+
* The exclusions are two different kinds of thing. Headers and the
|
|
410
|
+
* show-more/show-less affordances are furniture — not entities at all, which is
|
|
411
|
+
* why the search and repo filters drop them too. This function used to exclude
|
|
412
|
+
* only the two header kinds while its three siblings excluded all four, so a
|
|
413
|
+
* collapsed tail sitting at the top level counted as an item.
|
|
414
|
+
* `role: "container"` rows ARE entities, selectable and openable; they simply
|
|
415
|
+
* are not work. An epic is the case that forced the distinction: real, owned,
|
|
416
|
+
* and on screen until it closes, but the work is the stories under it, and
|
|
417
|
+
* counting it as well reported five things to do where there were four.
|
|
418
|
+
*
|
|
419
|
+
* One function, both consumers, on purpose. The badge and the whole-board total
|
|
420
|
+
* are the same claim at two scales; computed apart they drift, and a header that
|
|
421
|
+
* disagrees with the sum of its own tabs is worse than either number alone.
|
|
422
|
+
*/
|
|
378
423
|
declare const topLevelCount: (s: Section) => number;
|
|
379
424
|
declare const drillCmd: (item: AnyItem) => string | null;
|
|
380
425
|
declare const explainGhAction: (e: unknown) => string;
|
package/dist/index.js
CHANGED
|
@@ -1391,7 +1391,7 @@ var Backdrop = ({
|
|
|
1391
1391
|
}
|
|
1392
1392
|
) : children });
|
|
1393
1393
|
var topLevelCount = (s) => s.items.filter(
|
|
1394
|
-
(i) => i.kind !== "repo-header" && i.kind !== "subgroup-header" && depthOf(i) === 0
|
|
1394
|
+
(i) => i.kind !== "repo-header" && i.kind !== "subgroup-header" && i.kind !== "show-more" && i.kind !== "show-less" && !("role" in i && i.role === "container") && depthOf(i) === 0
|
|
1395
1395
|
).length;
|
|
1396
1396
|
var drillCmd = (item) => {
|
|
1397
1397
|
if (item.kind === "task")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.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",
|