@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
package/dist/index.js
CHANGED
|
@@ -10940,7 +10940,7 @@ var init_chat = __esm({
|
|
|
10940
10940
|
"src/chat/chat.css"() {
|
|
10941
10941
|
"use strict";
|
|
10942
10942
|
init_style_inject();
|
|
10943
|
-
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
|
|
10943
|
+
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");
|
|
10944
10944
|
}
|
|
10945
10945
|
});
|
|
10946
10946
|
|
|
@@ -10998,7 +10998,7 @@ var init_custom_logo = __esm({
|
|
|
10998
10998
|
component: "img",
|
|
10999
10999
|
src: logoBase64,
|
|
11000
11000
|
alt: "Custom Logo",
|
|
11001
|
-
className: `logo-container ${visible ? "fade-in" : "fade-out"}
|
|
11001
|
+
className: `logo-container ${visible ? "fade-in" : "fade-out"}`,
|
|
11002
11002
|
sx: {
|
|
11003
11003
|
width: isMobile ? "80vw" : "60vw",
|
|
11004
11004
|
maxWidth: 600,
|
|
@@ -11013,7 +11013,7 @@ var init_custom_logo = __esm({
|
|
|
11013
11013
|
{
|
|
11014
11014
|
src: logoBase64,
|
|
11015
11015
|
variant: "circular",
|
|
11016
|
-
className: `logo-container ${visible ? "fade-in" : "fade-out"}
|
|
11016
|
+
className: `logo-container ${visible ? "fade-in" : "fade-out"}`,
|
|
11017
11017
|
sx: {
|
|
11018
11018
|
width: isMobile ? "50vw" : "400px",
|
|
11019
11019
|
height: isMobile ? "50vw" : "400px",
|
|
@@ -19711,12 +19711,17 @@ var init_rate_limit_prompt = __esm({
|
|
|
19711
19711
|
navigate = null;
|
|
19712
19712
|
}
|
|
19713
19713
|
const safeNavigate = (to) => {
|
|
19714
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
19715
|
+
window.location.href = to;
|
|
19716
|
+
return;
|
|
19717
|
+
}
|
|
19714
19718
|
if (navigate) {
|
|
19715
19719
|
navigate(to);
|
|
19716
19720
|
} else if (typeof window !== "undefined") {
|
|
19717
19721
|
window.location.href = to;
|
|
19718
19722
|
}
|
|
19719
19723
|
};
|
|
19724
|
+
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";
|
|
19720
19725
|
if (!prompt) {
|
|
19721
19726
|
return null;
|
|
19722
19727
|
}
|
|
@@ -19776,7 +19781,7 @@ var init_rate_limit_prompt = __esm({
|
|
|
19776
19781
|
startIcon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AutoAwesomeIcon, { sx: { fontSize: "0.9rem" } }),
|
|
19777
19782
|
onClick: () => {
|
|
19778
19783
|
dismiss();
|
|
19779
|
-
safeNavigate(
|
|
19784
|
+
safeNavigate(plansUrl);
|
|
19780
19785
|
},
|
|
19781
19786
|
sx: { textTransform: "none", fontWeight: 600, borderRadius: 2 },
|
|
19782
19787
|
children: "Upgrade to keep chatting"
|
|
@@ -26119,6 +26124,10 @@ var init_chat_app_bar = __esm({
|
|
|
26119
26124
|
navigate = null;
|
|
26120
26125
|
}
|
|
26121
26126
|
const safeNavigate = (to) => {
|
|
26127
|
+
if (typeof window !== "undefined" && /^https?:\/\//.test(to)) {
|
|
26128
|
+
window.location.href = to;
|
|
26129
|
+
return;
|
|
26130
|
+
}
|
|
26122
26131
|
if (navigate) {
|
|
26123
26132
|
navigate(to);
|
|
26124
26133
|
} else if (typeof window !== "undefined") {
|
|
@@ -26231,7 +26240,7 @@ var init_chat_app_bar = __esm({
|
|
|
26231
26240
|
const tier = String(getCurrentTier());
|
|
26232
26241
|
return tier !== "trial" && tier !== "expired" && tier !== "free" && tier !== "basic";
|
|
26233
26242
|
})();
|
|
26234
|
-
const plansPath = "/plans";
|
|
26243
|
+
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";
|
|
26235
26244
|
const isTTSAvailable = !!packageSettings?.gatewayApiUrl && preferences.ttsEnabled && hasTTS();
|
|
26236
26245
|
const currentConversation = conversations.find((c) => c.id === currentId);
|
|
26237
26246
|
const conversationCountDisplay = conversations.length > 99 ? "99+" : conversations.length.toString();
|
|
@@ -30677,7 +30686,8 @@ var init_chat2 = __esm({
|
|
|
30677
30686
|
if (brandingConfig) {
|
|
30678
30687
|
setBranding({
|
|
30679
30688
|
brandingText: brandingConfig.brandingText || "",
|
|
30680
|
-
logoBase64: brandingConfig.logoBase64 ?? void 0
|
|
30689
|
+
logoBase64: brandingConfig.logoBase64 ?? void 0,
|
|
30690
|
+
headerMode: brandingConfig.headerMode || "logo"
|
|
30681
30691
|
});
|
|
30682
30692
|
if (brandingConfig.brandingText) {
|
|
30683
30693
|
document.title = brandingConfig.brandingText;
|
|
@@ -30720,7 +30730,8 @@ var init_chat2 = __esm({
|
|
|
30720
30730
|
debugLogger.info("Loading branding and theme from CDN config");
|
|
30721
30731
|
setBranding({
|
|
30722
30732
|
brandingText: cdnBranding.brandingText,
|
|
30723
|
-
logoBase64: cdnBranding.logoBase64 ?? void 0
|
|
30733
|
+
logoBase64: cdnBranding.logoBase64 ?? void 0,
|
|
30734
|
+
headerMode: cdnBranding.headerMode || "logo"
|
|
30724
30735
|
});
|
|
30725
30736
|
if (cdnBranding.brandingText) {
|
|
30726
30737
|
document.title = cdnBranding.brandingText;
|
|
@@ -31401,7 +31412,44 @@ var init_chat2 = __esm({
|
|
|
31401
31412
|
pt: 2
|
|
31402
31413
|
},
|
|
31403
31414
|
children: [
|
|
31404
|
-
logoShouldRender && !brandingLoading && (
|
|
31415
|
+
logoShouldRender && !brandingLoading && (() => {
|
|
31416
|
+
const headerMode = branding?.headerMode ?? "logo";
|
|
31417
|
+
if (headerMode === "minimal") {
|
|
31418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
31419
|
+
import_material32.Box,
|
|
31420
|
+
{
|
|
31421
|
+
sx: (theme) => ({
|
|
31422
|
+
textAlign: "center",
|
|
31423
|
+
mt: { xs: 6, md: 10 },
|
|
31424
|
+
mb: 2,
|
|
31425
|
+
px: 2,
|
|
31426
|
+
opacity: logoVisible ? 1 : 0,
|
|
31427
|
+
transition: "opacity 0.5s ease",
|
|
31428
|
+
color: theme.palette.text.primary
|
|
31429
|
+
}),
|
|
31430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material32.Typography, { sx: { fontWeight: 500, fontSize: { xs: "1.5rem", md: "1.9rem" }, lineHeight: 1.2 }, children: "What can I help with?" })
|
|
31431
|
+
}
|
|
31432
|
+
);
|
|
31433
|
+
}
|
|
31434
|
+
if (headerMode === "text") {
|
|
31435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
31436
|
+
import_material32.Box,
|
|
31437
|
+
{
|
|
31438
|
+
sx: (theme) => ({
|
|
31439
|
+
textAlign: "center",
|
|
31440
|
+
mt: { xs: 6, md: 10 },
|
|
31441
|
+
mb: 2,
|
|
31442
|
+
px: 2,
|
|
31443
|
+
opacity: logoVisible ? 1 : 0,
|
|
31444
|
+
transition: "opacity 0.5s ease",
|
|
31445
|
+
color: theme.palette.text.primary
|
|
31446
|
+
}),
|
|
31447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material32.Typography, { sx: { fontWeight: 600, fontSize: { xs: "1.6rem", md: "2.1rem" }, lineHeight: 1.2 }, children: branding?.brandingText?.trim() || "Bandit AI" })
|
|
31448
|
+
}
|
|
31449
|
+
);
|
|
31450
|
+
}
|
|
31451
|
+
return branding?.logoBase64 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(custom_logo_default, { visible: logoVisible, atTop: true }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(bandit_chat_logo_default, { visible: logoVisible, atTop: true });
|
|
31452
|
+
})(),
|
|
31405
31453
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
31406
31454
|
import_material32.Box,
|
|
31407
31455
|
{
|
|
@@ -37838,37 +37886,50 @@ var LogoCropper = ({
|
|
|
37838
37886
|
onClose();
|
|
37839
37887
|
}, [onClose]);
|
|
37840
37888
|
const handleCrop = (0, import_react52.useCallback)(() => {
|
|
37841
|
-
const canvas = document.createElement("canvas");
|
|
37842
|
-
const ctx = canvas.getContext("2d");
|
|
37843
37889
|
const image = imageRef.current;
|
|
37844
|
-
if (!
|
|
37890
|
+
if (!image) return;
|
|
37845
37891
|
const cropDims = getCropDimensions();
|
|
37892
|
+
const scene = document.createElement("canvas");
|
|
37893
|
+
scene.width = CANVAS_SIZE;
|
|
37894
|
+
scene.height = CANVAS_SIZE;
|
|
37895
|
+
const sceneCtx = scene.getContext("2d");
|
|
37896
|
+
if (!sceneCtx) return;
|
|
37897
|
+
sceneCtx.clearRect(0, 0, CANVAS_SIZE, CANVAS_SIZE);
|
|
37898
|
+
sceneCtx.save();
|
|
37899
|
+
sceneCtx.translate(CANVAS_SIZE / 2, CANVAS_SIZE / 2);
|
|
37900
|
+
sceneCtx.rotate(cropSettings.rotation * Math.PI / 180);
|
|
37901
|
+
sceneCtx.scale(cropSettings.scale, cropSettings.scale);
|
|
37902
|
+
sceneCtx.translate(-image.naturalWidth / 2 + cropSettings.x, -image.naturalHeight / 2 + cropSettings.y);
|
|
37903
|
+
sceneCtx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
|
|
37904
|
+
sceneCtx.restore();
|
|
37905
|
+
const cropX = (CANVAS_SIZE - cropDims.width) / 2;
|
|
37906
|
+
const cropY = (CANVAS_SIZE - cropDims.height) / 2;
|
|
37846
37907
|
const finalSize = LOGO_OUTPUT_SIZES[outputSize];
|
|
37847
|
-
const
|
|
37908
|
+
const cropAspect = cropDims.width / cropDims.height;
|
|
37848
37909
|
let outputWidth = finalSize;
|
|
37849
37910
|
let outputHeight = finalSize;
|
|
37850
|
-
if (
|
|
37851
|
-
|
|
37852
|
-
|
|
37853
|
-
|
|
37854
|
-
outputWidth = finalSize * aspectRatioValue;
|
|
37855
|
-
}
|
|
37911
|
+
if (cropAspect > 1) {
|
|
37912
|
+
outputHeight = Math.round(finalSize / cropAspect);
|
|
37913
|
+
} else if (cropAspect < 1) {
|
|
37914
|
+
outputWidth = Math.round(finalSize * cropAspect);
|
|
37856
37915
|
}
|
|
37916
|
+
const canvas = document.createElement("canvas");
|
|
37857
37917
|
canvas.width = outputWidth;
|
|
37858
37918
|
canvas.height = outputHeight;
|
|
37859
|
-
ctx.
|
|
37919
|
+
const ctx = canvas.getContext("2d");
|
|
37920
|
+
if (!ctx) return;
|
|
37860
37921
|
ctx.clearRect(0, 0, outputWidth, outputHeight);
|
|
37861
|
-
|
|
37862
|
-
|
|
37863
|
-
|
|
37864
|
-
|
|
37865
|
-
|
|
37866
|
-
|
|
37867
|
-
|
|
37868
|
-
|
|
37922
|
+
ctx.drawImage(
|
|
37923
|
+
scene,
|
|
37924
|
+
cropX,
|
|
37925
|
+
cropY,
|
|
37926
|
+
cropDims.width,
|
|
37927
|
+
cropDims.height,
|
|
37928
|
+
0,
|
|
37929
|
+
0,
|
|
37930
|
+
outputWidth,
|
|
37931
|
+
outputHeight
|
|
37869
37932
|
);
|
|
37870
|
-
ctx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
|
|
37871
|
-
ctx.restore();
|
|
37872
37933
|
const croppedDataUrl = canvas.toDataURL("image/png", 1);
|
|
37873
37934
|
onCrop(croppedDataUrl);
|
|
37874
37935
|
setImageSrc("");
|
|
@@ -37876,7 +37937,7 @@ var LogoCropper = ({
|
|
|
37876
37937
|
setCropSettings({ x: 0, y: 0, scale: 1, rotation: 0 });
|
|
37877
37938
|
setAspectRatio("square");
|
|
37878
37939
|
onClose();
|
|
37879
|
-
}, [cropSettings, onCrop, getCropDimensions, outputSize,
|
|
37940
|
+
}, [cropSettings, onCrop, getCropDimensions, outputSize, onClose]);
|
|
37880
37941
|
const handleScaleChange = (0, import_react52.useCallback)((value) => {
|
|
37881
37942
|
const cropDims = getCropDimensions();
|
|
37882
37943
|
const minScale2 = Math.max(
|
|
@@ -37910,8 +37971,8 @@ var LogoCropper = ({
|
|
|
37910
37971
|
},
|
|
37911
37972
|
children: [
|
|
37912
37973
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.DialogTitle, { sx: { pb: 1 }, children: [
|
|
37913
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "h6", sx: { fontWeight: 600 }, children: "
|
|
37914
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", color: "text.secondary", children: "Position
|
|
37974
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "h6", sx: { fontWeight: 600 }, children: "Crop Logo" }),
|
|
37975
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", color: "text.secondary", children: "Position and size your logo. The selected region is exported at its true aspect ratio." })
|
|
37915
37976
|
] }),
|
|
37916
37977
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.DialogContent, { children: imageSrc && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
37917
37978
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -37975,7 +38036,7 @@ var LogoCropper = ({
|
|
|
37975
38036
|
pointerEvents: "none",
|
|
37976
38037
|
opacity: 0.9
|
|
37977
38038
|
},
|
|
37978
|
-
children: "Drag to reposition \
|
|
38039
|
+
children: "Drag to reposition \u2014 the outlined area is exported"
|
|
37979
38040
|
}
|
|
37980
38041
|
)
|
|
37981
38042
|
]
|
|
@@ -37984,7 +38045,7 @@ var LogoCropper = ({
|
|
|
37984
38045
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { width: 300, display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
37985
38046
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
|
|
37986
38047
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
|
|
37987
|
-
"
|
|
38048
|
+
"Preview (",
|
|
37988
38049
|
LOGO_OUTPUT_SIZES[outputSize],
|
|
37989
38050
|
"px)"
|
|
37990
38051
|
] }),
|
|
@@ -38004,7 +38065,7 @@ var LogoCropper = ({
|
|
|
38004
38065
|
) })
|
|
38005
38066
|
] }),
|
|
38006
38067
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
|
|
38007
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "
|
|
38068
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Aspect Ratio" }),
|
|
38008
38069
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
38009
38070
|
import_material43.ToggleButtonGroup,
|
|
38010
38071
|
{
|
|
@@ -38031,7 +38092,7 @@ var LogoCropper = ({
|
|
|
38031
38092
|
)
|
|
38032
38093
|
] }),
|
|
38033
38094
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
|
|
38034
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "
|
|
38095
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Output Size" }),
|
|
38035
38096
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
38036
38097
|
import_material43.ToggleButtonGroup,
|
|
38037
38098
|
{
|
|
@@ -38050,7 +38111,7 @@ var LogoCropper = ({
|
|
|
38050
38111
|
] }),
|
|
38051
38112
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
|
|
38052
38113
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
|
|
38053
|
-
"
|
|
38114
|
+
"Zoom: ",
|
|
38054
38115
|
Math.round(cropSettings.scale * 100),
|
|
38055
38116
|
"%"
|
|
38056
38117
|
] }),
|
|
@@ -38087,7 +38148,7 @@ var LogoCropper = ({
|
|
|
38087
38148
|
] })
|
|
38088
38149
|
] }),
|
|
38089
38150
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
|
|
38090
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "
|
|
38151
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Rotation" }),
|
|
38091
38152
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { display: "flex", gap: 1 }, children: [
|
|
38092
38153
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
38093
38154
|
import_material43.Button,
|
|
@@ -38122,26 +38183,7 @@ var LogoCropper = ({
|
|
|
38122
38183
|
}
|
|
38123
38184
|
)
|
|
38124
38185
|
] }),
|
|
38125
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.
|
|
38126
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "\u2728 Logo Features:" }) }),
|
|
38127
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mt: 0.5, fontSize: "0.8rem" }, children: [
|
|
38128
|
-
"\u2022 ",
|
|
38129
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Transparency preserved" }),
|
|
38130
|
-
" for clean logos",
|
|
38131
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
|
|
38132
|
-
"\u2022 ",
|
|
38133
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "High quality PNG" }),
|
|
38134
|
-
" output",
|
|
38135
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
|
|
38136
|
-
"\u2022 ",
|
|
38137
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Multiple sizes" }),
|
|
38138
|
-
" for different uses",
|
|
38139
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
|
|
38140
|
-
"\u2022 ",
|
|
38141
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Perfect for branding" }),
|
|
38142
|
-
" across platforms"
|
|
38143
|
-
] })
|
|
38144
|
-
] })
|
|
38186
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Alert, { severity: "info", variant: "outlined", sx: { borderRadius: 2, py: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "caption", sx: { fontSize: "0.75rem", lineHeight: 1.5 }, children: "Exported as a transparent PNG at the selected aspect ratio. Wide logos stay wide." }) })
|
|
38145
38187
|
] })
|
|
38146
38188
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Box, { sx: { display: "flex", justifyContent: "center", py: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { children: "Loading image..." }) })
|
|
38147
38189
|
] }) }),
|
|
@@ -38157,7 +38199,7 @@ var LogoCropper = ({
|
|
|
38157
38199
|
px: 3,
|
|
38158
38200
|
fontWeight: 600
|
|
38159
38201
|
},
|
|
38160
|
-
children: "
|
|
38202
|
+
children: "Apply Crop"
|
|
38161
38203
|
}
|
|
38162
38204
|
)
|
|
38163
38205
|
] })
|
|
@@ -38177,6 +38219,8 @@ var BrandingTab = ({
|
|
|
38177
38219
|
logoBase64,
|
|
38178
38220
|
brandingText,
|
|
38179
38221
|
setBrandingText,
|
|
38222
|
+
headerMode,
|
|
38223
|
+
setHeaderMode,
|
|
38180
38224
|
theme,
|
|
38181
38225
|
setTheme,
|
|
38182
38226
|
predefinedThemes: predefinedThemes2,
|
|
@@ -38359,10 +38403,9 @@ var BrandingTab = ({
|
|
|
38359
38403
|
import_material44.Box,
|
|
38360
38404
|
{
|
|
38361
38405
|
sx: {
|
|
38362
|
-
width: { xs: "100%", md: "
|
|
38406
|
+
width: { xs: "100%", md: "34%" },
|
|
38363
38407
|
display: "flex",
|
|
38364
38408
|
flexDirection: "column",
|
|
38365
|
-
height: { xs: "auto", md: 260 },
|
|
38366
38409
|
gap: { xs: 1.5, md: 0 }
|
|
38367
38410
|
},
|
|
38368
38411
|
children: [
|
|
@@ -38473,22 +38516,47 @@ var BrandingTab = ({
|
|
|
38473
38516
|
)
|
|
38474
38517
|
] })
|
|
38475
38518
|
] }),
|
|
38476
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.
|
|
38477
|
-
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38482
|
-
|
|
38483
|
-
|
|
38484
|
-
|
|
38485
|
-
|
|
38486
|
-
|
|
38487
|
-
|
|
38488
|
-
|
|
38519
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: { mt: 1.5, flex: "0 0 auto", display: "flex", flexDirection: "column", gap: 1.25 }, children: [
|
|
38520
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
38521
|
+
import_material44.TextField,
|
|
38522
|
+
{
|
|
38523
|
+
label: "Custom Branding Text",
|
|
38524
|
+
variant: "outlined",
|
|
38525
|
+
value: brandingText,
|
|
38526
|
+
onChange: (e) => setBrandingText(e.target.value),
|
|
38527
|
+
fullWidth: true,
|
|
38528
|
+
placeholder: "e.g., Powered by YourCompany",
|
|
38529
|
+
size: "small",
|
|
38530
|
+
sx: {
|
|
38531
|
+
"& .MuiInputBase-root": { fontSize: "0.85rem" },
|
|
38532
|
+
"& .MuiFormHelperText-root": { fontSize: "0.7rem" }
|
|
38533
|
+
}
|
|
38489
38534
|
}
|
|
38490
|
-
|
|
38491
|
-
|
|
38535
|
+
),
|
|
38536
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { children: [
|
|
38537
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "overline", sx: { mb: 0.5, fontWeight: 700, fontSize: "0.7rem", letterSpacing: 0.6, color: "text.secondary", display: "block" }, children: "Welcome Header" }),
|
|
38538
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
38539
|
+
import_material44.ToggleButtonGroup,
|
|
38540
|
+
{
|
|
38541
|
+
value: headerMode,
|
|
38542
|
+
exclusive: true,
|
|
38543
|
+
onChange: (_, mode) => mode && setHeaderMode(mode),
|
|
38544
|
+
size: "small",
|
|
38545
|
+
fullWidth: true,
|
|
38546
|
+
children: [
|
|
38547
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ToggleButton, { value: "logo", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Logo" }),
|
|
38548
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ToggleButton, { value: "text", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Text" }),
|
|
38549
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.ToggleButton, { value: "minimal", sx: { fontSize: "0.7rem", py: 0.4, textTransform: "none" }, children: "Minimal" })
|
|
38550
|
+
]
|
|
38551
|
+
}
|
|
38552
|
+
),
|
|
38553
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 0.5, fontSize: "0.68rem", lineHeight: 1.4 }, children: [
|
|
38554
|
+
headerMode === "logo" && "Show the brand logo above the chat.",
|
|
38555
|
+
headerMode === "text" && "Show branding text only, no logo.",
|
|
38556
|
+
headerMode === "minimal" && "No logo or text \u2014 clean greeting only."
|
|
38557
|
+
] })
|
|
38558
|
+
] })
|
|
38559
|
+
] })
|
|
38492
38560
|
]
|
|
38493
38561
|
}
|
|
38494
38562
|
),
|
|
@@ -38498,79 +38566,65 @@ var BrandingTab = ({
|
|
|
38498
38566
|
import_material44.Box,
|
|
38499
38567
|
{
|
|
38500
38568
|
sx: {
|
|
38501
|
-
height: { xs:
|
|
38569
|
+
height: { xs: 180, md: 200 },
|
|
38502
38570
|
display: "flex",
|
|
38503
38571
|
flexDirection: "column",
|
|
38504
38572
|
position: "relative",
|
|
38505
38573
|
bgcolor: "background.default",
|
|
38506
38574
|
borderRadius: 2,
|
|
38507
38575
|
overflow: "hidden",
|
|
38576
|
+
border: "1px solid",
|
|
38577
|
+
borderColor: "divider",
|
|
38508
38578
|
px: 2,
|
|
38509
|
-
py:
|
|
38579
|
+
py: 1.5
|
|
38510
38580
|
},
|
|
38511
38581
|
children: [
|
|
38512
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.
|
|
38582
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
|
|
38513
38583
|
display: "flex",
|
|
38514
38584
|
justifyContent: "center",
|
|
38515
38585
|
alignItems: "center",
|
|
38516
38586
|
flex: "1 1 auto",
|
|
38517
38587
|
minHeight: 0
|
|
38518
|
-
}, children: logoBase64 || getDefaultLogo() ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
38519
|
-
"img",
|
|
38520
|
-
{
|
|
38521
|
-
src: logoBase64 || getDefaultLogo(),
|
|
38522
|
-
alt: "Logo Preview",
|
|
38523
|
-
style: {
|
|
38524
|
-
maxWidth: "320px",
|
|
38525
|
-
height: "auto",
|
|
38526
|
-
imageRendering: "auto",
|
|
38527
|
-
objectFit: "contain",
|
|
38528
|
-
filter: "contrast(1.1) saturate(1.05)"
|
|
38529
|
-
}
|
|
38530
|
-
}
|
|
38531
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
|
|
38532
|
-
display: "flex",
|
|
38533
|
-
flexDirection: "column",
|
|
38534
|
-
alignItems: "center",
|
|
38535
|
-
gap: 0.5
|
|
38536
38588
|
}, children: [
|
|
38537
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
38589
|
+
headerMode === "logo" && (logoBase64 || getDefaultLogo() ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
38590
|
+
"img",
|
|
38591
|
+
{
|
|
38592
|
+
src: logoBase64 || getDefaultLogo(),
|
|
38593
|
+
alt: "Logo Preview",
|
|
38594
|
+
style: {
|
|
38595
|
+
maxWidth: "240px",
|
|
38596
|
+
maxHeight: "100%",
|
|
38597
|
+
height: "auto",
|
|
38598
|
+
imageRendering: "auto",
|
|
38599
|
+
objectFit: "contain",
|
|
38600
|
+
filter: "contrast(1.1) saturate(1.05)"
|
|
38601
|
+
}
|
|
38602
|
+
}
|
|
38603
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
38538
38604
|
import_material44.Skeleton,
|
|
38539
38605
|
{
|
|
38540
38606
|
variant: "rectangular",
|
|
38541
|
-
width:
|
|
38542
|
-
height:
|
|
38607
|
+
width: 140,
|
|
38608
|
+
height: 36,
|
|
38543
38609
|
sx: {
|
|
38544
38610
|
borderRadius: 2,
|
|
38545
38611
|
bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"
|
|
38546
38612
|
}
|
|
38547
38613
|
}
|
|
38548
|
-
),
|
|
38549
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "
|
|
38550
|
-
|
|
38614
|
+
)),
|
|
38615
|
+
headerMode === "text" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "h6", sx: { fontWeight: 600, color: "text.primary", textAlign: "center" }, children: brandingText || "Bandit AI" }),
|
|
38616
|
+
headerMode === "minimal" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "h6", sx: { fontWeight: 500, color: "text.secondary", textAlign: "center" }, children: "What can I help with?" })
|
|
38617
|
+
] }),
|
|
38551
38618
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
|
|
38552
38619
|
display: "flex",
|
|
38553
38620
|
flexDirection: "column",
|
|
38554
38621
|
alignItems: "center",
|
|
38555
38622
|
width: "100%",
|
|
38556
38623
|
flex: "0 0 auto",
|
|
38557
|
-
gap:
|
|
38624
|
+
gap: 0.75
|
|
38558
38625
|
}, children: [
|
|
38559
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.
|
|
38560
|
-
|
|
38561
|
-
{
|
|
38562
|
-
variant: "rectangular",
|
|
38563
|
-
width: 80,
|
|
38564
|
-
height: 24,
|
|
38565
|
-
sx: {
|
|
38566
|
-
borderRadius: 2,
|
|
38567
|
-
bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
|
|
38568
|
-
}
|
|
38569
|
-
},
|
|
38570
|
-
i
|
|
38571
|
-
)) }),
|
|
38572
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Paper, { elevation: 3, sx: { px: 2, py: 1.5, borderRadius: 2, width: "100%", maxWidth: 500 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "body1", sx: { color: "text.secondary" }, children: "What's on your mind?" }) }),
|
|
38573
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Typography, { variant: "caption", sx: { textAlign: "center", color: "text.secondary", mt: 1 }, children: [
|
|
38626
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Paper, { elevation: 2, sx: { px: 2, py: 1, borderRadius: 2, width: "100%", maxWidth: 440 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "body2", sx: { color: "text.secondary" }, children: "What's on your mind?" }) }),
|
|
38627
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Typography, { variant: "caption", sx: { textAlign: "center", color: "text.secondary", fontSize: "0.68rem" }, children: [
|
|
38574
38628
|
brandingText ? `${brandingText} \u2022 ` : "Bandit AI \u2022 ",
|
|
38575
38629
|
"may be wrong \u2014 double-check important info."
|
|
38576
38630
|
] })
|
|
@@ -38731,7 +38785,7 @@ var BrandingTab = ({
|
|
|
38731
38785
|
disabled: saveStatus === "saving",
|
|
38732
38786
|
color: saveStatus === "saved" ? "success" : saveStatus === "error" ? "error" : "primary",
|
|
38733
38787
|
sx: { height: 36, fontSize: "0.8rem" },
|
|
38734
|
-
children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "
|
|
38788
|
+
children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "Saved" : saveStatus === "error" ? "Error" : "Save"
|
|
38735
38789
|
}
|
|
38736
38790
|
) }),
|
|
38737
38791
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Box, { sx: { flexBasis: { xs: "calc(50% - 4px)", sm: "calc(25% - 6px)" } }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
@@ -44392,6 +44446,7 @@ var Management = () => {
|
|
|
44392
44446
|
const [logoFile, setLogoFile] = (0, import_react63.useState)(null);
|
|
44393
44447
|
const [logoBase64, setLogoBase64] = (0, import_react63.useState)(null);
|
|
44394
44448
|
const [brandingText, setBrandingText] = (0, import_react63.useState)("");
|
|
44449
|
+
const [headerMode, setHeaderMode] = (0, import_react63.useState)("logo");
|
|
44395
44450
|
const [theme, setTheme] = (0, import_react63.useState)("bandit-dark");
|
|
44396
44451
|
const [customAvatarBase64, setCustomAvatarBase64] = (0, import_react63.useState)(null);
|
|
44397
44452
|
const [presetAvatar, setPresetAvatar] = (0, import_react63.useState)(null);
|
|
@@ -44485,6 +44540,7 @@ var Management = () => {
|
|
|
44485
44540
|
hasCustomTheme: !!(brandingConfig?.theme && brandingConfig.theme !== "bandit-dark")
|
|
44486
44541
|
});
|
|
44487
44542
|
setBrandingText(brandingConfig?.brandingText || "");
|
|
44543
|
+
setHeaderMode(brandingConfig?.headerMode || "logo");
|
|
44488
44544
|
setTheme(brandingConfig?.theme || "bandit-dark");
|
|
44489
44545
|
setLogoBase64(brandingConfig?.logoBase64 || null);
|
|
44490
44546
|
if (brandingConfig?.hasTransparentLogo !== void 0) {
|
|
@@ -44510,6 +44566,7 @@ var Management = () => {
|
|
|
44510
44566
|
if (cdnBranding) {
|
|
44511
44567
|
debugLogger.info("Applying CDN branding");
|
|
44512
44568
|
setBrandingText(cdnBranding.brandingText || "");
|
|
44569
|
+
setHeaderMode(cdnBranding.headerMode || "logo");
|
|
44513
44570
|
setTheme(cdnBranding.theme || "bandit-dark");
|
|
44514
44571
|
setLogoBase64(cdnBranding.logoBase64 || null);
|
|
44515
44572
|
if (cdnBranding.hasTransparentLogo !== void 0) {
|
|
@@ -44708,6 +44765,7 @@ var Management = () => {
|
|
|
44708
44765
|
branding: {
|
|
44709
44766
|
logoBase64,
|
|
44710
44767
|
brandingText,
|
|
44768
|
+
headerMode,
|
|
44711
44769
|
theme,
|
|
44712
44770
|
hasTransparentLogo: finalHasTransparentLogo,
|
|
44713
44771
|
userSaved: true
|
|
@@ -44766,6 +44824,7 @@ var Management = () => {
|
|
|
44766
44824
|
branding: {
|
|
44767
44825
|
logoBase64: logoBase64 || "",
|
|
44768
44826
|
brandingText: brandingText || "",
|
|
44827
|
+
headerMode,
|
|
44769
44828
|
theme,
|
|
44770
44829
|
hasTransparentLogo: hasLogo ? await detectTransparency(logoBase64) : false
|
|
44771
44830
|
},
|
|
@@ -44810,6 +44869,7 @@ var Management = () => {
|
|
|
44810
44869
|
if (cdnBranding) {
|
|
44811
44870
|
setLogoBase64(cdnBranding.logoBase64 || null);
|
|
44812
44871
|
setBrandingText(cdnBranding.brandingText || "");
|
|
44872
|
+
setHeaderMode(cdnBranding.headerMode || "logo");
|
|
44813
44873
|
setTheme(cdnBranding.theme || "bandit-dark");
|
|
44814
44874
|
if (cdnBranding.hasTransparentLogo !== void 0) {
|
|
44815
44875
|
setHasTransparentLogo(cdnBranding.hasTransparentLogo);
|
|
@@ -44820,6 +44880,7 @@ var Management = () => {
|
|
|
44820
44880
|
} else {
|
|
44821
44881
|
setLogoBase64(null);
|
|
44822
44882
|
setBrandingText("");
|
|
44883
|
+
setHeaderMode("logo");
|
|
44823
44884
|
setTheme("bandit-dark");
|
|
44824
44885
|
setHasTransparentLogo(true);
|
|
44825
44886
|
debugLogger.info("Applied Bandit default branding");
|
|
@@ -44844,6 +44905,7 @@ var Management = () => {
|
|
|
44844
44905
|
} : {
|
|
44845
44906
|
logoBase64: null,
|
|
44846
44907
|
brandingText: "",
|
|
44908
|
+
headerMode: "logo",
|
|
44847
44909
|
theme: "bandit-dark",
|
|
44848
44910
|
hasTransparentLogo: true,
|
|
44849
44911
|
userSaved: false
|
|
@@ -44943,6 +45005,7 @@ var Management = () => {
|
|
|
44943
45005
|
const data = JSON.parse(e.target?.result);
|
|
44944
45006
|
if (data.branding) {
|
|
44945
45007
|
setBrandingText(data.branding.brandingText || "");
|
|
45008
|
+
setHeaderMode(data.branding.headerMode || "logo");
|
|
44946
45009
|
setTheme(data.branding.theme || "Dark");
|
|
44947
45010
|
setLogoBase64(data.branding.logoBase64 || null);
|
|
44948
45011
|
setLogoFile(null);
|
|
@@ -45587,6 +45650,8 @@ var Management = () => {
|
|
|
45587
45650
|
logoBase64,
|
|
45588
45651
|
brandingText,
|
|
45589
45652
|
setBrandingText,
|
|
45653
|
+
headerMode,
|
|
45654
|
+
setHeaderMode,
|
|
45590
45655
|
theme,
|
|
45591
45656
|
setTheme,
|
|
45592
45657
|
predefinedThemes,
|