@burtson-labs/bandit-engine 2.0.120 → 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/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@keyframes float {\n 0% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-8px);\n }\n 100% {\n transform: translateY(0);\n }\n}\n.logo-animated {\n animation: pulseBandit 4s infinite ease-in-out;\n transition: transform 0.3s ease-in-out;\n}\n@keyframes pulseBandit {\n 0% {\n transform: scale(1) rotate(0deg);\n opacity: 0.85;\n }\n 50% {\n transform: scale(1.05) rotate(1deg);\n opacity: 1;\n }\n 100% {\n transform: scale(1) rotate(0deg);\n opacity: 0.85;\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");
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"} logo-animated`,
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"} logo-animated`,
11016
+ className: `logo-container ${visible ? "fade-in" : "fade-out"}`,
11017
11017
  sx: {
11018
11018
  width: isMobile ? "50vw" : "400px",
11019
11019
  height: isMobile ? "50vw" : "400px",
@@ -30686,7 +30686,8 @@ var init_chat2 = __esm({
30686
30686
  if (brandingConfig) {
30687
30687
  setBranding({
30688
30688
  brandingText: brandingConfig.brandingText || "",
30689
- logoBase64: brandingConfig.logoBase64 ?? void 0
30689
+ logoBase64: brandingConfig.logoBase64 ?? void 0,
30690
+ headerMode: brandingConfig.headerMode || "logo"
30690
30691
  });
30691
30692
  if (brandingConfig.brandingText) {
30692
30693
  document.title = brandingConfig.brandingText;
@@ -30729,7 +30730,8 @@ var init_chat2 = __esm({
30729
30730
  debugLogger.info("Loading branding and theme from CDN config");
30730
30731
  setBranding({
30731
30732
  brandingText: cdnBranding.brandingText,
30732
- logoBase64: cdnBranding.logoBase64 ?? void 0
30733
+ logoBase64: cdnBranding.logoBase64 ?? void 0,
30734
+ headerMode: cdnBranding.headerMode || "logo"
30733
30735
  });
30734
30736
  if (cdnBranding.brandingText) {
30735
30737
  document.title = cdnBranding.brandingText;
@@ -31410,7 +31412,44 @@ var init_chat2 = __esm({
31410
31412
  pt: 2
31411
31413
  },
31412
31414
  children: [
31413
- logoShouldRender && !brandingLoading && (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 })),
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
+ })(),
31414
31453
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
31415
31454
  import_material32.Box,
31416
31455
  {
@@ -37847,37 +37886,50 @@ var LogoCropper = ({
37847
37886
  onClose();
37848
37887
  }, [onClose]);
37849
37888
  const handleCrop = (0, import_react52.useCallback)(() => {
37850
- const canvas = document.createElement("canvas");
37851
- const ctx = canvas.getContext("2d");
37852
37889
  const image = imageRef.current;
37853
- if (!ctx || !image) return;
37890
+ if (!image) return;
37854
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;
37855
37907
  const finalSize = LOGO_OUTPUT_SIZES[outputSize];
37856
- const aspectRatioValue = cropDims.width / cropDims.height;
37908
+ const cropAspect = cropDims.width / cropDims.height;
37857
37909
  let outputWidth = finalSize;
37858
37910
  let outputHeight = finalSize;
37859
- if (aspectRatio !== "square") {
37860
- if (aspectRatioValue > 1) {
37861
- outputHeight = finalSize / aspectRatioValue;
37862
- } else {
37863
- outputWidth = finalSize * aspectRatioValue;
37864
- }
37911
+ if (cropAspect > 1) {
37912
+ outputHeight = Math.round(finalSize / cropAspect);
37913
+ } else if (cropAspect < 1) {
37914
+ outputWidth = Math.round(finalSize * cropAspect);
37865
37915
  }
37916
+ const canvas = document.createElement("canvas");
37866
37917
  canvas.width = outputWidth;
37867
37918
  canvas.height = outputHeight;
37868
- ctx.save();
37919
+ const ctx = canvas.getContext("2d");
37920
+ if (!ctx) return;
37869
37921
  ctx.clearRect(0, 0, outputWidth, outputHeight);
37870
- const scaleX = outputWidth / cropDims.width;
37871
- const scaleY = outputHeight / cropDims.height;
37872
- ctx.translate(outputWidth / 2, outputHeight / 2);
37873
- ctx.rotate(cropSettings.rotation * Math.PI / 180);
37874
- ctx.scale(cropSettings.scale * scaleX, cropSettings.scale * scaleY);
37875
- ctx.translate(
37876
- -image.naturalWidth / 2 + cropSettings.x * scaleX,
37877
- -image.naturalHeight / 2 + cropSettings.y * scaleY
37922
+ ctx.drawImage(
37923
+ scene,
37924
+ cropX,
37925
+ cropY,
37926
+ cropDims.width,
37927
+ cropDims.height,
37928
+ 0,
37929
+ 0,
37930
+ outputWidth,
37931
+ outputHeight
37878
37932
  );
37879
- ctx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
37880
- ctx.restore();
37881
37933
  const croppedDataUrl = canvas.toDataURL("image/png", 1);
37882
37934
  onCrop(croppedDataUrl);
37883
37935
  setImageSrc("");
@@ -37885,7 +37937,7 @@ var LogoCropper = ({
37885
37937
  setCropSettings({ x: 0, y: 0, scale: 1, rotation: 0 });
37886
37938
  setAspectRatio("square");
37887
37939
  onClose();
37888
- }, [cropSettings, onCrop, getCropDimensions, outputSize, aspectRatio, onClose]);
37940
+ }, [cropSettings, onCrop, getCropDimensions, outputSize, onClose]);
37889
37941
  const handleScaleChange = (0, import_react52.useCallback)((value) => {
37890
37942
  const cropDims = getCropDimensions();
37891
37943
  const minScale2 = Math.max(
@@ -37919,8 +37971,8 @@ var LogoCropper = ({
37919
37971
  },
37920
37972
  children: [
37921
37973
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.DialogTitle, { sx: { pb: 1 }, children: [
37922
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "h6", sx: { fontWeight: 600 }, children: "\u{1F3A8} Crop Your Logo" }),
37923
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", color: "text.secondary", children: "Position, resize, and format your logo for perfect branding" })
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." })
37924
37976
  ] }),
37925
37977
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.DialogContent, { children: imageSrc && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
37926
37978
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
@@ -37984,7 +38036,7 @@ var LogoCropper = ({
37984
38036
  pointerEvents: "none",
37985
38037
  opacity: 0.9
37986
38038
  },
37987
- children: "Drag to reposition \u2022 Blue area will be exported"
38039
+ children: "Drag to reposition \u2014 the outlined area is exported"
37988
38040
  }
37989
38041
  )
37990
38042
  ]
@@ -37993,7 +38045,7 @@ var LogoCropper = ({
37993
38045
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { width: 300, display: "flex", flexDirection: "column", gap: 3 }, children: [
37994
38046
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
37995
38047
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
37996
- "\u{1F4CB} Preview (",
38048
+ "Preview (",
37997
38049
  LOGO_OUTPUT_SIZES[outputSize],
37998
38050
  "px)"
37999
38051
  ] }),
@@ -38013,7 +38065,7 @@ var LogoCropper = ({
38013
38065
  ) })
38014
38066
  ] }),
38015
38067
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
38016
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F4D0} Aspect Ratio" }),
38068
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Aspect Ratio" }),
38017
38069
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
38018
38070
  import_material43.ToggleButtonGroup,
38019
38071
  {
@@ -38040,7 +38092,7 @@ var LogoCropper = ({
38040
38092
  )
38041
38093
  ] }),
38042
38094
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
38043
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F4CF} Output Size" }),
38095
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Output Size" }),
38044
38096
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
38045
38097
  import_material43.ToggleButtonGroup,
38046
38098
  {
@@ -38059,7 +38111,7 @@ var LogoCropper = ({
38059
38111
  ] }),
38060
38112
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
38061
38113
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: [
38062
- "\u{1F50D} Zoom: ",
38114
+ "Zoom: ",
38063
38115
  Math.round(cropSettings.scale * 100),
38064
38116
  "%"
38065
38117
  ] }),
@@ -38096,7 +38148,7 @@ var LogoCropper = ({
38096
38148
  ] })
38097
38149
  ] }),
