@envive-ai/react-toolkit-v3 0.3.26 → 0.3.27

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.
Files changed (142) hide show
  1. package/dist/AnimatedText/AnimatedText.d.cts +3 -3
  2. package/dist/AnimatedText/AnimatedText.d.ts +3 -3
  3. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
  4. package/dist/Carousel/Carousel.d.cts +2 -2
  5. package/dist/Carousel/Carousel.d.ts +2 -2
  6. package/dist/ChatFooter/ChatFooter.cjs +1 -0
  7. package/dist/ChatFooter/ChatFooter.d.cts +2 -2
  8. package/dist/ChatFooter/ChatFooter.d.ts +2 -2
  9. package/dist/ChatFooter/ChatFooter.js +1 -0
  10. package/dist/ChatFooter/components/Layout.cjs +2 -2
  11. package/dist/ChatFooter/components/Layout.d.cts +1 -0
  12. package/dist/ChatFooter/components/Layout.d.ts +1 -0
  13. package/dist/ChatFooter/components/Layout.js +2 -2
  14. package/dist/ChatFooter/components/index.d.cts +3 -2
  15. package/dist/ChatFooter/components/index.d.ts +6 -5
  16. package/dist/ChatHeader/ChatHeader.d.cts +2 -2
  17. package/dist/ChatHeader/ChatHeader.d.ts +2 -2
  18. package/dist/ChatPreview/ChatPreview.d.cts +2 -2
  19. package/dist/ChatPreview/ChatPreview.d.ts +2 -2
  20. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
  21. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
  22. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
  23. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
  24. package/dist/Container/Container.d.cts +175 -175
  25. package/dist/Container/Container.d.ts +175 -175
  26. package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
  27. package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
  28. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
  29. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
  30. package/dist/DocumentRetrievalCard/components/ViewArticleButton.cjs +1 -1
  31. package/dist/DocumentRetrievalCard/components/ViewArticleButton.js +1 -1
  32. package/dist/FloatingButton/FloatingButton.d.cts +2 -2
  33. package/dist/FloatingButton/FloatingButton.d.ts +2 -2
  34. package/dist/FloatingChat/FloatingChat.d.cts +2 -2
  35. package/dist/FloatingChat/FloatingChat.d.ts +2 -2
  36. package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +5 -1
  37. package/dist/FloatingChat/components/SalesAgentBadgeContent.js +5 -1
  38. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +2 -1
  39. package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +2 -1
  40. package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +89 -25
  41. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +5 -7
  42. package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +5 -7
  43. package/dist/FullPageSalesAgent/FullPageSalesAgent.js +90 -26
  44. package/dist/FullPageSalesAgent/components/Layout.cjs +34 -27
  45. package/dist/FullPageSalesAgent/components/Layout.js +34 -27
  46. package/dist/FullPageSalesAgent/components/WelcomeOverlay.cjs +102 -0
  47. package/dist/FullPageSalesAgent/components/WelcomeOverlay.js +100 -0
  48. package/dist/FullPageSalesAgent/components/index.cjs +1 -0
  49. package/dist/FullPageSalesAgent/components/index.js +1 -0
  50. package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.cjs +16 -6
  51. package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.js +16 -6
  52. package/dist/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.cjs +43 -0
  53. package/dist/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.js +41 -0
  54. package/dist/Image/Image.d.cts +2 -2
  55. package/dist/ImageGallery/ImageGallery.d.cts +2 -2
  56. package/dist/ImageGallery/ImageGallery.d.ts +2 -2
  57. package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
  58. package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
  59. package/dist/Message/components/LinkButton.cjs +1 -1
  60. package/dist/Message/components/LinkButton.js +1 -1
  61. package/dist/ProductCard/ProductCard.d.cts +2 -2
  62. package/dist/ProductCard/ProductCard.d.ts +2 -2
  63. package/dist/PromptButton/PromptButton.d.cts +2 -2
  64. package/dist/PromptButton/PromptButton.d.ts +2 -2
  65. package/dist/PromptButton/hooks/useGetLayoutBaseProperties.cjs +1 -1
  66. package/dist/PromptButton/hooks/useGetLayoutBaseProperties.js +1 -1
  67. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
  68. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
  69. package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
  70. package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
  71. package/dist/ReviewCard/ReviewCard.d.cts +2 -2
  72. package/dist/ReviewCard/ReviewCard.d.ts +2 -2
  73. package/dist/ReviewCard/components/index.d.cts +6 -6
  74. package/dist/ReviewCard/components/index.d.ts +6 -6
  75. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
  76. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
  77. package/dist/SalesAgentProductCard/components/Price.cjs +2 -2
  78. package/dist/SalesAgentProductCard/components/Price.js +2 -2
  79. package/dist/SalesAgentProductCard/components/Rate.cjs +1 -1
  80. package/dist/SalesAgentProductCard/components/Rate.js +1 -1
  81. package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
  82. package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
  83. package/dist/SocialProof/SocialProof.cjs +4 -3
  84. package/dist/SocialProof/SocialProof.d.cts +2 -2
  85. package/dist/SocialProof/SocialProof.d.ts +2 -2
  86. package/dist/SocialProof/SocialProof.js +4 -3
  87. package/dist/SocialProof/components/Headline.cjs +1 -1
  88. package/dist/SocialProof/components/Headline.js +1 -1
  89. package/dist/SocialProof/components/LayoutSingle.cjs +3 -4
  90. package/dist/SocialProof/components/LayoutSingle.js +3 -4
  91. package/dist/SocialProof/hooks/useSocialProofCount.cjs +3 -2
  92. package/dist/SocialProof/hooks/useSocialProofCount.d.cts +2 -0
  93. package/dist/SocialProof/hooks/useSocialProofCount.d.ts +2 -0
  94. package/dist/SocialProof/hooks/useSocialProofCount.js +3 -2
  95. package/dist/SocialProof/types/types.d.cts +5 -0
  96. package/dist/SocialProof/types/types.d.ts +5 -0
  97. package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
  98. package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
  99. package/dist/Stack/Stack.d.cts +2 -2
  100. package/dist/Stack/Stack.d.ts +2 -2
  101. package/dist/TextField/TextField.cjs +3 -0
  102. package/dist/TextField/TextField.js +3 -0
  103. package/dist/TextField/hooks/useVoiceInput.cjs +9 -1
  104. package/dist/TextField/hooks/useVoiceInput.js +9 -1
  105. package/dist/TextField/types/index.d.cts +12 -0
  106. package/dist/TextField/types/index.d.ts +12 -0
  107. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
  108. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
  109. package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
  110. package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
  111. package/dist/Typography/Typography.d.cts +4 -4
  112. package/dist/Typography/Typography.d.ts +4 -4
  113. package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
  114. package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
  115. package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
  116. package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
  117. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
  118. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
  119. package/dist/styles.css +1 -1
  120. package/package.json +1 -1
  121. package/src/components/ChatFooter/ChatFooter.tsx +1 -0
  122. package/src/components/ChatFooter/components/Layout.tsx +3 -1
  123. package/src/components/FloatingChat/components/SalesAgentBadgeContent.tsx +8 -0
  124. package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +3 -0
  125. package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +139 -49
  126. package/src/components/FullPageSalesAgent/components/Layout.tsx +10 -3
  127. package/src/components/FullPageSalesAgent/components/WelcomeOverlay.tsx +121 -0
  128. package/src/components/FullPageSalesAgent/components/index.ts +2 -0
  129. package/src/components/FullPageSalesAgent/hooks/useGetFooterStyles.ts +15 -5
  130. package/src/components/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.ts +51 -0
  131. package/src/components/PromptButton/hooks/useGetLayoutBaseProperties.ts +3 -1
  132. package/src/components/SalesAgentProductCard/components/Price.tsx +2 -2
  133. package/src/components/SalesAgentProductCard/components/Rate.tsx +1 -1
  134. package/src/components/SocialProof/SocialProof.tsx +4 -2
  135. package/src/components/SocialProof/components/Headline.tsx +1 -1
  136. package/src/components/SocialProof/components/LayoutSingle.tsx +6 -5
  137. package/src/components/SocialProof/hooks/useSocialProofCount.ts +8 -1
  138. package/src/components/SocialProof/types/types.ts +6 -0
  139. package/src/components/TextField/TextField.tsx +10 -2
  140. package/src/components/TextField/__tests__/VoiceInputButton.test.tsx +22 -58
  141. package/src/components/TextField/hooks/useVoiceInput.ts +8 -0
  142. package/src/components/TextField/types/index.ts +12 -0
