@the-portland-company/shell 0.76.9 → 0.76.11

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,11 +1,11 @@
1
1
  "use client";
2
2
  import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
3
- import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useThemePreference, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-RBJGWQJX.js';
4
- export { standardNavIcons } from './chunk-RBJGWQJX.js';
3
+ import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useThemePreference, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-34NXDWIS.js';
4
+ export { standardNavIcons } from './chunk-34NXDWIS.js';
5
5
  import { warnDeprecated } from './chunk-MY6G3LMN.js';
6
6
  import './chunk-BHRVZPZ7.js';
7
7
  import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, writeNavDisplayLocal, writeNavDisplayCookie, isNavDisplayPreference, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-7YVJ7HQG.js';
8
- import { readOrgSelectorFromUrl, matchOrgSelector, isOrgId, switchActiveOrg, ACTIVE_ORG_QUERY_PARAM, ORG_ID_QUERY_PARAM, orgIdTail, writeActiveOrgCookie, resolveActiveOrg, readActiveOrgCookie } from './chunk-BWV52AT6.js';
8
+ import { readOrgSelectorFromUrl, matchOrgSelector, isOrgId, switchActiveOrg, ACTIVE_ORG_QUERY_PARAM, ORG_ID_QUERY_PARAM, orgIdTail, syncOrgIdInUrl, writeActiveOrgCookie, resolveActiveOrg, readActiveOrgCookie } from './chunk-FBUF7LUE.js';
9
9
  import { createContext, useMemo, useRef, useEffect, useState, useCallback, useContext } from 'react';
10
10
  import { DevNotesMenu, createDevNotesClient, DevNotesProvider, DevNotesTaskListModal, DevNotesOverlay } from '@the-portland-company/devnotes';
11
11
  import { LuNotebookPen, LuContactRound, LuMegaphone, LuFilePenLine } from 'react-icons/lu';
@@ -966,15 +966,9 @@ function TokenChromeStateProvider({
966
966
  writeNavDisplayCookie(m);
967
967
  }, []);
968
968
  useEffect(() => {
969
- if (!isOrgId(orgId)) return;
970
969
  try {
971
- const url = new URL(window.location.href);
972
- const tail = orgIdTail(orgId);
973
- if (url.searchParams.has(ACTIVE_ORG_QUERY_PARAM) || url.searchParams.get(ORG_ID_QUERY_PARAM) !== tail) {
974
- url.searchParams.delete(ACTIVE_ORG_QUERY_PARAM);
975
- url.searchParams.set(ORG_ID_QUERY_PARAM, tail);
976
- window.history.replaceState(window.history.state, "", url.toString());
977
- }
970
+ const next = syncOrgIdInUrl(window.location.href, orgId);
971
+ if (next) window.history.replaceState(window.history.state, "", next);
978
972
  } catch {
979
973
  }
980
974
  }, [orgId]);