@the-portland-company/shell 0.76.3 → 0.76.5
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/dist/app-chrome.cjs +24 -2
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +2 -2
- package/dist/{chunk-6KX3DWBC.js → chunk-SF22BWQ2.js} +36 -7
- package/dist/chunk-SF22BWQ2.js.map +1 -0
- package/dist/native.cjs +34 -5
- package/dist/native.cjs.map +1 -1
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6KX3DWBC.js.map +0 -1
package/dist/app-chrome.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
|
|
3
|
-
import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useThemePreference, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-
|
|
4
|
-
export { standardNavIcons } from './chunk-
|
|
3
|
+
import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useThemePreference, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-SF22BWQ2.js';
|
|
4
|
+
export { standardNavIcons } from './chunk-SF22BWQ2.js';
|
|
5
5
|
import { warnDeprecated } from './chunk-MY6G3LMN.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';
|
|
@@ -506,6 +506,21 @@ function FuelRow({
|
|
|
506
506
|
) })
|
|
507
507
|
] });
|
|
508
508
|
}
|
|
509
|
+
var lowFuelHintVisible = false;
|
|
510
|
+
var lowFuelHintListeners = /* @__PURE__ */ new Set();
|
|
511
|
+
function setLowFuelHintVisible(visible) {
|
|
512
|
+
if (lowFuelHintVisible === visible) return;
|
|
513
|
+
lowFuelHintVisible = visible;
|
|
514
|
+
lowFuelHintListeners.forEach((l) => l());
|
|
515
|
+
}
|
|
516
|
+
function subscribeLowFuelHintVisible(onChange) {
|
|
517
|
+
lowFuelHintListeners.add(onChange);
|
|
518
|
+
return () => lowFuelHintListeners.delete(onChange);
|
|
519
|
+
}
|
|
520
|
+
function useLowFuelHintVisible() {
|
|
521
|
+
return useSyncExternalStore(subscribeLowFuelHintVisible, () => lowFuelHintVisible);
|
|
522
|
+
}
|
|
523
|
+
var LOW_FUEL_HINT_CLEARANCE_PX = 96;
|
|
509
524
|
function LowFuelHint({ lowFuel, orgId }) {
|
|
510
525
|
const [dismissed, setDismissed] = useState(() => {
|
|
511
526
|
if (typeof window === "undefined") return false;
|
|
@@ -523,7 +538,12 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
523
538
|
}
|
|
524
539
|
}, [lowFuel]);
|
|
525
540
|
const panelOpen = useAnyTopBarPanelOpen();
|
|
526
|
-
|
|
541
|
+
const showing = lowFuel && !dismissed && !panelOpen;
|
|
542
|
+
useEffect(() => {
|
|
543
|
+
setLowFuelHintVisible(showing);
|
|
544
|
+
return () => setLowFuelHintVisible(false);
|
|
545
|
+
}, [showing]);
|
|
546
|
+
if (!showing) return null;
|
|
527
547
|
const dismiss = () => {
|
|
528
548
|
try {
|
|
529
549
|
window.sessionStorage.setItem(LOW_FUEL_HINT_DISMISSED_KEY, "1");
|
|
@@ -535,7 +555,7 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
535
555
|
"div",
|
|
536
556
|
{
|
|
537
557
|
role: "status",
|
|
538
|
-
className: "absolute right-0 top-[calc(100%+10px)] z-
|
|
558
|
+
className: "absolute right-0 top-[calc(100%+10px)] z-[60] w-60 rounded-lg border border-[color:var(--chrome-danger)] bg-[color:var(--chrome-danger)] px-3 py-2 text-[#FFFFFF] shadow-[var(--shadow-soft)]",
|
|
539
559
|
onClick: (e) => e.stopPropagation(),
|
|
540
560
|
children: [
|
|
541
561
|
/* @__PURE__ */ jsx(
|
|
@@ -724,6 +744,7 @@ function NewReplyToast({
|
|
|
724
744
|
const [visible, setVisible] = useState(false);
|
|
725
745
|
const onCloseRef = useRef(onClose);
|
|
726
746
|
onCloseRef.current = onClose;
|
|
747
|
+
const lowFuelHintVisible2 = useLowFuelHintVisible();
|
|
727
748
|
useEffect(() => {
|
|
728
749
|
setVisible(true);
|
|
729
750
|
const fadeAt = Math.max(0, ttlMs - 450);
|
|
@@ -753,6 +774,7 @@ function NewReplyToast({
|
|
|
753
774
|
},
|
|
754
775
|
className: "absolute right-[-6px] top-[calc(100%+12px)] z-50 min-w-[240px] max-w-[320px] cursor-pointer rounded-xl bg-[#161616] px-4 py-3 text-[#FFFFFF] shadow-[var(--shadow-soft)]",
|
|
755
776
|
style: {
|
|
777
|
+
top: lowFuelHintVisible2 ? `calc(100% + 12px + ${LOW_FUEL_HINT_CLEARANCE_PX}px)` : void 0,
|
|
756
778
|
opacity: visible ? 1 : 0,
|
|
757
779
|
transform: visible ? "translateY(0px)" : "translateY(-4px)",
|
|
758
780
|
transition: "opacity 250ms ease, transform 250ms ease"
|
|
@@ -3395,11 +3417,18 @@ function NavTabButton({
|
|
|
3395
3417
|
size
|
|
3396
3418
|
}) {
|
|
3397
3419
|
const { label, icon: Icon, count, href, onSelect, selected, disabled, disabledTitle } = tab;
|
|
3398
|
-
const base = "-mb-px inline-flex shrink-0 items-center gap-2
|
|
3420
|
+
const base = "-mb-px inline-flex shrink-0 items-center gap-2 font-semibold leading-none transition-colors";
|
|
3399
3421
|
const sizeClass = size === "sm" ? "py-2 text-[12px]" : "py-3 text-[13px]";
|
|
3400
|
-
const stateClass = disabled ? "cursor-not-allowed
|
|
3422
|
+
const stateClass = disabled ? "cursor-not-allowed opacity-50" : "hover:text-[color:var(--tab-hover-color,#2F3136)]";
|
|
3401
3423
|
const className = `${base} ${sizeClass} ${stateClass}`;
|
|
3402
|
-
const
|
|
3424
|
+
const color = disabled ? "var(--color-g4,#929599)" : selected ? "var(--tab-selected-color,#2F3136)" : "var(--color-g4,#929599)";
|
|
3425
|
+
const style = {
|
|
3426
|
+
textAlign: "center",
|
|
3427
|
+
borderBottomWidth: 2,
|
|
3428
|
+
borderBottomStyle: "solid",
|
|
3429
|
+
borderBottomColor: selected && !disabled ? TAB_UNDERLINE_COLOR : "transparent",
|
|
3430
|
+
color
|
|
3431
|
+
};
|
|
3403
3432
|
const iconSize = size === "sm" ? 13 : 15;
|
|
3404
3433
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3405
3434
|
Icon ? /* @__PURE__ */ jsx(Icon, { size: iconSize, className: "shrink-0 text-current", strokeWidth: 1.75 }) : null,
|
|
@@ -3668,5 +3697,5 @@ function NavAppShell({
|
|
|
3668
3697
|
}
|
|
3669
3698
|
|
|
3670
3699
|
export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, CORE_APP_ORIGIN, CORE_BILLING_PATH, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SPECS_ORIGIN, SpecOverlayAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, resolveOrgLogoUrl, shortEnvLabel, shortUserName, standardNavIcons, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference };
|
|
3671
|
-
//# sourceMappingURL=chunk-
|
|
3672
|
-
//# sourceMappingURL=chunk-
|
|
3700
|
+
//# sourceMappingURL=chunk-SF22BWQ2.js.map
|
|
3701
|
+
//# sourceMappingURL=chunk-SF22BWQ2.js.map
|