@kud/jira-ink 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -52,7 +52,6 @@ var IssueDetailView = ({
52
52
  const { active } = useTabs(tabs, { initial: "description" });
53
53
  const [scroll, setScroll] = useState(0);
54
54
  useInput((input, key) => {
55
- if (key.escape) return onBack();
56
55
  if (input === "t" && onTransition) return onTransition();
57
56
  if (input === "c" && onComment) return onComment();
58
57
  if (input === "a" && onAssign) return onAssign();
@@ -61,7 +60,8 @@ var IssueDetailView = ({
61
60
  if (key.upArrow || input === "k") setScroll((s) => Math.max(0, s - 1));
62
61
  });
63
62
  const source = active === "comments" ? commentsAsMarkdown(issue) : active === "attachments" ? attachmentsAsMarkdown(issue) : issue.description || "_No description._";
64
- const chromeLines = frame ? 8 : 12;
63
+ const keyValueRows = 3 + (issue.parent ? 1 : 0) + (issue.labels.length > 0 ? 1 : 0) + (frame ? 0 : 1);
64
+ const chromeLines = keyValueRows + 1 + 2 + 1 + (frame ? 0 : 4);
65
65
  const bodyHeight = Math.max(3, height - chromeLines);
66
66
  const hints = [
67
67
  ["\u2190\u2192", "section"],
@@ -70,7 +70,7 @@ var IssueDetailView = ({
70
70
  ...onComment ? [["c", "comment"]] : [],
71
71
  ...onAssign ? [["a", "assign to me"]] : [],
72
72
  ...onOpenBrowser ? [["o", "browser"]] : [],
73
- ["esc", "back"]
73
+ ["\u232B", "back"]
74
74
  ];
75
75
  const body = /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
76
76
  /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
@@ -88,7 +88,7 @@ var IssueDetailView = ({
88
88
  issue.labels.length > 0 && /* @__PURE__ */ jsx(KeyValue, { label: "labels", value: issue.labels.join(", ") })
89
89
  ] }),
90
90
  /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Tabs, { items: tabs, active: active ?? "description" }) }),
91
- /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(
91
+ /* @__PURE__ */ jsx(Box, { marginTop: 1, height: bodyHeight, overflow: "hidden", children: /* @__PURE__ */ jsx(
92
92
  MarkdownViewport,
93
93
  {
94
94
  source,
@@ -190,14 +190,10 @@ var IssueBody = ({
190
190
  live = false;
191
191
  };
192
192
  }, [client, baseUrl, issueKey]);
193
- useInput((input, key) => {
194
- if (input === "q") return onExit();
195
- if (key.escape && state.phase !== "ready") onExit();
196
- });
197
193
  const framed = (body) => frame ? frame({
198
194
  title: issueKey,
199
195
  subtitle: "",
200
- hints: [["esc", "back"]],
196
+ hints: [["\u232B", "back"]],
201
197
  body
202
198
  }) : body;
203
199
  if (state.phase === "loading")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/jira-ink",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Ink components for viewing Jira issues: the board and the issue detail screen, shared by jira-cli's TUI and cockpit",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@kud/ink-markdown": "0.3.0",
33
- "@kud/ink-ui": "0.25.0",
33
+ "@kud/ink-ui": "0.27.0",
34
34
  "@kud/jira": "0.4.0"
35
35
  },
36
36
  "devDependencies": {