@the-portland-company/shell 0.57.0 → 0.59.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.
@@ -402,9 +402,13 @@ declare function ChromeTopBarActions(): react_jsx_runtime.JSX.Element | null;
402
402
  /** True when any core-org membership carries a super-admin tier. */
403
403
  declare function useIsSuperAdmin(): boolean;
404
404
  /**
405
- * Sidebar footer: legal links for everyone; build metadata (env / commit /
406
- * version / date / author) ONLY for Super Administrators
407
- * (Reference/UI-Platform). Pass the app's build-time metadata in.
405
+ * Sidebar footer: legal links AND build metadata (env / commit / version /
406
+ * date / author) for every user. Reference/UI-Platform "Left bar — required
407
+ * elements" lists Meta unconditionally — it carries no Super Administrator
408
+ * gate. Gating it here (pre-2026-09-30) silently dropped the whole Meta row
409
+ * for every non-admin viewer, which is exactly the "Left Nav not adhering to
410
+ * UI/UX rules" violation DevNotes 83a4713 filed against Contacts. Pass the
411
+ * app's build-time metadata in; it now always reaches the rail.
408
412
  */
409
413
  declare function useChromeFooter(meta: {
410
414
  envLabel?: string;
@@ -402,9 +402,13 @@ declare function ChromeTopBarActions(): react_jsx_runtime.JSX.Element | null;
402
402
  /** True when any core-org membership carries a super-admin tier. */
403
403
  declare function useIsSuperAdmin(): boolean;
404
404
  /**
405
- * Sidebar footer: legal links for everyone; build metadata (env / commit /
406
- * version / date / author) ONLY for Super Administrators
407
- * (Reference/UI-Platform). Pass the app's build-time metadata in.
405
+ * Sidebar footer: legal links AND build metadata (env / commit / version /
406
+ * date / author) for every user. Reference/UI-Platform "Left bar — required
407
+ * elements" lists Meta unconditionally — it carries no Super Administrator
408
+ * gate. Gating it here (pre-2026-09-30) silently dropped the whole Meta row
409
+ * for every non-admin viewer, which is exactly the "Left Nav not adhering to
410
+ * UI/UX rules" violation DevNotes 83a4713 filed against Contacts. Pass the
411
+ * app's build-time metadata in; it now always reaches the rail.
408
412
  */
409
413
  declare function useChromeFooter(meta: {
410
414
  envLabel?: string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
3
- import { clearBetaBannerDismissal, standardPolitogyNav, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-TMOZTLUZ.js';
3
+ import { clearBetaBannerDismissal, standardPolitogyNav, isNavItemActive, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-BV2QF7NY.js';
4
4
  import './chunk-U4RZPZET.js';
5
5
  import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, isNavDisplayPreference, writeNavDisplayCookie, writeNavDisplayLocal, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-6UHJV2FH.js';
6
6
  import { resolveActiveOrg, isOrgId, writeActiveOrgCookie, ACTIVE_ORG_QUERY_PARAM, readActiveOrgCookie } from './chunk-W2HITMV5.js';
@@ -678,6 +678,21 @@ function FrameBody({
678
678
  [data?.contactsItem, data?.petitionsItem, navMode, activeOrgId]
679
679
  );
680
680
  const navItems = core?.nav ?? derivedNavItems;
681
+ const navIsActive = useMemo(() => {
682
+ const childHrefs = /* @__PURE__ */ new Map();
683
+ for (const item of navItems) {
684
+ if (!item.href || !item.children?.length) continue;
685
+ const hrefs = [];
686
+ for (const child of item.children) {
687
+ if (child.href) hrefs.push(child.href);
688
+ for (const leaf of child.children ?? []) {
689
+ if (leaf.href) hrefs.push(leaf.href);
690
+ }
691
+ }
692
+ childHrefs.set(item.href, hrefs);
693
+ }
694
+ return (pathname2, href) => isNavItemActive(pathname2, href) || (childHrefs.get(href) ?? []).some((h) => isNavItemActive(pathname2, h));
695
+ }, [navItems]);
681
696
  const derivedBreadcrumbs = useMemo(
682
697
  () => deriveBreadcrumbs(navItems, pathname, { search, origin: meta.origin }),
683
698
  [navItems, pathname, search, meta.origin]
@@ -710,6 +725,7 @@ function FrameBody({
710
725
  // (which strips children) would leave one childless parent row —
711
726
  // flat apps ignore the stripping.
712
727
  items: navDisplay === "tabs" && meta.navShape !== "flat" ? navItems.map(({ children: _sub, ...item }) => item) : navItems,
728
+ isActive: navIsActive,
713
729
  flatten: meta.navShape === "flat"
714
730
  },
715
731
  // The app's own workspace is NOT the organization — it is a per-app
@@ -1175,10 +1191,9 @@ var FOOTER_LINKS = [
1175
1191
  }
1176
1192
  ];
1177
1193
  function useChromeFooter(meta) {
1178
- const isSuperAdmin = useIsSuperAdmin();
1179
1194
  return useMemo(
1180
- () => isSuperAdmin ? { links: FOOTER_LINKS, ...meta } : { links: FOOTER_LINKS },
1181
- [isSuperAdmin, meta.envLabel, meta.version, meta.commit, meta.commitDate, meta.commitAuthor]
1195
+ () => ({ links: FOOTER_LINKS, ...meta }),
1196
+ [meta.envLabel, meta.version, meta.commit, meta.commitDate, meta.commitAuthor]
1182
1197
  );
1183
1198
  }
1184
1199
  function useChromeIdentity(fallback) {