@burtson-labs/bandit-engine 2.0.119 → 2.0.121
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-4EDI4BLO.mjs → chat-NF4FKMA4.mjs} +2 -2
- package/dist/{chunk-BD6R7MTV.mjs → chunk-26KZF54U.mjs} +57 -9
- package/dist/chunk-26KZF54U.mjs.map +1 -0
- package/dist/{chunk-3TXU5SOO.mjs → chunk-HLNEVIFS.mjs} +157 -139
- package/dist/chunk-HLNEVIFS.mjs.map +1 -0
- package/dist/index.js +185 -120
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/management/management.js +185 -120
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3TXU5SOO.mjs.map +0 -1
- package/dist/chunk-BD6R7MTV.mjs.map +0 -1
- /package/dist/{chat-4EDI4BLO.mjs.map → chat-NF4FKMA4.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chat_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-26KZF54U.mjs";
|
|
4
4
|
import "./chunk-ONQMRE2G.mjs";
|
|
5
5
|
import "./chunk-W2EPDR5G.mjs";
|
|
6
6
|
import "./chunk-BN3D45E2.mjs";
|
|
@@ -13,4 +13,4 @@ import "./chunk-BJTO5JO5.mjs";
|
|
|
13
13
|
export {
|
|
14
14
|
chat_default as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chat-
|
|
16
|
+
//# sourceMappingURL=chat-NF4FKMA4.mjs.map
|
|
@@ -95,7 +95,7 @@ import { Box, Avatar, useMediaQuery } from "@mui/material";
|
|
|
95
95
|
import { useTheme } from "@mui/material/styles";
|
|
96
96
|
|
|
97
97
|
// src/chat/chat.css
|
|
98
|
-
styleInject(".typing-only {\n display: inline-flex;\n gap: 0.4rem;\n padding: 0;\n background: transparent;\n border-radius: 999px;\n box-shadow: none;\n}\n.typing-only .dot {\n width: 6px;\n height: 6px;\n background: #a78bfa;\n border-radius: 50%;\n animation: bounce 1.3s infinite ease-in-out;\n}\n.typing-only .dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.typing-only .dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes bounce {\n 0%, 80%, 100% {\n transform: translateY(0);\n opacity: 0.3;\n }\n 40% {\n transform: translateY(-6px);\n opacity: 1;\n }\n}\n
|
|
98
|
+
styleInject(".typing-only {\n display: inline-flex;\n gap: 0.4rem;\n padding: 0;\n background: transparent;\n border-radius: 999px;\n box-shadow: none;\n}\n.typing-only .dot {\n width: 6px;\n height: 6px;\n background: #a78bfa;\n border-radius: 50%;\n animation: bounce 1.3s infinite ease-in-out;\n}\n.typing-only .dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.typing-only .dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes bounce {\n 0%, 80%, 100% {\n transform: translateY(0);\n opacity: 0.3;\n }\n 40% {\n transform: translateY(-6px);\n opacity: 1;\n }\n}\n.logo-container {\n transition: opacity 0.5s ease, transform 0.5s ease;\n}\n.fade-in {\n opacity: 1;\n transform: scale(1);\n}\n.fade-out {\n opacity: 0;\n transform: translateY(-16px) scale(0.95);\n}\n@keyframes fadeOut {\n to {\n opacity: 0;\n transform: translateY(-5px);\n visibility: hidden;\n }\n}\n");
|
|
99
99
|
|
|
100
100
|
// src/chat/custom-logo.tsx
|
|
101
101
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
@@ -140,7 +140,7 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
140
140
|
component: "img",
|
|
141
141
|
src: logoBase64,
|
|
142
142
|
alt: "Custom Logo",
|
|
143
|
-
className: `logo-container ${visible ? "fade-in" : "fade-out"}
|
|
143
|
+
className: `logo-container ${visible ? "fade-in" : "fade-out"}`,
|
|
144
144
|
sx: {
|
|
145
145
|
width: isMobile ? "80vw" : "60vw",
|
|
146
146
|
maxWidth: 600,
|
|
@@ -155,7 +155,7 @@ var Logo = ({ visible, atTop = false }) => {
|
|
|
155
155
|
{
|
|
156
156
|
src: logoBase64,
|
|
157
157
|
variant: "circular",
|
|
158
|
-
className: `logo-container ${visible ? "fade-in" : "fade-out"}
|
|
158
|
+
className: `logo-container ${visible ? "fade-in" : "fade-out"}`,
|
|
159
159
|
sx: {
|
|
160
160
|
width: isMobile ? "50vw" : "400px",
|
|
161
161
|
height: isMobile ? "50vw" : "400px",
|
|
@@ -1905,12 +1905,17 @@ var RateLimitPrompt = () => {
|
|
|
1905
1905
|
navigate = null;
|
|
1906
1906
|
}
|
|
1907
1907
|
const safeNavigate = (to) => {
|
|
1908
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
1909
|
+
window.location.href = to;
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1908
1912
|
if (navigate) {
|
|
1909
1913
|
navigate(to);
|
|
1910
1914
|
} else if (typeof window !== "undefined") {
|
|
1911
1915
|
window.location.href = to;
|
|
1912
1916
|
}
|
|
1913
1917
|
};
|
|
1918
|
+
const plansUrl = typeof window !== "undefined" && !(window.location.hostname === "banditailabs.com" || window.location.hostname.endsWith(".banditailabs.com") || window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? "https://banditailabs.com/plans" : "/plans";
|
|
1914
1919
|
if (!prompt) {
|
|
1915
1920
|
return null;
|
|
1916
1921
|
}
|
|
@@ -1970,7 +1975,7 @@ var RateLimitPrompt = () => {
|
|
|
1970
1975
|
startIcon: /* @__PURE__ */ jsx10(AutoAwesomeIcon, { sx: { fontSize: "0.9rem" } }),
|
|
1971
1976
|
onClick: () => {
|
|
1972
1977
|
dismiss();
|
|
1973
|
-
safeNavigate(
|
|
1978
|
+
safeNavigate(plansUrl);
|
|
1974
1979
|
},
|
|
1975
1980
|
sx: { textTransform: "none", fontWeight: 600, borderRadius: 2 },
|
|
1976
1981
|
children: "Upgrade to keep chatting"
|
|
@@ -8240,6 +8245,10 @@ var ChatAppBar = ({
|
|
|
8240
8245
|
navigate = null;
|
|
8241
8246
|
}
|
|
8242
8247
|
const safeNavigate = (to) => {
|
|
8248
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
8249
|
+
window.location.href = to;
|
|
8250
|
+
return;
|
|
8251
|
+
}
|
|
8243
8252
|
if (navigate) {
|
|
8244
8253
|
navigate(to);
|
|
8245
8254
|
} else if (typeof window !== "undefined") {
|
|
@@ -8352,7 +8361,7 @@ var ChatAppBar = ({
|
|
|
8352
8361
|
const tier = String(getCurrentTier());
|
|
8353
8362
|
return tier !== "trial" && tier !== "expired" && tier !== "free" && tier !== "basic";
|
|
8354
8363
|
})();
|
|
8355
|
-
const plansPath = "/plans";
|
|
8364
|
+
const plansPath = typeof window !== "undefined" && !(window.location.hostname === "banditailabs.com" || window.location.hostname.endsWith(".banditailabs.com") || window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? "https://banditailabs.com/plans" : "/plans";
|
|
8356
8365
|
const isTTSAvailable = !!packageSettings?.gatewayApiUrl && preferences.ttsEnabled && hasTTS();
|
|
8357
8366
|
const currentConversation = conversations.find((c) => c.id === currentId);
|
|
8358
8367
|
const conversationCountDisplay = conversations.length > 99 ? "99+" : conversations.length.toString();
|
|
@@ -10072,7 +10081,8 @@ var ChatContent = () => {
|
|
|
10072
10081
|
if (brandingConfig) {
|
|
10073
10082
|
setBranding({
|
|
10074
10083
|
brandingText: brandingConfig.brandingText || "",
|
|
10075
|
-
logoBase64: brandingConfig.logoBase64 ?? void 0
|
|
10084
|
+
logoBase64: brandingConfig.logoBase64 ?? void 0,
|
|
10085
|
+
headerMode: brandingConfig.headerMode || "logo"
|
|
10076
10086
|
});
|
|
10077
10087
|
if (brandingConfig.brandingText) {
|
|
10078
10088
|
document.title = brandingConfig.brandingText;
|
|
@@ -10115,7 +10125,8 @@ var ChatContent = () => {
|
|
|
10115
10125
|
debugLogger.info("Loading branding and theme from CDN config");
|
|
10116
10126
|
setBranding({
|
|
10117
10127
|
brandingText: cdnBranding.brandingText,
|
|
10118
|
-
logoBase64: cdnBranding.logoBase64 ?? void 0
|
|
10128
|
+
logoBase64: cdnBranding.logoBase64 ?? void 0,
|
|
10129
|
+
headerMode: cdnBranding.headerMode || "logo"
|
|
10119
10130
|
});
|
|
10120
10131
|
if (cdnBranding.brandingText) {
|
|
10121
10132
|
document.title = cdnBranding.brandingText;
|
|
@@ -10796,7 +10807,44 @@ var ChatContent = () => {
|
|
|
10796
10807
|
pt: 2
|
|
10797
10808
|
},
|
|
10798
10809
|
children: [
|
|
10799
|
-
logoShouldRender && !brandingLoading && (
|
|
10810
|
+
logoShouldRender && !brandingLoading && (() => {
|
|
10811
|
+
const headerMode = branding?.headerMode ?? "logo";
|
|
10812
|
+
if (headerMode === "minimal") {
|
|
10813
|
+
return /* @__PURE__ */ jsx21(
|
|
10814
|
+
Box18,
|
|
10815
|
+
{
|
|
10816
|
+
sx: (theme) => ({
|
|
10817
|
+
textAlign: "center",
|
|
10818
|
+
mt: { xs: 6, md: 10 },
|
|
10819
|
+
mb: 2,
|
|
10820
|
+
px: 2,
|
|
10821
|
+
opacity: logoVisible ? 1 : 0,
|
|
10822
|
+
transition: "opacity 0.5s ease",
|
|
10823
|
+
color: theme.palette.text.primary
|
|
10824
|
+
}),
|
|
10825
|
+
children: /* @__PURE__ */ jsx21(Typography12, { sx: { fontWeight: 500, fontSize: { xs: "1.5rem", md: "1.9rem" }, lineHeight: 1.2 }, children: "What can I help with?" })
|
|
10826
|
+
}
|
|
10827
|
+
);
|
|
10828
|
+
}
|
|
10829
|
+
if (headerMode === "text") {
|
|
10830
|
+
return /* @__PURE__ */ jsx21(
|
|
10831
|
+
Box18,
|
|
10832
|
+
{
|
|
10833
|
+
sx: (theme) => ({
|
|
10834
|
+
textAlign: "center",
|
|
10835
|
+
mt: { xs: 6, md: 10 },
|
|
10836
|
+
mb: 2,
|
|
10837
|
+
px: 2,
|
|
10838
|
+
opacity: logoVisible ? 1 : 0,
|
|
10839
|
+
transition: "opacity 0.5s ease",
|
|
10840
|
+
color: theme.palette.text.primary
|
|
10841
|
+
}),
|
|
10842
|
+
children: /* @__PURE__ */ jsx21(Typography12, { sx: { fontWeight: 600, fontSize: { xs: "1.6rem", md: "2.1rem" }, lineHeight: 1.2 }, children: branding?.brandingText?.trim() || "Bandit AI" })
|
|
10843
|
+
}
|
|
10844
|
+
);
|
|
10845
|
+
}
|
|
10846
|
+
return branding?.logoBase64 ? /* @__PURE__ */ jsx21(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ jsx21(bandit_chat_logo_default, { visible: logoVisible, atTop: true });
|
|
10847
|
+
})(),
|
|
10800
10848
|
/* @__PURE__ */ jsx21(
|
|
10801
10849
|
Box18,
|
|
10802
10850
|
{
|
|
@@ -10954,4 +11002,4 @@ var chat_default = Chat;
|
|
|
10954
11002
|
export {
|
|
10955
11003
|
chat_default
|
|
10956
11004
|
};
|
|
10957
|
-
//# sourceMappingURL=chunk-
|
|
11005
|
+
//# sourceMappingURL=chunk-26KZF54U.mjs.map
|