@the-portland-company/shell 0.97.0 → 0.98.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 +17 -0
- package/dist/app-chrome.cjs +39 -29
- 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 +4 -4
- package/dist/brand-favicon.cjs.map +1 -1
- package/dist/brand-favicon.js +1 -1
- package/dist/{chunk-WQR42AGC.js → chunk-IVLXZFGV.js} +32 -29
- package/dist/chunk-IVLXZFGV.js.map +1 -0
- package/dist/{chunk-BMR5WAWH.js → chunk-Q5DTPY5N.js} +26 -3
- package/dist/chunk-Q5DTPY5N.js.map +1 -0
- package/dist/{chunk-VAQNZD37.js → chunk-WOOBPM4V.js} +99 -7
- package/dist/chunk-WOOBPM4V.js.map +1 -0
- package/dist/{index-BaUIPQpN.d.cts → index-CUPeC2Ji.d.cts} +46 -2
- package/dist/{index-BEMGfLpI.d.ts → index-DAD6tSfV.d.ts} +46 -2
- package/dist/index.cjs +139 -23
- 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 +3 -3
- package/dist/native.cjs +153 -31
- 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 +3 -3
- package/package.json +1 -1
- package/dist/chunk-BMR5WAWH.js.map +0 -1
- package/dist/chunk-VAQNZD37.js.map +0 -1
- package/dist/chunk-WQR42AGC.js.map +0 -1
|
@@ -78,6 +78,21 @@ declare function RowMenuItem({ onSelect, disabled, danger, className, style, chi
|
|
|
78
78
|
children: ReactNode;
|
|
79
79
|
}): react_jsx_runtime.JSX.Element;
|
|
80
80
|
|
|
81
|
+
type VrmVerifiedTier = 'verified' | 'identified' | 'anonymous' | 'stale' | 'inactive';
|
|
82
|
+
declare const VRM_VERIFIED_TOOLTIP = "Politogy has confirmed this is a real, registered voter.";
|
|
83
|
+
declare const VRM_TIER_LABELS: Record<VrmVerifiedTier, string>;
|
|
84
|
+
interface VrmVerifiedBadgeProps {
|
|
85
|
+
/** The person's tier; null draws "Not yet computed". */
|
|
86
|
+
tier: VrmVerifiedTier | null | undefined;
|
|
87
|
+
/** Icon / dot size in px. Default 16 (icon) / 8 (dot). */
|
|
88
|
+
size?: number;
|
|
89
|
+
/** Show the tier name beside the mark. Default true. */
|
|
90
|
+
showLabel?: boolean;
|
|
91
|
+
className?: string;
|
|
92
|
+
style?: CSSProperties;
|
|
93
|
+
}
|
|
94
|
+
declare function VrmVerifiedBadge({ tier, size, showLabel, className, style }: VrmVerifiedBadgeProps): react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
81
96
|
type FormColumnProps = {
|
|
82
97
|
children: ReactNode;
|
|
83
98
|
className?: string;
|
|
@@ -300,9 +315,19 @@ declare function TopBarCountBadge({ count }: {
|
|
|
300
315
|
* Pure CSS (group-hover) so it works on <a>, <button> and <summary> triggers.
|
|
301
316
|
* The trigger must carry `group/tbtip relative` (topBarIconButtonClass does).
|
|
302
317
|
*/
|
|
303
|
-
declare function TopBarTooltip({ title, description, }: {
|
|
318
|
+
declare function TopBarTooltip({ title, description, align, }: {
|
|
304
319
|
title: string;
|
|
305
320
|
description?: ReactNode;
|
|
321
|
+
/**
|
|
322
|
+
* `center` (default): the body is centered under the trigger.
|
|
323
|
+
* `end`: the body's right edge lines up with the trigger's right edge, so a
|
|
324
|
+
* control at the right end of the top bar (Organization settings, My profile)
|
|
325
|
+
* keeps its tooltip on screen. The arrow stays on the trigger's center either
|
|
326
|
+
* way (Brand guideline "Tooltips point at their trigger"). Measured
|
|
327
|
+
* 2026-11-05 at 1547px: the centered 224px body ran 75px past the viewport
|
|
328
|
+
* for My profile and 35px for Organization settings.
|
|
329
|
+
*/
|
|
330
|
+
align?: 'center' | 'end';
|
|
306
331
|
}): react_jsx_runtime.JSX.Element;
|
|
307
332
|
/**
|
|
308
333
|
* The up-pointing arrow every top-bar panel renders, anchored under its
|
|
@@ -804,6 +829,25 @@ declare function modeIdFromLabel(label: string | undefined): string | undefined;
|
|
|
804
829
|
declare function shortUserName(name: string): string;
|
|
805
830
|
/** Short environment name for the rail's build line ("prod", "staging", "local"). */
|
|
806
831
|
declare function shortEnvLabel(label: string): string;
|
|
832
|
+
/**
|
|
833
|
+
* The left-bar build line (Left-Navigation §10, UI-Platform → Debug info;
|
|
834
|
+
* decided 2026-11-05, Ben): ONE quiet line, `v<version> · <Mon D>`, 10px mono
|
|
835
|
+
* in the inactive-row gray (`--sidebar-row-text`: 66% white, #F0CFD2 on the
|
|
836
|
+
* Campaign rail; the dimmest rail gray that clears 4.5:1 on both rails). The
|
|
837
|
+
* full build info (env, commit, version, date, author) is the hover title, so
|
|
838
|
+
* it stays one hover away for the team. Replaces the two rows
|
|
839
|
+
* `env | commit | version` / `date | author` until the Debug info button ships.
|
|
840
|
+
*/
|
|
841
|
+
declare function buildLineParts(meta: {
|
|
842
|
+
envLabel?: string;
|
|
843
|
+
version?: string;
|
|
844
|
+
commit?: string;
|
|
845
|
+
commitDate?: string;
|
|
846
|
+
commitAuthor?: string;
|
|
847
|
+
}): {
|
|
848
|
+
line: string;
|
|
849
|
+
detail: string;
|
|
850
|
+
};
|
|
807
851
|
declare function envChipClasses(label: string): string;
|
|
808
852
|
type NavBrand = {
|
|
809
853
|
/** Where the logo links to. Defaults to "/". */
|
|
@@ -1259,4 +1303,4 @@ type NavAppShellProps = {
|
|
|
1259
1303
|
};
|
|
1260
1304
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
1261
1305
|
|
|
1262
|
-
export { type
|
|
1306
|
+
export { type ChromeNotificationQuarantine as $, AI_CREDITS_STATE_TITLES as A, type BreadcrumbBarProps as B, Card as C, type NavOrgOption as D, type NavFooterLink as E, FormColumn as F, type NavFooter as G, HeaderTabBar as H, type NavDisplayMode as I, BETA_BANNER_DISMISS_KEY as J, KNOWN_TAB_GLYPHS as K, BreadcrumbBar as L, CAMPAIGN_FEATURE_AVAILABILITY as M, type NavItem as N, CORE_APP_ORIGIN as O, type PageHeaderProps as P, CORE_BILLING_PATH as Q, RowMenu as R, type StandardNavIconKey as S, type TabGlyphComponent as T, CREDIT_TYPE_LABELS as U, VRM_TIER_LABELS as V, CREDIT_TYPE_ORDER as W, type CampaignFeatureAvailability as X, type ChromeMe as Y, type ChromeNotificationAlert as Z, type ChromeNotificationImport as _, AiCreditsState as a, standardPolitogyNav as a$, type ChromeNotificationReply as a0, type ChromeNotificationsPayload as a1, type ChromeOrgSummary as a2, type CommunicationsFuelStatus as a3, type CreditHealthState as a4, type CreditTypeKey as a5, CreditsAction as a6, type CreditsIconState as a7, FuelAction as a8, type FuelChannelStatus as a9, type PageHeaderMode as aA, SPECS_ORIGIN as aB, SpecOverlayAction as aC, type StandardNavOptions as aD, SupportAction as aE, type ThemePreference as aF, TopBarCountBadge as aG, type TopBarIconTone as aH, TopBarLinkAction as aI, type TopBarLinkActionProps as aJ, TopBarPanelArrow as aK, TopBarPopover as aL, TopBarTooltip as aM, TopBarWidgetSlot as aN, buildLineParts as aO, clearBetaBannerDismissal as aP, creditGaugeRatio as aQ, creditStateWord as aR, creditTooltipLine as aS, creditsAriaLabel as aT, creditsIconState as aU, envChipClasses as aV, isNavItemActive as aW, modeIdFromLabel as aX, resolveOrgLogoUrl as aY, shortEnvLabel as aZ, shortUserName as a_, MyProfileAction as aa, NavAppShell as ab, type NavAppShellProps as ac, NavBetaBanner as ad, type NavBetaBannerProps as ae, type NavBrand as af, NavChromeProvider as ag, NavDisplayAction as ah, type NavLinkProps as ai, type NavLinkedAccount as aj, type NavModeOption as ak, type NavOrg as al, type NavRoleBadge as am, NavSidebar as an, type NavSidebarProps as ao, type NavTab as ap, NavTabStrip as aq, type NavTabStripProps as ar, NavThemeControl as as, NavTopBar as at, type NavTopBarAction as au, type NavTopBarProps as av, type NavUser as aw, NotificationsAction as ax, OrganizationSettingsAction as ay, PageHeader as az, type AiCreditsStateKind as b, topBarIconButtonClass as b0, useChromeMe as b1, useChromeOrgs as b2, useNavChromeDedupedFetch as b3, useNavChromeFetcher as b4, useThemePreference as b5, type CommsNotification as c, type CommsNotificationKind as d, type HeaderTabBarItem as e, type NotificationsAdapter as f, type NotificationsFeed as g, RowMenuItem as h, type RowMenuPlacement as i, VRM_VERIFIED_TOOLTIP as j, VrmVerifiedBadge as k, type VrmVerifiedBadgeProps as l, type VrmVerifiedTier as m, aiCreditsWalletUrl as n, createCommsNotificationsAdapter as o, emptyNotificationsFeed as p, normalizeNotificationsFeed as q, resolveTabGlyph as r, rowMenuPosition as s, type NavIcon as t, type NavBreadcrumb as u, type StandardNavMode as v, type NavLinkComponent as w, type NavChromeFetcher as x, type NavMode as y, type NavUserMenu as z };
|
|
@@ -78,6 +78,21 @@ declare function RowMenuItem({ onSelect, disabled, danger, className, style, chi
|
|
|
78
78
|
children: ReactNode;
|
|
79
79
|
}): react_jsx_runtime.JSX.Element;
|
|
80
80
|
|
|
81
|
+
type VrmVerifiedTier = 'verified' | 'identified' | 'anonymous' | 'stale' | 'inactive';
|
|
82
|
+
declare const VRM_VERIFIED_TOOLTIP = "Politogy has confirmed this is a real, registered voter.";
|
|
83
|
+
declare const VRM_TIER_LABELS: Record<VrmVerifiedTier, string>;
|
|
84
|
+
interface VrmVerifiedBadgeProps {
|
|
85
|
+
/** The person's tier; null draws "Not yet computed". */
|
|
86
|
+
tier: VrmVerifiedTier | null | undefined;
|
|
87
|
+
/** Icon / dot size in px. Default 16 (icon) / 8 (dot). */
|
|
88
|
+
size?: number;
|
|
89
|
+
/** Show the tier name beside the mark. Default true. */
|
|
90
|
+
showLabel?: boolean;
|
|
91
|
+
className?: string;
|
|
92
|
+
style?: CSSProperties;
|
|
93
|
+
}
|
|
94
|
+
declare function VrmVerifiedBadge({ tier, size, showLabel, className, style }: VrmVerifiedBadgeProps): react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
81
96
|
type FormColumnProps = {
|
|
82
97
|
children: ReactNode;
|
|
83
98
|
className?: string;
|
|
@@ -300,9 +315,19 @@ declare function TopBarCountBadge({ count }: {
|
|
|
300
315
|
* Pure CSS (group-hover) so it works on <a>, <button> and <summary> triggers.
|
|
301
316
|
* The trigger must carry `group/tbtip relative` (topBarIconButtonClass does).
|
|
302
317
|
*/
|
|
303
|
-
declare function TopBarTooltip({ title, description, }: {
|
|
318
|
+
declare function TopBarTooltip({ title, description, align, }: {
|
|
304
319
|
title: string;
|
|
305
320
|
description?: ReactNode;
|
|
321
|
+
/**
|
|
322
|
+
* `center` (default): the body is centered under the trigger.
|
|
323
|
+
* `end`: the body's right edge lines up with the trigger's right edge, so a
|
|
324
|
+
* control at the right end of the top bar (Organization settings, My profile)
|
|
325
|
+
* keeps its tooltip on screen. The arrow stays on the trigger's center either
|
|
326
|
+
* way (Brand guideline "Tooltips point at their trigger"). Measured
|
|
327
|
+
* 2026-11-05 at 1547px: the centered 224px body ran 75px past the viewport
|
|
328
|
+
* for My profile and 35px for Organization settings.
|
|
329
|
+
*/
|
|
330
|
+
align?: 'center' | 'end';
|
|
306
331
|
}): react_jsx_runtime.JSX.Element;
|
|
307
332
|
/**
|
|
308
333
|
* The up-pointing arrow every top-bar panel renders, anchored under its
|
|
@@ -804,6 +829,25 @@ declare function modeIdFromLabel(label: string | undefined): string | undefined;
|
|
|
804
829
|
declare function shortUserName(name: string): string;
|
|
805
830
|
/** Short environment name for the rail's build line ("prod", "staging", "local"). */
|
|
806
831
|
declare function shortEnvLabel(label: string): string;
|
|
832
|
+
/**
|
|
833
|
+
* The left-bar build line (Left-Navigation §10, UI-Platform → Debug info;
|
|
834
|
+
* decided 2026-11-05, Ben): ONE quiet line, `v<version> · <Mon D>`, 10px mono
|
|
835
|
+
* in the inactive-row gray (`--sidebar-row-text`: 66% white, #F0CFD2 on the
|
|
836
|
+
* Campaign rail; the dimmest rail gray that clears 4.5:1 on both rails). The
|
|
837
|
+
* full build info (env, commit, version, date, author) is the hover title, so
|
|
838
|
+
* it stays one hover away for the team. Replaces the two rows
|
|
839
|
+
* `env | commit | version` / `date | author` until the Debug info button ships.
|
|
840
|
+
*/
|
|
841
|
+
declare function buildLineParts(meta: {
|
|
842
|
+
envLabel?: string;
|
|
843
|
+
version?: string;
|
|
844
|
+
commit?: string;
|
|
845
|
+
commitDate?: string;
|
|
846
|
+
commitAuthor?: string;
|
|
847
|
+
}): {
|
|
848
|
+
line: string;
|
|
849
|
+
detail: string;
|
|
850
|
+
};
|
|
807
851
|
declare function envChipClasses(label: string): string;
|
|
808
852
|
type NavBrand = {
|
|
809
853
|
/** Where the logo links to. Defaults to "/". */
|
|
@@ -1259,4 +1303,4 @@ type NavAppShellProps = {
|
|
|
1259
1303
|
};
|
|
1260
1304
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
1261
1305
|
|
|
1262
|
-
export { type
|
|
1306
|
+
export { type ChromeNotificationQuarantine as $, AI_CREDITS_STATE_TITLES as A, type BreadcrumbBarProps as B, Card as C, type NavOrgOption as D, type NavFooterLink as E, FormColumn as F, type NavFooter as G, HeaderTabBar as H, type NavDisplayMode as I, BETA_BANNER_DISMISS_KEY as J, KNOWN_TAB_GLYPHS as K, BreadcrumbBar as L, CAMPAIGN_FEATURE_AVAILABILITY as M, type NavItem as N, CORE_APP_ORIGIN as O, type PageHeaderProps as P, CORE_BILLING_PATH as Q, RowMenu as R, type StandardNavIconKey as S, type TabGlyphComponent as T, CREDIT_TYPE_LABELS as U, VRM_TIER_LABELS as V, CREDIT_TYPE_ORDER as W, type CampaignFeatureAvailability as X, type ChromeMe as Y, type ChromeNotificationAlert as Z, type ChromeNotificationImport as _, AiCreditsState as a, standardPolitogyNav as a$, type ChromeNotificationReply as a0, type ChromeNotificationsPayload as a1, type ChromeOrgSummary as a2, type CommunicationsFuelStatus as a3, type CreditHealthState as a4, type CreditTypeKey as a5, CreditsAction as a6, type CreditsIconState as a7, FuelAction as a8, type FuelChannelStatus as a9, type PageHeaderMode as aA, SPECS_ORIGIN as aB, SpecOverlayAction as aC, type StandardNavOptions as aD, SupportAction as aE, type ThemePreference as aF, TopBarCountBadge as aG, type TopBarIconTone as aH, TopBarLinkAction as aI, type TopBarLinkActionProps as aJ, TopBarPanelArrow as aK, TopBarPopover as aL, TopBarTooltip as aM, TopBarWidgetSlot as aN, buildLineParts as aO, clearBetaBannerDismissal as aP, creditGaugeRatio as aQ, creditStateWord as aR, creditTooltipLine as aS, creditsAriaLabel as aT, creditsIconState as aU, envChipClasses as aV, isNavItemActive as aW, modeIdFromLabel as aX, resolveOrgLogoUrl as aY, shortEnvLabel as aZ, shortUserName as a_, MyProfileAction as aa, NavAppShell as ab, type NavAppShellProps as ac, NavBetaBanner as ad, type NavBetaBannerProps as ae, type NavBrand as af, NavChromeProvider as ag, NavDisplayAction as ah, type NavLinkProps as ai, type NavLinkedAccount as aj, type NavModeOption as ak, type NavOrg as al, type NavRoleBadge as am, NavSidebar as an, type NavSidebarProps as ao, type NavTab as ap, NavTabStrip as aq, type NavTabStripProps as ar, NavThemeControl as as, NavTopBar as at, type NavTopBarAction as au, type NavTopBarProps as av, type NavUser as aw, NotificationsAction as ax, OrganizationSettingsAction as ay, PageHeader as az, type AiCreditsStateKind as b, topBarIconButtonClass as b0, useChromeMe as b1, useChromeOrgs as b2, useNavChromeDedupedFetch as b3, useNavChromeFetcher as b4, useThemePreference as b5, type CommsNotification as c, type CommsNotificationKind as d, type HeaderTabBarItem as e, type NotificationsAdapter as f, type NotificationsFeed as g, RowMenuItem as h, type RowMenuPlacement as i, VRM_VERIFIED_TOOLTIP as j, VrmVerifiedBadge as k, type VrmVerifiedBadgeProps as l, type VrmVerifiedTier as m, aiCreditsWalletUrl as n, createCommsNotificationsAdapter as o, emptyNotificationsFeed as p, normalizeNotificationsFeed as q, resolveTabGlyph as r, rowMenuPosition as s, type NavIcon as t, type NavBreadcrumb as u, type StandardNavMode as v, type NavLinkComponent as w, type NavChromeFetcher as x, type NavMode as y, type NavUserMenu as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1172,6 +1172,130 @@ function RowMenuItem({
|
|
|
1172
1172
|
}
|
|
1173
1173
|
);
|
|
1174
1174
|
}
|
|
1175
|
+
function parseCssUrl(value) {
|
|
1176
|
+
if (!value) return null;
|
|
1177
|
+
const m = /^url\(\s*(['"]?)(.*?)\1\s*\)$/i.exec(value.trim());
|
|
1178
|
+
const url = m?.[2]?.trim();
|
|
1179
|
+
return url && /^https:\/\//i.test(url) ? url : null;
|
|
1180
|
+
}
|
|
1181
|
+
function readBrandAsset(kind) {
|
|
1182
|
+
if (typeof document === "undefined") return null;
|
|
1183
|
+
try {
|
|
1184
|
+
return parseCssUrl(
|
|
1185
|
+
window.getComputedStyle(document.documentElement).getPropertyValue(`--asset-${kind}`)
|
|
1186
|
+
);
|
|
1187
|
+
} catch {
|
|
1188
|
+
return null;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
var RETRY_MS = [0, 250, 1e3, 3e3];
|
|
1192
|
+
function useBrandAsset(kind) {
|
|
1193
|
+
const [url, setUrl] = react$1.useState(null);
|
|
1194
|
+
react$1.useEffect(() => {
|
|
1195
|
+
let done = false;
|
|
1196
|
+
const read = () => {
|
|
1197
|
+
if (done) return;
|
|
1198
|
+
const next = readBrandAsset(kind);
|
|
1199
|
+
setUrl((prev) => prev === next ? prev : next);
|
|
1200
|
+
};
|
|
1201
|
+
const links = Array.from(
|
|
1202
|
+
document.querySelectorAll('link[rel="stylesheet"][href*="api/tokens"]')
|
|
1203
|
+
);
|
|
1204
|
+
links.forEach((l) => l.addEventListener("load", read));
|
|
1205
|
+
const timers = RETRY_MS.map((ms) => window.setTimeout(read, ms));
|
|
1206
|
+
read();
|
|
1207
|
+
return () => {
|
|
1208
|
+
done = true;
|
|
1209
|
+
links.forEach((l) => l.removeEventListener("load", read));
|
|
1210
|
+
timers.forEach((t) => window.clearTimeout(t));
|
|
1211
|
+
};
|
|
1212
|
+
}, [kind]);
|
|
1213
|
+
return url;
|
|
1214
|
+
}
|
|
1215
|
+
var VRM_VERIFIED_TOOLTIP = "Politogy has confirmed this is a real, registered voter.";
|
|
1216
|
+
var VRM_TIER_LABELS = {
|
|
1217
|
+
verified: "VRM Verified",
|
|
1218
|
+
identified: "Identified",
|
|
1219
|
+
anonymous: "Anonymous",
|
|
1220
|
+
stale: "Stale",
|
|
1221
|
+
inactive: "Inactive"
|
|
1222
|
+
};
|
|
1223
|
+
var TIER_TOOLTIPS = {
|
|
1224
|
+
verified: VRM_VERIFIED_TOOLTIP,
|
|
1225
|
+
identified: "Identified: we know who this is, but Politogy has not verified them.",
|
|
1226
|
+
anonymous: "Anonymous: nothing identifying has been captured yet.",
|
|
1227
|
+
stale: "Stale: was VRM Verified, but the proof is more than 12 months old.",
|
|
1228
|
+
inactive: "Inactive: the voter file marks this registration inactive or canceled."
|
|
1229
|
+
};
|
|
1230
|
+
var DOT_FALLBACK = {
|
|
1231
|
+
identified: "#a855f7",
|
|
1232
|
+
anonymous: "var(--color-graphite, #2b2b2b)",
|
|
1233
|
+
stale: "#eab308",
|
|
1234
|
+
inactive: "var(--muted, #8a8a8a)"
|
|
1235
|
+
};
|
|
1236
|
+
function VrmVerifiedBadge({ tier, size, showLabel = true, className, style }) {
|
|
1237
|
+
const icon = useBrandAsset("verified-icon");
|
|
1238
|
+
const known = tier && tier in VRM_TIER_LABELS ? tier : null;
|
|
1239
|
+
const label = known ? VRM_TIER_LABELS[known] : "Not yet computed";
|
|
1240
|
+
const title = known ? TIER_TOOLTIPS[known] : "The VRM Verified tier has not been worked out yet.";
|
|
1241
|
+
const iconSize = size ?? 16;
|
|
1242
|
+
const dotSize = size ?? 8;
|
|
1243
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1244
|
+
"span",
|
|
1245
|
+
{
|
|
1246
|
+
"data-vrm-tier": known ?? "none",
|
|
1247
|
+
title,
|
|
1248
|
+
"aria-label": showLabel ? void 0 : label,
|
|
1249
|
+
role: showLabel ? void 0 : "img",
|
|
1250
|
+
className,
|
|
1251
|
+
style: {
|
|
1252
|
+
display: "inline-flex",
|
|
1253
|
+
alignItems: "center",
|
|
1254
|
+
gap: 6,
|
|
1255
|
+
borderRadius: 9999,
|
|
1256
|
+
border: "1px solid var(--line, #e5e5e5)",
|
|
1257
|
+
padding: "2px 10px",
|
|
1258
|
+
fontSize: 12,
|
|
1259
|
+
fontWeight: 600,
|
|
1260
|
+
lineHeight: 1.4,
|
|
1261
|
+
whiteSpace: "nowrap",
|
|
1262
|
+
...style
|
|
1263
|
+
},
|
|
1264
|
+
children: [
|
|
1265
|
+
known === "verified" ? (
|
|
1266
|
+
// The box is reserved while the Brand sheet loads; nothing stands in.
|
|
1267
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, style: { display: "inline-block", width: iconSize, height: iconSize, flexShrink: 0 }, children: icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1268
|
+
"img",
|
|
1269
|
+
{
|
|
1270
|
+
src: icon,
|
|
1271
|
+
alt: "",
|
|
1272
|
+
width: iconSize,
|
|
1273
|
+
height: iconSize,
|
|
1274
|
+
draggable: false,
|
|
1275
|
+
"data-testid": "vrm-verified-icon",
|
|
1276
|
+
style: { display: "block", width: iconSize, height: iconSize }
|
|
1277
|
+
}
|
|
1278
|
+
) : null })
|
|
1279
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1280
|
+
"span",
|
|
1281
|
+
{
|
|
1282
|
+
"aria-hidden": true,
|
|
1283
|
+
style: {
|
|
1284
|
+
display: "inline-block",
|
|
1285
|
+
width: dotSize,
|
|
1286
|
+
height: dotSize,
|
|
1287
|
+
borderRadius: 9999,
|
|
1288
|
+
flexShrink: 0,
|
|
1289
|
+
background: known ? `var(--vrm-tier-${known}, ${DOT_FALLBACK[known]})` : "transparent",
|
|
1290
|
+
border: known ? void 0 : "1px dashed var(--muted, #8a8a8a)"
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
),
|
|
1294
|
+
showLabel ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }) : null
|
|
1295
|
+
]
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1175
1299
|
function FormColumn({ children, className }) {
|
|
1176
1300
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className: clsx5__default.default("w-full max-w-[960px]", className), children });
|
|
1177
1301
|
}
|
|
@@ -1463,19 +1587,26 @@ try{d.setAttribute("data-theme",dark?"dark":"light");d.style.colorScheme=dark?"d
|
|
|
1463
1587
|
}catch(e){}})();`;
|
|
1464
1588
|
function TopBarTooltip({
|
|
1465
1589
|
title,
|
|
1466
|
-
description
|
|
1590
|
+
description,
|
|
1591
|
+
align = "center"
|
|
1467
1592
|
}) {
|
|
1593
|
+
const bodyPosition = align === "end" ? "right-0" : "left-1/2 -translate-x-1/2";
|
|
1594
|
+
const arrowPosition = align === "end" ? "" : "left-1/2 -translate-x-1/2";
|
|
1595
|
+
const arrowStyle = align === "end" ? { right: "calc(var(--topbar-icon-button-size, 34px) / 2 - 5px)" } : void 0;
|
|
1468
1596
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1469
1597
|
"span",
|
|
1470
1598
|
{
|
|
1471
1599
|
role: "tooltip",
|
|
1472
|
-
|
|
1600
|
+
"data-tooltip-align": align,
|
|
1601
|
+
className: `pointer-events-none absolute ${bodyPosition} top-full z-50 mt-2 hidden w-max max-w-56 flex-col rounded-lg border border-[color:var(--app-btn-tooltip-bg,#2F3136)] bg-[color:var(--app-btn-tooltip-bg,#2F3136)] px-3 py-2 text-left shadow-[var(--shadow-soft)] group-hover/tbtip:flex group-focus-visible/tbtip:flex`,
|
|
1473
1602
|
children: [
|
|
1474
1603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1475
1604
|
"span",
|
|
1476
1605
|
{
|
|
1477
1606
|
"aria-hidden": true,
|
|
1478
|
-
|
|
1607
|
+
"data-tooltip-arrow": true,
|
|
1608
|
+
style: arrowStyle,
|
|
1609
|
+
className: `absolute -top-[5px] ${arrowPosition} h-2.5 w-2.5 rotate-45 border-l border-t border-[color:var(--app-btn-tooltip-bg,#2F3136)] bg-[color:var(--app-btn-tooltip-bg,#2F3136)]`
|
|
1479
1610
|
}
|
|
1480
1611
|
),
|
|
1481
1612
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-[color:var(--app-btn-tooltip-fg,#FFFFFF)]", children: title }),
|
|
@@ -1919,24 +2050,6 @@ function BrandIcon({
|
|
|
1919
2050
|
}
|
|
1920
2051
|
);
|
|
1921
2052
|
}
|
|
1922
|
-
function parseCssUrl(value) {
|
|
1923
|
-
if (!value) return null;
|
|
1924
|
-
const m = /^url\(\s*(['"]?)(.*?)\1\s*\)$/i.exec(value.trim());
|
|
1925
|
-
const url = m?.[2]?.trim();
|
|
1926
|
-
return url && /^https:\/\//i.test(url) ? url : null;
|
|
1927
|
-
}
|
|
1928
|
-
function readBrandAsset(kind) {
|
|
1929
|
-
if (typeof document === "undefined") return null;
|
|
1930
|
-
try {
|
|
1931
|
-
return parseCssUrl(
|
|
1932
|
-
window.getComputedStyle(document.documentElement).getPropertyValue(`--asset-${kind}`)
|
|
1933
|
-
);
|
|
1934
|
-
} catch {
|
|
1935
|
-
return null;
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
// src/lib/brandFavicon.ts
|
|
1940
2053
|
var BRAND_FAVICON_LINK_ID = "politogy-brand-favicon";
|
|
1941
2054
|
var BRAND_APPLE_ICON_LINK_ID = "politogy-brand-apple-icon";
|
|
1942
2055
|
function upsertLink(id, rel, href) {
|
|
@@ -1959,7 +2072,7 @@ function applyBrandFavicon() {
|
|
|
1959
2072
|
if (apple) upsertLink(BRAND_APPLE_ICON_LINK_ID, "apple-touch-icon", apple);
|
|
1960
2073
|
return true;
|
|
1961
2074
|
}
|
|
1962
|
-
var
|
|
2075
|
+
var RETRY_MS2 = [0, 250, 1e3, 3e3];
|
|
1963
2076
|
function watchBrandFavicon() {
|
|
1964
2077
|
if (typeof document === "undefined") return () => {
|
|
1965
2078
|
};
|
|
@@ -1976,7 +2089,7 @@ function watchBrandFavicon() {
|
|
|
1976
2089
|
});
|
|
1977
2090
|
};
|
|
1978
2091
|
listen();
|
|
1979
|
-
const timers =
|
|
2092
|
+
const timers = RETRY_MS2.map((ms) => window.setTimeout(apply, ms));
|
|
1980
2093
|
const observer = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
1981
2094
|
listen();
|
|
1982
2095
|
apply();
|
|
@@ -2319,6 +2432,9 @@ exports.ShellProvider = ShellProvider;
|
|
|
2319
2432
|
exports.ShellRoleContext = ShellRoleContext;
|
|
2320
2433
|
exports.ShellSupportProviderContext = ShellSupportProviderContext;
|
|
2321
2434
|
exports.SpeculationRulesScript = SpeculationRulesScript;
|
|
2435
|
+
exports.VRM_TIER_LABELS = VRM_TIER_LABELS;
|
|
2436
|
+
exports.VRM_VERIFIED_TOOLTIP = VRM_VERIFIED_TOOLTIP;
|
|
2437
|
+
exports.VrmVerifiedBadge = VrmVerifiedBadge;
|
|
2322
2438
|
exports.aiCreditsWalletUrl = aiCreditsWalletUrl;
|
|
2323
2439
|
exports.applyBrandFavicon = applyBrandFavicon;
|
|
2324
2440
|
exports.buildNavSpeculationRules = buildNavSpeculationRules;
|