@burtson-labs/bandit-engine 2.0.64 → 2.0.65

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-DR4X32D3.mjs";
3
+ } from "./chunk-7EPFQDJW.mjs";
4
4
  import {
5
5
  chat_provider_default
6
6
  } from "./chunk-D55E6ZDV.mjs";
@@ -10,8 +10,8 @@ import {
10
10
  useGatewayHealth,
11
11
  useGatewayMemory,
12
12
  useGatewayModels
13
- } from "./chunk-DCZLPUMY.mjs";
14
- import "./chunk-DPMJELHK.mjs";
13
+ } from "./chunk-O44AP4XI.mjs";
14
+ import "./chunk-O7M4OPZU.mjs";
15
15
  import "./chunk-VTC6AIWY.mjs";
16
16
  import "./chunk-6QTTNYF2.mjs";
17
17
  import {
@@ -19077,7 +19077,7 @@ var init_themeMap = __esm({
19077
19077
  });
19078
19078
 
19079
19079
  // src/components/StreamingMarkdown.tsx
19080
- var import_react33, import_material25, import_react_markdown2, import_remark_gfm2, import_rehype_raw2, import_rehype_sanitize3, import_styles19, import_jsx_runtime24, StreamingMarkdown, StreamingMarkdown_default;
19080
+ var import_react33, import_material25, import_react_markdown2, import_remark_gfm2, import_rehype_raw2, import_rehype_sanitize3, import_styles19, import_jsx_runtime24, StreamingMarkdown, arePropsEqual, StreamingMarkdown_default;
19081
19081
  var init_StreamingMarkdown = __esm({
19082
19082
  "src/components/StreamingMarkdown.tsx"() {
19083
19083
  "use strict";
@@ -19511,8 +19511,8 @@ ${listMarkdown}`;
19511
19511
  {
19512
19512
  ref: containerRef,
19513
19513
  sx: {
19514
- // Base transition for minor layout changes
19515
- transition: "opacity 120ms ease-out, transform 120ms ease-out",
19514
+ // Settle the whole block to full color a beat after streaming ends.
19515
+ transition: "opacity 380ms ease-out, transform 220ms ease-out",
19516
19516
  "& .cursor": {
19517
19517
  display: showCursor ? "inline" : "none",
19518
19518
  animation: "blink 1s step-start infinite"
@@ -19520,16 +19520,18 @@ ${listMarkdown}`;
19520
19520
  "@keyframes blink": {
19521
19521
  "50%": { opacity: 0 }
19522
19522
  },
19523
+ // Each newly-written word focuses in — blur→sharp, a tiny rise, and fade —
19524
+ // like ink settling onto the page as the typewriter writes.
19523
19525
  "& .bl-fade-word": {
19524
19526
  opacity: 0,
19525
- animation: "bl-fade-in 420ms ease-out forwards"
19527
+ animation: "bl-fade-in 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards"
19526
19528
  },
19527
19529
  "@keyframes bl-fade-in": {
19528
- from: { opacity: 0, transform: "translateY(1.5px)" },
19529
- to: { opacity: 1, transform: "translateY(0)" }
19530
+ from: { opacity: 0, filter: "blur(3px)", transform: "translateY(2px)" },
19531
+ to: { opacity: 1, filter: "blur(0)", transform: "translateY(0)" }
19530
19532
  },
19531
- // Subtle fade-in for each render while streaming to reduce choppiness perception
19532
- opacity: isStreaming ? 0.985 : 1,
19533
+ // Dimmed while streaming, then brightens to full color once the answer lands.
19534
+ opacity: isStreaming ? 0.86 : 1,
19533
19535
  transform: isStreaming ? "translateY(0.25px)" : "none",
19534
19536
  // Reduce layout jumpiness between updates
19535
19537
  "& p:last-child": { marginBottom: 0 },
@@ -19555,7 +19557,17 @@ ${listMarkdown}`;
19555
19557
  }
19556
19558
  );
19557
19559
  };
19558
- StreamingMarkdown_default = StreamingMarkdown;
19560
+ arePropsEqual = (prev, next) => {
19561
+ if (prev.content !== next.content || prev.isStreaming !== next.isStreaming) {
19562
+ return false;
19563
+ }
19564
+ const a = prev.sources;
19565
+ const b = next.sources;
19566
+ if (a === b) return true;
19567
+ if (!a || !b || a.length !== b.length) return false;
19568
+ return a.every((s, i) => s.id === b[i].id && s.name === b[i].name);
19569
+ };
19570
+ StreamingMarkdown_default = import_react33.default.memo(StreamingMarkdown, arePropsEqual);
19559
19571
  }
19560
19572
  });
19561
19573
 
@@ -19879,8 +19891,8 @@ var init_chat_scroll_to_bottom_button = __esm({
19879
19891
  drawerOpen = false,
19880
19892
  isMobile = false
19881
19893
  }) => {
19882
- const verticalBuffer = isMobile ? 28 : 48;
19883
- const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 64);
19894
+ const verticalBuffer = isMobile ? 44 : 80;
19895
+ const bottomOffset = Math.max(inputHeight + verticalBuffer, verticalBuffer + 72);
19884
19896
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
19885
19897
  import_material32.IconButton,
19886
19898
  {