@burtson-labs/bandit-engine 2.0.142 → 2.0.143
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/{chunk-CH5MEX6Q.mjs → chunk-KBRI54SC.mjs} +37 -2
- package/dist/chunk-KBRI54SC.mjs.map +1 -0
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/management/management.js +36 -1
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-CH5MEX6Q.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -37132,9 +37132,44 @@ var PreferencesTab = ({
|
|
|
37132
37132
|
] }),
|
|
37133
37133
|
gatewayConfigured && gatewayHealthError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75, pl: { xs: 0, sm: 0.5 } }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.Typography, { variant: "caption", color: "error", children: gatewayHealthError.message }) })
|
|
37134
37134
|
] })
|
|
37135
|
-
] })
|
|
37135
|
+
] }),
|
|
37136
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ViewportDiagnostics, {})
|
|
37136
37137
|
] }) });
|
|
37137
37138
|
};
|
|
37139
|
+
var ViewportDiagnostics = () => {
|
|
37140
|
+
const [metrics, setMetrics] = (0, import_react27.useState)({});
|
|
37141
|
+
(0, import_react27.useEffect)(() => {
|
|
37142
|
+
const read = () => {
|
|
37143
|
+
const probe = document.createElement("div");
|
|
37144
|
+
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;";
|
|
37145
|
+
document.body.appendChild(probe);
|
|
37146
|
+
const cs = getComputedStyle(probe);
|
|
37147
|
+
const standalone = window.matchMedia?.("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
37148
|
+
setMetrics({
|
|
37149
|
+
mode: standalone ? "standalone" : "browser",
|
|
37150
|
+
"screen.height": `${window.screen.height}`,
|
|
37151
|
+
innerHeight: `${window.innerHeight}`,
|
|
37152
|
+
"docElement.clientHeight": `${document.documentElement.clientHeight}`,
|
|
37153
|
+
"visualViewport.height": `${Math.round(window.visualViewport?.height ?? -1)}`,
|
|
37154
|
+
"probe fixed t0/b0 height": `${Math.round(probe.getBoundingClientRect().height)}`,
|
|
37155
|
+
"safe-area-top": cs.paddingTop,
|
|
37156
|
+
"safe-area-bottom": cs.paddingBottom
|
|
37157
|
+
});
|
|
37158
|
+
probe.remove();
|
|
37159
|
+
};
|
|
37160
|
+
read();
|
|
37161
|
+
window.addEventListener("resize", read);
|
|
37162
|
+
return () => window.removeEventListener("resize", read);
|
|
37163
|
+
}, []);
|
|
37164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_material20.Paper, { variant: "outlined", sx: { p: 2, borderRadius: 2, opacity: 0.85 }, children: [
|
|
37165
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.Typography, { variant: "caption", sx: { fontWeight: 700, display: "block", mb: 0.5 }, children: "Viewport diagnostics" }),
|
|
37166
|
+
Object.entries(metrics).map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_material20.Typography, { variant: "caption", sx: { display: "block", fontFamily: "monospace" }, children: [
|
|
37167
|
+
k,
|
|
37168
|
+
": ",
|
|
37169
|
+
v
|
|
37170
|
+
] }, k))
|
|
37171
|
+
] });
|
|
37172
|
+
};
|
|
37138
37173
|
var PreferencesTab_default = PreferencesTab;
|
|
37139
37174
|
|
|
37140
37175
|
// src/management/components/BrandingTab.tsx
|