@the-portland-company/shell 0.76.2 → 0.76.4
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/chrome.css +4 -1
- package/dist/{chunk-6KX3DWBC.js → chunk-Z2VEYL2A.js} +26 -4
- package/dist/chunk-Z2VEYL2A.js.map +1 -0
- package/dist/native.cjs +24 -2
- 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.cjs
CHANGED
|
@@ -795,6 +795,21 @@ function FuelRow({
|
|
|
795
795
|
) })
|
|
796
796
|
] });
|
|
797
797
|
}
|
|
798
|
+
var lowFuelHintVisible = false;
|
|
799
|
+
var lowFuelHintListeners = /* @__PURE__ */ new Set();
|
|
800
|
+
function setLowFuelHintVisible(visible) {
|
|
801
|
+
if (lowFuelHintVisible === visible) return;
|
|
802
|
+
lowFuelHintVisible = visible;
|
|
803
|
+
lowFuelHintListeners.forEach((l) => l());
|
|
804
|
+
}
|
|
805
|
+
function subscribeLowFuelHintVisible(onChange) {
|
|
806
|
+
lowFuelHintListeners.add(onChange);
|
|
807
|
+
return () => lowFuelHintListeners.delete(onChange);
|
|
808
|
+
}
|
|
809
|
+
function useLowFuelHintVisible() {
|
|
810
|
+
return react.useSyncExternalStore(subscribeLowFuelHintVisible, () => lowFuelHintVisible);
|
|
811
|
+
}
|
|
812
|
+
var LOW_FUEL_HINT_CLEARANCE_PX = 96;
|
|
798
813
|
function LowFuelHint({ lowFuel, orgId }) {
|
|
799
814
|
const [dismissed, setDismissed] = react.useState(() => {
|
|
800
815
|
if (typeof window === "undefined") return false;
|
|
@@ -812,7 +827,12 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
812
827
|
}
|
|
813
828
|
}, [lowFuel]);
|
|
814
829
|
const panelOpen = useAnyTopBarPanelOpen();
|
|
815
|
-
|
|
830
|
+
const showing = lowFuel && !dismissed && !panelOpen;
|
|
831
|
+
react.useEffect(() => {
|
|
832
|
+
setLowFuelHintVisible(showing);
|
|
833
|
+
return () => setLowFuelHintVisible(false);
|
|
834
|
+
}, [showing]);
|
|
835
|
+
if (!showing) return null;
|
|
816
836
|
const dismiss = () => {
|
|
817
837
|
try {
|
|
818
838
|
window.sessionStorage.setItem(LOW_FUEL_HINT_DISMISSED_KEY, "1");
|
|
@@ -824,7 +844,7 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
824
844
|
"div",
|
|
825
845
|
{
|
|
826
846
|
role: "status",
|
|
827
|
-
className: "absolute right-0 top-[calc(100%+10px)] z-
|
|
847
|
+
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)]",
|
|
828
848
|
onClick: (e) => e.stopPropagation(),
|
|
829
849
|
children: [
|
|
830
850
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1013,6 +1033,7 @@ function NewReplyToast({
|
|
|
1013
1033
|
const [visible, setVisible] = react.useState(false);
|
|
1014
1034
|
const onCloseRef = react.useRef(onClose);
|
|
1015
1035
|
onCloseRef.current = onClose;
|
|
1036
|
+
const lowFuelHintVisible2 = useLowFuelHintVisible();
|
|
1016
1037
|
react.useEffect(() => {
|
|
1017
1038
|
setVisible(true);
|
|
1018
1039
|
const fadeAt = Math.max(0, ttlMs - 450);
|
|
@@ -1042,6 +1063,7 @@ function NewReplyToast({
|
|
|
1042
1063
|
},
|
|
1043
1064
|
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)]",
|
|
1044
1065
|
style: {
|
|
1066
|
+
top: lowFuelHintVisible2 ? `calc(100% + 12px + ${LOW_FUEL_HINT_CLEARANCE_PX}px)` : void 0,
|
|
1045
1067
|
opacity: visible ? 1 : 0,
|
|
1046
1068
|
transform: visible ? "translateY(0px)" : "translateY(-4px)",
|
|
1047
1069
|
transition: "opacity 250ms ease, transform 250ms ease"
|