@burtson-labs/bandit-engine 2.0.142 → 2.0.144

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.
@@ -2979,9 +2979,44 @@ var PreferencesTab = ({
2979
2979
  ] }),
2980
2980
  gatewayConfigured && gatewayHealthError && /* @__PURE__ */ jsx3(Box3, { sx: { display: "flex", flexDirection: "column", gap: 0.75, pl: { xs: 0, sm: 0.5 } }, children: /* @__PURE__ */ jsx3(Typography3, { variant: "caption", color: "error", children: gatewayHealthError.message }) })
2981
2981
  ] })
2982
- ] })
2982
+ ] }),
2983
+ /* @__PURE__ */ jsx3(ViewportDiagnostics, {})
2983
2984
  ] }) });
2984
2985
  };
2986
+ var ViewportDiagnostics = () => {
2987
+ const [metrics, setMetrics] = useState3({});
2988
+ useEffect2(() => {
2989
+ const read = () => {
2990
+ const probe = document.createElement("div");
2991
+ probe.style.cssText = "position:fixed;top:0;bottom:0;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);visibility:hidden;pointer-events:none;";
2992
+ document.body.appendChild(probe);
2993
+ const cs = getComputedStyle(probe);
2994
+ const standalone = window.matchMedia?.("(display-mode: standalone)").matches || window.navigator.standalone === true;
2995
+ setMetrics({
2996
+ mode: standalone ? "standalone" : "browser",
2997
+ "screen.height": `${window.screen.height}`,
2998
+ innerHeight: `${window.innerHeight}`,
2999
+ "docElement.clientHeight": `${document.documentElement.clientHeight}`,
3000
+ "visualViewport.height": `${Math.round(window.visualViewport?.height ?? -1)}`,
3001
+ "probe fixed t0/b0 height": `${Math.round(probe.getBoundingClientRect().height)}`,
3002
+ "safe-area-top": cs.paddingTop,
3003
+ "safe-area-bottom": cs.paddingBottom
3004
+ });
3005
+ probe.remove();
3006
+ };
3007
+ read();
3008
+ window.addEventListener("resize", read);
3009
+ return () => window.removeEventListener("resize", read);
3010
+ }, []);
3011
+ return /* @__PURE__ */ jsxs3(Paper2, { variant: "outlined", sx: { p: 2, borderRadius: 2, opacity: 0.85 }, children: [
3012
+ /* @__PURE__ */ jsx3(Typography3, { variant: "caption", sx: { fontWeight: 700, display: "block", mb: 0.5 }, children: "Viewport diagnostics" }),
3013
+ Object.entries(metrics).map(([k, v]) => /* @__PURE__ */ jsxs3(Typography3, { variant: "caption", sx: { display: "block", fontFamily: "monospace" }, children: [
3014
+ k,
3015
+ ": ",
3016
+ v
3017
+ ] }, k))
3018
+ ] });
3019
+ };
2985
3020
  var PreferencesTab_default = PreferencesTab;
2986
3021
 
2987
3022
  // src/management/components/BrandingTab.tsx
@@ -9776,7 +9811,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
9776
9811
 
9777
9812
  // src/management/management.tsx
9778
9813
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
9779
- var preloadChatPage = () => import("./chat-OD4BF2XP.mjs");
9814
+ var preloadChatPage = () => import("./chat-QX6PB2YG.mjs");
9780
9815
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
9781
9816
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
9782
9817
  if (trimmed.endsWith("/api")) {
@@ -11149,4 +11184,4 @@ export {
11149
11184
  useGatewayMemory,
11150
11185
  management_default
11151
11186
  };
11152
- //# sourceMappingURL=chunk-CH5MEX6Q.mjs.map
11187
+ //# sourceMappingURL=chunk-ZZO2QCAD.mjs.map