@@ -13,17 +13,15 @@ const require_ChatFooter = require('../ChatFooter/ChatFooter.cjs');
13
13
  require('../ChatFooter/index.cjs');
14
14
  const require_Disclaimer = require('../Disclaimer/Disclaimer.cjs');
15
15
  require('../Disclaimer/index.cjs');
16
- const require_WelcomeMessage = require('../WelcomeMessage/WelcomeMessage.cjs');
17
16
  const require_useChatSuggestions = require('../FloatingChat/hooks/useChatSuggestions.cjs');
18
17
  const require_useProductResultsView = require('../FloatingChat/hooks/useProductResultsView.cjs');
19
18
  const require_useScrollToBottom = require('../FloatingChat/hooks/useScrollToBottom.cjs');
20
19
  const require_ResultsGridView = require('../FloatingChat/components/ResultsGridView.cjs');
21
20
  const require_trackProductCardInteraction = require('../FloatingChat/utils/trackProductCardInteraction.cjs');
22
21
  const require_index = require('../FloatingChat/components/index.cjs');
23
- require('../WelcomeMessage/index.cjs');
24
22
  const require_useIsMobile = require('./hooks/useIsMobile.cjs');
25
23
  const require_useGetFooterStyles = require('./hooks/useGetFooterStyles.cjs');
26
- const require_useGetScrollContentStyles = require('./hooks/useGetScrollContentStyles.cjs');
24
+ const require_WelcomeOverlay = require('./components/WelcomeOverlay.cjs');
27
25
  const require_index$1 = require('./components/index.cjs');
28
26
  const require_useGetMessagesStyles = require('./hooks/useGetMessagesStyles.cjs');
29
27
  let react = require("react");
@@ -32,25 +30,48 @@ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/c
32
30
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
33
31
  let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
34
32
  let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
33
+ let framer_motion = require("framer-motion");
35
34
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
36
35
  let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
37
36
 
38
37
  //#region src/components/FullPageSalesAgent/FullPageSalesAgent.tsx
