@the-portland-company/shell 0.71.0 → 0.71.1

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/native.cjs CHANGED
@@ -2242,6 +2242,12 @@ function hasActiveChild(item, pathname, activeFn) {
2242
2242
  )
2243
2243
  );
2244
2244
  }
2245
+ function shortEnvLabel(label) {
2246
+ const l = label.trim().toLowerCase();
2247
+ if (l === "production") return "prod";
2248
+ if (l === "development") return "dev";
2249
+ return l;
2250
+ }
2245
2251
  function envChipClasses(label) {
2246
2252
  const l = label.toLowerCase();
2247
2253
  if (l === "production" || l === "prod")
@@ -2741,41 +2747,26 @@ function NavSidebar({
2741
2747
  }
2742
2748
  )
2743
2749
  ] }, l.label)) }) : null,
2744
- footer.envLabel && footer.envLabel.trim().toLowerCase() !== "production" ? /* @__PURE__ */ jsxRuntime.jsxs(
2750
+ footer.envLabel || footer.commit || footer.version ? /* @__PURE__ */ jsxRuntime.jsxs(
2745
2751
  "div",
2746
2752
  {
2747
2753
  "data-shell-meta": true,
2748
- className: `mt-1.5 flex flex-col items-start gap-0.5 font-[family-name:var(--font-plex-mono)] text-[10px] text-[color:var(--sidebar-meta-text,var(--sidebar-text))] ${rc("max-md:hidden")}`,
2754
+ className: `mt-1.5 flex flex-col items-center gap-0.5 font-[family-name:var(--font-plex-mono)] text-[11px] text-[color:var(--sidebar-meta-text,rgba(255,255,255,0.4))] ${rc("max-md:hidden")}`,
2749
2755
  children: [
2750
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
2751
- /* @__PURE__ */ jsxRuntime.jsx(
2752
- "span",
2753
- {
2754
- className: [
2755
- "rounded-md px-1.5 py-0.5 text-[10px] font-semibold",
2756
- envChipClasses(footer.envLabel)
2757
- ].join(" "),
2758
- children: footer.envLabel
2759
- }
2760
- ),
2761
- footer.commit ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2762
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }),
2763
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: footer.commit.slice(-4) })
2764
- ] }) : null,
2765
- footer.version ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2766
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }),
2767
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2768
- "v",
2769
- footer.version
2770
- ] })
2771
- ] }) : null
2772
- ] }),
2756
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: [
2757
+ footer.envLabel ? shortEnvLabel(footer.envLabel) : null,
2758
+ footer.commit ? footer.commit.slice(-4) : null,
2759
+ footer.version ? `v${footer.version.replace(/^v/, "")}` : null
2760
+ ].filter((v) => Boolean(v)).map((v, i) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
2761
+ i > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: "|" }) : null,
2762
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: v })
2763
+ ] }, i)) }),
2773
2764
  footer.commitDate || footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
2774
2765
  footer.commitDate ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: new Date(footer.commitDate).toLocaleDateString(void 0, {
2775
2766
  month: "short",
2776
2767
  day: "numeric"
2777
2768
  }) }) : null,
2778
- footer.commitDate && footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }) : null,
2769
+ footer.commitDate && footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: "|" }) : null,
2779
2770
  footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: footer.commitAuthor.split(/\s+/)[0] }) : null
2780
2771
  ] }) : null
2781
2772
  ]
@@ -3919,6 +3910,7 @@ exports.clearBetaBannerDismissal = clearBetaBannerDismissal;
3919
3910
  exports.envChipClasses = envChipClasses;
3920
3911
  exports.isNavItemActive = isNavItemActive;
3921
3912
  exports.resolveOrgLogoUrl = resolveOrgLogoUrl;
3913
+ exports.shortEnvLabel = shortEnvLabel;
3922
3914
  exports.standardPolitogyNav = standardPolitogyNav;
3923
3915
  exports.topBarIconButtonClass = topBarIconButtonClass;
3924
3916
  exports.useChromeMe = useChromeMe;