@the-portland-company/shell 0.97.0 → 0.97.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.
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { S as StandardNavIconKey, o as NavIcon, N as NavItem, p as NavBreadcrumb, q as StandardNavMode, s as NavLinkComponent, t as NavChromeFetcher, u as NavMode, v as NavUserMenu, w as NavOrgOption, f as NotificationsAdapter, x as NavFooterLink, y as NavFooter, z as NavDisplayMode } from './index-BaUIPQpN.cjs';
3
+ import { S as StandardNavIconKey, o as NavIcon, N as NavItem, p as NavBreadcrumb, q as StandardNavMode, s as NavLinkComponent, t as NavChromeFetcher, u as NavMode, v as NavUserMenu, w as NavOrgOption, f as NotificationsAdapter, x as NavFooterLink, y as NavFooter, z as NavDisplayMode } from './index-SHcw15A4.cjs';
4
4
  import './theme-preference.cjs';
5
5
  import './brand-favicon.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { S as StandardNavIconKey, o as NavIcon, N as NavItem, p as NavBreadcrumb, q as StandardNavMode, s as NavLinkComponent, t as NavChromeFetcher, u as NavMode, v as NavUserMenu, w as NavOrgOption, f as NotificationsAdapter, x as NavFooterLink, y as NavFooter, z as NavDisplayMode } from './index-BEMGfLpI.js';
3
+ import { S as StandardNavIconKey, o as NavIcon, N as NavItem, p as NavBreadcrumb, q as StandardNavMode, s as NavLinkComponent, t as NavChromeFetcher, u as NavMode, v as NavUserMenu, w as NavOrgOption, f as NotificationsAdapter, x as NavFooterLink, y as NavFooter, z as NavDisplayMode } from './index-smsLP_tM.js';
4
4
  import './theme-preference.js';
5
5
  import './brand-favicon.js';
6
6
 
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
3
3
  import { writeUrlState } from './chunk-GVQKZI5X.js';
4
- import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-WQR42AGC.js';
5
- export { standardNavIcons } from './chunk-WQR42AGC.js';
4
+ import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-5IRZD6GF.js';
5
+ export { standardNavIcons } from './chunk-5IRZD6GF.js';
6
6
  import { orgIdTail, ORG_ID_QUERY_PARAM, settingsBaseUrl, authBaseUrl, readOrgSelectorFromUrl, matchOrgSelector, syncOrgIdInUrl, isOrgId, switchActiveOrg, ACTIVE_ORG_QUERY_PARAM, writeActiveOrgCookie, resolveActiveOrg, readActiveOrgCookie } from './chunk-5LO5W7W5.js';
7
- import { warnDeprecated, NavChromeProvider, FuelAction, NotificationsAction, OrganizationSettingsAction, MyProfileAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-VAQNZD37.js';
7
+ import { warnDeprecated, NavChromeProvider, FuelAction, NotificationsAction, OrganizationSettingsAction, MyProfileAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-XPTC47TY.js';
8
8
  import './chunk-BHRVZPZ7.js';
9
9
  import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, writeNavDisplayLocal, writeNavDisplayCookie, isNavDisplayPreference, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-7YVJ7HQG.js';
10
10
  import { useBrandAssets, BrandFavicon } from './chunk-BMR5WAWH.js';
@@ -1,5 +1,5 @@
1
1
  import { orgIdTail, authBaseUrl } from './chunk-5LO5W7W5.js';
2
- import { PageHeaderView, BreadcrumbBarView, resolveOrgLogoUrl, topBarIconButtonClass, TopBarTooltip, TopBarPanelArrow, NavThemeControl, NAV_DISPLAY_OPTIONS, useTopBarIconSlotGlyph, resolveBrandGlyph, TOPBAR_GLYPH_SIZE, resolveTabGlyph, warnDeprecated, SpeculationRulesScript } from './chunk-VAQNZD37.js';
2
+ import { PageHeaderView, BreadcrumbBarView, resolveOrgLogoUrl, topBarIconButtonClass, TopBarTooltip, TopBarPanelArrow, NavThemeControl, NAV_DISPLAY_OPTIONS, useTopBarIconSlotGlyph, resolveBrandGlyph, TOPBAR_GLYPH_SIZE, resolveTabGlyph, warnDeprecated, SpeculationRulesScript } from './chunk-XPTC47TY.js';
3
3
  import { readRailPreference, writeRailPreference } from './chunk-7YVJ7HQG.js';
4
4
  import { createContext, useRef, useEffect, useMemo, useState, Fragment as Fragment$1, useContext } from 'react';
5
5
  import clsx from 'clsx';
@@ -484,6 +484,33 @@ function shortEnvLabel(label) {
484
484
  if (l === "development") return "dev";
485
485
  return l;
486
486
  }
487
+ function buildLineParts(meta) {
488
+ const version = meta.version ? `v${meta.version.replace(/^v/, "")}` : null;
489
+ const parsed = meta.commitDate ? new Date(meta.commitDate) : null;
490
+ const date = parsed && !Number.isNaN(parsed.getTime()) ? parsed.toLocaleDateString(void 0, { month: "short", day: "numeric" }) : null;
491
+ const line = [version, date].filter(Boolean).join(" \xB7 ");
492
+ const detail = [
493
+ meta.envLabel ? shortEnvLabel(meta.envLabel) : null,
494
+ meta.commit ? meta.commit.slice(0, 12) : null,
495
+ version,
496
+ date,
497
+ meta.commitAuthor ? meta.commitAuthor.split(/\s+/)[0] : null
498
+ ].filter(Boolean).join(" | ");
499
+ return { line, detail };
500
+ }
501
+ function ShellBuildLine({ footer, hidden }) {
502
+ const { line, detail } = buildLineParts(footer);
503
+ if (!line && !detail) return null;
504
+ return /* @__PURE__ */ jsx(
505
+ "div",
506
+ {
507
+ "data-shell-meta": true,
508
+ title: detail,
509
+ className: `mt-1.5 truncate text-center font-[family-name:var(--font-mono,ui-monospace,monospace)] text-[10px] leading-[1.2] text-[color:var(--sidebar-row-text,rgba(255,255,255,0.66))] ${hidden}`,
510
+ children: line || detail
511
+ }
512
+ );
513
+ }
487
514
  function envChipClasses(label) {
488
515
  const l = label.toLowerCase();
489
516
  if (l === "production" || l === "prod")
@@ -986,31 +1013,7 @@ function NavSidebar({
986
1013
  }
987
1014
  )
988
1015
  ] }, l.label)) }) : null,
