@the-portland-company/shell 0.103.0 → 0.104.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.
@@ -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, z as NavIcon, N as NavItem, D as NavBreadcrumb, E as StandardNavMode, G as NavLinkComponent, I as NavChromeFetcher, J as NavMode, L as NavUserMenu, M as NavOrgOption, i as NotificationsAdapter, O as ChromeOrgSummary, Q as NavFooterLink, U as NavFooter, W as NavDisplayMode } from './index-lk2Ad_Q0.cjs';
3
+ import { S as StandardNavIconKey, z as NavIcon, N as NavItem, D as NavBreadcrumb, E as StandardNavMode, G as NavLinkComponent, I as NavChromeFetcher, J as NavMode, L as NavUserMenu, M as NavOrgOption, i as NotificationsAdapter, O as ChromeOrgSummary, Q as NavFooterLink, U as NavFooter, W as NavDisplayMode } from './index-BKVWMe9_.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, z as NavIcon, N as NavItem, D as NavBreadcrumb, E as StandardNavMode, G as NavLinkComponent, I as NavChromeFetcher, J as NavMode, L as NavUserMenu, M as NavOrgOption, i as NotificationsAdapter, O as ChromeOrgSummary, Q as NavFooterLink, U as NavFooter, W as NavDisplayMode } from './index-ND_BS0nl.js';
3
+ import { S as StandardNavIconKey, z as NavIcon, N as NavItem, D as NavBreadcrumb, E as StandardNavMode, G as NavLinkComponent, I as NavChromeFetcher, J as NavMode, L as NavUserMenu, M as NavOrgOption, i as NotificationsAdapter, O as ChromeOrgSummary, Q as NavFooterLink, U as NavFooter, W as NavDisplayMode } from './index-DnrsvxhZ.js';
4
4
  import './theme-preference.js';
5
5
  import './brand-favicon.js';
6
6
 
@@ -1,8 +1,8 @@
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-KI5P6QKQ.js';
5
- export { standardNavIcons } from './chunk-KI5P6QKQ.js';
4
+ import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, isUnderNavPattern, NavAppShell } from './chunk-7XWRF7Y2.js';
5
+ export { standardNavIcons } from './chunk-7XWRF7Y2.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
7
  import { warnDeprecated, NavChromeProvider, FuelAction, NotificationsAction, OrganizationSettingsAction, MyProfileAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-HR2TBHHH.js';
8
8
  import './chunk-BHRVZPZ7.js';
@@ -801,18 +801,33 @@ function FrameBody({
801
801
  const navItems = core?.nav ?? derivedNavItems;
802
802
  const navIsActive = useMemo(() => {
803
803
  const childHrefs = /* @__PURE__ */ new Map();
804
+ const extra = /* @__PURE__ */ new Map();
805
+ const addExtra = (href, pats) => {
806
+ if (!pats?.length) return;
807
+ extra.set(href, [...extra.get(href) ?? [], ...pats]);
808
+ };
804
809
  for (const item of navItems) {
805
- if (!item.href || !item.children?.length) continue;
810
+ if (!item.href) continue;
811
+ addExtra(item.href, item.activeOn);
812
+ if (!item.children?.length) continue;
806
813
  const hrefs = [];
807
814
  for (const child of item.children) {
808
- if (child.href) hrefs.push(child.href);
815
+ if (child.href) {
816
+ hrefs.push(child.href);
817
+ addExtra(child.href, child.activeOn);
818
+ }
819
+ addExtra(item.href, child.activeOn);
809
820
  for (const leaf of child.children ?? []) {
810
- if (leaf.href) hrefs.push(leaf.href);
821
+ if (leaf.href) {
822
+ hrefs.push(leaf.href);
823
+ addExtra(leaf.href, leaf.activeOn);
824
+ }
825
+ addExtra(item.href, leaf.activeOn);
811
826
  }
812
827
  }
813
828
  childHrefs.set(item.href, hrefs);
814
829
  }
815
- return (pathname2, href) => isNavItemActive(pathname2, href) || (childHrefs.get(href) ?? []).some((h) => isNavItemActive(pathname2, h));
830
+ return (pathname2, href) => isNavItemActive(pathname2, href) || (childHrefs.get(href) ?? []).some((h) => isNavItemActive(pathname2, h)) || (extra.get(href) ?? []).some((p) => isUnderNavPattern(pathname2, p));
816
831
  }, [navItems]);
817
832
  const derivedBreadcrumbs = useMemo(
818
833
  () => deriveBreadcrumbs(navItems, pathname, { search, origin: meta.origin }),