38098
38150
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { children: [
38099
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "\u{1F504} Rotation" }),
38151
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", sx: { mb: 1, fontWeight: 600 }, children: "Rotation" }),
38100
38152
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Box, { sx: { display: "flex", gap: 1 }, children: [
38101
38153
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
38102
38154
  import_material43.Button,
@@ -38131,26 +38183,7 @@ var LogoCropper = ({
38131
38183
  }
38132
38184
  )
38133
38185
  ] }),
38134
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Alert, { severity: "success", sx: { borderRadius: 2 }, children: [
38135
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_material43.Typography, { variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "\u2728 Logo Features:" }) }),
38136
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_material43.Typography, { variant: "body2", sx: { mt: 0.5, fontSize: "0.8rem" }, children: [
38137
- "\u2022 ",
38138
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Transparency preserved" }),
38139
- " for clean logos",
38140
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
38141
- "\u2022 ",
38142
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "High quality PNG" }),
38143
- " output",
38144
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
38145
- "\u2022 ",
38146
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Multiple sizes" }),
38147
- " for different uses",
38148
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
38149
- "\u2022 ",
38150
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "Perfect for branding" }),
38151
- " across platforms"
38152
- ] })
38153
- ] })
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." }) })
38154
38187
  ] })
38155
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..." }) })
38156
38189
  ] }) }),
