@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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.71.1
2
+
3
+ Build line in the rail footer follows Specs/Left-Navigation §9 and Reference/UI-Platform Meta.
4
+ - Shown in production too, as `prod | <commit> | v<version>` over `date | author`.
5
+ - Two centered rows of plain mono text at 11px, with no chip and no leading or trailing pipes.
6
+
1
7
  ## 0.71.0
2
8
 
3
9
  Rail and top bar match the Specs/Left-Navigation Design.
@@ -2256,15 +2256,11 @@ function hasActiveChild(item, pathname, activeFn) {
2256
2256
  )
2257
2257
  );
2258
2258
  }
2259
- function envChipClasses(label) {
2260
- const l = label.toLowerCase();
2261
- if (l === "production" || l === "prod")
2262
- return "bg-[#fee2e2] text-[#ef4444]";
2263
- if (l === "staging" || l === "stage")
2264
- return "bg-[#ffedd5] text-[#f97316]";
2265
- if (l === "local" || l === "development" || l === "dev")
2266
- return "bg-[#dcfce7] text-[#22c55e]";
2267
- return "bg-[rgba(107,114,128,0.16)] text-[#6b7280]";
2259
+ function shortEnvLabel(label) {
2260
+ const l = label.trim().toLowerCase();
2261
+ if (l === "production") return "prod";
2262
+ if (l === "development") return "dev";
2263
+ return l;
2268
2264
  }
2269
2265
  var ORG_PILL_DEFAULT = "var(--color-accent)";
2270
2266
  var RailCollapsibleContext = react.createContext(false);
@@ -2755,41 +2751,26 @@ function NavSidebar({
2755
2751
  }
2756
2752
  )
2757
2753
  ] }, l.label)) }) : null,
2758
- footer.envLabel && footer.envLabel.trim().toLowerCase() !== "production" ? /* @__PURE__ */ jsxRuntime.jsxs(
2754
+ footer.envLabel || footer.commit || footer.version ? /* @__PURE__ */ jsxRuntime.jsxs(
2759
2755
  "div",
2760
2756
  {
2761
2757
  "data-shell-meta": true,
2762
- 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")}`,
2758
+ 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")}`,
2763
2759
  children: [
2764
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
2765
- /* @__PURE__ */ jsxRuntime.jsx(
2766
- "span",
2767
- {
2768
- className: [
2769
- "rounded-md px-1.5 py-0.5 text-[10px] font-semibold",
2770
- envChipClasses(footer.envLabel)
2771
- ].join(" "),
2772
- children: footer.envLabel
2773
- }
2774
- ),
2775
- footer.commit ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2776
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }),
2777
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: footer.commit.slice(-4) })
2778
- ] }) : null,
2779
- footer.version ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2780
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }),
2781
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2782
- "v",
2783
- footer.version
2784
- ] })
2785
- ] }) : null
2786
- ] }),
2760
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: [
2761
+ footer.envLabel ? shortEnvLabel(footer.envLabel) : null,
2762
+ footer.commit ? footer.commit.slice(-4) : null,
2763
+ footer.version ? `v${footer.version.replace(/^v/, "")}` : null
2764
+ ].filter((v) => Boolean(v)).map((v, i) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
2765
+ i > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: "|" }) : null,
2766
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: v })
2767
+ ] }, i)) }),
2787
2768
  footer.commitDate || footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
2788
2769
  footer.commitDate ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: new Date(footer.commitDate).toLocaleDateString(void 0, {
2789
2770
  month: "short",
2790
2771
  day: "numeric"
2791
2772
  }) }) : null,
2792
- footer.commitDate && footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[color:var(--muted)]", children: "|" }) : null,
2773
+ footer.commitDate && footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: "|" }) : null,
2793
2774
  footer.commitAuthor ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: footer.commitAuthor.split(/\s+/)[0] }) : null
2794
2775
  ] }) : null
2795
2776
  ]