@envive-ai/react-toolkit-v3 0.3.8 → 0.3.9

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 (203) hide show
  1. package/dist/AnimatedText/AnimatedText.cjs +1 -0
  2. package/dist/AnimatedText/AnimatedText.js +1 -0
  3. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
  4. package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
  5. package/dist/CSSVariablesEditor/components/CSSVariablesEditor.cjs +1 -1
  6. package/dist/CSSVariablesEditor/components/CSSVariablesEditor.js +1 -1
  7. package/dist/Carousel/Carousel.d.cts +2 -2
  8. package/dist/Carousel/Carousel.d.ts +2 -2
  9. package/dist/Carousel/components/Container.cjs +1 -1
  10. package/dist/Carousel/components/Container.js +1 -1
  11. package/dist/ChatFooter/ChatFooter.d.cts +2 -2
  12. package/dist/ChatFooter/components/index.d.cts +3 -3
  13. package/dist/ChatFooter/components/index.d.ts +5 -5
  14. package/dist/ChatHeader/ChatHeader.d.cts +2 -2
  15. package/dist/ChatHeader/ChatHeader.d.ts +2 -2
  16. package/dist/ChatPreview/ChatPreview.cjs +13 -3
  17. package/dist/ChatPreview/ChatPreview.d.cts +2 -2
  18. package/dist/ChatPreview/ChatPreview.d.ts +2 -2
  19. package/dist/ChatPreview/ChatPreview.js +13 -3
  20. package/dist/ChatPreview/components/Message.cjs +1 -1
  21. package/dist/ChatPreview/components/Message.js +1 -1
  22. package/dist/ChatPreview/types/types.d.cts +5 -4
  23. package/dist/ChatPreview/types/types.d.ts +5 -4
  24. package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +13 -3
  25. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
  26. package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
  27. package/dist/ChatPreviewComparison/ChatPreviewComparison.js +13 -3
  28. package/dist/ChatPreviewComparison/components/Message.cjs +1 -1
  29. package/dist/ChatPreviewComparison/components/Message.js +1 -1
  30. package/dist/ChatPreviewComparison/types/types.d.cts +4 -4
  31. package/dist/ChatPreviewComparison/types/types.d.ts +4 -4
  32. package/dist/ChatPreviewLoading/ChatPreviewLoading.cjs +1 -1
  33. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
  34. package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
  35. package/dist/ChatPreviewLoading/ChatPreviewLoading.js +1 -1
  36. package/dist/Container/Container.d.cts +174 -174
  37. package/dist/Container/Container.d.ts +174 -174
  38. package/dist/DesignTokens/DesignTokensComponent.cjs +1 -1
  39. package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
  40. package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
  41. package/dist/DesignTokens/DesignTokensComponent.js +1 -1
  42. package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
  43. package/dist/FloatingButton/FloatingButton.d.cts +2 -2
  44. package/dist/FloatingButton/FloatingButton.d.ts +2 -2
  45. package/dist/FloatingChat/FloatingChat.cjs +4 -3
  46. package/dist/FloatingChat/FloatingChat.d.cts +2 -2
  47. package/dist/FloatingChat/FloatingChat.d.ts +2 -2
  48. package/dist/FloatingChat/FloatingChat.js +4 -3
  49. package/dist/FloatingChat/components/AgentMessage.cjs +9 -5
  50. package/dist/FloatingChat/components/AgentMessage.js +9 -5
  51. package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
  52. package/dist/FloatingChat/components/ChatMessages.js +1 -1
  53. package/dist/FloatingChat/components/Layout.cjs +11 -11
  54. package/dist/FloatingChat/components/Layout.js +11 -11
  55. package/dist/FloatingChat/components/ModalSheet.cjs +1 -1
  56. package/dist/FloatingChat/components/ModalSheet.js +1 -1
  57. package/dist/FloatingChat/components/ReviewCardsCarousel.cjs +2 -1
  58. package/dist/FloatingChat/components/ReviewCardsCarousel.js +2 -1
  59. package/dist/FloatingChat/components/ScrollToBottomButton.cjs +1 -1
  60. package/dist/FloatingChat/components/ScrollToBottomButton.js +1 -1
  61. package/dist/Form/Form.cjs +1 -1
  62. package/dist/Form/Form.js +1 -1
  63. package/dist/Image/Image.d.cts +2 -2
  64. package/dist/Image/Image.d.ts +2 -2
  65. package/dist/ImageGallery/ImageGallery.d.cts +2 -2
  66. package/dist/ImageGallery/ImageGallery.d.ts +2 -2
  67. package/dist/ImageGallery/components/NormalLayout.cjs +1 -1
  68. package/dist/ImageGallery/components/NormalLayout.js +1 -1
  69. package/dist/MarkdownProcessor/MarkdownProcessor.cjs +1 -1
  70. package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
  71. package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
  72. package/dist/MarkdownProcessor/MarkdownProcessor.js +1 -1
  73. package/dist/Message/components/AgentContent.cjs +1 -1
  74. package/dist/Message/components/AgentContent.js +1 -1
  75. package/dist/ProductCard/ProductCard.cjs +9 -5
  76. package/dist/ProductCard/ProductCard.d.cts +2 -2
  77. package/dist/ProductCard/ProductCard.d.ts +2 -2
  78. package/dist/ProductCard/ProductCard.js +4 -1
  79. package/dist/ProductCard/components/Header.cjs +3 -3
  80. package/dist/ProductCard/components/Header.js +3 -3
  81. package/dist/PromptButton/PromptButton.d.cts +2 -2
  82. package/dist/PromptButton/PromptButton.d.ts +2 -2
  83. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.cjs +3 -2
  84. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
  85. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
  86. package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.js +3 -2
  87. package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +8 -3
  88. package/dist/PromptButtonCarouselWithImage/components/Layout.js +8 -3
  89. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +53 -3
  90. package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +53 -3
  91. package/dist/PromptCarousel/PromptCarousel.cjs +70 -33
  92. package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
  93. package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
  94. package/dist/PromptCarousel/PromptCarousel.js +71 -34
  95. package/dist/PromptCarousel/hooks/index.cjs +2 -4
  96. package/dist/PromptCarousel/hooks/index.js +2 -4
  97. package/dist/PromptCarousel/hooks/useCoordinatedScrollAnimation.cjs +91 -0
  98. package/dist/PromptCarousel/hooks/useCoordinatedScrollAnimation.js +90 -0
  99. package/dist/PromptCarousel/hooks/useScrollSync.cjs +65 -0
  100. package/dist/PromptCarousel/hooks/useScrollSync.js +64 -0
  101. package/dist/ReviewCard/ReviewCard.cjs +1 -1
  102. package/dist/ReviewCard/ReviewCard.d.cts +2 -2
  103. package/dist/ReviewCard/ReviewCard.d.ts +2 -2
  104. package/dist/ReviewCard/ReviewCard.js +1 -1
  105. package/dist/ReviewCard/components/index.d.cts +6 -6
  106. package/dist/ReviewCard/components/index.d.ts +6 -6
  107. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
  108. package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
  109. package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
  110. package/dist/SalesAgentProductCard/components/index.d.ts +6 -6
  111. package/dist/SocialProof/SocialProof.d.cts +2 -2
  112. package/dist/SocialProof/SocialProof.d.ts +2 -2
  113. package/dist/SocialProof/components/Headline.cjs +1 -1
  114. package/dist/SocialProof/components/Headline.js +1 -1
  115. package/dist/SocialProof/components/LayoutSingle.cjs +1 -1
  116. package/dist/SocialProof/components/LayoutSingle.js +1 -1
  117. package/dist/Stack/Stack.d.cts +2 -2
  118. package/dist/Stack/Stack.d.ts +2 -2
  119. package/dist/Stack/hooks/useFormatStackChildren.cjs +1 -1
  120. package/dist/Stack/hooks/useFormatStackChildren.js +1 -1
  121. package/dist/Title/components/Image.cjs +1 -1
  122. package/dist/Title/components/Image.js +1 -1
  123. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
  124. package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
  125. package/dist/TypingAnimation/TypingAnimation.cjs +2 -2
  126. package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
  127. package/dist/TypingAnimation/TypingAnimation.js +2 -2
  128. package/dist/Typography/Typography.d.cts +4 -4
  129. package/dist/Typography/Typography.d.ts +4 -4
  130. package/dist/WidgetTextField/WidgetTextField.cjs +11 -6
  131. package/dist/WidgetTextField/WidgetTextField.d.cts +3 -2
  132. package/dist/WidgetTextField/WidgetTextField.d.ts +3 -2
  133. package/dist/WidgetTextField/WidgetTextField.js +7 -2
  134. package/dist/WidgetTextField/components/FakeTextInput.cjs +2 -2
  135. package/dist/WidgetTextField/components/FakeTextInput.js +2 -2
  136. package/dist/WidgetTextField/components/Icon.cjs +10 -9
  137. package/dist/WidgetTextField/components/Icon.js +10 -9
  138. package/dist/WidgetTextField/components/Skeleton.cjs +1 -1
  139. package/dist/WidgetTextField/components/Skeleton.js +1 -1
  140. package/dist/WidgetTextField/types/types.d.cts +3 -0
  141. package/dist/WidgetTextField/types/types.d.ts +3 -0
  142. package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
  143. package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
  144. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
  145. package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
  146. package/dist/styles.css +1 -1
  147. package/dist/utils/CustomIcon.cjs +1 -1
  148. package/dist/utils/CustomIcon.js +1 -1
  149. package/dist/utils/useDragToScroll.cjs +68 -0
  150. package/dist/utils/useDragToScroll.js +67 -0
  151. package/package.json +1 -1
  152. package/src/components/AnimatedText/AnimatedText.tsx +2 -0
  153. package/src/components/ChatPreview/ChatPreview.tsx +20 -3
  154. package/src/components/ChatPreview/types/types.ts +5 -4
  155. package/src/components/ChatPreviewComparison/ChatPreviewComparison.tsx +20 -3
  156. package/src/components/ChatPreviewComparison/types/types.ts +4 -4
  157. package/src/components/FloatingChat/FloatingChat.tsx +3 -2
  158. package/src/components/FloatingChat/components/AgentMessage.tsx +1 -0
  159. package/src/components/FloatingChat/components/Layout.tsx +7 -2
  160. package/src/components/FloatingChat/components/ReviewCardsCarousel.tsx +3 -0
  161. package/src/components/ProductCard/ProductCard.tsx +12 -1
  162. package/src/components/ProductCard/components/Header.tsx +10 -8
  163. package/src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.tsx +6 -3
  164. package/src/components/PromptButtonCarouselWithImage/components/Layout.tsx +13 -4
  165. package/src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx +63 -20
  166. package/src/components/PromptCarousel/PromptCarousel.tsx +88 -51
  167. package/src/components/PromptCarousel/hooks/index.ts +2 -4
  168. package/src/components/PromptCarousel/hooks/useCoordinatedScrollAnimation.ts +115 -0
  169. package/src/components/PromptCarousel/hooks/useHorizontalScrollAnimation.ts +71 -78
  170. package/src/components/PromptCarousel/hooks/useScrollSync.ts +83 -0
  171. package/src/components/WidgetTextField/WidgetTextField.tsx +9 -1
  172. package/src/components/WidgetTextField/components/FakeTextInput.tsx +6 -2
  173. package/src/components/WidgetTextField/components/Icon.tsx +43 -9
  174. package/src/components/WidgetTextField/types/types.ts +3 -0
  175. package/src/components/utils/useDragToScroll.ts +83 -0
  176. package/dist/PromptCarousel/components/BlockScrollContainer.cjs +0 -23
  177. package/dist/PromptCarousel/components/BlockScrollContainer.js +0 -21
  178. package/dist/PromptCarousel/components/ButtonContainerRow.cjs +0 -34
  179. package/dist/PromptCarousel/components/ButtonContainerRow.js +0 -32
  180. package/dist/PromptCarousel/components/CarouselContentWithBlockScroll.cjs +0 -45
  181. package/dist/PromptCarousel/components/CarouselContentWithBlockScroll.js +0 -44
  182. package/dist/PromptCarousel/components/CarouselContentWithRowScroll.cjs +0 -33
  183. package/dist/PromptCarousel/components/CarouselContentWithRowScroll.js +0 -32
  184. package/dist/PromptCarousel/components/index.cjs +0 -13
  185. package/dist/PromptCarousel/components/index.js +0 -13
  186. package/dist/PromptCarousel/hooks/useButtonScrollPosition.cjs +0 -79
  187. package/dist/PromptCarousel/hooks/useButtonScrollPosition.js +0 -78
  188. package/dist/PromptCarousel/hooks/useCarouselAnimation.cjs +0 -23
  189. package/dist/PromptCarousel/hooks/useCarouselAnimation.js +0 -22
  190. package/dist/PromptCarousel/hooks/useCarouselRefs.cjs +0 -20
  191. package/dist/PromptCarousel/hooks/useCarouselRefs.js +0 -19
  192. package/dist/PromptCarousel/hooks/useGetScrollProperties.cjs +0 -18
  193. package/dist/PromptCarousel/hooks/useGetScrollProperties.js +0 -17
  194. package/dist/PromptCarousel/hooks/useHorizontalScrollAnimation.cjs +0 -78
  195. package/dist/PromptCarousel/hooks/useHorizontalScrollAnimation.js +0 -77
  196. package/src/components/PromptCarousel/components/BlockScrollContainer.tsx +0 -34
  197. package/src/components/PromptCarousel/components/ButtonContainerRow.tsx +0 -46
  198. package/src/components/PromptCarousel/components/CarouselContentWithBlockScroll.tsx +0 -83
  199. package/src/components/PromptCarousel/components/CarouselContentWithRowScroll.tsx +0 -71
  200. package/src/components/PromptCarousel/components/index.ts +0 -9
  201. package/src/components/PromptCarousel/hooks/useButtonScrollPosition.ts +0 -128
  202. package/src/components/PromptCarousel/hooks/useCarouselAnimation.ts +0 -47
  203. package/src/components/PromptCarousel/hooks/useCarouselRefs.ts +0 -27
