@the-portland-company/shell 0.82.0 → 0.84.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 +29 -0
- package/dist/app-chrome.cjs +264 -178
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +17 -2
- package/dist/app-chrome.d.ts +17 -2
- package/dist/app-chrome.js +43 -10
- package/dist/app-chrome.js.map +1 -1
- package/dist/chrome.css +5 -0
- package/dist/{chunk-L73FZKGE.js → chunk-PRZP2SB6.js} +229 -176
- package/dist/chunk-PRZP2SB6.js.map +1 -0
- package/dist/{chunk-VWY6IIAR.js → chunk-QS3Z4N73.js} +3 -3
- package/dist/chunk-QS3Z4N73.js.map +1 -0
- package/dist/{index-C3PFq1hl.d.cts → index--q40spnY.d.cts} +64 -4
- package/dist/{index-CwTnsR9R.d.ts → index-C4ob05Pc.d.ts} +64 -4
- 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 +233 -172
- 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-L73FZKGE.js.map +0 -1
- package/dist/chunk-VWY6IIAR.js.map +0 -1
|
@@ -28,6 +28,41 @@ declare function FormColumn({ children, className }: FormColumnProps): react_jsx
|
|
|
28
28
|
*/
|
|
29
29
|
type TopBarIconSlot = 'comms-fuel' | 'apps' | 'notifications' | 'alerts' | 'support' | 'dark-mode';
|
|
30
30
|
|
|
31
|
+
type CreditHealthState = "good" | "low" | "out" | "not_in_use";
|
|
32
|
+
/** What the icon shows: the worst state among the types in use, or unknown. */
|
|
33
|
+
type CreditsIconState = "good" | "low" | "out" | "unknown";
|
|
34
|
+
type CreditTypeKey = "signal" | "broadcast" | "ai" | "enhancement";
|
|
35
|
+
declare const CREDIT_TYPE_ORDER: readonly CreditTypeKey[];
|
|
36
|
+
declare const CREDIT_TYPE_LABELS: Record<CreditTypeKey, string>;
|
|
37
|
+
/** The slice of a channel the health reads. Older payloads carry none of it. */
|
|
38
|
+
type CreditHealthFields = {
|
|
39
|
+
remainingUnits: number;
|
|
40
|
+
state?: CreditHealthState | null;
|
|
41
|
+
fullMarkUnits?: number | null;
|
|
42
|
+
daysOfUseLeft?: number | null;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The icon's colour is the worst state among the credit types in use: green
|
|
46
|
+
* when every one is Good, yellow when at least one is Low, red when at least
|
|
47
|
+
* one is Out. Not in use never changes it; a type with no state is unknown.
|
|
48
|
+
* With nothing in use, or nothing known, the icon is neutral.
|
|
49
|
+
*/
|
|
50
|
+
declare function creditsIconState(channels: ReadonlyArray<CreditHealthFields | null | undefined>): CreditsIconState;
|
|
51
|
+
/**
|
|
52
|
+
* Gauge level against the full mark (0..1), never more than full. Null when
|
|
53
|
+
* there is nothing to draw: not in use, unknown, or no full mark.
|
|
54
|
+
*/
|
|
55
|
+
declare function creditGaugeRatio(channel: CreditHealthFields | null | undefined): number | null;
|
|
56
|
+
declare function creditStateWord(state: CreditHealthState | null | undefined): string;
|
|
57
|
+
/**
|
|
58
|
+
* One tooltip line per type: "Signal Credits: 38 left, about 1 day at your
|
|
59
|
+
* recent pace". A type not in use says so; a type without a state says only
|
|
60
|
+
* what is left.
|
|
61
|
+
*/
|
|
62
|
+
declare function creditTooltipLine(type: CreditTypeKey, channel: CreditHealthFields | null | undefined): string;
|
|
63
|
+
/** The icon's accessible name carries the state, so colour is never the only signal. */
|
|
64
|
+
declare function creditsAriaLabel(channels: Partial<Record<CreditTypeKey, CreditHealthFields | null | undefined>>): string;
|
|
65
|
+
|
|
31
66
|
type CommsNotificationKind = 'notification' | 'alert';
|
|
32
67
|
/** One row of the bell feed, as the shell reads it (camelCased). */
|
|
33
68
|
type CommsNotification = {
|
|
@@ -98,7 +133,8 @@ declare const SPECS_ORIGIN = "https://specs.politogyvrm.com";
|
|
|
98
133
|
* Absolute URLs (http/https/data/blob) pass through untouched.
|
|
99
134
|
*/
|
|
100
135
|
declare function resolveOrgLogoUrl(url: string | null | undefined): string | undefined;
|
|
101
|
-
|
|
136
|
+
type TopBarIconTone = 'default' | 'ok' | 'low' | 'warning' | 'danger';
|
|
137
|
+
declare function topBarIconButtonClass(tone?: TopBarIconTone): string;
|
|
102
138
|
declare function TopBarCountBadge({ count }: {
|
|
103
139
|
count: number;
|
|
104
140
|
}): react_jsx_runtime.JSX.Element | null;
|
|
@@ -209,13 +245,29 @@ type FuelChannelStatus = {
|
|
|
209
245
|
remainingUnits: number;
|
|
210
246
|
rawBalanceUnits: number;
|
|
211
247
|
usedUnits: number;
|
|
248
|
+
/** Superseded by `state` (UI-Platform "Credit health in the payload"); ignored. */
|
|
212
249
|
lowFuel: boolean;
|
|
213
250
|
lowFuelThreshold: number;
|
|
251
|
+
/**
|
|
252
|
+
* Credit health (Pricing & Metering §7.5), published by the credits
|
|
253
|
+
* service. Null or absent means unknown: the shell draws neutral and never
|
|
254
|
+
* derives a state from the balance.
|
|
255
|
+
*/
|
|
256
|
+
state?: CreditHealthState | null;
|
|
257
|
+
fullMarkUnits?: number | null;
|
|
258
|
+
daysOfUseLeft?: number | null;
|
|
259
|
+
/** The two pools; only the Admin Credit Ledger knows them. */
|
|
260
|
+
includedUnits?: number;
|
|
261
|
+
purchasedUnits?: number;
|
|
262
|
+
nextGrantAt?: string | null;
|
|
214
263
|
};
|
|
215
264
|
type CommunicationsFuelStatus = {
|
|
216
265
|
organizationId: string;
|
|
217
266
|
signal: FuelChannelStatus;
|
|
218
267
|
broadcast: FuelChannelStatus;
|
|
268
|
+
/** Absent when the balance comes from VRM Core, which never held these. */
|
|
269
|
+
ai?: FuelChannelStatus;
|
|
270
|
+
enhancement?: FuelChannelStatus;
|
|
219
271
|
combinedAvailableCredits: number;
|
|
220
272
|
};
|
|
221
273
|
type ChromeNotificationAlert = {
|
|
@@ -302,13 +354,19 @@ declare function useChromeOrgs({ enabled }?: {
|
|
|
302
354
|
* dropping capability (shell-nav-handoff §4; UI-Platform forbids migrating an
|
|
303
355
|
* app to a rendering that loses an element it already ships).
|
|
304
356
|
*/
|
|
305
|
-
declare function TopBarPopover({ label, description, slot, fallbackIcon, badge, tone, onOpen, openToken, onOpenChange, hideTooltip, children, panelClassName, }: {
|
|
357
|
+
declare function TopBarPopover({ label, ariaLabel, description, tooltip, slot, fallbackIcon, icon, badge, tone, onOpen, openToken, onOpenChange, hideTooltip, children, panelClassName, }: {
|
|
306
358
|
label: string;
|
|
359
|
+
/** The trigger's accessible name when it must say more than the label (e.g. a state). */
|
|
360
|
+
ariaLabel?: string;
|
|
307
361
|
description?: string;
|
|
362
|
+
/** Replaces the tooltip's description line with richer content. */
|
|
363
|
+
tooltip?: ReactNode;
|
|
308
364
|
slot?: TopBarIconSlot;
|
|
309
365
|
fallbackIcon: NavIconLike;
|
|
366
|
+
/** A glyph that wins over the slot's Brand token (a state-drawn icon). */
|
|
367
|
+
icon?: NavIconLike;
|
|
310
368
|
badge?: number;
|
|
311
|
-
tone?:
|
|
369
|
+
tone?: TopBarIconTone;
|
|
312
370
|
onOpen?: () => void;
|
|
313
371
|
/**
|
|
314
372
|
* Imperative "open" signal: whenever this number CHANGES the panel opens
|
|
@@ -338,6 +396,8 @@ declare function TopBarPopover({ label, description, slot, fallbackIcon, badge,
|
|
|
338
396
|
declare function FuelAction({ orgId }: {
|
|
339
397
|
orgId: string | null;
|
|
340
398
|
}): react_jsx_runtime.JSX.Element;
|
|
399
|
+
/** The Credits icon under its spec name; `FuelAction` stays for existing imports. */
|
|
400
|
+
declare const CreditsAction: typeof FuelAction;
|
|
341
401
|
declare function NotificationsAction({ orgId }: {
|
|
342
402
|
orgId: string | null;
|
|
343
403
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -993,4 +1053,4 @@ type NavAppShellProps = {
|
|
|
993
1053
|
};
|
|
994
1054
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
995
1055
|
|
|
996
|
-
export {
|
|
1056
|
+
export { type NavRoleBadge as $, type ChromeNotificationQuarantine as A, BETA_BANNER_DISMISS_KEY as B, type CommsNotification as C, type ChromeNotificationReply as D, type ChromeNotificationsPayload as E, FormColumn as F, type ChromeOrgSummary as G, type CommunicationsFuelStatus as H, type CreditHealthState as I, type CreditTypeKey as J, CreditsAction as K, type CreditsIconState as L, FuelAction as M, type NavItem as N, type FuelChannelStatus as O, NavAppShell as P, type NavAppShellProps as Q, NavBetaBanner as R, type StandardNavIconKey as S, type NavBetaBannerProps as T, type NavBrand as U, NavChromeProvider as V, NavDisplayAction as W, type NavLinkProps as X, type NavLinkedAccount as Y, type NavModeOption as Z, type NavOrg as _, type CommsNotificationKind as a, NavSidebar as a0, type NavSidebarProps as a1, type NavTab as a2, NavTabStrip as a3, type NavTabStripProps as a4, NavThemeControl as a5, NavTopBar as a6, type NavTopBarAction as a7, type NavTopBarProps as a8, type NavUser as a9, useChromeMe as aA, useChromeOrgs as aB, useNavChromeDedupedFetch as aC, useNavChromeFetcher as aD, useThemePreference as aE, NotificationsAction 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, TopBarPanelArrow as ai, TopBarPopover as aj, TopBarTooltip as ak, TopBarWidgetSlot as al, clearBetaBannerDismissal as am, creditGaugeRatio as an, creditStateWord as ao, creditTooltipLine as ap, creditsAriaLabel as aq, creditsIconState as ar, envChipClasses as as, isNavItemActive as at, modeIdFromLabel as au, resolveOrgLogoUrl as av, shortEnvLabel as aw, shortUserName as ax, standardPolitogyNav as ay, topBarIconButtonClass as az, type NotificationsAdapter as b, type NotificationsFeed as c, createCommsNotificationsAdapter as d, emptyNotificationsFeed as e, type NavIcon as f, type NavBreadcrumb as g, type StandardNavMode as h, type NavLinkComponent as i, type NavChromeFetcher as j, type NavMode as k, type NavUserMenu as l, type NavOrgOption as m, normalizeNotificationsFeed as n, type NavFooterLink as o, type NavFooter as p, type NavDisplayMode as q, CAMPAIGN_FEATURE_AVAILABILITY as r, CORE_APP_ORIGIN as s, CORE_BILLING_PATH as t, CREDIT_TYPE_LABELS as u, CREDIT_TYPE_ORDER as v, type CampaignFeatureAvailability as w, type ChromeMe as x, type ChromeNotificationAlert as y, type ChromeNotificationImport as z };
|
|
@@ -28,6 +28,41 @@ declare function FormColumn({ children, className }: FormColumnProps): react_jsx
|
|
|
28
28
|
*/
|
|
29
29
|
type TopBarIconSlot = 'comms-fuel' | 'apps' | 'notifications' | 'alerts' | 'support' | 'dark-mode';
|
|
30
30
|
|
|
31
|
+
type CreditHealthState = "good" | "low" | "out" | "not_in_use";
|
|
32
|
+
/** What the icon shows: the worst state among the types in use, or unknown. */
|
|
33
|
+
type CreditsIconState = "good" | "low" | "out" | "unknown";
|
|
34
|
+
type CreditTypeKey = "signal" | "broadcast" | "ai" | "enhancement";
|
|
35
|
+
declare const CREDIT_TYPE_ORDER: readonly CreditTypeKey[];
|
|
36
|
+
declare const CREDIT_TYPE_LABELS: Record<CreditTypeKey, string>;
|
|
37
|
+
/** The slice of a channel the health reads. Older payloads carry none of it. */
|
|
38
|
+
type CreditHealthFields = {
|
|
39
|
+
remainingUnits: number;
|
|
40
|
+
state?: CreditHealthState | null;
|
|
41
|
+
fullMarkUnits?: number | null;
|
|
42
|
+
daysOfUseLeft?: number | null;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The icon's colour is the worst state among the credit types in use: green
|
|
46
|
+
* when every one is Good, yellow when at least one is Low, red when at least
|
|
47
|
+
* one is Out. Not in use never changes it; a type with no state is unknown.
|
|
48
|
+
* With nothing in use, or nothing known, the icon is neutral.
|
|
49
|
+
*/
|
|
50
|
+
declare function creditsIconState(channels: ReadonlyArray<CreditHealthFields | null | undefined>): CreditsIconState;
|
|
51
|
+
/**
|
|
52
|
+
* Gauge level against the full mark (0..1), never more than full. Null when
|
|
53
|
+
* there is nothing to draw: not in use, unknown, or no full mark.
|
|
54
|
+
*/
|
|
55
|
+
declare function creditGaugeRatio(channel: CreditHealthFields | null | undefined): number | null;
|
|
56
|
+
declare function creditStateWord(state: CreditHealthState | null | undefined): string;
|
|
57
|
+
/**
|
|
58
|
+
* One tooltip line per type: "Signal Credits: 38 left, about 1 day at your
|
|
59
|
+
* recent pace". A type not in use says so; a type without a state says only
|
|
60
|
+
* what is left.
|
|
61
|
+
*/
|
|
62
|
+
declare function creditTooltipLine(type: CreditTypeKey, channel: CreditHealthFields | null | undefined): string;
|
|
63
|
+
/** The icon's accessible name carries the state, so colour is never the only signal. */
|
|
64
|
+
declare function creditsAriaLabel(channels: Partial<Record<CreditTypeKey, CreditHealthFields | null | undefined>>): string;
|
|
65
|
+
|
|
31
66
|
type CommsNotificationKind = 'notification' | 'alert';
|
|
32
67
|
/** One row of the bell feed, as the shell reads it (camelCased). */
|
|
33
68
|
type CommsNotification = {
|
|
@@ -98,7 +133,8 @@ declare const SPECS_ORIGIN = "https://specs.politogyvrm.com";
|
|
|
98
133
|
* Absolute URLs (http/https/data/blob) pass through untouched.
|
|
99
134
|
*/
|
|
100
135
|
declare function resolveOrgLogoUrl(url: string | null | undefined): string | undefined;
|
|
101
|
-
|
|
136
|
+
type TopBarIconTone = 'default' | 'ok' | 'low' | 'warning' | 'danger';
|
|
137
|
+
declare function topBarIconButtonClass(tone?: TopBarIconTone): string;
|
|
102
138
|
declare function TopBarCountBadge({ count }: {
|
|
103
139
|
count: number;
|
|
104
140
|
}): react_jsx_runtime.JSX.Element | null;
|
|
@@ -209,13 +245,29 @@ type FuelChannelStatus = {
|
|
|
209
245
|
remainingUnits: number;
|
|
210
246
|
rawBalanceUnits: number;
|
|
211
247
|
usedUnits: number;
|
|
248
|
+
/** Superseded by `state` (UI-Platform "Credit health in the payload"); ignored. */
|
|
212
249
|
lowFuel: boolean;
|
|
213
250
|
lowFuelThreshold: number;
|
|
251
|
+
/**
|
|
252
|
+
* Credit health (Pricing & Metering §7.5), published by the credits
|
|
253
|
+
* service. Null or absent means unknown: the shell draws neutral and never
|
|
254
|
+
* derives a state from the balance.
|
|
255
|
+
*/
|
|
256
|
+
state?: CreditHealthState | null;
|
|
257
|
+
fullMarkUnits?: number | null;
|
|
258
|
+
daysOfUseLeft?: number | null;
|
|
259
|
+
/** The two pools; only the Admin Credit Ledger knows them. */
|
|
260
|
+
includedUnits?: number;
|
|
261
|
+
purchasedUnits?: number;
|
|
262
|
+
nextGrantAt?: string | null;
|
|
214
263
|
};
|
|
215
264
|
type CommunicationsFuelStatus = {
|
|
216
265
|
organizationId: string;
|
|
217
266
|
signal: FuelChannelStatus;
|
|
218
267
|
broadcast: FuelChannelStatus;
|
|
268
|
+
/** Absent when the balance comes from VRM Core, which never held these. */
|
|
269
|
+
ai?: FuelChannelStatus;
|
|
270
|
+
enhancement?: FuelChannelStatus;
|
|
219
271
|
combinedAvailableCredits: number;
|
|
220
272
|
};
|
|
221
273
|
type ChromeNotificationAlert = {
|
|
@@ -302,13 +354,19 @@ declare function useChromeOrgs({ enabled }?: {
|
|
|
302
354
|
* dropping capability (shell-nav-handoff §4; UI-Platform forbids migrating an
|
|
303
355
|
* app to a rendering that loses an element it already ships).
|
|
304
356
|
*/
|
|
305
|
-
declare function TopBarPopover({ label, description, slot, fallbackIcon, badge, tone, onOpen, openToken, onOpenChange, hideTooltip, children, panelClassName, }: {
|
|
357
|
+
declare function TopBarPopover({ label, ariaLabel, description, tooltip, slot, fallbackIcon, icon, badge, tone, onOpen, openToken, onOpenChange, hideTooltip, children, panelClassName, }: {
|
|
306
358
|
label: string;
|
|
359
|
+
/** The trigger's accessible name when it must say more than the label (e.g. a state). */
|
|
360
|
+
ariaLabel?: string;
|
|
307
361
|
description?: string;
|
|
362
|
+
/** Replaces the tooltip's description line with richer content. */
|
|
363
|
+
tooltip?: ReactNode;
|
|
308
364
|
slot?: TopBarIconSlot;
|
|
309
365
|
fallbackIcon: NavIconLike;
|
|
366
|
+
/** A glyph that wins over the slot's Brand token (a state-drawn icon). */
|
|
367
|
+
icon?: NavIconLike;
|
|
310
368
|
badge?: number;
|
|
311
|
-
tone?:
|
|
369
|
+
tone?: TopBarIconTone;
|
|
312
370
|
onOpen?: () => void;
|
|
313
371
|
/**
|
|
314
372
|
* Imperative "open" signal: whenever this number CHANGES the panel opens
|
|
@@ -338,6 +396,8 @@ declare function TopBarPopover({ label, description, slot, fallbackIcon, badge,
|
|
|
338
396
|
declare function FuelAction({ orgId }: {
|
|
339
397
|
orgId: string | null;
|
|
340
398
|
}): react_jsx_runtime.JSX.Element;
|
|
399
|
+
/** The Credits icon under its spec name; `FuelAction` stays for existing imports. */
|
|
400
|
+
declare const CreditsAction: typeof FuelAction;
|
|
341
401
|
declare function NotificationsAction({ orgId }: {
|
|
342
402
|
orgId: string | null;
|
|
343
403
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -993,4 +1053,4 @@ type NavAppShellProps = {
|
|
|
993
1053
|
};
|
|
994
1054
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
995
1055
|
|
|
996
|
-
export {
|
|
1056
|
+
export { type NavRoleBadge as $, type ChromeNotificationQuarantine as A, BETA_BANNER_DISMISS_KEY as B, type CommsNotification as C, type ChromeNotificationReply as D, type ChromeNotificationsPayload as E, FormColumn as F, type ChromeOrgSummary as G, type CommunicationsFuelStatus as H, type CreditHealthState as I, type CreditTypeKey as J, CreditsAction as K, type CreditsIconState as L, FuelAction as M, type NavItem as N, type FuelChannelStatus as O, NavAppShell as P, type NavAppShellProps as Q, NavBetaBanner as R, type StandardNavIconKey as S, type NavBetaBannerProps as T, type NavBrand as U, NavChromeProvider as V, NavDisplayAction as W, type NavLinkProps as X, type NavLinkedAccount as Y, type NavModeOption as Z, type NavOrg as _, type CommsNotificationKind as a, NavSidebar as a0, type NavSidebarProps as a1, type NavTab as a2, NavTabStrip as a3, type NavTabStripProps as a4, NavThemeControl as a5, NavTopBar as a6, type NavTopBarAction as a7, type NavTopBarProps as a8, type NavUser as a9, useChromeMe as aA, useChromeOrgs as aB, useNavChromeDedupedFetch as aC, useNavChromeFetcher as aD, useThemePreference as aE, NotificationsAction 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, TopBarPanelArrow as ai, TopBarPopover as aj, TopBarTooltip as ak, TopBarWidgetSlot as al, clearBetaBannerDismissal as am, creditGaugeRatio as an, creditStateWord as ao, creditTooltipLine as ap, creditsAriaLabel as aq, creditsIconState as ar, envChipClasses as as, isNavItemActive as at, modeIdFromLabel as au, resolveOrgLogoUrl as av, shortEnvLabel as aw, shortUserName as ax, standardPolitogyNav as ay, topBarIconButtonClass as az, type NotificationsAdapter as b, type NotificationsFeed as c, createCommsNotificationsAdapter as d, emptyNotificationsFeed as e, type NavIcon as f, type NavBreadcrumb as g, type StandardNavMode as h, type NavLinkComponent as i, type NavChromeFetcher as j, type NavMode as k, type NavUserMenu as l, type NavOrgOption as m, normalizeNotificationsFeed as n, type NavFooterLink as o, type NavFooter as p, type NavDisplayMode as q, CAMPAIGN_FEATURE_AVAILABILITY as r, CORE_APP_ORIGIN as s, CORE_BILLING_PATH as t, CREDIT_TYPE_LABELS as u, CREDIT_TYPE_ORDER as v, type CampaignFeatureAvailability as w, type ChromeMe as x, type ChromeNotificationAlert as y, type ChromeNotificationImport as z };
|