@kud/gh-ink 0.36.0 → 0.37.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
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { PrComments, PrHealthData, PrCheck, Health } from '@kud/gh';
3
- import { StyledLine } from '@kud/ink-ui';
3
+ import { StyledLine, PillVariant } from '@kud/ink-ui';
4
4
 
5
5
  type CommentsPanelProps = {
6
6
  repo: string;
@@ -204,6 +204,20 @@ type TaskRow = {
204
204
  * separately instead of being smuggled past the truncation maths.
205
205
  */
206
206
  note?: string;
207
+ /**
208
+ * A category this row BELONGS to — `epic`, `blocked`, `spike` — drawn as a
209
+ * filled pill after the summary.
210
+ *
211
+ * Deliberately not a second spelling of `note`, which the epic marker used to
212
+ * borrow. The two want opposite weights: a pill says the word itself is the
213
+ * information, while `note` is for a reference the reader follows — a parent
214
+ * ticket key, a source. Filling a breadcrumb gives it a weight it has not
215
+ * earned, and a row can legitimately carry both (a story under someone else's
216
+ * epic shows its parent's key AND, one day, a status of its own).
217
+ */
218
+ pill?: string;
219
+ /** Which fill the pill takes. See `@kud/ink-ui`'s `PillVariant`. */
220
+ pillVariant?: PillVariant;
207
221
  /**
208
222
  * The Jira issue key behind this row, when one exists. Its PRESENCE is what
209
223
  * turns on the ticket affordances — ↵ opens a menu led by `jira issue view`,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React2, { createContext, useState, useRef, useEffect, useMemo, useContext } from 'react';
2
2
  import { useWindowSize, useInput, Text, Box } from 'ink';
3
- import { colors, ScrollView, TextInput, LoadingScreen, StatusMessage, FooterHints, useListCursor, Tabs } from '@kud/ink-ui';
3
+ import { colors, ScrollView, TextInput, LoadingScreen, StatusMessage, FooterHints, useListCursor, Tabs, pillWidth, Pill } from '@kud/ink-ui';
4
4
  import { isPassCheck, isFailCheck, isInconclusiveCheck, resolveThread, unresolveThread, replyToThread, rerunFailedRun, mergePr, reRequestReviewer } from '@kud/gh';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
  import { $ } from 'zx';
@@ -1932,7 +1932,7 @@ var ItemRow = ({
1932
1932
  const transitLabel2 = transient ? TRANSIT_LABEL[transient] : "";
1933
1933
  const titleMax2 = Math.max(
1934
1934
  20,
1935
- COLS - item.key.length - note.length - transitLabel2.length - prefix.length - 12
1935
+ COLS - item.key.length - note.length - (item.pill ? pillWidth(item.pill) + 1 : 0) - transitLabel2.length - prefix.length - 12
1936
1936
  );
1937
1937
  return /* @__PURE__ */ jsxs(Box, { marginTop: gap ? 1 : 0, children: [
1938
1938
  /* @__PURE__ */ jsx(Text2, { color: "cyan", children: active ? "\u276F " : " " }),
@@ -1949,6 +1949,10 @@ var ItemRow = ({
1949
1949
  children: truncate(item.summary, titleMax2)
1950
1950
  }
1951
1951
  ),
1952
+ item.pill ? /* @__PURE__ */ jsxs(Fragment, { children: [
1953
+ /* @__PURE__ */ jsx(Text2, { children: " " }),
1954
+ /* @__PURE__ */ jsx(Pill, { variant: item.pillVariant ?? "muted", children: item.pill })
1955
+ ] }) : null,
1952
1956
  note ? /* @__PURE__ */ jsx(Text2, { dimColor: true, children: ` ${note}` }) : null,
1953
1957
  transitLabel2 ? /* @__PURE__ */ jsx(Text2, { bold: true, color: TRANSIT_COLOUR[transient], children: " " + transitLabel2 }) : null
1954
1958
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.36.0",
3
+ "version": "0.37.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",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@kud/gh": "0.9.0",
52
- "@kud/ink-ui": "0.14.0",
52
+ "@kud/ink-ui": "0.17.0",
53
53
  "zx": "8.8.5"
54
54
  },
55
55
  "devDependencies": {