@@ -57,6 +57,7 @@ const AnimatedText = (0, react.memo)(({ sequence, typingDuration = DEFAULT_TYPIN
57
57
  ]);
58
58
  return getNodeWrapper(currentText);
59
59
  });
60
+ AnimatedText.displayName = "AnimatedText";
60
61
 
61
62
  //#endregion
62
63
  exports.AnimatedText = AnimatedText;
@@ -56,6 +56,7 @@ const AnimatedText = memo(({ sequence, typingDuration = DEFAULT_TYPING_DURATION,
56
56
  ]);
57
57
  return getNodeWrapper(currentText);
58
58
  });
59
+ AnimatedText.displayName = "AnimatedText";
59
60
 
60
61
  //#endregion
61
62
  export { AnimatedText };
@@ -1,10 +1,10 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime33 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/CSSVariablesEditor/CssVariablesEditorComponent.d.ts
4
4
  declare const CssVariablesEditorComponent: ({
5
5
  selectedMerchantName
6
6
  }: {
7
7
  selectedMerchantName: string;
8
- }) => react_jsx_runtime23.JSX.Element;
8
+ }) => react_jsx_runtime33.JSX.Element;
9
9
  //#endregion
10
10
  export { CssVariablesEditorComponent };
@@ -1,10 +1,10 @@
1
- import * as react_jsx_runtime28 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime29 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/CSSVariablesEditor/CssVariablesEditorComponent.d.ts
4
4
  declare const CssVariablesEditorComponent: ({
5
5
  selectedMerchantName
6
6
  }: {
7
7
  selectedMerchantName: string;
8
- }) => react_jsx_runtime28.JSX.Element;
8
+ }) => react_jsx_runtime29.JSX.Element;
9
9
  //#endregion
