@eshal-bot/chat-widget 0.1.53 → 0.1.55

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.
@@ -58047,6 +58047,30 @@
58047
58047
  window.cancelAnimationFrame(frame);
58048
58048
  };
58049
58049
  }, [autoScrollKey, isLoading]);
58050
+
58051
+ // When voice connects, scroll so the listening indicator (rendered after the
58052
+ // topic tags and quick questions) is visible at the bottom. Neither
58053
+ // autoScrollKey nor isLoading changes on voice-connect, so the main scroll
58054
+ // effect never fires — without this the indicator is pushed below the viewport
58055
+ // while the topic tags remain in view above it.
58056
+ reactExports.useEffect(() => {
58057
+ if (!isVoiceSessionActive || voiceStatus !== "connected") {
58058
+ return undefined;
58059
+ }
58060
+ if (typeof window === "undefined") {
58061
+ return undefined;
58062
+ }
58063
+ const frame = window.requestAnimationFrame(() => {
58064
+ var _messagesEndRef$curre3;
58065
+ (_messagesEndRef$curre3 = messagesEndRef.current) === null || _messagesEndRef$curre3 === void 0 || _messagesEndRef$curre3.scrollIntoView({
58066
+ behavior: "smooth",
58067
+ block: "end"
58068
+ });
58069
+ });
58070
+ return () => {
58071
+ window.cancelAnimationFrame(frame);
58072
+ };
58073
+ }, [isVoiceSessionActive, voiceStatus]);
58050
58074
  const normalizedDisclaimerLinkUrl = reactExports.useMemo(() => normalizeExternalUrl(disclaimerLinkUrl), [disclaimerLinkUrl]);
58051
58075
  return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
58052
58076
  children: [disclaimerEnabled && disclaimerText && disclaimerPosition === "top" && /*#__PURE__*/jsxRuntimeExports.jsx("div", {