39
- const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatingChatConfig, lookAndFeelConfig, hardcopyContent, headerContainer, autoHeight, voiceInputEnabled }) => {
38
+ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatingChatConfig, lookAndFeelConfig, widgetConfig, hardcopyContent, voiceInputEnabled }) => {
40
39
  const resolvedTheme = require_resolveTheme.resolveTheme(theme);
41
40
  const salesAgentData = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
42
41
  const [query, setQuery] = (0, react.useState)("");
43
42
  const chatMessagesRef = (0, react.useRef)(null);
44
- const { footerStyles, footerClasses } = require_useGetFooterStyles.useGetFooterStyles();
45
43
  const { messageClasses } = require_useGetMessagesStyles.useGetMessagesStyles();
46
- const { messageContainerClasses } = require_useGetScrollContentStyles.useGetScrollContentStyles();
47
44
  const { isMobile } = require_useIsMobile.useIsMobile();
48
45
  const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
49
46
  const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = require_usePromptCarouselAnalytics.usePromptCarouselAnalytics(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, (text) => text);
50
47
  const setListeningToSpeech = require_react.useSetAtom(__envive_ai_react_hooks_atoms_chat.listeningToSpeechAtom);
51
- const { welcomeMessageIconColor, ignoreFirstModelResponse, neverShowSingleProductCards, showVerifiedBuyer, showEnviveLogo, userQueryInputEnabled = true } = floatingChatConfig;
48
+ const { ignoreFirstModelResponse, neverShowSingleProductCards, showVerifiedBuyer, showEnviveLogo } = floatingChatConfig;
49
+ const { headerContainer, autoHeight, sparkleColor = "var(--envive-colors-accent-primary)", suggestionButtonType = require_PromptButton_types_index.PromptButtonVariant.LIGHT, useBackgroundImage, mobileBackgroundImage, desktopBackgroundImage, backgroundColor } = widgetConfig;
50
+ const backgroundStyle = (0, react.useMemo)(() => {
51
+ if (useBackgroundImage) {
52
+ const imageUrl = isMobile ? mobileBackgroundImage ?? desktopBackgroundImage : desktopBackgroundImage ?? mobileBackgroundImage;
53
+ if (imageUrl) return {
54
+ backgroundImage: `url(${imageUrl})`,
55
+ backgroundSize: "cover",
56
+ backgroundPosition: "center"
57
+ };
58
+ }
59
+ if (backgroundColor) return { backgroundColor };
60
+ return { backgroundColor: "white" };
61
+ }, [
62
+ useBackgroundImage,
63
+ mobileBackgroundImage,
64
+ desktopBackgroundImage,
65
+ backgroundColor,
66
+ isMobile
67
+ ]);
52
68
  const { agentName } = lookAndFeelConfig;
53
- const { welcomeMessageTitle, welcomeMessageText, chatFooterTextFieldPlaceholderText, disclaimerText } = hardcopyContent?.values ?? {};
69
+ const { chatFooterTextFieldPlaceholderText, disclaimerText, welcomeOverlayTitle, welcomeOverlayPromptSuggestions, welcomeOverlayProductCarouselTitle, welcomeOverlayProductIds } = hardcopyContent?.values ?? {};
70
+ const overlayEnabled = typeof welcomeOverlayTitle === "string" && !!welcomeOverlayTitle;
71
+ const [showOverlay, setShowOverlay] = (0, react.useState)(overlayEnabled);
72
+ const { footerStyles, footerClasses } = require_useGetFooterStyles.useGetFooterStyles({ showOverlay });
73
+ const overlayPromptSuggestions = Array.isArray(welcomeOverlayPromptSuggestions) ? welcomeOverlayPromptSuggestions : [];
74
+ const overlayProductIds = Array.isArray(welcomeOverlayProductIds) ? welcomeOverlayProductIds : [];
54
75
  const { messages, isResponseStreaming, isPendingResponse, suggestions, onSuggestionClicked, onTypedMessageSubmitted, onFormResponseSubmitted } = salesAgentData;
55
76
  const { answerSuggestions, generalSuggestions, showAnswerSuggestions, setAnswerSuggestions, setGeneralSuggestions } = require_useChatSuggestions.useChatSuggestions({
56
77
  suggestions,
@@ -111,26 +132,45 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
111
132
  }
112
133
  });
113
134
  }, [trackWidgetInteraction]);