10
10
  export { CssVariablesEditorComponent };
@@ -3,8 +3,8 @@ const require_useGetCurrentMerchantColors = require('../hooks/useGetCurrentMerch
3
3
  const require_useGetDefaultCssVariables = require('../hooks/useGetDefaultCssVariables.cjs');
4
4
  const require_functions = require('../utils/functions.cjs');
5
5
  const require_useHandleCssVariablesState = require('../hooks/useHandleCssVariablesState.cjs');
6
- let react = require("react");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let react = require("react");
8
8
 
9
9
  //#region src/components/CSSVariablesEditor/components/CSSVariablesEditor.tsx
10
10
  const CSSVariablesEditor = ({ selectedMerchantName }) => {
@@ -2,8 +2,8 @@ import { useGetCurrentMerchantColors } from "../hooks/useGetCurrentMerchantColor
2
2
  import { useGetDefaultCssVariables } from "../hooks/useGetDefaultCssVariables.js";
3
3
  import { hexToColorPicker } from "../utils/functions.js";
4
4
  import { useHandleCssVariablesState } from "../hooks/useHandleCssVariablesState.js";
5
- import { useMemo } from "react";
6
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { useMemo } from "react";
7
7
 
8
8
  //#region src/components/CSSVariablesEditor/components/CSSVariablesEditor.tsx
9
9
  const CSSVariablesEditor = ({ selectedMerchantName }) => {
@@ -1,5 +1,5 @@
1
1
  import { CarouselProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime30 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime29 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Carousel/Carousel.d.ts
5
5
  declare const Carousel: ({
@@ -11,6 +11,6 @@ declare const Carousel: ({
11
11
  badgeLabel,
12
12
  theme,
13
13
  hideNavigation
14
- }: CarouselProps) => react_jsx_runtime30.JSX.Element;
14
+ }: CarouselProps) => react_jsx_runtime29.JSX.Element;
15
15
  //#endregion
16
16
  export { Carousel };
@@ -1,5 +1,5 @@
1
1
  import { CarouselProps } from "./types/types.js";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime30 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Carousel/Carousel.d.ts
5
5
  declare const Carousel: ({
@@ -11,6 +11,6 @@ declare const Carousel: ({
11
11
  badgeLabel,
12
12
  theme,
13
13
  hideNavigation
14
- }: CarouselProps) => react_jsx_runtime19.JSX.Element;
14
+ }: CarouselProps) => react_jsx_runtime30.JSX.Element;
15
15
  //#endregion
16
16
  export { Carousel };
@@ -7,8 +7,8 @@ const require_useCarouselItems = require('../hooks/useCarouselItems.cjs');
7
7
  const require_useCarouselNavigation = require('../hooks/useCarouselNavigation.cjs');
8
8
  const require_useCarouselNavigationButtons = require('../hooks/useCarouselNavigationButtons.cjs');
9
9
  const require_useCarouselButtons = require('../hooks/useCarouselButtons.cjs');
10
- let react = require("react");
11
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
+ let react = require("react");
12
12
 
13
13
  //#region src/components/Carousel/components/Container.tsx
14
14
  const Container$1 = ({ children, className, id, testId, style, next, previous, badge }) => {
@@ -6,8 +6,8 @@ import { useCarouselItems } from "../hooks/useCarouselItems.js";
6
6
  import { useCarouselNavigation } from "../hooks/useCarouselNavigation.js";
7
7
  import { useCarouselNavigationButtons } from "../hooks/useCarouselNavigationButtons.js";
8
8
  import { useCarouselButtons } from "../hooks/useCarouselButtons.js";
9
- import { useRef } from "react";
10
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { useRef } from "react";
11
11
 
12
12
  //#region src/components/Carousel/components/Container.tsx
13
13
  const Container$1 = ({ children, className, id, testId, style, next, previous, badge }) => {
@@ -1,5 +1,5 @@
1
1
  import { ChatFooterProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime34 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime32 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatFooter/ChatFooter.d.ts
5
5
  declare const ChatFooter: ({
@@ -18,6 +18,6 @@ declare const ChatFooter: ({
18
18
  disabled,
19
19
  isLoadingPromptSuggestions,
20
20
  disabledInput
21
- }: ChatFooterProps) => react_jsx_runtime34.JSX.Element;
21
+ }: ChatFooterProps) => react_jsx_runtime32.JSX.Element;
22
22
  //#endregion
23
23
  export { ChatFooter };
@@ -2,7 +2,7 @@ import { LayoutProps } from "./Layout.cjs";
2
2
  import { PromptSuggestionsProps } from "./PromptSuggestions.cjs";
3
3
  import { TextFieldProps } from "../../TextField/types/index.cjs";
4
4
  import * as react183 from "react";
5
- import * as react_jsx_runtime32 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime30 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/ChatFooter/components/index.d.ts
8
8
  declare const ChatFooterComponents: {
@@ -17,7 +17,7 @@ declare const ChatFooterComponents: {
17
17
  testId,
18
18
  className,
19
19
  style
20
- }: LayoutProps) => react_jsx_runtime32.JSX.Element;
20
+ }: LayoutProps) => react_jsx_runtime30.JSX.Element;
21
21
  EnviveLogo: ({
22
22
  style
23
23
  }: {
@@ -31,7 +31,7 @@ declare const ChatFooterComponents: {
31
31
  className,
32
32
  style,
33
33
  disabled
34
- }: PromptSuggestionsProps) => react_jsx_runtime32.JSX.Element;
34
+ }: PromptSuggestionsProps) => react_jsx_runtime30.JSX.Element;
35
35
  TextField: ({
36
36
  theme,
37
37
  placeholder,
@@ -1,8 +1,8 @@
1
1
  import { LayoutProps } from "./Layout.js";
2
2
  import { PromptSuggestionsProps } from "./PromptSuggestions.js";
3
3
  import { TextFieldProps } from "../../TextField/types/index.js";
4
- import * as react178 from "react";
5
- import * as react_jsx_runtime29 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime32 from "react/jsx-runtime";
5
+ import * as react183 from "react";
6
6
 
7
7
  //#region src/components/ChatFooter/components/index.d.ts
8
8
  declare const ChatFooterComponents: {
@@ -17,13 +17,13 @@ declare const ChatFooterComponents: {
17
17
  testId,
18
18
  className,
19
19
  style
20
- }: LayoutProps) => react_jsx_runtime29.JSX.Element;
20
+ }: LayoutProps) => react_jsx_runtime32.JSX.Element;
21
21
  EnviveLogo: ({
22
22
  style
23
23
  }: {
24
24
  className?: string;
25
25
  style?: React.CSSProperties;
26
- }) => react178.ReactElement<react178.SVGProps<SVGSVGElement>, string | react178.JSXElementConstructor<any>>;
26
+ }) => react183.ReactElement<react183.SVGProps<SVGSVGElement>, string | react183.JSXElementConstructor<any>>;
27
27
  PromptSuggestions: ({
28
28
  theme,
29
29
  suggestions,
@@ -31,7 +31,7 @@ declare const ChatFooterComponents: {
31
31
  className,
32
32
  style,
33
33
  disabled
34
- }: PromptSuggestionsProps) => react_jsx_runtime29.JSX.Element;
34
+ }: PromptSuggestionsProps) => react_jsx_runtime32.JSX.Element;
35
35
  TextField: ({
36
36
  theme,
37
37
  placeholder,
@@ -1,5 +1,5 @@
1
1
  import { ChatHeaderProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatHeader/ChatHeader.d.ts
5
5
  declare const ChatHeader: ({
@@ -21,6 +21,6 @@ declare const ChatHeader: ({
21
21
  headerBgColor,
22
22
  onClose,
23
23
  onToggle
24
- }: ChatHeaderProps) => react_jsx_runtime18.JSX.Element;
24
+ }: ChatHeaderProps) => react_jsx_runtime21.JSX.Element;
25
25
  //#endregion
26
26
  export { ChatHeader };
@@ -1,5 +1,5 @@
1
1
  import { ChatHeaderProps } from "./types/index.js";
2
- import * as react_jsx_runtime33 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime27 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatHeader/ChatHeader.d.ts
5
5
  declare const ChatHeader: ({
@@ -21,6 +21,6 @@ declare const ChatHeader: ({
21
21
  headerBgColor,
22
22
  onClose,
23
23
  onToggle
24
- }: ChatHeaderProps) => react_jsx_runtime33.JSX.Element;
24
+ }: ChatHeaderProps) => react_jsx_runtime27.JSX.Element;
25
25
  //#endregion
26
26
  export { ChatHeader };
@@ -13,25 +13,35 @@ const require_WidgetTextField = require('../WidgetTextField/WidgetTextField.cjs'
13
13
  require('../WidgetTextField/index.cjs');
14
14
  const require_WidgetWrapperWithTitle = require('../WidgetWrapperWithTitle/WidgetWrapperWithTitle.cjs');
15
15
  let react_jsx_runtime = require("react/jsx-runtime");
16
+ let react = require("react");
16
17
 
17
18
  //#region src/components/ChatPreview/ChatPreview.tsx
18
19
  const ChatPreview = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
19
20
  const { id, testId, className, style } = baseProps ?? {};
20
21
  const { theme = require_theme.Theme.GLOBAL_CUSTOM, variant = require_types.WidgetWrapperVariant.CARD_WITH_BORDER, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
21
- const { messageText, promptButtonTexts, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
22
+ const { messageText, promptButtons, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
22
23
  const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
24
+ const suggestionTextMap = (0, react.useMemo)(() => {
25
+ return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
26
+ }, [promptButtons]);
27
+ const promptButtonTexts = (0, react.useMemo)(() => {
28
+ return Object.keys(suggestionTextMap);
29
+ }, [suggestionTextMap]);
30
+ const handleSuggestionButtonClick = (0, react.useCallback)((text) => {
31
+ handlePromptButtonClick?.(suggestionTextMap[text]);
32
+ }, [handlePromptButtonClick, suggestionTextMap]);
23
33
  const finalTheme = require_resolveTheme.resolveTheme(theme);
24
34
  const message = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.ChatPreviewComponents.Message, { messageText: messageText ?? "" });
25
35
  const promptCarousel = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
26
36
  promptButtonTexts: promptButtonTexts ?? [],
27
37
  promptButtonType: require_PromptButton_types_index.PromptButtonVariant.SUGGESTED_RESPONSE,
28
38
  promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_ONE,
29
- handleButtonClick: handlePromptButtonClick
39
+ handleButtonClick: handleSuggestionButtonClick
30
40
  });
31
41
  const widgetTextField = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetTextField.WidgetTextField, {
32
42
  theme: finalTheme,
33
43
  placeholder: textFieldPlaceholderText ?? "",
34
- onClick: () => handleTextFieldClick?.(textFieldPlaceholderText)
44
+ onClick: () => handleTextFieldClick?.()
35
45
  });
36
46
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetWrapperWithTitle.WidgetWrapperWithTitle, {
37
47
  id,
@@ -1,5 +1,5 @@
1
1
  import { ChatPreviewProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime29 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime28 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatPreview/ChatPreview.d.ts
5
5
  declare const ChatPreview: ({
@@ -7,6 +7,6 @@ declare const ChatPreview: ({
7
7
  widgetContentProps,
8
8
  widgetStyleProps,
9
9
  widgetEventProps
10
- }: ChatPreviewProps) => react_jsx_runtime29.JSX.Element;
10
+ }: ChatPreviewProps) => react_jsx_runtime28.JSX.Element;
11
11
  //#endregion
12
12
  export { ChatPreview };
@@ -1,5 +1,5 @@
1
1
  import { ChatPreviewProps } from "./types/types.js";
2
- import * as react_jsx_runtime32 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatPreview/ChatPreview.d.ts
5
5
  declare const ChatPreview: ({
@@ -7,6 +7,6 @@ declare const ChatPreview: ({
7
7
  widgetContentProps,
8
8
  widgetStyleProps,
9
9
  widgetEventProps
10
- }: ChatPreviewProps) => react_jsx_runtime32.JSX.Element;
10
+ }: ChatPreviewProps) => react_jsx_runtime26.JSX.Element;
11
11
  //#endregion
12
12
  export { ChatPreview };
@@ -12,25 +12,35 @@ import { WidgetTextField } from "../WidgetTextField/WidgetTextField.js";
12
12
  import "../WidgetTextField/index.js";
13
13
  import { WidgetWrapperWithTitle } from "../WidgetWrapperWithTitle/WidgetWrapperWithTitle.js";
14
14
  import { jsx } from "react/jsx-runtime";
15
+ import { useCallback, useMemo } from "react";
15
16
 
16
17
  //#region src/components/ChatPreview/ChatPreview.tsx
17
18
  const ChatPreview = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
18
19
  const { id, testId, className, style } = baseProps ?? {};
19
20
  const { theme = Theme.GLOBAL_CUSTOM, variant = WidgetWrapperVariant.CARD_WITH_BORDER, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
20
- const { messageText, promptButtonTexts, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
21
+ const { messageText, promptButtons, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
21
22
  const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
23
+ const suggestionTextMap = useMemo(() => {
24
+ return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
25
+ }, [promptButtons]);
26
+ const promptButtonTexts = useMemo(() => {
27
+ return Object.keys(suggestionTextMap);
28
+ }, [suggestionTextMap]);
29
+ const handleSuggestionButtonClick = useCallback((text) => {
30
+ handlePromptButtonClick?.(suggestionTextMap[text]);
31
+ }, [handlePromptButtonClick, suggestionTextMap]);
22
32
  const finalTheme = resolveTheme(theme);
23
33
  const message = /* @__PURE__ */ jsx(ChatPreviewComponents.Message, { messageText: messageText ?? "" });
24
34
  const promptCarousel = /* @__PURE__ */ jsx(PromptCarousel, {
25
35
  promptButtonTexts: promptButtonTexts ?? [],
26
36
  promptButtonType: PromptButtonVariant.SUGGESTED_RESPONSE,
27
37
  promptCarouselRows: PromptCarouselRows.ALWAYS_ONE,
28
- handleButtonClick: handlePromptButtonClick
38
+ handleButtonClick: handleSuggestionButtonClick
29
39
  });
30
40
  const widgetTextField = /* @__PURE__ */ jsx(WidgetTextField, {
31
41
  theme: finalTheme,
32
42
  placeholder: textFieldPlaceholderText ?? "",
33
- onClick: () => handleTextFieldClick?.(textFieldPlaceholderText)
43
+ onClick: () => handleTextFieldClick?.()
34
44
  });
35
45
  return /* @__PURE__ */ jsx(WidgetWrapperWithTitle, {
36
46
  id,
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
2
  const require_index = require('../../Typography/types/index.cjs');
3
- let react = require("react");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
+ let react = require("react");
5
5
 
6
6
  //#region src/components/ChatPreview/components/Message.tsx
7
7
  const MarkdownProcessor = (0, react.lazy)(async () => ({ default: (await Promise.resolve().then(() => require("../../MarkdownProcessor/MarkdownProcessor.cjs"))).MarkdownProcessor }));
@@ -1,6 +1,6 @@
1
1
  import { TypographyColor, TypographyVariant } from "../../Typography/types/index.js";
2
- import { Suspense, lazy } from "react";
3
2
  import { jsx } from "react/jsx-runtime";
3
+ import { Suspense, lazy } from "react";
4
4
 
5
5
  //#region src/components/ChatPreview/components/Message.tsx
6
6
  const MarkdownProcessor = lazy(async () => ({ default: (await import("../../MarkdownProcessor/MarkdownProcessor.js")).MarkdownProcessor }));
@@ -1,5 +1,6 @@
1
1
  import { Theme } from "../../tokens/theme/theme.cjs";
2
2
  import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.cjs";
3
+ import { Suggestion } from "@envive-ai/react-hooks/application/models";
3
4
 
4
5
  //#region src/components/ChatPreview/types/types.d.ts
5
6
 
@@ -46,9 +47,9 @@ type WidgetContentProps = {
46
47
  */
47
48
  messageText?: string;
48
49
  /**
49
- * Array of text labels for the prompt buttons.
50
+ * Array of Suggestions for the prompt buttons.
50
51
  */
51
- promptButtonTexts?: string[];
52
+ promptButtons?: Suggestion[];
52
53
  /**
53
54
  * Placeholder text for the text field input.
54
55
  * Displayed when the text field is visible.
@@ -110,13 +111,13 @@ type WidgetEventProps = {
110
111
  *
111
112
  * @param text - The text label of the clicked prompt button
112
113
  */
113
- handlePromptButtonClick?: (text: string) => void;
114
+ handlePromptButtonClick?: (suggestion: Suggestion) => void;
114
115
  /**
115
116
  * Callback function invoked when the text field is clicked.
116
117
  *
117
118
  * @param text - The placeholder text of the text field
118
119
  */
119
- handleTextFieldClick?: (text: string) => void;
120
+ handleTextFieldClick?: () => void;
120
121
  };
121
122
  /**
122
123
  * Props for the ChatPreviewComparison component.
@@ -1,5 +1,6 @@
1
1
  import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
2
2
  import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.js";
3
+ import { Suggestion } from "@envive-ai/react-hooks/application/models";
3
4
 
4
5
  //#region src/components/ChatPreview/types/types.d.ts
5
6
 
@@ -46,9 +47,9 @@ type WidgetContentProps = {
46
47
  */
47
48
  messageText?: string;
48
49
  /**
49
- * Array of text labels for the prompt buttons.
50
+ * Array of Suggestions for the prompt buttons.
50
51
  */
51
- promptButtonTexts?: string[];
52
+ promptButtons?: Suggestion[];
52
53
  /**
53
54
  * Placeholder text for the text field input.
54
55
  * Displayed when the text field is visible.
@@ -110,13 +111,13 @@ type WidgetEventProps = {
110
111
  *
111
112
  * @param text - The text label of the clicked prompt button
112
113
  */
113
- handlePromptButtonClick?: (text: string) => void;
114
+ handlePromptButtonClick?: (suggestion: Suggestion) => void;
114
115
  /**
115
116
  * Callback function invoked when the text field is clicked.
116
117
  *
117
118
  * @param text - The placeholder text of the text field
118
119
  */
119
- handleTextFieldClick?: (text: string) => void;
120
+ handleTextFieldClick?: () => void;
120
121
  };
121
122
  /**
122
123
  * Props for the ChatPreviewComparison component.
@@ -13,14 +13,24 @@ require('../WidgetTextField/index.cjs');
13
13
  const require_WidgetWrapperWithTitle = require('../WidgetWrapperWithTitle/WidgetWrapperWithTitle.cjs');
14
14
  const require_index = require('./components/index.cjs');
15
15
  let react_jsx_runtime = require("react/jsx-runtime");
16
+ let react = require("react");
16
17
 
17
18
  //#region src/components/ChatPreviewComparison/ChatPreviewComparison.tsx
18
19
  const ChatPreviewComparison = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
19
20
  const { id, testId, className, style } = baseProps ?? {};
20
21
  const { theme = require_theme.Theme.GLOBAL_CUSTOM, variant = require_types.WidgetWrapperVariant.CARD_WITH_BORDER, hideImage, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
21
- const { headlineText, messageText, promptButtonTexts, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
22
+ const { headlineText, messageText, promptButtons, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
22
23
  const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
23
24
  const finalTheme = require_resolveTheme.resolveTheme(theme);
25
+ const suggestionTextMap = (0, react.useMemo)(() => {
26
+ return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
27
+ }, [promptButtons]);
28
+ const promptButtonTexts = (0, react.useMemo)(() => {
29
+ return Object.keys(suggestionTextMap);
30
+ }, [suggestionTextMap]);
31
+ const handleSuggestionButtonClick = (0, react.useCallback)((text) => {
32
+ handlePromptButtonClick?.(suggestionTextMap[text]);
33
+ }, [handlePromptButtonClick, suggestionTextMap]);
24
34
  const headline = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.ChatPreviewComparisonComponents.Headline, {
25
35
  headlineText: headlineText ?? "",
26
36
  theme: finalTheme
@@ -33,12 +43,12 @@ const ChatPreviewComparison = ({ baseProps, widgetContentProps, widgetStyleProps
33
43
  promptButtonTexts: promptButtonTexts ?? [],
34
44
  promptButtonType: require_PromptButton_types_index.PromptButtonVariant.SUGGESTED_RESPONSE,
35
45
  promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_ONE,
36
- handleButtonClick: handlePromptButtonClick
46
+ handleButtonClick: handleSuggestionButtonClick
37
47
  });
38
48
  const widgetTextField = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetTextField.WidgetTextField, {
39
49
  theme: finalTheme,
40
50
  placeholder: textFieldPlaceholderText ?? "",
41
- onClick: () => handleTextFieldClick?.(textFieldPlaceholderText)
51
+ onClick: () => handleTextFieldClick?.()
42
52
  });
43
53
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetWrapperWithTitle.WidgetWrapperWithTitle, {
44
54
  id,
@@ -1,5 +1,5 @@
1
1
  import { ChatPreviewComparisonProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime31 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatPreviewComparison/ChatPreviewComparison.d.ts
5
5
  declare const ChatPreviewComparison: ({
@@ -7,6 +7,6 @@ declare const ChatPreviewComparison: ({
7
7
  widgetContentProps,
8
8
  widgetStyleProps,
9
9
  widgetEventProps
10
- }: ChatPreviewComparisonProps) => react_jsx_runtime31.JSX.Element;
10
+ }: ChatPreviewComparisonProps) => react_jsx_runtime18.JSX.Element;
11
11
  //#endregion
12
12
  export { ChatPreviewComparison };
@@ -1,5 +1,5 @@
1
1
  import { ChatPreviewComparisonProps } from "./types/types.js";
2
- import * as react_jsx_runtime34 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime28 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ChatPreviewComparison/ChatPreviewComparison.d.ts
5
5
  declare const ChatPreviewComparison: ({
@@ -7,6 +7,6 @@ declare const ChatPreviewComparison: ({
7
7
  widgetContentProps,
8
8
  widgetStyleProps,
9
9
  widgetEventProps
10
- }: ChatPreviewComparisonProps) => react_jsx_runtime34.JSX.Element;
10
+ }: ChatPreviewComparisonProps) => react_jsx_runtime28.JSX.Element;
11
11
  //#endregion
12
12
  export { ChatPreviewComparison };
@@ -12,14 +12,24 @@ import "../WidgetTextField/index.js";
12
12
  import { WidgetWrapperWithTitle } from "../WidgetWrapperWithTitle/WidgetWrapperWithTitle.js";
13
13
  import { ChatPreviewComparisonComponents } from "./components/index.js";
14
14
  import { jsx } from "react/jsx-runtime";
15
+ import { useCallback, useMemo } from "react";
15
16
 
16
17
  //#region src/components/ChatPreviewComparison/ChatPreviewComparison.tsx
17
18
  const ChatPreviewComparison = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
18
19
  const { id, testId, className, style } = baseProps ?? {};
19
20
  const { theme = Theme.GLOBAL_CUSTOM, variant = WidgetWrapperVariant.CARD_WITH_BORDER, hideImage, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
20
- const { headlineText, messageText, promptButtonTexts, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
21
+ const { headlineText, messageText, promptButtons, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
21
22
  const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
22
23
  const finalTheme = resolveTheme(theme);
24
+ const suggestionTextMap = useMemo(() => {
25
+ return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
26
+ }, [promptButtons]);
27
+ const promptButtonTexts = useMemo(() => {
28
+ return Object.keys(suggestionTextMap);
29
+ }, [suggestionTextMap]);
30
+ const handleSuggestionButtonClick = useCallback((text) => {
31
+ handlePromptButtonClick?.(suggestionTextMap[text]);
32
+ }, [handlePromptButtonClick, suggestionTextMap]);
23
33
  const headline = /* @__PURE__ */ jsx(ChatPreviewComparisonComponents.Headline, {
24
34
  headlineText: headlineText ?? "",
25
35
  theme: finalTheme
@@ -32,12 +42,12 @@ const ChatPreviewComparison = ({ baseProps, widgetContentProps, widgetStyleProps
32
42
  promptButtonTexts: promptButtonTexts ?? [],
33
43
  promptButtonType: PromptButtonVariant.SUGGESTED_RESPONSE,
34
44
  promptCarouselRows: PromptCarouselRows.ALWAYS_ONE,
35
- handleButtonClick: handlePromptButtonClick
45
+ handleButtonClick: handleSuggestionButtonClick
36
46
  });
37
47
  const widgetTextField = /* @__PURE__ */ jsx(WidgetTextField, {
38
48
  theme: finalTheme,
39
49
  placeholder: textFieldPlaceholderText ?? "",
40
- onClick: () => handleTextFieldClick?.(textFieldPlaceholderText)
50
+ onClick: () => handleTextFieldClick?.()
41
51
  });
42
52
  return /* @__PURE__ */ jsx(WidgetWrapperWithTitle, {
43
53
  id,
@@ -5,8 +5,8 @@ const require_resolveTheme = require('../../utils/resolveTheme.cjs');
5
5
  const require_index = require('../../Typography/types/index.cjs');
6
6
  require('../../Typography/index.cjs');
7
7
  const require_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
8
- let react = require("react");
9
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let react = require("react");
10
10
 
11
11
  //#region src/components/ChatPreviewComparison/components/Message.tsx
12
12
  const MarkdownProcessor = (0, react.lazy)(async () => ({ default: (await Promise.resolve().then(() => require("../../MarkdownProcessor/MarkdownProcessor.cjs"))).MarkdownProcessor }));
@@ -4,8 +4,8 @@ import { resolveTheme } from "../../utils/resolveTheme.js";
4
4
  import { TypographyColor, TypographyVariant } from "../../Typography/types/index.js";
5
5
  import "../../Typography/index.js";
6
6
  import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
7
- import { Suspense, lazy } from "react";
8
7
  import { jsx } from "react/jsx-runtime";
8
+ import { Suspense, lazy } from "react";
9
9
 
10
10
  //#region src/components/ChatPreviewComparison/components/Message.tsx
11
11
  const MarkdownProcessor = lazy(async () => ({ default: (await import("../../MarkdownProcessor/MarkdownProcessor.js")).MarkdownProcessor }));
@@ -1,6 +1,7 @@
1
1
  import { Theme } from "../../tokens/theme/theme.cjs";
2
2
  import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.cjs";
3
3
  import { ImageGalleryImage } from "../../ImageGallery/types/types.cjs";
4
+ import { Suggestion } from "@envive-ai/react-hooks/application/models";
4
5
 
5
6
  //#region src/components/ChatPreviewComparison/types/types.d.ts
6
7
 
@@ -53,7 +54,7 @@ type WidgetContentProps = {
53
54
  /**
54
55
  * Array of text labels for the prompt buttons.
55
56
  */
56
- promptButtonTexts?: string[];
57
+ promptButtons?: Suggestion[];
57
58
  /**
58
59
  * Placeholder text for the text field input.
59
60
  * Displayed when the text field is visible.
@@ -119,13 +120,12 @@ type WidgetEventProps = {
119
120
  *
120
121
  * @param text - The text label of the clicked prompt button
121
122
  */
122
- handlePromptButtonClick?: (text: string) => void;
123
+ handlePromptButtonClick?: (suggestion: Suggestion) => void;
123
124
  /**
124
125
  * Callback function invoked when the text field is clicked.
125
126
  *
126
- * @param text - The placeholder text of the text field
127
127
  */
128
- handleTextFieldClick?: (text: string) => void;
128
+ handleTextFieldClick?: () => void;
129
129
  };
130
130
  /**
131
131
  * Props for the ChatPreviewComparison component.
@@ -1,6 +1,7 @@
1
1
  import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
2
2
  import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.js";
3
3
  import { ImageGalleryImage } from "../../ImageGallery/types/types.js";
4
+ import { Suggestion } from "@envive-ai/react-hooks/application/models";
4
5
 
5
6
  //#region src/components/ChatPreviewComparison/types/types.d.ts
6
7
 
@@ -53,7 +54,7 @@ type WidgetContentProps = {
53
54
  /**
54
55
  * Array of text labels for the prompt buttons.
55
56
  */
56
- promptButtonTexts?: string[];
57
+ promptButtons?: Suggestion[];
57
58
  /**
58
59
  * Placeholder text for the text field input.
59
60
  * Displayed when the text field is visible.
@@ -119,13 +120,12 @@ type WidgetEventProps = {
119
120
  *
120
121
  * @param text - The text label of the clicked prompt button
121
122
  */
122
- handlePromptButtonClick?: (text: string) => void;
123
+ handlePromptButtonClick?: (suggestion: Suggestion) => void;
123
124
  /**
124
125
  * Callback function invoked when the text field is clicked.
125
126
  *
126
- * @param text - The placeholder text of the text field
127
127
  */
128
- handleTextFieldClick?: (text: string) => void;
128
+ handleTextFieldClick?: () => void;
129
129
  };
130
130
  /**
131
131
  * Props for the ChatPreviewComparison component.