@kud/gh-ink 0.65.1 → 0.66.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 CHANGED
@@ -263,6 +263,13 @@ type PrRowProps = {
263
263
  * number into the title.
264
264
  */
265
265
  numberCols?: number;
266
+ /**
267
+ * Whether the row draws its own `❯` gutter. A host that marks the selected
268
+ * stop itself, in a column further left, passes `false` — otherwise the
269
+ * selected row carries two cursors (`❯ ├─ ❯ …`). Hidden, the two columns go
270
+ * to the title rather than standing empty.
271
+ */
272
+ gutter?: boolean;
266
273
  };
267
274
  /**
268
275
  * The trailing block, in reading order: how contested, how big, how recent.
@@ -299,7 +306,7 @@ declare const trailingColumnsOf: (items: readonly GHItem[]) => TrailingColumns;
299
306
  * section of short numbers no longer pays for a long one it does not hold.
300
307
  */
301
308
  declare const numberColumnsOf: (items: readonly GHItem[]) => number;
302
- type LayoutInput = Pick<PrRowProps, "item" | "login" | "cols" | "prefix" | "uniformLabels" | "announcements" | "columns" | "shed" | "numberCols">;
309
+ type LayoutInput = Pick<PrRowProps, "item" | "login" | "cols" | "prefix" | "uniformLabels" | "announcements" | "columns" | "shed" | "numberCols" | "gutter">;
303
310
  /**
304
311
  * Which trailing columns the section has to give up, so that every row gives up
305
312
  * the same ones. Each row is laid out alone and the drops are unioned: if any
@@ -325,7 +332,7 @@ declare const sectionShedOf: (rows: readonly Pick<LayoutInput, "item" | "prefix"
325
332
  * arrival, merge and departure belongs to whoever owns the list, and reaches
326
333
  * the row as `icon`, `motion` and `announcements` after the decisions are made.
327
334
  */
328
- declare const PrRow: ({ item, active, login, cols, selectionBg, icon: iconOverride, prefix, uniformLabels, motion, announcements, columns, shed, numberCols, }: PrRowProps) => React.JSX.Element;
335
+ declare const PrRow: ({ item, active, login, cols, selectionBg, icon: iconOverride, prefix, uniformLabels, motion, announcements, columns, shed, numberCols, gutter, }: PrRowProps) => React.JSX.Element;
329
336
 
330
337
  /**
331
338
  * One state per thing, from a closed set the strip knows how to draw. The host
package/dist/index.js CHANGED
@@ -867,7 +867,8 @@ var layoutOf = ({
867
867
  announcements = [],
868
868
  columns,
869
869
  shed = {},
870
- numberCols
870
+ numberCols,
871
+ gutter = true
871
872
  }) => {
872
873
  const numCols = numberCols ?? numberColumnsOf([item]);
873
874
  const numStr = `#${item.number}`.padEnd(numCols);
@@ -914,7 +915,7 @@ var layoutOf = ({
914
915
  const author = showAuthor && !givingUp.author ? ` by ${item.author}`.length : 0;
915
916
  const pills = announcements.reduce((w, a) => w + 2 + a.label.length, 0);
916
917
  const cell = labelCell();
917
- return 2 + prefix.length + 2 + 2 + numCols + (cell ? 2 + cell.length + 1 : 0) + (givingUp.repo ? 0 : repoLabel.length) + author + block + pills + pillCaps + 4;
918
+ return (gutter ? 2 : 0) + prefix.length + 2 + 2 + numCols + (cell ? 2 + cell.length + 1 : 0) + (givingUp.repo ? 0 : repoLabel.length) + author + block + pills + pillCaps + 4;
918
919
  };
919
920
  const MIN_TITLE = 24;
920
921
  for (const give of [
@@ -958,7 +959,8 @@ var PrRow = ({
958
959
  announcements = [],
959
960
  columns,
960
961
  shed,
961
- numberCols
962
+ numberCols,
963
+ gutter = true
962
964
  }) => {
963
965
  const backdropped = useBackdropped();
964
966
  const { glyph: healthIcon, color: healthColor2 } = displayFor(item.health);
@@ -989,13 +991,14 @@ var PrRow = ({
989
991
  announcements,
990
992
  columns,
991
993
  shed,
992
- numberCols
994
+ numberCols,
995
+ gutter
993
996
  });
994
997
  return (
995
998
  // The wash paints every cell of the fixed-width row — an Ink Box's
996
999
  // background covers its full measure, not just the inked cells.
997
1000
  /* @__PURE__ */ jsxs(Box, { width: cols, backgroundColor: selectionBg, children: [
998
- /* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }),
1001
+ gutter ? /* @__PURE__ */ jsx(Text3, { color: colors.info, children: active ? "\u276F " : " " }) : null,
999
1002
  /* @__PURE__ */ jsx(Text3, { dimColor: true, children: prefix }),
1000
1003
  /* @__PURE__ */ jsx(Text3, { color, bold: true, children: icon + " " }),
1001
1004
  /* @__PURE__ */ jsx(Text3, { color: turnColor, bold: turnIcon === "\u2190", children: turnIcon + " " }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.65.1",
3
+ "version": "0.66.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",
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@kud/gh": "0.19.0",
52
52
  "@kud/gh-workflow": "0.14.0",
53
- "@kud/ink-ui": "0.31.0",
53
+ "@kud/ink-ui": "0.33.0",
54
54
  "zx": "8.8.5"
55
55
  },
56
56
  "devDependencies": {