114
- const welcomeMessage = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
115
- className: messageContainerClasses,
116
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WelcomeMessage.WelcomeMessage, {
117
- sparkleIconColor: welcomeMessageIconColor,
118
- title: welcomeMessageTitle,
119
- text: welcomeMessageText,
120
- theme: resolvedTheme
121
- })
122
- });
135
+ const handleOverlayDismiss = (0, react.useCallback)(() => {
136
+ setShowOverlay(false);
137
+ }, []);
138
+ const handleOverlaySuggestionClick = (0, react.useCallback)((buttonText) => {
139
+ onTypedMessageSubmitted({
140
+ query: buttonText,
141
+ userTyped: true,
142
+ displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.FLOATING_CHAT_TEXT_INPUT
143
+ });
144
+ setListeningToSpeech("abort");
145
+ setAnswerSuggestions([]);
146
+ setGeneralSuggestions([]);
147
+ setShowOverlay(false);
148
+ }, [
149
+ onTypedMessageSubmitted,
150
+ setListeningToSpeech,
151
+ setAnswerSuggestions,
152
+ setGeneralSuggestions
153
+ ]);
154
+ const promptSuggestions = (0, react.useMemo)(() => {
155
+ if (showOverlay) return [];
156
+ if (isPendingResponse || isResponseStreaming) return ["Loading suggestions 1...", "Loading suggestions 2..."];
157
+ return generalSuggestions;
158
+ }, [
159
+ showOverlay,
160
+ isPendingResponse,
161
+ isResponseStreaming,
162
+ generalSuggestions
163
+ ]);
123
164
  const footer = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChatFooter.ChatFooter, {
124
165
  className: footerClasses,
125
166
  style: footerStyles,
126
167
  theme: resolvedTheme,
127
168
  isScrolled: isMobile ? isFloatingLayout : false,
128
169
  disabled: isPendingResponse || isResponseStreaming,
129
- disabledInput: !userQueryInputEnabled,
130
170
  isLoadingPromptSuggestions: isPendingResponse || isResponseStreaming || generalSuggestions.length === 0,
131
- hideEnviveWatermark: !showEnviveLogo,
171
+ hideEnviveWatermark: showOverlay || !showEnviveLogo,
132
172
  textFieldPlaceholderText: chatFooterTextFieldPlaceholderText,
133
- promptSuggestions: isPendingResponse || isResponseStreaming ? ["Loading suggestions 1...", "Loading suggestions 2..."] : generalSuggestions,
173
+ promptSuggestions,
134
174
  handleButtonClick: (buttonText) => {
135
175
  const suggestion = suggestions.find((s) => s.content === buttonText && !s.isAnswer);
136
176
  if (suggestion) onSuggestionClicked(suggestion, __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.FLOATING_CHAT_PROMPT_BUTTON);
@@ -138,6 +178,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
138
178
  setAnswerSuggestions([]);
139
179
  setGeneralSuggestions([]);
140
180
  handleBackToChat();
181
+ handleOverlayDismiss();
141
182
  },
142
183
  onChange: setQuery,
143
184
  onSubmit: () => {
@@ -149,6 +190,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
149
190
  setAnswerSuggestions([]);
150
191
  setGeneralSuggestions([]);
151
192
  handleBackToChat();
193
+ handleOverlayDismiss();
152
194
  },
153
195
  onFocus: handleInputQueryFocus,
154
196
  parentWidget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT,
@@ -205,18 +247,40 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
205
247
  handleButtonTouchEnd: onTouchEnd
206
248
  });
207
249
  const disclaimer = disclaimerText && typeof disclaimerText === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Disclaimer.Disclaimer, { disclaimerMarkdown: disclaimerText }) : void 0;
208
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.FullPageSAComponents.Layout, {
250
+ const motionFooter = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
251
+ transition: {
252
+ layout: { duration: .2 },
253
+ default: { duration: 0 }
254
+ },
255
+ layoutId: "fpsa-chat-footer",
256
+ children: footer
257
+ });
258
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.LayoutGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.FullPageSAComponents.Layout, {
209
259
  theme: resolvedTheme,
210
- welcomeMessage: isResultsView ? null : welcomeMessage,
211
- footer,
260
+ welcomeMessage: null,
261
+ footer: !overlayEnabled || !showOverlay ? motionFooter : null,
212
262
  chatMessages: middleContent,
213
263
  answerSuggestions: showAnswerSuggestions && !isResultsView ? answerSuggestionsComponent : void 0,
214
264
  scrollToBottomButton: !isResultsView && showScrollButton ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
215
265
  disclaimer: isResultsView ? null : disclaimer,
216
266
  headerContainer,
217
267
  autoHeight,
218
- scrollContainerRef
219
- });
268
+ scrollContainerRef,
269
+ backgroundStyle,
270
+ overlay: overlayEnabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WelcomeOverlay.WelcomeOverlay, {
271
+ show: showOverlay,
272
+ theme: resolvedTheme,
273
+ suggestionButtonType,
274
+ sparkleColor,
275
+ title: welcomeOverlayTitle,
276
+ promptSuggestions: overlayPromptSuggestions,
277
+ productCarouselTitle: welcomeOverlayProductCarouselTitle,
278
+ productIds: overlayProductIds,
279
+ backgroundStyle,
280
+ chatFooter: showOverlay ? motionFooter : null,
281
+ onSuggestionClick: handleOverlaySuggestionClick
282
+ }) : null
283
+ }) });
220
284
  };
221
285
 
222
286
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { Theme } from "../tokens/theme/theme.cjs";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
3
- import { FloatingChatConfig, LookAndFeelConfig } from "@envive-ai/react-hooks/contexts/typesV3";
2
+ import * as react_jsx_runtime30 from "react/jsx-runtime";
3
+ import { FloatingChatConfig, FullPageSalesAgentWidgetV3Config, LookAndFeelConfig } from "@envive-ai/react-hooks/contexts/typesV3";
4
4
  import { HardcopyResponse } from "@envive-ai/react-hooks/contexts/hardcopyContext";
5
5
 
6
6
  //#region src/components/FullPageSalesAgent/FullPageSalesAgent.d.ts
