@the-portland-company/shell 0.81.2 → 0.82.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, f as NavIcon, N as NavItem, g as NavBreadcrumb, h as StandardNavMode, i as NavLinkComponent, j as NavChromeFetcher, k as NavMode, l as NavUserMenu, m as NavOrgOption, b as NotificationsAdapter, o as NavFooterLink, p as NavFooter, q as NavDisplayMode } from './index-_Y7jOKPN.cjs';
3
+ import { S as StandardNavIconKey, f as NavIcon, N as NavItem, g as NavBreadcrumb, h as StandardNavMode, i as NavLinkComponent, j as NavChromeFetcher, k as NavMode, l as NavUserMenu, m as NavOrgOption, b as NotificationsAdapter, o as NavFooterLink, p as NavFooter, q as NavDisplayMode } from './index-C3PFq1hl.cjs';
4
4
  import './theme-preference.cjs';
5
5
 
6
6
  /**
@@ -181,6 +181,21 @@ type PolitogyAppSession = {
181
181
  */
182
182
  userName?: string | null;
183
183
  };
184
+ /**
185
+ * Optional DATA plumbing for apps whose session/auth differs — never styling.
186
+ *
187
+ * Everything here is about WHERE data comes from (which fetcher, which org
188
+ * state, which routes an app owns), not what the chrome looks like. Adding a
189
+ * visual option to this type would re-open the drift this component exists to
190
+ * close.
191
+ */
192
+ /**
193
+ * Universal-search placeholder, per Mode (Reference/UI-Platform v56 "Top bar —
194
+ * required elements", decided by Ben 2026-10-12). The Glossary term is Tribe,
195
+ * so the design frame's "segments" is not used. An app may still pass its own
196
+ * copy through `data.searchPlaceholder`.
197
+ */
198
+ declare const MODE_SEARCH_PLACEHOLDER: Record<string, string>;
184
199
  type PolitogyFrameData = {
185
200
  /** Chrome-API fetcher override for apps that authenticate client-side. */
186
201
  fetchJson?: NavChromeFetcher;
@@ -565,4 +580,4 @@ type UseChromeModeArg = ModeId | {
565
580
  */
566
581
  declare function useChromeMode(arg?: UseChromeModeArg): NavMode;
567
582
 
568
- export { type BootPhase, type BootProgress, type BootStageId, type ChromeDevNotesConfig, type ChromeIdentity, ChromeTopBarActions, type ControlledOrgState, LoadingScreen, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, type PolitogyAppKey, type PolitogyAppMode, type PolitogyAppSession, type PolitogyBuildMeta, type PolitogyFrameData, type PolitogyFrameGrant, type PolitogyGrantedFrame, type ResolvedIdentity, type TokenOrgState, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, standardNavIcons, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
583
+ export { type BootPhase, type BootProgress, type BootStageId, type ChromeDevNotesConfig, type ChromeIdentity, ChromeTopBarActions, type ControlledOrgState, LoadingScreen, MODE_SEARCH_PLACEHOLDER, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, type PolitogyAppKey, type PolitogyAppMode, type PolitogyAppSession, type PolitogyBuildMeta, type PolitogyFrameData, type PolitogyFrameGrant, type PolitogyGrantedFrame, type ResolvedIdentity, type TokenOrgState, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, standardNavIcons, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
@@ -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, f as NavIcon, N as NavItem, g as NavBreadcrumb, h as StandardNavMode, i as NavLinkComponent, j as NavChromeFetcher, k as NavMode, l as NavUserMenu, m as NavOrgOption, b as NotificationsAdapter, o as NavFooterLink, p as NavFooter, q as NavDisplayMode } from './index-bYu6DxNt.js';
3
+ import { S as StandardNavIconKey, f as NavIcon, N as NavItem, g as NavBreadcrumb, h as StandardNavMode, i as NavLinkComponent, j as NavChromeFetcher, k as NavMode, l as NavUserMenu, m as NavOrgOption, b as NotificationsAdapter, o as NavFooterLink, p as NavFooter, q as NavDisplayMode } from './index-CwTnsR9R.js';
4
4
  import './theme-preference.js';
5
5
 
6
6
  /**
@@ -181,6 +181,21 @@ type PolitogyAppSession = {
181
181
  */
182
182
  userName?: string | null;
183
183
  };
184
+ /**
185
+ * Optional DATA plumbing for apps whose session/auth differs — never styling.
186
+ *
187
+ * Everything here is about WHERE data comes from (which fetcher, which org
188
+ * state, which routes an app owns), not what the chrome looks like. Adding a
189
+ * visual option to this type would re-open the drift this component exists to
190
+ * close.
191
+ */
192
+ /**
193
+ * Universal-search placeholder, per Mode (Reference/UI-Platform v56 "Top bar —
194
+ * required elements", decided by Ben 2026-10-12). The Glossary term is Tribe,
195
+ * so the design frame's "segments" is not used. An app may still pass its own
196
+ * copy through `data.searchPlaceholder`.
197
+ */
198
+ declare const MODE_SEARCH_PLACEHOLDER: Record<string, string>;
184
199
  type PolitogyFrameData = {
185
200
  /** Chrome-API fetcher override for apps that authenticate client-side. */
186
201
  fetchJson?: NavChromeFetcher;
@@ -565,4 +580,4 @@ type UseChromeModeArg = ModeId | {
565
580
  */
566
581
  declare function useChromeMode(arg?: UseChromeModeArg): NavMode;
567
582
 
568
- export { type BootPhase, type BootProgress, type BootStageId, type ChromeDevNotesConfig, type ChromeIdentity, ChromeTopBarActions, type ControlledOrgState, LoadingScreen, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, type PolitogyAppKey, type PolitogyAppMode, type PolitogyAppSession, type PolitogyBuildMeta, type PolitogyFrameData, type PolitogyFrameGrant, type PolitogyGrantedFrame, type ResolvedIdentity, type TokenOrgState, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, standardNavIcons, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
583
+ export { type BootPhase, type BootProgress, type BootStageId, type ChromeDevNotesConfig, type ChromeIdentity, ChromeTopBarActions, type ControlledOrgState, LoadingScreen, MODE_SEARCH_PLACEHOLDER, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, type PolitogyAppKey, type PolitogyAppMode, type PolitogyAppSession, type PolitogyBuildMeta, type PolitogyFrameData, type PolitogyFrameGrant, type PolitogyGrantedFrame, type ResolvedIdentity, type TokenOrgState, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, standardNavIcons, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
3
- import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-MYY6N6D4.js';
4
- export { standardNavIcons } from './chunk-MYY6N6D4.js';
3
+ import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-VWY6IIAR.js';
4
+ export { standardNavIcons } from './chunk-VWY6IIAR.js';
5
5
  import { warnDeprecated, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-L73FZKGE.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';
@@ -593,8 +593,10 @@ var POLITOGY_APPS = {
593
593
  canvass: { title: "Field Canvassing", origin: "https://canvass.politogyvrm.com", storagePrefix: "canvass", mode: "campaign", grants: ["title"] },
594
594
  signs: { title: "Sign Mapping", origin: "https://signs.politogyvrm.com", storagePrefix: "signs", mode: "campaign", grants: ["title"] }
595
595
  };
596
- var DEFAULT_SEARCH_PLACEHOLDER = {
597
- contacts: "Search contacts, segments, forms"
596
+ var MODE_SEARCH_PLACEHOLDER = {
597
+ relationship: "Search contacts, Tribes, forms",
598
+ campaign: "Search voters, walk lists, polls",
599
+ petition: "Search petitions, sheets, circulators"
598
600
  };
599
601
  function PolitogyAppFrame({
600
602
  app,
@@ -872,7 +874,9 @@ function FrameBody({
872
874
  // search is the only thing on the left end of the bar. No app wires
873
875
  // search yet, so this stays decorative (`NavTopBarProps.search` — "an
874
876
  // app that has not wired search yet still gets the correct chrome").
875
- search: { placeholder: data?.searchPlaceholder ?? DEFAULT_SEARCH_PLACEHOLDER[app] ?? "Search" },
877
+ search: {
878
+ placeholder: data?.searchPlaceholder ?? MODE_SEARCH_PLACEHOLDER[appMode ?? mode.id ?? "relationship"] ?? "Search"
879
+ },
876
880
  // No Build notes control (Reference/UI-Platform, decided 2026-10-03).
877
881
  // The action cluster is IDENTICAL everywhere — core included. Page
878
882
  // actions sit BEFORE it, never inside it, so the Alerts bell keeps its
@@ -1518,6 +1522,7 @@ function useChromeMode(arg = {}) {
1518
1522
  const selected = selectedModeId ? options.find((m) => m.id === selectedModeId) ?? null : null;
1519
1523
  const current = pinned ?? selected ?? options[0] ?? MODE_DEFS.find((m) => m.id === fallbackModeId) ?? MODE_DEFS[0];
1520
1524
  return {
1525
+ id: current.id,
1521
1526
  label: current.label,
1522
1527
  icon: current.icon,
1523
1528
  // Left-Navigation §7 / Reference/UI-Platform: always the row of three icon
@@ -1548,6 +1553,6 @@ function useChromeMode(arg = {}) {
1548
1553
  };
1549
1554
  }
1550
1555
 
1551
- export { ChromeTopBarActions, LoadingScreen, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
1556
+ export { ChromeTopBarActions, LoadingScreen, MODE_SEARCH_PLACEHOLDER, POLITOGY_APPS, PolitogyAppChrome, PolitogyAppFrame, deriveBreadcrumbs, footerLinks, looksLikeEmail, modeLandingHref, resolveIdentity, useChromeFooter, useChromeIdentity, useChromeMode, useChromeState, useChromeUserMenu, useIsSuperAdmin };
1552
1557
  //# sourceMappingURL=app-chrome.js.map
1553
1558
  //# sourceMappingURL=app-chrome.js.map