@kud/gh-ink 0.67.0 → 0.68.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 +19 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1161,6 +1161,17 @@ var StatusStripLine = ({
1161
1161
  age ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: ` ${age}` }) : null
1162
1162
  ] });
1163
1163
  };
1164
+ var SEARCH_GLYPH_NERD = "\uF422";
1165
+ var searchGlyph = (nerd) => nerd ? SEARCH_GLYPH_NERD : "/";
1166
+ var searchBarState = ({
1167
+ typing,
1168
+ nerd
1169
+ }) => ({
1170
+ glyph: searchGlyph(nerd),
1171
+ glyphColor: typing ? colors.info : colors.muted,
1172
+ caret: typing,
1173
+ hints: typing ? "\u2191\u2193 move \xB7 \u21B5 keep \xB7 esc clear" : "filtered \xB7 keys active \xB7 esc clear"
1174
+ });
1164
1175
  var InboxChromeContext = createContext(null);
1165
1176
  var useChrome = (spec) => {
1166
1177
  const chrome = useContext(InboxChromeContext);
@@ -3703,6 +3714,10 @@ var BrowseScreen = ({
3703
3714
  const matchCount = section.items.filter(
3704
3715
  (i) => i.kind !== "repo-header" && i.kind !== "subgroup-header"
3705
3716
  ).length;
3717
+ const searchBar = searchBarState({
3718
+ typing: searchInput,
3719
+ nerd: getIconMode() === "nerd"
3720
+ });
3706
3721
  const launcher = useMemo(() => {
3707
3722
  const run = /* @__PURE__ */ new Map();
3708
3723
  if (palette === null)
@@ -3885,10 +3900,10 @@ var BrowseScreen = ({
3885
3900
  }
3886
3901
  ) }),
3887
3902
  !overlayOpen && search != null ? /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
3888
- /* @__PURE__ */ jsx(Text3, { color: colors.info, children: " / " }),
3903
+ /* @__PURE__ */ jsx(Text3, { color: searchBar.glyphColor, children: ` ${searchBar.glyph} ` }),
3889
3904
  /* @__PURE__ */ jsx(Text3, { children: search }),
3890
- searchInput ? /* @__PURE__ */ jsx(Text3, { color: colors.info, children: "\u258F" }) : null,
3891
- /* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` ${matchCount} match${matchCount !== 1 ? "es" : ""} ${filter.hints.map(([k, label]) => `${k} ${label}`).join(" \xB7 ")}` })
3905
+ searchBar.caret ? /* @__PURE__ */ jsx(Text3, { color: colors.info, children: "\u258F" }) : null,
3906
+ /* @__PURE__ */ jsx(Text3, { dimColor: true, children: ` ${matchCount} match${matchCount !== 1 ? "es" : ""} ${searchInput ? filter.hints.map(([k, label]) => `${k} ${label}`).join(" \xB7 ") : searchBar.hints}` })
3892
3907
  ] }) : !overlayOpen && repoFilter.size > 0 ? /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
3893
3908
  /* @__PURE__ */ jsx(Text3, { color: colors.accent, children: " \u25C9 " }),
3894
3909
  /* @__PURE__ */ jsx(Text3, { children: `${repoFilter.size} repo${repoFilter.size !== 1 ? "s" : ""}` }),
@@ -3978,14 +3993,7 @@ var BrowseScreen = ({
3978
3993
  // appends `⌫ back` and `q quit`, so a body passes only its own keys
3979
3994
  // through `useChrome` — the same contract ink-ui's `Page` offers its
3980
3995
  // nested pages, without re-laying-out the browse frame as one.
3981
- /* @__PURE__ */ jsx(
3982
- FooterHints,
3983
- {
3984
- hints: chrome?.hints ?? [],
3985
- page: "nested",
3986
- help: false
3987
- }
3988
- )
3996
+ /* @__PURE__ */ jsx(FooterHints, { hints: chrome?.hints ?? [], page: "nested", help: false })
3989
3997
  ) : /* @__PURE__ */ jsx(FooterHints, { hints }) })
3990
3998
  ]
3991
3999
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.67.0",
3
+ "version": "0.68.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",