@@ -38166,7 +38199,7 @@ var LogoCropper = ({
38166
38199
  px: 3,
38167
38200
  fontWeight: 600
38168
38201
  },
38169
- children: "\u2702\uFE0F Crop Logo"
38202
+ children: "Apply Crop"
38170
38203
  }
38171
38204
  )
38172
38205
  ] })
@@ -38186,6 +38219,8 @@ var BrandingTab = ({
38186
38219
  logoBase64,
38187
38220
  brandingText,
38188
38221
  setBrandingText,
38222
+ headerMode,
38223
+ setHeaderMode,
38189
38224
  theme,
38190
38225
  setTheme,
38191
38226
  predefinedThemes: predefinedThemes2,
@@ -38368,10 +38403,9 @@ var BrandingTab = ({
38368
38403
  import_material44.Box,
38369
38404
  {
38370
38405
  sx: {
38371
- width: { xs: "100%", md: "26%" },
38406
+ width: { xs: "100%", md: "34%" },
38372
38407
  display: "flex",
38373
38408
  flexDirection: "column",
38374
- height: { xs: "auto", md: 260 },
38375
38409
  gap: { xs: 1.5, md: 0 }
38376
38410
  },
38377
38411
  children: [
@@ -38482,22 +38516,47 @@ var BrandingTab = ({
38482
38516
  )
38483
38517
  ] })
38484
38518
  ] }),
38485
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Box, { sx: { mt: 1.5, flex: "0 0 auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
38486
- import_material44.TextField,
38487
- {
38488
- label: "Custom Branding Text",
38489
- variant: "outlined",
38490
- value: brandingText,
38491
- onChange: (e) => setBrandingText(e.target.value),
38492
- fullWidth: true,
38493
- placeholder: "e.g., Powered by YourCompany",
38494
- size: "small",
38495
- sx: {
38496
- "& .MuiInputBase-root": { fontSize: "0.85rem" },
38497
- "& .MuiFormHelperText-root": { fontSize: "0.7rem" }
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
+ }
38498
38534
  }
38499
- }
38500
- ) })
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
+ ] })
38501
38560
  ]
38502
38561
  }
38503
38562
  ),
