@kud/gh-ink 0.1.0 → 0.2.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 +2 -1
- package/dist/index.js +13 -10
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,9 @@ type CommentsPanelProps = {
|
|
|
9
9
|
error: string | null;
|
|
10
10
|
reload: () => void;
|
|
11
11
|
onReplyingChange?: (active: boolean) => void;
|
|
12
|
+
showConversationHeading?: boolean;
|
|
12
13
|
};
|
|
13
|
-
declare const CommentsPanel: ({ repo, number, data, error, reload, onReplyingChange, }: CommentsPanelProps) => React.JSX.Element;
|
|
14
|
+
declare const CommentsPanel: ({ repo, number, data, error, reload, onReplyingChange, showConversationHeading, }: CommentsPanelProps) => React.JSX.Element;
|
|
14
15
|
|
|
15
16
|
type HealthPanelProps = {
|
|
16
17
|
repo: string;
|
package/dist/index.js
CHANGED
|
@@ -268,7 +268,8 @@ var CommentsPanel = ({
|
|
|
268
268
|
data,
|
|
269
269
|
error,
|
|
270
270
|
reload,
|
|
271
|
-
onReplyingChange
|
|
271
|
+
onReplyingChange,
|
|
272
|
+
showConversationHeading = true
|
|
272
273
|
}) => {
|
|
273
274
|
const [showResolved, setShowResolved] = useState(true);
|
|
274
275
|
const [threadSel, setThreadSel] = useState(0);
|
|
@@ -353,14 +354,16 @@ var CommentsPanel = ({
|
|
|
353
354
|
{ text: "" }
|
|
354
355
|
);
|
|
355
356
|
if (conversation.length === 0 && allThreads.length === 0)
|
|
356
|
-
lines.push({ text: "
|
|
357
|
+
lines.push({ text: "Nothing has been said on it yet.", dim: true });
|
|
357
358
|
if (conversation.length > 0) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
359
|
+
if (showConversationHeading) {
|
|
360
|
+
lines.push({
|
|
361
|
+
text: `Conversation (${conversation.length})`,
|
|
362
|
+
color: colors.info,
|
|
363
|
+
bold: true
|
|
364
|
+
});
|
|
365
|
+
lines.push({ text: "" });
|
|
366
|
+
}
|
|
364
367
|
for (const c of conversation)
|
|
365
368
|
lines.push(...commentLines(c, width, fileLink));
|
|
366
369
|
}
|
|
@@ -550,7 +553,7 @@ var HealthPanel = ({
|
|
|
550
553
|
i === safeCursor ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \u21B5 open" }) : null
|
|
551
554
|
] }, checkLabel(c) + i);
|
|
552
555
|
}) }),
|
|
553
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Summary, { label: "Reviews", icon: reviewsIcon, parts: reviewParts }) }),
|
|
556
|
+
/* @__PURE__ */ jsx(Box, { marginTop: checks.length ? 1 : 0, children: /* @__PURE__ */ jsx(Summary, { label: "Reviews", icon: reviewsIcon, parts: reviewParts }) }),
|
|
554
557
|
reviewers.map(([login, state], j) => {
|
|
555
558
|
const [icon, color] = reviewIcon(state);
|
|
556
559
|
const active = safeCursor === checks.length + j;
|
|
@@ -561,7 +564,7 @@ var HealthPanel = ({
|
|
|
561
564
|
active ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: " \u21B5 re-request" }) : null
|
|
562
565
|
] }, login);
|
|
563
566
|
}),
|
|
564
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Summary, { label: "Merge", icon: mergeIcon, parts: [[mText, mColor]] }) }),
|
|
567
|
+
/* @__PURE__ */ jsx(Box, { marginTop: reviewers.length ? 1 : 0, children: /* @__PURE__ */ jsx(Summary, { label: "Merge", icon: mergeIcon, parts: [[mText, mColor]] }) }),
|
|
565
568
|
confirm === "merge" ? /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs(Text, { color: colors.warning, children: [
|
|
566
569
|
` Merge #${number}? `,
|
|
567
570
|
/* @__PURE__ */ jsx(Text, { color: colors.success, children: "y" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react": ">=19"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@kud/gh": "0.
|
|
51
|
+
"@kud/gh": "0.2.0",
|
|
52
52
|
"@kud/ink-ui": "0.8.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|