@@ -8,19 +8,17 @@ interface FullPageSalesAgentProps {
8
8
  theme?: Theme;
9
9
  floatingChatConfig: FloatingChatConfig;
10
10
  lookAndFeelConfig: LookAndFeelConfig;
11
+ widgetConfig: FullPageSalesAgentWidgetV3Config;
11
12
  hardcopyContent: HardcopyResponse;
12
- headerContainer?: string;
13
- autoHeight?: boolean;
14
13
  voiceInputEnabled?: boolean;
15
14
  }
16
15
  declare const FullPageSalesAgent: ({
17
16
  theme,
18
17
  floatingChatConfig,
19
18
  lookAndFeelConfig,
19
+ widgetConfig,
20
20
  hardcopyContent,
21
- headerContainer,
22
- autoHeight,
23
21
  voiceInputEnabled
24
- }: FullPageSalesAgentProps) => react_jsx_runtime1.JSX.Element;
22
+ }: FullPageSalesAgentProps) => react_jsx_runtime30.JSX.Element;
25
23
  //#endregion
26
24
  export { FullPageSalesAgent };
@@ -1,6 +1,6 @@
1
1
  import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
2
- import * as react_jsx_runtime20 from "react/jsx-runtime";
3
- import { FloatingChatConfig, LookAndFeelConfig } from "@envive-ai/react-hooks/contexts/typesV3";
2
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
3
+ import { FloatingChatConfig, FullPageSalesAgentWidgetV3Config, LookAndFeelConfig } from "@envive-ai/react-hooks/contexts/typesV3";
4
4
  import { HardcopyResponse } from "@envive-ai/react-hooks/contexts/hardcopyContext";
5
5
 
6
6
  //#region src/components/FullPageSalesAgent/FullPageSalesAgent.d.ts
@@ -8,19 +8,17 @@ interface FullPageSalesAgentProps {
8
8
  theme?: Theme;
9
9
  floatingChatConfig: FloatingChatConfig;
10
10
  lookAndFeelConfig: LookAndFeelConfig;
11
+ widgetConfig: FullPageSalesAgentWidgetV3Config;
11
12
  hardcopyContent: HardcopyResponse;
12
- headerContainer?: string;
13
- autoHeight?: boolean;
14
13
  voiceInputEnabled?: boolean;
15
14
  }
16
15
  declare const FullPageSalesAgent: ({
17
16
  theme,
18
17
  floatingChatConfig,
19
18
  lookAndFeelConfig,
19
+ widgetConfig,
20
20
  hardcopyContent,
21
- headerContainer,
22
- autoHeight,
23
21
  voiceInputEnabled
24
- }: FullPageSalesAgentProps) => react_jsx_runtime20.JSX.Element;
22
+ }: FullPageSalesAgentProps) => react_jsx_runtime21.JSX.Element;
25
23
  //#endregion
26
24
  export { FullPageSalesAgent };
@@ -12,44 +12,65 @@ import { ChatFooter } from "../ChatFooter/ChatFooter.js";
12
12
  import "../ChatFooter/index.js";
13
13
  import { Disclaimer } from "../Disclaimer/Disclaimer.js";
14
14
  import "../Disclaimer/index.js";
15
- import { WelcomeMessage } from "../WelcomeMessage/WelcomeMessage.js";
16
15
  import { useChatSuggestions } from "../FloatingChat/hooks/useChatSuggestions.js";
17
16
  import { useProductResultsView } from "../FloatingChat/hooks/useProductResultsView.js";
18
17
  import { useScrollToBottom } from "../FloatingChat/hooks/useScrollToBottom.js";
19
18
  import { NUM_COLUMNS_FPSA, NUM_COLUMNS_MOBILE } from "../FloatingChat/components/ResultsGridView.js";
20
19
  import { trackProductCardClicked } from "../FloatingChat/utils/trackProductCardInteraction.js";
21
20
  import { FloatingChatComponents } from "../FloatingChat/components/index.js";
22
- import "../WelcomeMessage/index.js";
23
21
  import { useIsMobile } from "./hooks/useIsMobile.js";
24
22
  import { useGetFooterStyles } from "./hooks/useGetFooterStyles.js";
25
- import { useGetScrollContentStyles } from "./hooks/useGetScrollContentStyles.js";
23
+ import { WelcomeOverlay } from "./components/WelcomeOverlay.js";
26
24
  import { FullPageSAComponents } from "./components/index.js";
27
25
  import { useGetMessagesStyles } from "./hooks/useGetMessagesStyles.js";
28
- import { useCallback, useRef, useState } from "react";
26
+ import { useCallback, useMemo, useRef, useState } from "react";
29
27
  import { jsx } from "react/jsx-runtime";
30
28
  import { listeningToSpeechAtom } from "@envive-ai/react-hooks/atoms/chat";
31
29
  import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
32
30
  import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
33
31
  import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
32
+ import { LayoutGroup, motion } from "framer-motion";
34
33
  import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
35
34
  import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
36
35
 
37
36
  //#region src/components/FullPageSalesAgent/FullPageSalesAgent.tsx
