@the-portland-company/shell 0.98.0 → 0.99.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.
- package/CHANGELOG.md +9 -0
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +1 -1
- package/dist/app-chrome.d.ts +1 -1
- package/dist/app-chrome.js +3 -3
- package/dist/{chunk-WOOBPM4V.js → chunk-PQQLCUNO.js} +188 -21
- package/dist/chunk-PQQLCUNO.js.map +1 -0
- package/dist/{chunk-IVLXZFGV.js → chunk-YMCWLO2L.js} +3 -3
- package/dist/{chunk-IVLXZFGV.js.map → chunk-YMCWLO2L.js.map} +1 -1
- package/dist/{index-CUPeC2Ji.d.cts → index-DhrhpBVm.d.cts} +36 -3
- package/dist/{index-DAD6tSfV.d.ts → index-Di9AyVsU.d.ts} +36 -3
- package/dist/index.cjs +190 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/native.cjs +218 -46
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-WOOBPM4V.js.map +0 -1
package/dist/app-chrome.d.cts
CHANGED
|
@@ -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,
|
|
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 NavFooterLink, Q as NavFooter, U as NavDisplayMode } from './index-DhrhpBVm.cjs';
|
|
4
4
|
import './theme-preference.cjs';
|
|
5
5
|
import './brand-favicon.cjs';
|
|
6
6
|
|
package/dist/app-chrome.d.ts
CHANGED
|
@@ -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,
|
|
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 NavFooterLink, Q as NavFooter, U as NavDisplayMode } from './index-Di9AyVsU.js';
|
|
4
4
|
import './theme-preference.js';
|
|
5
5
|
import './brand-favicon.js';
|
|
6
6
|
|
package/dist/app-chrome.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
5
|
-
export { standardNavIcons } from './chunk-
|
|
4
|
+
import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-YMCWLO2L.js';
|
|
5
|
+
export { standardNavIcons } from './chunk-YMCWLO2L.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
|
-
import { warnDeprecated, NavChromeProvider, FuelAction, NotificationsAction, OrganizationSettingsAction, MyProfileAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-
|
|
7
|
+
import { warnDeprecated, NavChromeProvider, FuelAction, NotificationsAction, OrganizationSettingsAction, MyProfileAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-PQQLCUNO.js';
|
|
8
8
|
import './chunk-BHRVZPZ7.js';
|
|
9
9
|
import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, writeNavDisplayLocal, writeNavDisplayCookie, isNavDisplayPreference, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-7YVJ7HQG.js';
|
|
10
10
|
import { useBrandAssets, BrandFavicon } from './chunk-Q5DTPY5N.js';
|
|
@@ -361,17 +361,19 @@ var TIER_TOOLTIPS = {
|
|
|
361
361
|
inactive: "Inactive: the voter file marks this registration inactive or canceled."
|
|
362
362
|
};
|
|
363
363
|
var DOT_FALLBACK = {
|
|
364
|
+
verified: "#00A651",
|
|
364
365
|
identified: "#a855f7",
|
|
365
366
|
anonymous: "var(--color-graphite, #2b2b2b)",
|
|
366
367
|
stale: "#eab308",
|
|
367
368
|
inactive: "var(--muted, #8a8a8a)"
|
|
368
369
|
};
|
|
369
|
-
function VrmVerifiedBadge({ tier, size, showLabel = true, className, style }) {
|
|
370
|
-
const icon = useBrandAsset("verified-icon");
|
|
370
|
+
function VrmVerifiedBadge({ tier, variant = "pill", size, showLabel = true, className, style }) {
|
|
371
371
|
const known = tier && tier in VRM_TIER_LABELS ? tier : null;
|
|
372
|
+
if (variant === "icon") {
|
|
373
|
+
return known === "verified" ? /* @__PURE__ */ jsx(VerifiedIcon, { size: size ?? 16, className, style }) : null;
|
|
374
|
+
}
|
|
372
375
|
const label = known ? VRM_TIER_LABELS[known] : "Not yet computed";
|
|
373
376
|
const title = known ? TIER_TOOLTIPS[known] : "The VRM Verified tier has not been worked out yet.";
|
|
374
|
-
const iconSize = size ?? 16;
|
|
375
377
|
const dotSize = size ?? 8;
|
|
376
378
|
return /* @__PURE__ */ jsxs(
|
|
377
379
|
"span",
|
|
@@ -395,24 +397,11 @@ function VrmVerifiedBadge({ tier, size, showLabel = true, className, style }) {
|
|
|
395
397
|
...style
|
|
396
398
|
},
|
|
397
399
|
children: [
|
|
398
|
-
|
|
399
|
-
// The box is reserved while the Brand sheet loads; nothing stands in.
|
|
400
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, style: { display: "inline-block", width: iconSize, height: iconSize, flexShrink: 0 }, children: icon ? /* @__PURE__ */ jsx(
|
|
401
|
-
"img",
|
|
402
|
-
{
|
|
403
|
-
src: icon,
|
|
404
|
-
alt: "",
|
|
405
|
-
width: iconSize,
|
|
406
|
-
height: iconSize,
|
|
407
|
-
draggable: false,
|
|
408
|
-
"data-testid": "vrm-verified-icon",
|
|
409
|
-
style: { display: "block", width: iconSize, height: iconSize }
|
|
410
|
-
}
|
|
411
|
-
) : null })
|
|
412
|
-
) : /* @__PURE__ */ jsx(
|
|
400
|
+
/* @__PURE__ */ jsx(
|
|
413
401
|
"span",
|
|
414
402
|
{
|
|
415
403
|
"aria-hidden": true,
|
|
404
|
+
"data-vrm-dot": true,
|
|
416
405
|
style: {
|
|
417
406
|
display: "inline-block",
|
|
418
407
|
width: dotSize,
|
|
@@ -429,6 +418,184 @@ function VrmVerifiedBadge({ tier, size, showLabel = true, className, style }) {
|
|
|
429
418
|
}
|
|
430
419
|
);
|
|
431
420
|
}
|
|
421
|
+
function VerifiedIcon({ size, className, style }) {
|
|
422
|
+
const icon = useBrandAsset("verified-icon");
|
|
423
|
+
return (
|
|
424
|
+
// The box is reserved while the Brand sheet loads; nothing stands in.
|
|
425
|
+
/* @__PURE__ */ jsx(
|
|
426
|
+
"span",
|
|
427
|
+
{
|
|
428
|
+
"data-vrm-tier": "verified",
|
|
429
|
+
"data-vrm-variant": "icon",
|
|
430
|
+
role: "img",
|
|
431
|
+
"aria-label": VRM_TIER_LABELS.verified,
|
|
432
|
+
title: VRM_VERIFIED_TOOLTIP,
|
|
433
|
+
className,
|
|
434
|
+
style: { display: "inline-block", width: size, height: size, flexShrink: 0, verticalAlign: "middle", ...style },
|
|
435
|
+
children: icon ? /* @__PURE__ */ jsx(
|
|
436
|
+
"img",
|
|
437
|
+
{
|
|
438
|
+
src: icon,
|
|
439
|
+
alt: "",
|
|
440
|
+
width: size,
|
|
441
|
+
height: size,
|
|
442
|
+
draggable: false,
|
|
443
|
+
"data-testid": "vrm-verified-icon",
|
|
444
|
+
style: { display: "block", width: size, height: size }
|
|
445
|
+
}
|
|
446
|
+
) : null
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
var CONTACTS_ORIGIN = "https://contacts.politogyvrm.com";
|
|
452
|
+
function withOrg(path, orgId) {
|
|
453
|
+
return orgId ? `${path}?org=${encodeURIComponent(orgId)}` : path;
|
|
454
|
+
}
|
|
455
|
+
function contactEmbedUrl(contactId, orgId, origin = CONTACTS_ORIGIN) {
|
|
456
|
+
return withOrg(`${origin}/contacts/embed/${encodeURIComponent(contactId)}`, orgId);
|
|
457
|
+
}
|
|
458
|
+
function contactPageUrl(contactId, orgId, origin = CONTACTS_ORIGIN) {
|
|
459
|
+
return withOrg(`${origin}/contacts/${encodeURIComponent(contactId)}`, orgId);
|
|
460
|
+
}
|
|
461
|
+
function prefersReducedMotion() {
|
|
462
|
+
try {
|
|
463
|
+
return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
464
|
+
} catch {
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
var iconButton = {
|
|
469
|
+
display: "inline-flex",
|
|
470
|
+
alignItems: "center",
|
|
471
|
+
justifyContent: "center",
|
|
472
|
+
borderRadius: 9999,
|
|
473
|
+
border: "1px solid var(--line, #d7dadf)",
|
|
474
|
+
padding: 6,
|
|
475
|
+
background: "transparent",
|
|
476
|
+
color: "var(--muted, #5c6b80)",
|
|
477
|
+
cursor: "pointer"
|
|
478
|
+
};
|
|
479
|
+
function ContactSlideIn({ contactId, orgId, onClose, contactsOrigin = CONTACTS_ORIGIN }) {
|
|
480
|
+
const [shown, setShown] = useState(false);
|
|
481
|
+
useEffect(() => {
|
|
482
|
+
if (!contactId) {
|
|
483
|
+
setShown(false);
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (prefersReducedMotion()) {
|
|
487
|
+
setShown(true);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const id = requestAnimationFrame(() => setShown(true));
|
|
491
|
+
return () => cancelAnimationFrame(id);
|
|
492
|
+
}, [contactId]);
|
|
493
|
+
useEffect(() => {
|
|
494
|
+
if (!contactId) return;
|
|
495
|
+
const onKey = (event) => {
|
|
496
|
+
if (event.key === "Escape") onClose();
|
|
497
|
+
};
|
|
498
|
+
document.addEventListener("keydown", onKey);
|
|
499
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
500
|
+
}, [contactId, onClose]);
|
|
501
|
+
if (!contactId) return null;
|
|
502
|
+
return /* @__PURE__ */ jsx(
|
|
503
|
+
"div",
|
|
504
|
+
{
|
|
505
|
+
"data-testid": "contact-slide-in-overlay",
|
|
506
|
+
onClick: onClose,
|
|
507
|
+
style: { position: "fixed", inset: 0, zIndex: 60, background: "rgba(0, 0, 0, 0.4)" },
|
|
508
|
+
children: /* @__PURE__ */ jsxs(
|
|
509
|
+
"aside",
|
|
510
|
+
{
|
|
511
|
+
role: "dialog",
|
|
512
|
+
"aria-modal": "true",
|
|
513
|
+
"aria-label": "Contact card",
|
|
514
|
+
"data-testid": "contact-slide-in",
|
|
515
|
+
onClick: (event) => event.stopPropagation(),
|
|
516
|
+
style: {
|
|
517
|
+
position: "absolute",
|
|
518
|
+
top: 0,
|
|
519
|
+
right: 0,
|
|
520
|
+
bottom: 0,
|
|
521
|
+
width: "100%",
|
|
522
|
+
maxWidth: 672,
|
|
523
|
+
display: "flex",
|
|
524
|
+
flexDirection: "column",
|
|
525
|
+
background: "var(--panel, #ffffff)",
|
|
526
|
+
color: "var(--foreground, #2f3136)",
|
|
527
|
+
borderLeft: "1px solid var(--line, #d7dadf)",
|
|
528
|
+
boxShadow: "var(--shadow-soft, 0 10px 28px rgba(27, 28, 32, 0.14))",
|
|
529
|
+
transform: shown ? "translateX(0)" : "translateX(100%)",
|
|
530
|
+
transition: "transform 220ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
531
|
+
},
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ jsxs(
|
|
534
|
+
"div",
|
|
535
|
+
{
|
|
536
|
+
style: {
|
|
537
|
+
display: "flex",
|
|
538
|
+
alignItems: "center",
|
|
539
|
+
justifyContent: "space-between",
|
|
540
|
+
gap: 12,
|
|
541
|
+
borderBottom: "1px solid var(--line, #d7dadf)",
|
|
542
|
+
padding: "12px 24px"
|
|
543
|
+
},
|
|
544
|
+
children: [
|
|
545
|
+
/* @__PURE__ */ jsx(
|
|
546
|
+
"p",
|
|
547
|
+
{
|
|
548
|
+
style: {
|
|
549
|
+
margin: 0,
|
|
550
|
+
fontSize: 12,
|
|
551
|
+
fontWeight: 600,
|
|
552
|
+
letterSpacing: "0.18em",
|
|
553
|
+
textTransform: "uppercase",
|
|
554
|
+
color: "var(--muted, #5c6b80)"
|
|
555
|
+
},
|
|
556
|
+
children: "Contact Card"
|
|
557
|
+
}
|
|
558
|
+
),
|
|
559
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
560
|
+
/* @__PURE__ */ jsx(
|
|
561
|
+
"a",
|
|
562
|
+
{
|
|
563
|
+
href: contactPageUrl(contactId, orgId, contactsOrigin),
|
|
564
|
+
target: "_top",
|
|
565
|
+
style: { fontSize: 13, fontWeight: 600, color: "var(--color-race-blue-500, #007bff)", textDecoration: "none" },
|
|
566
|
+
children: "Open in Contacts"
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Close contact card", title: "Close", onClick: onClose, style: iconButton, children: /* @__PURE__ */ jsxs("svg", { "aria-hidden": true, width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
570
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
571
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
572
|
+
] }) })
|
|
573
|
+
] })
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
/* @__PURE__ */ jsx(
|
|
578
|
+
"iframe",
|
|
579
|
+
{
|
|
580
|
+
title: "Contact card",
|
|
581
|
+
src: contactEmbedUrl(contactId, orgId, contactsOrigin),
|
|
582
|
+
"data-testid": "contact-slide-in-frame",
|
|
583
|
+
style: { flex: 1, minHeight: 0, width: "100%", border: 0, background: "var(--panel, #ffffff)" }
|
|
584
|
+
},
|
|
585
|
+
contactId
|
|
586
|
+
)
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
)
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
function useContactSlideIn() {
|
|
594
|
+
const [contactId, setContactId] = useState(null);
|
|
595
|
+
const open = useCallback((id) => setContactId(id), []);
|
|
596
|
+
const close = useCallback(() => setContactId(null), []);
|
|
597
|
+
return { contactId, open, close };
|
|
598
|
+
}
|
|
432
599
|
function FormColumn({ children, className }) {
|
|
433
600
|
return /* @__PURE__ */ jsx("div", { "data-shell-form-column": "", className: clsx2("w-full max-w-[960px]", className), children });
|
|
434
601
|
}
|
|
@@ -2818,6 +2985,6 @@ function BreadcrumbBarView({
|
|
|
2818
2985
|
);
|
|
2819
2986
|
}
|
|
2820
2987
|
|
|
2821
|
-
export { AI_CREDITS_STATE_TITLES, AiCreditsState, BreadcrumbBarView, CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, Card, CreditsAction, FormColumn, FuelAction, HeaderTabBar, KNOWN_TAB_GLYPHS, MyProfileAction, NAV_DISPLAY_OPTIONS, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, OrganizationSettingsAction, PageHeaderView, RowMenu, RowMenuItem, SPECS_ORIGIN, SpecOverlayAction, SpeculationRulesScript, SupportAction, TOPBAR_GLYPH_SIZE, TopBarCountBadge, TopBarLinkAction, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, VRM_TIER_LABELS, VRM_VERIFIED_TOOLTIP, VrmVerifiedBadge, aiCreditsWalletUrl, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, emptyNotificationsFeed, normalizeNotificationsFeed, resolveBrandGlyph, resolveOrgLogoUrl, resolveTabGlyph, rowMenuPosition, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference, useTopBarIconSlotGlyph, warnDeprecated };
|
|
2822
|
-
//# sourceMappingURL=chunk-
|
|
2823
|
-
//# sourceMappingURL=chunk-
|
|
2988
|
+
export { AI_CREDITS_STATE_TITLES, AiCreditsState, BreadcrumbBarView, CONTACTS_ORIGIN, CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, Card, ContactSlideIn, CreditsAction, FormColumn, FuelAction, HeaderTabBar, KNOWN_TAB_GLYPHS, MyProfileAction, NAV_DISPLAY_OPTIONS, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, OrganizationSettingsAction, PageHeaderView, RowMenu, RowMenuItem, SPECS_ORIGIN, SpecOverlayAction, SpeculationRulesScript, SupportAction, TOPBAR_GLYPH_SIZE, TopBarCountBadge, TopBarLinkAction, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, VRM_TIER_LABELS, VRM_VERIFIED_TOOLTIP, VrmVerifiedBadge, aiCreditsWalletUrl, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, contactEmbedUrl, contactPageUrl, createCommsNotificationsAdapter, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, emptyNotificationsFeed, normalizeNotificationsFeed, resolveBrandGlyph, resolveOrgLogoUrl, resolveTabGlyph, rowMenuPosition, topBarIconButtonClass, useChromeMe, useChromeOrgs, useContactSlideIn, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference, useTopBarIconSlotGlyph, warnDeprecated };
|
|
2989
|
+
//# sourceMappingURL=chunk-PQQLCUNO.js.map
|
|
2990
|
+
//# sourceMappingURL=chunk-PQQLCUNO.js.map
|