@kud/jira-ink 0.4.3 → 0.5.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
@@ -242,7 +242,23 @@ type IssueBoardProps = {
242
242
  * what a test or an embedded pane wants.
243
243
  */
244
244
  frame?: (parts: {
245
+ /** One string for a host with a plain title row. */
245
246
  facts: string;
247
+ /**
248
+ * The same facts as segments, for a host drawing ink-ui's `Page` title
249
+ * row: how many rows the board holds (or `N of M` while narrowing),
250
+ * who the `mine` scope belongs to, the search as a further scope, and
251
+ * freshness as a quiet status.
252
+ */
253
+ title: {
254
+ count: number;
255
+ user?: string;
256
+ scope?: string;
257
+ status: {
258
+ text: string;
259
+ tone: "quiet";
260
+ };
261
+ };
246
262
  hints: Hint[];
247
263
  body: ReactNode;
248
264
  }) => ReactNode;
package/dist/index.js CHANGED
@@ -515,7 +515,14 @@ var IssueBoard = ({
515
515
  );
516
516
  const scopeLabel = scope.kind === "mine" ? `@${viewer}` : scope.mode === "jql" ? "jql" : `\u201C${scope.query}\u201D`;
517
517
  const countLabel = search.open && narrowed.length !== model.rows.length ? `${narrowed.length} of ${model.rows.length}` : `${model.rows.length} ${model.rows.length === 1 ? "item" : "items"}`;
518
- const facts = `${countLabel} \xB7 ${scopeLabel} \xB7 updated ${relativeAge(new Date(loadedAt).toISOString(), now)} ago`;
518
+ const updated = `updated ${relativeAge(new Date(loadedAt).toISOString(), now)} ago`;
519
+ const facts = `${countLabel} \xB7 ${scopeLabel} \xB7 ${updated}`;
520
+ const title = {
521
+ count: search.open && narrowed.length !== model.rows.length ? narrowed.length : model.rows.length,
522
+ ...scope.kind === "mine" ? { user: viewer } : {},
523
+ ...scope.kind === "search" ? { scope: scope.mode === "jql" ? "jql" : `\u201C${scope.query}\u201D` } : search.open && narrowed.length !== model.rows.length ? { scope: `of ${model.rows.length}` } : {},
524
+ status: { text: updated, tone: "quiet" }
525
+ };
519
526
  const hints = search.open ? [
520
527
  ["enter", "run"],
521
528
  ["\u21E5", modeOf(search) === "jql" ? "as plain words" : "as jql"],
@@ -591,7 +598,7 @@ var IssueBoard = ({
591
598
  ) }),
592
599
  /* @__PURE__ */ jsx(Box, { marginTop: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: issues.length ? `${cursor + 1}/${issues.length}` : " " }) })
593
600
  ] });
594
- if (frame) return frame({ facts, hints, body });
601
+ if (frame) return frame({ facts, title, hints, body });
595
602
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
596
603
  /* @__PURE__ */ jsx(Text, { dimColor: true, children: facts }),
597
604
  body,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/jira-ink",
3
- "version": "0.4.3",
3
+ "version": "0.5.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",