@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.
- package/dist/{chat-OD4BF2XP.mjs → chat-QX6PB2YG.mjs} +2 -2
- package/dist/{chunk-EWAZFMA3.mjs → chunk-TQFUNLAT.mjs} +8 -1
- package/dist/chunk-TQFUNLAT.mjs.map +1 -0
- package/dist/{chunk-CH5MEX6Q.mjs → chunk-ZZO2QCAD.mjs} +38 -3
- package/dist/chunk-ZZO2QCAD.mjs.map +1 -0
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +43 -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/chunk-EWAZFMA3.mjs.map +0 -1
- /package/dist/{chat-OD4BF2XP.mjs.map → chat-QX6PB2YG.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -30659,6 +30659,13 @@ var init_chat2 = __esm({
|
|
|
30659
30659
|
const [isMobile, setIsMobile] = (0, import_react41.useState)(false);
|
|
30660
30660
|
const [drawerOpen, setDrawerOpen] = (0, import_react41.useState)(false);
|
|
30661
30661
|
const [mobileConversationsOpen, setMobileConversationsOpen] = (0, import_react41.useState)(false);
|
|
30662
|
+
(0, import_react41.useEffect)(() => {
|
|
30663
|
+
if (typeof document === "undefined") return;
|
|
30664
|
+
const meta = document.querySelector('meta[name="theme-color"]');
|
|
30665
|
+
if (!meta) return;
|
|
30666
|
+
const surface = isMobile && mobileConversationsOpen ? banditTheme.palette.background.paper : banditTheme.palette.chat?.shell ?? "#121212";
|
|
30667
|
+
meta.setAttribute("content", surface);
|
|
30668
|
+
}, [isMobile, mobileConversationsOpen, banditTheme]);
|
|
30662
30669
|
const { generateName } = useConversationNameGenerator();
|
|
30663
30670
|
const { preferences } = usePreferencesStore();
|
|
30664
30671
|
const { containerRef: chatContainerRef, targetRef: scrollTargetRef, scrollToBottom, getScrollState } = useAutoScroll({
|
|
@@ -38069,9 +38076,44 @@ var PreferencesTab = ({
|
|
|
38069
38076
|
] }),
|
|
38070
38077
|
gatewayConfigured && gatewayHealthError && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75, pl: { xs: 0, sm: 0.5 } }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "caption", color: "error", children: gatewayHealthError.message }) })
|
|
38071
38078
|
] })
|
|
38072
|
-
] })
|
|
38079
|
+
] }),
|
|
38080
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ViewportDiagnostics, {})
|
|
38073
38081
|
] }) });
|
|
38074
38082
|
};
|
|
38083
|
+
var ViewportDiagnostics = () => {
|
|
38084
|
+
const [metrics, setMetrics] = (0, import_react53.useState)({});
|
|
38085
|
+
(0, import_react53.useEffect)(() => {
|
|
38086
|
+
const read = () => {
|
|
38087
|
+
const probe = document.createElement("div");
|
|
38088
|
+
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;";
|
|
38089
|
+
document.body.appendChild(probe);
|
|
38090
|
+
const cs = getComputedStyle(probe);
|
|
38091
|
+
const standalone = window.matchMedia?.("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
38092
|
+
setMetrics({
|
|
38093
|
+
mode: standalone ? "standalone" : "browser",
|
|
38094
|
+
"screen.height": `${window.screen.height}`,
|
|
38095
|
+
innerHeight: `${window.innerHeight}`,
|
|
38096
|
+
"docElement.clientHeight": `${document.documentElement.clientHeight}`,
|
|
38097
|
+
"visualViewport.height": `${Math.round(window.visualViewport?.height ?? -1)}`,
|
|
38098
|
+
"probe fixed t0/b0 height": `${Math.round(probe.getBoundingClientRect().height)}`,
|
|
38099
|
+
"safe-area-top": cs.paddingTop,
|
|
38100
|
+
"safe-area-bottom": cs.paddingBottom
|
|
38101
|
+
});
|
|
38102
|
+
probe.remove();
|
|
38103
|
+
};
|
|
38104
|
+
read();
|
|
38105
|
+
window.addEventListener("resize", read);
|
|
38106
|
+
return () => window.removeEventListener("resize", read);
|
|
38107
|
+
}, []);
|
|
38108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Paper, { variant: "outlined", sx: { p: 2, borderRadius: 2, opacity: 0.85 }, children: [
|
|
38109
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "caption", sx: { fontWeight: 700, display: "block", mb: 0.5 }, children: "Viewport diagnostics" }),
|
|
38110
|
+
Object.entries(metrics).map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Typography, { variant: "caption", sx: { display: "block", fontFamily: "monospace" }, children: [
|
|
38111
|
+
k,
|
|
38112
|
+
": ",
|
|
38113
|
+
v
|
|
38114
|
+
] }, k))
|
|
38115
|
+
] });
|
|
38116
|
+
};
|
|
38075
38117
|
var PreferencesTab_default = PreferencesTab;
|
|
38076
38118
|
|
|
38077
38119
|
// src/management/components/BrandingTab.tsx
|