import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode, CSSProperties, ComponentType } from 'react'; import { ThemePreference as ThemePreference$1 } from './theme-preference.cjs'; import './brand-favicon.cjs'; type CardProps = { title?: string; children: ReactNode; minH?: string | number; className?: string; style?: CSSProperties; [key: string]: unknown; }; declare function Card({ title, children, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element; type AiCreditsStateKind = 'out' | 'paused' | 'waiting'; /** Organization Settings → Subscription & Billing → Wallet, on this organization. */ declare function aiCreditsWalletUrl(orgId?: string | null): string; declare const AI_CREDITS_STATE_TITLES: Record; type AiCreditsStateProps = { kind: AiCreditsStateKind; orgId?: string | null; /** Account Admins see the Wallet buttons; others are told to ask one. */ isAccountAdmin: boolean; /** paused: when the last output was made; null when there has been none. */ lastOutputAt?: Date | string | null; /** Shows "Check again" (re-ask can-start). */ onCheckAgain?: () => void; /** Overrides the time format (tests, or an app's own locale). */ formatTime?: (at: Date) => string; className?: string; style?: CSSProperties; }; declare function AiCreditsState({ kind, orgId, isAccountAdmin, lastOutputAt, onCheckAgain, formatTime, className, style, }: AiCreditsStateProps): react_jsx_runtime.JSX.Element; type RowMenuPlacement = 'below' | 'above'; /** * Where the panel goes: below the trigger, right-aligned to it, unless it does * not fit below and there is more room above. Clamped inside the viewport. */ declare function rowMenuPosition(trigger: { top: number; bottom: number; right: number; }, panel: { width: number; height: number; }, viewport: { width: number; height: number; }): { top: number; left: number; placement: RowMenuPlacement; }; declare function RowMenu({ label, title, icon, children, triggerClassName, triggerStyle, panelClassName, panelStyle, onOpenChange, }: { /** The trigger's accessible name, e.g. "More actions for Spring appeal". */ label?: string; /** Hover text on the trigger. */ title?: string; /** The trigger's content; defaults to "⋯". */ icon?: ReactNode; /** Menu items: give each role="menuitem" (or use RowMenuItem). */ children: ReactNode; triggerClassName?: string; triggerStyle?: CSSProperties; panelClassName?: string; panelStyle?: CSSProperties; onOpenChange?: (open: boolean) => void; }): react_jsx_runtime.JSX.Element; /** A plain button menu item with the default look. Any element with role="menuitem" works too. */ declare function RowMenuItem({ onSelect, disabled, danger, className, style, children, }: { onSelect?: () => void; disabled?: boolean; danger?: boolean; className?: string; style?: CSSProperties; children: ReactNode; }): react_jsx_runtime.JSX.Element; type VrmVerifiedTier = 'verified' | 'identified' | 'anonymous' | 'stale' | 'inactive'; declare const VRM_VERIFIED_TOOLTIP = "Politogy has confirmed this is a real, registered voter."; declare const VRM_TIER_LABELS: Record; interface VrmVerifiedBadgeProps { /** The person's tier; null draws "Not yet computed". */ tier: VrmVerifiedTier | null | undefined; /** * `pill` (default): a dot and the tier name. `icon`: the Brand verifiedIcon * alone, for a contact view's name line; renders nothing unless Verified. */ variant?: 'pill' | 'icon'; /** Icon / dot size in px. Default 16 (icon) / 8 (dot). */ size?: number; /** Pill only: show the tier name beside the dot. Default true. */ showLabel?: boolean; className?: string; style?: CSSProperties; } declare function VrmVerifiedBadge({ tier, variant, size, showLabel, className, style }: VrmVerifiedBadgeProps): react_jsx_runtime.JSX.Element | null; declare const CONTACTS_ORIGIN = "https://contacts.politogyvrm.com"; interface ContactSlideInProps { /** UVP id to show; null keeps the panel closed. */ contactId: string | null; /** The active organization's id (full uuid), passed to Contacts as `?org=`. */ orgId?: string | null; onClose: () => void; /** Contacts origin. Default https://contacts.politogyvrm.com. */ contactsOrigin?: string; } /** The chrome-less Card view the panel frames. */ declare function contactEmbedUrl(contactId: string, orgId?: string | null, origin?: string): string; /** The Card's full page in Contacts ("Open in Contacts"). */ declare function contactPageUrl(contactId: string, orgId?: string | null, origin?: string): string; declare function ContactSlideIn({ contactId, orgId, onClose, contactsOrigin }: ContactSlideInProps): react_jsx_runtime.JSX.Element | null; /** * Panel state for any page that lists contacts: * * const slideIn = useContactSlideIn() * * */ declare function useContactSlideIn(): { contactId: string | null; open: (id: string) => void; close: () => void; }; type FormColumnProps = { children: ReactNode; className?: string; }; /** * The ONE constrained layout inside the frame's fluid `
` (Brand guideline * "Content width is fluid"): a single left-aligned column, 960px max, for form * and settings pages — single-record edit forms, Organization Settings tabs, * My Profile, activation and setup flows. Data surfaces (tables, dashboards, * maps) never use it; they take the full fluid width. * * It adds no gutter of its own — `
` already owns the 24px / 16px gutter — * and it is never centered. There is no width prop on purpose: a per-page * max-width is exactly what the guideline forbids. */ declare function FormColumn({ children, className }: FormColumnProps): react_jsx_runtime.JSX.Element; type BreadcrumbItem$1 = { label: string; href?: string; }; /** The three Modes a page header's eyebrow can announce (Reference/UI-Platform * → "Per-mode branding"). */ type PageHeaderMode = 'relationship' | 'campaign' | 'petition'; type PageHeaderProps = { title?: ReactNode; /** * The operating Mode this page belongs to. When set, the 11px uppercase * mode eyebrow ("Relationship mode" / "Campaign mode" / "Petition mode") * renders above the title by DEFAULT — Reference/UI-Platform → "Page * header": "Left: an 11px uppercase mode eyebrow ... in the mode color * (`modes..primary`)". Pass `showEyebrow={false}` to suppress it. */ mode?: PageHeaderMode; /** Overrides the eyebrow text the `mode` default would produce. */ eyebrow?: string; /** Set false to suppress the eyebrow even when `mode` is passed. Default true. */ showEyebrow?: boolean; /** Optional one-line subtitle, 15px G4, directly under the title. */ subtitle?: ReactNode; /** @deprecated The breadcrumb trail is retired. Accepted for compatibility; renders nothing and warns once in dev. */ breadcrumbs?: BreadcrumbItem$1[]; actions?: ReactNode; tabBar?: ReactNode; /** @deprecated Ignored. The header spans its container; pages choose `FormColumn` (960px) or the fluid frame. */ maxW?: string; hideSidebar?: boolean; }; type BreadcrumbItem = { label: string; href?: string; }; type BreadcrumbBarProps = { breadcrumbs?: BreadcrumbItem[]; actions?: ReactNode; maxW?: string; }; type HeaderTabBarItem = { id: string; label: string; icon: ReactNode; disabled?: boolean; }; type HeaderTabBarProps = { items: HeaderTabBarItem[]; activeId: string; onChange: (id: string) => void; className?: string; ariaLabel?: string; }; /** * @deprecated Use `NavTabStrip` from `@the-portland-company/shell/native` — * the ONE canonical page tab strip (underlined text tabs with a 2px underline * in the mode color, Brand guideline "Tabs are an underlined strip"). * `HeaderTabBar` is icon-only and filled, cannot render link tabs, and needs * Chakra. Warns in development. */ declare function HeaderTabBar({ items, activeId, onChange, className, ariaLabel, }: HeaderTabBarProps): react_jsx_runtime.JSX.Element; /** A tab icon: the same shape `NavTabStrip` passes (`size`, `className`, `strokeWidth`). */ type TabGlyphComponent = ComponentType<{ size?: number; className?: string; strokeWidth?: number; }>; /** * Resolve a Brand tab-icon name to its component. Trims, strips surrounding * quotes (the CSS var value is a quoted string) and lowercases. Returns null * for an empty or unknown name so `NavTabStrip` falls back to the tab's own * `icon` prop: an unrecognised token never renders a broken or empty icon. */ declare function resolveTabGlyph(name: string | null | undefined): TabGlyphComponent | null; /** The tab icon names the shell knows, in vocabulary order. The Brand editor offers only these. */ declare const KNOWN_TAB_GLYPHS: readonly string[]; /** * The six canonical top-bar action slots (Reference/Global-Rules v9 → top-bar * icons). Each slot's GLYPH is unique and comes from the Brand API * `topbarIcons.items.*` tokens, exposed as `--topbar-icon-` CSS vars * whose value is the brand-icon NAME. Every OTHER property — size, gap, color, * hover, selected — is universal across all six slots. */ type TopBarIconSlot = 'comms-fuel' | 'apps' | 'notifications' | 'alerts' | 'support' | 'dark-mode'; type CreditHealthState = "good" | "low" | "out" | "not_in_use"; /** What the icon shows: the worst state among the types in use, or unknown. */ type CreditsIconState = "good" | "low" | "out" | "unknown"; type CreditTypeKey = "signal" | "broadcast" | "ai" | "enhancement"; declare const CREDIT_TYPE_ORDER: readonly CreditTypeKey[]; declare const CREDIT_TYPE_LABELS: Record; /** The slice of a channel the health reads. Older payloads carry none of it. */ type CreditHealthFields = { remainingUnits: number; state?: CreditHealthState | null; fullMarkUnits?: number | null; daysOfUseLeft?: number | null; }; /** * The icon's colour is the worst state among the credit types in use: green * when every one is Good, yellow when at least one is Low, red when at least * one is Out. Not in use never changes it; a type with no state is unknown. * With nothing in use, or nothing known, the icon is neutral. */ declare function creditsIconState(channels: ReadonlyArray): CreditsIconState; /** * Gauge level against the full mark (0..1), never more than full. Null when * there is nothing to draw: not in use, unknown, or no full mark. */ declare function creditGaugeRatio(channel: CreditHealthFields | null | undefined): number | null; declare function creditStateWord(state: CreditHealthState | null | undefined): string; /** * One tooltip line per type: "Signal Credits: 38 left, about 1 day at your * recent pace". A type not in use says so; a type without a state says only * what is left. */ declare function creditTooltipLine(type: CreditTypeKey, channel: CreditHealthFields | null | undefined): string; /** The icon's accessible name carries the state, so colour is never the only signal. */ declare function creditsAriaLabel(channels: Partial>): string; type CommsNotificationKind = 'notification' | 'alert'; /** One row of the bell feed, as the shell reads it (camelCased). */ type CommsNotification = { id: string; kind: CommsNotificationKind; title: string; body: string; icon: string | null; link: string | null; readAt: string | null; orgId: string | null; createdAt: string | null; }; type NotificationsFeed = { /** Alerts first, then notifications, newest first (Comms sorts them). */ notifications: CommsNotification[]; /** One badge number: unread notifications plus unresolved alerts (Spec §6.3). */ badge: number; }; type NotificationsAdapter = { /** Read the signed-in viewer's feed, scoped to an org when one is active. */ list(orgId: string | null): Promise; /** Mark one row read. Resolves false on any failure, never throws. */ markRead(id: string): Promise; /** Archive one row (hides it from the feed). Resolves false on failure. */ archive(id: string): Promise; /** Resolve one alert. Comms rejects this for non-alert rows. */ resolve(id: string): Promise; }; /** The empty bell: what every degraded path renders. Always a fresh object. */ declare function emptyNotificationsFeed(): NotificationsFeed; /** * Shape a raw Comms body into the feed. Tolerant on purpose: unknown keys are * ignored, rows without an id are dropped, and archived rows are never shown. */ declare function normalizeNotificationsFeed(raw: unknown): NotificationsFeed; /** * Build the comms-backed adapter over the app's chrome fetcher. A null fetcher * (no chrome proxy wired) yields the empty bell with no network activity. */ declare function createCommsNotificationsAdapter(fetchJson: NavChromeFetcher | null): NotificationsAdapter; type NavIconLike = ComponentType<{ size?: number; className?: string; }>; /** * The retired VRM core origin. Kept ONLY for `resolveOrgLogoUrl`: the signed * storage proxy that serves organization logos is part of the data service * that stays behind the retired UI. */ declare const CORE_APP_ORIGIN = "https://app.politogyvrm.com"; /** Subscription & Billing tab of Organization Settings (fuel top-up). */ declare const CORE_BILLING_PATH = "/organization-settings/subscription-billing"; /** Specs origin — same env-aware-constant pattern as CORE_APP_ORIGIN. */ declare const SPECS_ORIGIN = "https://specs.politogyvrm.com"; /** * Resolve an organization logo URL for rendering in ANY app. * * `organizations.logo_url` is authored by VRM core and stored as a ROOT-RELATIVE * core route — `/api/storage/public?bucket=organization-logos&path=/logo.png` * (the signed-storage proxy). VRM core renders it correctly because that path * resolves against its own origin; every other app resolves it against its own * origin (forms.politogyvrm.com/api/storage/public), gets a 404, and shows a * broken image. The chrome API passes the stored value through verbatim, so the * resolution belongs here — one definition for every app, core included. * * Absolute URLs (http/https/data/blob) pass through untouched. */ declare function resolveOrgLogoUrl(url: string | null | undefined): string | undefined; type TopBarIconTone = 'default' | 'ok' | 'low' | 'warning' | 'danger'; declare function topBarIconButtonClass(tone?: TopBarIconTone): string; declare function TopBarCountBadge({ count }: { count: number; }): react_jsx_runtime.JSX.Element | null; /** * The shared hover tooltip every top-bar control renders BELOW itself: an * up-pointing arrow at the icon, a bold title line and a muted description. * Pure CSS (group-hover) so it works on ,