38
- const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, lookAndFeelConfig, hardcopyContent, headerContainer, autoHeight, voiceInputEnabled }) => {
37
+ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, lookAndFeelConfig, widgetConfig, hardcopyContent, voiceInputEnabled }) => {
39
38
  const resolvedTheme = resolveTheme(theme);
40
39
  const salesAgentData = useSalesAgent(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
41
40
  const [query, setQuery] = useState("");
42
41
  const chatMessagesRef = useRef(null);
43
- const { footerStyles, footerClasses } = useGetFooterStyles();
44
42
  const { messageClasses } = useGetMessagesStyles();
45
- const { messageContainerClasses } = useGetScrollContentStyles();
46
43
  const { isMobile } = useIsMobile();
47
44
  const { trackWidgetInteraction } = useWidgetInteraction();
48
45
  const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, (text) => text);
49
46
  const setListeningToSpeech = useSetAtom(listeningToSpeechAtom);
50
- const { welcomeMessageIconColor, ignoreFirstModelResponse, neverShowSingleProductCards, showVerifiedBuyer, showEnviveLogo, userQueryInputEnabled = true } = floatingChatConfig;
47
+ const { ignoreFirstModelResponse, neverShowSingleProductCards, showVerifiedBuyer, showEnviveLogo } = floatingChatConfig;
48
+ const { headerContainer, autoHeight, sparkleColor = "var(--envive-colors-accent-primary)", suggestionButtonType = PromptButtonVariant.LIGHT, useBackgroundImage, mobileBackgroundImage, desktopBackgroundImage, backgroundColor } = widgetConfig;
49
+ const backgroundStyle = useMemo(() => {
50
+ if (useBackgroundImage) {
51
+ const imageUrl = isMobile ? mobileBackgroundImage ?? desktopBackgroundImage : desktopBackgroundImage ?? mobileBackgroundImage;
52
+ if (imageUrl) return {
53
+ backgroundImage: `url(${imageUrl})`,
54
+ backgroundSize: "cover",
55
+ backgroundPosition: "center"
56
+ };
57
+ }
58
+ if (backgroundColor) return { backgroundColor };
59
+ return { backgroundColor: "white" };
60
+ }, [
61
+ useBackgroundImage,
62
+ mobileBackgroundImage,
63
+ desktopBackgroundImage,
64
+ backgroundColor,
65
+ isMobile
66
+ ]);
51
67
  const { agentName } = lookAndFeelConfig;
52
- const { welcomeMessageTitle, welcomeMessageText, chatFooterTextFieldPlaceholderText, disclaimerText } = hardcopyContent?.values ?? {};
68
+ const { chatFooterTextFieldPlaceholderText, disclaimerText, welcomeOverlayTitle, welcomeOverlayPromptSuggestions, welcomeOverlayProductCarouselTitle, welcomeOverlayProductIds } = hardcopyContent?.values ?? {};
69
+ const overlayEnabled = typeof welcomeOverlayTitle === "string" && !!welcomeOverlayTitle;
70
+ const [showOverlay, setShowOverlay] = useState(overlayEnabled);
71
+ const { footerStyles, footerClasses } = useGetFooterStyles({ showOverlay });
72
+ const overlayPromptSuggestions = Array.isArray(welcomeOverlayPromptSuggestions) ? welcomeOverlayPromptSuggestions : [];
73
+ const overlayProductIds = Array.isArray(welcomeOverlayProductIds) ? welcomeOverlayProductIds : [];
53
74
  const { messages, isResponseStreaming, isPendingResponse, suggestions, onSuggestionClicked, onTypedMessageSubmitted, onFormResponseSubmitted } = salesAgentData;
54
75
  const { answerSuggestions, generalSuggestions, showAnswerSuggestions, setAnswerSuggestions, setGeneralSuggestions } = useChatSuggestions({
55
76
  suggestions,
@@ -110,26 +131,45 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
110
131
  }
111
132
  });
112
133
  }, [trackWidgetInteraction]);