989
- footer.envLabel || footer.commit || footer.version ? /* @__PURE__ */ jsxs(
990
- "div",
991
- {
992
- "data-shell-meta": true,
993
- className: `mt-1.5 flex flex-col items-center gap-0.5 font-[family-name:var(--font-mono,ui-monospace,monospace)] text-[11px] text-[color:var(--sidebar-meta-text,rgba(255,255,255,0.72))] ${rc("max-md:hidden")}`,
994
- children: [
995
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", children: [
996
- footer.envLabel ? shortEnvLabel(footer.envLabel) : null,
997
- footer.commit ? footer.commit.slice(-4) : null,
998
- footer.version ? `v${footer.version.replace(/^v/, "")}` : null
999
- ].filter((v) => Boolean(v)).map((v, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
1000
- i > 0 ? /* @__PURE__ */ jsx("span", { children: "|" }) : null,
1001
- /* @__PURE__ */ jsx("span", { children: v })
1002
- ] }, i)) }),
1003
- footer.commitDate || footer.commitAuthor ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1004
- footer.commitDate ? /* @__PURE__ */ jsx("span", { children: new Date(footer.commitDate).toLocaleDateString(void 0, {
1005
- month: "short",
1006
- day: "numeric"
1007
- }) }) : null,
1008
- footer.commitDate && footer.commitAuthor ? /* @__PURE__ */ jsx("span", { children: "|" }) : null,
1009
- footer.commitAuthor ? /* @__PURE__ */ jsx("span", { children: footer.commitAuthor.split(/\s+/)[0] }) : null
1010
- ] }) : null
1011
- ]
1012
- }
1013
- ) : null
1016
+ footer.envLabel || footer.commit || footer.version ? /* @__PURE__ */ jsx(ShellBuildLine, { footer, hidden: rc("max-md:hidden") }) : null
1014
1017
  ] }) : null
1015
1018
  ]
1016
1019
  }
@@ -2030,6 +2033,6 @@ function NavAppShell({
2030
2033
  );
2031
2034
  }
2032
2035
 
2033
- export { BETA_BANNER_DISMISS_KEY, BreadcrumbBar, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, PageHeader, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardNavIcons, standardPolitogyNav };
2034
- //# sourceMappingURL=chunk-WQR42AGC.js.map
2035
- //# sourceMappingURL=chunk-WQR42AGC.js.map
2036
+ export { BETA_BANNER_DISMISS_KEY, BreadcrumbBar, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, PageHeader, buildLineParts, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardNavIcons, standardPolitogyNav };
2037
+ //# sourceMappingURL=chunk-5IRZD6GF.js.map
2038
+ //# sourceMappingURL=chunk-5IRZD6GF.js.map