@@ -38507,79 +38566,65 @@ var BrandingTab = ({
38507
38566
  import_material44.Box,
38508
38567
  {
38509
38568
  sx: {
38510
- height: { xs: 220, md: 260 },
38569
+ height: { xs: 180, md: 200 },
38511
38570
  display: "flex",
38512
38571
  flexDirection: "column",
38513
38572
  position: "relative",
38514
38573
  bgcolor: "background.default",
38515
38574
  borderRadius: 2,
38516
38575
  overflow: "hidden",
38576
+ border: "1px solid",
38577
+ borderColor: "divider",
38517
38578
  px: 2,
38518
- py: 2
38579
+ py: 1.5
38519
38580
  },
38520
38581
  children: [
38521
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Box, { sx: {
38582
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
38522
38583
  display: "flex",
38523
38584
  justifyContent: "center",
38524
38585
  alignItems: "center",
38525
38586
  flex: "1 1 auto",
38526
38587
  minHeight: 0
38527
- }, children: logoBase64 || getDefaultLogo() ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
38528
- "img",
38529
- {
38530
- src: logoBase64 || getDefaultLogo(),
38531
- alt: "Logo Preview",
38532
- style: {
38533
- maxWidth: "320px",
38534
- height: "auto",
38535
- imageRendering: "auto",
38536
- objectFit: "contain",
38537
- filter: "contrast(1.1) saturate(1.05)"
38538
- }
38539
- }
38540
- ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
38541
- display: "flex",
38542
- flexDirection: "column",
38543
- alignItems: "center",
38544
- gap: 0.5
38545
38588
  }, children: [
38546
- /* @__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)(
38547
38604
  import_material44.Skeleton,
38548
38605
  {
38549
38606
  variant: "rectangular",
38550
- width: 160,
38551
- height: 40,
38607
+ width: 140,
38608
+ height: 36,
38552
38609
  sx: {
38553
38610
  borderRadius: 2,
38554
38611
  bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"
38555
38612
  }
38556
38613
  }
38557
- ),
38558
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Typography, { variant: "caption", color: "text.disabled", sx: { fontSize: "0.7rem" }, children: "Logo preview" })
38559
- ] }) }),
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
+ ] }),
38560
38618
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material44.Box, { sx: {
38561
38619
  display: "flex",
38562
38620
  flexDirection: "column",
38563
38621
  alignItems: "center",
38564
38622
  width: "100%",
38565
38623
  flex: "0 0 auto",
38566
- gap: 1
38624
+ gap: 0.75
38567
38625
  }, children: [
38568
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material44.Stack, { direction: "row", spacing: 1, justifyContent: "center", sx: { flexWrap: "wrap", gap: 1 }, children: [1, 2, 3].map((i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
38569
- import_material44.Skeleton,
38570
- {
38571
- variant: "rectangular",
38572
- width: 80,
38573
- height: 24,
38574
- sx: {
38575
- borderRadius: 2,
38576
- bgcolor: (theme2) => theme2.palette.mode === "dark" ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
38577
- }
38578
- },
38579
- i
38580
- )) }),
38581
- /* @__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?" }) }),
38582
- /* @__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: [
38583
38628
  brandingText ? `${brandingText} \u2022 ` : "Bandit AI \u2022 ",
38584
38629
  "may be wrong \u2014 double-check important info."
38585
38630
  ] })
@@ -38740,7 +38785,7 @@ var BrandingTab = ({
38740
38785
  disabled: saveStatus === "saving",
38741
38786
  color: saveStatus === "saved" ? "success" : saveStatus === "error" ? "error" : "primary",
38742
38787
  sx: { height: 36, fontSize: "0.8rem" },
38743
- children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "\u2713 Saved" : saveStatus === "error" ? "\u2717 Error" : "Save"
38788
+ children: saveStatus === "saving" ? "Saving..." : saveStatus === "saved" ? "Saved" : saveStatus === "error" ? "Error" : "Save"
38744
38789
  }
38745
38790
  ) }),
38746
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)(
@@ -44401,6 +44446,7 @@ var Management = () => {
44401
44446
  const [logoFile, setLogoFile] = (0, import_react63.useState)(null);
44402
44447
  const [logoBase64, setLogoBase64] = (0, import_react63.useState)(null);
44403
44448
  const [brandingText, setBrandingText] = (0, import_react63.useState)("");
44449
+ const [headerMode, setHeaderMode] = (0, import_react63.useState)("logo");
44404
44450
  const [theme, setTheme] = (0, import_react63.useState)("bandit-dark");
44405
44451
  const [customAvatarBase64, setCustomAvatarBase64] = (0, import_react63.useState)(null);
44406
44452
  const [presetAvatar, setPresetAvatar] = (0, import_react63.useState)(null);
@@ -44494,6 +44540,7 @@ var Management = () => {
44494
44540
  hasCustomTheme: !!(brandingConfig?.theme && brandingConfig.theme !== "bandit-dark")
44495
44541
  });
44496
44542
  setBrandingText(brandingConfig?.brandingText || "");
44543
+ setHeaderMode(brandingConfig?.headerMode || "logo");
44497
44544
  setTheme(brandingConfig?.theme || "bandit-dark");
44498
44545
  setLogoBase64(brandingConfig?.logoBase64 || null);
44499
44546
  if (brandingConfig?.hasTransparentLogo !== void 0) {
@@ -44519,6 +44566,7 @@ var Management = () => {
44519
44566
  if (cdnBranding) {
44520
44567
  debugLogger.info("Applying CDN branding");
44521
44568
  setBrandingText(cdnBranding.brandingText || "");
44569
+ setHeaderMode(cdnBranding.headerMode || "logo");
44522
44570
  setTheme(cdnBranding.theme || "bandit-dark");
44523
44571
  setLogoBase64(cdnBranding.logoBase64 || null);
44524
44572
  if (cdnBranding.hasTransparentLogo !== void 0) {
@@ -44717,6 +44765,7 @@ var Management = () => {
44717
44765
  branding: {
44718
44766
  logoBase64,
44719
44767
  brandingText,
44768
+ headerMode,
44720
44769
  theme,
44721
44770
  hasTransparentLogo: finalHasTransparentLogo,
44722
44771
  userSaved: true
@@ -44775,6 +44824,7 @@ var Management = () => {
44775
44824
  branding: {
44776
44825
  logoBase64: logoBase64 || "",
44777
44826
  brandingText: brandingText || "",
44827
+ headerMode,
44778
44828
  theme,
44779
44829
  hasTransparentLogo: hasLogo ? await detectTransparency(logoBase64) : false
44780
44830
  },
@@ -44819,6 +44869,7 @@ var Management = () => {
44819
44869
  if (cdnBranding) {
44820
44870
  setLogoBase64(cdnBranding.logoBase64 || null);
44821
44871
  setBrandingText(cdnBranding.brandingText || "");
44872
+ setHeaderMode(cdnBranding.headerMode || "logo");
44822
44873
  setTheme(cdnBranding.theme || "bandit-dark");
44823
44874
  if (cdnBranding.hasTransparentLogo !== void 0) {
44824
44875
  setHasTransparentLogo(cdnBranding.hasTransparentLogo);
@@ -44829,6 +44880,7 @@ var Management = () => {
44829
44880
  } else {
44830
44881
  setLogoBase64(null);
44831
44882
  setBrandingText("");
44883
+ setHeaderMode("logo");
44832
44884
  setTheme("bandit-dark");
44833
44885
  setHasTransparentLogo(true);
44834
44886
  debugLogger.info("Applied Bandit default branding");
@@ -44853,6 +44905,7 @@ var Management = () => {
44853
44905
  } : {
44854
44906
  logoBase64: null,
44855
44907
  brandingText: "",
44908
+ headerMode: "logo",
44856
44909
  theme: "bandit-dark",
44857
44910
  hasTransparentLogo: true,
44858
44911
  userSaved: false
@@ -44952,6 +45005,7 @@ var Management = () => {
44952
45005
  const data = JSON.parse(e.target?.result);
44953
45006
  if (data.branding) {
44954
45007
  setBrandingText(data.branding.brandingText || "");
45008
+ setHeaderMode(data.branding.headerMode || "logo");
44955
45009
  setTheme(data.branding.theme || "Dark");
44956
45010
  setLogoBase64(data.branding.logoBase64 || null);
44957
45011
  setLogoFile(null);
@@ -45596,6 +45650,8 @@ var Management = () => {
45596
45650
  logoBase64,
45597
45651
  brandingText,
45598
45652
  setBrandingText,
45653
+ headerMode,
45654
+ setHeaderMode,
45599
45655
  theme,
45600
45656
  setTheme,
45601
45657
  predefinedThemes,