113
- const welcomeMessage = /* @__PURE__ */ jsx("div", {
114
- className: messageContainerClasses,
115
- children: /* @__PURE__ */ jsx(WelcomeMessage, {
116
- sparkleIconColor: welcomeMessageIconColor,
117
- title: welcomeMessageTitle,
118
- text: welcomeMessageText,
119
- theme: resolvedTheme
120
- })
121
- });
134
+ const handleOverlayDismiss = useCallback(() => {
135
+ setShowOverlay(false);
136
+ }, []);
137
+ const handleOverlaySuggestionClick = useCallback((buttonText) => {
138
+ onTypedMessageSubmitted({
139
+ query: buttonText,
140
+ userTyped: true,
141
+ displayLocation: ChatElementDisplayLocationV3.FLOATING_CHAT_TEXT_INPUT
142
+ });
143
+ setListeningToSpeech("abort");
144
+ setAnswerSuggestions([]);
145
+ setGeneralSuggestions([]);
146
+ setShowOverlay(false);
147
+ }, [
148
+ onTypedMessageSubmitted,
149
+ setListeningToSpeech,
150
+ setAnswerSuggestions,
151
+ setGeneralSuggestions
152
+ ]);
153
+ const promptSuggestions = useMemo(() => {
154
+ if (showOverlay) return [];
155
+ if (isPendingResponse || isResponseStreaming) return ["Loading suggestions 1...", "Loading suggestions 2..."];
156
+ return generalSuggestions;
157
+ }, [
158
+ showOverlay,
159
+ isPendingResponse,
160
+ isResponseStreaming,
161
+ generalSuggestions
162
+ ]);
122
163
  const footer = /* @__PURE__ */ jsx(ChatFooter, {
123
164
  className: footerClasses,
124
165
  style: footerStyles,
125
166
  theme: resolvedTheme,
126
167
  isScrolled: isMobile ? isFloatingLayout : false,
127
168
  disabled: isPendingResponse || isResponseStreaming,
128
- disabledInput: !userQueryInputEnabled,
129
169
  isLoadingPromptSuggestions: isPendingResponse || isResponseStreaming || generalSuggestions.length === 0,
130
- hideEnviveWatermark: !showEnviveLogo,
170
+ hideEnviveWatermark: showOverlay || !showEnviveLogo,
131
171
  textFieldPlaceholderText: chatFooterTextFieldPlaceholderText,
132
- promptSuggestions: isPendingResponse || isResponseStreaming ? ["Loading suggestions 1...", "Loading suggestions 2..."] : generalSuggestions,
172
+ promptSuggestions,
133
173
  handleButtonClick: (buttonText) => {
134
174
  const suggestion = suggestions.find((s) => s.content === buttonText && !s.isAnswer);
135
175
  if (suggestion) onSuggestionClicked(suggestion, ChatElementDisplayLocationV3.FLOATING_CHAT_PROMPT_BUTTON);
@@ -137,6 +177,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
137
177
  setAnswerSuggestions([]);
138
178
  setGeneralSuggestions([]);
139
179
  handleBackToChat();
180
+ handleOverlayDismiss();
140
181
  },
141
182
  onChange: setQuery,
142
183
  onSubmit: () => {
@@ -148,6 +189,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
148
189
  setAnswerSuggestions([]);
149
190
  setGeneralSuggestions([]);
150
191
  handleBackToChat();
192
+ handleOverlayDismiss();
151
193
  },
152
194
  onFocus: handleInputQueryFocus,
153
195
  parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT,
@@ -204,18 +246,40 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
204
246
  handleButtonTouchEnd: onTouchEnd
205
247
  });
206
248
  const disclaimer = disclaimerText && typeof disclaimerText === "string" ? /* @__PURE__ */ jsx(Disclaimer, { disclaimerMarkdown: disclaimerText }) : void 0;
207
- return /* @__PURE__ */ jsx(FullPageSAComponents.Layout, {
249
+ const motionFooter = /* @__PURE__ */ jsx(motion.div, {
250
+ transition: {
251
+ layout: { duration: .2 },
252
+ default: { duration: 0 }
253
+ },
254
+ layoutId: "fpsa-chat-footer",
255
+ children: footer
256
+ });
257
+ return /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(FullPageSAComponents.Layout, {
208
258
  theme: resolvedTheme,
209
- welcomeMessage: isResultsView ? null : welcomeMessage,
210
- footer,
259
+ welcomeMessage: null,
260
+ footer: !overlayEnabled || !showOverlay ? motionFooter : null,
211
261
  chatMessages: middleContent,
212
262
  answerSuggestions: showAnswerSuggestions && !isResultsView ? answerSuggestionsComponent : void 0,
213
263
  scrollToBottomButton: !isResultsView && showScrollButton ? /* @__PURE__ */ jsx(FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
214
264
  disclaimer: isResultsView ? null : disclaimer,
215
265
  headerContainer,
216
266
  autoHeight,
217
- scrollContainerRef
218
- });
267
+ scrollContainerRef,
268
+ backgroundStyle,
269
+ overlay: overlayEnabled ? /* @__PURE__ */ jsx(WelcomeOverlay, {
270
+ show: showOverlay,
271
+ theme: resolvedTheme,
272
+ suggestionButtonType,
273
+ sparkleColor,
274
+ title: welcomeOverlayTitle,
275
+ promptSuggestions: overlayPromptSuggestions,
276
+ productCarouselTitle: welcomeOverlayProductCarouselTitle,
277
+ productIds: overlayProductIds,
278
+ backgroundStyle,
279
+ chatFooter: showOverlay ? motionFooter : null,
280
+ onSuggestionClick: handleOverlaySuggestionClick
281
+ }) : null
282
+ }) });
219
283
  };
220
284
 
221
285
  //#endregion
@@ -12,42 +12,49 @@ let classnames = require("classnames");
12
12
  classnames = require_rolldown_runtime.__toESM(classnames);
13
13
 
14
14
  //#region src/components/FullPageSalesAgent/components/Layout.tsx
15
- const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef }) => {
15
+ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef, overlay, backgroundStyle }) => {
16
16
  const hasWelcomeMessage = (0, react.isValidElement)(welcomeMessage);
17
17
  const hasAnswerSuggestions = (0, react.isValidElement)(answerSuggestions);
18
18
  const { isMobile } = require_useIsMobile.useIsMobile();
19
19
  const { contentClasses } = require_useGetScrollContentStyles.useGetScrollContentStyles();
20
- const { footerContainerClasses } = require_useGetFooterStyles.useGetFooterStyles();
20
+ const { footerContainerClasses } = require_useGetFooterStyles.useGetFooterStyles({ showOverlay: false });
21
21
  const { containerClasses, containerStyles } = require_useGetContainerStyles.useGetContainerStyles({
22
22
  headerContainer,
23
23
  autoHeight
24
24
  });
25
25
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
26
- className: containerClasses,
27
- style: containerStyles,
28
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
29
- ref: scrollContainerRef,
30
- className: contentClasses,
31
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
32
- direction: "column",
33
- justify: "between",
34
- children: [welcomeMessage, disclaimer]
35
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
36
- direction: "column",
37
- gap: "0",
38
- className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
39
- children: [chatMessages, answerSuggestions]
40
- })]
41
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
42
- className: footerContainerClasses,
43
- children: [scrollToBottomButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
44
- className: "envive-tw-h-[0px]",
45
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
46
- className: "envive-tw-ml-auto envive-tw-table envive-tw-translate-x-[-30px] envive-tw-translate-y-[-50px]",
47
- children: scrollToBottomButton
48
- })
49
- }), footer]
50
- })]
26
+ className: (0, classnames.default)(containerClasses, "envive-tw-relative"),
27
+ style: {
28
+ ...containerStyles,
29
+ ...backgroundStyle
30
+ },
31
+ children: [
32
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
33
+ ref: scrollContainerRef,
34
+ className: contentClasses,
35
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
36
+ direction: "column",
37
+ justify: "between",
38
+ children: [welcomeMessage, disclaimer]
39
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
40
+ direction: "column",
41
+ gap: "0",
42
+ className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
43
+ children: [chatMessages, answerSuggestions]
44
+ })]
45
+ }),
46
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
47
+ className: footerContainerClasses,
48
+ children: [scrollToBottomButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
49
+ className: "envive-tw-h-[0px]",
50
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
51
+ className: "envive-tw-ml-auto envive-tw-table envive-tw-translate-x-[-30px] envive-tw-translate-y-[-50px]",
52
+ children: scrollToBottomButton
53
+ })
54
+ }), footer]
55
+ }),
56
+ overlay
57
+ ]
51
58
  });
52
59
  };
53
60
 
@@ -10,42 +10,49 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import classNames from "classnames";
11
11
 
12
12
  //#region src/components/FullPageSalesAgent/components/Layout.tsx
13
- const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef }) => {
13
+ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef, overlay, backgroundStyle }) => {
14
14
  const hasWelcomeMessage = isValidElement(welcomeMessage);
15
15
  const hasAnswerSuggestions = isValidElement(answerSuggestions);
16
16
  const { isMobile } = useIsMobile();
17
17
  const { contentClasses } = useGetScrollContentStyles();
18
- const { footerContainerClasses } = useGetFooterStyles();
18
+ const { footerContainerClasses } = useGetFooterStyles({ showOverlay: false });
19
19
  const { containerClasses, containerStyles } = useGetContainerStyles({
20
20
  headerContainer,
21
21
  autoHeight
22
22
  });
23
23
  return /* @__PURE__ */ jsxs("div", {
24
- className: containerClasses,
25
- style: containerStyles,
26
- children: [/* @__PURE__ */ jsxs("div", {
27
- ref: scrollContainerRef,
28
- className: contentClasses,
29
- children: [/* @__PURE__ */ jsxs(Stack, {
30
- direction: "column",
31
- justify: "between",
32
- children: [welcomeMessage, disclaimer]
33
- }), /* @__PURE__ */ jsxs(Stack, {
34
- direction: "column",
35
- gap: "0",
36
- className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
37
- children: [chatMessages, answerSuggestions]
38
- })]
39
- }), /* @__PURE__ */ jsxs("div", {
40
- className: footerContainerClasses,
41
- children: [scrollToBottomButton && /* @__PURE__ */ jsx("div", {
42
- className: "envive-tw-h-[0px]",
43
- children: /* @__PURE__ */ jsx("div", {
44
- className: "envive-tw-ml-auto envive-tw-table envive-tw-translate-x-[-30px] envive-tw-translate-y-[-50px]",
45
- children: scrollToBottomButton
46
- })
47
- }), footer]
48
- })]
24
+ className: classNames(containerClasses, "envive-tw-relative"),
25
+ style: {
26
+ ...containerStyles,
27
+ ...backgroundStyle
28
+ },
29
+ children: [
30
+ /* @__PURE__ */ jsxs("div", {
31
+ ref: scrollContainerRef,
32
+ className: contentClasses,
33
+ children: [/* @__PURE__ */ jsxs(Stack, {
34
+ direction: "column",
35
+ justify: "between",
36
+ children: [welcomeMessage, disclaimer]
37
+ }), /* @__PURE__ */ jsxs(Stack, {
38
+ direction: "column",
39
+ gap: "0",
40
+ className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
41
+ children: [chatMessages, answerSuggestions]
42
+ })]
43
+ }),
44
+ /* @__PURE__ */ jsxs("div", {
45
+ className: footerContainerClasses,
46
+ children: [scrollToBottomButton && /* @__PURE__ */ jsx("div", {
47
+ className: "envive-tw-h-[0px]",
48
+ children: /* @__PURE__ */ jsx("div", {
49
+ className: "envive-tw-ml-auto envive-tw-table envive-tw-translate-x-[-30px] envive-tw-translate-y-[-50px]",
50
+ children: scrollToBottomButton
51
+ })
52
+ }), footer]
53
+ }),
54
+ overlay
55
+ ]
49
56
  });
50
57
  };
51
58